http://stackoverflow.com/a/26597714
has body: append('') appends a element, not simple the the string ''. So the call to append($('#content').data("myDate")) then appends the date after the .visitdate span you just created instead of inside it. You'd be better off to just concatenate the strings building the .visitdate span: var visitStatus = $('#sideBar').find("p[class=visitstatus]"); $(visitStatus).append('Visited on '); $(visitStatus).append('' + $('#content').data("myDate") + '');
accepted answer of: http://stackoverflow.com/q/26597232
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26597232
type: Answer

http://stackoverflow.com/comment/41913984
type: Comment
has text: "browser return timezone id like" is just because you're using bad code to get the time zone... see the referenced question (which you knew about before asking this one...)
score: 0
comment on: http://stackoverflow.com/q/26655600
type: QuestionComment

http://stackoverflow.com/comment/41740116
type: Comment
has text: I' ve done it (with your help) like that (see updated question)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26556685

http://stackoverflow.com/comment/41940697
comment on: http://stackoverflow.com/a/26669815
score: 0
type: Comment
has text: Mephiztopheles: nice..can i also check that scroll is just small above from the bottom.so that loader will call before scroll touch to bottom.
type: AnswerComment

http://stackoverflow.com/q/26577180
accepted answer: http://stackoverflow.com/a/26580186
linked to: http://stackoverflow.com/q/26612516
type: AnsweredQuestion
tagged with: dygraphs
has answer: http://stackoverflow.com/a/26580186
possible better answer: http://stackoverflow.com/a/57998212
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I'd like to use Dygraphs for a web project, but I need to graph my lines in a "vertical" fashion- meaning- what is normally the X axis (horizontally, along the bottom), I need to be graphed from top to bottom (with the x axis along the left edge). I've looked at several graphing libraries for this and none seem to support it. I recently discovered Dygraphs so I'm hoping it might have this feature.
has title: Vertical graphing in Dygraph?
favorite count: 0
has answer: http://stackoverflow.com/a/57998212
score: 2
upvote count: 2

http://stackoverflow.com/comment/41682755
has text: @Jivings It *must* be. I just tried calling it from within `MyFunction` it still works great. The only place it doesn't is from the `click` anonymous function... :S
type: Comment
comment on: http://stackoverflow.com/q/26527786
type: QuestionComment
score: 0

http://stackoverflow.com/q/26587503
has comment: http://stackoverflow.com/comment/41789947
accepted answer: http://stackoverflow.com/a/26587530
answer count: 1
has answer: http://stackoverflow.com/a/26587530
has body: I'm writing a plugin for some tool and the API is JavaScript. I need to know whether a file exists or not, and I'd like to avoid operating system calls in order to abstract from it, but using the JavaScript language instead, if possible. Is it possible to know if a file exists locally in JavaScript, given a path?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41789954
type: Question
has title: How to check if file exists locally in JavaScript?
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41935391
type: Comment
comment on: http://stackoverflow.com/a/26666357
score: 0
has text: Edited my answer. Please check if it works now. That should finally do it. Dont forget to accept this as answer if it works :)
type: AnswerComment

http://stackoverflow.com/q/26598622
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/35052798
accepted answer: http://stackoverflow.com/a/26598710
type: Question
score: 1
tagged with: angularjs
linked to: http://stackoverflow.com/q/14049480
answer count: 3
has comment: http://stackoverflow.com/comment/41811650
upvote count: 1
has answer: http://stackoverflow.com/a/26598786
has title: AngularJS ng-repeat on directive and parent scope
has answer: http://stackoverflow.com/a/26598710
has body: I have a repeated directive which inherits the scope from it's parent controller. &lt;div ng-controller="myController"&gt; {{ message }} &lt;person ng-repeat="person in persons"&gt;&lt;/person&gt; &lt;/div&gt; &nbsp; app.controller('myController', function ($scope) { $scope.message = "A"; $scope.persons = { 1: {}, 2: {}, 3: {} } }); But when I change the scope inside the directive, the parent scope does not update. &nbsp; app.controller('PersonController', function ($scope) { $scope.message = "B"; }); app.directive("person", function () { return { restrict: 'E', transclude: true, controller: 'PersonController', template: '{{ message }}' }; }); http://jsfiddle.net/hientc/L8xo9338/1/ This only happens when I have an ng-repeat on the directive. If I remove the ng-repeat, the parent scope is updated when the directive scope is updated. How do I make two-way binding work for ng-repeat?
possible better answer: http://stackoverflow.com/a/26598786
has comment: http://stackoverflow.com/comment/41811690

http://stackoverflow.com/a/26571454
has comment: http://stackoverflow.com/comment/41762268
accepted answer of: http://stackoverflow.com/q/26571384
has comment: http://stackoverflow.com/comment/41761196
score: 0
has body: Short of writing your own manual bootstrapping, you can't use a service before angular has been bootstrapped. But why do you need to? You can simply fetch the data after angular has bootstrapped, e.g. like Marvin Smit mentions in the comments, fetch it in your controller: function MyCtrl($http, $scope) { $http.get('whatever') .then(function success(response) { $scope.stuff = response.data }) } Angular's directives and interpolation are written with this in mind, and would not error if there's no $scope.stuff defined when the controller is executed. Or you could use ngRoute/ui-router and the resolve parameter for a route(see https://docs.angularjs.org/api/ngRoute/provider/$routeProvider)
has comment: http://stackoverflow.com/comment/41762283
has comment: http://stackoverflow.com/comment/41775096
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26571384
type: Answer
has comment: http://stackoverflow.com/comment/41761358

http://stackoverflow.com/q/26521914
has comment: http://stackoverflow.com/comment/41673077
has answer: http://stackoverflow.com/a/26524927
tagged with: hover
has title: hovering over image changes it to hoverimg. but after clicking the image, hover stops working
score: 0
tagged with: image
type: Question
has body: It works but there's a pesky bug I can't understand how to fix (i'm a beginner). What happens is there are 3 image buttons (only showing code for 1 here) and when i hover over them, they change image, and revert when i take mouse off. This is the html. When I click any of the 3 image buttons (javascript), it changes its own image, and sets the other 2 image buttons to the normal image. After this point (clicking the image) the hovering html code doesn't work anymore. function changeImage3() { document.getElementById('MageBTN').src = 'images/Character/NotSelected_Mage.png'; document.getElementById('WarriorBTN').src = 'images/Character/NotSelected_Warrior.png'; } &lt;a href="#" onclick="changeImage3()"&gt;&lt;img id="RogueBTN" src="images/Character/NotSelected_Rogue.png" alt="image" onclick="this.src='images/Character/Selected_Rogue.png'; this.onmouseover = false; this.onmouseout = false;" onmouseover="this.src='images/Character/Selected_Rogue.png';" onmouseout="this.src='images/Character/NotSelected_Rogue.png';"&gt; &lt;/a&gt;
answer count: 2
has answer: http://stackoverflow.com/a/26524901
has comment: http://stackoverflow.com/comment/41674555
tagged with: javascript
tagged with: click
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41673937
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41672731
has comment: http://stackoverflow.com/comment/41673475

http://stackoverflow.com/a/26545804
accepted answer of: http://stackoverflow.com/q/26536252
type: Answer
answers question: http://stackoverflow.com/q/26536252
score: 0
type: AcceptedAnswer
has body: I found the solution for my problem. As //server.js exports.var1 = var1; var queries = require('./queries'), query1 = queries.query1; is executed once and remains in the cache, I changed my code without exporting var1: //server.js var queries = require('./queries'), query1 = queries.query1 + var1; and //queries.js var server = require('./server'), query1 = 'SELECT distinct(transcript_alias)\ FROM transcript_features \ WHERE f.transcript_alias = '; exports.query1 = query1; In other words, I import my query to server.js without any variable. The variable is assigned at server.js.

http://stackoverflow.com/q/26518030
type: Question
tagged with: javascript
has title: Main Router appends a # at the end of route "" cause in dom referencing anchors not work in Backbone/Require app
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26518375
accepted answer: http://stackoverflow.com/a/26518375
has comment: http://stackoverflow.com/comment/41670601
has body: In a Backbone.Router main router, I have "" route for my beginning route on app load. Its method decides to whether to create and render login view first or home view. When localhost:8080/indexapp is visited with no route it triggers the first route below, the empty "" route. After login and arriving homeview, url in address bar looks like localhost:8080/indexapp#. Form this point ordinary anchor hrefs referencing some dom elements currently available in the document does not lead to them. If I delete the hash at the end of the url and refresh the page, anchors work as intended. What is the reason for that? What is the way to solve this issue? mainrouter: define([ 'jquery', 'ratchet', 'underscore', 'backbone', 'forms/formsdatamodel', 'login/loginview', 'register/registerview', 'home/homeview', ], function($, Ratchet, _, Backbone, formsDataModelInst, LoginView, RegisterView, HomeView){ var MainRouter = Backbone.Router.extend({ routes: { "": "render_home", "login": "render_login", "register": "render_register", }, initialize: function(){ this.listenTo( formsDataModelInst, 'sync', this.render_home ); }, render_home: function(){ if( formsDataModelInst.get('loginp') == true ){ //show you app view for logged in users! this.homeView = new HomeView(); this.homeView.render(); } else if ( formsDataModelInst.get('loginp') == false ){ //not logged in! Backbone.history.navigate("/login", {trigger:true}); } }, render_login: function(){ //display your login view this.loginView = new LoginView; this.loginView.render(); }, render_register: function(){ //display your register view this.registerView = new RegisterView; this.registerView.render(); }, }); return MainRouter; });
favorite count: 0
tagged with: backbone.js
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/26632553
tagged with: ajax
has comment: http://stackoverflow.com/comment/41873155
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41873071
possible better answer: http://stackoverflow.com/a/26632931
accepted answer: http://stackoverflow.com/a/26632649
has answer: http://stackoverflow.com/a/26632931
has comment: http://stackoverflow.com/comment/41873113
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41873184
upvote count: 3
type: Question
answer count: 2
downvote count: 4
has title: find id thru class in ajax response
tagged with: javascript
has comment: http://stackoverflow.com/comment/41873189
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26632649
has body: Been working on this for hours every solution I found on the web returns "undefined". I have a form submitted thru jquery validation plugin using ajax. response returns .... the id changes depending on the data its like this &lt;div class="item" id="item-1"&gt; .... &lt;/div&gt; &lt;div class="item" id="item-2"&gt; .... &lt;/div&gt; &lt;div class="item" id="item-3"&gt; .... &lt;/div&gt; And by the way, I don't have access to the php server returning the data. I want to get the id name in order to remove the div element with the same id first and append the response from the server. last code I tried is var targetDiv = $(response).find('.item'); alert(targetDiv); thanks

http://stackoverflow.com/comment/41939764
comment on: http://stackoverflow.com/q/26669184
has text: Uhh, what about simple numeric comparisons `if (num >= 1000)` for thousands followed by `else if (num >= 100)` for hundreds.
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/41913392
type: Comment
has text: @DanielNolan you have `Uncaught ReferenceError: $f is not defined`, which means you need to add the library, I've edited the answet to be more clear.
score: 0
comment on: http://stackoverflow.com/a/26655028
type: AnswerComment

http://stackoverflow.com/comment/41793062
has text: Well, if it so, you can use something weird like [this code](http://jsfiddle.net/oa1dgg51/).
score: 0
comment on: http://stackoverflow.com/q/26588996
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41795635
type: Comment
type: QuestionComment
has text: have you tested to find out?
comment on: http://stackoverflow.com/q/26590410
score: 0

http://stackoverflow.com/q/26528444
has title: Looping over a some hard coded data
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41684798
has comment: http://stackoverflow.com/comment/41684074
possible better answer: http://stackoverflow.com/a/26528577
type: Question
accepted answer: http://stackoverflow.com/a/26528487
score: 1
linked to: http://stackoverflow.com/q/5167323
has answer: http://stackoverflow.com/a/26528487
has answer: http://stackoverflow.com/a/26528699
tagged with: for-loop
has answer: http://stackoverflow.com/a/26528577
has body: In several places, I have loops over a pre-defined set of values. My current code is: for (var period in {'today':true,'yesterday':true,'this week':true,'last week':true,'this month':true,'last month':true}) { ... } It works, but is there a prettier way of doing this? (period needs to be the values, not the index, otherwise I would use an array.)
upvote count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41711447
answer count: 3

http://stackoverflow.com/comment/41910752
has text: I don't see the difference to be honest -- your data has exactly the same structure as in the question you've linked to.
comment on: http://stackoverflow.com/q/26652777
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41684349
has text: So i have done some debugging. And i chose to log the complete char array of the string i get from the jsp. And this is where it gets weird. I have surrounded each char with double-quotes. Is does like so: char: "" but the empty-char inside, actually breaks the line in my log file aswell.
score: 0
comment on: http://stackoverflow.com/q/26526805
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41933415
has text: Thanks, this one was driving me crazy! I'll accept answer when SO allows.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26665807

http://stackoverflow.com/a/26670891
has body: Reading about window.navigator at MDN: The Window.navigator read-only property returns a reference to the Navigator object, which can be queried for information about the application running the script. Its read-only, you can't change its value.
type: Answer
answers question: http://stackoverflow.com/q/26670815
score: 0

http://stackoverflow.com/q/26636653
linked to: http://stackoverflow.com/q/476436
upvote count: 2
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41880702
possible better answer: http://stackoverflow.com/a/26636815
has comment: http://stackoverflow.com/comment/123992860
favorite count: 0
has comment: http://stackoverflow.com/comment/41880938
tagged with: operators
accepted answer: http://stackoverflow.com/a/26636755
has body: I am new to javascript and so far it is my understanding that: ? &amp; : is used for "if true, do this, if false do this" However, I am having a little more trouble with ||. From my browsing it seems something like "if the first one is true do that, otherwise do this" I am trying to figure out the following code - any suggestions on what they mean together in this context?: function isSubset(series, description){ var subset = true; var exactMatch = true; demoCodes = ['age', 'edu', 'race', 'sex']; for (var i = 0; i &lt; demoCodes.length; i++){ var demoCode = demoCodes[i]; subset = (subset) ? (description[demoCode] == 0 || description[demoCode] == series[demoCode]) : false; exactMatch = (exactMatch) ? description[demoCode] == series[demoCode] : false; } return {subset: subset, exactMatch: exactMatch}; } Thanks! Cheers
tagged with: d3.js
has answer: http://stackoverflow.com/a/26636755
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26636815
type: Question
tagged with: function
has title: Javascript Question Mark & Double Pipes
tagged with: javascript

http://stackoverflow.com/q/26640876
has body: " ?> //variablephp is php variable <?php $result = mysql_query("SELECT * FROM translate where English='$variablephp'"); ?>
type: Question
has title: How do I pass a Jquery variable to php variables for the Select Query?
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41888909
has comment: http://stackoverflow.com/comment/41888881
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/41888697
tagged with: php
has answer: http://stackoverflow.com/a/26640988
downvote count: 3
tagged with: mysql

http://stackoverflow.com/q/26523982
has comment: http://stackoverflow.com/comment/41679145
type: Question
answer count: 2
downvote count: 1
tagged with: indexof
upvote count: 0
has comment: http://stackoverflow.com/comment/41833650
has answer: http://stackoverflow.com/a/26524105
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26525933
has body: I have a form that user fill with tags like this: Tag Value 1 Tag Value 2 And would like to know if there is a way in Javascript to search the following strings: String 1 = <messsageCode> String 2 = Tag Value 1? I should use index of?
has title: Search a string
favorite count: 0
score: -1

http://stackoverflow.com/q/26671803
type: AnsweredQuestion
has title: Is angular.js considered too large for simpler use cases
has answer: http://stackoverflow.com/a/26671894
type: Question
possible better answer: http://stackoverflow.com/a/26671876
answer count: 2
has body: Would angular.js be considered too large to use for simpler use cases, for example just for a certain portion of a web page which is not a SPA ?
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26671876
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26671894

http://stackoverflow.com/q/26661846
has comment: http://stackoverflow.com/comment/41926126
has answer: http://stackoverflow.com/a/26661997
has body: Hi I'm kind of new to Javascript and jQuery, what I want to do is a suggestion box that opens when the user clicks on a bottom div or button, and the div appears, so to do that I will use jQuery, the problem is that this will only be shown to logged users. I know how to validate a session state with Javascript, so here comes my question, how can I make this thing to only show to logged in users using only jQuery, or using a Javascript? Can I use both? Note: I'm using .ASPX with C# on Visual Studio, this file uses a MasterPage Here is the jQuery code, animations work kind of lame but it works as intended: Here the HTML, still no backcode on C#, that I will do later <asp:Content ContentPlaceHolderID="chat_on" ID="cajadechat" runat="server"> Chat en Línea En este momento no estamos conectados al Chat. Pero déjanos un mensaje y muy pronto nos contactaremos contigo. ¡Gracias! Su nombre*: <asp:TextBox ID="txt_nombrechat" CssClass="chattext" runat="server" ></asp:TextBox> Su correo*: <asp:TextBox ID="txt_correochat" CssClass="chattext" runat="server" ></asp:TextBox> Su pregunta*: <asp:TextBox TextMode="MultiLine" CssClass="chatarea" runat="server" ></asp:TextBox> <asp:Button ID="btn_chat" CssClass="chatbutton" runat="server" Text="ENVIAR" /> </asp:Content> And here the corresponding CSS #contacto_ebook{ position:fixed; right:150px; bottom:0; z-index:40; font-family: EuroStileTRegExt; } #chat_header{ height:10px; width:260px; padding:10px 0 10px; background-color:#3a80cb; border-top-right-radius: 4px; border-top-left-radius: 4px; } #chat_header:hover{ background-color:#499cf5; cursor:pointer; } #chat_content{ height:280px; width:240px; background-color:#ffffff; text-align:left !important; padding:5px 10px 0 10px; } .chatbutton,.chattext,.chatarea{ border-radius:3px; font-size:14px !important; } .chatbutton{ height:40px; width:100%; margin-top:4px; cursor:pointer; color:#ffffff; box-shadow:none; background-color:#3a80cb; border:none; } .chatbutton:hover{ background-color:#49…
tagged with: c#
tagged with: javascript
has title: Use javascript validation to use jQuery
has comment: http://stackoverflow.com/comment/41926072
has comment: http://stackoverflow.com/comment/41925801
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26661997
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41925864
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has comment: http://stackoverflow.com/comment/41926035
answer count: 1

transition
tags question: http://stackoverflow.com/q/26653902
tag name: transition
type: Tag

http://stackoverflow.com/comment/41846633
has text: Care to add some explanation or comment? Code-only answers are not too welcome here. Your answer was flagged for deletion, probably due to not even a tiny explanation or comment.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26617209
score: 0

http://stackoverflow.com/comment/71057968
type: QuestionComment
comment on: http://stackoverflow.com/q/26524620
score: 0
has text: Any answer on this?
type: Comment

http://stackoverflow.com/comment/41763863
type: QuestionComment
type: Comment
has text: My point is that the user may not have the correct time set on their computer. Do you mean 3 - 6 pm _their_ time, or...?
score: 0
comment on: http://stackoverflow.com/q/26572995

http://stackoverflow.com/comment/41857859
has text: Hi Radim, Tried your solution in the fiddle that I mentioned above, but its not working.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26607722

http://stackoverflow.com/comment/41662008
score: 0
type: Comment
type: QuestionComment
has text: What's `<hsi:calendar`? What is the *actual* HTML on your page (view source)?
comment on: http://stackoverflow.com/q/26513797

http://stackoverflow.com/comment/41897821
type: Comment
comment on: http://stackoverflow.com/q/26646099
has text: Thanks @Xlander I'll do that now.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41730131
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26541791
has text: Ti.App.responsebt2 is a global var,I need this variable to process this event outside

http://stackoverflow.com/comment/41945951
type: AnswerComment
comment on: http://stackoverflow.com/a/26669880
has text: i need an error in Farsi language not in English, so i have to use java or php and i can't use HTML 5, thank you
type: Comment
score: 0

http://stackoverflow.com/comment/41750401
type: Comment
has text: okey why are you declaring two variables to_disp and to_show both have same value
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26565264

http://stackoverflow.com/comment/41752939
comment on: http://stackoverflow.com/q/26566774
type: QuestionComment
has text: @mrquad In the compiled view you should have `<?php echo URL::asset('assets/test_app/'); ?>` not `{{ URL::asset('assets/test_app/')}}`, which means the view is not being compiled properly. How are you returning the view in your route/controller?
type: Comment
score: 1

http://stackoverflow.com/a/26546611
type: Answer
has body: create a function that will start the ajax request and call again the same function once ajax process is completed function ajaxload(){ $.ajax({ type: 'POST', url: 'get_db.php', data: {name: 'users'}, success: function(result) { $(result).hide().appendTo('div ul').fadeIn(1000); ajaxload(); } }); } note: I just don't know when or how you will stop it because its base already on your requirements :) maybe you can make a return value from ajax request and read it on the client side that will trigger the halt of the process.
score: 0
answers question: http://stackoverflow.com/q/26546536

http://stackoverflow.com/a/26592395
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26591675
score: 2
has body: Ok then, try using this code it will help you : JAVASCRIPT: var counter = 0; setInterval(function () { if (counter&lt;10) ++counter; else counter =0; document.getElementById("count").innerHTML="00:"+counter; }, 1000); HTML: &lt;p id="count"&gt;&lt;/p&gt; You can test it here. Edit: And to make it fit your question try to use this function: function swap(one, two) { document.getElementById(one).style.display = 'block'; document.getElementById(two).style.display = 'none'; } And your code will be: setInterval(function () { if (counter&lt;10){ ++counter; } else { counter =0; swap(one,two); } document.getElementById("count").innerHTML="00:"+counter; }, 1000); And "one" and "two" here are the ids of your imgages tags.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26591675

http://stackoverflow.com/q/26531691
tagged with: oop
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
has body: is the first time that I use OOP in Javascript, called markerPlaces that have some data in it: I want to access to the property lat for each node via for statement: I tried: for(i=0;i&lt;markerPlaces.length;i++){ console.log(markerPlaces[i][lat]); } But it doesn't work. The error is "lat is undefined". The complete function is: function initialize(markerPlaces) { (function(window, google, maplib){ var mapOptions = maplib.MAP_OPTIONS, domElement = document.getElementById('map'), //map declaration map = new google.maps.Map(domElement, mapOptions); console.log(markerPlaces); //for statement for markers for(i=0;i&lt;markerPlaces.length;i++){ console.log(markerPlaces[0].posts.lat); } markers = new google.maps.Marker({ position: { lat:45.0690246, lng:7.6932346 }, map: map, icon: 'http://example.com/wp-content/themes/turisti/img/poi.png' }) }(window, google, window.maplib || (window.maplib = {}))); } but firebug result is:
has comment: http://stackoverflow.com/comment/41692043
favorite count: 0
has answer: http://stackoverflow.com/a/26531829
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/41691571
has comment: http://stackoverflow.com/comment/41689712
downvote count: 1
duplicate of: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/41692744
type: Question
has title: printing value from Javascript Object

http://stackoverflow.com/a/26635504
upvote count: 1
type: Answer
has body: With a revealing module, you'll have to specify what from it is revealed as MyUtil: var MyUtil = (function () { // ... (define the functions of the module) // reveal its "public" functions return { addClass: addClass, removeClass: removeClass, walkTheDom: walkTheDom, getElemebtsByClassName: getElemebtsByClassName }; })(); Without this last step, MyUtil will hold the undefined value without any references to the functions being defined.
score: 1
answers question: http://stackoverflow.com/q/26635235
downvote count: 0

http://stackoverflow.com/q/26635616
score: 0
downvote count: 2
answer count: 3
accepted answer: http://stackoverflow.com/a/26640072
favorite count: 0
has answer: http://stackoverflow.com/a/26640072
has answer: http://stackoverflow.com/a/60411089
possible better answer: http://stackoverflow.com/a/61100349
type: AnsweredQuestion
has body: The following function throws an error when called in document ready with jQuery: searchCity:function(){ var map = this.map, markers = [], input = document.getElementById('pac-input'), dataTable; map.controls[google.maps.ControlPosition.TOP_LEFT].push(input); var searchBox = new google.maps.places.SearchBox(input); google.maps.event.addListener(searchBox, 'places_changed', function() { var places = searchBox.getPlaces(), apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', url = 'https://api.forecast.io/forecast/', lati = places[0].geometry.location.B, longi = places[0].geometry.location.k, data, city = $('.city'), summary = $('.summary'); console.log(places); $.getJSON(url + apiKey + "/" + lati + "," + longi + "?callback=?", function(data) { console.log(data); var dataTable = new google.visualization.DataTable(); dataTable.addColumn('string', 'hours'); dataTable.addColumn('number', 'temperature'); for(var i=0; i<data.daily.data.length; i++){ // dataTable.addColumn({type: 'string', role: 'annotation'}); dataTable.addRows([ ['0'+i, data.daily.data[i].temperatureMax] ]); } // Load the Visualization API and the piechart package. // google.load('visualization', '1.0', {'packages':['corechart'], callback: weatherAPP.generateGraph}); var options = { tooltip: {isHtml: true}}; var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(dataTable, options); city.html(''); setTimeout( function(){ weatherAPP.slideToCloseSearch(); }, 500 ); city.html('').html(places[0].formatted_address); summary.html('').html(data.daily.summary); if(data.currently.icon = 'clear-day'){ $('.iconHolder').addClass('icon-sun'); } else if(data.currently.icon = 'rain'){ $('iconHolder').addClass('icon-rainy'); } $('.temperature').html(data.currently.temperature+ ' F'); weatherAPP.generateRainVisualEffect(); }); if (places.length == 0) { return; } for (var i = 0, marker; marker = markers[i]; i++) { marker.setMap(null); } // For each place, get the icon, place name, and loca…
type: Question
has title: Cannot read property 'DataTable' of undefined
tagged with: javascript
has answer: http://stackoverflow.com/a/61100349
upvote count: 2

http://stackoverflow.com/comment/41767641
score: 0
type: AnswerComment
type: Comment
has text: Well, you probably want to separate this into 2 functions: one that is called when the socument is called (body onload) and one which is called when the form is submitted. I have updated my answer with an example.
comment on: http://stackoverflow.com/a/26574976

http://stackoverflow.com/a/26616697
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26587131
type: Answer
accepted answer of: http://stackoverflow.com/q/26587131
has body: OK I fixed it with this: document.getElementById('PageName').value="NewWebpage"; Just added "" marks and it worked.
score: 0

http://stackoverflow.com/q/26666654
tagged with: jquery
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41934853
has answer: http://stackoverflow.com/a/26666706
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41934819
has title: Sharing Image to social media
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26666706
type: Question
has comment: http://stackoverflow.com/comment/41934868
has body: Did anyone know how to share image + link to social media? (example facebook). I already try to share link and it works, but i cant find the way to share the full image.
tagged with: javascript

http://stackoverflow.com/comment/41678970
type: QuestionComment
score: 2
has text: Don't do this. Work with the DOM.
comment on: http://stackoverflow.com/q/26525516
type: Comment

http://stackoverflow.com/q/26662040
has body: So I've been trying this for a while but no luck so far. What I want to achieve is, after selecting a value from the drop down, that value should be compared with the json multi-dimensional array. If it matches, then there are certain html elements on the webpage whose content needs to be replaced with the corresponding json values. Here is the what I've been working so far (link) Choose... Daisy Romeo replaceThis So in the fiddle, if the user chooses "Daisy" from the dropdown, (the first array has Daisy in it) the corresponding value set from the array should be displayed in each of the html element on the webpage. I can use only javascript for this. Thanks in advance guys...
tagged with: arrays
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/26662777
tagged with: multidimensional-array
has title: Compare HTML element with JSON array and replace
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26662777
type: Question

http://stackoverflow.com/comment/41726063
score: 0
has text: What does your html look like? Do all of your inputs have name="MyName"? or is that just to illustrate?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26551939

http://stackoverflow.com/comment/41965702
comment on: http://stackoverflow.com/q/26657123
has text: Updated the question and code, hopefully someone can help me out
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41816341
score: 0
has text: I have also created a [fiddle](https://fiddle.sencha.com/#fiddle/cd9) to show that I am unable to position the mask message box properly in my panel
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26561456

http://stackoverflow.com/comment/41796640
score: 1
type: QuestionComment
type: Comment
has text: don't unbind 'on', just unbind 'click'
comment on: http://stackoverflow.com/q/26590855

http://stackoverflow.com/comment/41670978
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26520900
type: Comment
has text: Please don't use chat abbreviation (such as IDK)

http://stackoverflow.com/q/26598646
has title: Regex returning null vs returning empty string
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41811833
has body: My first stackoverflow question! So let me know if I could have gone a better route getting this information / if I suck at phrasing my questions well in search. :) meanwhile... ONWARDS TO THE QUESTION! So I have a regex function: s = "benisasillyhehehe"; //this would be variable regex = /benisasilly(.*)/; console.log(s.match(regex)); and what I want to do is log what's appended to "benisasilly" if it exists, and log null if it doesn't. But what ends up happening is that it logs an empty string instead. Is there a way to incorporate this functionality into a regex function, or should I just check it all outside this function? Also, does it even really matter? I mostly just wanted to do it because I have other regex functions that I'm using in the same system that DO give null, so I would prefer them to all have the same output format. Thanks a toooon! :D Edit: Let me clarify a little more. This is the output I'm hoping for: [ 'benisasillyhehehe','hehehe', index: 0, input: 'benisasillyhehehe' ] and then null if it doesn't work. Currently, when it doesn't work, I get: [ 'benisasilly', '', index: 0, input: 'benisasilly' ] So actuallyfor me, null vs empty string is important in that I want the match to fail vs having the match return an empty string.
score: 1
has comment: http://stackoverflow.com/comment/41811860
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26598811
tagged with: null
downvote count: 0
possible better answer: http://stackoverflow.com/a/26598973
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26598973
tagged with: regex
accepted answer: http://stackoverflow.com/a/26598811
upvote count: 1

http://stackoverflow.com/comment/41753762
has text: your solution is interesting but It works only on the first scroll down and and it does not work on scroll up. Following [this solution](http://stackoverflow.com/questions/4326845/how-can-i-determine-the-direction-of-a-jquery-scroll-event) I tried [this script](http://jsfiddle.net/pwk0vvuo/13/). It works and seems to be ok but it has a bug: when you scroll down and then immediately wcroll up the animation goes in loop.
type: Comment
comment on: http://stackoverflow.com/a/26565269
score: 0
type: AnswerComment

http://stackoverflow.com/a/26548812
score: 2
has body: have a look at ui-validate from angular-ui. you can use ui-validate with a function call returning promise so your html would be &lt;input type="text" ng-model="city" ui-validate=" 'doMatch($value, postal)' "&gt; &lt;input type="text" ng-model="postal" ui-validate=" 'doMatch(city, $value)' "&gt; and the js should be $scope.doMatch = function(c, p) { return $http.post("/api/validateCityPostal", {postal: p, city : c}); } note that above function is returning a promise. and from server you should return success/failure to have $valid or $invalid on the ui-validate.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26547619
answers question: http://stackoverflow.com/q/26547619
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41720286
type: Answer

http://stackoverflow.com/comment/41744275
type: QuestionComment
has text: [You're looking for string.replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Replace). I'm assuming you're searching for the word "the" in this case, not necessarily a specific index range?
type: Comment
comment on: http://stackoverflow.com/q/26561917
score: 0

http://stackoverflow.com/a/26579797
has comment: http://stackoverflow.com/comment/41776778
answers question: http://stackoverflow.com/q/26579782
score: 0
has comment: http://stackoverflow.com/comment/41777107
has body: I ran into a similar problem a few weeks back and ended up using the following plugin. Its extremely lightweight (6kbs) and simply works. https://code.google.com/p/jquery-load-json/
type: Answer

http://stackoverflow.com/comment/41674234
score: 0
has text: You could also try to remove the event handler and add it again when your animation is done … but the simplest way would perhaps be to simply set a flag indicating that the animation is currently running, and if that flag is set to true, the click handler simply exits/does nothing … and when the animation is done, you reset the flag to false.
comment on: http://stackoverflow.com/q/26522593
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26641906
has body: The months argument in that constructor are 0-based, not 1-based.
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26641893
type: Answer
score: 3

jquery
tags question: http://stackoverflow.com/q/26578182
tags question: http://stackoverflow.com/q/26546357
tags question: http://stackoverflow.com/q/26529817
tags question: http://stackoverflow.com/q/26599230
tags question: http://stackoverflow.com/q/26618997
tags question: http://stackoverflow.com/q/26517474
tags question: http://stackoverflow.com/q/26628127
tags question: http://stackoverflow.com/q/26516572
tags question: http://stackoverflow.com/q/26652765
tags question: http://stackoverflow.com/q/26544654
tags question: http://stackoverflow.com/q/26629577
tags question: http://stackoverflow.com/q/26581302
tags question: http://stackoverflow.com/q/26540873
tags question: http://stackoverflow.com/q/26583274
tags question: http://stackoverflow.com/q/26539599
tags question: http://stackoverflow.com/q/26617748
tags question: http://stackoverflow.com/q/26534198
tags question: http://stackoverflow.com/q/26529306
tags question: http://stackoverflow.com/q/26651523
tags question: http://stackoverflow.com/q/26637804
tags question: http://stackoverflow.com/q/26589767
tags question: http://stackoverflow.com/q/26589912
tags question: http://stackoverflow.com/q/26529435
tags question: http://stackoverflow.com/q/26530545
tags question: http://stackoverflow.com/q/26589508
tags question: http://stackoverflow.com/q/26524869
tags question: http://stackoverflow.com/q/26539829
tags question: http://stackoverflow.com/q/26584298
tags question: http://stackoverflow.com/q/26545709
tags question: http://stackoverflow.com/q/26549327
tags question: http://stackoverflow.com/q/26605361
tags question: http://stackoverflow.com/q/26626033
tags question: http://stackoverflow.com/q/26610508
tags question: http://stackoverflow.com/q/26665114
tags question: http://stackoverflow.com/q/26536347
tags question: http://stackoverflow.com/q/26655761
tags question: http://stackoverflow.com/q/26625767
tags question: http://stackoverflow.com/q/26578810
tags question: http://stackoverflow.com/q/26671115
tags question: http://stackoverflow.com/q/26652493
tags question: http://stackoverflow.com/q/26631515
tags question: http://stackoverflow.com/q/26567486
tags question: http://stackoverflow.com/q/26567369
tags question: http://stackoverflow.com/q/26584812
tags question: http://stackoverflow.com/q/26581610
tags question: http://stackoverflow.com/q/26565688
tags question: http://stackoverflow.com/q/26572889
tags question: http://stackoverflow.com/q/26556616
tags question: http://stackoverflow.com/q/26530895
tags question: http://stackoverflow.com/q/26558709
tags question: http://stackoverflow.com/q/26538074
tags question: http://stackoverflow.com/q/26549071
tags question: http://stackoverflow.com/q/26554793
tags question: http://stackoverflow.com/q/26584984
tags question: http://stackoverflow.com/q/26575487
tags question: http://stackoverflow.com/q/26530690
tags question: http://stackoverflow.com/q/26626032
tags question: http://stackoverflow.com/q/26663793
tags question: http://stackoverflow.com/q/26649727
tags question: http://stackoverflow.com/q/26667883
tags question: http://stackoverflow.com/q/26587131
tags question: http://stackoverflow.com/q/26654175
tags question: http://stackoverflow.com/q/26596586
tags question: http://stackoverflow.com/q/26582181
tags question: http://stackoverflow.com/q/26609387
tags question: http://stackoverflow.com/q/26631806
tags question: http://stackoverflow.com/q/26565950
tags question: http://stackoverflow.com/q/26534705
tags question: http://stackoverflow.com/q/26594180
tags question: http://stackoverflow.com/q/26634858
tags question: http://stackoverflow.com/q/26661696
tags question: http://stackoverflow.com/q/26599923
tags question: http://stackoverflow.com/q/26535418
tags question: http://stackoverflow.com/q/26518840
tags question: http://stackoverflow.com/q/26529684
tags question: http://stackoverflow.com/q/26582330
tags question: http://stackoverflow.com/q/26648008
tags question: http://stackoverflow.com/q/26553831
tags question: http://stackoverflow.com/q/26617928
tags question: http://stackoverflow.com/q/26658571

http://stackoverflow.com/q/26521334
tagged with: javascript
tagged with: jquery
has body: I have searched on google on how too make this, but I can find any sample code to make this done. I want to make the div of google option to be showing. Because it is toggled hide on its default settings. Instead of this when site is loaded: I want to be like this when site is loaded: Thank you! UPDATE I have tried to make this but still no luck var ovControl = new OpenLayers.Control.LayerSwitcher(); ovControl.showControls = function(){ return true; }; map.addControl( ovControl ); This documentation shows the option to add when initializing the object. But I can't figure out how to use it. 'maximizeDiv' is I think the option to be used.
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: How to make the LayerSwitch showing its div as default in OpenLayer?
has answer: http://stackoverflow.com/a/26523795
tagged with: openlayers
has comment: http://stackoverflow.com/comment/41779585
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26523795
tagged with: toggle
type: Question

http://stackoverflow.com/a/26647115
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26646940
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: Which Asp.Net version are you using? If ASP.NET>=4.0 then use ClientIDMode = "Static" on asp.net textbox and give it a try. Because otherwise ASP.NET change the control ID when it render them to client-side by concatenating parent naming container with the ID value of the control etc. Refer to: http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientidmode(v=vs.110).aspx
answers question: http://stackoverflow.com/q/26646940

http://stackoverflow.com/q/26654244
answer count: 1
downvote count: 0
favorite count: 0
has body: I am a beginner in web development, just trying to learn, I was doing this little game in html without using canvas. The game consists of a table of boxes and the user can navigate through them using arrow keys and can add an image to the current box by pressing the enter. When i press enter, the position of the box on the page changes, it goes a little up from its original position. I can't post the image as I am new to the site, so I will link the image instead. https://www.dropbox.com/s/er6e0ez6w0fd149/Screenshot_1.png?dl=0 //Loading constant.js $.getScript("constants.js", function(){ // loaded }); /*var stage = document.getElementById("gameCanvas"); stage.width = STAGE_WIDTH; stage.height = STAGE_HEIGHT; var ctx = stage.getContext("2d"); ctx.fillStyle = "black"; ctx.font = GAME_FONTS; */ var gameloop = setInterval(update, TIME_PER_FRAME); var counter = 0; var current_x = STARTING_X + 1; var current_y = STARTING_Y; var element = current_y.toString() + current_x.toString();; var element; // Updating the selected box. function positionUpdate() { element = current_y.toString() + current_x.toString(); document.getElementById(element).focus(); //------------- //Disabling Tabs //------------- $.prototype.disableTab = function() { this.each(function() { $(this).attr('tabindex', '-1'); }); }; $('button').disableTab(); } //------------ //Game Loop //------------ function update() { counter++; //Clear Canvas //ctx.fillStyle = "#AAA"; //ctx.fillRect(0, 0, stage.width, stage.height); //Draw Timer //ctx.fillStyle = "white"; //ctx.fillText("Time is: "+counter, COUNTER_X, COUNTER_Y); } //------------ //Key Handlers //------------ function keyUpHandler(event) { var keyPressed = event.which || event.keyCode; if (keyPressed == 38) //up key { if(current_y>0) { current_y--; } else { current_y = 9; } changeFocus(); } else if (keyPressed == 40) //down key { if(current_y<9) { current_y++; } else { current_y = 0; } changeFocus(); } else if (keyPressed == 39) //right key { if(current_x<9…
upvote count: 1
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26708151
score: 1
has comment: http://stackoverflow.com/comment/41937605
has title: Adding image by javascript changes position
has comment: http://stackoverflow.com/comment/41911545
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41938007
accepted answer: http://stackoverflow.com/a/26708151
tagged with: http://stackoverflow.com/tag/html

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/26622410
tags question: http://stackoverflow.com/q/26625990
tags question: http://stackoverflow.com/q/26524026
type: Tag

http://stackoverflow.com/q/26594531
upvote count: 6
possible better answer: http://stackoverflow.com/a/63550969
tagged with: ace-editor
has answer: http://stackoverflow.com/a/63550969
score: 6
type: Question
has title: How to display file content in Ace Editor
accepted answer: http://stackoverflow.com/a/26595088
type: AnsweredQuestion
has body: I am testing out ace-editor to display large text files from the server. Since it boasts being able to handle files up to 4 millions lines and has text highlighting, it makes it a good candidate. I've been struggling to understand the Document and EditSession from Ace Editor. From my understanding, its possible to tell ace editor to read from a file and display it. I am using the createEditSessiont() to create the session and specify the document. From the api documentation: createEditSession(Document | String text, TextMode mode) Document: Required. If text is a Document, it associates the EditSession with it. Otherwise, a new Document is created, with the initial text Here is my code: &lt;script src="../src/ace.js"&gt;&lt;/script&gt; &lt;script&gt; var docSession = new ace.createEditSession("../Files/myFile.log", "ace/mode/plain_text"); var editor = ace.edit("editor"); editor.setSession(docSession); editor.setTheme("ace/theme/dawn"); &lt;/script&gt; Unfortunatly, all that appears on the page is "../Files/myFile.log". I guess it is creating another file with that text instead of reading a document. How do properly tell it to display the contents of myFile.log?
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/52439272
has answer: http://stackoverflow.com/a/26595088
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41723290
comment on: http://stackoverflow.com/a/26549963
type: AnswerComment
has text: @hindmost - I don't agree -- it is as specific as the question.
score: 0
type: Comment

http://stackoverflow.com/a/26522872
downvote count: 0
answers question: http://stackoverflow.com/q/26522133
score: 12
has body: You can't call directly to resources in a RESX file from a javascript files. However, you could create a partial view (in case you are using MVC) from which you can access all those resources. You could, thereafter, include that partial inside your pages. For example, you could do a partial in which you would have: &lt;script&gt; var Resources = { Name: '@Resources.tags.Name', Surname: '@Resources.tags.Surname', }; &lt;/script&gt; After this, you could include this page in the pages you need and access from javascript to these resources by using: Resources.Name If you are not using MVC, please let me know to look for the way it should be done in ASP.NET. If you have any doubt, please say. For WebForms In case you use WebForms, you coud make use of a user control, in which you will configure the javascript to be injected in the page. Thereafter, include that user control in your page (preferably the master to make it available through all your website) and you will be able to access it. The user control would look this way: public partial class resources : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { LiteralControl jsResource = new LiteralControl(); jsResource.Text = "&lt;script type=\"text/javascript\"&gt;"; jsResource.Text += "var Resources = {"; jsResource.Text += "Name: '" + Resources.Resource.Name + "',"; jsResource.Text += "Surname: '" + Resources.Resource.Surname + "',"; jsResource.Text += "};"; jsResource.Text += "&lt;/script&gt;"; Page.Header.Controls.Add(jsResource); } } Then you would include that control in your page: &lt;uc1:resources runat="server" ID="resources" /&gt; And you could simply access your javascript by doing so: &lt;script&gt; alert(Resources.Name); alert(Resources.Surname); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41735548
type: Answer
upvote count: 12
has comment: http://stackoverflow.com/comment/41675900
has comment: http://stackoverflow.com/comment/41682322

http://stackoverflow.com/q/26620497
has comment: http://stackoverflow.com/comment/41852686
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26638853
score: 2
has comment: http://stackoverflow.com/comment/41852531
has comment: http://stackoverflow.com/comment/41851884
has comment: http://stackoverflow.com/comment/41851917
type: AnsweredQuestion
type: Question
upvote count: 2
tagged with: canvas
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41858176
has comment: http://stackoverflow.com/comment/41858144
tagged with: javascript
has body: Trying to wrap my head around the HTML5 canvas, I thought I'd create an image carousel, where images would be changed by an opacity gradient sweep, i.e. the same thing as in my fiddle here, only with canvas. I managed to come up with this fiddle, but I can't understand at all what's happening, or rather, why nothing is. Here's the code: var outputCanvas = document.getElementById('output'), ctx = outputCanvas.getContext('2d'), eWidth = 50, speed = 5, cWidth = 480, img = document.getElementById('newimg'), x = 0, y = 0, reqAnimFrame = window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; ctx.drawImage(img, 0, 0, img.width, img.height); ctx.globalCompositeOperation = "destination-out"; function draw() { console.log(x); gradient = ctx.createLinearGradient(x, 0, x+eWidth, 0); gradient.addColorStop(0, "rgba(255, 255, 255, 0)"); gradient.addColorStop(1, "rgba(255, 255, 255, 1)"); ctx.fillStyle = gradient; ctx.fillRect(0, 0, img.width, img.height); } function animate() { if (x &lt; 480) { x += Math.floor((cWidth / 1000) * speed); console.log(x); draw(); reqAnimFrame(animate); } } reqAnimFrame(animate); Calling the draw function by itself it seems to work, but once I start firing it with RequestAnimationFrame it just stops working. The gradient gets drawn once, but even though x is updated in the animation loop, the gradient stays put. I guess there's something I'm just not getting about how canvas and RequestAnimationFrame work. Note that I'm not looking for a script or library that does the same thing, but rather I'm hoping to actually understand how canvas works, and in particular why my script doesn't.
has title: Animated image transition with HTML5 canvas
favorite count: 0
accepted answer: http://stackoverflow.com/a/26638853

http://stackoverflow.com/q/26530354
tagged with: ssl
tagged with: javascript
has title: Detecting SSL3 in Browser using Javascript
tagged with: poodle-attack
has body: Working on the latest SSL3 vulnerability (POODLE) and wondering if you can detect if the browser viewing the website has SSL3 enabled in their settings and if so prompt them with a message.
favorite count: 0
score: 2
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26860718
possible better answer: http://stackoverflow.com/a/26532313
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26532313
answer count: 2
has answer: http://stackoverflow.com/a/26860718

http://stackoverflow.com/comment/41827960
comment on: http://stackoverflow.com/q/26606234
has text: @AnishAntony take a look at my answer....
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26547819
has body: I am use grunt-typescript to generate a single js file from a set of ts files. This works fine until I add an import statement to one of the ts files. Example grunt-typescript config typescript: { server: { src: ["./ts/file1.ts", "./ts/file2.ts"], dest: "./js/out.js", options: { module: 'amd', //or commonjs target: 'es5', //or es3 basePath: '', sourcemap: false, declaration: false, ignoreError: false } } } If I add an import statement to the top of file2.ts e.g. import PG = require("pg"); Then I get errors that code in File1.ts can't find types defined in File2.ts and I get an unexpected File2.js generated in the /ts directory ignoring the dest file parameter. The import seems to cause it to compile File2.ts totally separately. Is this to be expected with import or how can I fix this to create the expected single js file without compile errors?
has answer: http://stackoverflow.com/a/26581353
type: AnsweredQuestion
tagged with: typescript
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26581353
tagged with: gruntjs
score: 0
answer count: 1
has title: Adding typescript import prevents compiling to a single js file

http://stackoverflow.com/comment/41950119
has text: Definitely in favor of that solution @markE - only I am not in control of the backend, so not sure if that's possible.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26631960
type: QuestionComment

http://stackoverflow.com/comment/41698319
comment on: http://stackoverflow.com/q/26535990
score: 0
type: Comment
type: QuestionComment
has text: That means i've copied the code from online INDEX.html to the offline template INDEX.html - to see if there is any difference

http://stackoverflow.com/comment/41773011
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26577798
score: 3
has text: I don't think you can serialize a cURL instance.

http://stackoverflow.com/a/26561674
type: AcceptedAnswer
has body: JavaScript Date objects don't have a format function built in. If you want one, you'll have to add it to Date.prototype, either directly or via a library. It's not just a name thing, either: JavaScript's Date objects just don't have a formatting function at all. They have various functions you can use to build one, and they give you toString, toUTCString, toLocaleString, and toISOString, but those don't let you control the format.
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41763077
has comment: http://stackoverflow.com/comment/41762919
accepted answer of: http://stackoverflow.com/q/26561657
upvote count: 2
answers question: http://stackoverflow.com/q/26561657

http://stackoverflow.com/q/26523052
has comment: http://stackoverflow.com/comment/41780096
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41780450
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26705707
score: 4
has answer: http://stackoverflow.com/a/26525001
has comment: http://stackoverflow.com/comment/41779835
has body: I have an application which prints the html table using window.print(), The application is working fine when i click the print hyperlink, the problem which i am facing is the page break up, I have goggled and found many solutions , majority of them uses css for resolving the issue, but when i tried the css as shown below its not working. A sample demo i have mocked up in JS-Fiddle to show the issue Test it in chrome so that one can see the preview and use page size as A4 to view the page break. JSFiddle @media print { body * { visibility: hidden; } div { page-break-inside: avoid; } table { page-break-after: always; page-break-inside: auto; } tr { page-break-inside: avoid; page-break-after: auto; } td { page-break-inside: avoid; page-break-after: auto; } thead { display: table-header-group; } tfoot { display: table-footer-group; } #printSection * { visibility: visible; } #printSection { position: absolute; top: 0; left: 0; right: 0; margin: 0 auto; width: 100%; } }
tagged with: printing
answer count: 3
linked to: http://stackoverflow.com/q/1763639
has comment: http://stackoverflow.com/comment/41780397
has comment: http://stackoverflow.com/comment/41780020
has answer: http://stackoverflow.com/a/26611640
has comment: http://stackoverflow.com/comment/41674835
tagged with: jquery
favorite count: 0
tagged with: angularjs
has title: page break up issue during printing using javascript- Chrome, Firefox, IE9 and above
has comment: http://stackoverflow.com/comment/41674857
has comment: http://stackoverflow.com/comment/41674806
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41674768

http://stackoverflow.com/a/26529439
has comment: http://stackoverflow.com/comment/41689825
has comment: http://stackoverflow.com/comment/41689339
downvote count: 0
answers question: http://stackoverflow.com/q/26529172
has body: I’ve no idea what the performance implications are (I suspect they’re negligible either way, but if you’re really concerned, test it), but it’s very common practice in JavaScript to keep chunks of code in their own scope, rather than having everything in the global scope. The main benefit is reducing the risk of accidentally overwriting variables in the global scope, and making naming easier (i.e. you have window.application.initialize instead of e.g. window.initialize_application). Instead of your implementation above, you can use self-calling functions to create an area of scope just for one bit of code. This is known as the module pattern. This has the added advantage of allowing you to create “private” variables that are only accessible within the module, and so aren’t accessible from other code running in the same global object: /* Encapsulating object. */ var application=( function () { var someprivatevar = null// This can't be accessed by code running outside of this function , someprivatefunction = function () { someprivatevar = someprivatevar || new Date(); }; return { somevar1: undefined , somevar2: undefined , somevarN: undefined , somefunction: function(){} , getInitialized: function () { return someprivatevar; } , initialize: function (){/* Initializes the program. */ someprivatefunction(); } }; })(); application.initialize(); application.getInitialized();// Will always tell you when application was initialized
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/41689910
has comment: http://stackoverflow.com/comment/41686709
score: 3

http://stackoverflow.com/comment/41660489
has text: @HowardRenollet This does not work. It excludes weekdays from being displayed on the calendar, yes, but when adding days to the current date, it still includes them.
comment on: http://stackoverflow.com/q/26515109
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26666701
answer count: 2
has title: How to Input a Discount Price in Javascript?
tagged with: e-commerce
tagged with: javascript
has answer: http://stackoverflow.com/a/26666858
has answer: http://stackoverflow.com/a/26667279
tagged with: http://stackoverflow.com/tag/html
has body: The Discount field does not register (discount is supposed to subtract from Grand Total)(check discount sample) check the the jsfiddle click here I want it to act like this picture. (with the discount being manually inputed) http://i.dailymail.co.uk/i/pix/2013/02/07/article-2275089-17694138000005DC-460_634x497.jpg Javascript function recordToFilename() { var input = document.getElementById('discountvalue'), discount12 = input.value;
possible better answer: http://stackoverflow.com/a/26667279
tagged with: syntax
score: 0
accepted answer: http://stackoverflow.com/a/26666858
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/26520749
answer count: 1
tagged with: jquery
has title: Generate JQM Popup Dynamically
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: cordova
has body: I want to display a JQM PopUp based on the contents of my variable. I have a variable that contains this. 924-1922, 928-3074, 928-8363 Then I perform .split so I can get the three phone numbers. secNumber = res.rows.item(i).secondary_num.split(", "); So my variable secNumber now has an array of three numbers: 924-1922,928-3074,928-8363 Now here is my code for displaying it (I am using for loop for this since there are many entries with phone numbers): html += ''+ res.rows.item(i).name +' Tel. No.: ' + res.rows.item(i).tel_num + ' ' + secondary +' '; The onclick on my last is working. However, it only puts the first number on the phone's dialer. What I want to achieve on my onclick is, after show a popup onclick using this code from JQM website Actions... Choose an action View details Edit Disable Delete When I click on my the contents of the listview of the popup will be the contents of my array secNumber, then on the onclick of each element in the listview, I will call window.open to access the phone's dialer. EDIT This is my code. article.emergency = function() { var secNumber; var telnum; var html = ''; appDB.transaction(function(tx) { tx.executeSql("SELECT * FROM emergency", [], function(tx, res) { if (res.rows.length > 0) { for (var i = 0; i < res.rows.length; i++) { function openPopup(index) { //reset its content $('#popupMenu').find('ul').html(' Choose an action '); //loop on secondary_num items $.each(res.rows.item(index).secondary_num.split(", "), function(k, v) { $('#popupMenu').find('ul').append(' ' + v + ' '); }); //refresh listView $('#popupMenu').find('ul').listview("refresh"); //open popup $('#popupMenu').popup("open", {"transition":"slideup"}); } var secondary = (res.rows.item(i).secondary_num != 'null') ? 'Secondary Number: ' + res.rows.item(i).secondary_num : ''; secNumber = res.rows.item(i).secondary_num.split(", "); console.log(secNumber); /*secondary = secondary.replace(/-/g,""); console.log("Secondary number string : "+secondary);*/ console.log…
accepted answer: http://stackoverflow.com/a/26543288
has comment: http://stackoverflow.com/comment/41686672
has comment: http://stackoverflow.com/comment/41705739
type: Question
has comment: http://stackoverflow.com/comment/41707741
has answer: http://stackoverflow.com/a/26543288
tagged with: jquery-mobile
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41751509
has text: so for now I am running it using "node fileB.js"....
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26566146
type: QuestionComment

http://stackoverflow.com/q/26560814
has title: webview show blank page after rotate the screen in the status of js alert
upvote count: 2
tagged with: webview
has body: All I create a webview project in Android,the code is quite simple: final WebView webView = (WebView) findViewById(R.id.webView); webView.loadUrl("url"); if I click the view,an alert will be shown; the code is: $(".wapper").click(function() { alert("ok"); } It works fine in most of time ,unless if I click the view ,there is an alert in front of the screen,in this time, I rotate the screen,the javascript code cann't be called any more. It seems there is a problem in Webkit. what's more if i download the html file and apply the webview with loadDataWithBaseURL(), webview only show blank page after the same steps
type: Question
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 2
answer count: 0

http://stackoverflow.com/q/26561043
has answer: http://stackoverflow.com/a/26829728
upvote count: 5
tagged with: javascript
tagged with: twitter-typeahead
tagged with: typeahead.js
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41754457
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41758785
has body: I am struggling to call typeahead.js functions like val, open, close, etc. The typeahead works properly on the input element as it displays the entries but when I try to call any typeahead function I get this error: Uncaught Error: one of local, prefetch, or remote is requiredmessage: "one of local, prefetch, or remote is required My init code is as follows: var currentMedicalAid; var medicalAidList = $('#medicalAidList'); var medicalAidengine = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('MedicalAid1'), queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 5, prefetch: { url: '/api/Search/GetMedicalAidList', } }); medicalAidengine.initialize(); medicalAidList.typeahead(null, { name: 'MedicalAid1', displayKey: 'MedicalAid1', // `ttAdapter` wraps the suggestion engine in an adapter that // is compatible with the typeahead jQuery plugin source: medicalAidengine.ttAdapter() }).blur(function () { match = false; for (var i = medicalAidengine.index.datums.length - 1; i &gt;= 0; i--) { if ($(this).val() == medicalAidengine.index.datums[i].MedicalAid1) { currentMedicalAid = medicalAidengine.index.datums[i].MedicalAidID; match = true; } }; if (!match) { currentMedicalAid = '00000000-0000-0000-0000-000000000000'; $(this).val(''); medicalAidList.typeahead('val', ''); // throws error } });; Everytime I run either one of these functions, I get an error: medicalAidList.typeahead('val', ''); or $('#medicalAidList').typeahead('val',''); Any help would be greatly appreciated Thanks
has comment: http://stackoverflow.com/comment/41774546
type: Question
score: 5
has title: Typeahead calling functions .val .open .close etc throws errors

http://stackoverflow.com/a/26540097
answers question: http://stackoverflow.com/q/26540072
score: 0
type: Answer
has body: You have 4 topping boxes, so the index are 0-3. You loop till i &lt; 5, so document.forms[0].toppings[4] is invalid.

http://stackoverflow.com/comment/41924947
comment on: http://stackoverflow.com/a/26660579
score: 0
type: AnswerComment
has text: How to prevent white space then??
type: Comment

http://stackoverflow.com/a/26616764
score: 0
has body: Apparently you haven't sent the userlist object to Jade. You need to render it like this: res.render('userlist', {userlist: userlist}); Where the third occurrence of userlist there is your object.
answers question: http://stackoverflow.com/q/26596310
type: Answer

http://stackoverflow.com/a/26574719
has comment: http://stackoverflow.com/comment/41767278
has comment: http://stackoverflow.com/comment/41798166
has comment: http://stackoverflow.com/comment/41767095
type: Answer
has body: the best way to assign a date is to use toISOString $scope.post = {url: 'http://', title: '', timestamp: new Date().toISOString()}; using ISO format you can avoid all the environment/browser specific issues.
has comment: http://stackoverflow.com/comment/41767202
has comment: http://stackoverflow.com/comment/41767116
has comment: http://stackoverflow.com/comment/41767318
score: 0
has comment: http://stackoverflow.com/comment/41767142
has comment: http://stackoverflow.com/comment/41798276
answers question: http://stackoverflow.com/q/26561881

http://stackoverflow.com/comment/41959684
type: Comment
comment on: http://stackoverflow.com/q/26661663
has text: see http://stackoverflow.com/a/16997551/1197775
score: 0
type: QuestionComment

http://stackoverflow.com/q/26596281
downvote count: 2
accepted answer: http://stackoverflow.com/a/26598285
has body: I need something that callbacks whenever a object property is changed, akin to Object.watch and Object.observe. However, those are not cross browser yet. I need to support the following: supports multiple watches on the same property on the same object it must not mutate the object there must be a way to cancel a specific watch without affecting others. I implemented the following which met criteria 1) and 2) but not 3): /** * Add getter/setter to the obj so that the callback is called whenever the property value is changed * Returns a function that cancels the watch * @param {object} obj * @param {string} prop * @param {function} callback * @return {function} */ function watch(obj,prop,callback){ if (obj[prop]===undefined || !obj.hasOwnProperty(prop)){ throw new Error("Dangerous use of watch, "+obj+" does not have ["+prop+"]"); } var prevState = Object.getOwnPropertyDescriptor(obj,prop); var _var = obj[prop]; Object.defineProperty(obj,prop,{ set: prevState.set === undefined ? function(value){ _var = value; callback(value); } : function(value){ prevState.set(value); callback(prevState.get()); }, get: prevState.get === undefined ? function(){ return _var; } : function(){ return prevState.get(); } }); return function cancelWatch(){ console.log(Object.getOwnPropertyDescriptor(obj,prop)); var val = obj[prop]; delete obj[prop]; if (prevState.get !== undefined || prevState.set !== undefined){ Object.defineProperty(obj,prop,{ get: prevState.get, set: prevState.set }) } else { obj[prop] = val; } }; } For example; this works: var o = {}; o.a = 1; var c0 = watch(o,"a",function(v){console.log("watch: "+v)}); var c1 = watch(o,"a",function(v){console.log("watch: "+v)}); &gt; o.a = 5; "watch 5" "watch 5" However, the problem is in the cancelling. If I call c1(), all is fine because it just pops its getter/setter off. However, if I call c0, that doesn't work because it resets the getter/setter state to before the first watch is called, and thus eliminating the second watch from tr…
type: Question
score: -2
has title: Javascript implementing callbacks whenever object property is changed
tagged with: javascript
upvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26598285
type: AnsweredQuestion

http://stackoverflow.com/comment/41817455
comment on: http://stackoverflow.com/a/26601905
type: AnswerComment
type: Comment
has text: besides it seems to be not really connected to the angular module case
score: 1

http://stackoverflow.com/q/26658120
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41918515
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26658448
has answer: http://stackoverflow.com/a/26658168
type: Question
tagged with: angularjs
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41918479
accepted answer: http://stackoverflow.com/a/26658168
has title: angular $scope variable updated but not displayed
has answer: http://stackoverflow.com/a/26658448
has body: In the below controller $scope.timer is incremented every second but in the view {{timer}} does not reflect it's content. myapp.controller('TimeCtrl', ['$scope', function($scope){ $scope.timer = 0; setInterval(function(){ $scope.timer = $scope.timer + 1; console.log($scope.timer); },1000); }]); I'can solve it adding $scope.$apply(); after the timer is updated why is that ? Why is timer not updated ? Fiddle here : http://jsfiddle.net/wvxgzx76/1/

http://stackoverflow.com/q/26647930
answer count: 1
has answer: http://stackoverflow.com/a/26648049
accepted answer: http://stackoverflow.com/a/26648049
has comment: http://stackoverflow.com/comment/41900618
has comment: http://stackoverflow.com/comment/41900716
tagged with: http://stackoverflow.com/tag/html
has title: Uncaught TypeError: undefined is not a function :/
tagged with: php
type: AnsweredQuestion
has body: Hi I am stuck on this error for a while and can't seem to find where the problem comes from... I am basically dynamically making multiple list items with buttons in them for each row in my database with php: &lt;div id="upgrades"&gt; &lt;ul&gt; &lt;?php for($i=0;$i&lt;count($_SESSION['upgrades']);$i++) { $class = ''; if($_SESSION['upgrades'][$i]['gekocht'] == TRUE) { $class = 'gekocht'; } echo ' &lt;li&gt; &lt;button class="upgradebutton'.$class.'" data-id="'.$_SESSION['upgrades'][$i]['update_id'].'"&gt;'.$_SESSION['upgrades'][$i]['naam'].'&lt;/button&gt; &lt;/li&gt;'; } ?&gt; &lt;/ul&gt; &lt;/div&gt; And then check if it has that class I append to it when the upgrade is already bought on each button click with javascript: $(document).ready(function(){ $('.upgradebutton').click(function(){ if(!$(this).hassClass('upgradebuttongekocht')) { var upgrade_id = $(this).attr("data-id"); alert(upgrade_id); $(this).addClass('gekocht'); window.upgrades[upgrade_id][gekocht] = 1; }else{ alert("already Bought"); } }); });
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/26623669
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26624285
tagged with: angularjs
tagged with: filter
accepted answer: http://stackoverflow.com/a/26624285
has body: I checked this plunker: Plunker: http://plnkr.co/edit/5E7FYqNNqDuqFBlyDqRh?p=preview It worked for me to some extent. But my issue is i have a nested json data. Where the above filter code is not working. Following is my json data where I am filtering based upon "category_id" key. JSON :: [{ "category_id": 5, "category_name": "Home", "image": "Home_544f75960ee0e", "parent_id": 0, "i": 1, "categories": [ { "category_id": 7, "category_name": "Home Safe", "image": "Home Safe_5411af45ac923", "parent_id": 5, "i": 2, "categories": [ { "category_id": 13, "category_name": "Mechanical Safes ", "image": "Mechanical Safes _540ab92ee1ff7", "parent_id": 7, "i": 3 }, { "category_id": 14, "category_name": "Electronic Safes ", "image": "Electronic Safes _540ab93c6e305", "parent_id": 7, "i": 4 } ] }, { "category_id": 8, "category_name": "Video Door Phones ", "image": "Video Door Phones _540ab57a466ff", "parent_id": 5, "i": 3 }, { "category_id": 9, "category_name": "Alarm Systems ", "image": "Alarm Systems _540ab58b903e9", "parent_id": 5, "i": 4 }, { "category_id": 10, "category_name": "Home CCTV Cameras ", "image": "Home CCTV Cameras _540ab59c59f44", "parent_id": 5, "i": 5 }, { "category_id": 11, "category_name": "Car Safes ", "image": "Car Safes _540ab5b0dcc57", "parent_id": 5, "i": 6 }, { "category_id": 12, "category_name": "Hotel Safes ", "image": "Hotel Safes _540ab5bddae51", "parent_id": 5, "i": 7 } ]},{ "category_id": 6, "category_name": "Institution", "image": "Institution_541304aa0a52d", "parent_id": 0, "i": 2, "categories": [ { "category_id": 15, "category_name": "Physical Security Products ", "image": "Physical Security Products _54130515e2cb3", "parent_id": 6, "i": 3, "categories": [ { "category_id": 18, "category_name": "Record Protecting Equipment ", "image": "Record Protecting Equipment _541305cb5f47a", "parent_id": 15, "i": 4 }, { "category_id": 19, "category_name": "Burglary and Fire Resistant Safes", "image": "Burglary and Fire Resistant Safes_541305db69acf", "paren…
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26624033
has answer: http://stackoverflow.com/a/26624033
type: Question
has title: Filtering nested JSON data based on id Angularjs
has comment: http://stackoverflow.com/comment/41857314
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41857277
tagged with: ionic-framework
score: 0

http://stackoverflow.com/comment/41685403
score: 0
has text: fairly simple, your initialization of the plugin only fires on page load and will only be bound to elements that exist at that time. In your insertion code of new elements find the new inputs and run the `autocomplete` method on them
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26529225

http://stackoverflow.com/comment/41888837
score: 0
has text: `mobileinit` fires before `.ready()` (i dont know about cordova). You can disable auto-init at that stage until you get all your data collected and then fire an initialization function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26640727

http://stackoverflow.com/comment/41748774
has text: @Josep, yeah, there is something wrong with the HTML (I'm guessing whatever is generated by the directive). It'll show up if I put it on top of the blur tag, but not below it. I just verified it's happening on my app too. Why would that be?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26564362
type: AnswerComment

mouseover
tags question: http://stackoverflow.com/q/26672863
tags question: http://stackoverflow.com/q/26647940
tags question: http://stackoverflow.com/q/26591228
tags question: http://stackoverflow.com/q/26573031
type: Tag
tag name: mouseover

http://stackoverflow.com/comment/41817577
type: QuestionComment
score: 0
has text: This is not Oracle PL/SQL related but plain SQL. Edited.
comment on: http://stackoverflow.com/q/26597699
type: Comment

unslider
tags question: http://stackoverflow.com/q/26560747
tag name: unslider
type: Tag

http://stackoverflow.com/a/26608131
type: Answer
score: 0
has body: Your code crashes here as you can see with the jsconsole of your browser if (document.forms[0].tasks.options[0].value == "tasks") You try to read options[0].value after setting options[0] to null in document.forms[0].tasks.options[selectedTask] = null; Try not to destroy your data structure when deleting an item
answers question: http://stackoverflow.com/q/26607859

http://stackoverflow.com/q/26530083
has comment: http://stackoverflow.com/comment/41687365
has comment: http://stackoverflow.com/comment/41687054
type: Question
tagged with: anchor
linked to: http://stackoverflow.com/q/18476373
tagged with: hyperlink
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26530416
tagged with: tr
has body: Is there a way to create a link using JavaScript that acts exactly like an &lt;a&gt; tag? In other words, when you click it normally, it opens in the current window and when you right click, it shows "Open link in a new tab" under options. And if you click it, it does open in a new tab. I am not interested in solutions that add an &lt;a&gt; tag into the html, because the main reason I am asking this is that I need to apply this link to a &lt;tr&gt; element. Edit: Please consider that this needs to work with keyboard shorcuts (such as cmd+click on a mac) as well as right click and "Open in new tab"
favorite count: 0
possible better answer: http://stackoverflow.com/a/26530321
has title: Proper javascript redirect that works with "Open link in new tab"
has answer: http://stackoverflow.com/a/26530321
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41686678
upvote count: 2
accepted answer: http://stackoverflow.com/a/26530416

http://stackoverflow.com/q/26648599
has title: Audio Alert in php
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41901774
has answer: http://stackoverflow.com/a/26651500
answer count: 1
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41904349
tagged with: audio
has body: I want to display multiple alert box as well as an audio alert when some value is violating. And also need an option to close that audio alert . I have done like this if( ($mark&lt;=$minValue) || ($mark&gt;= $maxValue)) { echo " &lt;script&gt; var audio = document.createElement('audio'); document.body.appendChild(audio); audio.src = '/sounds-990-system-fault.mp3'; setInterval(function(){audio.play();}, 5000); alert('Average student'); &lt;/script&gt;"; } But here I got alert box first and after pressing OK audio is come.I need audio come along with the alert box.And How can I close that audio alert ?
score: 0

http://stackoverflow.com/comment/41719834
score: 0
comment on: http://stackoverflow.com/q/26543873
type: QuestionComment
has text: can i ask how this is a duplicate ?,there is no exact match to this question ,please point it out if there is !
type: Comment

http://stackoverflow.com/a/26660544
has body: I know you said that you want to avoid splitting or using indexOf, but javaScript doesn't have a 'startsWith' function. Why do you want to avoid doing that? Is the following unacceptable? var NumberOutput; var classList = document.getElementById('elementYouAreLookgingAt').className.split(/\s+/); for (var i = 0; i &lt; classList.length; i++) { if (classList[i].indexOf("someClass") == 0) { NumberOutput = classList[i].replace("someClass", ""); } }
answers question: http://stackoverflow.com/q/26660459
type: Answer
score: 0

http://stackoverflow.com/comment/41864342
has text: @Alnitak - We cant merge the answers to the other question, thatswhy it cant be a duplicate. Ive also edited the question for you to be clearly different.
score: 0
comment on: http://stackoverflow.com/q/26615809
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41815328
type: Comment
type: QuestionComment
has text: We’re going to need more information than “isn’t working” to be able to help you. Check in your browser’s developer tools console and see if any errors appear there. If not, try using the debugger and seeing where something you don’t expect happens. Once you have a concrete error (and preferably an [SSCCE](http://www.sscce.org/)), we might be able to help you more definitively rather than offering shots in the dark.
score: 1
comment on: http://stackoverflow.com/q/26600633

http://stackoverflow.com/q/26645078
has answer: http://stackoverflow.com/a/26645849
tagged with: css
has body: So I am trying to make an image carousel stay the same size for each and every picture no matter what the picture. Currently, it always changes sizes and I can't figure out the reason. Any help will be greatly appreciated! HTML: ‹ › CSS: .carousel-inner img { width:250px; height:250px; } #myCarousel { font-size:90%; } .carousel-controls-mini { } .carousel-controls-mini > a { border:1px solid #eee; width:20px; display:block; float:left; text-align:center; } Javascript: $('#myCarousel').carousel({ interval: 5000 }); $('#carousel-text').html($('#slide-content-0').html()); //Handles the carousel thumbnails $('[id^=carousel-selector-]').click( function(){ var id_selector = $(this).attr("id"); var id = id_selector.substr(id_selector.length-1); var id = parseInt(id); $('#myCarousel').carousel(id); }); // When the carousel slides, auto update the text $('#myCarousel').on('slid', function (e) { var id = $('.item.active').data('slide-number'); $('#carousel-text').html($('#slide-content-'+id).html()); }); Thanks! Chris
has answer: http://stackoverflow.com/a/26645836
has title: Fix image size in carousel using HTML
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/q/26652518
has answer: http://stackoverflow.com/a/49138563
has comment: http://stackoverflow.com/comment/42100560
upvote count: 3
has body: I have the following html code, and I am trying to set the value of option by selectedIndex. The problem is that the option is still displaying the old value whereas if I do an alert on what was selected it gives me the correct answer. What am I missing? Choose One a b c d
type: Question
answer count: 2
score: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41910166
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/41913931
has answer: http://stackoverflow.com/a/26652754
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41908501
has comment: http://stackoverflow.com/comment/41909259
downvote count: 1
has title: Javascript Select Index value not changing

http://stackoverflow.com/comment/41910192
comment on: http://stackoverflow.com/q/26653567
type: Comment
type: QuestionComment
has text: @lolka_bolka - I tried this but not working. Please visit the jsfiddle link will help you understanding the issue
score: 0

http://stackoverflow.com/comment/55438743
comment on: http://stackoverflow.com/a/26584013
has text: More back story: WordPress expects the default stylesheet to exist in the theme root...so returning that stylesheet's "directory URI" gives you the theme root. Oddly named...but makes sense, if you understand that WordPress convention.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41757574
score: 0
type: QuestionComment
type: Comment
has text: Besides, it's a bad idea to write a shopping cart to a file. Just write it to a database, where it can be recovered on login.
comment on: http://stackoverflow.com/q/26569150

http://stackoverflow.com/q/26662833
type: AnsweredQuestion
tagged with: javascript
has title: Make json from array of objects javascript
type: Question
has comment: http://stackoverflow.com/comment/41928075
has comment: http://stackoverflow.com/comment/41928004
has body: I have a javascript object with a lot of attributes and methods, I want it to be sent to a php file. For this, I want to transform it to Json data. But I just can`t understand how should I use json.stringify to do this, because of the complex object's class. The objects looks like this. I have an array of objects that I have to sent over ajax. Also, this class has array of other objects as attributes, and a bunch of other methods. var PhotoFile = function(clientFileHandle){ PhotoFile.count = PhotoFile.count + 1; this.specificClass = "no-" + PhotoFile.count; this.checkbox = null; this.attributes = []; this.file = clientFileHandle; this.fileExtension = null; //meta data this.meta = null; this.orientation = null; this.oDateTime = null; this.maxWidth = 150; this.maxHeight = 100; //raw data this.imgData = null; this.imgDataWidth = null; this.imgDataHeight = null; this.checkSum1 = null; this.checkSum2 = null; //DOM stuff this.domElement = null; this.imgElement = null; this.loadProgressBar = null; this.uploadProgressBar = null; this.imageContainer = null; this.attributeContainer = null; this.indexInGlobalArray = -1; //flags this.metaLoaded = false; this.startedLoading = false; this.finishedLoading = false; this.needsUploading = true; this.imageDisplayed = false; //listeners this.onFinishedLoading = function () {}; this.onFinishedUploading = function () {console.log('Called default end '+this.file.name)}; ..... plus other methods. }
has comment: http://stackoverflow.com/comment/41927700
has answer: http://stackoverflow.com/a/26663272
score: 0
tagged with: php
answer count: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41927762
accepted answer: http://stackoverflow.com/a/26663272

http://stackoverflow.com/q/26641369
tagged with: javascript
has body: I have a "ColorPicker" feature in an ASP.NET page similar to this one, except that the shades on the right are dynamically populated depending on whether a shade has already been used or not. I have a TextBox which shows the hex value (#RRGGBB) of the color/shade selected: &lt;asp:TextBox runat="server" ID="TbxColorhex" Text="#FF0000" Enabled="false" /&gt; which is rendered as: &lt;input name="TbxColorhex" type="text" value="#FF0000" id="TbxColorhex"&gt;&lt;/input&gt; I am using JavaScript to change the text (hex value) in the TextBox when a shade (table cell) is clicked. function selectShade(shadehex) { if (shadehex) { document.getElementById('divpreview').style.background = shadehex; document.getElementById('&lt;%= TbxColorhex.ClientID %&gt;').value = shadehex; } } I have a button to Confirm the selected color: &lt;asp:Button ID="BtnSelectColor" runat="server" Text="Select Color" OnClick="BtnSelectColor_Click" style="margin: 0 auto" /&gt; which triggers this method (on Code behind) when clicked: protected void BtnSelectColor_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(TbxColorhex.Text)) { Response.Redirect(Page.ResolveClientUrl("~/Something/AddProject.aspx?projcolor=" + TbxColorhex.Text)); } } The Problem: When a shade is clicked, JavaScript changes the text in the TextBox appropriately (you can see the text in the TextBox changing. However, if I use a debugger I notice that there is no change in the value of the value attribute in the input tag. Therefore, when I click the button it does not get the text that the TextBox displays.
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/26642250
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41889733
has answer: http://stackoverflow.com/a/26641646
type: Question
possible better answer: http://stackoverflow.com/a/26641646
tagged with: c#
answer count: 2
has answer: http://stackoverflow.com/a/26642250
has title: Get TextBox text after text is changed by Javascript

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/26553447
tags question: http://stackoverflow.com/q/26529389
tags question: http://stackoverflow.com/q/26556700
tags question: http://stackoverflow.com/q/26573362
tags question: http://stackoverflow.com/q/26608453
tags question: http://stackoverflow.com/q/26641574
tags question: http://stackoverflow.com/q/26665312
tags question: http://stackoverflow.com/q/26650658
tags question: http://stackoverflow.com/q/26634269
tags question: http://stackoverflow.com/q/26637849
tags question: http://stackoverflow.com/q/26620513
tags question: http://stackoverflow.com/q/26574842
tags question: http://stackoverflow.com/q/26550333
tags question: http://stackoverflow.com/q/26638636
tags question: http://stackoverflow.com/q/26518301
tags question: http://stackoverflow.com/q/26606208
tags question: http://stackoverflow.com/q/26579438
tags question: http://stackoverflow.com/q/26519817
tags question: http://stackoverflow.com/q/26671281
tags question: http://stackoverflow.com/q/26622361
tags question: http://stackoverflow.com/q/26558058
tags question: http://stackoverflow.com/q/26600870
tags question: http://stackoverflow.com/q/26587913
tags question: http://stackoverflow.com/q/26557672
tags question: http://stackoverflow.com/q/26545012
tags question: http://stackoverflow.com/q/26543224
tags question: http://stackoverflow.com/q/26531304
tags question: http://stackoverflow.com/q/26577002
tags question: http://stackoverflow.com/q/26569594
tags question: http://stackoverflow.com/q/26536653
tags question: http://stackoverflow.com/q/26517296
tags question: http://stackoverflow.com/q/26587964
tags question: http://stackoverflow.com/q/26615153
tags question: http://stackoverflow.com/q/26517865
tags question: http://stackoverflow.com/q/26622072
tags question: http://stackoverflow.com/q/26585424
tags question: http://stackoverflow.com/q/26579705
tags question: http://stackoverflow.com/q/26535847
tags question: http://stackoverflow.com/q/26515386
tags question: http://stackoverflow.com/q/26576115
tags question: http://stackoverflow.com/q/26552698
tags question: http://stackoverflow.com/q/26624194
tags question: http://stackoverflow.com/q/26603536
tags question: http://stackoverflow.com/q/26624985
tags question: http://stackoverflow.com/q/26578770
tags question: http://stackoverflow.com/q/26588412
tags question: http://stackoverflow.com/q/26661474
tags question: http://stackoverflow.com/q/26671903
tags question: http://stackoverflow.com/q/26569150
tags question: http://stackoverflow.com/q/26630294
tags question: http://stackoverflow.com/q/26671856
tags question: http://stackoverflow.com/q/26640666
tags question: http://stackoverflow.com/q/26647584
tags question: http://stackoverflow.com/q/26644619
tags question: http://stackoverflow.com/q/26648001
tags question: http://stackoverflow.com/q/26515364
tags question: http://stackoverflow.com/q/26663074
tags question: http://stackoverflow.com/q/26633738
tags question: http://stackoverflow.com/q/26660603
tags question: http://stackoverflow.com/q/26659050
tags question: http://stackoverflow.com/q/26558890
tags question: http://stackoverflow.com/q/26546342
tags question: http://stackoverflow.com/q/26607859
tags question: http://stackoverflow.com/q/26536501
tags question: http://stackoverflow.com/q/26560603
tags question: http://stackoverflow.com/q/26658353
tags question: http://stackoverflow.com/q/26655707
tags question: http://stackoverflow.com/q/26636350
tags question: http://stackoverflow.com/q/26582864
tags question: http://stackoverflow.com/q/26606537
tags question: http://stackoverflow.com/q/26524505
tags question: http://stackoverflow.com/q/26557216
tags question: http://stackoverflow.com/q/26562895
tags question: http://stackoverflow.com/q/26595040
tags question: http://stackoverflow.com/q/26530646
tags question: http://stackoverflow.com/q/26647617
tags question: http://stackoverflow.com/q/26651556
tags question: http://stackoverflow.com/q/26574771
tags question: http://stackoverflow.com/q/26571625
tags question: http://stackoverflow.com/q/26617975

http://stackoverflow.com/a/26533723
has body: I don't see any need for a loop, as the function either does card 1 or card 2. If you want the code to be less repetitive, you can do this: SortingPageAudio.prototype.cardAudios = function(cardNumber) { var cardAudio = tabs.page["card" + cardNumber + "Audio"]; var FRcardAudio = cardAudio.replace("e_", "f_"); playAudio.playFiles(FRcardAudio); }; In JavaScript, you can refer to a property either using dot notation and a property name literal (obj.foo), or using brackets notation and a property name string (obj["foo"]). In the latter case, the string can be the result of any expression. If you wanted to call cardAudios for both cards, you could do it like this: [1, 2].forEach(instance.cardAudios, instance); (Where instance is a SortingPageAudio instance.) Or with a simple for loop: var card; for (card = 1; card &lt;= 2; ++card) { instance.cardAudios(card); } Or of course: instance.cardAudios(1); instance.cardAudios(2);
answers question: http://stackoverflow.com/q/26533662
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26533662
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26556080
has comment: http://stackoverflow.com/comment/41734332
has comment: http://stackoverflow.com/comment/41733887
has comment: http://stackoverflow.com/comment/41734106
score: 0
has body: Try this: HTML: Build your own form! Add submit JS: $(document).ready(function() { $(".sbn").click(function(e) { e.preventDefault(); var intId = $("#buildyourform div").length + 1; var fieldWrapper = $(" "); var fName = $(" "); var removeButton = $(" "); removeButton.click(function() { $(this).parent().remove(); }); fieldWrapper.append(fName); fieldWrapper.append(removeButton); $("#buildyourform").append(fieldWrapper); }); $('form').submit(function(e) { e.preventDefault(); var postdata = $(this).serializeArray(); $.post('test.php', postdata , function (response) { console.log(response); // }); }); });
answers question: http://stackoverflow.com/q/26555928
has comment: http://stackoverflow.com/comment/41734288
type: Answer
has comment: http://stackoverflow.com/comment/41734210
has comment: http://stackoverflow.com/comment/41734437
has comment: http://stackoverflow.com/comment/41733930

http://stackoverflow.com/q/26656150
tagged with: reactjs
has body: I'm building my app using backbone and react inside of a rails app. I saw that all the recommended test packages (jest, jasmine, etc) are all node based. From what I know, I can get node on my rails project but I'd prefer not to. Is there a way to test with something like jest without node? Or is there another package that isn't based on node that works with react.
answer count: 1
downvote count: 0
favorite count: 0
tagged with: backbone.js
has title: Testing Reactjs without node?
tagged with: node.js
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26658318
upvote count: 1
tagged with: ruby-on-rails
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26658318

http://stackoverflow.com/a/26518298
answers question: http://stackoverflow.com/q/26518161
score: 0
type: Answer
has body: This returns a HTMLCollection of matching elements. document.getElementsByClassName(classname[v]) try this instead: for (v = 0; v &lt; classname.length; v++) { //classname = ["6.3", "6.4", "7.4"] titels.push(document.getElementsByClassName(classname[v])[0].innerHTML); console.log(titels[v]); }

http://stackoverflow.com/a/26515923
has comment: http://stackoverflow.com/comment/41668286
answers question: http://stackoverflow.com/q/26515671
has comment: http://stackoverflow.com/comment/41667972
accepted answer of: http://stackoverflow.com/q/26515671
has comment: http://stackoverflow.com/comment/41668609
has comment: http://stackoverflow.com/comment/41691515
has body: In your example you have no recursive calls. If I understand correctly you want to say that recurse(point, otherFunc); is the beginning of a recursive call. Then just go back to the definition of the recursive call (which you have not shown in your post) and do this (add a third argument for a callback function to be called in the end of recursion; the caller will pass it as a parameter): function recurse(startingPlace, otherFunc, callback_one) { // code you may have ... if (your_terminating_criterion === true) { return callback_one(val); // where val is potentially some value you want to return (or a json object with results) } // more code you may have } Then in the original code that you posted, make this call instead (in the inner-most part): recurse(startingPlace, otherFunc, function (results) { // results is now a variable with the data returned at the end of recursion console.log ("Recursion finished with results " + results); callback(); // the callback that you wanted to call right from the beginning }); Just spend some time and try to understand my explanation. When you understand, then you will know node. This is the node philosophy in one post. I hope it is clear. Your very first example should look like this: var start = function(callback) { request.get({ url: 'aaa.com' }, function (error, response, body) { var startingPlace = JSON.parse(body).id; recurse(startingPlace, otherFunc, function (results) { console.log ("Recursion finished with results " + results); callback(); }); }); }; Below is only additional information in case you are interested. Otherwise you are set with the above. Typically in node.js though, people return an error value as well, so that the caller knows if the function that was called has finished successfully. There is no big mystery here. Instead of returning just results people make a call of the form return callback_one(null, val); Then in the other function you can have: recurse(startingPlace, otherFunc, function (recError, res…
score: 8
type: AcceptedAnswer
downvote count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/41670037
type: Answer

http://stackoverflow.com/comment/41754972
type: QuestionComment
comment on: http://stackoverflow.com/q/26567929
has text: Are the files themselves exactly as you have posted on pastebin? Or is that code wrapped in another function?
score: 0
type: Comment

http://stackoverflow.com/q/26591513
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26591731
tagged with: http://stackoverflow.com/tag/html
has title: JQueryUI radio buttonset not selecting mulitiple sections
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41798191
tagged with: jquery-ui
has body: n my html page I have got two sections, each independent of the other. When I am selecting Check1 and then check2 the choice2 gets unselected and only choice 4 gets selected. I want both choice 2 and choice 4 to be selected. HTML Choice 1 Choice 2 Choice 3 Choice 4 Check1 Check2 JS $(function() { $( "#radio-gp1" ).buttonset(); $( "#radio-gp2" ).buttonset(); $('#check1').click(function() { $('#radio-gp1 input').each(function(){ $(this).attr('checked','checked'); $( "#radio-gp1" ).buttonset('refresh'); }); }); $('#check2').click(function() { $('#radio-gp2 input').each(function(){ $(this).attr('checked','checked'); $( "#radio-gp2" ).buttonset('refresh'); }); }); }); Not sure where I am going wrong, here's my fiddle http://jsfiddle.net/surysharma/waodj7n5/
has answer: http://stackoverflow.com/a/26591731
tagged with: dom
type: Question

http://stackoverflow.com/q/26597019
has comment: http://stackoverflow.com/comment/41809168
type: Question
has comment: http://stackoverflow.com/comment/41808728
has comment: http://stackoverflow.com/comment/41808868
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41842783
has body: I have the following JS: jQuery(function($){ $( "#product_filters_form_sizes_medeiumnnarrow" ).click() $('menu.pills').on('click', 'a', function(event){ $pill = $(this); $('form.product_filters_form') .find("input[value='"+$pill.data('filterId')+"']") .attr('checked', false).trigger('change'); }) }); It does exactly what I need it do, which is to select '#product_filters_form_sizes_mediumnarrow' only issue is it keeps on clicking and the pages reloads each time. My questions is: is there a way to only click once? Thank you and any help would be greatly appreciated. Sizes MEDIUM/NARROW
has comment: http://stackoverflow.com/comment/41808531
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41843109
has comment: http://stackoverflow.com/comment/41808910
has title: Click once with with Javascript / jQuery
has answer: http://stackoverflow.com/a/26597194
has comment: http://stackoverflow.com/comment/41808524
has comment: http://stackoverflow.com/comment/41808769

http://stackoverflow.com/comment/41676399
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26524199
type: QuestionComment
has text: this expression is strange `$(ui.draggable[0].id === "game1img1")`, the whole boolean expression is put into `$(...)`?

http://stackoverflow.com/comment/41719590
has text: Strikes me as a Firefox bug more than anything.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26547869

http://stackoverflow.com/q/26583329
has comment: http://stackoverflow.com/comment/41782614
has comment: http://stackoverflow.com/comment/41784756
tagged with: javascript
has comment: http://stackoverflow.com/comment/41786515
has comment: http://stackoverflow.com/comment/41782752
score: 0
tagged with: jquery
tagged with: c3.js
type: UnansweredQuestion
has title: 'tick' is not working in c3.js
has comment: http://stackoverflow.com/comment/41785996
has comment: http://stackoverflow.com/comment/41786573
has body: My code is : var object : _id: 1408991400000, a: 0 ,b: 11, c: 0 ,d: 65; Here ,_id is a timestamp var dataObject=array of object var chart = c3.generate({ bindto: '#container', data: { json: dataObject, keys: { x:'_id', value: ['a', 'b','c','d'], }, axis : { x : { type : 'timeseries', tick: { format: function (x) { console.log(x); var d = new Date(parseInt(x)); var curr_day = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); return curr_day+'-'+parseInt(curr_month)+(1)+'-'+curr_year; } } } } } }); I am able to plot the above graph but I am not able to format the timestamp. Also when I try to log into console ,I dont get any output.Please let me know the mistake.
answer count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41782823
has comment: http://stackoverflow.com/comment/41784150
has comment: http://stackoverflow.com/comment/41785404
has comment: http://stackoverflow.com/comment/41783754
type: Question

http://stackoverflow.com/comment/41789849
type: QuestionComment
comment on: http://stackoverflow.com/q/26587344
score: 0
has text: I don't think your mousemove is necessary... should be able to do it with just hover and be fine. I don't see your mousemove actually doing anything important, unless I'm wrong... >.>
type: Comment

http://stackoverflow.com/comment/41673868
comment on: http://stackoverflow.com/q/26522628
type: Comment
type: QuestionComment
has text: check this http://www.jqueryscript.net/form/Simple-jQuery-Plugin-For-Chained-Selects-Chained.html and http://www.jqueryscript.net/demo/Simple-jQuery-Plugin-For-Chained-Selects-Chained/
score: 2

http://stackoverflow.com/comment/41947139
type: QuestionComment
score: 0
has text: Worked on Safari, but when tested on Opera in indeed failed. Is a github issue which returns no content-type. Now added the external javascript using rawgit.com. Works on Opera too now. New link [link](http://jsfiddle.net/petervannes/9xsjwm5s/6/)
type: Comment
comment on: http://stackoverflow.com/q/26664180

http://stackoverflow.com/q/26665193
tagged with: mysql
has comment: http://stackoverflow.com/comment/41932460
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: I have a series nested objects that are contained in a relational database represented by one-to-many relationships. Given a result set from a join query such as the following where obj A contains many Bs which in turn contain many Cs which in turn contain many Ds. Here is the query: SELECT A_ID AS A, B_ID AS B, C_ID AS C, D_ID AS D FROM A INNER JOIN B on B.A_ID = A.A_ID INNER JOIN C ON C.B_ID = B.B_ID INNER JOIN D ON D.C_ID = C.C_ID The results of this query are as follows: | A | B | C | D | |---|---|---|---| | 1 | 1 | 1 | 1 | | 1 | 1 | 2 | 2 | | 1 | 2 | 3 | 3 | | 1 | 2 | 3 | 4 | I want to generate a JSON object like this. Note that there is only one A object, the data is the same in each row due to the inner join. The A object contains two B objects. The first B contains two Cs and the second B contains only one C which contains two Ds. The only unique data really is D but each row contains all the data from the hierarchy: { "A": { "A_id": 1, "Bs": [{ "B_id": 1, "Cs": [{ "C_id": 1, "Ds": [{ "D_id": 1 }] },{ "C_id": 2, "Ds": [{ "D_id": 2 }] }] },{ "B_id": 2, "Cs": [{ "C_id": 3, "Ds": [{ "D_id": 3 },{ "D_id": 4 }] }] }] } } What is the simplest and most efficient way to do this in javascript? Note, simplest may involve the use of a library such as underscore.js or lodash. The data already comes back in a form such as: [{A_id:1, B_id:1, C_id:1, D_id:1},{...}]
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26724854
has title: Unflatten nested data from join query

http://stackoverflow.com/comment/42013632
has text: Hm, that dit not work either. Any other suggestions?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26656623

http://stackoverflow.com/q/26645120
has comment: http://stackoverflow.com/comment/41919602
answer count: 4
tagged with: generator
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33920469
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41896269
has answer: http://stackoverflow.com/a/26645447
linked to: http://stackoverflow.com/q/111102
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41896295
has body: I need to make a function generator that iterates over an infinite sequence, like the fibonacci sequence. It should return the next value in the sequence when called. I am given a function prototype: function genfib() { return function fib() { } } it should be used like this: var fib = genfib(); fib(); // -&gt; returns 0 fib(); // -&gt; returns 1 fib(); // -&gt; returns 1 fib(); // -&gt; returns 2 I am confused about what is executing every time I call fib(). I tried to do something like function genfib() { var count = 1; if (count === 1) { count++; yield 0; } else if (count === 2) { count++; yield 1; } var a = 0; var b = 1; return function fib() { while(1) { count = a + b; a = b; b = count; yield count; } } } But it's not working. I don't know how to set it up to run the if/else for the first two numbers in the fib sequence and then run the while loop once for each subsequent call.
has answer: http://stackoverflow.com/a/26645395
downvote count: 0
has title: function generator javascript
has comment: http://stackoverflow.com/comment/41923297
favorite count: 0
accepted answer: http://stackoverflow.com/a/26645447
has answer: http://stackoverflow.com/a/28213080
possible better answer: http://stackoverflow.com/a/26645395
has comment: http://stackoverflow.com/comment/41916138
has comment: http://stackoverflow.com/comment/41896829

http://stackoverflow.com/q/26608391
has comment: http://stackoverflow.com/comment/41841930
type: Question
has comment: http://stackoverflow.com/comment/41843190
has comment: http://stackoverflow.com/comment/41842894
tagged with: javascript
upvote count: 14
accepted answer: http://stackoverflow.com/a/26688062
answer count: 1
has comment: http://stackoverflow.com/comment/41829232
favorite count: 0
has answer: http://stackoverflow.com/a/26688062
linked to: http://stackoverflow.com/q/26424765
tagged with: embed
has comment: http://stackoverflow.com/comment/41829679
score: 14
tagged with: phantomjs
type: AnsweredQuestion
downvote count: 0
has title: Using PhantomJS to embed all images of a webpage produces warnings but works
has body: I'm trying to convert a webpage into a single file by embedding all the images (and other external resources once I passed this point). Here's how I run PhantomJs: ./phantomjs --web-security=false ./embed_images.js http://localhost/index.html &gt; output.txt And here's the embed_images.js: var page = require('webpage').create(), system = require('system'), address; if (system.args.length === 1) { console.log('Usage: embed_images.js &lt;some URL&gt;'); phantom.exit(1); } else { page.onConsoleMessage = function(msg) { console.log(msg); }; address = system.args[1]; page.open(address, function(status) { page.evaluate(function() { function embedImg(org) { var img = new Image(); img.src = org.src; img.onload = function() { var canvas = document.createElement("canvas"); canvas.width = this.width; canvas.height = this.height; var ctx = canvas.getContext("2d"); ctx.drawImage(this, 0, 0); var dataURL = canvas.toDataURL("image/png"); org.src = dataURL; console.log(dataURL); } } var imgs = document.getElementsByTagName("img"); for (var index=0; index &lt; imgs.length; index++) { embedImg(imgs[index]); } }); phantom.exit() }); } When I run the mentioned command, it results in a file like this: Unsafe JavaScript attempt to access frame with URL from frame with URL file://./embed_images.js. Domains, protocols and ports must match. Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file://./embed_images.js. Domains, protocols and ports must match. There's multiple instances of the above error message. To test what's wrong, I ran the below code in my Chromium's console: function embedImg(org) { var img = new Image(); img.src = org.src; img.onload = function() { var canvas = document.createElement("canvas"); canvas.width = this.width; canvas.height = this.height; var ctx = canvas.getContext("2d"); ctx.drawImage(this, 0, 0); var dataURL = canvas.toDataURL("image/png"); org.src = dataURL; console.log(dataURL); } } var imgs = document.getElementsByTagName…

http://stackoverflow.com/q/26567900
has title: iScroll: dynamic scroll container / add content / add more container
score: 0
has body: After I found a way to make iScroll to work on dynamically added scroll containers and/or changed content length inside of scroll containers I have problems with additional functions, for example myScroll.scrollToElement(document.querySelector('#scroller li:nth-child(10)')) Instead of work with fixed IDs I worked around to use dynamically added class names, starting with &lt;body onload="loaded()"&gt; as in the oringinal samples, like so function loaded () { var myScroll; var iscroller = $('.iscroller'); iscroller.each(function(index){ myScroll = new IScroll('.iscroller'+index, { mouseWheel: true, click: true }); }) } which works fine so far for the scrolling function itself. Each scroll container, which in html/php code got a class="iscroller" before, gets another unique class name iscroller0 ...1 ...2 and so on, by its index. It still works fine, when content is dynamically added, like more &lt;li&gt;, to a container, calling of loaded() after. Scrolling still works as expected. But when I want to call a function like myScroll.scrollToElement(document.querySelector('#scroller li:nth-child(10)')) it applies only to the last container, which seems logical to me. So I tried to play around with even dynamically created objects instead of myScroll like so: function loaded () { var iscroller = $('.iscroller'); iscroller.each(function(index){ eval('var myScroll'+index+' = new IScroll(\'.iscroller'+index+'\', { mouseWheel: true, click: true });'); }) ,} Scroll still works as usual in all containers, but now I expected to be able to call myScroll2.scrollToElement(document.querySelector('.iscroller2 li:nth-child(10)')) but I get a console error ReferenceError: myScroll2 is not defined. What can I do ?
answer count: 1
has answer: http://stackoverflow.com/a/26578144
type: UnansweredQuestion
type: Question
tagged with: iscroll
tagged with: javascript
tagged with: jquery

php
tags question: http://stackoverflow.com/q/26668569
tags question: http://stackoverflow.com/q/26567859
tags question: http://stackoverflow.com/q/26528918
tags question: http://stackoverflow.com/q/26524388
tags question: http://stackoverflow.com/q/26520899
tags question: http://stackoverflow.com/q/26624926
tags question: http://stackoverflow.com/q/26599745
tags question: http://stackoverflow.com/q/26522669
tags question: http://stackoverflow.com/q/26581878
tags question: http://stackoverflow.com/q/26588853
tags question: http://stackoverflow.com/q/26671962
tags question: http://stackoverflow.com/q/26570382
tags question: http://stackoverflow.com/q/26625346
tags question: http://stackoverflow.com/q/26614053
tags question: http://stackoverflow.com/q/26569265
tags question: http://stackoverflow.com/q/26534284
tags question: http://stackoverflow.com/q/26648599
tags question: http://stackoverflow.com/q/26668557
tags question: http://stackoverflow.com/q/26628325
tags question: http://stackoverflow.com/q/26598876
tags question: http://stackoverflow.com/q/26640876
tags question: http://stackoverflow.com/q/26569527
tags question: http://stackoverflow.com/q/26590497
tags question: http://stackoverflow.com/q/26553645
tags question: http://stackoverflow.com/q/26583230
tags question: http://stackoverflow.com/q/26517746
tags question: http://stackoverflow.com/q/26584494
tags question: http://stackoverflow.com/q/26566447
tags question: http://stackoverflow.com/q/26668250
tags question: http://stackoverflow.com/q/26580448
tags question: http://stackoverflow.com/q/26592824
tags question: http://stackoverflow.com/q/26647930
tags question: http://stackoverflow.com/q/26568672
tags question: http://stackoverflow.com/q/26584074
tags question: http://stackoverflow.com/q/26525741
tags question: http://stackoverflow.com/q/26663283
tags question: http://stackoverflow.com/q/26594161
tags question: http://stackoverflow.com/q/26572530
tags question: http://stackoverflow.com/q/26531639
tags question: http://stackoverflow.com/q/26559261
tags question: http://stackoverflow.com/q/26523357
tags question: http://stackoverflow.com/q/26609129
tags question: http://stackoverflow.com/q/26574618
tags question: http://stackoverflow.com/q/26546548
tags question: http://stackoverflow.com/q/26529530
tags question: http://stackoverflow.com/q/26548938
tags question: http://stackoverflow.com/q/26615063
tags question: http://stackoverflow.com/q/26634882
tags question: http://stackoverflow.com/q/26546189
tags question: http://stackoverflow.com/q/26654446
tags question: http://stackoverflow.com/q/26600918
tags question: http://stackoverflow.com/q/26526656
tags question: http://stackoverflow.com/q/26566623
tags question: http://stackoverflow.com/q/26536532
tags question: http://stackoverflow.com/q/26540032
tags question: http://stackoverflow.com/q/26650654
tags question: http://stackoverflow.com/q/26523690
tags question: http://stackoverflow.com/q/26639631
tags question: http://stackoverflow.com/q/26534550
tags question: http://stackoverflow.com/q/26604711
tags question: http://stackoverflow.com/q/26532609
tags question: http://stackoverflow.com/q/26642673
tags question: http://stackoverflow.com/q/26648118
tags question: http://stackoverflow.com/q/26579773
tags question: http://stackoverflow.com/q/26638119
tags question: http://stackoverflow.com/q/26592693
tags question: http://stackoverflow.com/q/26665559
tags question: http://stackoverflow.com/q/26646877
tags question: http://stackoverflow.com/q/26575156
tags question: http://stackoverflow.com/q/26595308
tags question: http://stackoverflow.com/q/26661749
tags question: http://stackoverflow.com/q/26647969
tags question: http://stackoverflow.com/q/26665081
tags question: http://stackoverflow.com/q/26670965
tags question: http://stackoverflow.com/q/26667699
tags question: http://stackoverflow.com/q/26671292
tags question: http://stackoverflow.com/q/26546468
tags question: http://stackoverflow.com/q/26524868
tags question: http://stackoverflow.com/q/26559532
tags question: http://stackoverflow.com/q/26558125

http://stackoverflow.com/a/26606876
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26605106
accepted answer of: http://stackoverflow.com/q/26605106
type: AcceptedAnswer
downvote count: 0
has body: Geocode runs asynchronously, so you have to either put that code inside the callback, or make another callback function: geocoder.geocode( {'address': destination}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { destination_LatLng = results[0].geometry.location; } else if (status == google.maps.GeocoderStatus.ZERO_RESULTS) { alert("Bad destination address."); } else { alert("Error calling Google Geocode API."); } //put more stuff here instead }); or function moreStuff(){ //more stuff here } geocoder.geocode( {'address': destination}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { destination_LatLng = results[0].geometry.location; } else if (status == google.maps.GeocoderStatus.ZERO_RESULTS) { alert("Bad destination address."); } else { alert("Error calling Google Geocode API."); } moreStuff(); });

http://stackoverflow.com/comment/41877012
has text: Steve, maybe you can help me with that: http://stackoverflow.com/questions/26517605/pass-dynamic-content-to-bootstrap-modal-3-2
comment on: http://stackoverflow.com/a/26618148
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26654254
score: 0
has comment: http://stackoverflow.com/comment/41951927
answer count: 1
has answer: http://stackoverflow.com/a/26655177
tagged with: angularjs
tagged with: angular-directive
has comment: http://stackoverflow.com/comment/41959919
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41950985
has comment: http://stackoverflow.com/comment/41946514
has body: Let's say I have a chart directive (like a pie chart) and a settings directive that contains a form used to modify the settings for the chart directive. The settings directive is displayed in a modal dialogue. How can I make it so that changes in the settings directive take effect in the chart directive? There can be multiple chart directives, each with independent settings. The settings for each chart will actually be shown as tabs in the settings modal, but I left that out to keep the example simple. Here are some things I have tried/considered: "Use a factory to share the Settings values." This fails because I might have multiple chart directives, each with separate settings. "Have the settings directive be a child of the chart directive." The settings directive cannot be a child of the chart directive because it needs to be rendered in the modal. Here is a plunkr along w/ some relevant snippets: Settings JS: app.controller("Controller", function ($scope, $modal) { $scope.showSettings = function () { $modal.open({ scope: $scope, template: " Settings Modal " } ); } }); app.directive("chart", function () { return { restrict: 'E', template: ' Chart Directive someChartSetting: {{someChartSetting}} ', controller: function ChartController($scope) { // This value represents a setting that I need to modify via the settings modal. $scope.someChartSetting = "on"; } } }) app.directive("settings", function () { return { restrict: 'E', template: 'Toggle someChartSetting', controller: function SettingsController($scope) { $scope.toggleSettings = function () { console.log("Toggle clicked"); // This is where I need to modify the someChartSetting value from chart. } } } })
type: Question
tagged with: javascript
has title: Modify value in directive's scope from separate directive

http://stackoverflow.com/a/26557514
has comment: http://stackoverflow.com/comment/41794865
has comment: http://stackoverflow.com/comment/41736346
score: 0
has comment: http://stackoverflow.com/comment/41794519
has comment: http://stackoverflow.com/comment/41792942
has body: http://jsfiddle.net/t4rLk1an/2/ alter the table like this: Customer1_File 2014-10-22 2014-10-22 00:25:26 Fail Client_name Job_Code_Details and jQuery like: $(document).ready(function(){ $('.correct').each(function() { if ($(this).html() == 'Fail') { $(this).closest('tr').removeClass("chk"); $(this).closest('tr').addClass("res"); } }); } ); I'm not sure about your class, as there is no css. To try you can change it to $(document).ready(function(){ $('.correct').each(function() { if ($(this).html() == 'Fail') { $(this).closest('tr').css("background","red"); } }); } );
type: Answer
has comment: http://stackoverflow.com/comment/41736324
answers question: http://stackoverflow.com/q/26557215
has comment: http://stackoverflow.com/comment/41792572
has comment: http://stackoverflow.com/comment/41798312
has comment: http://stackoverflow.com/comment/41791907
has comment: http://stackoverflow.com/comment/41791618

http://stackoverflow.com/comment/41891892
score: 0
comment on: http://stackoverflow.com/q/26638304
type: QuestionComment
type: Comment
has text: Not necessarily. You can make requests to a node server which simply renders a react component with the provided data. It'd just act as a rendering engine, but all of the database access and business logic stays in your PHP based CMS.

http://stackoverflow.com/q/26647326
answer count: 2
has answer: http://stackoverflow.com/a/26647396
accepted answer: http://stackoverflow.com/a/26647396
has body: What my aim is to reverse the text witten inside textbox on button click. So far what I have done is like this. my html Untitled Document mithun my jquery.reverse.js plugin is (function($) { // jQuery plugin definition $.fn.reverseText = function(params) { // merge default and user parameters params = $.extend( {minlength: 0, maxlength: 99999}, params); // traverse all nodes this.each(function() { // express a single node as a jQuery object var $t = $(this); // find text var origText = $t.text(), newText = ''; // text length within defined limits? if (origText.length >= params.minlength && origText.length <= params.maxlength) { // reverse text for (var i = origText.length-1; i >= 0; i--) newText += origText.substr(i, 1); $t.text(newText); } }); // allow jQuery chaining return this; }; })(jQuery); it is working if i want to reverse the text of . but what i want to do is to reverse the text written inside text box with id="ch" on button click.How the plugin will look like to achieve this? Can any one give me any suggestion how the plugin will be require to write?
tagged with: plugins
possible better answer: http://stackoverflow.com/a/26647390
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26647390
type: Question
has title: jquery plugin to reverse textbox value
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
score: 0

http://stackoverflow.com/q/26652324
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26652789
answer count: 4
has answer: http://stackoverflow.com/a/26652500
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41908120
favorite count: 0
type: Question
tagged with: time
has body: This is a JavaScript showing time hour, minute and seconds now seconds are ticking minutes change it's not static i have problem.How to implement it in HTML page ? &lt;script type="text/javascript"&gt; function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('txt').innerHTML = h + ":" + m + ":" + s; t = setTimeout('startTime()', 500); } function checkTime(i) { if (i &lt; 10) { i = "0" + i; } return i; } &lt;/script&gt;
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26652486
has answer: http://stackoverflow.com/a/26652486
score: -1
has comment: http://stackoverflow.com/comment/41908147
has answer: http://stackoverflow.com/a/26652789
has title: How to implement this JavaScript in HTML
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26652492

http://stackoverflow.com/q/26639883
tagged with: css
accepted answer: http://stackoverflow.com/a/26639997
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26639962
possible better answer: http://stackoverflow.com/a/26639962
has comment: http://stackoverflow.com/comment/41886758
type: Question
has body: I have installed Custom Search Engine on my Website with the overlay layout. Thing is it shows full width in desktop view so I put the script between &lt;div class="reduce"&gt;...&lt;/div&gt; and added a custom CSS file to reduce the width of the bar. The CSS code is as below : .reduce { width:35%; margin-left:auto; margin-right:auto; } Google Custom Search Engine code : &lt;div class="reduce"&gt; &lt;script&gt; (function() { var cx = '012035866174049355570:ld4iogvd2ok'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); &lt;/script&gt; &lt;gcse:search&gt;&lt;/gcse:search&gt; &lt;/div&gt; It looks good on the desktop view but if viewed on mobile, the search bar is cluttered. So is there any way I can code it so that when the website is opened on a desktop, it'll run the above css and when it detects a mobile, the width is changed to 100%? This is the LINK to the website.
has answer: http://stackoverflow.com/a/26639997
score: 0
answer count: 2
has title: how to have different settings for content in mobile/desktop view?
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41886790

http://stackoverflow.com/comment/41925914
score: 1
comment on: http://stackoverflow.com/q/26661928
type: QuestionComment
type: Comment
has text: @ChrisHayes: He's attempting to take the substring that is valid JSON.

http://stackoverflow.com/comment/41827073
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26607306
has text: For 'each td' or for 'each td in the same row'?
score: 0

http://stackoverflow.com/a/26616343
answers question: http://stackoverflow.com/q/26616170
has body: I'd suggest putting a div inside the image div containing the text and then using CSS to hide/show it. HTML: Caption here x CSS: .limage { position: relative; } .caption { display: none; } .limage:hover .caption { display: block; position: absolute;}
type: Answer
has comment: http://stackoverflow.com/comment/41846904
has comment: http://stackoverflow.com/comment/41844146
score: 0

http://stackoverflow.com/comment/41843062
type: QuestionComment
has text: Could you also attach the 'picking apart' of the angular filter unique ? Maybe there's something you missed ?
score: 0
comment on: http://stackoverflow.com/q/26615706
type: Comment

http://stackoverflow.com/comment/41733278
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26555601
type: Comment
has text: @Mark.ewd I think that you haven't understood my answer, in your question you said: "In the offline mode it cannot originate from a server or get additional templates." But I'm giving you the option to have the templates loaded in the same page, by using the `$templateCache`

http://stackoverflow.com/comment/42087906
type: Comment
comment on: http://stackoverflow.com/a/26644453
has text: Hi @Mike. state.go() did not work even after injecting $state.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26691129
has comment: http://stackoverflow.com/comment/41987086
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41987784
has comment: http://stackoverflow.com/comment/41978958
has body: You can reset the form using the reset() method of native element as shown below: $(function() { var dialog = $("form.dialog").dialog({ autoOpen: false, height: 200, width: 300, modal: true, buttons: [{ text: "Ok", click: function() { $(this).submit(); $(this).dialog("close"); } }, { text: "Cancel", click: function() { $(this).dialog("close").get(0).reset(); //reset the form } }], close: function() { this.reset(); //reset the form } }); $("#dialog-button").on("click", function() { $("form.dialog").dialog("open"); return false; }); }); Test Option Open The reset() method belongs to DOM Element. Inside the callback functions this refer to the native DOM element. dialog() is a jQuery function. So for closing the dialog we create a jquery object by wrapping this inside $() and call $(this).dialog("close");. Now, the jquery object $(this) doesn't have the reset() method, So we extract the DOM element from it using jQuery get() method and call it's reset() like $(this).dialog("close").get(0).reset(); This is equivalent to: $(this).dialog("close"); this.reset(); (In short I did that to reduce the number of lines by chaining) Inside the close callback, Since we don't have to close the dialogue manually by calling jquery method, We don't need a jquery object - we simply call this.reset() for resetting. Reference: HTMLFormElement.reset() get() Side note: The quotes (“) you're using is invalid in javascript.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26659316
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26659316

http://stackoverflow.com/comment/41802283
has text: Sorry, I'm using the image in this data visualization library called D3. Thought the error could be there too. Should have made it more clear.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26581661

http://stackoverflow.com/comment/41939559
has text: @ WisdmLabs you are correct.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26667832
type: Comment

http://stackoverflow.com/q/26584867
tagged with: javascript
score: 0
tagged with: hid
answer count: 1
has answer: http://stackoverflow.com/a/26619426
accepted answer: http://stackoverflow.com/a/26619426
tagged with: node.js
type: AnsweredQuestion
has title: Permanently write SerialNumber to USB HID Device
tagged with: hardware
tagged with: usb
type: Question
has body: I bought two very cheap RFID-Readers from China (model 8H10D-1). I am using node to access them, since they register as a USB HID Device and node offers a great library called node-hid. Unfortunately these readers do not have their serial number set. I can read the product and vendor id to distinguish whether it is my reader, but I can't distinguish between these two readers. Therefore I wondered whether it is possible to permanently write an own serial number to these devices. The node-hid library provides a method device.write([0x00, 0x01, 0x01, 0x05, 0xff, 0xff]); but i don't think this will help me out, does it ? Does anyone please can give me advice if it is even possible to permanently set the serial number ? Or does anyone has another idea to identify the readers by anything else ? This is the output I'm getting from the library when listing all readers: [ { vendorId: 5050, productId: 24, path: 'USB_13ba_0018_4100000', serialNumber: '', manufacturer: '', product: 'Barcode Reader', release: 1, interface: -1, usagePage: 1, usage: 6 }, { vendorId: 5050, productId: 24, path: 'USB_13ba_0018_6200000', serialNumber: '', manufacturer: '', product: 'Barcode Reader', release: 1, interface: -1, usagePage: 1, usage: 6 } ] Thanks in advance.

http://stackoverflow.com/comment/41814604
has text: hi,i have already can show the blank pdf with the header and else, when i want to implement using print when expression, why it's not working in the detail part of my report?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26586504
type: AnswerComment

http://stackoverflow.com/comment/41698663
comment on: http://stackoverflow.com/q/26534581
has text: I posted my comment as an answer
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/54047420
answers question: http://stackoverflow.com/q/26599923
score: 3
upvote count: 3
type: Answer
has body: When using .on(), keep in mind that: Case 2, is an alias: .change(...) === .on("change", handler) - If the selector is omitted or is null, the event handler is referred to as direct or directly-bound (The handler is called every time an event occurs on the selected elements). In this case, if you want to bind something successfully to an element, you need to ensure it is already loaded. Case 1: .on("change", selector, handler) - If the selector is provided, the event handler is referred to as delegated (The handler is not called when the event occurs directly on the bound element, but only for descendants that match the selector). In this case, you don't need the element to be loaded or not at the time of your binding. The benefits of doing it one way instead of the other are well explained in this answer from Difference between .on('click') vs .click().
downvote count: 0

http://stackoverflow.com/comment/41771344
comment on: http://stackoverflow.com/a/26576795
score: 0
type: AnswerComment
has text: it's good but maybe with this manipulation: ` $('select').on('dblclick keyup',function(e){ if(e.which == 13 || e.type == 'dblclick') alert('something'); });`
type: Comment

http://stackoverflow.com/comment/41715763
comment on: http://stackoverflow.com/q/26546352
score: 0
type: Comment
has text: possible duplicate of [JS - Why use Prototype?](http://stackoverflow.com/questions/8433459/js-why-use-prototype)
type: QuestionComment

http://stackoverflow.com/q/26642146
has answer: http://stackoverflow.com/a/26642830
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26642873
has comment: http://stackoverflow.com/comment/41891061
linked to: http://stackoverflow.com/q/923299
type: Question
has title: Creating a popup window when mouse leaves the browser page
has body: I've been trying to find a good reference on how to create a popup when someone leaves your browser and I'm not having any luck. I'm trying to set it up when the mouse leaves the browser, not on exiting the page. Can someone point me in the right direction? It's just a message box i'm trying to display when the mouse leaves the browser. I've tried the .mouseleave() function but it appears when I go to the scroll bar and I want to prevent that.

http://stackoverflow.com/comment/41805299
comment on: http://stackoverflow.com/a/26595294
has text: Hey thanks for the reply, it's helpful. But 1 quick question, I would think point C (x3,y3) should be over 100px to the left, since the call to the DrawTriangle function is as follows. drawTriangle(1, 1, 100, 1, 100, 100); But instead x3 and y3 seem to be graphed at around 1,100. Just curious why C seems to be on the opposite side where I would expect it considering the hardcoded input arguments for drawTriangle.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26642261
has comment: http://stackoverflow.com/comment/41891293
has comment: http://stackoverflow.com/comment/41891363
has comment: http://stackoverflow.com/comment/41891393
type: Answer
has comment: http://stackoverflow.com/comment/41891250
has comment: http://stackoverflow.com/comment/41891364
has comment: http://stackoverflow.com/comment/41891326
has comment: http://stackoverflow.com/comment/41891553
has body: Sounds like a job for Deferreds. If you are using jQuery, something like this should do what you want: function ajaxRequest1() { var dfd = $.Deferred(); $.ajax(...) .done(function(response) { if (/*response is valid*/) dfd.resolve(response); else dfd.reject(); }); .fail(function() { dfd.reject(); }); return dfd.promise(); } function ajaxRequest2(response1) { // similar to ajaxRequest1, but with different URL, params } function ajaxRequest3(response2) { // similar to ajaxRequest2, but with different URL, params } // Run the tasks sequentially $.when(ajaxRequest1()) .then(ajaxRequest2) .then(ajaxRequest3) .done(function(result1, result2, result3) { // all requests have completed }) .fail(function() { // handle error }); Here, each ajaxRequestX function is also the handler. It checks the response received from the previous request, and if everything is okay, it kicks off the next request. Check out jQuery's Deferred object for more info.
answers question: http://stackoverflow.com/q/26642013
has comment: http://stackoverflow.com/comment/41891359
has comment: http://stackoverflow.com/comment/41891399
has comment: http://stackoverflow.com/comment/41891577
has comment: http://stackoverflow.com/comment/41891453
has comment: http://stackoverflow.com/comment/41891490
score: 0
has comment: http://stackoverflow.com/comment/41891457
upvote count: 1
has comment: http://stackoverflow.com/comment/41891276
downvote count: 1
has comment: http://stackoverflow.com/comment/41891600

http://stackoverflow.com/q/26600600
has title: how to get all values of object via coffeescript?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26600624
has answer: http://stackoverflow.com/a/28695963
score: 2
upvote count: 2
has body: I have an object say: var temp = {d:4,f:4,g:5}; is there any way to get all values out of it using coffeescript?
possible better answer: http://stackoverflow.com/a/28695963
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26600624
tagged with: coffeescript

http://stackoverflow.com/comment/41679833
type: QuestionComment
comment on: http://stackoverflow.com/q/26526201
has text: What does `var_dump($_POST)` show?
score: 0
type: Comment

http://stackoverflow.com/a/26620993
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26620563
has body: There are a couple of ways to do this, the fastest is this: $('.btn.btn-add-layer').on('click', function() { var layertype = this.getAttribute("data-layertype"); alert('type : ' + layertype); }); You also have an error in your selector, try $('button.btn.btn-add-layer') instead.

http://stackoverflow.com/q/26537405
has body: In a series of divs containing tables that can be clicked and removed I removed the bottom border to prevent a 'doubled up' border look. However, now I am stumped as to how to add a bottom border but only on whatever element is last/on the bottom. JSFiddle here: http://jsfiddle.net/phamousphil/t82qsd69/ Javascript code below that handles the disappearing act for the divs. Could I augment that function to help here? $(function () { var nContainer = $(".notification-popup-container"); $("a.notification-popup-delete").click(function (e) { e.preventDefault(); $(this).closest(nContainer).remove(); }); });
tagged with: css
has answer: http://stackoverflow.com/a/26537514
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/19329459
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/26537528
has comment: http://stackoverflow.com/comment/41700683
has comment: http://stackoverflow.com/comment/41700497
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: Dynamically add border on div class
possible better answer: http://stackoverflow.com/a/26537514
favorite count: 0
has answer: http://stackoverflow.com/a/26537497
accepted answer: http://stackoverflow.com/a/26537497

http://stackoverflow.com/comment/41891363
score: 0
type: Comment
has text: @alekop you can understand freeze something like Thread.yeld in java
comment on: http://stackoverflow.com/a/26642261
type: AnswerComment

http://stackoverflow.com/comment/41665079
comment on: http://stackoverflow.com/a/26515726
has text: Nvm. You are the best. Made my program lightning speed.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26548608
score: 2
upvote count: 2
downvote count: 0
has body: I have realized what I was doing wrong. I have now decided to use the Q Node Module for my promises. var q = require('q'); exports.post = function(request, response) { // Use "request.service" to access features of your mobile service, e.g.: // var push = request.service.push; var tables = request.service.tables; var accountsTable = tables.getTable('Accounts'); var params = request.body; checkUsername(params.username, accountsTable).then(function (result) { if (result.length === 0) { return checkEmail(params.email, accountsTable); } else { response.send(400, {message: 'This username is in use.'}); } }).then(function (results) { if (results.length === 0) { return; } else { response.send(400, {message: 'This email address is already registered.'}); } }).then(function () { response.send(200, {message: 'Username and email are unique. You can register!'}); }); }; function checkUsername(username, table) { var deferred = q.defer(); table.where({username: username}).read({ success: function (result) { deferred.resolve(result); }, error: function (error) { deferred.reject(error); } }); return deferred.promise; } function checkEmail(email, table) { var deferred = q.defer(); table.where({email: email}).read({ success: function (result) { deferred.resolve(result); }, error: function (error) { deferred.reject(error); } }); return deferred.promise; }
answers question: http://stackoverflow.com/q/26546901
type: Answer

http://stackoverflow.com/q/26652193
has body: I'm using bootstrap 3 modals using the remote path option as follows. view This works fine, but instead of clicking the link I want to open the modal programmatically! I'm trying to avoid triggering a click() event on the link if possible.
has answer: http://stackoverflow.com/a/26652250
has answer: http://stackoverflow.com/a/26652449
type: Question
has comment: http://stackoverflow.com/comment/41907892
possible better answer: http://stackoverflow.com/a/26652250
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26652257
answer count: 3
accepted answer: http://stackoverflow.com/a/26652449
score: 1
favorite count: 0
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
upvote count: 1
has title: Bootstrap Modal - Set remote path and open programmatically
type: AnsweredQuestion

http://stackoverflow.com/q/26515354
type: Question
tagged with: hashmap
tagged with: javascript
has answer: http://stackoverflow.com/a/26515726
has comment: http://stackoverflow.com/comment/41660640
score: 0
tagged with: file-io
answer count: 1
has body: I couldn't find anything on javascript but this might be clarified very quickly. I am working on a website where I have to retrieve data via http requests from a server. Because I need to make several requests and the data is constant what I want to do is make table with keys and values -> store those values in a file -> and then be able to retrieve those values. That way I have to read one file as apposed to fetching data via 30 http requests General Idea : Given: spell id = number (Ex. 45) Output: name of spell = string (Ex. fire...) Use this output to then fetch the url of the image of the spell (containing the spell name) EDIT Code : // When I fetch the file i use (json data) function getChampionImage(id) { var champUrl = "https://na.api.pvp.net/api/lol/static-data/na/v1.2/champion/" +id +"/?api_key=....." xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", champUrl, false ); xmlHttp.send( null ); var jsonText = xmlHttp.responseText; var champData = JSON.parse(jsonText); var champName = champData.key; return "http://ddragon.leagueoflegends.com/cdn/" + versionNum + "/img/champion/"+champName+".png"; }
has comment: http://stackoverflow.com/comment/41660914
type: AnsweredQuestion
has title: How to store and fetch data from hash tables - javascript
accepted answer: http://stackoverflow.com/a/26515726
has comment: http://stackoverflow.com/comment/41661086

http://stackoverflow.com/q/26611461
possible better answer: http://stackoverflow.com/a/28168190
favorite count: 0
tagged with: android
has answer: http://stackoverflow.com/a/36095541
tagged with: css
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26612133
accepted answer: http://stackoverflow.com/a/26612133
tagged with: google-chrome
has answer: http://stackoverflow.com/a/28168190
type: Question
has answer: http://stackoverflow.com/a/39329167
has body: For some reason scroll doesn't work on Android Devices in Chrome browser only. You can see the site at Peshkuiarte.com/mobile I have tried: $(document).ready(function() { $('body').css('touch-action', 'auto'); }); I can't seem to figure it out ... Any help would be greatly appreciated
has answer: http://stackoverflow.com/a/36030719
has answer: http://stackoverflow.com/a/36941711
upvote count: 2
has title: Scroll not working on Android Chrome only
has answer: http://stackoverflow.com/a/57657407
downvote count: 0
answer count: 7
tagged with: javascript

http://stackoverflow.com/a/26598285
accepted answer of: http://stackoverflow.com/q/26596281
has comment: http://stackoverflow.com/comment/41815660
type: AcceptedAnswer
downvote count: 0
has body: Instead of writing it on your own you should try to find and use existing shims (just google for "Object.observe shim") Nevertheless I tried to fix your code: http://jsbin.com/jupuro/2/edit?js,console
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26596281
has comment: http://stackoverflow.com/comment/41819253

object
tags question: http://stackoverflow.com/q/26514487
tags question: http://stackoverflow.com/q/26664764
tags question: http://stackoverflow.com/q/26647940
tag name: object
tags question: http://stackoverflow.com/q/26593427
tags question: http://stackoverflow.com/q/26619715
tags question: http://stackoverflow.com/q/26604854
tags question: http://stackoverflow.com/q/26607055
tags question: http://stackoverflow.com/q/26527086
tags question: http://stackoverflow.com/q/26588996
tags question: http://stackoverflow.com/q/26583278
tags question: http://stackoverflow.com/q/26529250
tags question: http://stackoverflow.com/q/26575648
tags question: http://stackoverflow.com/q/26556762
tags question: http://stackoverflow.com/q/26516149
tags question: http://stackoverflow.com/q/26596793
tags question: http://stackoverflow.com/q/26661762
tags question: http://stackoverflow.com/q/26652788
tags question: http://stackoverflow.com/q/26528511
tags question: http://stackoverflow.com/q/26567156
tags question: http://stackoverflow.com/q/26557146
tags question: http://stackoverflow.com/q/26600325
tags question: http://stackoverflow.com/q/26652327
tags question: http://stackoverflow.com/q/26666644
tags question: http://stackoverflow.com/q/26640244
tags question: http://stackoverflow.com/q/26639014
tags question: http://stackoverflow.com/q/26620083
tags question: http://stackoverflow.com/q/26520755
tags question: http://stackoverflow.com/q/26653638
tags question: http://stackoverflow.com/q/26570698
tags question: http://stackoverflow.com/q/26649368
tags question: http://stackoverflow.com/q/26636624
tags question: http://stackoverflow.com/q/26586298
tags question: http://stackoverflow.com/q/26546090
tags question: http://stackoverflow.com/q/26599510
tags question: http://stackoverflow.com/q/26595925
tags question: http://stackoverflow.com/q/26626749
tags question: http://stackoverflow.com/q/26526169
tags question: http://stackoverflow.com/q/26573423
tags question: http://stackoverflow.com/q/26669684
tags question: http://stackoverflow.com/q/26568463
tags question: http://stackoverflow.com/q/26618492
tags question: http://stackoverflow.com/q/26547821
tags question: http://stackoverflow.com/q/26618583
type: Tag
tags question: http://stackoverflow.com/q/26531415
tags question: http://stackoverflow.com/q/26539309

http://stackoverflow.com/comment/41749371
has text: This just removes the floor, not the tile.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26561608
type: Comment

http://stackoverflow.com/a/26562086
downvote count: 0
has comment: http://stackoverflow.com/comment/41746105
has body: What about building your own Class ? function Array2D(xSize, ySize, initialValue) { initialValue=initialValue || 0; // create an flat empty array filled with the initial value var length = xSize*ySize; var innerArray = new Array(length); for (var i=0; i&lt;length; i++) innerArray[i] = initialValue; // accessors this.getAt = function(x, y) { return innerArray[x+xSize*y]}; this.setAt = function(x, y, val) { innerArray[x+xSize*y]=val}; } Use with : var myArray2d = new Array2D(5,7); myArray2d.setAt(1,1,3); var value = myArray2d.getAt(1,1); // == 3 var anotherValue = myArray2d.getAt(2,2); // == 0
has comment: http://stackoverflow.com/comment/41748173
score: 3
answers question: http://stackoverflow.com/q/26561157
type: Answer
upvote count: 3

http://stackoverflow.com/comment/41846330
has text: resolves with an object? Does that mean it returns a promise? Hiding the implementation details of `getNodeData()` is NOT helping anyone help you here. If I knew what it did from the beginning, I would have posted an answer within an hour of your question, but as such, I still don't understand enough about it to post an answer that isn't a guess. You have to help people help you and leaving out important implementation details doesn't help people understand what you're trying to do.
comment on: http://stackoverflow.com/q/26592316
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26629762
answers question: http://stackoverflow.com/q/26629577
upvote count: 2
has body: First fix your code as i mentioned in my comment. There are several syntax errors. And define closeMe before your you call it. Now scrollToAnchor not works, define that before closeMe also. Now, when you clicked the Exit it's not animated, but i think, now you can figure out what to do with it to animate. http://jsfiddle.net/xs1j8kq5/22/ Exit Button For scroll, you need to define an tag where you want to scroll. edit: working fiddle: http://jsfiddle.net/xs1j8kq5/24/
has comment: http://stackoverflow.com/comment/41868094
score: 2
accepted answer of: http://stackoverflow.com/q/26629577
has comment: http://stackoverflow.com/comment/41872110
has comment: http://stackoverflow.com/comment/41872020
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26566650
tagged with: canvas
answer count: 1
tagged with: javascript
has body: I'm looking to draw an image onto a canvas for my HTML page using a separate Javascript file. The HTML I have thus far is fine, my problem seems to lie within the script. This is what I have currently: function doFirst(){ var x = document.getElementById('canvas'); canvas = x.getContext('2d'); var pic = new image(); pic.src="http://i1273.photobucket.com/albums/y418/Cloudtwonj/Backgroundtest_zps2a6a6b51.jpeg"; pic.addEventListener("load", function(){canvas.drawImage(pic,0,0,x.width,x.height)}, false); } window.addEventListener("load", doFirst, false); Can anyone tell me what I might have done wrong or forgot?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26566738
type: AnsweredQuestion
has title: Drawing an image onto a canvas in Javascript
type: Question
accepted answer: http://stackoverflow.com/a/26566738
tagged with: image
score: 0

http://stackoverflow.com/a/26516785
answers question: http://stackoverflow.com/q/26516654
type: Answer
upvote count: 1
score: 1
has body: Something like this: var newObj={}; for(var i=0, l = obj.length; i&lt;l; i++){ if (typeof newObj[obj[i].rgb] === 'undefined') newObj[obj[i].rgb] = []; newObj[obj[i].rgb].push({ x: obj[i].x, y: obj[i].y }) } obj = newObj;
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26516654

http://stackoverflow.com/comment/41945125
type: QuestionComment
comment on: http://stackoverflow.com/q/26671491
has text: calculate bounds for map) it is doesn't matter
score: 0
type: Comment

http://stackoverflow.com/a/26528662
has comment: http://stackoverflow.com/comment/41684360
has body: Jquery(this) refers to what you just clicked... so traverse up parents() to the outermost div that surrounds your entire block and then traverse back down to your .photo > img. jQuery(document).ready(function(){ jQuery(".gallery-image").click(function(){ jQuery(this).parents("#modal").find(".photo &gt; img").prop("src", jQuery(this).prop("src")); }); });
type: Answer
has comment: http://stackoverflow.com/comment/41684128
answers question: http://stackoverflow.com/q/26527994
score: 0

http://stackoverflow.com/comment/42025905
score: 0
type: AnswerComment
has text: Thank you for your answer and the information. My apologies for being a little late on accepting it!
comment on: http://stackoverflow.com/a/26661193
type: Comment

http://stackoverflow.com/q/26569527
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26570104
favorite count: 0
score: 0
accepted answer: http://stackoverflow.com/a/26570104
has comment: http://stackoverflow.com/comment/41768982
has title: User Defined Rules in a Web Application
has comment: http://stackoverflow.com/comment/41758130
tagged with: rules
has comment: http://stackoverflow.com/comment/41758149
has body: I'm required to implement a notification system integrated to a web application (JavaScript + PHP). Notifications should be fired based on user-defined rules. I don't have experience with rules engines and building rules. Therefore, I don't know what I'm doing or if what the following could be implemented by better solution. I'm trying to figure out how to store and process the following hypothetical scenario. Let's say that the web app is a shopping online service for a store that has 3 lines of products, line A, line B and line C. Each line has different characteristics. User#1 selects an object from line A, then specifies some characteristics such as size and colors. User#2 selects an object from line B, the only characteristic for this kind is material, he selects wood. Then both users ask system to notify them whenever these objects with these characteristics become available. From what I've read so far, this could be done through [user-defined rules]. If so, then What's the best technology to handle it? I'm willing to learn but I need a direction to help me start. Can I use openRules or similar for this? How to sent user defined data to a web service? given that they change based on the line.
upvote count: 1
tagged with: web-services
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/41758202
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41758185
type: Question

http://stackoverflow.com/q/26653638
has answer: http://stackoverflow.com/a/26732368
downvote count: 0
type: UnansweredQuestion
tagged with: object
score: 2
has answer: http://stackoverflow.com/a/26732390
type: Question
upvote count: 2
answer count: 2
tagged with: arrays
has comment: http://stackoverflow.com/comment/41910539
has comment: http://stackoverflow.com/comment/41910464
tagged with: javascript
has body: I have an array with objects like this (simplefied version, actual array has much more data): [ { id: '1', name: 'Joe', description: 'Student', locations: [ { type: 'home', value: '123' } ] }, { id: '1', name: 'Joe', description: 'Farmer', locations: [ { type: 'home', value: '456' } ] }, { id: '1', name: 'Joe', description: '', locations: [ { type: 'home', value: '123' } ] } ] How can I use javascript (lodash) to create the following? : { id: '1', name: 'Joe', description: 'Farmer', locations: [ { type: 'home', value: '123' }, { type: 'home', value: '456' } ] } The goal is to create a cleaned up contact object of an array of contact data. So it needs to replace single attributes like name and description in case they are empty. And push objects like location in case its not found in de locations array. I did get some results using _.merge, problem is that merge always overrides with last value and doesnt push new values, so result would be something like this: { id: '1', name: 'Joe', description: '', locations: [ { type: 'home', value: '123' }] }
favorite count: 0
has title: Create a cleaned up contact object of an array of contact data
tagged with: lodash

http://stackoverflow.com/comment/41903725
has text: var app = angular.module("MyApp", []); app.controller("MyFunction", ['$scope','$http', function($scope, $http) { $http.get('json/producttable.json').success (function(data){ $scope.mydata = data; }); }] );
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26649568

http://stackoverflow.com/comment/41774668
score: 1
has text: FB and Twitter are both aware of the huge # of fake accounts. But those fake accounts also allow them to over state how many users they actually have. Thus more eyeballs per day and importance than they really have. I'm sure it didn't hurt either's IPO.
comment on: http://stackoverflow.com/q/26578246
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26551427
score: 0
has answer: http://stackoverflow.com/a/26551563
has body: I'm uploading code from my project to Plunker. You can see it here. When I run the code through a local server and render it in Chrome, the functionality works fine. When I try to run it through Plunker the code fails. This snippet is inside of script.js: $('.navbar-toggle').click(function(){ alert('test1'); if ($(this).hasClass('login')) { $('.navmenu-style1').css("z-index","1"); $('.navmenu-style').css("z-index","0"); } else { $('.navmenu-style1').css("z-index","0"); $('.navmenu-style').css("z-index","1"); } }); How can I make it work in Plunker please? Is there a more universal bit of code that I can use or am I simply doing something wrong? Cheers
tagged with: plunker
has comment: http://stackoverflow.com/comment/41725206
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41725094
has comment: http://stackoverflow.com/comment/41725467
type: Question
has comment: http://stackoverflow.com/comment/41725057
accepted answer: http://stackoverflow.com/a/26551563
duplicate of: http://stackoverflow.com/q/14028959
answer count: 1
tagged with: javascript
has title: $(.'class-name').click(function() {...}) ceases to function cross-browser?
linked to: http://stackoverflow.com/q/14028959

http://stackoverflow.com/a/26550686
answers question: http://stackoverflow.com/q/26550495
has comment: http://stackoverflow.com/comment/64540233
type: Answer
has body: Something like the following simple example. var drawingCanvas = document.getElementById($scope.idImage); var context = drawingCanvas.getContext('2d'); $scrope.draw = function() { context.drawImage($scope.idImage, $scope.coordinate.x, $scope.coordinate.y, $scope.coordinate.w, $scope.coordinate.h); } Fiddle JS Example #1 Fiddle JS Example #2 There is nothing special about the draw in canvas just because you're using angular. Some excellent examples here : Draw HTML5 Canvas
score: 5
accepted answer of: http://stackoverflow.com/q/26550495
type: AcceptedAnswer
upvote count: 5
downvote count: 0

http://stackoverflow.com/q/26606047
favorite count: 0
tagged with: backbone.js
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: backbone-model
has comment: http://stackoverflow.com/comment/41826002
has comment: http://stackoverflow.com/comment/41825494
type: Question
tagged with: backbone.js-collections
has body: jsfiddle I'm trying to create a message client using this tutorial at this point, the view is supposed to be updated when a new message is typed into the field and the add button is clicked. For some reason the "addMessage" Event is failing to add a new model to the collection. var messagesjson = [ { id: 3, message: "This is the message", sender: "gabriel", receiver: "gabriel", has_been_read: false, has_been_reported: false, created_at: "2014-10-23T19:55:20+0200", is_friend: false }, { id: 5, message: "I'm loving this ", sender: "gabriel", receiver: "gabriel", has_been_read: true, has_been_reported: false, created_at: "2014-10-23T20:02:34+0200", is_friend: false }]; var MessageModel = Backbone.Model.extend({ defaults: { id: 3, message: "This is the message", sender: "gabriel", receiver: "gabriel", has_been_read: false, has_been_reported: false, created_at: "2014-10-23T19:55:20+0200", is_friend: false } }); var MessageView = Backbone.View.extend({ tagName: "div", className: "listview", template: $('#messageTemplate').html(), render: function() { var tmpl = _.template(this.template); console.log(this.model); this.$el.html(tmpl(this.model.toJSON())); return this; } }); var MessageCollection = Backbone.Collection.extend({ model: MessageModel }); var MessageCollectionView = Backbone.View.extend({ el: $('#messages'), initialize: function() { this.collection = new MessageCollection(messagesjson); this.render(); this.collection.on("add", this.renderMessage, this); }, render: function() { var that = this; _.each(this.collection.models, function(item){ that.renderMessage(item); },this); }, events:{ "click #add":"addMessage" }, renderMessage: function(item) { var messageview = new MessageView({ model: item }); this.$el.append(messageview.render().el); }, addMessage: function(e) { e.preventDefault(); var formData = {}; $("#addMessage").children("input").each(function (i, el) { formData[el.id] = $(el).val(); }); messagesjson.push(formData); this.collection.add(new MessageModel(f…
has title: Model not being pushed into collection of backbonejs
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26606914
accepted answer: http://stackoverflow.com/a/26606914

http://stackoverflow.com/q/26534611
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
score: -1
type: AnsweredQuestion
has body: I made a AJAX call which is working (shows all the requested data in HTML), but I need it to do more. I need HTML attributes to these generated li-elements, example value or href. I can't have them, because they are wrapped to javascript variables. $(document).ready(function(){ $.ajax({ type: "GET", url: "controllerURL", success: function(response){ var list = $('#car_list'); list.empty(); for (var i = 0; i &lt; response.length; i++){ var output = ""; output +="&lt;li&gt;&lt;a href=\"#\"&gt;" + response[i].name + "&lt;/a&gt;&lt;/li&gt;"; list.append(output); } }; }); It will generate all the content to my HTML list: &lt;ul id="car_list"&gt; &lt;/ul&gt; But now if I do $('#car_list li').click(function(){ alert("HELLO!"); }); It will never alert, because of javascript variables (at least I think so, JS/jQuery/AJAX is very new to me). How can I fix this?
has answer: http://stackoverflow.com/a/26534641
downvote count: 1
type: Question
has title: AJAX response wraps all the data to JS variable so I can't use HTML attributes on them
accepted answer: http://stackoverflow.com/a/26534641
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41681310
score: 0
type: QuestionComment
type: Comment
has text: What do you suggest?
comment on: http://stackoverflow.com/q/26526656

http://stackoverflow.com/q/26622428
tagged with: php
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26622889
type: Question
has answer: http://stackoverflow.com/a/26622889
answer count: 2
has answer: http://stackoverflow.com/a/26623267
has body: I'm trying to get a page which includes a POST form to load inside an iframe for users to be able to confirm an action such as deleting a listing. I have successfully got the JS and the form page to load inside the iframe, but when I click an action inside the form, it's not updating the listing. Instead, it just refreshes the page. The form is working fine because if I try to access the content-url manually in the browser and update the form, it works fine. How can I get the iframe content to refresh instead of the parent page and load the response inside the iframe itself? What I am doing wrong exactly? Any help is appreciated!! Here's my code: HTML: <button class="myclass" content-url="<?php bloginfo('siteurl') ?>/?a_action=delete_auction&pid=<?php the_ID(); ?>">Delete Me JS: $(document).ready(function() { $(document).click(function(e) { if ($(".popup").is(":visible")) { $(".popup").fadeOut("fast") } }); $(".myclass").click(function() { if (!$(".popup").is(":visible")) { $('#mynewiframeid').attr('src',$(this).attr('content-url')); $(".popup").fadeIn("slow"); } return false; }); $(".popup").click(function(e) { e.stopPropagation() }) }); Form: You are about to delete <?php echo $title; ?>! <?php if(isset($_POST['yes_confirm'])) { $s = "update ".$wpdb->prefix."posts set post_status='trash' where id='$pid'"; $wpdb->query($s); echo ' '; printf(__('Your item has been deleted successfully!')); echo ' '; } else { ?> <?php _e('Are you sure you want to delete this item?'); ?> Yes, Delete No! <?php } ?>
tagged with: javascript
has title: External POST form through iframe
tagged with: ajax
score: 0
accepted answer: http://stackoverflow.com/a/26623267
tagged with: iframe

http://stackoverflow.com/a/26524278
downvote count: 0
has comment: http://stackoverflow.com/comment/41696020
has body: Given that you are doing the "animation" based on re/loading a gif, there's not a quick way to hook into the event of the image "ending" event. A quick sample is using a flag to indicate action while using a timeout after a reasonable amount of time to indicate the action should be done. See: http://jsfiddle.net/GS427/55/ $(function(){ var image = new Image(); image.in_action = false; // flag to determine current state. Initialize to ready to animate. image.duration = 750; // This is rough, if you are creating the gif you can peg this to the proper duration image.src ='http://inftek1.dyndns.org/daniel/test123/Hopping No Repeat.gif'; $('#img').click(function(){ if (!image.in_action) { image.in_action = true; // Set the image as in progress $(this).attr('src',image.src); window.setTimeout(function() { image.in_action = false; // After image.duration miliseconds, set as finished }, image.duration); } }); }); If I were doing this with as much fidelity as possible I would modify this example to only trigger after the initial gif is downloaded and cached (since we don't know how long downloading the image will take), but that starts creeping into more complicated territory.
answers question: http://stackoverflow.com/q/26522593
type: Answer
has comment: http://stackoverflow.com/comment/41677515
score: 1
has comment: http://stackoverflow.com/comment/41693281
upvote count: 1
has comment: http://stackoverflow.com/comment/41709646
has comment: http://stackoverflow.com/comment/41677819

http://stackoverflow.com/q/26660664
tagged with: rest
tagged with: angularjs
type: UnansweredQuestion
score: 0
tagged with: http
type: Question
tagged with: javascript
tagged with: angularjs-scope
has title: Wait for promise in RootCtrl Angular $http
has body: I have a method in my RootCtrl that makes a call to my http api, and returns the result. $scope.checkAccess = function(){ var result = MyService.me(); result.then(function(response){ console.log(response); if (response.data != 'false'){ return true; } else{ return false; } }); } But when I try to call this method in one of the child controllers, like so... var access = $scope.checkAccess(); it tells me access is undefined. What am I doing wrong here? Here is what the Service call looks like. me: function() { return $http({ url: 'http://localhost:5000/api/me', method: 'GET' }); }
answer count: 1
has answer: http://stackoverflow.com/a/26660705

http://stackoverflow.com/q/26604942
score: 3
has comment: http://stackoverflow.com/comment/41894941
tagged with: javascript
has comment: http://stackoverflow.com/comment/41823749
has body: I am trying to capture the screenshot of a portion of the web-page in my web app using the following code. function getScreenshot(){ var content = document.querySelectorAll("div.class")[0]; setTimeout(function(){captureScreenshot()},10); function captureScreenshot() { html2canvas(content, { onrendered: function(canvas) { var newImg = document.createElement("img"); newImg.src = canvas.toDataURL(); var newAnchor = document.createElement("a"); newAnchor.href = newImg.src; newAnchor.download = "screenshot.png"; newAnchor.id="screenshot"; document.body.appendChild(newAnchor); newAnchor.click(); } }); } } The above code works just fine across all the browsers and I can get the png just fine. However if i call captureScreenshot method without the setTimeout it does not quite work? i.e. nothing gets drawn on the canvas. function getScreenshot(){ var content = document.querySelectorAll("div.class")[0]; captureScreenshot(); function captureScreenshot() { html2canvas(content, { onrendered: function(canvas) { var newImg = document.createElement("img"); newImg.src = canvas.toDataURL(); var newAnchor = document.createElement("a"); newAnchor.href = newImg.src; newAnchor.download = "screenshot.png"; newAnchor.id="screenshot"; document.body.appendChild(newAnchor); newAnchor.click(); } }); } } I have tried stepping through the source of html2Canvas but I still cant seem to work out why I need a timeout? My solution works, but I just need to know exactly what is causing the timeout to be necessary? Ok so just some additional info, on Chrome and IE it works most of the time without the timeout, but on Firefox, it never works without the timeout.
has comment: http://stackoverflow.com/comment/41855926
tagged with: canvas
downvote count: 0
tagged with: html2canvas
favorite count: 0
has title: Cant draw the contents of a div onto a canvas using Html2Canvas without a timeout
type: UnansweredQuestion
answer count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/41822844
tagged with: webpage-screenshot
type: Question

http://stackoverflow.com/q/26588281
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41791972
has answer: http://stackoverflow.com/a/26588416
answer count: 1
has comment: http://stackoverflow.com/comment/41791391
favorite count: 0
has body: function sort_days() { var day_of_week = new Date().getDay(); var list = ["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]; var sorted_list = list.slice(day_of_week).concat(list.slice(0,day_of_week)); return sorted_list; } var newVal = {"vendor_d":"3","delivery_possible":1,"monday":0,"monday_opening_closing":0,"tuesday":1,"tuesday_opening_closing":"10:13 - 14:30","wednesday":1,"wednesday_opening_closing":"09:30 - 12:01 &amp; 13:01 - 17:10","thursday":1,"thursday_opening_closing":"09:40 - 12:10 &amp; 13:10 - 18:18","friday":0,"friday_opening_closing":0,"saturday":1,"saturday_opening_closing":"05:06 - 13:15 &amp; 14:10 - 20:12","sunday":1,"sunday_opening_closing":"06:20 - 14:15 &amp; 15:15 - 22:20"} var days = sort_days(); for (var i = 0; i &lt; days.length; i++) { console.log(days[i]); console.log ( newVal.days[i] ); // here I wanna get newVal.monday value }; here I want to get the newVal.days[i] value . I am not too sure I am doing it correctly . but when i am putting newVal.monday its giving me correct value .
downvote count: 4
has title: Access an object's values using a variable
type: AnsweredQuestion
upvote count: 0
score: -4
has comment: http://stackoverflow.com/comment/41791593
accepted answer: http://stackoverflow.com/a/26588416

http://stackoverflow.com/comment/41943131
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26671115
score: 0
has text: @Ohgodwhy :- Thank you Sir for your reply, I will again check it on safari.

http://stackoverflow.com/q/26643418
linked to: http://stackoverflow.com/q/26529225
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26764206
has body: I am trying to implement jsTree and AJAX to display a dynamic file structure on a server. I have the webpage setup as &lt;div id="tree"&gt; &lt;/div&gt; My Javascript is $(document).ready(function(){ $('#tree').jstree({ 'core' : { 'data' : { 'url' : function(node) { return 'folder/?folder=' + ((node.id === '#')?'':node.id); }, 'type': 'GET', 'dataType': 'json', 'contentType':'application/json', 'data' : function (node) { return { 'id' : node.id }; } } } }); }); My Java endpoint returns a String in this JSON format. [ { "id":"ci/", "text":"ci", "parent":"#" }, { "id":"dev/", "text":"dev", "parent":"#" }, { "id":"prod/", "text":"prod", "parent":"#" } ] When I put break-points in the javascript and the Java back, I see "url" function getting called first, then "data" function and then it goes to the back-end. It returns the String, but nothing happens. My only shows "Loading..." I downloaded the jsTree from https://github.com/vakata/jstree/zipball/3.0.8 and I am including the two files from the zip &lt;script src="${pageContext.request.contextPath}/js/vendor/jstree.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.min.css"&gt; Ideally what I am trying to do is build out a folder tree structure that a user will eventually select the location for a file upload to S3. I want to lazy load the folders on click and the id will be the folder path (i.e. dev/en_US/someFolder/images/)
downvote count: 0
tagged with: javascript
has title: jsTree not rendering using AJAX
tagged with: ajax
favorite count: 0
accepted answer: http://stackoverflow.com/a/26764206
upvote count: 1
tagged with: jstree
has answer: http://stackoverflow.com/a/26643781
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/26643781

http://stackoverflow.com/comment/41899006
has text: as mentioned, both client and server are on the same machine. It is one-to-one only. As the content keeps changing within msec, it is necessary to have such refresh duration. Previously I compared the performance between setInterval and setTimeout. setInterval can achieve my requirement. Could I make SuSE remove failed connections?
comment on: http://stackoverflow.com/a/26645007
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26664441
type: Question
has comment: http://stackoverflow.com/comment/41931414
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41930865
has comment: http://stackoverflow.com/comment/41931199
linked to: http://stackoverflow.com/q/3387427
has comment: http://stackoverflow.com/comment/41931677
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to remove a div from my page once i receive an XMPHttpRequest response. I have also tried setting the display of the div to none using: document.getElementById('password').style.display = 'none'; but that didnt work either. HTML: Login Form Congratulations! You have been logged in. Javascript Function: function sendLoginInfo() { var loginRequest = new XMLHttpRequest(); loginRequest.open("POST", "server/login.php", false); loginRequest.setRequestHeader('Content-type', "application/json"); loginRequest.onreadystatechange = function () { if(loginRequest.readyState == 4 && loginRequest.status == 200) { sessionID = keyRequest.responseText; var el = document.getElementById( 'password' ); el.parentNode.removeChild( el ); } } loginRequest.send(JSON.stringify(JSONFormData)); } Update This problem was solved by changing: To:
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/26664519
has comment: http://stackoverflow.com/comment/41931143
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26664516
has comment: http://stackoverflow.com/comment/41931161
has comment: http://stackoverflow.com/comment/41931151
upvote count: 1
has comment: http://stackoverflow.com/comment/41931241
has comment: http://stackoverflow.com/comment/41931113
has comment: http://stackoverflow.com/comment/41931417
has comment: http://stackoverflow.com/comment/41931068
has comment: http://stackoverflow.com/comment/41931465
score: 1
has comment: http://stackoverflow.com/comment/41931175
has title: Remove div from page with JavaScript

http://stackoverflow.com/comment/41745803
comment on: http://stackoverflow.com/a/26557970
type: AnswerComment
type: Comment
score: 0
has text: Hope you understand what I mean. Your solution gets the dates but I have other information that I need to use returned in the JSON request. Your solution creates a new piece that is ordered properly but contains only the dates. I don't know how to include the other stuff.

http://stackoverflow.com/q/26537629
score: 0
answer count: 2
has title: How to draw button into table once using dataTable jquery
has answer: http://stackoverflow.com/a/26634657
type: UnansweredQuestion
tagged with: datatable
has body: So I am trying to add a button two each row in the table. I was able to accomplished this by doing the code below, but the button keeps generating every time i go to the next page and come back to it. It adds one button to the table every time I go between pages. I dont understand why this happening. Can someone please help me out. Thank you in advance. $('#displayTable').on('draw.dt', function () { $('.dataTable > thead > tr').append(' '); //adding button to table. $('.dataTable > tbody > tr').append(' Add to Topic '); });
has answer: http://stackoverflow.com/a/51028472
type: Question
tagged with: javascript
tagged with: jquery

recursion
type: Tag
tags question: http://stackoverflow.com/q/26567046
tags question: http://stackoverflow.com/q/26629283
tags question: http://stackoverflow.com/q/26596658
tags question: http://stackoverflow.com/q/26595562
tags question: http://stackoverflow.com/q/26592316
tags question: http://stackoverflow.com/q/26524199
tag name: recursion
tags question: http://stackoverflow.com/q/26600537
tags question: http://stackoverflow.com/q/26573148
tags question: http://stackoverflow.com/q/26549699
tags question: http://stackoverflow.com/q/26515671
tags question: http://stackoverflow.com/q/26566233
tags question: http://stackoverflow.com/q/26522783

http://stackoverflow.com/a/62553279
answers question: http://stackoverflow.com/q/26634063
score: 0
has body: You can use $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.COLUMN); method after you modify the column defs and then refesh the grid . More Details on http://ui-grid.info/docs/#!/api/ui.grid.service:uiGridConstants#properties_datachange
type: Answer

http://stackoverflow.com/comment/41763993
type: QuestionComment
comment on: http://stackoverflow.com/q/26564586
type: Comment
score: 0
has text: http://contactform7.com/checkboxes-radio-buttons-and-menus/ ... And then modify the jQuery to target the html that CF7 outputs

http://stackoverflow.com/q/26519553
has comment: http://stackoverflow.com/comment/41668587
has comment: http://stackoverflow.com/comment/41668518
type: AnsweredQuestion
type: Question
has body: I've got an Google Recaptcha it uses the Recaptcha.create. However for some reason the Recaptcha.create works locally but not on the server. Here is my html and js. HTML Waiting for input. And this is the upload-flash.js var captchaused = false; function showRecaptcha() { Recaptcha.create("6LfHYvgSAAAAAJ9G7fNYW5vwQkxUZDNSFhweiOPp", "recaptcha", { theme: "clean", callback: Recaptcha.focus_response_field}); } function fileSelected() { var file = document.getElementById('fileToUpload').files[0]; if (file) { if(captchaused === false){ captchaused = true; showRecaptcha(); } else { Recaptcha.reload(); } } } /*... and after this comes the uploading part. Removed it so that it doesn't become too long*/ Here are pictures Local Server
score: 1
has comment: http://stackoverflow.com/comment/41668571
has comment: http://stackoverflow.com/comment/41668550
has answer: http://stackoverflow.com/a/26519780
accepted answer: http://stackoverflow.com/a/26519780
has comment: http://stackoverflow.com/comment/41668470
has comment: http://stackoverflow.com/comment/41668612
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: recaptcha
favorite count: 0
has comment: http://stackoverflow.com/comment/41668628
has comment: http://stackoverflow.com/comment/41668634
has comment: http://stackoverflow.com/comment/41668465
has comment: http://stackoverflow.com/comment/41668541
has title: Recaptcha.create works locally but not on server

http://stackoverflow.com/comment/41879289
score: 1
type: QuestionComment
type: Comment
has text: Please add the language you are using as a tag.
comment on: http://stackoverflow.com/q/26635904

http://stackoverflow.com/q/26608079
accepted answer: http://stackoverflow.com/a/26609459
type: Question
score: 3
has answer: http://stackoverflow.com/a/41154413
has answer: http://stackoverflow.com/a/26609459
possible better answer: http://stackoverflow.com/a/41154413
tagged with: google-maps-api-3
linked to: http://stackoverflow.com/q/12474604
upvote count: 3
answer count: 2
tagged with: google-maps
tagged with: javascript
has title: How to change google maps Drawing Manager toolbar tooltip?
favorite count: 0
has body: I have a situation with google map drawing manager. I want to change the drawing manager toolbar default tooltip. When we move mouse over the drawing manager tool bar(moving mouse over marker,circle)we see that tooltip "Add a Marker", "Draw a circle" . I want to change the toolbar tooltip as " Add New Location " , " Draw a Area" . I use google map API version3. Is it possible to change it? Thanks in advance
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41815791
has text: Ok, I figured it out! Thanks for the tip. I realized that I had to create the controller variable in the delete action rather than in the general controller.
type: Comment
comment on: http://stackoverflow.com/a/26581487
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41928936
comment on: http://stackoverflow.com/q/26663283
score: 0
has text: Always read the documentation, if you had, you would notice that there is a data argument for `load`, and you can just do `$("#txtHint").load( "getuser.php", {q : str} );`
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26560696
downvote count: 0
has comment: http://stackoverflow.com/comment/41747861
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26560551
has body: You have 17 in funciton Random() while loop: while ((random &lt; 1 || random &gt; 17) || RandomC(ezer, random)) { random = parseInt(Math.random() * 100); } make it 16: while ((random &lt; 1 || random &gt; 16) || RandomC(ezer, random)) { random = parseInt(Math.random() * 100); } You problem is that you have 16 element from 1 to 16, and your random function gives 16 random numbers from 1 to 17, in case returned range has number 17 it lacks something from 1 to 16, which means your p element of that nubmer doesn't get filled with content.
accepted answer of: http://stackoverflow.com/q/26560551
type: AcceptedAnswer

http://stackoverflow.com/comment/41820761
type: QuestionComment
has text: @hindmost: Care to provide an alternative? OP isn't trying to calculate the result. He's validating the expression.
comment on: http://stackoverflow.com/q/26603795
score: 0
type: Comment

http://stackoverflow.com/q/26666054
has comment: http://stackoverflow.com/comment/41933858
upvote count: 1
answer count: 1
has body: I can't figure this out for the life of me. Jquery keeps closing the form that I create (instead of ... ... it creates ... I've looked at lots of questions regarding this and each suggestion is to use an intermediate string, which I am. Hopefully someone can pick up on something I'm missing :) var my_table = $("#output_table").find("tbody"); // Loop over JSON data and create table rows $.each(json.data, function(index, field) { var html_string = " " + " " + " " + " " + " " + " " + field.instructor + " " + " " + field.section + " " + " " + field.start_time + " - " + field.end_time + " " + " " + field.weekdays + " " + " " + field.total + "/" + field.capacity + " "; if (field.open) { html_string += " "; } else { html_string += " "; } html_string += " "; my_table.find('tr:last').after(html_string); }); I've tried removing and from the string entirely and adding it at the end with: my_table.append(" " + html_string + " "); but I get the same effect. So confused!
has comment: http://stackoverflow.com/comment/41933973
has title: JQuery append is closing form tags
tagged with: forms
has answer: http://stackoverflow.com/a/26666118
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41933837
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26666118

http://stackoverflow.com/q/26614646
answer count: 1
has comment: http://stackoverflow.com/comment/41840765
type: UnansweredQuestion
has title: How can I pause a jQuery .each() loop, while waiting for user input?
tagged with: php
has comment: http://stackoverflow.com/comment/41840729
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I'm having trouble getting a jQuery .each loop to wait for user input, before continuing iterating. Here is my code (I've commented with what I would like to happen): <?php include_once 'common_components.php'; $query = $dbh->query("SELECT movies_dir FROM settings"); $row = $query->fetch(PDO::FETCH_ASSOC); date_default_timezone_set('UTC'); echo " Movie Scanner "; ?> Essentially, the 'files' variable contains a JSON array of file paths. for each index in the array, the Search_file function is run on that path, which should display a list of search results for that file - calling & displaying the search_file.php page. When the user clicks on any of those results in the displayed list, it should attempt to insert (via the InsertIntoDB Function, which calls the update_movie.php file) a record into the database. If that insert is successful (update_movie returns 0) (or the EnterManually function is triggered) then the functions should all exit, and the .each loop should move onto the next iteration, starting the whole process off again. If that insert function is not successful (so update_movie will return 1), then nothing should happen - the .each loop should not increment. Instead, we should wait for the user to click on another result. At the moment, I cannot get the .each loop to wait until the user has clicked on a result, it just keeps incrementing straight until the last item in the loop.
score: 0
has answer: http://stackoverflow.com/a/26614890
tagged with: sqlite

http://stackoverflow.com/q/26641056
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26641179
accepted answer: http://stackoverflow.com/a/26642499
has answer: http://stackoverflow.com/a/26641179
has body: So I have a table that i'm able to add a new row. If I manually type in the quantity and the price, the total is calculated using this javascript code. function addRow() { addTableRow($('.table tbody')); } function removeRow() { var par = $(this).parent().parent(); var tableSize = $('.table tbody tr').length; if(tableSize == '1'){ alert('You must have one row'); return false; } par.remove(); }; function calculateRow() { var par = $(this).parent().parent(); var price = $(par).find('.price').val(); var qty = $(par).find('.qty').val(); var total = price*qty; $(par).find('.total').val(total.toFixed('2')); } $('.table tbody').on("click", ".removeRow", removeRow); $('.table tbody').on("blur", ".qty", calculateRow); function addTableRow(table) { $(table).append( " " + " " + " " + " " + " " + " " + " " + " "); auto(); } Now I've added Jquery UI AutoSuggest to my table and made it so I was able to fill the item number, item name, item quantity, and item price all by choosing a product. Using the javascript below: function auto() { var ac_config = { source: "/admin/items/fetch_items", select: function(event, ui){ var item = ui.item; if(item) { $(".id").val(item.id); $(".price").val(item.price); $(".qty").val('1'); var par = $(".qty").parent().parent(); var price = $(par).find('.price').val(); var qty = $(par).find('.qty').val(); var total = price*qty; $(par).find('.total').val(total.toFixed('2')); } }, minLength: 1, }; $(".search").autocomplete(ac_config); } Now as you can see, I am needing to calculate the row total and fill it. As the code sits above, the initial row that is by default made by html is calculated correctly. But once I add a new row and try to autofill it and calculate the total, the first row changes along with the new row I just added. How do I get the javascript to run on the row I just autofilled with the jQuery UI?
score: 0
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/41890589
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
has title: Calculating Table Rows
has comment: http://stackoverflow.com/comment/41890290
type: Question
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/26642499
answer count: 2

http://stackoverflow.com/comment/41945319
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26672634
has text: Thank you! This was the problem exactly. Thanks that you have found the moved question ;-)
type: AnswerComment

ajax
tags question: http://stackoverflow.com/q/26666427
tags question: http://stackoverflow.com/q/26672503
tags question: http://stackoverflow.com/q/26541265
tags question: http://stackoverflow.com/q/26639117
tags question: http://stackoverflow.com/q/26634882
tags question: http://stackoverflow.com/q/26558903
tags question: http://stackoverflow.com/q/26663369
tags question: http://stackoverflow.com/q/26559446
tags question: http://stackoverflow.com/q/26630598
tags question: http://stackoverflow.com/q/26549740
tags question: http://stackoverflow.com/q/26554683
tags question: http://stackoverflow.com/q/26523221
tags question: http://stackoverflow.com/q/26653160
tags question: http://stackoverflow.com/q/26592104
tags question: http://stackoverflow.com/q/26665559
tags question: http://stackoverflow.com/q/26622343
tags question: http://stackoverflow.com/q/26650471
tags question: http://stackoverflow.com/q/26583274
tags question: http://stackoverflow.com/q/26530503
tags question: http://stackoverflow.com/q/26611942
tags question: http://stackoverflow.com/q/26628298
tags question: http://stackoverflow.com/q/26593633
tags question: http://stackoverflow.com/q/26659418
tags question: http://stackoverflow.com/q/26626138
tags question: http://stackoverflow.com/q/26587075
tags question: http://stackoverflow.com/q/26612998
tags question: http://stackoverflow.com/q/26514695
tags question: http://stackoverflow.com/q/26597112
tags question: http://stackoverflow.com/q/26553831
tags question: http://stackoverflow.com/q/26654937
tags question: http://stackoverflow.com/q/26551337
tags question: http://stackoverflow.com/q/26596216
tags question: http://stackoverflow.com/q/26589492
tags question: http://stackoverflow.com/q/26567902
tags question: http://stackoverflow.com/q/26587400
tags question: http://stackoverflow.com/q/26652434
tags question: http://stackoverflow.com/q/26668290
tags question: http://stackoverflow.com/q/26549888
tags question: http://stackoverflow.com/q/26564148
tags question: http://stackoverflow.com/q/26577798
tags question: http://stackoverflow.com/q/26521341
tags question: http://stackoverflow.com/q/26570993
tags question: http://stackoverflow.com/q/26536981
tags question: http://stackoverflow.com/q/26672098
tags question: http://stackoverflow.com/q/26637563
tags question: http://stackoverflow.com/q/26659292
tags question: http://stackoverflow.com/q/26549509
type: Tag
tags question: http://stackoverflow.com/q/26528918
tags question: http://stackoverflow.com/q/26588963
tags question: http://stackoverflow.com/q/26634850
tags question: http://stackoverflow.com/q/26563787
tags question: http://stackoverflow.com/q/26629000
tags question: http://stackoverflow.com/q/26588853
tags question: http://stackoverflow.com/q/26606568
tags question: http://stackoverflow.com/q/26666215
tags question: http://stackoverflow.com/q/26579844
tags question: http://stackoverflow.com/q/26564763
tags question: http://stackoverflow.com/q/26541146
tags question: http://stackoverflow.com/q/26614053
tags question: http://stackoverflow.com/q/26614646
tags question: http://stackoverflow.com/q/26668557
tags question: http://stackoverflow.com/q/26594454
tags question: http://stackoverflow.com/q/26568496
tags question: http://stackoverflow.com/q/26534611
tags question: http://stackoverflow.com/q/26584494
tags question: http://stackoverflow.com/q/26616850
tags question: http://stackoverflow.com/q/26643418
tags question: http://stackoverflow.com/q/26632130
tags question: http://stackoverflow.com/q/26629394
tags question: http://stackoverflow.com/q/26657954
tags question: http://stackoverflow.com/q/26563214
tags question: http://stackoverflow.com/q/26663283
tags question: http://stackoverflow.com/q/26594161
tags question: http://stackoverflow.com/q/26572530
tags question: http://stackoverflow.com/q/26643321
tags question: http://stackoverflow.com/q/26593539
tags question: http://stackoverflow.com/q/26602063
tags question: http://stackoverflow.com/q/26538309
tags question: http://stackoverflow.com/q/26604712

http://stackoverflow.com/q/26517474
has answer: http://stackoverflow.com/a/26517628
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26517628
has title: Add class "copyMe" and enable button, apply the same behavior for checkboxes
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 2
has body: I've a code where I add a class copyMe and also toggle button enabled if at least one of the checkboxes is changed (checked/unchecked), this is the code behind that behavior: // Enable button #btnAplicarNorma and add copyMe class when any of the checkbox changes $('#resultadoNormaBody').on('change', 'input[type=checkbox]', function () { var $my_checkbox = $(this); var $my_tr = $my_checkbox.closest('tr'); if ($my_checkbox.prop('checked')) { $my_tr.addClass('copyMe'); } var $all_checkboxes = $my_checkbox.closest('tbody').find('input[type=checkbox]'); $all_checkboxes.each(function () { if ($(this).prop('checked')) { $('#btnAplicarNorma').prop('disabled', false); return false; } $('#btnAplicarNorma').prop('disabled', true); }); }); Now I'm trying to apply the same behavior but this time for a checkbox that toggle all checkboxes and I'm doing something wrong since I don't get any set of matches elements on $all_checkboxes var. This is the code I'm trying for this one: // Enable button #btnAplicarNorma and add copyMe class when #toggleCheckboxNorma changes $('#resultadoNorma').on('change', '#toggleCheckboxNorma', function () { var $my_checkbox = $(this); var $all_checkboxes = $my_checkbox.closest('tbody').find('input[type=checkbox]'); console.log($my_checkbox); console.log($all_checkboxes); $all_checkboxes.each(function () { if ($(this).prop('checked')) { $(this).closest('tr').addClass('copyMe'); $('#btnAplicarNorma').prop('disabled', false); return false; } $(this).closest('tr').removeClass('copyMe'); $('#btnAplicarNorma').prop('disabled', true); }); }); I tried also changing this line: var $all_checkboxes = $my_checkbox.closest('tbody').find('input[type=checkbox]'); to this: var $all_checkboxes = $('#resultadoNorma').closest('tbody').find('input[type=checkbox]'); But I got the same, so the idea is when I change #toggleCheckboxNorma all the tr should get the class copyMe and also #btnAplicarNorma should be enable if it's the contrary I should go back and remove the class…
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/41742610
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26553209
has text: Well I added the 'else if' statement to perform a check against 'target2' but it doesn't seem to recognise that as a parameter?

http://stackoverflow.com/q/26574307
has comment: http://stackoverflow.com/comment/41766286
has answer: http://stackoverflow.com/a/26574369
has answer: http://stackoverflow.com/a/26574647
has answer: http://stackoverflow.com/a/26574530
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6938248
tagged with: php
has body: I want to know how can i add html element before some elements and after e.g: this is code which i added in real file . so how can i show it like this ( using javascript );
type: Question
has title: Using javascript to add before and after
tagged with: javascript
tagged with: replace
score: 0
answer count: 3

http://stackoverflow.com/comment/41816793
comment on: http://stackoverflow.com/q/26601331
score: 0
type: Comment
type: QuestionComment
has text: fixed the errors, still not working

http://stackoverflow.com/q/26533958
score: 3
linked to: http://stackoverflow.com/q/26434635
linked to: http://stackoverflow.com/q/4912765
answer count: 2
linked to: http://stackoverflow.com/q/3680429
has comment: http://stackoverflow.com/comment/41694932
downvote count: 0
has body: In CSS, .someclass { text-transform: uppercase } translates all text with class someclass to uppercase, but when I select the text, copy, and paste into a text editor or e-mail, the letters retain their original case. But CSS doesn't support transformations other than letter case as defined in Unicode. Comments and answers to my previous question Display one letter as another in page while copying untransformed text recommended to suck it up and use JavaScript because it cannot be done with CSS alone. (This would require some conspicuous notification that scripts have not been applied, such as CSS that gets hidden when script runs.) In JavaScript without Flash, how would I substitute characters in all text nodes, but have the clipboard and search not reflect the transformation? For example, I might want to change r to w, such that ruby wings is displayed as wuby wings, but selecting the text, copying it, and pasting it into Notepad produces ruby wings, and Ctrl+F ruby finds this. I would store the original text somewhere, trap copy events, count characters in the selected text, and copy the same range from the original text. But that doesn't help with Ctrl+F. And answers to How to copy to the clipboard in JavaScript? recommend the use of Zero Clipboard, which relies on Adobe Flash Player, which is not installed on mobile or libre browsers. Besides, oncopy is nonstandard as of this writing. Or must I also suck it up and use Flash and then have copy and find misbehave without Flash?
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41694703
has answer: http://stackoverflow.com/a/41294948
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41694073
has answer: http://stackoverflow.com/a/26803515
linked to: http://stackoverflow.com/q/10730309
has title: Replace letters in text while copying untransformed text
linked to: http://stackoverflow.com/q/400212
type: Question

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

http://stackoverflow.com/a/26568740
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26561730
answers question: http://stackoverflow.com/q/26561730
type: Answer
upvote count: 1
has body: Yes, your code is working exactly as it is set to do. You are passing two parameters into the callback: first, a reference to your JSAPI instance shared_from_this() and second prog. If you want to pass only one parameter, only provide one parameter: m_onProgress-&gt;InvokeAsync("", FB::variant_list_of(prog));
score: 1

http://stackoverflow.com/comment/41883495
comment on: http://stackoverflow.com/q/26637578
has text: @ViniciusPinto I posted a jsfiddle that you can view on iOS Safari
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41740967
has text: Has my answer worked for you?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26555843
type: QuestionComment

xmlhttprequest
tags question: http://stackoverflow.com/q/26586454
tags question: http://stackoverflow.com/q/26650809
tags question: http://stackoverflow.com/q/26646270
tags question: http://stackoverflow.com/q/26637722
tag name: xmlhttprequest
tags question: http://stackoverflow.com/q/26622343
type: Tag
tags question: http://stackoverflow.com/q/26563787
tags question: http://stackoverflow.com/q/26525903
tags question: http://stackoverflow.com/q/26661749
tags question: http://stackoverflow.com/q/26618986
tags question: http://stackoverflow.com/q/26600705
tags question: http://stackoverflow.com/q/26579448

http://stackoverflow.com/comment/41736324
type: AnswerComment
has text: Does that only happen on click? This needs to happen once the datatable has been populated, and for every row in the table that has an Outcome of "Fail" the whole row needs to be highlighted.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26557514

http://stackoverflow.com/q/26606183
possible better answer: http://stackoverflow.com/a/26606240
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26606272
answer count: 4
has answer: http://stackoverflow.com/a/26606353
score: 4
has answer: http://stackoverflow.com/a/26606254
accepted answer: http://stackoverflow.com/a/26606272
has comment: http://stackoverflow.com/comment/41824968
downvote count: 1
upvote count: 5
tagged with: javascript
has body: I have the following JS code: &lt;script&gt; first(); second(); &lt;/script&gt; I want to make sure that second() will run after complete execution of first(). Is that the expected default behavior?
has answer: http://stackoverflow.com/a/26606240
has title: Are javascript functions synchronous or async?
type: AnsweredQuestion

http://stackoverflow.com/q/26574938
has title: HTML5 Storage Not working
has body: I am working on forwarding data from the current page to the same next page i.e. whenever the page is loaded again, the code checks if there is any such storage, if it is then it loads the values in text box. I am not able to get it to work Below is the code - Please Enter Your Full Name = Please Enter Your Current Organization Kindly help me as to why this is not working?
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26574976
linked to: http://stackoverflow.com/q/2010892
tagged with: local-storage
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41767559
score: -1
accepted answer: http://stackoverflow.com/a/26574976

http://stackoverflow.com/comment/41862543
comment on: http://stackoverflow.com/a/26626531
has text: +1 for Response. Please have a look at updated question.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41748048
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26536550
has text: I've decided to take the random out of the mix, and in doing so, have negated the unwanted Chrome effect. I'll swap background images now and then manually. Yes, I'm admitting defeat here, but will reinstitute the above when Chrome decides it's worth their time to join the other browsers. Probably be waiting a while...

javascript
tags question: http://stackoverflow.com/q/26576581
tags question: http://stackoverflow.com/q/26514734
tags question: http://stackoverflow.com/q/26660586
tags question: http://stackoverflow.com/q/26634168
tags question: http://stackoverflow.com/q/26519553
tags question: http://stackoverflow.com/q/26631733
tags question: http://stackoverflow.com/q/26611511
tags question: http://stackoverflow.com/q/26614580
tags question: http://stackoverflow.com/q/26516910
tags question: http://stackoverflow.com/q/26567887
tags question: http://stackoverflow.com/q/26623150
tags question: http://stackoverflow.com/q/26579125
tags question: http://stackoverflow.com/q/26591197
tags question: http://stackoverflow.com/q/26646610
tags question: http://stackoverflow.com/q/26645656
tags question: http://stackoverflow.com/q/26615184
tags question: http://stackoverflow.com/q/26544102
tags question: http://stackoverflow.com/q/26631022
tags question: http://stackoverflow.com/q/26522252
tags question: http://stackoverflow.com/q/26547174
tags question: http://stackoverflow.com/q/26541428
tags question: http://stackoverflow.com/q/26625488
tags question: http://stackoverflow.com/q/26552742
tags question: http://stackoverflow.com/q/26645120
tags question: http://stackoverflow.com/q/26611773
tags question: http://stackoverflow.com/q/26605549
tags question: http://stackoverflow.com/q/26538871
tags question: http://stackoverflow.com/q/26630767
tags question: http://stackoverflow.com/q/26601915
tags question: http://stackoverflow.com/q/26558137
tags question: http://stackoverflow.com/q/26561857
tags question: http://stackoverflow.com/q/26593165
tags question: http://stackoverflow.com/q/26598473
tags question: http://stackoverflow.com/q/26551489
tags question: http://stackoverflow.com/q/26626746
tags question: http://stackoverflow.com/q/26557655
tags question: http://stackoverflow.com/q/26525516
tags question: http://stackoverflow.com/q/26563943
tags question: http://stackoverflow.com/q/26555908
tags question: http://stackoverflow.com/q/26648979
tags question: http://stackoverflow.com/q/26596835
tags question: http://stackoverflow.com/q/26529359
tags question: http://stackoverflow.com/q/26612065
tags question: http://stackoverflow.com/q/26580397
tags question: http://stackoverflow.com/q/26613271
tags question: http://stackoverflow.com/q/26564146
tags question: http://stackoverflow.com/q/26616024
tags question: http://stackoverflow.com/q/26636242
tags question: http://stackoverflow.com/q/26624633
tags question: http://stackoverflow.com/q/26664456
tags question: http://stackoverflow.com/q/26540823
tags question: http://stackoverflow.com/q/26628421
tags question: http://stackoverflow.com/q/26572094
tags question: http://stackoverflow.com/q/26658926
tags question: http://stackoverflow.com/q/26526515
tags question: http://stackoverflow.com/q/26573810
tags question: http://stackoverflow.com/q/26594174
tags question: http://stackoverflow.com/q/26513905
tags question: http://stackoverflow.com/q/26536510
tags question: http://stackoverflow.com/q/26631834
tags question: http://stackoverflow.com/q/26624527
tags question: http://stackoverflow.com/q/26532367
tags question: http://stackoverflow.com/q/26588300
tags question: http://stackoverflow.com/q/26618554
tags question: http://stackoverflow.com/q/26615706
tags question: http://stackoverflow.com/q/26607366
tags question: http://stackoverflow.com/q/26574454
tags question: http://stackoverflow.com/q/26522437
tags question: http://stackoverflow.com/q/26627785
tags question: http://stackoverflow.com/q/26578789
tags question: http://stackoverflow.com/q/26606183
tags question: http://stackoverflow.com/q/26552012
tags question: http://stackoverflow.com/q/26592535
tags question: http://stackoverflow.com/q/26667568
tags question: http://stackoverflow.com/q/26548295
tags question: http://stackoverflow.com/q/26514580
tags question: http://stackoverflow.com/q/26534679
tags question: http://stackoverflow.com/q/26630296
tags question: http://stackoverflow.com/q/26670748
tags question: http://stackoverflow.com/q/26633541

http://stackoverflow.com/q/26611380
possible better answer: http://stackoverflow.com/a/26611530
has comment: http://stackoverflow.com/comment/41834778
has answer: http://stackoverflow.com/a/26611530
has answer: http://stackoverflow.com/a/26611615
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41834641
tagged with: http://stackoverflow.com/tag/html
type: Question
has title: Scroll function does not fire an animation properly
has comment: http://stackoverflow.com/comment/41834680
has answer: http://stackoverflow.com/a/26611623
score: 0
answer count: 3
tagged with: scroll
has comment: http://stackoverflow.com/comment/41834759
has comment: http://stackoverflow.com/comment/41834836
has comment: http://stackoverflow.com/comment/41834790
has comment: http://stackoverflow.com/comment/41834912
has body: I do have a simple .scroll() function to fire an event, if the .scrollTop() of the body is higher than a specific value: $(window).scroll(function() { if($('body, html').scrollTop() &gt; 250) { console.log("higher"); $('#navbar').animate({paddingTop: 5, paddingBottom: 5}, 'slow'); } else { console.log("lower"); $('#navbar').animate({paddingTop: 25, paddingBottom: 25}, 'slow'); } }); Problem I have is, that it fires the function for every scrolling pixel. I just want to fire the animation depending on the scrollTop value. How can I solve this the best way? Thanks
accepted answer: http://stackoverflow.com/a/26611623
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41945991
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26672503
has text: Yes, basic idea is like this.
score: 0

http://stackoverflow.com/a/65625575
score: 3
accepted answer of: http://stackoverflow.com/q/26532428
answers question: http://stackoverflow.com/q/26532428
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/116029340
type: Answer
downvote count: 0
has body: terminal based chat application using socket.io and readline Server : var app = require('express')(); var http = require('http').createServer(app); var io = require('socket.io')(http); io.on('connection', (socket) => { console.log('a user connected'); socket.on('disconnect', () => { console.log('user disconnected'); }); let eventName = 'simple chat message'; let broadcast = (msg) => socket.broadcast.emit(eventName, msg); socket.on(eventName, (msg, ackFn) => { console.log('message: ' + msg); // broadcast to other clients after 1.5 seconds setTimeout(broadcast, 1500, msg); }); }); http.listen(3000, () => { console.log('listening on *:3000'); }); Server opens connection on http://localhost:3000 Receive messages from client and broadcast to other client Client : const io = require("socket.io-client"); const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question('What\'s your name ? ', (name) => { const socket = io('http://localhost:3000'); const sendMsg = () => { rl.question('> ', (reply) => { console.log(`Sending message: ${reply}`); socket.emit('simple chat message', `${name} says ${reply}`); sendMsg(); }); } socket.on('connect', () => { console.log('Sucessfully connected to server.'); sendMsg(); }); socket.on('simple chat message', (message) => { console.log(message); }); socket.on('disconnect', () => { console.log('Connection lost...') }); }); Read text from terminal using rl.question()and send it to server using socket.emit() send msg() is called recursively to read text from terminal and send it to server socket.on() is used to receive messages from other clients

http://stackoverflow.com/comment/41850571
type: QuestionComment
comment on: http://stackoverflow.com/q/26619852
has text: Does this address your problem: http://stackoverflow.com/a/4331218/82548 (the way you describe your problem, it certainly *sounds* like you're looking for a [Cartesian product](http://en.wikipedia.org/wiki/Cartesian_product))?
score: 1
type: Comment

http://stackoverflow.com/comment/41922905
score: 2
comment on: http://stackoverflow.com/q/26660377
has text: Can you post the code where you are testing it in JavaScript?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26610879
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26610304
answers question: http://stackoverflow.com/q/26610304
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41834859
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41833831
has body: First, let me tell you this is a horrible solution. Listening to every scroll event and calling addClass() or removeClass() every time is expensive. // end preach Here's the answer to your question anyway: var baseHeight = $(window).height(); // for body, use $("body").height(); var num = .25; // this the percentage of vertical scroll $(window).bind('scroll', function () { if ($(window).scrollTop() / baseHeight &gt; num) { $('.menu').addClass('fixed'); } else { $('.menu').removeClass('fixed'); } });

http://stackoverflow.com/q/26563214
score: 1
upvote count: 1
type: Question
has title: Load page Ajax and then slide it into page OR plugin
has answer: http://stackoverflow.com/a/26563531
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41746370
answer count: 1
has body: My site structure is more or less this: HOME - PAGE1 - PAGE2 - PAGE3. What I would realize is a site with transition like "a mobile app" between pages, where you click on a button then the new page slide in. Now I'm looking on how to realize that, if using AJAX (that load the page and slide it but I don't know AJAX) or use a plugin (but I can't find anything). Another alternative is create a single page and then moving into that (would be great find a plugin to do that) but the pages are big so my site will became heavy. Does anyone have an idea how help me? Thanks guys! ps: the site is developed ONLY for tablet and smartphones
accepted answer: http://stackoverflow.com/a/26563531
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41746351
has comment: http://stackoverflow.com/comment/41746330
tagged with: slider
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/43254714
type: QuestionComment
comment on: http://stackoverflow.com/q/26534969
type: Comment
has text: Hi I'm having what I believe to be the same issue, can you elaborate on what you did to solve this?
score: 0

http://stackoverflow.com/q/26573811
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26574050
score: -4
tagged with: local-storage
type: Question
has body: I need to save a div with localstorage. When i press a button the div becomes visible but when i close the browser and open it again the div needs to be visible. This is my code so far: &lt;script&gt; function openDiv() { var film = document.getElementById("bookingDiv"); if(film.style.display == "none"){ film.style.display = "block"; } } function save() { openDiv() var saveDiv = document.getElementById("bookingDiv") if(saveDiv.style.display == "block"){ localstorage.setItem("text", saveDiv) } } function load() { var loadDiv = localstorage.getItem("text") if(loadDiv){ document.getElementById("bookingDiv") = loadDiv } } &lt;/script&gt; &lt;body onload="load()"&gt; &lt;input type="button" id="testButton" value="Save" onclick="save()" /&gt; &lt;div style="display:none" id="bookingDiv" type="text"&gt; hello &lt;/div&gt; &lt;/body&gt;
tagged with: javascript
downvote count: 4
has title: localstorage how to save a div
upvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/41861568
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26619092
has text: @dandavis: If I simply rename a file that already works to contain a space in its name, I get an error when reading it. Renaming it to a "valid" file name again makes it work again. So locking and deleting are not the subject of the problem. Regarding your point about the dataURL: I know that it doesn't simply rely on the file name to access the file, but what is directly affected by a change of the file name is also the path. Therefore, when the file name is affected by the URL encoding, it results in an invalid path, causing the file not found error :(
score: 0

http://stackoverflow.com/q/26598776
has comment: http://stackoverflow.com/comment/41863242
tagged with: toolbar
has comment: http://stackoverflow.com/comment/41886762
has body: I have multiple toolbars defined and the default toolbar is currently MyToolbar as defined via config.toolbar = 'MyToolbar'; But how can I choose any of these configurations on pageload? I tried $('#TextBox1').ckeditor(function () { }, { toolbar: 'Basic' }); As suggested here Configure the toolbar when the editor is configured through jQuery But that does not override the default MyToolbar. I also tried removing config.toolbar = 'MyToolbar'; but without luck. I'm getting Uncaught TypeError: undefined is not a function in the console, but I don't know why. I currently have this code which shows a default CKEditor instance: &lt;script src="/ckeditor/ckeditor.js"&gt;&lt;/script&gt; &lt;asp:TextBox ID="TextBox1" ClientIDMode="Static" CssClass="ckeditor" TextMode="MultiLine" runat="server"&gt;&lt;/asp:TextBox&gt; config.js CKEDITOR.editorConfig = function (config) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'document', items: ['NewPage', 'Preview'] }, { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] }, { name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll', '-', 'Scayt'] }, { name: 'insert', items: ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak' , 'Iframe'] }, '/', { name: 'styles', items: ['Styles', 'Format'] }, { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] }, { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote'] }, { name: 'links', items: ['Link', 'Unlink', 'Anchor'] }, { name: 'tools', items: ['Maximize', '-', 'About'] } ]; config.toolbar_Full = [ { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'DocProps', 'Preview', 'Print', '-', 'Templates'] }, { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] }, { name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker', 'Scayt'] }, { …
score: 2
has comment: http://stackoverflow.com/comment/41887483
answer count: 0
downvote count: 0
type: UnansweredQuestion
has title: Setting CKEditor toolbar configuration on pageload results in Uncaught TypeError: undefined is not a function
has comment: http://stackoverflow.com/comment/41900953
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/6962488
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/47425260
has text: What happens on this line? var compute = require('./hamming').compute;
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26641136
score: 2

http://stackoverflow.com/q/26653337
has answer: http://stackoverflow.com/a/26653415
tagged with: http://stackoverflow.com/tag/html
has body: I have div like : MY DIV 1 MY DIV 2 MY DIV 3 MY DIV 4 MY DIV 5 MY DIV 6 So with this i have 6 div with horizontal align on the same line. I want to break line after the second div, and after the fourth, i want : My DIV 1 My DIV 2 My DIV 3 My DIV 4 My DIV 5 My DIV 6 Any ideas ?
downvote count: 0
accepted answer: http://stackoverflow.com/a/26653396
favorite count: 0
has answer: http://stackoverflow.com/a/26653414
tagged with: css
has comment: http://stackoverflow.com/comment/41909723
possible better answer: http://stackoverflow.com/a/26653414
answer count: 4
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: Css break after specific div inline-block
has answer: http://stackoverflow.com/a/26660809
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26653396

http://stackoverflow.com/comment/41733439
comment on: http://stackoverflow.com/q/26555739
type: Comment
type: QuestionComment
has text: Because `geocoder.geocode` doesn't return a value. Related questions: http://stackoverflow.com/q/14220321/218196, http://stackoverflow.com/q/23667086/218196
score: 0

http://stackoverflow.com/comment/41812151
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26596586
type: QuestionComment
has text: You're trying to update the colours outside of the q.awaitAll function. That means that the sampleSVG.select(...) line will be run before the shapes exist in the DOM. Try moving it inside the q.awaitAll function, like in http://jsfiddle.net/hk367c5q/ and you should be OK.

http://stackoverflow.com/comment/41790778
type: QuestionComment
comment on: http://stackoverflow.com/q/26587862
has text: thanks @user3087839 do you have some sample code?
score: 0
type: Comment

http://stackoverflow.com/q/26539309
tagged with: lodash
score: 3
upvote count: 3
tagged with: extend
type: Question
tagged with: object
tagged with: javascript
has title: How to extend object with Lo-Dash?
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26540807
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: I have trouble merging two objects using Lo-Dash and don't understand why below code doesn't work. I would expect _merge call to extend bbb with fnaaa, this doesn't happen however. my={}; my.aaa=function() {} my.aaa.prototype.fnaaa=function() {} bbb={fnbbb:function() {}} _.merge(bbb,new my.aaa()); jQuery $.extend does work and if I run code below it extends bbb as expected: my={}; my.aaa=function() {} my.aaa.prototype.fnaaa=function() {} bbb={fnbbb:function() {}} $.extend(bbb,new my.aaa()); Why is it happening and how to do the same with Lo-Dash? EDIT: is it because fnaaa is not enumerable? If so how to solve it?

http://stackoverflow.com/comment/41816144
has text: I commented the attributes inside my div and used the style class scrollable as above by pasting the code. Then I also commented my JS code that cointains all keyup and down events, now I see two scrollbars :D lol Well All my exiting features broken, as in row doesn't selects on arrow keydown events
type: AnswerComment
comment on: http://stackoverflow.com/a/26582215
score: 0
type: Comment

http://stackoverflow.com/a/26565632
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26565564
has body: Just bind the click event and pass function referene. Try this.. $('.nav-tabs &gt; li').click(getDate)

http://stackoverflow.com/comment/41865623
score: 0
has text: Im using Angular Translate in part of the project, the static part. But this app, needs to be connected to several sites and load different translations files from each site using web services. So the translation are dynamic and can change several times, is also possible that one site has one file translation for english, and other sites have different translations for English. I didn't find a way to get it working using Angular Translate, because the translations has to be setted in the start of the app, but the web services that I call to get the translations has to be called after that.
type: AnswerComment
comment on: http://stackoverflow.com/a/26626634
type: Comment

http://stackoverflow.com/comment/41750922
type: QuestionComment
type: Comment
has text: Ugh, I'm so dumb. That's probably what I get for testing in jsfiddle and not a real IDE. Thanks, guys!
score: 0
comment on: http://stackoverflow.com/q/26565688

http://stackoverflow.com/comment/41808459
has text: Any input that is not defined on the object literal will return `undefined`. Since the input comes directly from `Object.prototype.toString`, there is a predefined set of returned values; `[object Array]`, `[object String]`, etc., that can be present. I could also add a check for 'undefined' before returning the encoded type, which I may in fact do. ;) I may also move the object declaration outside the function, but this was a clean way to present it for consumption. Thanks much for the suggestions.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26596650

http://stackoverflow.com/a/26523677
has comment: http://stackoverflow.com/comment/41690271
answers question: http://stackoverflow.com/q/26523597
type: Answer
has comment: http://stackoverflow.com/comment/41675596
score: 2
has comment: http://stackoverflow.com/comment/41690329
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41675650
has body: Try this: var buildHtml = function(id) { console.log(id); var html; switch (id) { case 'gluten': html = ' This is why gluten sucks ';break; case 'dairy': html = ' This is why dairy sucks ';break; case 'soy': html = ' This is why soy sucks ';break; case 'gmo': html = ' This is why gmo sucks ';break; case 'preservatives': html = ' This is why preservatives suck ';break; case 'fillers': html = ' This is why fillers suck ';break; case 'sugars': html = ' This is why sugars suck ';break; } return html; }; You are not closing your Tags, and you missed the break Part in every Switch Statement. If you dont Break the case, every following case gets executed to. Stupid behaviour if you ask me... On Information why it can be useful not to have a break read this

http://stackoverflow.com/a/26547804
upvote count: 2
type: Answer
score: 2
has body: You could simply; var i = a.indexOf("|"); a = [a.substr(a, i), a.substr(i + 1)]; &gt;&gt; ['cat', 'bird|cow']
downvote count: 0
answers question: http://stackoverflow.com/q/26547667

modal-dialog
tags question: http://stackoverflow.com/q/26640647
tag name: modal-dialog
tags question: http://stackoverflow.com/q/26620196
tags question: http://stackoverflow.com/q/26637077
type: Tag
tags question: http://stackoverflow.com/q/26556921
tags question: http://stackoverflow.com/q/26623702
tags question: http://stackoverflow.com/q/26536431
tags question: http://stackoverflow.com/q/26524388
tags question: http://stackoverflow.com/q/26643658
tags question: http://stackoverflow.com/q/26640872
tags question: http://stackoverflow.com/q/26655686
tags question: http://stackoverflow.com/q/26623493

http://stackoverflow.com/comment/41901352
comment on: http://stackoverflow.com/a/26647845
type: AnswerComment
score: 0
type: Comment
has text: so type document.getElementById('txtFName').value = '' in console, if it is working in console, it should be in JS as well

http://stackoverflow.com/comment/41910938
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26653951
has text: It is function in all the browsers but some of them don't support it
score: 0

http://stackoverflow.com/q/26536318
has body: I have an inline video embedded in the home page of a cordova (phonegap) app for iOS. I have added the necessary allow setting to the config.xml &lt;preference name="AllowInlineMediaPlayback" value="true" /&gt; and the the video html looks like this &lt;video webkit-playsinline poster="img/videoplaceholder.png" loop class="video" autoplay="autoplay"&gt; &lt;source src="media/homepage.iphone.mp4"/&gt; &lt;/video&gt; When the app first launches the video plays inline and works perfectly. But if I navigate away from the homepage and then return, the video opens full screen on page load. I have tried moving the video lower in the page to test if it was because the browser was focusing on page load. I have also tried removing autoplay and delay triggering play with JS. I have tested all of the above in iOS7 and iOS8 only as those are my targeted versions. Any suggestion? Thank you in advance.
score: 4
tagged with: html5-video
type: Question
upvote count: 4
answer count: 1
downvote count: 0
tagged with: ios
tagged with: javascript
has comment: http://stackoverflow.com/comment/41712590
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41705402
has comment: http://stackoverflow.com/comment/41711224
tagged with: cordova
has comment: http://stackoverflow.com/comment/41710953
has answer: http://stackoverflow.com/a/26763658
type: UnansweredQuestion
has title: webkit-playsinline stops working when returning to page in cordova iOS app

http://stackoverflow.com/q/26542562
has comment: http://stackoverflow.com/comment/82632872
has title: Rotating an embedded pdf in html5
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/76812123
tagged with: css
score: 3
upvote count: 3
has body: I am displaying a pdf in a webpage using html5 and css3: &lt;embed class="pdf" src="/files/test.pdf" type="application/pdf"&gt; The actual file varies depending on selections and user uploads on the webpage, but given the context I know that in the majority of cases, the user is going to have to rotate the pdf to makes sense of it. This is generally easy to do manually by right-clicking and selecting "rotate". However, since I know it is necessary, I want to present them rotated. The only way I have found so far is to use a css transform, but this also rotates the menu and scrollbar, which I don't want. Is there any way, using css or javascript, to tell the browser to apply rotation to the embedded pdf? I mainly need this to work on Chrome, so a browser-specific solution is fine.
has answer: http://stackoverflow.com/a/31692551
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41879788
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26631594
has text: Hmm. Without realizing it, I may have a solution. If I made the fillStyle of the outer black hexagon the same color as the colored boarder hexagon, then make the fillStyle of the colored boarder hexagon equal to the green color on the map (which is a background), then the "bleeding" would just be seen as the colored boarder... which would eliminate this anti-aliasing. Right? I'll try it out and report back.
score: 0

http://stackoverflow.com/a/26537528
score: 0
type: Answer
has body: if i understood what you mean, just add $('.notification-popup-container:last-child').css('border-bottom', '1px solid red'); inside the click function (below $(this).closest(nContainer).remove();) so when you delete a div, this script check if the last element has the border bottom (it it already has a border the sript will ignore this css rule)
answers question: http://stackoverflow.com/q/26537405

http://stackoverflow.com/comment/41858796
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26624505
has text: I don't know how to achieve this? We can use document.createElement and check for duplicates, But this is too much code and may be it's not good to write extra code when we achieve this by 2 or 3 lines. If i am not wrong we can do this by 'Regx' and LOC is about maximum 4 or 5 line.
score: 0

http://stackoverflow.com/q/26596615
has comment: http://stackoverflow.com/comment/41808027
accepted answer: http://stackoverflow.com/a/26596964
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41809794
has comment: http://stackoverflow.com/comment/41807984
tagged with: wordpress
upvote count: 1
type: Question
score: 1
has title: Video Not Always Showing Up On Wordpress
has answer: http://stackoverflow.com/a/26596964
has comment: http://stackoverflow.com/comment/41807784
tagged with: jwplayer
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41807807
favorite count: 0
has body: I have a weird bug on my website that I need help fixing... This is a brand new Wordpress installation with the Carton theme, and the JWPlayer plugin. Here is my site: http://kenai.asap.um.maine.edu/maine_journal_dev If you click on the post titled "A Hobby Takes Flight: Observing Avian Activity using RC Aircraft" then you will be taken to the post for that page. You will notice that there is a spot for the video but the video does not load. However, it will load if the page is refreshed. Therefore, the bug is: The video does not load when directed from the homepage, however; if refreshed once on the page the video will load. (It might load, but it usually doesn't) Can anybody tell me what is going on? Thanks.

http://stackoverflow.com/comment/92127429
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26596256
has text: This should use `sessionStorage` so it's specific to a single tab, and, if `visited===true` the flag should be cleared, `storage.removeItem(visisted)`
type: Comment

http://stackoverflow.com/comment/41866962
comment on: http://stackoverflow.com/q/26629077
score: 0
type: Comment
has text: @artm: The reason is, there are multiple images present in one page, and there are around 100 pages where I need to change then. That will be the last option, which I have thought of
type: QuestionComment

http://stackoverflow.com/a/26595107
has comment: http://stackoverflow.com/comment/41804795
upvote count: 1
downvote count: 1
has body: HTML &lt;input class="textbutton" type="button" id="Button1" value="seat1" /&gt; &lt;input class="textbutton"type="button" id="Button2" value="seat2" /&gt; &lt;div id="bookingDiv" type="text"&gt; you have selected button: &lt;/div&gt; JavaScript $(document).ready(function(){ $('.textbutton').on("click",function(){ $('#bookingDiv').html( $('#bookingDiv').html() + ';' + $(this).attr('value') ); }); }); Add following JavaScript Reference &lt;script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" /&gt;
type: Answer
answers question: http://stackoverflow.com/q/26595040
has comment: http://stackoverflow.com/comment/41804936
has comment: http://stackoverflow.com/comment/41805427
score: 0

http://stackoverflow.com/comment/112731225
type: Comment
comment on: http://stackoverflow.com/a/26518094
has text: This is also what I need, but I'd need to know what is the "item" here? Is it the objected from getJson? Thanks.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26537748
score: 1
has body: Json is actually a string while you havent serialized it. So it is a string representation of arrays lists and other objects. If it is an ajax response maybe you have a wrong mime type. So it thinks it is getting a raw string rather than json. If you are asking such a question I think you probably should read this first JSON Edit: If you want to get correct answer you should clarify your question. For example what are you using to get json. If it is jQuery than you shuld use something like this: $.getJSON( "ajax/test.json", function( data ) { var items = []; $.each( data, function( key, val ) { items.push( "&lt;li id='" + key + "'&gt;" + val + "&lt;/li&gt;" ); }); $( "&lt;ul/&gt;", { "class": "my-new-list", html: items.join( "" ) }).appendTo( "body" ); }); took it from here or if you are using pure js you should manually serialize json like this: var obj = JSON.parse(text); took it from here where text variable contains string got from the server or wherever you get it from.
has comment: http://stackoverflow.com/comment/41701319
upvote count: 1
answers question: http://stackoverflow.com/q/26537685
type: Answer
downvote count: 0

http://stackoverflow.com/a/26569101
type: Answer
has body: Big Bla Medium Bla Small Bla If you don't want to show h3, keep the tag on the document, just hide the contents
score: 0
answers question: http://stackoverflow.com/q/26568883

http://stackoverflow.com/q/26514956
has body: I wrote new Date("2014-10-31") in my Chrome console, and I got back Thu Oct 30 2014 20:00:00 GMT-0400 (Eastern Daylight Time) What gives? Why is it Oct 30? Shouldn't it be Oct 31?
downvote count: 1
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41659922
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/41659706
answer count: 1
favorite count: 0
tagged with: constructor
type: UnansweredQuestion
tagged with: datetime
has comment: http://stackoverflow.com/comment/41659742
score: 3
has answer: http://stackoverflow.com/a/65483009
has title: Javascript new Date(string) returns one day behind

http://stackoverflow.com/q/26670122
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26673431
score: 1
accepted answer: http://stackoverflow.com/a/26673431
type: Question
answer count: 1
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: jquery mobile select onclose event
upvote count: 1
has body: I have a filter function implemented on "panel" in jQuery Mobile: I call filter by clicking on any button, the panel slides from left and there are filter options to set up current filter. If multiple select box contains a lot of options, it shows on a black background covering the whole page and it closes the panel. I need to reopen the panel with filter after this dialog of multi-select is closed... I am using this: $('#filter select').bind('change',function(){ $('#filter').panel('open'); }); This is OK if the user does any change in opened dialog (select)... But what if he just closes this dialog using the X-button without any change? Dialog disappears, but panel is not reopened. Thank you very much for any help.

http://stackoverflow.com/comment/41677131
has text: oops, my question is not clear, what I need is to get servlet attribute using jquery or javascript, not sending data from jsp page to servlet
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26524416

http://stackoverflow.com/comment/41768854
type: QuestionComment
comment on: http://stackoverflow.com/q/26575334
has text: Exactly. Thanks sanki.
score: 0
type: Comment

http://stackoverflow.com/q/26670534
has answer: http://stackoverflow.com/a/26670731
upvote count: 2
tagged with: objectid
type: Question
has body: I am trying to convert a String to ObjectId: var _id=mongoose.Types.ObjectId(req.body.notebook); The notebook value is actually the id of a document in the database: &gt; db.notebook.findOne() { "title" : "My Notebook", "isActive" : false, "_id" : ObjectId("54505ced1fa5b1b519bdfc88"), "notes" : [ ], "__v" : 0 } I was debugging and the method looked like this: mongoose.types.ObjectId("54505ced1fa5b1b519bdfc"); I got an error to this effect while debugging: ObjectId must either be a 12 byte string or 24 hex charecters. This error occurs from the method ObjectId.isValid.I have tried casting using: mongoose.Types.ObjectId.fromString(req.body.notebook); and mongoose.mongo.BSONPure.ObjectID.fromString(req.body.notebook); I understand that I have to convert this string to an appropriate hex format.How can I do that?
accepted answer: http://stackoverflow.com/a/26670731
has title: Getting Mongoose ObjectId from String
tagged with: mongodb
answer count: 1
downvote count: 0
tagged with: mongoose
tagged with: javascript
tagged with: node.js
favorite count: 0
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/41691788
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26532608
type: QuestionComment
has text: Also, it's not just for this case. I've wanted a way to patch internal functions (like how you use plugins to extend something) for a while.

http://stackoverflow.com/comment/41920036
type: Comment
type: QuestionComment
score: 1
has text: There is no way around it if you want to keep the `type="email"`. The `type="number"` has the same issue... you could voice your opinion in the [discussion on w3.org](https://www.w3.org/Bugs/Public/show_bug.cgi?id=24796) (it is specifically for number inputs; I haven't searched for a email type input discussion). Similar to http://stackoverflow.com/questions/21177489/selectionstart-selectionend-on-input-type-number-no-longer-allowed-in-chrome
comment on: http://stackoverflow.com/q/26658474

http://stackoverflow.com/a/26654863
downvote count: 0
answers question: http://stackoverflow.com/q/26646991
has comment: http://stackoverflow.com/comment/41917786
has body: This can be achieved by regular parent-child communication, except in this case you do not have any parent. But you can still pass to the root component some functions that will be called inside the 2 components and trigger the rendering Here is a working demo of the exemple you asked: var First = React.createClass({ render: function() { return Hello1 {this.props.name} ; } }); var Second = React.createClass({ render: function() { return Hello2 {this.props.name} ; } }); function onSecondClicked() { React.render(<First name="World updated!" />, document.getElementById("first")); } React.render(<First name="World" />, document.getElementById("first")); React.render(<Second name="World" onSecondClicked={onSecondClicked}/>, document.getElementById("second")); JsFiddle link Calling React.render inside the 2nd component should normally work (maybe not during during the render phase but this is not a good idea anyway). However it creates a huge coupling between your 2 components. You can also create a "root component" that will be a parent of the 2 components. If you have a lot of components to synchronize, you may use an event bus for cross-component communication.
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26646991
has comment: http://stackoverflow.com/comment/41914978
has comment: http://stackoverflow.com/comment/41917858
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/49823776
type: QuestionComment
has text: Can't agree more: this question is not a duplicate. When you use a framework, most of the time, you have an easier way of doing such simple things.
comment on: http://stackoverflow.com/q/26649460
score: 0
type: Comment

http://stackoverflow.com/comment/41731409
has text: Every function is also an object in JavaScript, see http://stackoverflow.com/questions/3449596/every-object-is-a-function-and-every-function-is-object-which-is-correct
score: 3
comment on: http://stackoverflow.com/q/26554807
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26514433
has answer: http://stackoverflow.com/a/26514496
has body: I made a div, in a div, in a div and I am trying to access the attribute food of the extern div through the most intern div. How can I do that? I commented in the code, I'm trying to alert 'banana'. //alert($('.animals').attr('food')); //alerts banana //alert($('.mammals').parent().attr('food')); //alerts banana //alert($('.monkeys').parent().parent().attr('food')); //doesn't alert banana
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41658663
upvote count: 1
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26514496
has answer: http://stackoverflow.com/a/26514576
has answer: http://stackoverflow.com/a/26514482
has answer: http://stackoverflow.com/a/26514478
accepted answer: http://stackoverflow.com/a/26514482
has title: Get attribute of parent div
has comment: http://stackoverflow.com/comment/41658688
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
downvote count: 0

http://stackoverflow.com/a/26523247
accepted answer of: http://stackoverflow.com/q/26516718
answers question: http://stackoverflow.com/q/26516718
type: Answer
has body: Since id is unique use class $('*[data-js]').click(function () { var addrButton = $('.address-continue'); addrButton.removeClass(test123); addrButton.removeClass(test124); radioID = $('*[data-js]').attr('id'); addrButton.addClass(radioID); }); Also your basic problem might be because you did not collect your radioID in ur radio function hence it wasn't updated so try this $('*[data-js]').click(function () { var radioID = $('*[data-js]').attr('id'); $(addrContinue).attr('id', radioID); });
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26603015
tagged with: javascript
score: 0
has title: how 2 compare all properties of 2 JSON ,except one ,using UnderscoreJs?
answer count: 1
accepted answer: http://stackoverflow.com/a/26603120
tagged with: angularjs
has body: I am using _.isFilter method of underscore js. It works perfectly if I want to check whether 2 JSONs are same or not. But I am facing one tiny problem.In One JS I have $$hashKey too as property, while in other It's not present. How can I compare 2 JSON's all properties except one i.e $$hashKey. $rootScope.jsonOfHRA = $scope.setFileNameAndOtherProperties($rootScope.jsonOfHRA); globalJsonHRA = JSON.parse(JSON.stringify($rootScope.jsonOfHRA)); //This is how I make a deep copy of JSON JSONOFHRA= { "toShowVerified": 0, "sec10_decl_id": 390, "toShowEdit": 0, "toShowlineItemEditable": true, "edit": false, "sec10_decl_act_val": 0, "sec10_decl_other_text1": "asdsa", "sec10_decl_other_text2": "3434", "sec10_decl_other_text3": "adasda", "sec10_decl_decl_from_dt": "01/05/2014", "sec10_decl_status": 0, "sec10_decl_yr_end": "2015-03-31", "sec10_decl_yr_id": 2014, "listOfAttachments": [], "nameOfPayheadToShow": "HRA", "sec10_decl_proof": 0, "sec10_decl_ver_val": 0, "sec10_decl_yr_st": "2014-04-01", "sec10_decl_cust_id": 315, "add": false, "sec10_decl_curr_id": 0, "sec10_decl_mod_on": "2014-10-28 12:46:14.0", "sec10_decl_add_on": "2014-10-28 12:38:49.0", "sec10_decl_decl_to_dt": "30/06/2014", "sec10_decl_user_id": 32967, "sec10_decl_active": 0, "sec10_decl_decl_val": 1234, "sec10_decl_head_id": 3, "sec10_decl_decl_text": "Delhi", "$$hashKey": "19I" } GLOBALJSON = { "toShowVerified": 0, "sec10_decl_id": 390, "toShowEdit": 0, "toShowlineItemEditable": true, "edit": false, "sec10_decl_act_val": 0, "sec10_decl_other_text1": "asdsa", "sec10_decl_other_text2": "3434", "sec10_decl_other_text3": "adasda", "sec10_decl_decl_from_dt": "01/05/2014", "sec10_decl_status": 0, "sec10_decl_yr_end": "2015-03-31", "sec10_decl_yr_id": 2014, "listOfAttachments": [], "nameOfPayheadToShow": "HRA", "sec10_decl_proof": 0, "sec10_decl_ver_val": 0, "sec10_decl_yr_st": "2014-04-01", "sec10_decl_cust_id": 315, "add": false, "sec10_decl_curr_id": 0, "sec10_decl_mod_on": "2014-10-28 12:46:14.0", "sec10_decl_add_…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26603120
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/41803917
has text: @DJBurb, no, [.attr( attributeName )](http://api.jquery.com/attr/) gets the value of an attribute.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26594150
type: QuestionComment

http://stackoverflow.com/comment/41850347
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26619715
has text: `var arr3 = arr1.map(function(val) { return val.name; })` and in the predicte of `arr2.every`, use `return arr3.indexOf(val) >= 0;`.
score: 3

http://stackoverflow.com/a/26519529
has comment: http://stackoverflow.com/comment/41673513
has comment: http://stackoverflow.com/comment/61605037
has body: After bouncing this around for some time I was able to narrow down the problem. Apparently PhantomJS uses a default ssl of sslv3 which causes github to refuse the connection due to a bad ssl handshake phantomjs --debug=true github.js Shows output of: . . . 2014-10-22T19:48:31 [DEBUG] WebPage - updateLoadingProgress: 10 2014-10-22T19:48:32 [DEBUG] Network - Resource request error: 6 ( "SSL handshake failed" ) URL: "https://github.com/" 2014-10-22T19:48:32 [DEBUG] WebPage - updateLoadingProgress: 100 So from this we can conclude that no screen was taken because github was refusing the connection. Great that makes perfect sense. So let's set SSL flag to --ssl-protocol=any and lets also ignore ssl-errors with --ignore-ssl-errors=true phantomjs --ignore-ssl-errors=true --ssl-protocol=any --debug=true github.js Great success! A screenshot is now being rendered and saved properly but debugger is showing us a TypeError: TypeError: 'undefined' is not a function (evaluating 'Array.prototype.forEach.call.bind(Array.prototype.forEach)') https://assets-cdn.github.com/assets/frameworks-dabc650f8a51dffd1d4376a3522cbda5536e4807e01d2a86ff7e60d8d6ee3029.js:29 https://assets-cdn.github.com/assets/frameworks-dabc650f8a51dffd1d4376a3522cbda5536e4807e01d2a86ff7e60d8d6ee3029.js:29 2014-10-22T19:52:32 [DEBUG] WebPage - updateLoadingProgress: 72 2014-10-22T19:52:32 [DEBUG] WebPage - updateLoadingProgress: 88 ReferenceError: Can't find variable: $ https://assets-cdn.github.com/assets/github-fa2f009761e3bc4750ed00845b9717b09646361cbbc3fa473ad64de9ca6ccf5b.js:1 https://assets-cdn.github.com/assets/github-fa2f009761e3bc4750ed00845b9717b09646361cbbc3fa473ad64de9ca6ccf5b.js:1 I checked the github homepage manually just to see if a TypeError existed and it does NOT. My next guess is that the assets aren't loading quick enough.. Phantomjs is faster than a speeding bullet! So lets try to slow it down artificially and see if we can get rid of that TypeError... var page = require('webpage').create(); …
has comment: http://stackoverflow.com/comment/41673337
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47322830
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/44566384
score: 25
accepted answer of: http://stackoverflow.com/q/26517852
upvote count: 25
has comment: http://stackoverflow.com/comment/41700859
answers question: http://stackoverflow.com/q/26517852

http://stackoverflow.com/a/26565309
answers question: http://stackoverflow.com/q/26565274
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26565274
has body: You made two little mistakes: Use textinput.value instead of textinput like so: newParagraph.textContent = textinput.value; Write onclick instead of onClick like so: document.getElementById('a').onclick = addParagraph; DEMO

http://stackoverflow.com/q/26622708
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26622797
possible better answer: http://stackoverflow.com/a/57813042
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41855839
type: Question
has title: How to get random word using Wordnik API in Javascript?
tagged with: wordnik
score: 7
has answer: http://stackoverflow.com/a/57813042
tagged with: javascript
answer count: 2
tagged with: api
upvote count: 7
accepted answer: http://stackoverflow.com/a/26622797
favorite count: 0
has body: I am trying to create a hangman game using HTML and Javascript and to get the word I was wondering how I might be able to get a random word using the wordnik API. I do not understand how to get the word and then return in. I've already registered for an apiKey, but I keep getting confused on how to do the AJAX and JSON part of the API and how that combines with the Javascript.

http://stackoverflow.com/q/26664180
tagged with: jquery
has comment: http://stackoverflow.com/comment/41947569
has answer: http://stackoverflow.com/a/26674396
has comment: http://stackoverflow.com/comment/41944617
score: 0
has comment: http://stackoverflow.com/comment/41947139
has comment: http://stackoverflow.com/comment/41938661
possible better answer: http://stackoverflow.com/a/29491072
has comment: http://stackoverflow.com/comment/41945598
has title: bxSlider last slide empty
type: AnsweredQuestion
tagged with: bxslider
has body: I have bxSlider integrated in an existing application showing three different slides. Each slide contains a HTML canvas which is periodically updated with a new JCharts graph. It works perfect! Only... the last slide does appear, but does not show the content of the canvas. The following bxSlider element is used. In this case the canvas with id loadedClassesLineChart is showm, but does not show the graph. When i change the order of the tags the content of the last canvas is not shown (although the canvas is shown an a pager is shown with 3 dots) Average CPU Load/CPUs Heapsize allocation Loaded classes When adding an extra empty after the last all three graphs are shown and the fourth empty slide is shown. bxSlider is started using the document ready function. $(document).ready(function() { $('#rdstats').each(function() { var _this = $(this).bxSlider({ controls: false, auto: true, autoHover: true, minSlides: 1, maxSlides: 1, adaptiveHeight: true, slidewidth: 200, slideMargin: 2}); _this.mouseenter(function() { _this.stopAuto(); }).mouseleave(function() { _this.startAuto(); }); }); What i have tried; UseCSS : false slideWidth : 200 minSlides : different values maxSlides : different values adaptiveHeight: false reproducable on FireFox, Safari and Opera Anyone able to help me out on this one ?
accepted answer: http://stackoverflow.com/a/26674396
has comment: http://stackoverflow.com/comment/41945711
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/29491072
tagged with: javascript

http://stackoverflow.com/comment/81515970
comment on: http://stackoverflow.com/a/26579107
score: 0
type: AnswerComment
type: Comment
has text: I know this was three years ago now, but the creators of Express [explicitly recommend using a reverse proxy for static content over serving it with Express](https://expressjs.com/en/advanced/best-practice-performance.html#use-a-reverse-proxy).

http://stackoverflow.com/comment/41743031
comment on: http://stackoverflow.com/a/26556614
score: 0
has text: Even if I set it to configurable, still nothing happens (at least no error in ff).
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26600904
tagged with: jquery
favorite count: 0
has body: I have included a plugin here, to include code snippets on my site using CKEditor. With this, I found that people have problems with CKEditor dialog boxes and Bootstrap's modal window. Any dialog box opened isn't focused on, and text can't be entered. A solution was found here. This fixes my issues with other dialog boxes, but not the one that opens with this pre tag plugin. Does anyone have any advice to get code snippets to work properly in CKEditor and Bootstrap? $.fn.modal.Constructor.prototype.enforceFocus = function() { modal_this = this $(document).on('focusin.modal', function (e) { if (modal_this.$element[0] !== e.target &amp;&amp; !modal_this.$element.has(e.target).length &amp;&amp; !$(e.target.parentNode).hasClass('cke_dialog_ui_input_select') &amp;&amp; !$(e.target.parentNode).hasClass('cke_dialog_ui_input_text')) { modal_this.$element.focus() } }) };
type: UnansweredQuestion
has title: Problems with CKEditor dialog on top of Bootstrap modal window
has answer: http://stackoverflow.com/a/26619457
tagged with: twitter-bootstrap
score: 1
upvote count: 1
tagged with: code-snippets
type: Question
tagged with: javascript
tagged with: ckeditor
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41691871
score: 0
type: AnswerComment
type: Comment
has text: Where there is no getElementByClassName, there is `getElementsByClassName` which returns a node set so it would be `document.getElementsByClassName("outputElemClass")[0].innerHTML = content.join("");`
comment on: http://stackoverflow.com/a/26532039

http://stackoverflow.com/comment/41765109
score: 0
type: QuestionComment
type: Comment
has text: @bergi what exactly is relevant in that linked answer?
comment on: http://stackoverflow.com/q/26573320

http://stackoverflow.com/a/26549836
type: Answer
answers question: http://stackoverflow.com/q/26547869
upvote count: 1
has body: Heres how you can do it in javascript: &lt;script&gt; var textareas = document.getElementsByTagName("textarea"); for(var i = 0; i &lt; textareas.length; ++i){ textareas[i].addEventListener("input", handleInput); textareas[i].cols += 3; handleInput(null, textareas[i]); } function handleInput(event, area){ if(area === undefined) area = this; area.value = fixText( area.value, area.value.length, area.cols-3); } function fixText(text, length, limit){ var counter = 0; for(var i = 0; i &lt; length; ++i){ var currChar = text[i]; counter++; if(currChar === "\n"){ counter = 0; } else if(counter &gt; limit){ text = text.substring(0,i) + "\n" + text.substring(i, text.length); counter = 0; } } return text; } Here i use the col attribute of the textarea and add a linebreak every VALUE_OF_COL characters that doesn't contain a linebreak. Check it out here: JSFiddle
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41723366

http://stackoverflow.com/q/26635756
has comment: http://stackoverflow.com/comment/41878934
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26635886
has comment: http://stackoverflow.com/comment/41879009
has answer: http://stackoverflow.com/a/26636243
type: Question
has body: I'm trying to set a root scope in my angularjs project so I can access name from anywhere in the HTML (not in an ng-view). &lt;!DOCTYPE html&gt; &lt;html lang="en" ng-app="phonecatApp" ng-controller="ApplicationController"&gt; &lt;/html&gt; That encapsulates the entire page I've loaded in a js file called app.js with the following in; var phonecatApp = angular.module('phonecatApp', []); phonecatApp.factory('UserService', function(){ return { name : 'Tom' }; }) function ApplicationController($scope, UserService){ $scope.username = UserService.name } And I'm trying to do the following in the index.html: &lt;a href="#index" class="nav-item name_p_nav"&gt;{{username}}&lt;/a&gt; But it just comes back blank Edit: fixed typo
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41879033
has title: Accessing global variables

http://stackoverflow.com/comment/41826163
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26606611
has text: @user1153551 How else you want?

http://stackoverflow.com/q/26609059
has comment: http://stackoverflow.com/comment/41830253
type: Question
has body: I am trying to create a password login modal, click submit button and open another modal containing links using Bootstrap 3 and I am stuck and could use some help. I've already created the login modal(just a password input and submit btn -this is #modal6) and the modal containing the links(this is #modal7) that will pop up when the password is correct(just a single password, no user login etc...). Since this seems relatively simple I am trying to do this just using javascript/jquery and without mysql or php. Well I am stuck... I can't figure out how once the correct password is submitted to bring up the modal window containing the links. I have figure out how to do this with a login modal and you click submit and with the correct password it will bring up the links if it is a html page Example: &lt;form` name="employee" action="javascript:location.href =window.document.employee.page.value + '.html'" I cannot figure out how to do this with the links as a modal as opposed to a html page.
accepted answer: http://stackoverflow.com/a/26610046
tagged with: javascript
has answer: http://stackoverflow.com/a/26610046
downvote count: 3
answer count: 1
tagged with: bootstrap-modal
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41830802
score: -3
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
tagged with: twitter-bootstrap-3
has title: How to create a password login modal, click submit button and open another modal containing links using bootstrap 3

http://stackoverflow.com/comment/41695811
comment on: http://stackoverflow.com/q/26516638
score: 0
type: Comment
type: QuestionComment
has text: @cbayram I managed to get the desired result but one of the most funny and strange way and still fail to understand why this workaround works!!! here is how I am making the "data" array now: var data=[' '+ProcDate+' '.trim(),' '+Area+' '.trim(),' '+Surf+' '.trim(),' '+Proc+' '.trim(),' '+Desc+' '.trim(),' '+Prov+' '.trim(),' '+Status+' '.trim(),'000']; I am adding spaces on both sides and then trimming it and now I can add the row in datatables on the fly!!!! this still beats me!!!!!! any clues!!!!!

http://stackoverflow.com/comment/41726393
has text: Can you change the console.logs a bit? I get 0 - true 5930496 - 5930496 and I don't see any msecs or what is the size for the first comparison - I assume you are doing 3 vs 5930496 char comparisons?
comment on: http://stackoverflow.com/q/26549715
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26655698
score: 2
has comment: http://stackoverflow.com/comment/41915617
accepted answer of: http://stackoverflow.com/q/26655602
has body: Here you go: &lt;input type="range" name="rangeInput" min="0" max="100" onchange="updateInput(this.value);" oninput="updateInput(this.value)" &gt; &lt;p id="textInput"&gt;&lt;/p&gt; oninput is not supported in IE10, so you have to use both, oninput and onchange. Here is the demo
downvote count: 0
answers question: http://stackoverflow.com/q/26655602
type: AcceptedAnswer
upvote count: 2
type: Answer

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

http://stackoverflow.com/comment/41924347
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26661089
has text: I think you will need to use ajax.

http://stackoverflow.com/comment/42250854
type: QuestionComment
comment on: http://stackoverflow.com/q/26554083
score: 1
has text: @ajmajmajma: Can you please explain what is wrong for you with this code? I created plunk, everything seems to be working. http://plnkr.co/edit/WqXuKzhT5BoLisB4ITbP?p=preview
type: Comment

http://stackoverflow.com/q/26626033
has comment: http://stackoverflow.com/comment/41861408
has body: javascript: $('body').on('click', '.deleteButton &gt; a', function() { alert('pop'); return false; }); html: &lt;div class="deleteButton"&gt; &lt;a href="#"&gt;✖&lt;/a&gt; &lt;/div&gt; This type of binding the click event is working well on newly created elements (via .clone and .prepend), but not working on already existing ones. But using .click() instead of .on() is working on already existing elements while not working on newly created. Is there any way to bind a click event both on new and already existing elements with one line?
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: click
answer count: 3
tagged with: events
favorite count: 0
tagged with: dynamic
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26626220
has answer: http://stackoverflow.com/a/26626636
upvote count: 1
type: Question
score: 1
has title: jQuery - .on('click' ... ) does not work on already existing elements while working on dynamically created ones
has answer: http://stackoverflow.com/a/26626683

http://stackoverflow.com/comment/41844537
comment on: http://stackoverflow.com/q/26616324
score: 0
has text: Try using AJAX. If you try it, and you can't get it to work, ask again and I'll help further
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26646991
has title: Communicating between different components which doesnt have a parent-child relationship in reactjs
score: 4
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/41899953
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/49946451
has answer: http://stackoverflow.com/a/26654863
type: AnsweredQuestion
has body: Lets say i have 2 different DOM elements &lt;div id="firstDiv"&gt; &lt;/div&gt; &lt;div id="secondDiv"&gt; &lt;/div&gt; Now lets say i render some html inside the firstDiv using React.render(firstComponent(null),document.getElementById('firstDiv'); Now lets say i fetch some data from a server inside the firstComponent and then i gotto render part of the data inside secondDiv , whats the best way to do it ??Can i call React.renderComponent(,document.getElementById("secondDiv")) from inside the firstComponent ?? And how to achieve a two-way communication between them ??? Lets say now i click a link in the html rendered in the secondDiv then how to change the text inside the firstDiv ?? If i generalize this question it would be "How do i render html inside multiple DOM elements from one single component and then communicate across these components which are rendered in different DOM elements???"
accepted answer: http://stackoverflow.com/a/26654863
type: Question
tagged with: reactjs
possible better answer: http://stackoverflow.com/a/26671157
has comment: http://stackoverflow.com/comment/41914506
tagged with: javascript
has answer: http://stackoverflow.com/a/26671157

http://stackoverflow.com/q/26524394
duplicate of: http://stackoverflow.com/q/24539521
has answer: http://stackoverflow.com/a/26524484
tagged with: sapui5
downvote count: 1
type: Question
tagged with: javascript
score: -1
has title: Hide/show element after delay using setTimeout
upvote count: 0
answer count: 1
has body: I have sample text element on view. How can I hide them for example after delay of 3 seconds? Usage of setTimeout() doesn't work. Here is my view code. &lt;core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:l="sap.ui.layout" controllerName="setvisible.Index" xmlns:html="http://www.w3.org/1999/xhtml"&gt; &lt;Page title="Title"&gt; &lt;content&gt; &lt;Text id="sampleText" text="Test" visible="true"/&gt; &lt;Button id="hide" text="Hide" press="hide"/&gt; &lt;/content&gt; &lt;/Page&gt; &lt;/core:View&gt; And this is my controller code. sap.ui.controller("setvisible.Index", { hide: function(oEvent) { setTimeout(showElem, 3000); function showElem() { this.byId("sampleText").setVisible(true); this.getView(); } } }); Error is Uncaught TypeError: undefined is not a function.
has comment: http://stackoverflow.com/comment/41676729
favorite count: 0
linked to: http://stackoverflow.com/q/24539521
type: UnansweredQuestion

http://stackoverflow.com/comment/41778710
score: 1
has text: -1, not a very clear question. What do you want to put into the array?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26581016

http://stackoverflow.com/comment/41922345
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26656210
has text: You can replace the `alert` in the examples above with whatever functions you want to call when the event kicks off, including `showItem` :)
score: 0

http://stackoverflow.com/comment/41913701
type: Comment
comment on: http://stackoverflow.com/q/26640872
type: QuestionComment
has text: I appreciate the suggestion, but even using Knockout [it seems like](http://stackoverflow.com/questions/22706765/twitter-bootstrap-3-modal-with-knockout) I would still need to use ".on('hide.bs.modal')", which doesn't seem to be working at all in my instance. Any idea why?
score: 0

http://stackoverflow.com/comment/41816908
has text: The myurl image won't load for me. Anyway, are all the graphics rotated when you use them like that, or only one in particular?
comment on: http://stackoverflow.com/q/26601069
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26551939
answer count: 0
has comment: http://stackoverflow.com/comment/41727752
type: Question
has comment: http://stackoverflow.com/comment/41728224
tagged with: javascript
tagged with: jtable
score: 0
has comment: http://stackoverflow.com/comment/41726154
tagged with: jquery
has comment: http://stackoverflow.com/comment/41726063
type: UnansweredQuestion
has body: I am using JTable to display form data and seem to be having a problem where the custom inputs are all displaying the value of the first input. What should happen, is each input should hold it's own value based on the selected datepicker data. However, if I click the second input, this displays the correct date in the input, but when I click button, the value that is returned is the value of input 1. All I am trying to do is, get the value of the input on the click event. I would be grateful if someone could shed some light as to where I have gone wrong as I am still learning JTable and jQuery. Many thanks. //function to amend and destroy boxes $(function() { //Prepare jTable $('#setDestScheduleShow').jtable({ title: 'Box Destruction Schedule', paging: true, pageSize: 5, pageSizes: [5, 10, 25, 50, 100, 250, 500], messages: { pagingInfo: 'Showing {0} to {1} of {2} records', editRecord: 'Edit Box Record' }, sorting: true, defaultSorting: 'destroy_date ASC', actions: { listAction: '../users/destroySchedDisp.php?action=list', //createAction: '../users/destroySchedDisp.php?action=create', //updateAction: '../users/destroySchedDisp.php?action=update', //deleteAction: '../users/destroySchedDisp.php?action=delete' }, fields: { Id: { key: true, title: 'Id', width: '2%', list: false }, customer: { title: 'Co Ref', width: '10%', list: false }, intake_date: { title: 'Intake Date', width: '14%', type: 'date', displayFormat: 'dd/mm/yy' }, destroy_date: { title: 'Destroy Date', width: '14%', type: 'date', displayFormat: 'dd/mm/yy' }, custref: { title: 'Box No', width: '14%' }, amend: { title: 'Amend Date', width: '12%', sorting: false, type: 'date', display: function(data) { return '&lt;input type="text" name="MyName" onclick="dpicker();" /&gt;'; **&lt;--- THIS IS THE INPUT** } }, sendbtn: { title: 'Update', width: '12%', sorting: false, display: function(data) { var $button = $('&lt;input type="button" class="destBtn" name="destUpdBtn" value="Update" /&gt;'); $button.click(functi…
has title: Dynamic input fields displaying incorrect value

http://stackoverflow.com/q/26584781
type: Question
has comment: http://stackoverflow.com/comment/41786069
tagged with: ionic-framework
score: 0
has title: Change 'select' type into a 'date' type on value change
answer count: 1
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/26585111
has comment: http://stackoverflow.com/comment/41786200
has body: I have a select option given in my form and values given to it. Like 1.Daily 2.Weekly 3.Monthly After that i have another select option.I want that select option to change into a date type on selecting 'Monthly' option in the first field. Is this possible? My html code &lt;!--Select Data Range and the Frequency --&gt; &lt;label class="labelColor"&gt;&lt;h5&gt;&lt;b&gt;Select Data Range and the Frequency *&lt;/b&gt;&lt;/h5&gt;&lt;/label&gt; &lt;div class="row"&gt; &lt;input style=width:100px placeholder="From Date" class="textbox-n" ng-model="fromDate" type="text" onfocus="(this.type='date')" id="date"&gt;&amp;nbsp; &lt;input style=width:100px placeholder="To Date" class="textbox-n" ng-model="toDate" type="text" onfocus="(this.type='date')" id="date"&gt;&amp;nbsp; &lt;select style=width:100px type="select" class="textbox-n" id="freq" ng-model="user.freq" ng-change="changeFields()" ng-disabled="isDisabled" ng-options="frequency.name for frequency in frequencysArr" name="freq"&gt; &lt;option id="default" value="" selected="selected"&gt;--Select--&lt;/option&gt; &lt;/select&gt; &lt;/div&gt;&lt;br&gt; &lt;!--Select Start Day --&gt; &lt;label class="labelColor"&gt;&lt;h5&gt;&lt;b&gt;Select Start Date *&lt;/b&gt;&lt;/h5&gt;&lt;/label&gt;&lt;br&gt; &lt;select style=width:100px type="select" class="textbox-n" id="startDate" ng-disabled="disableFields" ng-model="user.startDate" ng-options="date.name for date in datesArr" name="startDate"&gt; &lt;option id="default" value="" selected="selected"&gt;--Select--&lt;/option&gt; &lt;/select&gt; My JS $scope.frequencysArr = [{ "id": "1", "name": "Daily" }, { "id": "2", "name": "Weekly" }, { "id": "3", "name": "Monthly" }] $scope.changeFields = function () { if ($scope.user.freq.name == "Daily") { $scope.disableFields = true; } else if ($scope.user.freq.name == "Weekly") { $scope.disableFields = false; $scope.datesArr = [{ "id": "1", "name": "Sunday" }, { "id": "2", "name": "Monday" }, { "id": "3", "name": "Tuesday" }, { "id": "3", "n…
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41785533
has comment: http://stackoverflow.com/comment/41785272
accepted answer: http://stackoverflow.com/a/26585111

http://stackoverflow.com/comment/41711679
comment on: http://stackoverflow.com/a/26531770
type: Comment
has text: Eh, with SharePoint, you never know. About the counter, I actually already implement it, but didn't want to make the code too heavy. Now, I don't really understand the usefulness of the inner function, therefore what your solution brings to the table. (once again, me = JS beginner D:) Is that just for the sake of passing a reference so we don't use the actual `folder` variable, so it can close in peace?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26575673
has body: In your jsFiddle code, when you click on the "Name" navigator button, the function that you have written called "showRecordsByName" is called. The code of that looks as follows: function showRecordsByName() { $('.todo-listview').listview({ autodividers: true }); $('.todo-listview').listview("refresh"); } And ... that's all it does. It refreshes the listview with class ".todo-listview" but since the content of the list has not changed in any way, it remains exactly as it was before this code was executed. Thank you for using jsFiddle, it makes examination much easier.
answers question: http://stackoverflow.com/q/26575302
score: 0
has comment: http://stackoverflow.com/comment/41769669
type: Answer

http://stackoverflow.com/a/26611207
accepted answer of: http://stackoverflow.com/q/26611050
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26611050
upvote count: 1
has body: You could setup your object1.js file in the following way: var async = require('async'); function function1(callback){ async.each(someArray, function(item, cb) { function2(item); }, function(err){ if(err) return callback(err); callback(); }); } function function2(item, callback){ //Do something } module.exports.function1 = function1; module.exports.function2 = function2; You should now notice that function1 and function2 are defined globally in the file. This means they can be called inside of each other freely.
score: 1

http://stackoverflow.com/q/26672189
downvote count: 0
score: 1
tagged with: birt
type: Question
has title: BIRT boxes format in BIRT report
tagged with: java
tagged with: javascript
has answer: http://stackoverflow.com/a/26709979
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: is there any way to have a word in a boxes format where each character comes in a box for report. I am using 3.7 version. [h][e][l][l][0] I am showing by square brackets. but it should be single field (square boxes) in the report. Usually for account numbers in forms are reported like this. Waiting for your replies.

http://stackoverflow.com/comment/41938543
comment on: http://stackoverflow.com/q/26668569
has text: Why not just remove the option to check the "remember me" checkbox? This should solve it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26665195
answers question: http://stackoverflow.com/q/26665155
score: 1
upvote count: 1
downvote count: 0
has body: Define your variable (userQuantity) within the function. It will be available via closure to the other functions and callbacks without having global scope. See this new jsFiddle. The start of the new code looks as follows: $(document).ready(function () { var userQuantity; $('#user-quantity').keyup(function () { userQuantity = parseInt($(this).val()); if (userQuantity &gt;= 1 &amp;&amp; userQuantity &lt;= 200) { setCurrency(); } else { $('#total-sum').val("error"); } });
type: Answer

http://stackoverflow.com/comment/41894498
score: 0
type: AnswerComment
has text: Yeah... that's not allowed =/
type: Comment
comment on: http://stackoverflow.com/a/26644027

http://stackoverflow.com/q/26535003
has comment: http://stackoverflow.com/comment/41696353
type: AnsweredQuestion
has body: Why doesn't this iterate? (Array(5)).reduce(function(cur,prv,n,a){alert(n)},''); I never reached the function body, seemingly ignoring all of the empty values, which is not what I want it to do.
has answer: http://stackoverflow.com/a/26535348
upvote count: 1
has comment: http://stackoverflow.com/comment/41696394
type: Question
score: 1
has comment: http://stackoverflow.com/comment/41696139
accepted answer: http://stackoverflow.com/a/26535348
answer count: 2
has title: js reduce of an array with only empty values
downvote count: 0
has comment: http://stackoverflow.com/comment/41696519
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26535146
has answer: http://stackoverflow.com/a/26535146

http://stackoverflow.com/q/26572301
has answer: http://stackoverflow.com/a/26572340
tagged with: javascript
has title: Create New HTML Page With Javascript
accepted answer: http://stackoverflow.com/a/26572334
downvote count: 4
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: -3
has answer: http://stackoverflow.com/a/26572332
upvote count: 1
has body: I'm wondering if there is a way to create a new html document using javascript, with a specified name and save it in the same folder as the parent page. Thanks In Advance!
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26572334
possible better answer: http://stackoverflow.com/a/26572332
type: Question

http://stackoverflow.com/a/52439272
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26594531
has comment: http://stackoverflow.com/comment/112376672
upvote count: 1
downvote count: 1
has body: If you use PHP, try this : <?php echo file_get_contents('your_file_name.php') ?>

http://stackoverflow.com/q/26552092
tagged with: css
has title: Twitter Bootstrap condense table does not work for appended rows
has comment: http://stackoverflow.com/comment/41727762
answer count: 0
has comment: http://stackoverflow.com/comment/41727597
type: Question
has comment: http://stackoverflow.com/comment/41727812
has comment: http://stackoverflow.com/comment/41727940
tagged with: javascript
linked to: http://stackoverflow.com/q/16842682
tagged with: jquery
has body: I am using the following table: &lt;table class="table table-condensed"&gt; Rows added at the same time when the table is instantiated are rendered properly. However, when a row is later appended dynamically with javascript, it does not follow condensed table layout and takes too much space. How can I assure that dynamically appended rows follow table-condensed formatting as well? EDIT: Obviously it was caused, because of the fact that the first element in the table contained shorter cell values than appended rows. As result subsequent, dynamically appended rows inherited columns width. Here is how it looks like: Two first rows have been present in the table from the beginning and the subsequent rows were appended dynamically.
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41727527
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41726836

http://stackoverflow.com/comment/41741206
comment on: http://stackoverflow.com/q/26560334
type: QuestionComment
type: Comment
has text: Why are you setting `data` twice? You're not doing anything with the first value of `data`.
score: 0

http://stackoverflow.com/q/26659749
has comment: http://stackoverflow.com/comment/41922027
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41921696
has comment: http://stackoverflow.com/comment/41921734
has title: Removing and Adding classes with button
has answer: http://stackoverflow.com/a/26659807
type: Question
answer count: 1
tagged with: javascript
has body: I'm trying to use a button to remove the class .computer-off and add .computer-on and vice versa when clicked again. I've tried quite a few approaches, but to no avail. Here's one approach: HTML: Power JS: function computerPower() { if ( $("#computer-screen").hasClass('computer-off') ) { document.getElementById('computer-screen').removeClass('computer-off').addClass('computer-on'); } else { document.getElementById("computer-screen").removeClass('computer-on').addClass('computer-off'); } };
score: 0
accepted answer: http://stackoverflow.com/a/26659807

http://stackoverflow.com/comment/41750563
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26565688
type: QuestionComment
has text: Check the Javascript console, it complains of a syntax error. And jsfiddle only adds the `$(document).ready()` if you select `onDomReady` from the menu. It defaults to `window.onload`.

http://stackoverflow.com/a/26524105
answers question: http://stackoverflow.com/q/26523982
has comment: http://stackoverflow.com/comment/41688478
has body: var str = "Hello world, welcome to the universe."; var n = str.indexOf("welcome"); this will only tell you the start position of welcome. Do you want to retrieve the value? var str = "tag attr = tag value"; var n = str.indexOf("="); var res = str.substring(n,);
score: -1
type: Answer
downvote count: 1
upvote count: 0

http://stackoverflow.com/comment/41731916
has text: **NOTE:** The question quoted as already answering this one does, in fact, answer this question. But the question itself is very different and less likely to be found by someone with my question. I think this question should be reopened.
comment on: http://stackoverflow.com/q/26554424
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41762419
score: 0
comment on: http://stackoverflow.com/q/26561703
type: Comment
has text: When I use the following function, it prints: "error", "error" and then "an empty string" error: function(xhr, textStatus, error){ console.log(xhr.statusText); console.log(textStatus); console.log(error); }
type: QuestionComment

http://stackoverflow.com/comment/65885418
has text: I'm only updating data in place, so no array length or other super smart grid watches were triggered, thus I had to ng-if the grid out of the DOM and insert it after. with `enableRowHashing:false` it's working now without ng-if. Thank you very much!
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/37443511

http://stackoverflow.com/comment/41969807
type: Comment
has text: What do you mean by "return a numeric value"? Are you trying to count how many total videos are being shown?
comment on: http://stackoverflow.com/a/26683745
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41907170
comment on: http://stackoverflow.com/a/26648634
type: AnswerComment
score: 0
has text: No problem for adding custom actions and doing requests, this is currently what I am doing. But I feel like this is not clean. What I am interested is to assign more properties like `countFriend` to a parent `user` ressource (already resolved), which I am sometimes updated, so losing properties I newly assigned like `countFriend`.
type: Comment

http://stackoverflow.com/comment/41823264
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26604378
type: Comment
has text: Could you access to this hiddenfield in the code behind ? Like (HiddenField) hdFileId = (HiddenField) this.FindControl('hdFileId'); And then get the hdFileId.Value ?

http://stackoverflow.com/q/26521593
accepted answer: http://stackoverflow.com/a/26521628
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/26521661
has answer: http://stackoverflow.com/a/26521685
tagged with: javascript
type: AnsweredQuestion
has title: Select the without
downvote count: 0
has body: I have list with links. I would like to find the WITHOUT and wrap a to it. How can I check if the has no (in this case hello )? blabla hello
score: 1
has answer: http://stackoverflow.com/a/26521628
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26521661

http://stackoverflow.com/comment/41879531
has text: Could you show us how the JS is included ?
type: Comment
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/26636050

http://stackoverflow.com/a/26592204
type: AcceptedAnswer
has body: You have a Syntax Error in your function toggle1. Remove unwanted braces. Try this: But, if you are using jQuery, toggle is an inbuilt function. this is very simple as(Inline JS - Although Recommended as seperate Script): Remove your toggle1 function and change your two html onclick attributes: Please push this to see more information about me. Please push this to see my list of courses.
type: Answer
has comment: http://stackoverflow.com/comment/41808463
answers question: http://stackoverflow.com/q/26592094
has comment: http://stackoverflow.com/comment/41884221
accepted answer of: http://stackoverflow.com/q/26592094
score: 0

http://stackoverflow.com/a/27697660
has comment: http://stackoverflow.com/comment/43808811
type: Answer
has comment: http://stackoverflow.com/comment/43808923
has body: Check this out (from Beth Massi's blog): LightSwitch Tip: A Simple Way to Check User Permissions from the HTML Client http://blogs.msdn.com/b/bethmassi/archive/2013/04/12/lightswitch-tip-a-way-to-check-user-permissions-from-the-html-client.aspx
answers question: http://stackoverflow.com/q/26671499
has comment: http://stackoverflow.com/comment/43849778
has comment: http://stackoverflow.com/comment/43808893
score: 0

http://stackoverflow.com/comment/41929992
type: AnswerComment
type: Comment
has text: Just a quick reference without having to actually inject it, in services etc where a scope isn't available you'd have to inject, if a scope is available $scope.$root is the same object as $rootScope injected.
comment on: http://stackoverflow.com/a/26664083
score: 1

http://stackoverflow.com/comment/41715042
comment on: http://stackoverflow.com/q/26546071
type: Comment
has text: You don't need if block at all. Your condition will always be `true`
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41940564
type: QuestionComment
has text: It would help if you also specified what your specific environment is. ASP.NET MVC? Web API? WebForms?
score: 0
comment on: http://stackoverflow.com/q/26669307
type: Comment

http://stackoverflow.com/q/26515515
upvote count: 1
tagged with: public-html
has comment: http://stackoverflow.com/comment/41660975
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41660934
has comment: http://stackoverflow.com/comment/41661990
has comment: http://stackoverflow.com/comment/41660898
has body: I'm very new to Javascript and programming all together. I've been trying to get this Javascript code to run on my website and I just can't get it to work. var yourName = prompt("What is your name?"); if(yourName.length &lt; 10) { confirm("Your name is less than 10 letters long!"); } else { confirm("Your name is more than 10 letters long!"); } I've tried saving this as a .js file and uploading it to the public_html folder with FileZilla and adding &lt;script src="script.js"&gt;&lt;/script&gt; to my index HTML file. Can someone tell me what I'm doing wrong?
downvote count: 0
has comment: http://stackoverflow.com/comment/41661045
tagged with: web
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41660933
has title: Javascript website issue

http://stackoverflow.com/comment/41842256
comment on: http://stackoverflow.com/a/26615313
score: 0
type: Comment
type: AnswerComment
has text: `alert()` on `scroll` will be VERY annoying :P

http://stackoverflow.com/q/26609823
linked to: http://stackoverflow.com/q/10568065
tagged with: css
has comment: http://stackoverflow.com/comment/41831897
upvote count: 0
has answer: http://stackoverflow.com/a/26609878
has title: How to link css file to specific section of page without using iframe?
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41832217
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41831595
has body: I am in the process of writing a chrome extension for a specific web site. Web site has already obtained its own css. But my extension adds some content to the page. And I want a specific design - bootstrap.css and bootstrap-theme.css - for that content. So I can't simply link my 2 .css files, because they begin affecting the whole page. I've seen &lt;style scoped&gt;&lt;/style&gt; but it afects all parent Nodes except mine. Using of &lt;iframe&gt; is impossible: I need content to be written in one page only. So what do I need? That's it: `&lt;body&gt; &lt;div&gt; &lt;!-- Here Some page code, that I must not affect with css --&gt; &lt;/div&gt; &lt;div class="myclass" id="need_css"&gt; &lt;!--Here is my HTML-content, which needs bootstrap css--&gt; &lt;/div&gt; &lt;/body&gt;`
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/comment/41712875
comment on: http://stackoverflow.com/q/26544501
type: Comment
type: QuestionComment
has text: Possible duplicate http://stackoverflow.com/questions/5999118/add-or-update-query-string-parameter
score: 0

http://stackoverflow.com/a/26639759
type: Answer
accepted answer of: http://stackoverflow.com/q/26639690
has comment: http://stackoverflow.com/comment/41886885
has body: You can combine selectors in a single expression: find('input:text, input[type=password], select, textarea') Note input:text instead of input[type=text], as the latter won't find input tags with no explicit type (which default to text). jQuery('#signup-form'). find('input:text, input[type=password], select, textarea'). css('border', '1px solid red'); not this this, though and this
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26639690

http://stackoverflow.com/q/26542329
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41709657
has body: I try to submit a form after my ajax request done. I do code like following. But when I click the button ajax request is go to and send 200 ok feedback. But after that form not submit. What is wrong on this code?
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26545020
has answer: http://stackoverflow.com/a/26542527
tagged with: javascript
tagged with: forms
possible better answer: http://stackoverflow.com/a/26542420
has comment: http://stackoverflow.com/comment/41713259
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/41708844
tagged with: jquery
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/26544300
has comment: http://stackoverflow.com/comment/41709918
has title: Jquery form submission is not working
has answer: http://stackoverflow.com/a/26542420
has comment: http://stackoverflow.com/comment/41713357
accepted answer: http://stackoverflow.com/a/26545020
has comment: http://stackoverflow.com/comment/41709712

http://stackoverflow.com/a/26585391
type: Answer
answers question: http://stackoverflow.com/q/26585124
score: 1
upvote count: 1
has body: These are indeed special characters in AngularJS. The official documentation is pretty hard to find it is defined under the $compile-service documentation: https://docs.angularjs.org/api/ng/service/$compile#-scope-
downvote count: 0

http://stackoverflow.com/q/26588229
has title: How to change element at the page on hover?
accepted answer: http://stackoverflow.com/a/26588477
score: 0
has comment: http://stackoverflow.com/comment/41793830
answer count: 2
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26588411
has comment: http://stackoverflow.com/comment/41791452
has comment: http://stackoverflow.com/comment/41791678
tagged with: css
linked to: http://stackoverflow.com/q/20114874
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26588477
has comment: http://stackoverflow.com/comment/41791809
possible better answer: http://stackoverflow.com/a/26588411
type: Question
has comment: http://stackoverflow.com/comment/41791528
tagged with: javascript
has body: I have a page with 2 columns. Left column is a picture. Lorem ipsum dolor sit amet.. I want to situate table behind the picture and I need to make it visible only when someone places a mouse over a table's area. At default I want to place image and to place table (see below) on hover: Basic Table Layout Name City Tanmay Bangalore Sachin Mumbai Lorem ipsum dolor sit amet.. So, on hover: http://www.bootply.com/FmxIhVK0Pq by default: http://www.bootply.com/jS76schLTB

http://stackoverflow.com/comment/41718886
score: 0
type: Comment
has text: Here's what I'm talking about: http://jsbin.com/zuvujutazi/1/edit?html,js,output - if you don't use an observable for `_prop` (as in the top/red example) then no change notifications will come out of `prop` when its value changes.
type: AnswerComment
comment on: http://stackoverflow.com/a/26547751

http://stackoverflow.com/q/26608335
answer count: 2
has title: Using dynamic value in JSON
has answer: http://stackoverflow.com/a/26608388
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41829139
has comment: http://stackoverflow.com/comment/41828965
has comment: http://stackoverflow.com/comment/41828877
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41829064
has answer: http://stackoverflow.com/a/26608480
has comment: http://stackoverflow.com/comment/41828969
tagged with: php
tagged with: http://stackoverflow.com/tag/json
has body: I have a json file (myJson.json) in which I am adding a dynamic value [ { "menu":"&lt;?php echo $r; ?&gt;", } ] Now I am accessing this JSON in my Php file as : $r="HOME"; $str_data = file_get_contents("MyJson.json"); $data = json_decode($str_data,true); var_dump($data[0]['menu']); output:"&lt;?php echo $r; ?&gt;" Is there any way to get "HOME" as an output?
has comment: http://stackoverflow.com/comment/41829100
type: Question

http://stackoverflow.com/a/26605547
has comment: http://stackoverflow.com/comment/41824209
downvote count: 2
score: -2
has comment: http://stackoverflow.com/comment/41823791
has body: try function InputField(field, cssTarget, value, errMsg, validator) { var self = this; self.field = field, self.cssTarget = cssTarget, self.value = value, self.valid = false, self.errMsg = errMsg, self.errMsgStatus = false, self.validator = validator, this.toggleErrMsg = function() { if(self.valid === false &amp;&amp; self.errMsgStatus === false) { self.errMsgStatus = true; renderValidationError(self, false); } else { self.errMsgStatus = false; renderValidationError(self, true); } } this.toggleValid = function() { self.validator(); if(!self.valid) { self.cssTarget().addClass("inputInvalid"); } else { self.cssTarget().removeClass("inputInvalid"); } } }
upvote count: 0
answers question: http://stackoverflow.com/q/26605462
type: Answer

http://stackoverflow.com/comment/42173366
score: 0
comment on: http://stackoverflow.com/a/26770553
type: Comment
has text: Only thing I don't understand is this line: var max = arguments[1] || getSum(arr) Why is it an OR and what's arguments[1] - I couldn't find it anywhere else.
type: AnswerComment

http://stackoverflow.com/a/26663341
answers question: http://stackoverflow.com/q/26663188
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26663188
type: Answer
has body: You should change HTML in order to pass current campaign object to directive: and then in directive you will be able to access campaign object as $scope.progress: controller: function($scope, $element, $attrs) { $element.progressbar({ value: $scope.progress.percent }); } Of course you can pass in percent value directly as but I think that it makes sense to provide complete campaign object in case you will need some other properties other then percent.
score: 0

http://stackoverflow.com/a/26627120
has body: You can use is(':checked') to know the checkbox state, this will return true if checkbox is checked otherwise false. see below code if (!($("#Days_Sat").is(':checked')) &amp;&amp; !($("#Days_Sun").is(':checked')) &amp;&amp; !($("#Days_Mon").is(':checked')) &amp;&amp; !($("#Days_Tu").is(':checked')) &amp;&amp; !($("#Days_We").is(':checked')) &amp;&amp; !($("#Days_Tr").is(':checked')) &amp;&amp; !($("#Days_Fr").is(':checked'))) { alert("pleas select day"); } If you have all your concerned checkbox id starting with Days then you can use jQuery start with selector to get all checkbox with id starting from 'Days_' and get the length of object to find if none of them is selected. see below code var checked = $('input[id^="Days_"]:checked').length; if(checked==0) alert("pleas select day");
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26627075
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/26526735
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41681154
possible better answer: http://stackoverflow.com/a/26527237
has comment: http://stackoverflow.com/comment/41680719
has comment: http://stackoverflow.com/comment/41680674
answer count: 2
has comment: http://stackoverflow.com/comment/41681171
accepted answer: http://stackoverflow.com/a/26526894
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41680889
favorite count: 0
has title: redirect page using ajax & jquery (php)
tagged with: ajax
has body: i want to redirect from page a to page profile and in between there is a post session on them. in this case let's say the data is variable $name in string. so far my code is like this on page a jQuery("#result").on("click",function(e){ var $clicked = $(e.target); var $name = $clicked.find('.name').html(); var decoded = $("&lt;div/&gt;").html($name).text(); $('#searchid').val(decoded); //the ajax script $.ajax({ type: 'POST', url: 'b.php', data: 'result='+$name, success: function() { window.location.href = "profile.php"; // replace } }); }); and on page b the code is: &lt;?php echo $_POST['result']?&gt; the outcome should be the value from result in which determined on page a. but so there is an error message saying unidentified index. so where am i doing wrong?
score: 1
has answer: http://stackoverflow.com/a/26527237
upvote count: 1
tagged with: php
has answer: http://stackoverflow.com/a/26526894

http://stackoverflow.com/comment/41851320
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26620274
has text: Yes, you just need to do it. Read your data. Write it to a new array in the desired structure. What part is giving you trouble?

http://stackoverflow.com/comment/41756051
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26568463
has text: @Robert _q() returns correctly a `HTMLInputElement`

http://stackoverflow.com/q/26579028
tagged with: amazon-ec2
tagged with: javascript
has answer: http://stackoverflow.com/a/26579107
has comment: http://stackoverflow.com/comment/41775898
has comment: http://stackoverflow.com/comment/41775391
linked to: http://stackoverflow.com/q/5004159
answer count: 1
has body: I'm creating a an HTTPS server for the first time in Node, and the code (see below) works for a random port like 6643 but on port 443, it won't work. I get this error: [Debug][Server]: Initialized... [Debug][Control Center]: Application initialized... events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EACCES at errnoException (net.js:904:11) at Server._listen2 (net.js:1023:19) at listen (net.js:1064:10) at Server.listen (net.js:1138:5) at Object.module.exports.router (/home/ec2-user/Officeball/Versions/officeball_v0.0.5/server/custom_modules/server.js:52:5) at Object.&lt;anonymous&gt; (/home/ec2-user/Officeball/Versions/officeball_v0.0.5/server/control_center.js:15:59) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) This is on an Amazon Linux EC2 server. It's my understanding that once I set my domain's DNS A Name Record to the server's IP, when a user searches https://mydomain.com, the browser will look up my server's IP at port 443, which is supposedly the standard port for HTTPS traffic. So my understanding is that I need to serve https content via port 443. What am I doing wrong? Here's my server code: control_center.js (init) /* Control Center */ //DEFINE GLOBALS preloaded = {}; //GET DIRECT WORKING PATH var dirPath = process.cwd(); //REQUIRE CUSTOM MODULES var debug = new (require(dirPath + "/custom_modules/debug"))("Control Center"); var socket = require(dirPath + "/custom_modules/socket")(4546); // ! this is the relevant line var server = require(dirPath + "/custom_modules/server").router(443); //APP INITIALIZE debug.log("Application initialized..."); server.js /* Server */ //REQUIRE NPM MODULES var fs = require('fs'), https = require('https'), url = require('url'), path = require('path'); //GET DIRECT WORKING PATH var dirPath = process.cwd(); //REQUIRE CUSTOM MODULES //Snip! var debug = new (require(dirPath + "/custom_module…
has comment: http://stackoverflow.com/comment/41775376
favorite count: 0
has comment: http://stackoverflow.com/comment/41775405
linked to: http://stackoverflow.com/q/16770673
has title: Node.js https server: Can't listen to port 443 - Why?
accepted answer: http://stackoverflow.com/a/26579107
score: 13
upvote count: 13
tagged with: node.js
type: AnsweredQuestion
tagged with: ssl
linked to: http://stackoverflow.com/q/16573668
tagged with: https
type: Question
downvote count: 0

http://stackoverflow.com/comment/41782928
comment on: http://stackoverflow.com/a/26582240
score: 0
type: AnswerComment
has text: thank you so much! It's perfectly working as I needed. Especially the fiddle. I will consider this an answer.
type: Comment

http://stackoverflow.com/a/38714840
answers question: http://stackoverflow.com/q/26641875
type: Answer
has body: String.prototype.capitalize = function () { var sa = this.replace(/-/g, ' '); var saa = sa.toLowerCase(); var sb = saa.replace(/(^|\s)([a-z])/g, function (m, p1, p2) { return p1 + p2.toUpperCase(); }); var sc = sb.replace(/\s+/g, ' '); return sc; }; Use like 'String'.capitalize();
score: 0

http://stackoverflow.com/comment/41730883
score: 1
type: Comment
type: QuestionComment
has text: Your problem is that the number is too big for Javascript to accurately represent. For example, try this in the console: `var a = 525623822633172993; console.log(a)`. You'll get the same result. Your best bet is to probably send the number as a string.
comment on: http://stackoverflow.com/q/26554568

http://stackoverflow.com/q/26646788
accepted answer: http://stackoverflow.com/a/26648837
has title: ReferenceError: <Function> is not defined
has body: I am getting a ReferenceError: serializeProducts is not defined error in my console and not sure why. I have a Javascript file called components.js that contains a function called serializeProducts. A template calls this components.js script and then a script below uses the serializeProducts function. &lt;script type="text/javascript" src="{{STATIC_URL}}js/components.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; if($("#parsed_found").val() == undefined) items_found = "" else items_found = serializeProducts($("#parsed_found").val().split("\n")); if($("#parsed_not_found").val() == undefined) items_not_found = "" else items_not_found = serializeProductsNotFound($("#parsed_not_found").val().split("\n")); Notes components.js is definitely being found properly as I can access through console, 200 status, etc. I am not getting the error when running the script locally, but when I load the components.js file from Amazon S3 this is when it seems to not work, which I am having trouble figuring out as the permissions are public. I am wondering if this could be an issue with the components.js script not loading fully before the script on the page runs? I've tried adding a delay, but still am getting the error. Any other ideas? components.js: http://snapeda.s3.amazonaws.com/js/components.js
has comment: http://stackoverflow.com/comment/41911094
tagged with: django
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26648837
has comment: http://stackoverflow.com/comment/41901655
tagged with: javascript
type: Question
score: 0
answer count: 1

http://stackoverflow.com/a/26572910
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26572496
answers question: http://stackoverflow.com/q/26572496
type: AcceptedAnswer
downvote count: 0
has body: This is because of the different ways in which the two browsers handle the process of link assignment. You can sandbox the link assignment with a hidden iframe in Firefox to solve this issue. See below: ... Download This essentially causes FF to let the main window continue with it's work and creates an iframe which has a window of its own, referred to by iframeElement.contentWindow and follows the link assignment there. The iframe was hidden with css :) Some changes I done in your code: Always put the script tag before the ending body tag. This ensures that the DOM is loaded correctly and that we can work on it. Also, script loading is blocking, which slows down page load. Putting them at the end takes care of this. Don't use inline event listeners (i.e. onclick=blabla). Look up, learn, practice, and use addEventListener. Follow proper semantics, use button in place of button. A div with an onclick makes no sense at all.
has comment: http://stackoverflow.com/comment/41764431
type: Answer

http://stackoverflow.com/a/26592675
type: Answer
answers question: http://stackoverflow.com/q/26587370
score: 0
has body: Here is the entire js code - I've used the tidyup. I wasn't sure about using the shortcuts as I'm not sure the values will be correct. The latest fiddle - http://jsfiddle.net/Qh9X5/3340/ $(document).ready(function () { var pieChart = { el: "", init: function (el, options) { var clone = jQuery.extend(true, {}, options["data"]); pieChart.el = el; pieChart.setup(clone, options["width"], options["height"], options["r"], options["ir"]); }, getArc: function (radius, innerradius) { var arc = d3.svg.arc() .innerRadius(innerradius) .outerRadius(radius); return arc; }, setup: function (dataset, w, h, r, ir) { var padding = 80; this.width = w; this.height = h; this.radius = r this.innerradius = ir; this.color = d3.scale.category20(); this.pie = d3.layout.pie() .sort(null) .value(function (d) { return d.total; }); this.arc = this.getArc(this.radius, this.innerradius); this.svg = d3.select(pieChart.el["selector"]).append("svg") .attr("width", this.width + padding) .attr("height", this.height + padding); this.holder = this.svg.append("g") .attr("transform", "translate(" + ((this.width / 2) + (padding / 2)) + "," + ((this.height / 2) + (padding / 2)) + ")"); this.piec = this.holder.append("g") .attr("class", "piechart"); this.segments = this.holder.append("g") .attr("class", "segments"); this.labels = this.holder.append("g") .attr("class", "labels"); this.pointers = this.holder.append("g") .attr("class", "pointers"); this.legend = this.svg.append("g") .attr("class", "legend") .attr("transform", "translate(" + -(this.width / 4) + "," + this.height + ")"); }, oldPieData: "", pieTween: function (r, ir, d, i) { var that = this; var theOldDataInPie = pieChart.oldPieData; // Interpolate the arcs in data space var s0; var e0; if (theOldDataInPie[i]) { s0 = theOldDataInPie[i].startAngle; e0 = theOldDataInPie[i].endAngle; } else if (!(theOldDataInPie[i]) &amp;&amp; theOldDataInPie[i - 1]) { s0 = theOldDataInPie[i - 1].endAngle; e0 = theOldDataInPie[i - 1].endAngle; } else if (!(theOldDataI…

http://stackoverflow.com/q/26638945
accepted answer: http://stackoverflow.com/a/26639055
has title: editing a Div that is around an iframe via jquery from within said iframe
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/5525071
score: 0
tagged with: iframe
has answer: http://stackoverflow.com/a/26639055
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
has body: I'm sure this sounds a little odd, but here's the background... We utilize a company that loads their chat program, so we can support our customers, into our page. This is done via javascript and jquery, and creates a structure like this: &lt;div id="myid" style="...; right: 0px;..."&gt;&lt;div&gt;&lt;iframe&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt; There's a WHOLE lot more to that, but those are the important parts. Now the tool allows us to put custom scripting, which will be placed in the iframe. My goal is to just remove the "right: 0px", which I have done via the below code, but I don't want to put that code on every page that this tool integrates with. I would like to load it into the tool, and have it run when the iframe and divs are created. working code on parent: $(document).ready(function() { function checkPos() { $('#myId').each(function() { var oldstyle = $('#myId').attr('style'); var newstyle = oldstyle.replace(' right: 0px;',''); $('#myId').attr('style', newstyle); }); setTimeout(checkPos, 100); }; $(document).ready(function() { setTimeout(checkPos, 100); }); }); Once placed in the code include method they provide, I have trouble having it wait until the div tag actually has the "right: 0px;" in its style tag. the only thing I need to run is the three lines in the $('#myId').each(function() Basically, I need help with having the script in the iframe target the div that the iframe is nested in.
tagged with: jquery

http://stackoverflow.com/q/26648650
has answer: http://stackoverflow.com/a/26660916
downvote count: 0
score: 1
tagged with: loops
type: Question
type: AnsweredQuestion
tagged with: imacros
has title: imacros | login and loop (Second loop)
tagged with: nested-loops
has body: I've created this simple script. It logs in to reverbnation.com using a csv file and goes to the links and follow them. So there are two csv file 1-accounts 2-links What I want is to loop the whole links.csv file and go to next account. Then loop the same links csv file.How to do this? Thanks. SET !DATASOURCE accounts.csv SET !LOOP 1 SET !DATASOURCE_LINE TAB T=1 URL GOTO=http://www.reverbnation.com/user/login FRAME F=1 TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/user/secure_login_submit?message_region=become_fan_login_popup_message ATTR=NAME:user[login] CONTENT= SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/user/secure_login_submit?message_region=become_fan_login_popup_message ATTR=NAME:user[password] CONTENT={{!COL2} TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/user/secure_login_submit?message_region=become_fan_login_popup_message ATTR=NAME:commit SET !DATASOURCE links.csv URL GOTO= TAG POS=2 TYPE=A ATTR=TXT:Become&lt;SP&gt;A&lt;SP&gt;Fan
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26660916
tagged with: http://stackoverflow.com/tag/csv

http://stackoverflow.com/a/34257952
type: Answer
has body: I had this error because I had new'd the same mongo collection into two different variables. e.g. CrowdEstimates = new Mongo.Collection('crowdEstimates'); CrowdEstimateAggregations = new Mongo.Collection('crowdEstimates'); Cut and paste and distraction....
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/26565364

http://stackoverflow.com/a/26616162
upvote count: 36
has comment: http://stackoverflow.com/comment/41849797
has body: To make your loop non-blocking, you must break it into sections and allow the JS event processing loop to consume user events before carrying on to the next section. The easiest way to achieve this is to do a certain amount of work, and then use setTimeout(..., 0) to queue the next chunk of work. Crucially, that queueing allows the JS event loop to process any events that have been queued in the meantime before going on to the next piece of work: function yieldingLoop(count, chunksize, callback, finished) { var i = 0; (function chunk() { var end = Math.min(i + chunksize, count); for ( ; i &lt; end; ++i) { callback.call(null, i); } if (i &lt; count) { setTimeout(chunk, 0); } else { finished.call(null); } })(); } with usage: yieldingLoop(1000000, 1000, function(i) { // use i here }, function() { // loop done here }); See http://jsfiddle.net/alnitak/x3bwjjo6/ for a demo where the callback function just sets a variable to the current iteration count, and a separate setTimeout based loop polls the current value of that variable and updates the page with its value.
has comment: http://stackoverflow.com/comment/105596539
has comment: http://stackoverflow.com/comment/41845466
downvote count: 1
answers question: http://stackoverflow.com/q/26615966
score: 35
type: Answer

qunit
tags question: http://stackoverflow.com/q/26656266
tags question: http://stackoverflow.com/q/26530407
type: Tag
tags question: http://stackoverflow.com/q/26546362
tag name: qunit

http://stackoverflow.com/a/26646625
answers question: http://stackoverflow.com/q/26643320
score: 0
type: Answer
upvote count: 1
downvote count: 1
has body: You should be able to get it from req.body. See http://sailsjs.org/#/documentation/reference/req/req.body.html

http://stackoverflow.com/comment/41734323
comment on: http://stackoverflow.com/q/26556221
type: Comment
type: QuestionComment
has text: I used the solution with an array because in this way I can have under control the fact that the user could cancel some input texts and so, with the a unique key appended to the ID, I would have some empty random values. Es: ingrediente0, ingrediente1, ingrediente5 (cancelling ingrediente from 2 to 4 with the remove button).
score: 0

http://stackoverflow.com/q/26573981
tagged with: ruby-on-rails
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26576644
tagged with: jquery
tagged with: ajax
has title: replace image src using ajax and jquery
has body: In my app, i have a web page with lots of images whose source url is generated dynamically by making get request to the rails server, initially a default image is assigned to the source. After loading the page i make request to the server that return a json with new image URl, and then need to update the src of that image. Following is the code i am using in html.erb <%=@feeds.title%> <%@feeds.entries.each do|feed|%> <%=link_to feed.title,feed.url,target: "_blank"%> <input type="hidden" class="image-feed-url" value="<%=feed.entry_id%>"> <%=feed.summary%> <%if feed.published%> Published on: <%=feed.published.to_date.strftime("%b, %-d, %Y")%> <%end%> Source: <%=link_to 'Click here',@feeds.url, target: "_blank"%> <%end%> Need to update src in "img" tag having class "desc-img". In my JS file $(document).ready(function(){ all_feeds = $('.inner .feeds') for(i=0;i<all_feeds.length;i++) { element = all_feeds[i] feed_url = $(element).find('.image-feed-url').val() $.getJSON("/get_image_url?feed_url="+feed_url,function(data){ // data['link] is the actual image link returned by server $(element).find('.desc-img').attr('src',data['link']); }); } }); I had also tried using div with background image instead of img tag and updating background image of div in JS but nothing works. I am new to Jquery and Ajax, any help will be appreciated.
has comment: http://stackoverflow.com/comment/41766134
has comment: http://stackoverflow.com/comment/41765904
has comment: http://stackoverflow.com/comment/41766083
has comment: http://stackoverflow.com/comment/41766100
has comment: http://stackoverflow.com/comment/41765909
type: UnansweredQuestion

http://stackoverflow.com/a/26658277
has comment: http://stackoverflow.com/comment/42029452
upvote count: 1
has comment: http://stackoverflow.com/comment/42021306
accepted answer of: http://stackoverflow.com/q/26657632
has comment: http://stackoverflow.com/comment/42029207
answers question: http://stackoverflow.com/q/26657632
has comment: http://stackoverflow.com/comment/42013924
has comment: http://stackoverflow.com/comment/42029537
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42028401
has comment: http://stackoverflow.com/comment/42027614
type: Answer
has body: Print from client-side = form the browser via javascript It's not possible to do this from client-side (= from inside the Browser). There are hackish solutions out there, which might work for IE, like the one here: HTML / Javascript One Click Print (no dialogs), but in general "if you try to print, the dialog will pop up" = default behaviour of "window.print()". Print from server-side Basically you use the server-side (PHP) to print the document, instead of the client. So you might use an Ajax request (user clicks on the print button) handing the filename or the content to print over to the "print.php" file on the server, which does the job of pushing the content to the printer. Of course, you'd have to know which printer the user wants the content to be printed at... There are several ways to print from PHP. One option would be to use the php_printer extension: $handle = printer_open(); printer_set_option($handle, PRINTER_MODE, "raw"); printer_write($handle,$myfile); printer_close($handle); Or just copyor print to the printer: exec('copy C:\file.txt com1'); exec('copy C:\file.txt lpt1'); exec('print /d:LPT1: C:\file.txt'); If you have network printer, you could try to send your content to the network address. There are some PHP utils around to work with LPR: https://github.com/Craswer/PhpNetworkLprPrinter Referencing: https://stackoverflow.com/a/5695181/1163786 Question from comment: How can i set printer options from PHP on Windows? This very easy on Linux because lpr accepts options lpr &lt;options&gt; - but that's not the case on Windows. So, here are some Windows specific tricks to configure the printer: Windows7 has PRINTUI.EXE - a shorthand for RUNDLL32 PRINTUI.DLL,PrintUIEntry Please see PrintUI Reference for examples. You can configure your printer manually, for instance activate duplex mode, then save the settings file and re-use it, when printing from PHP. This allows to work with multiple printer configuration files. The easiest way is to configure the p…
score: 1

http://stackoverflow.com/comment/41938221
comment on: http://stackoverflow.com/a/26668372
score: 0
type: AnswerComment
has text: Please provide a bit more context or explanation to your answer
type: Comment

http://stackoverflow.com/q/26578180
has comment: http://stackoverflow.com/comment/41774903
favorite count: 0
has comment: http://stackoverflow.com/comment/41776332
has comment: http://stackoverflow.com/comment/41776068
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/9153445
answer count: 0
has comment: http://stackoverflow.com/comment/41774659
has body: I have a problem with a jquery custom scrollbar. My document is made of different iframes. In particular, there're two: one containing a Table Of Contents (toc_iframe) and another one showing the content of the topic selected in the TOC (main_iframe). The toc_iframe is using a jquery custom scrollbar, applied to an element with id "#content", and I'm trying to get a reference to the scrollbar from the main_iframe in order to call a function of its api. To do so, I'm using the jquery selector: $("#content",parent.window.frames[0].document) The selector works fine (tested with console.log), but when I call a function of the scrollbar on it, I get the classic error "Uncaught TypeError: undefined is not a function". $("#content",parent.window.frames[0].document).mCustomScrollbar("scrollTo",myElt); Anyone knows what I'm doing wrong? Thanks.
upvote count: 1
has comment: http://stackoverflow.com/comment/41773882
type: Question
has title: Call function on object trhough jquery selector from iframe to other iframe
score: 1
has comment: http://stackoverflow.com/comment/41775940
has comment: http://stackoverflow.com/comment/41776245
has comment: http://stackoverflow.com/comment/41773903
has comment: http://stackoverflow.com/comment/41775234
has comment: http://stackoverflow.com/comment/41774619
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41901065
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26648118
score: 0
has text: @Scimonster `.val()` returns `undefined` when the jQuery result set is empty.

http://stackoverflow.com/comment/41734248
has text: .pcss3t > ul > li { position: absolute; background:#E5E5E5; width: 100%; overflow:auto; padding: 0px 40px 0px; box-sizing: border-box; -moz-box-sizing: border-box; opacity: 0; transition: all 0.5s; -o-transition: all 0.5s; -ms-transition: all 0.5s; -moz-transition: all 0.5s; -webkit-transition: all 0.5s; }
comment on: http://stackoverflow.com/a/26555634
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41671654
score: 0
comment on: http://stackoverflow.com/a/26520844
type: Comment
type: AnswerComment
has text: @joe refresh my answer I added the jQuery

http://stackoverflow.com/a/26653812
type: Answer
upvote count: 0
score: -1
has body: It turns out I was passing in the variable cid as well as declaring a new variable cid in this function. I renamed the second variable to something else and it works now.
downvote count: 1
answers question: http://stackoverflow.com/q/26633987

http://stackoverflow.com/a/26574260
has comment: http://stackoverflow.com/comment/41766638
has body: What you are doing is returning a new function that takes two parameters. To return a promise var Promise = require('es6-promise').Promise; function timePrinting(num) { return new Promise(function (resolve, reject) { resolve("Complete printing " + num + " seconds"); // write this line when the promise should be fulfilled }); } With this, you can do timePrinting(100).then(function (result) { console.log(result); }); To log the string you passed to resolve Good article about ES6 promises: http://www.html5rocks.com/en/tutorials/es6/promises/
has comment: http://stackoverflow.com/comment/41766926
has comment: http://stackoverflow.com/comment/41766302
has comment: http://stackoverflow.com/comment/41766351
score: 0
has comment: http://stackoverflow.com/comment/41766390
has comment: http://stackoverflow.com/comment/41766535
has comment: http://stackoverflow.com/comment/41766401
has comment: http://stackoverflow.com/comment/41766327
type: Answer
has comment: http://stackoverflow.com/comment/41766555
has comment: http://stackoverflow.com/comment/41766174
has comment: http://stackoverflow.com/comment/41772984
has comment: http://stackoverflow.com/comment/41766750
has comment: http://stackoverflow.com/comment/41766869
answers question: http://stackoverflow.com/q/26573785
has comment: http://stackoverflow.com/comment/41767029

http://stackoverflow.com/comment/41732346
comment on: http://stackoverflow.com/q/26555236
score: 0
type: Comment
has text: Its really hard to debug just the code. please do a [JSfiddle](http://jsfiddle.net/). so we can give a better reply
type: QuestionComment

http://stackoverflow.com/q/26648889
tagged with: javascript
has comment: http://stackoverflow.com/comment/41902223
score: 0
has answer: http://stackoverflow.com/a/26649323
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26648977
duplicate of: http://stackoverflow.com/q/26633996
has body: How do I get an angular expression working inside a script tag... I am pretty new to this and need help? Here is an example of my java script code: Here is an example of my array: .controller('TodoCtrl', function($scope, $ionicPopup, $timeout, $ionicModal, $ionicSideMenuDelegate) { $scope.cardss = {id:1, title:'Frank', src:'img/Frank.png',details:'This will be the products description!'}, {id:2, title:'Generali', src:'img/Generali.png',details:'This will be the products description!'}, {id:3, title:'John Lewis', src:'img/JohnLewis.png',details:'This will be the products description!'}, ];
has title: how to use an angular expression working inside a script tag
tagged with: hybrid-mobile-app
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/26633996

http://stackoverflow.com/a/26544343
type: Answer
upvote count: 7
score: 7
accepted answer of: http://stackoverflow.com/q/26544067
answers question: http://stackoverflow.com/q/26544067
has body: There is no need of :before pseudo class. Check this fiddle. .ellipsis:after { content:"\02026"; position: absolute; /* removed position: relative */ top: 200px; /* equal to max-height value */ right: 0px; margin-top: -25px; /* equal to line-height value */ /* other styles */ /* removed float property */ } Working Fiddle In the above fiddle, I removed :before pseudo class and set the position of the :after pseudo class to top by 200px which is equal to the given max-height value of the .ellipsis. and to remove the default upper and lower gaps of the container, I added margin-top: -25px which is equal to the given line-height. Note: You can apply just top: 175px which is result value of subtraction of given max-height and line-height values.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41712814

http://stackoverflow.com/a/26543644
has comment: http://stackoverflow.com/comment/41711017
answers question: http://stackoverflow.com/q/26543609
score: 0
has comment: http://stackoverflow.com/comment/41711043
type: Answer
has comment: http://stackoverflow.com/comment/41711109
has body: Fix your ng-model: Replace: With: I used item to avoid confusion about what variable is what.
has comment: http://stackoverflow.com/comment/41711160

http://stackoverflow.com/comment/41801843
type: AnswerComment
has text: I did have to make one small change though since it appears that inside the annon self executing func that 'this' is not accessable.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26593183

http://stackoverflow.com/q/26640356
tagged with: angularjs-controller
has answer: http://stackoverflow.com/a/26640533
has body: I have a directive that gets data from the database but I want it to use different repositories (with the same API) in different places in the project. The incoming data has similar fields so that is not a problem. Is there a way to pass that as a parameter through the directive tag like or what would be the best practice so I don't have if/else nightmares and dependency injection bloat using a string that would represent the service name? How would that be done for plain controllers? Thanks
tagged with: angularjs-directive
type: AnsweredQuestion
tagged with: javascript
linked to: http://stackoverflow.com/q/14415845
type: Question
score: 0
tagged with: angularjs-service
answer count: 1
accepted answer: http://stackoverflow.com/a/26640533
tagged with: angularjs
has title: How to dynamically choose a repository/service to be used in a directive/controller?

http://stackoverflow.com/comment/41919414
has text: It's also worth noting that === acts differently when referring to non-complex types, in which case it will return true if the objects have equal value **and** are the same type.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26658374
type: AnswerComment

http://stackoverflow.com/q/26516894
accepted answer: http://stackoverflow.com/a/26516953
tagged with: integer
upvote count: 0
downvote count: 2
has body: The problem when I'm converting string in an array to integers in an array is that the numbers are rounded. See my code and comments console.log(rating); // ["6.4", "7.4", "6.3"] //convert to integer for (v = 0; v &lt; rating.length; v++) { rating[v] = (parseInt(rating[v])); //&lt;&lt; here it goes wrong I think.. console.log(rating); } rating.sort() console.log(rating) //expect to see [6.4, 6.3, 7.4] //what I see [6, 6, 7] How does this happen and how can i fix this?!
has answer: http://stackoverflow.com/a/26516953
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41663949
type: Question
has comment: http://stackoverflow.com/comment/41663714
score: -2
answer count: 1
tagged with: arrays
tagged with: javascript
tagged with: string
has title: string number with comma's to integer with comma
tagged with: converters
has comment: http://stackoverflow.com/comment/41663813
favorite count: 0

http://stackoverflow.com/comment/41896494
comment on: http://stackoverflow.com/q/26644612
has text: That did it @sarvesh. Thanks for your help. I have not tried using the JS SDK because I am using Titanium to write a mobile app. Titanium internally uses JS, and so using REST API was not too bad. Frankly though, I am not even sure if it will work with Titanium or not. Thanks again for your help. I will mark it as resolved.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26585791
answers question: http://stackoverflow.com/q/26581283
has body: Here is an example
type: Answer
score: 0

http://stackoverflow.com/a/26548288
has comment: http://stackoverflow.com/comment/41719464
has comment: http://stackoverflow.com/comment/41719895
has comment: http://stackoverflow.com/comment/41720771
has comment: http://stackoverflow.com/comment/41719388
has body: It seems you are looking for "dot notation". This is a way of specifying sub-elements of objects without specifying the whole thing. But you did specify an actual model you your schema did you not: var Model = mongoose.model( "Model", myModel ); mongoose.connect('mongodb://localhost/test'); Model.findByIdAndUpdate(req.mymodel.arrayA.id(req.params.id), { "$push": { "arrayA.subArrayA": { "fieldA": valA } } }, function(err) { // some stuff }); So now you can notate an update without overriding the whole object at a given level.
score: 0
answers question: http://stackoverflow.com/q/26548204
type: Answer
has comment: http://stackoverflow.com/comment/41719533

http://stackoverflow.com/comment/41889758
type: AnswerComment
comment on: http://stackoverflow.com/a/26636129
type: Comment
has text: Yes you can do it, just change the selector from $(":button") to $("#yourButtonID"). Remember that you you have to include this code INSIDE the page, which is going to be loaded in iFrame.
score: 0

http://stackoverflow.com/q/26634706
upvote count: 1
tagged with: php
has body: I am attempting to create a variable from a database array when an HTML link is clicked. The goal is to redirect the user to a form populated using one piece of array data. In other words, the database will be queried and form populated according to which link is clicked (whatever the values of $row[1], $row[2], and $row[3] are). &lt;?php ini_set('display_errors',1); error_reporting(E_ALL); $DATE = date('Y-m-d'); require_once 'IRCconfig.php'; $connection = new mysqli($db_hostname, $db_username, $db_password, $db_database); if ($connection-&gt;connect_error) die($connection-&gt;connect_error); $query = "SELECT * FROM CLIENT_CHECKIN1 WHERE DATE&gt;='$DATE'"; $result = $connection-&gt;query($query); if (!$result) die ("Database access failed: " . $connection-&gt;error); $rows = $result-&gt;num_rows; for ($j = 0 ; $j &lt; $rows ; ++$j) { $result-&gt;data_seek($j); $row = $result-&gt;fetch_array(MYSQLI_NUM); echo &lt;&lt;&lt;_END &lt;pre&gt; &lt;a href="http://localhost/populateClientCheckin.php" class="post"&gt;$row[1] $row[2] $row[3]&lt;/a&gt; &lt;/pre&gt; _END; } ?&gt; If anyone can provide me with some incite as to how I could accomplish this I'd appreciate it greatly.
has answer: http://stackoverflow.com/a/26635233
downvote count: 1
has comment: http://stackoverflow.com/comment/41877150
type: Question
has comment: http://stackoverflow.com/comment/41878030
has comment: http://stackoverflow.com/comment/41877942
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41877025
score: 0
has title: Create session variables out of looped database values
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41878383
favorite count: 0
has comment: http://stackoverflow.com/comment/41878587
type: UnansweredQuestion
tagged with: mysqli
has comment: http://stackoverflow.com/comment/41877499

http://stackoverflow.com/a/26546209
has comment: http://stackoverflow.com/comment/41715456
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41715909
type: Answer
has body: for(var prop in object1){ if(object1.hasOwnProperty(prop)){ if(!(prop in object2)){ object2[prop] = object1[prop]; } } }
answers question: http://stackoverflow.com/q/26546090

http://stackoverflow.com/comment/41934486
score: 0
type: AnswerComment
has text: Ok then problem solved? :) You just keep your ` ` and no need for using `ajax`
type: Comment
comment on: http://stackoverflow.com/a/26666118

http://stackoverflow.com/comment/41825656
has text: Height is not a problem. I'm using the plugin `autoresize` and it works very well, but only for height... The width stays fixed.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26606278
type: AnswerComment

http://stackoverflow.com/q/26656266
has body: I have a website that's build using JS for the client-side and PHP for the backend with a MySQL backing DB. I started unit testing everything, and the back-end was fairly straightforward using PHPUnit. In the same spirit, I wanted to start testing the client-side and opted for QUnit. However, we're using Kendo UI and I'm a little lost as to how I could automate my tests without practically reinventing the wheel. Say I have a modify.js file, where after I define everything I have the following jQuery: $(document).ready(function() { $("#user-menu").kendoMenu(); var modify = $('#modify'); kendo.bind(modify, modifyViewModel); kendo.bind($('#numTagWindow'), numTagWindow); modifyViewModel.initForm(); $(window).on("resize", function() { kendo.resize($("#trip")); }); }); Here, modify.php is an html file with some PHP and corresponds to the view that users get when they go to modify some corresponding setting. In a separate jsTest.js file which is incuded in modify.php, I have all my QUnit tests pertaining to modify.js. My question is the following: What would be the standard approach for unit testing here, automated or otherwise? As it stands, since the same HTML page is being used for numerous tests my only current option is manually trying out every single option to see if the assertions pass. In the case where a said function depends on the type of pre-selected input, this gets even worse. I'm forced to put a different number of expected assertions based on input (admittedly, this may be a design flaw). How should I approach this? Would it be possible to just 'reset' the page using multiple $(document).ready's and run the tests in that manner? In that case, what would be the easiest way to provide the user input to the client-side code?
tagged with: unit-testing
type: Question
has title: Automating Javascript unit testing... where to start?
tagged with: javascript
score: 0
tagged with: mocking
answer count: 1
accepted answer: http://stackoverflow.com/a/26661193
tagged with: jquery
has answer: http://stackoverflow.com/a/26661193
tagged with: qunit
type: AnsweredQuestion

http://stackoverflow.com/q/26589548
has answer: http://stackoverflow.com/a/26589873
has body: I am working in webview. I have a toggle button in my web page and when I click that button it will call the javascript function. But it not properly working as expected. When I call that function when it come to addition operation it stuck. The only thing I done differently is I have webview inside listview. function fnTogglePositive(obj){ oTable = document.getElementById("tblData"); obj.innerHTML = "ALL"; var i = 0; fnCheck(0,6); } else{ obj.innerHTML = "POSITIVE"; } } function fnCheck(i,n){ var k = parseInt(i) + 1; if(i&lt;n){ document.getElementById("txt").value = k ; } else return 0; } I loaded this javascript function in webview inside the list view. When I called the fnTogglePositive function it's not calculating the value, when the webview is inside the listview. I created a separate activity which contains only the webview its working fine. I can able to figure out where it stuck. The function call happened but it stuck in calculating the value. Why it stuck in this point? Why this issue happened?
tagged with: webview
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: webview inside the listview in Android, javascript arithmetic operations not working
type: UnansweredQuestion
tagged with: android

audiocontext
type: Tag
tags question: http://stackoverflow.com/q/26532328
tag name: audiocontext

http://stackoverflow.com/q/26523357
tagged with: image
has title: blueimg jquery file upload - cannot delete uploaded images from server
has answer: http://stackoverflow.com/a/26526015
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I am using blueimg jquery file upload Basic Plus UI version and it uploads image to server fine. http://blueimp.github.io/jQuery-File-Upload/ Howver, then I click delete button to delete uploaded image(s), the image get deleted on screen, BUT not deleted from server directory where the images are. When I refresh the screen all the uploaded images (regardless deleted or not) re-appear on the screen. Could anyone tell me: 1. How to actually delete the images from server? (not just from web screen) 2. When I refresh the screen, do not show any loaded images, just clear the screen (re start upload process) Thanks in advance!
type: UnansweredQuestion
score: 0
tagged with: php

http://stackoverflow.com/comment/41839005
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26609794
has text: I see, so you need a generic regular polygon scaling algorithm. I've edited may answer to show how to do that using trigonometry. Good luck with your project!

http://stackoverflow.com/comment/41910321
has text: Both methods unfortunately still call the function once the current one is complete.
comment on: http://stackoverflow.com/a/26653257
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41689317
type: Comment
comment on: http://stackoverflow.com/q/26531412
has text: Even removing the `.` doesn't fix this issue.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41766751
comment on: http://stackoverflow.com/a/26573670
type: AnswerComment
score: 0
type: Comment
has text: Thanks, I heard some people mention this before, though I didn't know it was that important. Sadly I am still not getting it to work.

http://stackoverflow.com/comment/41789285
comment on: http://stackoverflow.com/q/26586785
score: 0
type: Comment
type: QuestionComment
has text: Ok @AdamH but please make sure you learn basics..these are basics only

http://stackoverflow.com/q/26563551
type: Question
has answer: http://stackoverflow.com/a/26563702
has body: For example I am getting a reference error L is not defined where L is leaflet. I have followed their tutorial, and here is what I have just before the end of my body: I've checked and the hyperlink to the js file works.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41746843
downvote count: 0
answer count: 1
has title: How to debug reference error when a library is not being loaded?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26563702
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41747002
type: AnsweredQuestion
tagged with: leaflet
score: 1
upvote count: 1

http://stackoverflow.com/comment/41884614
type: AnswerComment
type: Comment
has text: Rather than using setTimeout to update the activeElement, you can use information from the blur event: `$(e.originalEvent.explicitOriginalTarget).closest(....`
comment on: http://stackoverflow.com/a/26638625
score: 1

http://stackoverflow.com/comment/41797729
comment on: http://stackoverflow.com/q/26589646
score: 0
type: Comment
type: QuestionComment
has text: You said it's a user control correct? Those don't have pages for themselves - they have to be placed into a page. If you want this to be a user control, you should create a separate page dedicated to making the service calls that will resolve to an actual URL. (Similarly, if you take the WebMethod out and put it in the actual ASPX page, what happens?)

http://stackoverflow.com/comment/41712072
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26543834
has text: Nice solution. Got a phone call and didn't notice you had updated your answer before submitting my own.

http://stackoverflow.com/comment/41943531
has text: You really need to put this in a jsFiddle. My bet is that there's something else on the site that's knocking this out. Probably nothing to do with Chrome.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26668036

http://stackoverflow.com/a/26572336
answers question: http://stackoverflow.com/q/26571989
has body: You need to wrap each method name with quotes: events: { 'click #save-todo': 'createOnEnter', 'click #clear-todos': 'cleartodos', 'click #close-todos': 'closetodos' },
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26571989
upvote count: 2

http://stackoverflow.com/comment/41923370
comment on: http://stackoverflow.com/a/26660384
has text: Thanks @sherwaniusman, this is definitely a start. Gonna work on an ng-if to fire the onEditScacContact button.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26634675
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 3
tagged with: google-chrome
downvote count: 1
type: Question
has title: Print div is not working in chrome and not taking the style as the link
tagged with: javascript
has body: I am using this http://www.bennadel.com/blog/1591-ask-ben-print-part-of-a-web-page-with-jquery.htm Using this jquery to print a div, but its not working in chrome, also it need the style to be inernal in the same page and cannot use the external css. // code // code Print // section that need to be printed // images, css form // code Any better suggestions any way where we can integrate this https://github.com/jasonday/printThis if (opt.importCSS) $("link[rel=stylesheet]").each(function() { var href = $(this).attr("href"); if (href) { var media = $(this).attr("media") || "all"; $doc.find("head").append(" ") } });
upvote count: 4
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26636183
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41878507

http://stackoverflow.com/a/26591036
score: 0
has comment: http://stackoverflow.com/comment/41797716
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41797135
type: Answer
has comment: http://stackoverflow.com/comment/41797310
answers question: http://stackoverflow.com/q/26591035
has comment: http://stackoverflow.com/comment/41797208
has comment: http://stackoverflow.com/comment/41797397
has body: Not directly by using default jQuery, but you can implement your own function, which you can use one jQuery elements afterwards: (function ($) { $.fn.isOnScreen = function () { var topView = $(window).scrollTop(); var botView = topView + $(window).height(); var topElement = this.offset().top; var botElement = topElement + this.height(); return ((botElement &lt;= botView) &amp;&amp; (topElement &gt;= topView)); } })(jQuery); After adding this code you can call $('#yourElementId').isOnScreen() which will return true if the whole element is on screen and false if it's not. You can also play around with it a bit, so it would return true if at least a quarter of the element is visible on screen, for example like this: (function ($) { $.fn.isOnScreen = function () { var topView = $(window).scrollTop(); var botView = topView + $(window).height(); var topElement = this.offset().top; var botElement = topElement + (this.height() / 4); //&lt;--- return ((botElement &lt;= botView) &amp;&amp; (topElement &gt;= topView)); } })(jQuery);

http://stackoverflow.com/comment/41914644
score: 0
comment on: http://stackoverflow.com/q/26645639
type: Comment
type: QuestionComment
has text: Then you don't need a content script even. See http://stackoverflow.com/a/26095346/934239

http://stackoverflow.com/q/26596842
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26631871
has title: JavaScript Get Current Time & Countdown
tagged with: timer
has answer: http://stackoverflow.com/a/26597560
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41808300
has body: I'm using JavaScript to get the Current Time, and I want it to countdown every 2 hours starting at 12am est. I currently have code that counts down 2 hours and resets, but I want it to do it based off the time from 12am. I either want to get my current code to start at 12am rather than when some accesses the page or I need to do it some other way (open to suggestions). Thanks a lot! var startTime = new Date(), expiryTime = new Date(), hourElem = document.getElementById('js-hour'), minuteElem = document.getElementById('js-minute'), secondElem = document.getElementById('js-second'); // Set up expiry time expiryTime.setHours( expiryTime.getHours() + 2 ); expiryTime.setMinutes( expiryTime.getMinutes() + 0 ); expiryTime.setSeconds( expiryTime.getSeconds() + 0 ); var diffInMs = expiryTime - startTime, diffInSecs = Math.round( diffInMs / 1000 ), amountOfHours = Math.floor( diffInSecs / 3600 ), amountOfSeconds = diffInSecs - (amountOfHours * 3600), amountOfMinutes = Math.floor( amountOfSeconds / 60 ), amountOfSeconds = amountOfSeconds - ( amountOfMinutes * 60 ); // Set up the countdown timer for display // Set up the hours if( amountOfHours &gt; 0 ) { hourElem.innerHTML = (amountOfHours &lt; 10) ? '0' + amountOfHours + ' : ' : amountOfHours + ' : '; } else { hourElem.innerHTML = '00 : '; } // Set up the minutes if( amountOfMinutes &gt; 0 ) { minuteElem.innerHTML = ( amountOfMinutes &lt; 10 ) ? '0' + amountOfMinutes + ' : ' : amountOfMinutes + ' : '; } else { minuteElem.innerHTML = '00 : '; } // // Set up the seconds if( amountOfSeconds &gt; 0 ) { secondElem.innerHTML = (amountOfSeconds &lt; 10) ? '0' + amountOfSeconds : amountOfSeconds; } else { secondElem.innerHTML = '00'; } function countDown() { var dateNow = new Date(); // If we're not at the end of the timer, continue the countdown if( expiryTime &gt; dateNow ) { // References to current countdown values var hours = parseInt(hourElem.innerHTML); minutes = parseInt(minuteElem.innerHTML), seconds = parseInt(secondElem.in…
has comment: http://stackoverflow.com/comment/41808434
type: Question
has comment: http://stackoverflow.com/comment/41808956
tagged with: javascript

http://stackoverflow.com/q/26645847
type: UnansweredQuestion
tagged with: facebook
has body: I have magento site, when I post my site link in Facebook status it populate my site and it show me warning error like JavaScript seems to be disabled in your browser. You must have JavaScript enabled in your browser to utilize the functionality of this website. I tried the following method but it not works. System -> Configuration -> Browser Capabilities Detection - > Redirect to CMS-page if cookies are disabled - No Show notice if JavaScipt is disabled - No Please anyone help me on this - Thanks in advance
has title: JavaScript seems to be disabled in your browser - Magento
score: 2
has comment: http://stackoverflow.com/comment/107822131
type: Question
upvote count: 2
tagged with: magento
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/28466941
downvote count: 0

http://stackoverflow.com/q/26670677
upvote count: 6
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/67916874
score: 6
possible better answer: http://stackoverflow.com/a/36060484
has body: I am using recording.js. The functionality is working fine but after I stop recording the red icon still appears in chrome's tab(near title). Please suggest what to do. Sorry if it is damn easy.. :P This is my code: window.URL = window.URL || window.webkitURL; navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; var recorder; var savedSrc = ''; var audio = document.querySelector('audio'); var onFail = function(e) { console.log('Rejected!', e); }; var onSuccess = function(s) { var context = new AudioContext(); var mediaStreamSource = context.createMediaStreamSource(s); recorder = new Recorder(mediaStreamSource); recorder.record(); $('#recordText').html('Recording...'); // audio loopback // mediaStreamSource.connect(context.destination); }; function startRecording() { if (navigator.getUserMedia) { navigator.getUserMedia( { video : false, audio : true, toString : function() { return "audio"; } }, onSuccess, onFail); } else { console.log('navigator.getUserMedia not present'); } }; function stopRecording() { $('#recordText').html('Record'); recorder.stop(); recorder.exportWAV(function(s) { audio.src = window.URL.createObjectURL(s); }); }
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26671315
accepted answer: http://stackoverflow.com/a/26671315
has title: Remove red icon after recording has stopped
has answer: http://stackoverflow.com/a/36060789
downvote count: 0
has answer: http://stackoverflow.com/a/36060484
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41941884

http://stackoverflow.com/q/26625224
type: UnansweredQuestion
downvote count: 2
has body: How can I focus on paragraph with id = con3 in the following html code? HTML: focus JavaScript: function foc() { $("#dragnresize").append(' '); var foc = $('#dragnresize').contents().find('p#con3').html(); $(foc).focus(); }
score: -2
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 2
has title: Focus on paragraph with a specific id
has answer: http://stackoverflow.com/a/26625243
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26625884

http://stackoverflow.com/comment/41694123
comment on: http://stackoverflow.com/q/26533977
has text: `pathArray` is probably not a string. If it is an array, you probably want `pathArray.some(function(v) { return v.toLowerCase() === 'blah';});` .
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/106187745
has text: @Herbert Regardless of whether it's possible, it's still a bad idea. Sticking it behind Nginx is nearly always going to be more performant and more secure.
type: AnswerComment
comment on: http://stackoverflow.com/a/26579107
score: 0
type: Comment

http://stackoverflow.com/comment/41720897
type: QuestionComment
has text: That's still jquery, jsp is a web technology for writing web applications in java, not javascript
comment on: http://stackoverflow.com/q/26524371
score: 0
type: Comment

http://stackoverflow.com/a/26647733
score: 0
answers question: http://stackoverflow.com/q/26646895
has comment: http://stackoverflow.com/comment/41900238
has body: Because text selection is a function of native app (browser) and you are working on web app that is inside browser(native app) therefore you can not create any layer upon native app.
type: Answer

http://stackoverflow.com/comment/41816099
type: Comment
has text: @Narayana, I have added some ajax code snippet that might give you some clarity on what I was suggesting. This assumes that you will use Jquery. However you can make http requests in pure javascript as well. Check this link - http://www.w3schools.com/xml/xml_http.asp
comment on: http://stackoverflow.com/a/26600821
type: AnswerComment
score: 0

http://stackoverflow.com/a/26527117
upvote count: 1
has body: The major difference between cookies &amp; localstorage is that cookies have expiration date (even if it's far in the future), but entries of localstorage don't. localstorage is an HTML-5 thing. So, there're plenty of legacy browsers that have support of cookies (of course), but don't support localstorage (like IE6,7 and others). I think among these 3 things, cookies have the broadest support.
answers question: http://stackoverflow.com/q/26526944
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26641536
possible better answer: http://stackoverflow.com/a/26642309
has comment: http://stackoverflow.com/comment/41890292
tagged with: javascript
score: 0
answer count: 2
tagged with: angular-ui
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/41890112
tagged with: angularjs
has answer: http://stackoverflow.com/a/26642309
has comment: http://stackoverflow.com/comment/41890242
has title: Set different text/value for dropdown with Angularjs
accepted answer: http://stackoverflow.com/a/26642259
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26642259
has body: I would like to set different text / value for a dropdown I have with AngularJS. Currently both the text and the value are same by using this syntax: I tried this approach: {{v.Text}} But I've got the same text/value combination. What do I need to change to make this work with AngularJS?

asp.net
tags question: http://stackoverflow.com/q/26529838
tags question: http://stackoverflow.com/q/26604703
tags question: http://stackoverflow.com/q/26550477
tags question: http://stackoverflow.com/q/26647984
tags question: http://stackoverflow.com/q/26552187
tags question: http://stackoverflow.com/q/26595056
tags question: http://stackoverflow.com/q/26595857
tags question: http://stackoverflow.com/q/26609737
tags question: http://stackoverflow.com/q/26582045
tags question: http://stackoverflow.com/q/26671619
tags question: http://stackoverflow.com/q/26641722
tags question: http://stackoverflow.com/q/26586431
tags question: http://stackoverflow.com/q/26584811
tags question: http://stackoverflow.com/q/26668324
tags question: http://stackoverflow.com/q/26624208
tags question: http://stackoverflow.com/q/26544825
tags question: http://stackoverflow.com/q/26617507
tags question: http://stackoverflow.com/q/26541369
tags question: http://stackoverflow.com/q/26651283
tags question: http://stackoverflow.com/q/26623479
tags question: http://stackoverflow.com/q/26669297
tags question: http://stackoverflow.com/q/26605361
tags question: http://stackoverflow.com/q/26583045
tags question: http://stackoverflow.com/q/26538888
tags question: http://stackoverflow.com/q/26546342
tags question: http://stackoverflow.com/q/26534041
tags question: http://stackoverflow.com/q/26632223
tags question: http://stackoverflow.com/q/26630092
tags question: http://stackoverflow.com/q/26653851
tags question: http://stackoverflow.com/q/26634851
tags question: http://stackoverflow.com/q/26652886
tags question: http://stackoverflow.com/q/26547890
tags question: http://stackoverflow.com/q/26662961
tags question: http://stackoverflow.com/q/26564307
tags question: http://stackoverflow.com/q/26555908
tags question: http://stackoverflow.com/q/26573070
tags question: http://stackoverflow.com/q/26546885
tags question: http://stackoverflow.com/q/26578789
tags question: http://stackoverflow.com/q/26668955
tags question: http://stackoverflow.com/q/26661846
tags question: http://stackoverflow.com/q/26603607
tags question: http://stackoverflow.com/q/26595300
tags question: http://stackoverflow.com/q/26547799
tags question: http://stackoverflow.com/q/26587211
tags question: http://stackoverflow.com/q/26585578
tags question: http://stackoverflow.com/q/26608028
tags question: http://stackoverflow.com/q/26625273
tags question: http://stackoverflow.com/q/26656914
tags question: http://stackoverflow.com/q/26669242
tags question: http://stackoverflow.com/q/26623619
tags question: http://stackoverflow.com/q/26670700
tags question: http://stackoverflow.com/q/26663793
tags question: http://stackoverflow.com/q/26651990
tags question: http://stackoverflow.com/q/26669852
type: Tag
tags question: http://stackoverflow.com/q/26629557
tags question: http://stackoverflow.com/q/26648327
tags question: http://stackoverflow.com/q/26636908
tags question: http://stackoverflow.com/q/26633848
tags question: http://stackoverflow.com/q/26635847
tags question: http://stackoverflow.com/q/26648039
tags question: http://stackoverflow.com/q/26657826
tags question: http://stackoverflow.com/q/26564323
tags question: http://stackoverflow.com/q/26525806
tags question: http://stackoverflow.com/q/26522133
tags question: http://stackoverflow.com/q/26530185
tags question: http://stackoverflow.com/q/26641369
tags question: http://stackoverflow.com/q/26557458
tags question: http://stackoverflow.com/q/26657954
tags question: http://stackoverflow.com/q/26561519
tags question: http://stackoverflow.com/q/26554568
tags question: http://stackoverflow.com/q/26549563
tags question: http://stackoverflow.com/q/26542847
tags question: http://stackoverflow.com/q/26655356
tags question: http://stackoverflow.com/q/26554683
tags question: http://stackoverflow.com/q/26628976
tags question: http://stackoverflow.com/q/26586546
tags question: http://stackoverflow.com/q/26555447
tags question: http://stackoverflow.com/q/26589903
tags question: http://stackoverflow.com/q/26672226

http://stackoverflow.com/q/26586164
answer count: 1
tagged with: facebook-javascript-sdk
has answer: http://stackoverflow.com/a/26586718
type: UnansweredQuestion
tagged with: facebook
has body: I have created an application where i am trying to invite friends via facebook invite friends js method but all working fine but no notification sent to that friend. My Application Link: http://www.huzoorbux.com/fl/app/android/www/homepage_nopost.html My Code: Invite Friends
has title: Notification not sending to facebook friend
type: Question
tagged with: javascript
score: 0
tagged with: notifications

http://stackoverflow.com/q/26654612
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has body: Once I convert a select field using jQuery UI, change event doesn't work. $(function() { $( "#speed" ).selectmenu(); $( "#files" ).selectmenu(); $( "#number" ) .selectmenu() .selectmenu( "menuWidget" ) .addClass( "overflow" ); $( "#speed" ).change(function(){ console.log("change"); }); }); If $( "#speed" ).selectmenu(); is commented out then the change event works perfectly? Why is this happening?. http://jsbin.com/debem/1/edit?js,console,output
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: .change() doesn't trigger after jQuery UI
has answer: http://stackoverflow.com/a/26654727
has comment: http://stackoverflow.com/comment/41912145
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41912153
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26654726
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26654727
has comment: http://stackoverflow.com/comment/41912110
possible better answer: http://stackoverflow.com/a/26654726

http://stackoverflow.com/comment/41849765
has text: It's simplest to just add it to the reset function or whatever other functionality you have. If that's not an option you can look at mutations, but that gets pretty complicated when you want crossbrowser support
comment on: http://stackoverflow.com/q/26619326
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41841935
has text: Thanks for the response! Could you explain a little more about what you mean? Is it possible to watch for when a user clicks on the highchart series? (i.e. when the plotoptions.series.events.click function is invoked). SOrry I am kind of new to angular..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26615000

http://stackoverflow.com/comment/41923541
score: 0
type: Comment
type: QuestionComment
has text: That's essentially what I need to do , but there is no efficient way to check when there is a blocking operation
comment on: http://stackoverflow.com/q/26660656

http://stackoverflow.com/a/26524629
has body: This is because you are calling reload(), whereas you just want to pass reload as the callback. success: reload, // NO () HERE! But also... &gt; xkcd Please learn about SQL injection before it is too late. Switch to PDO now, you'll be glad you did!
has comment: http://stackoverflow.com/comment/41677091
upvote count: 7
accepted answer of: http://stackoverflow.com/q/26524561
has comment: http://stackoverflow.com/comment/41677608
has comment: http://stackoverflow.com/comment/41677065
answers question: http://stackoverflow.com/q/26524561
has comment: http://stackoverflow.com/comment/41677697
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41677272
has comment: http://stackoverflow.com/comment/41677171
type: Answer
has comment: http://stackoverflow.com/comment/41677193
score: 7

http://stackoverflow.com/a/41190978
type: Answer
answers question: http://stackoverflow.com/q/26623094
has body: Try T4MVCJS We got it to work on a proof of concept project, However we managed to delete that project and cannot get it to work with any of our existing projects. Maybe you'll have more luck than us.
score: 0

http://stackoverflow.com/comment/128778438
type: Comment
type: QuestionComment
has text: [hope this answers](https://stackoverflow.com/a/72910531/148271)
score: 0
comment on: http://stackoverflow.com/q/26536431

http://stackoverflow.com/a/26659185
score: 1
downvote count: 0
has body: Use IDs for your form controls! Try this: HTML part &lt;form name="FirstPizza"&gt; &lt;td&gt; Style: &lt;br/&gt; &lt;input type="radio" id="rbThinCrust" name="style"/&gt; Thin Crust &lt;br /&gt; &lt;input type="radio" id="rbDeepDish" name="style" /&gt; Deep Dish &lt;br /&gt; &lt;input type="radio" id="rbSicilian" name="style" /&gt; Sicilian &lt;/td&gt; &lt;/form&gt; Javascript: function submitForm(){ if (!document.getElementById("rbThinCrust").checked &amp;&amp; !document.getElementById("rbThinCrust").checked &amp;&amp; !document.getElementById("rbThinCrust").checked) //Logic for nothing being checked }
answers question: http://stackoverflow.com/q/26658989
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41728128
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26552749
score: 0
has text: @jfriend00, i still dont understand. If i run `Object.keys(a)` i get `0,1,2`

http://stackoverflow.com/a/26546316
score: 0
has body: Try this instead: componentDidMount: function() { chrome.storage.onChanged.addListener(this.onChromeStorageChange) }, onChromeStorageChange: function(changes, areaName) { this.setState({ userInfo:changes["userInfo"].newValue }) } I used React’s autobinding and removed the invalid argument expression you had (probably copy/pasted from the docs). Don’t forget to remove the listener when the component unmounts.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26546019
answers question: http://stackoverflow.com/q/26546019
type: Answer

http://stackoverflow.com/q/26552742
possible better answer: http://stackoverflow.com/a/26553230
tagged with: jquery
has answer: http://stackoverflow.com/a/26553230
has answer: http://stackoverflow.com/a/26553304
has title: JQuery .empty(), .remove() or .html('')
has comment: http://stackoverflow.com/comment/41727436
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41727985
has comment: http://stackoverflow.com/comment/41740794
accepted answer: http://stackoverflow.com/a/26561083
answer count: 4
has comment: http://stackoverflow.com/comment/41728214
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26552990
tagged with: javascript
has comment: http://stackoverflow.com/comment/41730894
has answer: http://stackoverflow.com/a/26561083
score: 0
has body: Iam trying to delete all the code that is wrapped inside an div. Here is the code that i nedd to delete. On Off Test - Text So i Need to delete all the code above and i have tried with this $('#btn_flip3').remove(); $('#btn_flip3').empty(); $('#btn_flip3').html(''); But non of that deletes everything inside my btn_flip3 div. The code is generated from users input so the only thing iam sure of is the id of the first div. So my question is how i should do to delete all the code inside my div with id btn_flip3. EDIT I have now tried to add a class and run .remove() on that, but still same result. When the code have run then the div btn_flip3 is gone but it leaves the code inside it. So here is the html result On Off Vardagsrum - Lampa EDIT 2 Okey, maybe this could be a issue with jquery mobile or problem with my code. Here is how i generate the button part html $('#container').append(' Test - Text ').trigger("create"); This creates an FlipSwitch jquery mobile If i just rename the data-role to lets say flipswitch123 so that the flipswitch never gets created (just a simple checkbox instead) then the code works. Any ide why this is not working with flipswitch? EDIT 3 I have spent several hours and i cant still get this to work, iam including my tests now, maybe that could some of you experts on this to help me. Iam using jquery mobile flipswitch and the issue only happens when iam using a flipswitch. This is how i add the code for the flipswitch $(' Test - Text ').appendTo('#container').trigger("create"); And this is the HTML code that is generated from jquery mobile because the data-role is flipswitch btn_flip3 On Off If i now run this code to delete my created div btn_flip3 $('.btn_flip3').remove(); Then this is what is left in html btn_flip3 I find this even more strange, if i change my delete code to this instead $('#btn_flip3').remove(); Then the only code that is left untouched is btn_flip3 So that did not work, if i now change my original code to data-role="flipswi…

http://stackoverflow.com/q/26551960
possible better answer: http://stackoverflow.com/a/26552103
has body: I'm trying to bind all events that is called by user i.e. click, drag, touchstart, etc. function getAllEvents(element) { var result = []; for (var key in element) { if (key.indexOf('on') === 0) { result.push(key); } } return result.join(' '); } var el = $('*'); el.on(getAllEvents(el), function(e) { console.log('test'); //this is never being logged. if (e.originalEvent !== undefined){ //coding here } }); But the console.log('test'); is never being logged. Is there something wrong?
has answer: http://stackoverflow.com/a/26552211
accepted answer: http://stackoverflow.com/a/26552211
has comment: http://stackoverflow.com/comment/41726112
score: 1
has comment: http://stackoverflow.com/comment/41726219
has answer: http://stackoverflow.com/a/26552103
type: AnsweredQuestion
tagged with: javascript
has title: how to bind all events that is by human not programatically
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41726138
upvote count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26529559
downvote count: 0
score: 4
upvote count: 4
type: AcceptedAnswer
type: Answer
has body: Inject $routeParams into your controller. myApp.controller("productsController", ['$routeParams', function ($routeParams) { console.log($routeParams.id); }]);
accepted answer of: http://stackoverflow.com/q/26529408
answers question: http://stackoverflow.com/q/26529408

http://stackoverflow.com/comment/41920668
type: QuestionComment
has text: All the conditions will always pass in that snippet. You need to check `length` of the returned jQuery object.
comment on: http://stackoverflow.com/q/26659166
score: 0
type: Comment

http://stackoverflow.com/q/26568516
has body: I am using a Javascript API (Facebook) and need to pass data to/from my controller with and without a form submit. What is the best practice approach to this? I'd assume it's common enough so I hope what I'm reading about creating a Web Service for Ajax to get the data to the server is misguided.
tagged with: javascript
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41756580
answer count: 0
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41757117
type: Question
has title: Javascript API/Rails best practice passing data from javascript to controller

http://stackoverflow.com/comment/41928579
comment on: http://stackoverflow.com/a/26656210
type: AnswerComment
score: 0
type: Comment
has text: Thanks a lot for your help, but jQuery is still a bit hard for me.. ended up with adding an id on every img element and used `this.id` to get the right result.

http://stackoverflow.com/comment/41792117
comment on: http://stackoverflow.com/a/26588455
score: 0
type: AnswerComment
has text: Thanks a lot for your work!I can definitly continou my work now! Greatly appreciated ^^
type: Comment

http://stackoverflow.com/comment/41775073
type: QuestionComment
has text: I think the problem multipart is the min 5MB part size, whereas my files are in the 300K range.
comment on: http://stackoverflow.com/q/26576993
score: 0
type: Comment

http://stackoverflow.com/a/26664991
type: Answer
accepted answer of: http://stackoverflow.com/q/26664723
answers question: http://stackoverflow.com/q/26664723
downvote count: 0
has comment: http://stackoverflow.com/comment/41931844
score: 1
upvote count: 1
type: AcceptedAnswer
has body: What you want to do is modify the handler to use prevent default instead of returning false. Then you can check how the user activated the button and can act accordingly. $(document).ready(function() { $('a').on('click', function(e) { if(e.ctrlKey || e.button === 1) { return; } e.preventDefault(); // Do the stuff when the anchor is just clicked. }); }); You can examine the Fiddle In terms of the JS and CSS not applying we would need a working example of this to be of more assistance.

http://stackoverflow.com/comment/41721692
score: 0
type: Comment
type: QuestionComment
has text: Try to change ajaxSetup's contentType to `application/json; charset=utf-8`. And datatype in your ajaxSetup is not needed.
comment on: http://stackoverflow.com/q/26549509

http://stackoverflow.com/comment/41935166
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26666790
has text: the syntax is off but the else statement with a throw is how i ended up fixing it. Thanks!
type: AnswerComment

http://stackoverflow.com/a/26536673
accepted answer of: http://stackoverflow.com/q/26536657
has body: Concatenate strings with + operator: $('table tr:eq(' + data + ') td:first-child').click();
has comment: http://stackoverflow.com/comment/41700631
answers question: http://stackoverflow.com/q/26536657
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer

image
tags question: http://stackoverflow.com/q/26554720
tags question: http://stackoverflow.com/q/26555236
tags question: http://stackoverflow.com/q/26595767
tags question: http://stackoverflow.com/q/26578878
tags question: http://stackoverflow.com/q/26666572
tags question: http://stackoverflow.com/q/26630275
tags question: http://stackoverflow.com/q/26566650
tags question: http://stackoverflow.com/q/26523357
tags question: http://stackoverflow.com/q/26601069
tags question: http://stackoverflow.com/q/26639743
tags question: http://stackoverflow.com/q/26574935
tags question: http://stackoverflow.com/q/26609301
tags question: http://stackoverflow.com/q/26573031
tags question: http://stackoverflow.com/q/26635388
tags question: http://stackoverflow.com/q/26614888
tags question: http://stackoverflow.com/q/26634916
tags question: http://stackoverflow.com/q/26518091
tags question: http://stackoverflow.com/q/26576353
tags question: http://stackoverflow.com/q/26573362
tags question: http://stackoverflow.com/q/26521914
tags question: http://stackoverflow.com/q/26667832
tags question: http://stackoverflow.com/q/26578395
tags question: http://stackoverflow.com/q/26529359
tags question: http://stackoverflow.com/q/26631960
tag name: image
tags question: http://stackoverflow.com/q/26550945
tags question: http://stackoverflow.com/q/26557099
tags question: http://stackoverflow.com/q/26644705
tags question: http://stackoverflow.com/q/26542422
tags question: http://stackoverflow.com/q/26578182
tags question: http://stackoverflow.com/q/26634858
tags question: http://stackoverflow.com/q/26589020
tags question: http://stackoverflow.com/q/26554854
tags question: http://stackoverflow.com/q/26559430
tags question: http://stackoverflow.com/q/26658428
tags question: http://stackoverflow.com/q/26612201
tags question: http://stackoverflow.com/q/26590996
type: Tag
tags question: http://stackoverflow.com/q/26577232
tags question: http://stackoverflow.com/q/26664343
tags question: http://stackoverflow.com/q/26623788

http://stackoverflow.com/q/26554807
has comment: http://stackoverflow.com/comment/41731409
type: AnsweredQuestion
score: 3
tagged with: oop
has comment: http://stackoverflow.com/comment/41731620
upvote count: 3
linked to: http://stackoverflow.com/q/3449596
has comment: http://stackoverflow.com/comment/41731462
has title: How to invoke a function, as a "new Object", and call as a function again?
type: Question
has comment: http://stackoverflow.com/comment/41731468
has answer: http://stackoverflow.com/a/26554939
answer count: 2
has answer: http://stackoverflow.com/a/26554974
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41731585
possible better answer: http://stackoverflow.com/a/26554974
accepted answer: http://stackoverflow.com/a/26554939
favorite count: 0
has body: As a learning experience, I'm trying to make my own little console debug script that is object-oriented. I want it to be similar to jQuery in that you can call it as a function (jQuery('div')) or as an object (jQuery.ajax()). I have the code below which is almost working. It is basically an alias of "console.log". My goal is to be able to perform the following: var log = new RadDebug; // Create our function log('You selected: %s', fruit_type); // Invoke the top-level function // Output: You selected: "Apple" log.warn('You selected: %s', fruit_type); // Invoke a method "warn", which displays a caution icon next to the log. // Output: (!) You selected "Apple" The script I am working on: function RadDebug() { var debug_enabled = (debug_mode &amp;&amp; window.console &amp;&amp; window.console.log instanceof Function); // If this object was already initialize, redirect the function call to the ".log()" as default if ( this.initialized ) { return this.log.apply( this, arguments ); } this.initialized = true; this.log = function() { if ( !debug_enabled ) return; console.log.apply( console, arguments ); }; this.info = function() { if ( !debug_enabled ) return; console.info.apply( console, arguments ); }; // More methods below } The problem: Calling log.warn("hello world") works as you would expect. Calling log("hello world") tells me that TypeError: Object is not a function. Question: How do I get it to work as a function and having object-like properties? (Like how jQuery does it) (This question has been resolved thanks to @FelixKling. The final code is available as a Gist if you want to check it out).
has comment: http://stackoverflow.com/comment/41731561

http://stackoverflow.com/comment/41842585
has text: @Calvin: please propose a better title, I'll then edit it accordingly.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26613640

http://stackoverflow.com/a/26554846
downvote count: 1
type: Answer
score: 12
type: AcceptedAnswer
upvote count: 13
accepted answer of: http://stackoverflow.com/q/26554694
has body: Just disable the field. Either do it via HTML if the field cannot be updated by the user: http://www.w3schools.com/tags/att_input_disabled.asp Or do it via jQuery with a on submit event: $('#myForm').submit(function(){ $('input[name="dontSubmitThisField"]').prop('disabled', true); });
answers question: http://stackoverflow.com/q/26554694

http://stackoverflow.com/a/26582003
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26581987
accepted answer of: http://stackoverflow.com/q/26581987
upvote count: 1
score: 1
has body: It is called as the descendant selector... it is a part of css selector spec. It is used to select all elements which satisfies the second selector which are inside the first part Descendant selectors

http://stackoverflow.com/comment/41777597
comment on: http://stackoverflow.com/a/26580107
type: AnswerComment
score: 0
type: Comment
has text: I don't know your scrolling.js file but it doesn't sound right to put that code there. The code has nothing to do with scrolling. You should put it inside your main js file if you have one or on the bottom of your html code right before the ending ` ` tag wrapped inside ` ` tag. And not to break your scrolling code you should include your scrolling.js before your main.js (or before the code if you have no main.js).

http://stackoverflow.com/comment/41686101
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26528909
has text: Are you running this code on a server, if not this is a security issue you will come across when attempting to use ajax.
score: 0

http://stackoverflow.com/comment/41791337
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26587812
type: Comment
has text: The thickness of the player is increased. but it doesnt change the length of the player

http://stackoverflow.com/comment/136157180
has text: Its a good idea to prefix the first line with a semicolon (;) if you are dealing with code that is not strictly linted to have trailing semi-colons. Otherwise, JavaScript interpreter will greedily assume that the block is associated with the last code block interpreted. Eg: `;(function (){ ...` .
type: Comment
comment on: http://stackoverflow.com/a/26662387
score: 0
type: AnswerComment

http://stackoverflow.com/q/26662976
tagged with: socket.io-1.0
tagged with: node.js
has comment: http://stackoverflow.com/comment/41940255
has body: I don't know how to put forward this question to you. Actually I am creating an application which needs the following things: Many users will be registered on this app. Every user will be associated with one or more groups I want members of a particular group to broadcast messages to other group members using io.emit() I have the following code: var app=require('express')(); var http=require('http').Server(app); var io=require('socket.io')(http); app.get('/', function(req, res){ res.sendFile(__dirname +'/index.html'); }); io.use(function(socket,next){ var handShakeData=socket.request; query1=handShakeData._query['groupId']; query2=handShakeData._query['message']; next(); }); io.on('connection',function(socket){ console.log('A user connnected'); io.emit('emittedMessages','A User Connected: '+query1+" "+query2); socket.on('disconnect', function(){ io.emit('emittedMessages','A User Disconnected'); console.log('A user disconnected'); }); }); http.listen(3000,function(){ console.log('Listening oon Port: 3000'); }); And this is my index.html file: &lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-1.11.1.js"&gt;&lt;/script&gt; &lt;script&gt; var socket = io('http://localhost:3000',{query:"groupId=bar&amp;message=bar2"}); socket.connect(); socket.on('emittedMessages',function(msg){ $('body').append('&lt;br/&gt;'+msg); }); &lt;/script&gt; Problem The problem with this code is that no matter what I do, It'll send message to every person in every group. How can I segregate different users of different groups to connect to different nodes/sockets so that I can broadcast messages into a particular group. I am sorry If I am not able to present the question properly. Please ask me if you have any doubts. Any help is highly appreciated.
type: UnansweredQuestion
tagged with: socket.io
score: 2
has comment: http://stackoverflow.com/comment/41940748
tagged with: websocket
answer count: 0
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41928251
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41940568
has comment: http://stackoverflow.com/comment/41940608
has title: How to create multiple sockets using Socket.IO?
upvote count: 2

http://stackoverflow.com/a/26617952
accepted answer of: http://stackoverflow.com/q/26617797
answers question: http://stackoverflow.com/q/26617797
has body: I'm not 100% sure, but i think this is what you're looking for: $(document.body).on('change', 'select#category-navbar', function() { $('.selected-value').text($(this).val()); }); So when you change an option in the dropdown, it will write the selected option value inside the .selected-value div. Demo: http://jsfiddle.net/qp2b9Lof/
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26656759
has comment: http://stackoverflow.com/comment/41916210
upvote count: 2
has comment: http://stackoverflow.com/comment/41919460
answers question: http://stackoverflow.com/q/26656718
has body: You can't do this - how does the sum function know whether you want it to return the answer or another function? You could do something along these lines though: sum(0)(1)(2)(3).result() Implemented like this: var sum = (function(){ var total = 0; var f = function(n){ total += n; return f; }; f.result = function(){ return total; }; return f; }());
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41915914
score: 2

http://stackoverflow.com/comment/124701547
type: AnswerComment
score: 0
type: Comment
has text: It would be useful to mention the setting name.
comment on: http://stackoverflow.com/a/26863924

http://stackoverflow.com/comment/41931015
type: Comment
comment on: http://stackoverflow.com/a/26664227
score: 0
type: AnswerComment
has text: I'd recommedn to fix the front-end issue first and then add the PHP part. The error you're getting now is a 404 for jquery.ui. Please note: jquery.ui is not the same as jquery

http://stackoverflow.com/a/26530080
has comment: http://stackoverflow.com/comment/41687524
has comment: http://stackoverflow.com/comment/41721912
has comment: http://stackoverflow.com/comment/41688126
answers question: http://stackoverflow.com/q/26529882
has comment: http://stackoverflow.com/comment/41687463
has comment: http://stackoverflow.com/comment/41687659
score: 0
has comment: http://stackoverflow.com/comment/41687903
has comment: http://stackoverflow.com/comment/41695183
has comment: http://stackoverflow.com/comment/41687403
has body: The problem is you're not stopping the form from submitting, so after it runs the Ajax the form goes on to submit like a normal form. To stop this just return false at the end of your function. $(document).ready(function() { $(".loginform").submit(function () { var username = $('input[id=username]').val(); var password = $('input[id=password]').val(); $.ajax({ type: "POST", url: "login.php", data : "username="+username+"&amp;password="+password, type: "POST", success: function (data) { var success = data['success']; if(success == false){ var error = data['message']; alert(error); } if(success == true) { /* There is no .write function, you either want .append() to add text on to the end, or to replace the contents .text() or .html(). In this case I would use .text() */ $('#result').text('Login success! Loading dashboard...'); } } return false; /* &lt;-- returning false here stops the form submitting. */ }); }); });
has comment: http://stackoverflow.com/comment/41688516
has comment: http://stackoverflow.com/comment/41687505
has comment: http://stackoverflow.com/comment/41687794
has comment: http://stackoverflow.com/comment/41687285
has comment: http://stackoverflow.com/comment/41687547
type: Answer
has comment: http://stackoverflow.com/comment/41688443

http://stackoverflow.com/comment/41858715
score: 0
comment on: http://stackoverflow.com/q/26624381
type: Comment
type: QuestionComment
has text: Hi, thanks for your suggestion. @VasilVanchuk can you tell what do you mean by prototype? I do not have anything like that in my code structure and I had used the same way to process get requests in all my other modules where it had worked.So I am guessing I might have overlooked other errors.

http://stackoverflow.com/a/26626317
downvote count: 0
has comment: http://stackoverflow.com/comment/41863814
type: Answer
has comment: http://stackoverflow.com/comment/41862748
has comment: http://stackoverflow.com/comment/41862026
has body: You have the input out of scope of controller and also you have to push an object of the same type of customers list. You have to calculate the Id of the item accordingly. I have made a simple example on JsFiddle The Html {{cust.name}} {{cust.age}} You are looking for: {{nameTxt}} The Code var app = angular.module('customersApp', []); app.controller('CustomersController', function ($scope) { $scope.customers = [{ "id": 1, "name": "Yusuf", "age": 18 }, { "id": 2, "name": "Ahmetcan", "age": 17 }, { "id": 3, "name": "Ender", "age": 20 }, { "id": 4, "name": "Batuhan", "age": 16 }]; $scope.add = function (name) { $scope.customers.push({"id": 5, "name": name, "age": 99}); }; });
upvote count: 1
answers question: http://stackoverflow.com/q/26626107
score: 1
has comment: http://stackoverflow.com/comment/41862123

http://stackoverflow.com/q/26520866
type: AnsweredQuestion
upvote count: 0
has body: I have a d3 chart as follows. HTML: &lt;svg&gt;&lt;/svg&gt; JS: var margin = {top: 10, right: 10, bottom: 10, left: 10}, width = 960, height = 500; var startOfWeek = moment().startOf("week").toDate(); var endOfWeek = moment().endOf("week").toDate(); var dxSyncEvents = []; var now = moment(); var times = []; var sites = []; /* Some stuff that pushes JS Date objects onto times[] and strings onto sites[] */ var xScale = d3.time.scale().domain([startOfWeek, endOfWeek]).range([0, 960]); var yScale = d3.scale.ordinal().domain(sites).rangePoints(500, 10); var xAxis = d3.svg.axis().scale(xScale).orient("bottom") .ticks(d3.time.hours, 12) .tickFormat(d3.time.format('%H:%M')) .tickSize(8) .tickPadding(8); var yAxis = d3.svg.axis().scale(yScale).orient("left"); d3.select("svg") .attr("width", width) .attr("height", height) .selectAll("circle") .data(times) .enter().append("circle") .attr("r", "10px") .attr("fill", "black") .attr("cx", xScale) .attr("cy", yScale) .call(xAxis) .call(yAxis); Why is it that I don't get any axes on the chart? Can't see them on the screen and can't see them in the DOM in the developer tools. I do see some circles, however. There are some console errors that don't offer much help: Error: Invalid value for &lt;path&gt; attribute d="M-6,undefinedH0VundefinedH-6" Error: Invalid value for &lt;g&gt; attribute transform="translate(0,NaN)" (twice)
downvote count: 1
has title: Why is there no x or y axis shown on this d3 chart?
type: Question
accepted answer: http://stackoverflow.com/a/26678977
has comment: http://stackoverflow.com/comment/41942760
tagged with: javascript
has comment: http://stackoverflow.com/comment/41671267
score: -1
has answer: http://stackoverflow.com/a/26678977
answer count: 1
favorite count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/41671282

http://stackoverflow.com/comment/41800367
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26592824
has text: I want you to please share what you have tried.

http://stackoverflow.com/comment/41849097
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26618934
has text: styling the table or td is easy not so much the button

http://stackoverflow.com/a/26770553
has comment: http://stackoverflow.com/comment/42189729
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42173331
has comment: http://stackoverflow.com/comment/42247222
type: Answer
accepted answer of: http://stackoverflow.com/q/26627211
has comment: http://stackoverflow.com/comment/42173366
answers question: http://stackoverflow.com/q/26627211
has comment: http://stackoverflow.com/comment/42189750
score: 0
has body: After thinking about your question a bit, I think the easiest solution would be with recursion when the condition that the final value added to the array is less than the sum of values. Here's a JS Fiddle for demo: http://jsfiddle.net/ukgzwpky/ To break it down a bit (and so that you may confirm I have the question right :D), say we have the following array: [0, 1, 2, 3, 10, 15, 30] The sum of the values are: 61. So the expected output array would be: [0, 1, 2, 3, 10, 15, 30, 31, 32, 33, 40, 45, 46, 47, 48, 55, 60, 61] To further break it down, the looping logic would do something like this: // Get final value to add to previous values var val = [0, 1, 2, 3, 10, 15, 30].pop(); // Add the final value - 30 - to all previous values (ignoring the zero) .. loop here and push the values to our array ... // For the first iteration, the updated array looks like: [0, 1, 2, 3, 10, 15, 30, 31, 32, 33, 40, 45] // New values calculated from: 30 + 1, 30 + 2, 30 + 3, 30 + 10, 30 + 15 At this point, our max value of 61 is less than the final value of 45 So, we do it again! var val = [0, 1, 2, 3, 10, 15, 30, 31, 32, 33, 40, 45].pop(); .. loop here and push the values to our array ... // Second iteration, the updated array looks like: [0, 1, 2, 3, 10, 15, 30, 31, 32, 33, 40, 45, 46, 47, 48, 55, 60, 61] // New values are: 45 + 1, 45 + 2, 45 + 3, 45 + 10, 45 + 15 // Note that 45 + 30 would be greater than our sum of 61, so we break If that's correct, here's a script that I wrote that populates such an array: function getPopulatedArray(arr) { var max = arguments[1] || getSum(arr), current = arr.pop(), temp = [], i = 1, len = arr.length; // Populate temp array with values for (; i &lt; len; i++) { if ((arr[i] + current) &lt; max) { temp.push(arr[i] + current); } else { temp.push(max); break; } } arr.push(current); arr = arr.concat(temp); // Done? Or should we continue? if (arr[arr.length - 1] &lt; max) { return getPopulatedArray(arr, max); } else { return arr; } } Again, the JS fiddle fo…

http://stackoverflow.com/a/26648313
has body: Try this, it's working: &lt;body&gt; &lt;input type="text" value="previousValue"&gt; &lt;script&gt; var input = document.body.children[0]; input.setAttribute('value', 'newValue'); alert(input.getAttribute('value')); // 'previousValue', not changed! &lt;/script&gt; &lt;/body&gt;
has comment: http://stackoverflow.com/comment/41901569
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26647879

http://stackoverflow.com/q/26626125
linked to: http://stackoverflow.com/q/26628289
has title: How can I get the dom svg element from d3 node data?
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26627695
upvote count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/26627695
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has body: I have nodes variable that is an array with all nodes from graph. Each node has a SVG g (group) SVG element in DOM. To select the data having the DOM element I do d3.select(myElement).data()[0], but how can I get the DOM element having the data?
score: 2
type: AnsweredQuestion
tagged with: dom
type: Question

http://stackoverflow.com/q/26647660
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26647709
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
has answer: http://stackoverflow.com/a/26648193
tagged with: safari
downvote count: 0
has comment: http://stackoverflow.com/comment/41900537
type: UnansweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/41900158
has answer: http://stackoverflow.com/a/26648422
type: Question
has title: Safari display: none
has body: Safari just doesn't open element if I hide it using css property display: none! It works in all other browsers though. Here is my html: Select Image Now in my jquery I want to open the id="file" by clicking on that "Select Image" : $("#f").click(function() { $("#file").click(); });
score: 4
answer count: 3
has comment: http://stackoverflow.com/comment/41900888

http://stackoverflow.com/q/26649615
has title: Moving a Div on Mouse Move
type: Question
tagged with: javascript
score: 0
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41903491
has comment: http://stackoverflow.com/comment/41903705
answer count: 0
has comment: http://stackoverflow.com/comment/41903550
has comment: http://stackoverflow.com/comment/41905084
has comment: http://stackoverflow.com/comment/41903358
has body: I have jquery code that triggers the div to move on movement on a mouse wheel. The code below works on mouse wheel movement. What i am trying to implement is that i want the div to move when the mouse is moved to the left or right of the screen? function scrollLeft() { var $left = Math.abs(Number($galleryList.css("margin-left").replace("px", ""))) ; if ($left - itemWidth &lt;= 0) { $galleryList.css({"margin-left": ""}); } else { $galleryList.css({"margin-left": -1 * Number($left - itemWidth) + "px"}); } $(document).trigger("mousemove"); } function scrollRight() { var $left = Math.abs(Number($galleryList.css("margin-left").replace("px", ""))) ; if ($galleryList.width() &lt; itemWidth + $left + $window.width()) { $galleryList.css({"margin-left": -1 * Number($galleryList.width() - $window.width()) + "px"}); } else { $galleryList.css({"margin-left": -1 * Number($left + itemWidth) + "px"}); } $(document).trigger("mousemove"); } $window.on("mousewheel", function (event) { if (stackedMode) { return true; } if (event.deltaY == 1) { // left scrollLeft(); } else if (event.deltaY == -1) { // right scrollRight(); } animating = true; setTimeout(function () { animating = false; }, 500); })

http://stackoverflow.com/q/26603306
tagged with: iframe
linked to: http://stackoverflow.com/q/525992
type: Question
tagged with: javascript
has body: this is the index.html code.. first.html code is... second second.html code is first Now what i want is to make the index page render the whole first.html and second.html in full-height. somehow the iframe height must adjust to the corresponding height of webpage it is holding. How to do this?
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26603549
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: calculating dynamic height of webpages for iframe

http://stackoverflow.com/q/26648742
has comment: http://stackoverflow.com/comment/41902020
type: Question
has body: i wanted to know whats the error in this code. i wanted to compare today's date with the user input date &lt;script type="text/javascript"&gt; function validate() { if( document.myForm.name.value == "" ) { alert( "Please provide your date of birth!" ); document.myForm.dob.focus() ; return false; } var q = new Date(); var m = q.getMonth(); var d = q.getDate(); var Y = q.getFullYear(); var date = new Date(Y,m,d); var r = document.getElementById(dates).value; var m1 = r.getMonth(); var d1 = r.getDate(); var Y1 = r.getFullYear(); var mydate = new Date(Y1,m1,d1) ; if(date&lt;=mydate) { alert("greater"); return false; } else { alert("smaller"); return false; } return true; } &lt;/script&gt; &lt;form name="myForm" method="post" onsubmit= "return(validate());"&gt; Name: &lt;input type="text" name="name"&gt;&lt;br&gt; Date: &lt;input type="date" id="dates" name="dates"&gt; &lt;br/&gt; &lt;INPUT TYPE="submit" VALUE="Submit" &gt; &lt;/form&gt; i felt like "var r = document.getElementbyid(dates).value;" this piece of code is not working
has answer: http://stackoverflow.com/a/26649098
tagged with: javascript
has title: comparing current date and date inp
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/5619202
favorite count: 0
has answer: http://stackoverflow.com/a/26648790
has answer: http://stackoverflow.com/a/26649116
accepted answer: http://stackoverflow.com/a/26649098
upvote count: 1
possible better answer: http://stackoverflow.com/a/26648790
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/41907533
score: 0
type: Comment
has text: I have again edited my post. I investigated with azure storage explorer and the value is actually there but even with your approach the metadata retrieved by C# is still empty. At least now I know the value is set and I will keep investigating. Of course if u have other suggestions they are welcome :)
comment on: http://stackoverflow.com/a/26651791
type: AnswerComment

http://stackoverflow.com/comment/41904593
type: AnswerComment
comment on: http://stackoverflow.com/a/26648351
type: Comment
has text: what if ajax is taking 2 seconds to respond?
score: 0

http://stackoverflow.com/comment/41748069
comment on: http://stackoverflow.com/q/26564317
has text: You're not Donald Knuth.
type: QuestionComment
type: Comment
score: 6

http://stackoverflow.com/comment/41764829
type: AnswerComment
type: Comment
has text: if you want to return something in response & based upon that you want to do something, that code will go to success callback. `response` variable will provide you response data.
comment on: http://stackoverflow.com/a/26572653
score: 0

http://stackoverflow.com/q/26547869
has title: Specifying number of characters contained per line in a textarea element
linked to: http://stackoverflow.com/q/8545376
answer count: 2
has comment: http://stackoverflow.com/comment/41721070
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41720628
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26550971
has comment: http://stackoverflow.com/comment/41729579
upvote count: 1
has comment: http://stackoverflow.com/comment/41718626
has comment: http://stackoverflow.com/comment/41718928
tagged with: css
has comment: http://stackoverflow.com/comment/41719922
type: AnsweredQuestion
has body: I need to specify number of characters contained per line in a textarea element (Link to fiddle). This is the horror I'm witnessing: So cols="50" actually gives me following row lengths: | Without scroll | With scroll Chrome 50 47 FF 52 50 What I actually meant with cols="50" is that I want the textarea to hold exactly 50 characters per line. How I can achieve this so that it works in all major browsers? EDIT: I would also like to point out that in the real page the total number of characters in a textarea is not limited so y-scrolling must be possible. Whether or not line breaks are automatically included by a textarea (or equivalent element) doesn't matter since the text is later split into rows containing maximum of 50 characters before sending them to the server with ajax post.
has comment: http://stackoverflow.com/comment/41719395
possible better answer: http://stackoverflow.com/a/26549836
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/26550971
type: Question
has answer: http://stackoverflow.com/a/26549836
has comment: http://stackoverflow.com/comment/41719590
tagged with: firefox
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26586752
has title: Make Arrow symbol to plus(+) and minus(-) in Kendo Tree view
has answer: http://stackoverflow.com/a/26588725
type: UnansweredQuestion
tagged with: css
tagged with: kendo-treeview
has body: I am new to Kendo-UI, the below is my sample code to display the data in kendo tree view. The result is coming fine but it is showing arrow symbol when expand and collapse the menu, instead of that i want to make it as a plus(+) and minus(-): Kendo UI Snippet
score: 0
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui

http://stackoverflow.com/a/26620803
type: Answer
has comment: http://stackoverflow.com/comment/41852311
has body: In your for loop when you attach the event to all of the buttons, you are calling the clearOrSelectAll function. You probably want to wrap it in an anonymous function to make sure it's only called when the event is fired. // Non-ideal solution: see edit button.onclick = function() { clearOrSelectAll(button.id); } EDIT: It has been pointed out that the 'this' context variable will point to the element in question when an event handler is attached by means of the onclick property, or the addEventListener method. As such it would probably be cleaner (and easier to read) if you were to reference that instead of using 'button' as a closure and count on javascript engines to not optimize your loop too heavily (as that would mess with the value of 'button' at the time that the event is called. button.onclick = function() { clearOrSelectAll(this.id); };
has comment: http://stackoverflow.com/comment/41852250
upvote count: 1
has comment: http://stackoverflow.com/comment/41881712
has comment: http://stackoverflow.com/comment/41852281
has comment: http://stackoverflow.com/comment/41853191
score: 1
has comment: http://stackoverflow.com/comment/41852414
downvote count: 0
answers question: http://stackoverflow.com/q/26620735

http://stackoverflow.com/q/26533541
linked to: http://stackoverflow.com/q/26447790
answer count: 0
has comment: http://stackoverflow.com/comment/41694254
tagged with: cookies
upvote count: 3
type: Question
has body: phantomjs has a parameter --cookies-file and I can point it to a cookie file. Its format is like: [General] cookies="@Variant(\0\0\0\x7f\0\0\0\x16QList&lt;QNetworkCookie&gt;\0\0\0\0\x1\0\0\0\x2\0\0\0lBAIDUPSID=9C185C46016DC114CB8ECCDE512C768B; expires=Tue, 10-Nov-2082 20:14:15 GMT; domain=.baidu.com; path=/\0\0\0oBAIDUID=9C185C46016DC114CB8ECCDE512C768B:FG=1; expires=Sat, 15-Oct-2044 17:00:09 GMT; domain=.baidu.com; path=/)" Here I want to know, if I have the cookies string got from document.cookie on a website, how to pass it to phantomjs --cookies-file? I'm not sure how to convert the format.
tagged with: phantomjs
score: 3
tagged with: javascript
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41693521
type: UnansweredQuestion
has title: How to pass the cookies get from document.cookie to phantomjs?

http://stackoverflow.com/q/26517321
linked to: http://stackoverflow.com/q/16063394
tagged with: prototype
has comment: http://stackoverflow.com/comment/41664664
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41665812
has title: multiple Element.prototype not working
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41664876
linked to: http://stackoverflow.com/q/17474390
has body: Element.prototype = { hasClass : function(className){ return this.className.contains(className, ' '); }, getId: function(){ return this.id; } }; individually if it works String.prototype.contains = function(item, from){ return this.indexOf(item, from) != -1; }; Element.prototype.hasClass = function(className){ return this.className.contains(className, ' '); }; Element.prototype.getId = function() { return this.id; }; document.body.innerHTML=document.getElementById('foo').hasClass('blah'); &lt;div id="foo" class="blah"&gt;&lt;/div&gt; It is the first time I deal with prototype
has comment: http://stackoverflow.com/comment/41667624
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26517398
duplicate of: http://stackoverflow.com/q/17474390

http://stackoverflow.com/a/27074176
answers question: http://stackoverflow.com/q/26521154
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26521154
type: AcceptedAnswer
downvote count: 0
has body: Nothing stopping you from instantiating multiple dispatchers, essentially creating multiple "instances" of Flux. The Dispatcher doesn't use any globals, so each instance is completely independent of the others. I would avoid registering a Store with more than dispatcher, for the sake of keeping things simple and maintainable. To this end, a dispatcher should only span a fully modular domain of the application where the Stores under it's purview don't need to communicate with stores wired to different dispatchers.
type: Answer

http://stackoverflow.com/comment/46989064
comment on: http://stackoverflow.com/a/26523458
type: AnswerComment
has text: Hey @BAAC can you guide me to achieve the task what you did? becos i also had the same pblm
score: 0
type: Comment

http://stackoverflow.com/comment/41926120
comment on: http://stackoverflow.com/q/26661762
score: 0
type: QuestionComment
has text: Ok, I see. Thanks! Well, isnt it related to the var contacts [] ? If you can help me there because Im not pro in this. @Teemu
type: Comment

http://stackoverflow.com/q/26623225
upvote count: 1
has title: Why does the time taken for AJAX request jump from 2ms to 50ms and higher?
type: Question
has comment: http://stackoverflow.com/comment/41856696
tagged with: javascript
has comment: http://stackoverflow.com/comment/41856994
has answer: http://stackoverflow.com/a/26623735
has body: I wrote a small script (with jQuery for AJAX) to "ping" the server and output how long it takes for my AJAX requests to occur. var start = Date.now(), end = 0; setInterval(function() { $.ajax('', { complete: function() { end = Date.now(); console.log(end - start); } }); }, 1000); This is the kind of pattern I'm getting: 39 2 4 2 3 40 3 2 3 4 2 61 9 4 3 2 2 4 34 etc. Why does the "ping" jump from a low number (2, 3, 4, etc.) to a higher one (40, 50, 60) in such a pattern? Is there an obvious reason or should I just blame it on HTTP/AJAX technology?
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26623735
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/26654605
type: Answer
has comment: http://stackoverflow.com/comment/41941003
accepted answer of: http://stackoverflow.com/q/26654474
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: To extend the method, you should save the old definition and call it from your extension: API.oldWorkerName = API.workerName; API.workerName = function(worker) { return '(' + worker.position + ')' + API.oldWorkerName(worker); }; Or maybe this is what your lesson is looking for: API.workerPositionAndName = function(worker) { return '(' + worker.position + ')' + API.workerName(worker); };
answers question: http://stackoverflow.com/q/26654474

http://stackoverflow.com/q/26574574
has title: How to make Angular Scrolling Pagging using http service
type: Question
answer count: 1
tagged with: javascript
has body: I try to follow one example scrolling pagging using Angular from here http://akashagrawal.me/blog/2014/01/31/infinite-scroller-in-angularjs/ This is other example : http://jsfiddle.net/joshkurz/yaPK7/ my question is , how to make this scrolling pagging using ajax / http request agular for get value from my service.php file and show to web?? and this is my js code // create the module and name it test for testing var routerApp = angular.module('routerApp', []); routerApp.directive('scroller',function(){ return { restrict : 'A', scope : { loadingMethod : "&amp;" }, link : function(scope,elem,attrs){ rawElement = elem[0]; elem.bind('scroll',function(){ if((rawElement.scrollTop + rawElement.offsetHeight+5) &gt;= rawElement.scrollHeight) { scope.$apply(scope.loadingMethod); } }) } } }); routerApp.controller('MainCtrl',function($scope) { $scope.items = []; $scope.counter= 0; $scope.dogs = ['tes' , 'Husky' , 'Goldendoogle']; $scope.loadMore = function(){ i = 1; var url = "data.php"; $http.jsonp(url).success(function(data){ var items = data; console.log(data); }) while(i&lt;10){ // i want it can push my data not number. how to implemented that? $scope.items.push(++$scope.counter); i++; } }; $scope.loadMore(); }) i think somepeople can help me please ?
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26574797
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26574797

http://stackoverflow.com/comment/111967614
has text: I just wasted 2 days of my life and finally this worked. I can confirm this works with expo and image picker and .net core. Using this with the normal fetch.
type: AnswerComment
comment on: http://stackoverflow.com/a/61321728
type: Comment
score: 3

http://stackoverflow.com/a/26605532
accepted answer of: http://stackoverflow.com/q/26605208
has body: $('input[name="username"]').val('user'); $('input[name="password"]').val('password') http://jsfiddle.net/sp5fcaLm/ Although I'm not sure setting password directly is the best idea.
type: Answer
has comment: http://stackoverflow.com/comment/41825555
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26605208
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41808766
type: Comment
score: 0
has text: and how would this help if page reloads each time?
type: AnswerComment
comment on: http://stackoverflow.com/a/26597194

http://stackoverflow.com/comment/41941403
type: Comment
type: QuestionComment
score: 1
has text: This may have something to do with the page you're automating/testing. I tried on SO and it is the other way around: https://gist.github.com/artjomb/87ec080f37b609fee288
comment on: http://stackoverflow.com/q/26670154

http://stackoverflow.com/comment/41784069
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26577227
type: AnswerComment
has text: Yes @Christopher, it's quite odd. I was able to (somehow) get `ng-repeat` to work ([see here](http://stackoverflow.com/questions/26578446/angularjs-ng-repeat-applied-multiple-times-in-compiled-directive)), but now it's being repeated multiple times.

http://stackoverflow.com/comment/41860287
type: Comment
type: QuestionComment
has text: In what way is that dot *unnecessary*? `parseInt("7.", 10) === 7` and `console.log(7. + 3) === 10`
score: 1
comment on: http://stackoverflow.com/q/26625465

http://stackoverflow.com/comment/41899498
comment on: http://stackoverflow.com/a/26634532
has text: @Brandon Also a good point. I decided not to mention it though because I figured if it wasn't an apt name the Rx team wouldn't have used it. And although the OP's question is partially about semantics, I decided to focus my answer on the differences between the operators, which reveals that the name is in fact appropriate.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41874142
score: 0
type: Comment
has text: not a js expert, how to fix it? just replace sender,args by error?
comment on: http://stackoverflow.com/a/26632428
type: AnswerComment

http://stackoverflow.com/q/26656827
tagged with: express
has answer: http://stackoverflow.com/a/26657824
tagged with: jquery
tagged with: ajax
type: Question
has body: I have a problem integrating ajax calls with node.js (I am using express.js). This is my code: Page.html € Page.js exports.prezzo = function(req,res) { req.getConnection(function(err,connection) { connection.query("my query", function(err,rows) { if(err) console.log("Error selecting : %s", err); if(rows.length > 0) { totale = rows[0]; res.send(totale); //console.log(totale); } }); }); } The ajax call doesn't work, what I have is a white page with the result of my query, like this: { biglietto: 2.70 }
has title: Ajax call and node.js
tagged with: node.js
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26659511
possible better answer: http://stackoverflow.com/a/26659832
has comment: http://stackoverflow.com/comment/41921312
type: AnsweredQuestion
has title: Angular $location change path works second time, not first time
score: 1
has answer: http://stackoverflow.com/a/26671119
accepted answer: http://stackoverflow.com/a/26671119
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26659832
upvote count: 1
has comment: http://stackoverflow.com/comment/41925099
tagged with: javascript
linked to: http://stackoverflow.com/q/11784656
has comment: http://stackoverflow.com/comment/56481339
favorite count: 0
has comment: http://stackoverflow.com/comment/41921624
downvote count: 0
tagged with: angularjs
has body: The code seems simple, but as I read the docs for $location, I notice there's a LOT of complexity I don't understand. My setup is as follows: // in app.js $routeProvider.when('/done' , {templateUrl: 'partials/done.html', controller: 'DoneController'}); // in my controller where $location is injected, on a button press... if (!$scope.errors.length) { $scope.model.save().then(function() { alert("did I get here?"); $location.path('/done'); }); } I press the button and see the alert, but no change in view. I press the button a second time (saving data to the cloud a second time), I see the alert a second time and the view does change. Any ideas why? Thanks in advance.

http://stackoverflow.com/a/26652000
score: 0
type: Answer
has body: You can use ASP.NET Sessions, but you need to change your onclick mechanism from client-side to server-side. More information
answers question: http://stackoverflow.com/q/26649215

http://stackoverflow.com/q/26581139
has answer: http://stackoverflow.com/a/26581185
type: UnansweredQuestion
downvote count: 2
tagged with: authentication
tagged with: google-chrome
linked to: http://stackoverflow.com/q/19528119
score: -2
linked to: http://stackoverflow.com/q/16029674
duplicate of: http://stackoverflow.com/q/19528119
type: Question
has title: How do I put a string into a textbox (username box) using javascript?
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41779342
has body: I am using Tampermonkey on chrome and running it on a website. I am trying to log in using login credentials. I got it to click log out, not log in. Here's my whole code: // ==UserScript== // @name Blah // @namespace Blah.com // @description . // @include http://Blah.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js // ==/UserScript== //function logOut() //{ // Log out of Blah // Blah = document.getElementsByName(“Blah"); // for i in 1..2 do // log in // //username = Username1 // password = Password1 // { // { // greyButtons.click(); // } // } //} function logOut() { // Log out of Blah incase already signed in document.getElementById('Blah').click(); } logOut(); function logIn() { document.getElementById("Header_Login_tbUsername") //I don't know what to put here } logIn();
tagged with: tampermonkey

http://stackoverflow.com/a/26514929
type: Answer
answers question: http://stackoverflow.com/q/26514452
has body: function id(sel) {return document.getElementById(sel); } var $usrINP = id("usrINP"), $playBTN = id("playBTN"), $resDIV = id("resDIV"); function compare(){ var userNum = parseInt( $usrINP.value, 10 ), compNum = Math.ceil( Math.random() * 10 ), result = "YOU:"+userNum+" COMPUTER:"+compNum+"&lt;br&gt;"; if(!userNum || userNum &gt; 10) return alert("Enter a valid Number from 1-10"); result += userNum===compNum ? "YOU WON!" : "WRONG!"; $resDIV.innerHTML = result; } $playBTN.addEventListener("click", compare, false); &lt;input id=usrINP type=text maxlength=2&gt; &lt;input id=playBTN type=button value=Play&gt; &lt;div id=resDIV&gt;&lt;/div&gt; https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator https://developer.mozilla.org/en-US/docs/Web/API/Element.innerHTML In your example ("String") "2", using === Strict Equality, will never match 2 (Number) so either use == (loose equality) or parseInt your input value. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators Which equals operator (== vs ===) should be used in JavaScript comparisons?
score: 0

http://stackoverflow.com/comment/41729881
type: QuestionComment
comment on: http://stackoverflow.com/q/26532550
has text: If you assign the string values in quotes and you don't build them incrementally then they are interned and as the JsPerf shows (see my answer) the time is constant as I was insisting http://jsperf.com/eqaulity-is-constant-time I am curious to see your benchmark. Thanks
score: 1
type: Comment

http://stackoverflow.com/a/26681567
has comment: http://stackoverflow.com/comment/42013386
accepted answer of: http://stackoverflow.com/q/26671973
has body: You can achieve the functionality as follows using jquery ui: Basically we clone the element being dragged and append it to droppable on drop event, since jQuery ui throws errors at us if we remove the element being dragged. Then we remove the actual element in the stop event callback. $("#sortable").sortable(); $("#dropTarget").droppable({ accept: "div", drop: function(event, ui) { ui.draggable.clone().appendTo(this); ui.draggable.remove(); } }) #sortable { float: left; } .draggableDivs { background-color: orange; border: solid black; } #dropTarget { width: 500px; height: 500px; float: left; text-align: center; background-color: skyblue; } Can be dropped !!.. ..on an empty list Item 3 Item 4 Item 5 Drop Here Side notes: Don't mix native drag and drop with jquery ui. Don't mix inline styles and internal/external styles. Avoid using inline styles at all if possible. Why Use CSS?
upvote count: 2
answers question: http://stackoverflow.com/q/26671973
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42013312
downvote count: 0
has comment: http://stackoverflow.com/comment/42009435
type: AcceptedAnswer

http://stackoverflow.com/comment/41781596
score: 0
type: Comment
type: QuestionComment
has text: I could implement some fragmentation mechanism, but I'm asking is there a way to allow passing big data with only changed applet configuration.
comment on: http://stackoverflow.com/q/26542926

http://stackoverflow.com/comment/41881280
has text: Yes I got that. My question is why blender plug in is not exporting texture map
type: QuestionComment
comment on: http://stackoverflow.com/q/26636150
score: 0
type: Comment

http://stackoverflow.com/q/26561879
favorite count: 0
tagged with: multilingual
type: UnansweredQuestion
score: 6
tagged with: internationalization
has comment: http://stackoverflow.com/comment/52844268
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26737839
type: Question
tagged with: i18next
has answer: http://stackoverflow.com/a/26638309
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/27507825
has title: i18next best practice
answer count: 3
has comment: http://stackoverflow.com/comment/42046831
has body: I've successfully implemented i18next, which by the way is a great library! Though I'm still in search for the "best practice". This is the setup I have right now, which in general I like: var userLanguage = 'en'; // set at runtime i18n.init({ lng : userLanguage, shortcutFunction : 'defaultValue', fallbackLng : false, load : 'unspecific', resGetPath : 'locales/__lng__/__ns__.json' }); In the DOM I do stuff like this: My first example And in JS I do stuff like this: return i18n.t('demo.mySecondExample', 'My second example'); This means I maintain the English translation within the code itself. I do however maintain other languages using separate translation.json files, using i18next-parser: gulp.task('i18next', function() { gulp.src('app/**') .pipe(i18next({ locales : ['nl','de'], output : '../locales' })) .pipe(gulp.dest('locales')); }); It all works great. The only problem is that when I've set 'en' as the userLanguage, i18next insists on fetching the /locales/en/translation.json file, even though it doesn't contain any translations. To prevent a 404, I currently serve an empty json object {} in that file. Is there a way to prevent loading the empty .json file at all?

http://stackoverflow.com/comment/41873349
score: 0
has text: i don't think it's a good idea try to come up with a regex yourself matching url. matching url, password, etc should be viewed as an abusement of regex while people keep using it in this way. have a look at https://gist.github.com/gruber/8891611 and http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is-a-valid-url
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26632476

http://stackoverflow.com/comment/42033053
type: AnswerComment
score: 0
type: Comment
has text: Well I am just getting basic A* that actually hugs the obstacles. Mine just simplifies/straightens the path. It doesn't make it have optional number of turns if A*'s one was not optimal turn-wise either. I am curious about the implementation :) when you have time. Also I wonder what is the complexity for the modified grid you are talking about. I assume that A* will run only once right?
comment on: http://stackoverflow.com/a/26703266

http://stackoverflow.com/comment/41737168
comment on: http://stackoverflow.com/q/26554033
has text: Deleted my answer because I hadn't read far enough in the prettyPhoto API. What you are doing above is correct according to that. Have you looked to see if it's 'prettyPhoto' or 'open' that is the undefined part? Are you using the correct version (minimum of 2.5).
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26516194
has comment: http://stackoverflow.com/comment/41662266
downvote count: 0
has answer: http://stackoverflow.com/a/26516276
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26516276
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41662228
type: AnsweredQuestion
upvote count: 1
possible better answer: http://stackoverflow.com/a/26516275
type: Question
has answer: http://stackoverflow.com/a/26516275
has body: I am building a website in which I have to change the content of a div according to the option user select. When user click on the anchor onclick event handler changes the div correctly but just for an instant. I don't understand what is the problem with code. Here is the code: Choose an Option: Add Student Delete Student Any help will be appreciated.
has title: onclick event is not keeping the change permanently
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/76404183
type: AnswerComment
has text: @pomarc A solution to this problem that I've implemented is to add the ip address into the access_token as a claim, and then validate on the server that the access_token ip address matches the request ip address.
type: Comment
comment on: http://stackoverflow.com/a/26538699
score: 0

http://stackoverflow.com/q/26634916
has title: Append image in function jquery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26635046
accepted answer: http://stackoverflow.com/a/26635046
has body: Good evening. I have this jquery code which allows me, once you press the Enter key, to post a comment. Fattio that I run an append with the username and the content that the user wants to publish. In addition to the username I would also like to "hang" the profile picture using their path. How do I post a photo? Thanks for your help. Here's the code: function commento_post(id_post) { $('.form-commento'+id_post).click(function () { $('#ins_commento'+id_post).keydown(function (e) { var message = $("#commento"+id_post).val(); var username = $("#username").val(); var id_user = $("#id_user").val(); if(e.keyCode === 13) { $.ajax( { type: 'POST', url: 'http://localhost/laravel/public/index.php/post/ins_commento', data: { commento: message, id_post: id_post }, success: function(data) { $('#commento'+id_post).val(''); $('#commentscontainer'+id_post).append ( /*$(".username-commento"+id_post).html (*/ $('&lt;a/&gt;', { text : username, href : 'http://localhost/laravel/public/index.php/utente/'+id_user }).css({'font-weight':'bold'}) //) ).append(' ').append(message).append($('&lt;br/&gt;')); var el = $('#numero_commenti'+id_post); var num = parseInt(el.text()); el.text(num + 1); } }); } }); }); }
tagged with: image
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41853152
score: 0
has text: If you can drop your layout into a jsfiddle I could probably do something with jquery to make it happen though.
type: Comment
comment on: http://stackoverflow.com/q/26621285
type: QuestionComment

http://stackoverflow.com/q/26555447
tagged with: jquery
score: 0
answer count: 2
has title: How can I show/hide on check radio using JavaScript or jQuery
has answer: http://stackoverflow.com/a/26555634
tagged with: asp.net
type: AnsweredQuestion
has body: How can I show/hide li classes on check/unchecked radio buttons? I'd done it through code behind, but I want it through JavaScript or jQuery, if I remove runat="server" from input radio it works fine but I have some forms in li classes so when I press submit/save its saved and return to 1st tab. If I remove checked="checked", on first loading doesn't show any tab. Property Allottee Transferee
accepted answer: http://stackoverflow.com/a/26555634
type: Question
possible better answer: http://stackoverflow.com/a/26555645
has answer: http://stackoverflow.com/a/26555645
tagged with: javascript

http://stackoverflow.com/comment/41794878
has text: Show the code that puts the data into the list.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26589127
score: 0

http://stackoverflow.com/comment/41742321
type: Comment
comment on: http://stackoverflow.com/q/26560908
score: 4
has text: using `!important` everywhere isn't a good practice. You should be able to manage without it + the code you share should blur only the images contained in `body.blur` (maybe you only have images though). you should share your *HTML* markup too and a fiddle would be great
type: QuestionComment

http://stackoverflow.com/comment/41829719
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26608717
has text: Maybe you should tell what kind of behaviour you are expecting instead, and then...
score: 0

http://stackoverflow.com/q/26566683
tagged with: javascript
tagged with: jquery
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26566814
has title: Trying to get last element from a unordered list
has body: I've spent an unhealthy amount of time trying to figure this out and think I'm just having some kind of brain-fart. This is the code i have so far: alert($('#messages2 ul li').index()); // Need to add something in index Basically this application uses Node.js to send and receive messages (A chat application). Whenever a message is sent, it is appended to the UL (Their are no special ID tags for the LI tags). This is the code I'm using to append (Which works just fine!) $('#messages2').append('&lt;li&gt;'+ "[ &lt;strong&gt;" + socket1+"&lt;/strong&gt; ] "+msg + '&lt;/li&gt;'); What I want to do is get the last item in the UL, I'm sure this is not too difficult.
possible better answer: http://stackoverflow.com/a/26566707
type: Question
has answer: http://stackoverflow.com/a/26566707
accepted answer: http://stackoverflow.com/a/26566700
has answer: http://stackoverflow.com/a/26566792
has answer: http://stackoverflow.com/a/26567076
score: 0
has answer: http://stackoverflow.com/a/26566700

http://stackoverflow.com/comment/41659362
has text: @pianoman99 the function is already called
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26514646
type: QuestionComment

http://stackoverflow.com/comment/51676055
has text: a buttton is a form element according to: http://www.w3.org/TR/html401/interact/forms.html
comment on: http://stackoverflow.com/a/26617778
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41829833
type: QuestionComment
has text: Wrapping ` ` elements in `` tags? What?
score: 4
comment on: http://stackoverflow.com/q/26608959
type: Comment

http://stackoverflow.com/comment/41659974
has text: @Karl-AndréGagnon I quit that quest [after reading this](http://blog.stackoverflow.com/2010/11/dr-strangedupe-or-how-i-learned-to-stop-worrying-and-love-duplication/). I don't think it's worth the time.
comment on: http://stackoverflow.com/a/26514785
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41927399
has text: Actually, I just want data to use it for session variables. So I changed my javascript code to submit function as you said above. But I still can't see data on php side. How should I change my html and php code to handle this data?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26654632

http://stackoverflow.com/comment/41909634
has text: @Heikki It's meant to be a list of `Person` objects
comment on: http://stackoverflow.com/q/26652327
score: 0
type: Comment
type: QuestionComment

ruby-on-rails
tags question: http://stackoverflow.com/q/26541625
tags question: http://stackoverflow.com/q/26642318
tags question: http://stackoverflow.com/q/26629751
type: Tag
tags question: http://stackoverflow.com/q/26609751
tags question: http://stackoverflow.com/q/26519254
tags question: http://stackoverflow.com/q/26663809
tags question: http://stackoverflow.com/q/26641795
tags question: http://stackoverflow.com/q/26535261
tags question: http://stackoverflow.com/q/26622464
tags question: http://stackoverflow.com/q/26592393
tags question: http://stackoverflow.com/q/26632411
tags question: http://stackoverflow.com/q/26536603
tags question: http://stackoverflow.com/q/26659441
tags question: http://stackoverflow.com/q/26516975
tags question: http://stackoverflow.com/q/26559325
tags question: http://stackoverflow.com/q/26664848
tags question: http://stackoverflow.com/q/26516870
tags question: http://stackoverflow.com/q/26608859
tags question: http://stackoverflow.com/q/26639153
tags question: http://stackoverflow.com/q/26593758
tags question: http://stackoverflow.com/q/26656150
tags question: http://stackoverflow.com/q/26517897
tags question: http://stackoverflow.com/q/26600336
tags question: http://stackoverflow.com/q/26599330
tags question: http://stackoverflow.com/q/26661663
tags question: http://stackoverflow.com/q/26671948
tags question: http://stackoverflow.com/q/26619244
tags question: http://stackoverflow.com/q/26635820
tags question: http://stackoverflow.com/q/26630144
tags question: http://stackoverflow.com/q/26566237
tags question: http://stackoverflow.com/q/26569636
tags question: http://stackoverflow.com/q/26573981
tags question: http://stackoverflow.com/q/26530331
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/26596735
tags question: http://stackoverflow.com/q/26660231
tags question: http://stackoverflow.com/q/26641240
tags question: http://stackoverflow.com/q/26577929
tags question: http://stackoverflow.com/q/26599923
tags question: http://stackoverflow.com/q/26582330
tags question: http://stackoverflow.com/q/26635336
tags question: http://stackoverflow.com/q/26628980
tags question: http://stackoverflow.com/q/26574771
tags question: http://stackoverflow.com/q/26577105
tags question: http://stackoverflow.com/q/26531959
tags question: http://stackoverflow.com/q/26634722
tags question: http://stackoverflow.com/q/26568516
tags question: http://stackoverflow.com/q/26655409
tags question: http://stackoverflow.com/q/26667089
tags question: http://stackoverflow.com/q/26541374
tags question: http://stackoverflow.com/q/26518355
tags question: http://stackoverflow.com/q/26623911
tags question: http://stackoverflow.com/q/26563644
tags question: http://stackoverflow.com/q/26655390
tags question: http://stackoverflow.com/q/26650471
tags question: http://stackoverflow.com/q/26612998

http://stackoverflow.com/a/26528699
has comment: http://stackoverflow.com/comment/41684025
has body: I would do this: var timePeriod = [ "today" , "yesterday" , "this week" , "last week" , "this month" , "last month" ]; for (var i in timePeriod) { with ({ period: timePeriod[i] }) { ... } } This has two advantages over @MarkReed's solution: It works in all browsers. It's faster because no function is ever called. In addition, the use of the with statement prevents the infamous for loop clousure problem.
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41684339
has comment: http://stackoverflow.com/comment/41683923
has comment: http://stackoverflow.com/comment/41685907
score: 1
answers question: http://stackoverflow.com/q/26528444
downvote count: 1
has comment: http://stackoverflow.com/comment/41683993

http://stackoverflow.com/a/26648908
score: 0
type: Answer
has body: Try this : use Math.random to get random row count and hide using index. $(function(){ $('input[value="Shuffle"]').click(function(){ $('table tr').show(); var count = 0; var array = []; while(count&lt;5) { var index = parseInt(Math.random(100)*10); if(array.indexOf(index)&lt;0) { array.push(index); $('table tr:eq('+index+')').hide(); count++; } } }); }); JSfiddle Demo
answers question: http://stackoverflow.com/q/26648463

http://stackoverflow.com/q/26668600
type: Question
upvote count: 3
answer count: 1
has answer: http://stackoverflow.com/a/26670864
tagged with: javascript
favorite count: 0
tagged with: omnibox
tagged with: google-chrome-extension
has body: I am building a Chrome extension that translates typos in a text field within the Chrome browser. I have used the contextMenu API and succeeded in implementing the extension, with which the user can bring up a context menu and select the extension menu to translate his or her selected text. I noticed, however, the permission of the contextMenu API did not extend to the omnibox, where a different context menu(shown below) without my extension popped up. Could you shed some light on this and help me figure out what permissions/APIs I should look into in order to take control of chrome's onmibox's context menu?
has title: How can I add to the context menu in Chrome's Omnibox(Address bar)?
downvote count: 0
tagged with: google-chrome
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26670864

http://stackoverflow.com/comment/41882816
has text: You are using a mix of Bootstrap 2 and Bootstrap 3 classes. Choose one or the other. .row-fluid, .spanX are not classes in Bootstrap 3. Please read docs, look at examples, and check out .list-inline.
comment on: http://stackoverflow.com/q/26637728
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41817839
type: Comment
has text: yes click is working fine :) dont know the reason :)
comment on: http://stackoverflow.com/a/26601752
score: 0
type: AnswerComment

http://stackoverflow.com/a/26540892
answers question: http://stackoverflow.com/q/26540873
type: Answer
score: 1
upvote count: 1
has body: this is not a string, also .empty-comment is the next sibling of the parent. $('.submit-comment').click(function(event) { event.preventDefault(); $(this).parent().next('.empty-comment').append('comment inserted'); }); 0/400 Send comment
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26540873

http://stackoverflow.com/q/26535825
has answer: http://stackoverflow.com/a/26555319
tagged with: php
has comment: http://stackoverflow.com/comment/41719846
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26555319
has comment: http://stackoverflow.com/comment/41697928
has body: I am following the guide from http://www.w3schools.com/php/php_ajax_database.asp, and I get the basic concept of how this works. My code: PHP: <?php include('./db.php'); $PM = mysqli_query($con, "SELECT DISTINCT PMName FROM report WHERE PMname <> '' ORDER BY PMName ASC"); ?> <?php while ($row = mysqli_fetch_row($PM)) { $selected = array_key_exists('PMName', $_POST) && $_POST['PMName'] == $row[0] ? ' selected' : ''; printf(" %s \n", $row[0], $selected, $row[0]); } ?> JavaScript: and the getuser.php page: <?php $q = intval($_GET['q']); include('./db.php'); $sqlPM= "SELECT * FROM report WHERE PMName = '".$q."'"; $result = mysqli_query($con, $sqlPM); ?> <?php echo $q ; ?> I have read through about 12 posts here and tried to make sense of the fact that most of these use some form of $.post('getuser.php'to send the variable over to the new PHP page, but the example from w3schools does not do this. On the initial page, my dropdown is populating fine from my database, and the value I select is being passed into the JavaScript function. I check this with alert(str);, but from there, it doesn't ever seem to get to the second PHP page. I tried testing that it came over using echo $q ;, but that comes up as empty. What am I doing wrong that is causing the variable that the JavaScript function captures to not be passed over to the second PHP page? From what I can see, I am following the instructions on the tutorial just fine.
type: Question
tagged with: javascript
has title: Passing JavaScript variable to PHP through AJAX
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41698197

http://stackoverflow.com/comment/41934381
comment on: http://stackoverflow.com/a/26666244
type: AnswerComment
score: 0
type: Comment
has text: All right, I delete the JSON3, please use that code. It will be work in FormData.

http://stackoverflow.com/comment/41754160
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26567394
has text: @SérgioMartins Put a demo into jsFiddle
score: 0

http://stackoverflow.com/q/26625619
has answer: http://stackoverflow.com/a/26625677
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26625799
has answer: http://stackoverflow.com/a/26625799
has title: Convert native JavaScript code for a digital clock to jQuery code
has comment: http://stackoverflow.com/comment/41860533
type: Question
has comment: http://stackoverflow.com/comment/41861585
accepted answer: http://stackoverflow.com/a/26625677
score: 0
has comment: http://stackoverflow.com/comment/41861872
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41860602
has comment: http://stackoverflow.com/comment/41860740
has body: I have set a simple function so that the local time displays on the webpage. It updates the local time every second so it looks like a digital clock. I would like to know, what is the JQuery code for the Javascript below? var myVar=setInterval(function(){myTimer()},1000); function myTimer() { var d = new Date(); document.getElementById("Time").innerHTML = d.toLocaleTimeString(); } I have looked everywhere, but no answer. I don't have the skills do to it myself. Thanks.

http://stackoverflow.com/comment/41709786
score: 0
comment on: http://stackoverflow.com/q/26542847
has text: How about a polyfill - http://stackoverflow.com/questions/24400388/showmodaldialog-alternative
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26574750
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26624990
has body: my web page which has a button that opens the email client with an email message. When the user clicks the button, the following script is being executed (JavaScript). My problem is that on Android 4.4.4 and Chrome 38, the mail client (Gmail or android's default) replaces the %20 in '+' sign. I tried to encodeUri, encodeUriComponent and regular spaces chars but every time I get the '+' sign. Any idea how to remove the '+' sign for regular space chars? var addresses = ""; var subject = ""; var body try { subject = config['email']['subject'] ; } catch (e) { subject = "I%20think%20you%20will%20like%20it"; } try { body = config['email']['body']; } catch (e) { body = "Visit%20this%20link:"; } body += document.URL; var href = "mailto:" + addresses + "?" + "subject=" + (subject) + "&amp;" + "body=" + (body); var a = document.createElement('a'); a.href = href; document.body.appendChild(a); a.click();
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
tagged with: urlencode
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has title: "+" sign in JS mailto links (Android & Chrome)
tagged with: android
tagged with: mailto

http://stackoverflow.com/q/26647343
type: UnansweredQuestion
has title: CKEditor - Image Properties dialog is blank
linked to: http://stackoverflow.com/q/44341516
type: Question
has answer: http://stackoverflow.com/a/32853287
has body: I am using the default Image plugin with the usual values: CKEDITOR.replace( 'editor', { filebrowserBrowseUrl: '/app/myimages.html', filebrowserUploadUrl: '/app/myfiles.html', filebrowserImageBrowseUrl: '/app/myimages.html' } The image shows up correctly in the editor after selection via image select dialog box. But when i right-click on the image and select Image Properties menu. The dialog that opens does not contain the image URL or width or height etc. It essentially has no values.
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/41886211
score: 0
comment on: http://stackoverflow.com/q/26639329
type: Comment
type: QuestionComment
has text: @ ray9209 when click the link i want the page to scroll to the top and open the link in a new window.

http://stackoverflow.com/q/26666521
accepted answer: http://stackoverflow.com/a/26666786
type: Question
downvote count: 4
has answer: http://stackoverflow.com/a/26666613
tagged with: javascript
has comment: http://stackoverflow.com/comment/41934609
tagged with: area
answer count: 3
possible better answer: http://stackoverflow.com/a/26666613
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: Area of a Parallelogram (A = base * height) Base: Height: Answer: function areaParallelogramFunction(base, height) { base = document.getElementById("parallelogramAreaBase").value; height = document.getElementById("parallelogramAreaHeight").value; var answer = base * height; document.getElementById("answerAreaParallelogram").value = answer; } I am unsure why this code is not working. It seems like a simple program, please help.
has answer: http://stackoverflow.com/a/26666786
score: -3
upvote count: 1
has title: Area of parallelogram function, javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26666741

http://stackoverflow.com/comment/41690250
type: AnswerComment
comment on: http://stackoverflow.com/a/26531619
has text: no reason that adding `var` should stop script. Shouldn't declare variables without using `var` or asking for all sorts of problems
type: Comment
score: 0

http://stackoverflow.com/comment/41826359
has text: *sigh* as you may be able to tell math is not my strong point. That makes perfect sense thank you. If you'd like to write it up as an answer I will of course award it to you.
score: 0
comment on: http://stackoverflow.com/q/26606214
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41667735
score: 0
comment on: http://stackoverflow.com/q/26515671
type: Comment
type: QuestionComment
has text: Yep, this certainly does what you wanted. The only theoretical question that I have is how you guarantee that these recursive calls will end. But I guess you know better than me. Btw, this was an interesting problem because I could only do it with BFS as it is below, while my original idea which was closer to a DFS was not working. Anyway, I have to go.

http://stackoverflow.com/comment/41713052
has text: security by obscurity... yeah that works... not!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26543732
score: 0

http://stackoverflow.com/a/26587739
downvote count: 0
has body: Problem is with third argument of google.maps.event.addListener. That anonymous function contains the variable from the parent scope which when evaluated with marker click will always take the last value assigned. Look for closure for more details. However you may able to get the desired behaviour by using "bind" feature of javascript function prototype in below manner: //inside for loop google.maps.event.addListener(marker, 'click', handleMarkerClick.bind(undefined, marker, i)); //other codes if any... defining handleClick function handleMarkerClick(marker, index) { if (typeof infowindow === 'undefined') { infowindow = new google.maps.InfoWindow({}); } var data = infoCentros[index]//helpful data //create content with dynamic data infowindow.setContent("dynamic content"); infowindow.open(marker.getMap(), marker);//modify as per your requirement }
type: AcceptedAnswer
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26586879
upvote count: 1
answers question: http://stackoverflow.com/q/26586879

http://stackoverflow.com/comment/41798096
has text: Please try to create a [jsfiddle](http://jsfiddle.net)
comment on: http://stackoverflow.com/q/26591619
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26584001
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41863129
answer count: 0
linked to: http://stackoverflow.com/q/3339710
type: Question
has title: CKEDITOR how to add span to every line
has body: I use ckeditor and I would like to wrap every line with span tag. For example, when I enter text in the editor I get: this is the first line this is the second line of text and the third one I want it to be by default: this is the first line this is the second line of text and the third one I know there is something called "dataProcessor" but I don't understand how to use it. If it is possible to add this rule also to pasted text it will be even better. Thanks!
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
has comment: http://stackoverflow.com/comment/41784363
score: 0
has comment: http://stackoverflow.com/comment/41783838
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41856539

http://stackoverflow.com/q/26522304
upvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26523183
has title: how to refer to a fancytree variable from another function in javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26522432
has body: I'm trying to modularise my javascript. I'm not new to JS, but I my knowledge is not as advanced as some. This is probably an easy question for someone who's good at JS. In the code below - how can I get a handle to the fancytree that's created in the 'handleTreeBrowser' function, I need the reference in the success function of the 'newTopCategoryForm'? Is there a better option than just creating the variable in a higher scope? I tried just searching for the element via JQuery thinking it would already be embelished with the fancytree properties &amp; methods etc...but the reload function is undefined. /** The edit related products page controls **/ var ManageCategories = function () { var handleFormButtons = function () { console.debug('initialising buttons...'); $(document).on('click','.new-topcategory-button', function(event) { event.preventDefault ? event.preventDefault() : event.returnValue = false; console.debug('clicked...'); console.debug($(this).attr('href')); var refreshURI = $(this).attr('href'); $.get(refreshURI) .success(function(data,status,xhr){ // need to do something with the data here. $('#categoryFormContainer').html(data); RichText.init(); }); }) }; var handleNewTopCategoryForm = function () { console.debug('initialising top category form'); $(document).on('submit', '#topCategoryForm', function(event) { console.debug("submitting the new top category form"); var form = $(this); var token = $("meta[name='_csrf']").attr("content"); var header = $("meta[name='_csrf_header']").attr("content"); var formData = form.serializeArray(); $(this).find('button').attr('disabled'); event.preventDefault ? event.preventDefault() : event.returnValue = false; var jqxhr = $.ajax( { url: form.attr('action'), type: 'POST', data: formData, headers: {'X-CSRF-TOKEN': token} } ) .success(function (data, status, xhr) { var messageContainer = $('#messageContainer'); var source = $('#ui_message_template').html(); var template = Handlebars.compile(source); var html = template(…
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26523183
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26522432
answer count: 2

http://stackoverflow.com/q/26620947
score: 0
tagged with: iphone
has answer: http://stackoverflow.com/a/26626672
answer count: 1
has title: How to optimize hybrid app for iphone6/6+
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41862033
tagged with: cordova
has body: I am working on a hybrid app which works fine on all the iphones except iphone6/6+ The images,fonts,input boxes in the app appearing large and blur on iphone6/6+ in comparison to other older version of iphones Since iphone6/6+((IOS 8)) auto scaling it,so how to stop scaling or downscale those elements(images,input field and fonts),so they appear uniform across all the iphones
type: Question
tagged with: ios
tagged with: javascript

http://stackoverflow.com/q/26573666
tagged with: carousel
has comment: http://stackoverflow.com/comment/41765246
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41765090
type: Question
has body: My automatic carousel doesn't work. I tried using setInterval as you can see below but it still doesn't work. I really don't know why. It's syntactically correct and I think it ain't logically wrong either. Please help. HTML: &lt;div class = "slidingPhotos" align="center"&gt; &lt;div class = "slide active-item"&gt; &lt;div class = "photo1"&gt; &lt;img src = "Images/mainImage.jpg"&gt;&lt;/img&gt; &lt;/div&gt; &lt;div class = "description"&gt; &lt;h3&gt; Welcome to O-Grocery! Your #1 Online Grocery Store &lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class = "slide "&gt; &lt;div class = "container"&gt; &lt;div class = "photo1"&gt; &lt;img src = "Images/mainImage3.jpg"&gt;&lt;/img&gt; &lt;/div&gt; &lt;div class = "description"&gt; &lt;h3&gt; You have a thousand products to choose from at O-Grocery! &lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class = "slide"&gt; &lt;div class = "container"&gt; &lt;div class = "photo1"&gt; &lt;img src = "Images/mainImage2.jpg"&gt;&lt;/img&gt; &lt;/div&gt; &lt;div class = "description"&gt; &lt;h3&gt; You can guarantee 100% freshness of goods! &lt;/h3&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class ="footer" align="center"&gt; &lt;div class = "dots"&gt; &lt;div class = "arrow-prev"&gt; &lt;a href ="#"&gt;&lt;img src = "Images/arrow-prev.png"&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; &lt;ul class="slider-dots"&gt; &lt;li class="dot active-dot"&gt;&amp;bull;&lt;/li&gt; &lt;li class="dot"&gt;&amp;bull;&lt;/li&gt; &lt;li class="dot"&gt;&amp;bull;&lt;/li&gt; &lt;/ul&gt; &lt;div class = "arrow-next"&gt; &lt;a href ="#"&gt;&lt;img src = "Images/arrow-next.png"&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; jQuery: setInterval(function() { var currentSlide = $('.active-slide'); var nextSlide = currentSlide.next(); var currentDot = $('.active-dot'); var nextDot = currentDot.next(); if (nextSlide.length === 0) { nextSlide = $('.slide').first(); nextDot = $('.dot').first(); currentSlide.fadeOut(500).…
tagged with: javascript
has comment: http://stackoverflow.com/comment/41765226
has comment: http://stackoverflow.com/comment/41765273
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41765168
tagged with: jquery
has answer: http://stackoverflow.com/a/26574840
has title: jQuery automatic carousel

http://stackoverflow.com/comment/41719615
type: AnswerComment
comment on: http://stackoverflow.com/a/26540108
score: 0
type: Comment
has text: I added a fix for this.

http://stackoverflow.com/q/26617172
has comment: http://stackoverflow.com/comment/41845623
answer count: 1
has body: I have many select all buttons within my HTML that essentially do the same thing. However they all have different ids because the buttons represent different divs that have different content within them. I am new to JS and I was wondering how can I perform the same logic across many select all buttons when one of them is clicked? I thought about putting each select all button in an array containing all the ids and using arr = [id1,id2,id3]; for (var i = 0; i &lt; arr.length; i++) { var k = document.getElementById(arr[i]); k.onclick = function() {//...logic...} } I'm new to JS so I'm not sure if this is a good method to approach
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: same logic across different button IDs
has comment: http://stackoverflow.com/comment/41845772
linked to: http://stackoverflow.com/q/111102
has comment: http://stackoverflow.com/comment/41845596
has answer: http://stackoverflow.com/a/26617257
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41845547
has comment: http://stackoverflow.com/comment/41845831

http://stackoverflow.com/a/26558842
has comment: http://stackoverflow.com/comment/41738644
has comment: http://stackoverflow.com/comment/41738753
has comment: http://stackoverflow.com/comment/41738898
accepted answer of: http://stackoverflow.com/q/26558783
type: Answer
answers question: http://stackoverflow.com/q/26558783
has body: You need to run your code after the DOM is loaded. Either move it to after the &lt;/body&gt; tag, or run it in the window.onload handler. Also, your assignment statements need to end with ;, not ,. window.onload = function() { var dir = 'http://seriousphotography.co.uk/HD-Site/images/album/01/'; var randomCount = Math.round(Math.random() * (imgCount - 1)) + 1; var images = new Array; images[1] = "01"; images[2] = "02"; images[3] = "03"; images[4] = "04"; images[5] = "05"; images[6] = "06"; images[7] = "07"; images[8] = "08"; images[9] = "09"; images[10] = "10"; document.getElementById("image").style.backgroundImage = "url(" + dir + images[randomCount] + ".jpg" + ")"; }; It would be simpler to write it as: window.onload = function() { var dir = 'http://seriousphotography.co.uk/HD-Site/images/album/01/'; var images = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10"]; var randomCount = Math.floor(Math.random() * images.length); document.getElementById("image").style.backgroundImage = "url(" + dir + images[randomCount] + ".jpg" + ")"; }; See Get random item from JavaScript array Using classes and jQuery, it would be: $("#image").addClass("image"+images[randomCount]); Fiddle: http://jsfiddle.net/barmar/LgjzvcpL/12/
has comment: http://stackoverflow.com/comment/41738717
has comment: http://stackoverflow.com/comment/41738605
has comment: http://stackoverflow.com/comment/41738863
has comment: http://stackoverflow.com/comment/41738784
has comment: http://stackoverflow.com/comment/41738682
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41723397
type: Comment
comment on: http://stackoverflow.com/a/26550614
has text: Need to account for the decimal `.` as well
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41869198
comment on: http://stackoverflow.com/q/26627872
type: Comment
has text: please check your question. I updated the fiddle. Does it work?
type: QuestionComment
score: 0

http://stackoverflow.com/a/26543962
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26543891
has body: All you need is to compare name property with localeCompare method: cart.sort(function(a, b) { return b.name.localeCompare(a.name); });
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41711625

http://stackoverflow.com/a/26536565
accepted answer of: http://stackoverflow.com/q/26535074
answers question: http://stackoverflow.com/q/26535074
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41699448
upvote count: 2
type: Answer
has body: I'm normally against this, but it seems as though you genuinely need help, so here it is. Keep in mind, this is very basic and there are better ways to do this, but I wanted to keep it very simple for you since you're just starting out. First - you really don't need a button. If you want a button, you can assign the function to a button action, but this code automatically calculates the total for you. Also, you'll want to add in some validation, this quick example assumes that everyone always just enters a number like they're supposed to... which never happens, so you'll want to look into some validation as well. Here is a working example: http://jsfiddle.net/813dL6d3/1/ And the code: HTML: &lt;input type="text" id="weight1" onblur="calculateForm();" /&gt;&lt;br /&gt; &lt;input type="text" id="weight2" onblur="calculateForm();" /&gt;&lt;br /&gt; &lt;input type="text" id="weight3" onblur="calculateForm();" /&gt;&lt;br /&gt; &lt;input type="text" id="weightTotal" /&gt; Javascript: var calculateForm = function () { document.getElementById("weightTotal").value = ( Number(document.getElementById("weight1").value) + Number(document.getElementById("weight2").value) + Number(document.getElementById("weight3").value) ) * 150; };

http://stackoverflow.com/comment/41708561
type: QuestionComment
comment on: http://stackoverflow.com/q/26542207
has text: what type of code is this?
score: 0
type: Comment

http://stackoverflow.com/q/26596423
accepted answer: http://stackoverflow.com/a/26599206
favorite count: 0
tagged with: ember.js
score: 1
has title: Ember itemController gets reinstantiated when ArrayController reorders
upvote count: 1
has answer: http://stackoverflow.com/a/26599206
type: AnsweredQuestion
has body: Is this expected behavior? App.PostsController = Ember.ArrayController.extend({ itemController: 'post', sortProperties: ['date'], sortAscending: false }); App.PostController = Ember.ObjectController.extend({ init: function () { console.log('post controller init'); this.set('propertyNotIncludedInModel', true); } }); Say I have a list of posts, and I inline-edit one of the post's date. The PostsController will reorder the list. As soon as it does, the console will log that the one whose date changed ran init. Of course, any controller properties (not model properties), are no longer there (I mean, it's a new object, so any property that doesn't have a reason to be there is undefined). You can see this happening in this jsBin. This seems horribly wrong. I feel like it breaks any sort of analogy to real life. If I have a bunch of objects sitting on a table and I want to reorder them, I don't destroy the one I want to move and then recreate it. What is Ember's justification for this behavior, and how do I deal with it? I need to set controller properties on an object whose position in an array might change. Even better, I need the views and their components represented by that object to persist and maintain their own states and properties as well—currently didInsertElement is being called on every view/component under the item controller, messing things up more. How do I make sure the properties and subviews I need persist when the object gets moved?
type: Question
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41886542
type: Comment
type: QuestionComment
has text: @SterlingArcher - there will be multiple qty elements but I want it to reference the qty element within the visible section **st**.
comment on: http://stackoverflow.com/q/26639624
score: 0

http://stackoverflow.com/q/26574927
upvote count: 0
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26575006
has body: I'm trying to use a class that is already declared. When the user types in something in the username text box I've used a javascript function to load a php file where it checks wether a username is available. this file is recalled for every keypress. A connection to my database, which is a class, is already declared on the main page, however, the php file can't actually use the database classes. What can I do? If I wrote a separate script to connect to the database it works, but I don't want to do that. Contents of Php File: $query("SELECT username FROM client WHERE username = :username"); $query_params = array( ':username' => $username ); $db->DoQuery($query); $check_num_rows = $db->fetch(); if ($username == NULL) echo 'Choose a Username'; else if (strlen($username)<=3) echo 'too short.'; else { if ($check_num_rows ==0) echo "Available!"; else if ($check_num_rows >= 1) echo "Not Available."; } ?> body.php Username: database class class database { public function initiate() { try { $this->database = new PDO("mysql:host='host';dbname='db", 'user, 'pass'); } catch(PDOException $e) { $error = "I'm unable to connect to the database server."; die("Failed to connect to database: " . $e->getMessage()); } } public function DoQuery($query, $query_params) { try { $this->result = $this->database->prepare($query); if ($query_params != null) { $this->result->execute($query_params); } else { $this->result->execute(); } } catch(PDOException $e) { die(); } } public function fetch() { return $this->result->fetch(); } }
score: -1
favorite count: 0
has comment: http://stackoverflow.com/comment/41767610
type: Question
tagged with: php
answer count: 1
tagged with: pdo
has comment: http://stackoverflow.com/comment/41767760
downvote count: 1
has answer: http://stackoverflow.com/a/26575006
has title: Trying to use a class in a php page embedded with javascript

http://stackoverflow.com/a/26582014
type: Answer
has body: var $allWraps = $(".wrap"); $allWraps.each(function (index, element) { $(element).on("click", ".kid ", function () { $allWraps.addClass("unfocused"); $allWraps.removeAttr("id"); $(element).removeClass("unfocused"); $(element).attr("id", "focused"); }); });
answers question: http://stackoverflow.com/q/26581618
score: 0

http://stackoverflow.com/a/26626278
type: Answer
answers question: http://stackoverflow.com/q/26626168
score: 0
has body: It is because you cannot have more than one element in the DOM with the same id. If you do so you will always get only the first element with the id. See the code, its getElementById and not getElementsById. So it it always return a single element.

http://stackoverflow.com/q/26618272
has title: How to dynamically form a String based on Input
tagged with: javascript
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/41847647
accepted answer: http://stackoverflow.com/a/26618491
favorite count: 0
has body: I have a symbol (@) seperated variable as shown below var inputStr = "IceCreams@Cone"; How can i split this and form a string in java script variable . With the above input String how can form a string as Are You Sure to add a Category Under IceCreams => Cone I have tried as shown below ,but couldn't achive that dynamically Thanks in advance . function myFunction(inputStr) { var res = inputStr.split('@'); var r = confirm("Are You Sure to add a Category Under" +res[0]+" "+res[1]+" ); if (r == true) { } else { } } http://jsfiddle.net/4km0k9nv/1/
has comment: http://stackoverflow.com/comment/41848066
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41847899
has answer: http://stackoverflow.com/a/26618573
has comment: http://stackoverflow.com/comment/41847766
possible better answer: http://stackoverflow.com/a/26618489
has answer: http://stackoverflow.com/a/26618584
downvote count: 1
has answer: http://stackoverflow.com/a/26618491
has answer: http://stackoverflow.com/a/26618489
type: Question
has comment: http://stackoverflow.com/comment/41847727

http://stackoverflow.com/q/26664164
type: AnsweredQuestion
tagged with: alert
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Passing JSON through AJAX Plus Button Dilema
tagged with: javascript
has body: so I am attempting to pass some information in a JSON object and have a php page insert the data into a database. However, I am running into some trouble. The "update" button exists in a popup window. The user then clicks "update" and the inputted data should be processed accordingly. However, I fear that I am not even reaching my .click function. None of my alerts seems to be triggered. Below I will point out where issues are occurring. Thank you! <button onClick="openPopup(<?php echo $row['ID'];?>);"><?php echo $row['ID'];?> Update Thank you for looking!
score: 0
accepted answer: http://stackoverflow.com/a/26664227
has comment: http://stackoverflow.com/comment/41931153
answer count: 1
tagged with: button
tagged with: ajax
has answer: http://stackoverflow.com/a/26664227

http://stackoverflow.com/comment/41730232
type: AnswerComment
type: Comment
score: 0
has text: Thanks, I'll take a look after lunch.
comment on: http://stackoverflow.com/a/26554214

http://stackoverflow.com/a/26568631
upvote count: 1
has body: As mentioned, you can (need to) use jsonp because faa.gov apparently forgot to add the appropriate header to their API responses. By the way - always prefer json over xml with Javascript - it's so much nicer to work with. // ask faa.gov to add the HTTP header "Access-Control-Allow-Origin: *" to their response // then you can use this // jQuery.getJSON('http://services.faa.gov/airport/status/IAD?format=json'); jQuery.ajax({ url: 'http://services.faa.gov/airport/status/IAD?format=json', dataType: 'jsonp', success: function (data) { document.myform.result1.value = data.city; } });
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41771704
has comment: http://stackoverflow.com/comment/41773117
answers question: http://stackoverflow.com/q/26567848

http://stackoverflow.com/comment/41909583
score: 0
has text: you're testing the checkbox when the document is loaded, not every time they click it.
comment on: http://stackoverflow.com/q/26653232
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26578057
linked to: http://stackoverflow.com/q/8110934
has body: Background I'm not the hottest jQuery guy out there by a very long shot and I'm trying to strip out the repeated work in the below code. Whilst the performance overhead is probably minimal and negligible - this is more a case of not wanting to write crappy code that does the same thing several times. Basically I have a simple invoice form, that a user can add multiple items too. The form initially has 4 inputs: Item Name, Item Price, Item Quantity and Total The total is calculated whenever the Price or Quantity field fires a change event Problem - Partially resolved (See Update) The user can add an additional row of inputs for a second (or third, fourth, fifth, etc...) item The existing javascript which attaches the event handler to the price and quantity fields has already run so will not attach listeners to the newly added row of inputs. Solution ? Currently I've hashed out something horrible whereby after adding the new row of inputs I re-attach an event listener to all input fields. That's cool I guess, if you take no pride in the quality of your work, but if the invoice is 20 items do I really need to on adding the 20th item row loop over the 19 rows that already have listeners attached, attach them again and then attach listeners to the new row. I would hope not. I've already managed to target the newly added row of inputs to wipe the values from the cloned inputs - so I'm thinking just target the new input fields and attach listeners - but I'm getting in a right two and eight because ideally I'd like to do this like so Clone the input row Clear the values Attach listeners Add to the DOM What I'm currently doing which feels grotesque is Clone the row Add the row to the DOM Select the newly added row and wipe the values Select the newly added Quantity field and attach a listener Select the newly added Price field and attach a listener Select the newly added Total field and attach a listener (to update the invoice total) Code below, for you to laugh at and then …
upvote count: 1
has comment: http://stackoverflow.com/comment/41773480
has comment: http://stackoverflow.com/comment/41773583
type: Question
tagged with: javascript
has title: how to attach javascript event handlers to these elements created in javascript
has comment: http://stackoverflow.com/comment/41773650
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41773744
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26578093
accepted answer: http://stackoverflow.com/a/26578093
score: 1

http://stackoverflow.com/a/26516871
has comment: http://stackoverflow.com/comment/41686332
type: Answer
has comment: http://stackoverflow.com/comment/41687005
answers question: http://stackoverflow.com/q/26516212
score: 0
has body: Disable antialising when scaling images Not sure about using the HTML Canvas but you could try the CSS settings in that link to disable the anti-aliasing of the images in your page.

http://stackoverflow.com/q/26553251
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41728761
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41801786
tagged with: iframe
has body: I have a page with an iframe. The two sites (parent site is php, child site is asp.net 2.0) are on different domains, although I control both of them. Most of the work is done within the iframe. I am using the postMessage function to send information about the total height of the content in the iframe. However, it always comes up as 0, I guess because the script executes before everything is laid out on the screen. Is there a way I can obtain the total height (I think it's scrollHeight, right?) of the child site so that I can send it to the parent? Thanks!
has answer: http://stackoverflow.com/a/26553437
tagged with: postmessage
has comment: http://stackoverflow.com/comment/41730474
has comment: http://stackoverflow.com/comment/41729992
has comment: http://stackoverflow.com/comment/41730304
type: Question
has answer: http://stackoverflow.com/a/26615514
has comment: http://stackoverflow.com/comment/41730360
has title: When to call Javascript for ScrollHeight
has comment: http://stackoverflow.com/comment/41730106
tagged with: javascript
has comment: http://stackoverflow.com/comment/41729434
score: 0
answer count: 2

http://stackoverflow.com/q/26561150
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41773181
has comment: http://stackoverflow.com/comment/41754630
downvote count: 0
score: 1
has body: I've recently upgraded to Chrome 38 and I've observed strange behavior. When emptying a containing 2 , both of them seem selected afterwards. When re-appending the options to the original select, the value of the select is different than in the beginning. Here's the code (this strange behaviour occurs on Chrome 38 and Firefox 32; on Chrome 37 it worked fine, i.e. only the first option had selected attribute true and select.val() yielded 1): var select = $(' '); var option1 = $(' opt1 ').appendTo(select); var option2 = $(' opt2 ').appendTo(select); $.merge(option1, option2); select.empty(); // Both are selected. option1.each(function() { console.log(this); console.log(this.selected); }); select.append(option1); // The second one is considered to be "really" selected. console.log(select.val()); jsfiddle What I want to achieve in the end is (stable) sort the s based on an arbitrary comparison function.
has title: Multiple selected options when select emptied and repopulated with jquery
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 1
has comment: http://stackoverflow.com/comment/41743025
favorite count: 0
has comment: http://stackoverflow.com/comment/41742873
has comment: http://stackoverflow.com/comment/41743001
answer count: 0

http://stackoverflow.com/comment/41891088
type: AnswerComment
has text: Try for example `function numberOfArguments() {return arguments.length;}` and call the custom function in a cell with different numbers of arguments.
type: Comment
comment on: http://stackoverflow.com/a/26641869
score: 0

http://stackoverflow.com/a/26633325
score: 0
type: Answer
has body: Remove windowHeight from the calculation Before: heightDocument = (windowHeight) + ($('#one').height()) + ($('#two').height()) + ($('#three').height()) + ($('#four').height()) + ($('#five').height()); After: heightDocument = ($('#one').height()) + ($('#two').height()) + ($('#three').height()) + ($('#four').height()) + ($('#five').height(); DEMO
answers question: http://stackoverflow.com/q/26632974

http://stackoverflow.com/comment/41842639
type: AnswerComment
has text: You can however disable the validation and do it by yourself but the time when you could fetch the input.value it would already be valid
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26615470

http://stackoverflow.com/comment/41737917
type: AnswerComment
comment on: http://stackoverflow.com/a/26527881
has text: No I don't remove the question. :P
score: 0
type: Comment

click
tags question: http://stackoverflow.com/q/26626033
tags question: http://stackoverflow.com/q/26521914
type: Tag
tags question: http://stackoverflow.com/q/26605491
tags question: http://stackoverflow.com/q/26576275
tags question: http://stackoverflow.com/q/26534556
tags question: http://stackoverflow.com/q/26656647
tag name: click

http://stackoverflow.com/comment/41687548
type: AnswerComment
has text: @user3164891 Your question wasn't clear enough about that point. I'm glad to help, but such an information have to be included at the first place!
type: Comment
comment on: http://stackoverflow.com/a/26528117
score: 0

http://stackoverflow.com/q/26609901
favorite count: 0
has body: I want to save the actual date in a variable. only the date, no time var a = @Date(@Now()); datasource.replaceItemValue("variable", a)` And var a = @Date(@Now()); var b = new Date(a.getYear(), a.getMonth(), a.getDay()); datasource.replaceItemValue("variable", b) Are returning 28.10.14 00:00 var dt:NotesDateTime = @Date(@Now()); datasource.replaceItemValue("variable", dt.getDateOnly()); Is throwing me an error Isn't there a simple way to get only the actual date without the time?
has comment: http://stackoverflow.com/comment/41832920
has answer: http://stackoverflow.com/a/26610958
accepted answer: http://stackoverflow.com/a/26610958
has comment: http://stackoverflow.com/comment/41833244
has answer: http://stackoverflow.com/a/26610714
linked to: http://stackoverflow.com/q/19636641
tagged with: lotus-notes
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26610715
score: 1
has comment: http://stackoverflow.com/comment/41831701
type: Question
possible better answer: http://stackoverflow.com/a/26610714
has title: Save the actual date in a variable (only date, no time)
answer count: 3
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: xpages
has comment: http://stackoverflow.com/comment/41833619

http://stackoverflow.com/a/29036471
answers question: http://stackoverflow.com/q/26659418
type: Answer
score: 0
has body: Here is the solution I came up with. First, we need to load the AJAX parameters from the anchor on page load: $(document).ready(function() { if (window.location.hash.indexOf('#?') == 0) { var hashParameters = window.location.hash.substring(2).split('&amp;'); var hashIndex = 0; for (var i = 0; i &lt; hashParameters.length; i++) { var hp = hashParameters[i] var delim = hp.indexOf('='); var key = hp.substring(0, delim); var value = hp.substring(delim + 1); addParameter(); $('#parameter-' + i + '-key').val(key); $('#parameter-' + i + '-value').val(value); } } else { addParameter(); $('#parameter-0-key').val('id'); } }); addParameter() is a method that adds the AJAX parameters to the page visually, and then I am updating its values. Then it's just a matter of building up the anchor and setting it back to the URL: function getParameterValues() { // ... var anchor = ''; for (var i = 0; i &lt; index + 1; i++) { var keyName = '#parameter-' + i + '-key'; var valueName = '#parameter-' + i + '-value'; var key = $(keyName).val(); var value = $(valueName).val(); if (typeof key == 'undefined' || typeof value == 'undefined') { continue; } if (key == '') { continue; } // ... if (anchor.length == 0) { anchor += '?' + key + '=' + value; } else { anchor += '&amp;' + key + '=' + value; } } window.location.hash = '#' + anchor; return values; } It would be nice if jQuery ever came up with a way to add/remove parameters to the URL like this itself.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26659418

http://stackoverflow.com/q/26514331
accepted answer: http://stackoverflow.com/a/26514542
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26514394
type: Question
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26514389
has answer: http://stackoverflow.com/a/26514729
upvote count: 1
has title: Adding and Removing Values from JavaScript Array
has body: I have a JavaScript array of numbers. My array is defined like this: var customerIds = []; I have a function that is responsible for inserting and removing ids to/from this array. Basically, my function looks like this: function addOrRemove(shouldAdd, customerId) { if (shouldAdd) { if (customerIds.contains(customerId) === false) { customerIds.push(customerId); } } else { customerIds.remove(customerId); } } This function is basically pseudocode. A JavaScript array does not have a contains or remove function. My question is, is there any elegant way of tackling this problem? The best I can come up with is always looping through the array myself and tracking the index of the first item found. Thank you for any insights you can provide.
possible better answer: http://stackoverflow.com/a/26514394
favorite count: 0
has answer: http://stackoverflow.com/a/26514542

http://stackoverflow.com/q/26651632
has body: As for 1.7 the live event is deprecated - i'm using currently 1.11.1 jquery version. Now, also on the docs says that for 1.9 jquery the live was removed - fine by me. For the next case &lt;script type="text/javascript"&gt; $(document).ready() { $("#submitFile").live('click', function (e) { alert('button clicked'); e.preventDefault(); alert(1); }); $('#fileCtrl').live('change', function (event) { alert(1); }); &lt;!-- this was a typo from--&gt; $('#fileCtrl').live('on', function (event) { alert(1); }); } &lt;/script&gt; &lt;div id="uploadDiv"&gt; &lt;input name="import" value="import" type="file" id="fileCtrl" /&gt; &lt;input type="submit" value="export" id="fileupload" /&gt; &lt;/div&gt; for my current project i had to re-use live. the "on" event simple doesn't fire. any reason why? i tried with live and it work, event that the it says on doc that it was removed on version 1.9. Any tip on this? Why is live still working and why "on" doesn't? Thanks in advance.
type: Question
has answer: http://stackoverflow.com/a/26652589
has comment: http://stackoverflow.com/comment/41907488
has comment: http://stackoverflow.com/comment/41907135
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26651818
score: 0
has comment: http://stackoverflow.com/comment/41907915
has comment: http://stackoverflow.com/comment/41907759
has answer: http://stackoverflow.com/a/26651790
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41907245
has answer: http://stackoverflow.com/a/26651689
linked to: http://stackoverflow.com/q/8752321
has answer: http://stackoverflow.com/a/26652387
has comment: http://stackoverflow.com/comment/41908211
tagged with: live
has title: jquery 1.11.1 - live vs on

http://stackoverflow.com/comment/41731739
comment on: http://stackoverflow.com/a/26554802
score: 2
type: AnswerComment
has text: It's not because you do not send the information to the server that you do not need to collect it. Think about a password change form. You would have a passwordConfirmation field which doesn't have to be sent.
type: Comment

http://stackoverflow.com/comment/41691779
comment on: http://stackoverflow.com/q/26532288
has text: That is because you are registering a new watch again on the next line.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41733332
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26555768
type: QuestionComment
has text: If 2 Please enter ... Please enter ...

http://stackoverflow.com/q/26534278
has answer: http://stackoverflow.com/a/26534307
type: Question
tagged with: javascript
tagged with: inheritance
score: 0
answer count: 1
has title: not able to acces private method through privilaged methods in javascript
type: UnansweredQuestion
has body: Error : undefined error in console, while trying to print age function var Person = function( myName, myProfession, myage ){ this.name = myName; // Public Variable this.profession = myProfession; var age = myage; // Private Variable this.myAge = function(){ // Privilaged Method return this.age; }; }; var syed = new Person('syed azam','developer',20); console.log(syed + "works fine"); console.log(syed.myAge()); &lt;script src="https://getfirebug.com/firebug-lite-debug.js"&gt;&lt;/script&gt;
tagged with: oop

http://stackoverflow.com/comment/41931333
has text: What browser are you using ?
comment on: http://stackoverflow.com/q/26664285
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26670906
type: Answer
score: 0
has body: Yes i got the solution. Thanks to @artm Untitled Document
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26648842
answers question: http://stackoverflow.com/q/26648842

http://stackoverflow.com/comment/41751946
has text: can you tell us what do you mean by "within the table"?
score: 0
comment on: http://stackoverflow.com/q/26566226
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26653042
has comment: http://stackoverflow.com/comment/41909296
has comment: http://stackoverflow.com/comment/41909274
has comment: http://stackoverflow.com/comment/41909282
accepted answer of: http://stackoverflow.com/q/26652905
score: 3
answers question: http://stackoverflow.com/q/26652905
has body: I don't know if I'm alone in this, but if I need to do that (and it's not uncommon) I bind a custom event name (possibly with a scope) at the same time as I bind the real event ("click" or "change" or whatever): var myCallback = function(ev) { ... }; $(window).on("resize my-resize", myCallback).trigger("my-resize"); That's particularly useful when you're handling something like a "click" event on a checkbox. Triggering the "click" will actually update the checkbox "checked" state, which is not generally what you'd want to do. There's the jQuery .triggerHandler() method, but for whatever reason that only works on the first element in the jQuery object, so you can't trigger the handlers for all the checkboxes in a form with one call.
type: AcceptedAnswer
upvote count: 3
type: Answer
downvote count: 0

backbone-events
tags question: http://stackoverflow.com/q/26584561
tags question: http://stackoverflow.com/q/26550963
type: Tag
tags question: http://stackoverflow.com/q/26571989
tags question: http://stackoverflow.com/q/26565893
tags question: http://stackoverflow.com/q/26532679
tag name: backbone-events

http://stackoverflow.com/a/26620404
accepted answer of: http://stackoverflow.com/q/26608859
answers question: http://stackoverflow.com/q/26608859
upvote count: 1
has body: You have a hash in the name of your ID. Try changing &lt;div id="#relationship"&gt; to &lt;div id="relationship"&gt;
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/27438980
score: 12
answers question: http://stackoverflow.com/q/26650561
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 12
has body: Hi Sweetbabyjesus (so fun to say). You had two questions: 1) The server.r seems to get input called "d3io" (input$d3io) since this is not defined in ui.r, I reasoned it must come from the javascript file. Which element does it actually refer to? That phrase input$d3io has the following components: input is a parameter passed into the function - it's a list that stores the current values of all the widgets in the app. $ is the member selector. d3io refers to the content of the div element with that id ('d3IO("d3io")') in the mainPanel of the UI. 2) I have trouble understanding the custom binding part: var d3OutputBinding = new Shiny.OutputBinding(); That's right, this creates an instance of Shiny.OutputBinding and assigns it to the variable d3OutputBinding. $.extend(d3OutputBinding, { find: function(scope) { return $(scope).find(".d3io"); }, renderError: function(el,error) { console.log("Foe"); }, renderValue: function(el,data) { updateView(data); console.log("Friend"); } }); This code extends the behaviour of d3OutputBinding with three functions called find, renderError and renderValue. Those three functions are required for a Shiny.OutputBinding. find is the key because it returns a list of elements that should be passed into the two render functions via their el parameter. Notice it's returning elements whose css class is "d3io" - that's the same div mentioned earlier. Note that extend() is a function of jQuery javascript library, and the $ in this context is an alias for the jQuery object. Shiny.outputBindings.register(d3OutputBinding); Lets Shiny know that this newly configured object should be put to use now. Cheers, Nick
accepted answer of: http://stackoverflow.com/q/26650561

http://stackoverflow.com/comment/41870304
type: Comment
type: QuestionComment
has text: Is there anyway in my code (C# if not Javascript) I can set the browser to use, overriding the default selection?
comment on: http://stackoverflow.com/q/26630685
score: 0

http://stackoverflow.com/a/26662777
has comment: http://stackoverflow.com/comment/42031218
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42031141
has comment: http://stackoverflow.com/comment/42153430
has comment: http://stackoverflow.com/comment/42032258
type: Answer
has comment: http://stackoverflow.com/comment/42029827
has comment: http://stackoverflow.com/comment/42144328
accepted answer of: http://stackoverflow.com/q/26662040
has comment: http://stackoverflow.com/comment/42030258
has comment: http://stackoverflow.com/comment/42152283
answers question: http://stackoverflow.com/q/26662040
has comment: http://stackoverflow.com/comment/42152067
has comment: http://stackoverflow.com/comment/42033464
has body: You've got problems. First, your string you get back from your map function is massive and certainly won't pass an equality check with your option value. Additionally, your anonymous function is going to return the first value and not iterate through your for loop properly. There's no correlation between your select option values/labels and the items in the array. Try this: function executeMe(select) { var myselect = document.getElementById("selectOpt"); var selectOption = myselect.options[myselect.selectedIndex].innerHTML; var i = theArray.length, obj, index, val; while (i--) { obj = theArray[i]; for (index in obj) { val = obj[index]; //following matches on both keys and values, if you only //want values delete the second part of the check if (val == selectOption || index == selectOption) { var string = '', prop; for (prop in obj) { string += prop + ': ' + obj[prop].toString() + '&lt;br&gt;'; } document.getElementById('entity_id').innerHTML = string; } } } } If this isn't what you need let me know with a comment.
has comment: http://stackoverflow.com/comment/42029756
score: 0
has comment: http://stackoverflow.com/comment/42150371

http://stackoverflow.com/comment/41909810
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26652785
has text: Wow! Thanks! At least it shows results now.. I think i may have my math wrong to calculate it. This is how i'd like it to work, forgetting the styling http://www.thisismoney.co.uk/money/saving/article-1633423/Millionaire-calculator-How-long-make-1m-How-regular-savings-make-rich.html
score: 0

http://stackoverflow.com/comment/41792313
type: QuestionComment
comment on: http://stackoverflow.com/q/26588706
has text: add a keypress handler and check on every key up in the input field if there is a value, if yes, do your handle
score: 0
type: Comment

http://stackoverflow.com/q/26580023
type: Question
possible better answer: http://stackoverflow.com/a/26580406
has comment: http://stackoverflow.com/comment/41778625
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41777201
favorite count: 0
has answer: http://stackoverflow.com/a/58034831
has answer: http://stackoverflow.com/a/26580752
has answer: http://stackoverflow.com/a/39289397
upvote count: 6
answer count: 4
has comment: http://stackoverflow.com/comment/41777581
has comment: http://stackoverflow.com/comment/41777618
score: 6
accepted answer: http://stackoverflow.com/a/26580752
has body: Is it possible to disable javascript for specific element only? Suppose, div with id foo has some javascript code may be it's inline, internal, or external javascript code. Now, unbind all javascript code for that element (may be also to including children).
has comment: http://stackoverflow.com/comment/41777567
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41777148
has answer: http://stackoverflow.com/a/26580406
has comment: http://stackoverflow.com/comment/41777593
has comment: http://stackoverflow.com/comment/41777178
has title: disable javascript for specific element

http://stackoverflow.com/q/26558932
score: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26558971
tagged with: bash
has title: What is the correct way to wait until MongoDB is ready after restart?
has answer: http://stackoverflow.com/a/40042380
answer count: 4
has answer: http://stackoverflow.com/a/67729103
favorite count: 0
has answer: http://stackoverflow.com/a/33216902
upvote count: 5
downvote count: 0
has body: I have a bash script which fails. After inspection, it appears that the failure is due to the fact that MongoDB is accessed immediately after being restarted. For example, running: mongo --eval "db.version()" gives the expected output: MongoDB shell version: 2.4.9 connecting to: test 2.4.9 while running: service mongodb restart; mongo --eval "db.version()" produces the following output, emphasis mine: mongodb stop/waiting mongodb start/running, process 1466 MongoDB shell version: 2.4.9 connecting to: test Sat Oct 25 02:52:29.736 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect failed because the server is not ready yet. What is the correct way to wait during the execution of the bash script until MongoDB is actually ready? service mongodb status is not a solution, because it reports the status of the service, and not the database itself. Doing nc -z localhost 27017 repeatedly until its exit code becomes 0 will work, but I'm not sure if there are no drawbacks (running somehow an infinite loop?)
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26558971
type: Question
tagged with: mongodb
possible better answer: http://stackoverflow.com/a/33216902

http://stackoverflow.com/comment/41777292
comment on: http://stackoverflow.com/q/26578730
has text: I just ended up using the base code to add in a status banner. I am just not good enough at coding to be able to add in pictures, I am not sure how to call to it. I am trying my best :/ I will update if I figure it out :D
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26662262
tagged with: javascript
tagged with: scope
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has title: Angularjs: dicrective compile and isolated scope this is bad combination?
score: 1
tagged with: directive
upvote count: 1
type: Question
has body: I trying make a simple directive for internationalization tasks. The directive looks like this angular.module('i18n.test', []) .service('i18n', function() { this.current = 'ru'; }) .directive('test', function(i18n) { return { restrict: "A", scope: { code: '@test' }, compile: function(tElement, tAttrs){ tElement.text('{{ tostr(text) }}'); return function postLink(scope, element, attrs){ scope.text = texts[attrs.test]; scope.tostr = function(text){ return text[i18n.current]; }; }; } } }); I discovered that if remove isolated scope then directive works properly, else {{ tostr(text) }} calc as empty string. See example on plunker http://plnkr.co/edit/hV9wOd5oftJZshPLQN4y?p=preview This is a bug, or I don't understand something?
tagged with: compilation

http://stackoverflow.com/comment/41810502
comment on: http://stackoverflow.com/q/26598089
score: 3
type: Comment
type: QuestionComment
has text: Did you try it? P.S. There is a syntax error in your first example.

http://stackoverflow.com/comment/41860825
comment on: http://stackoverflow.com/q/26601877
score: 0
type: Comment
type: QuestionComment
has text: Middleman is a static site generator, it won't help you access the API. I suggest that you file your question against `javascript`, `jquery`, etc tags instead of `middleman`. You have to figure out how to authenticate a site visitor against the API using JS, then retrieve the keys from the API, then inject them into the page.

http://stackoverflow.com/comment/71107108
type: Comment
comment on: http://stackoverflow.com/a/41963477
type: AnswerComment
has text: can u please review this link I want this to be done http://stackoverflow.com/questions/41940316/on-key-press-instant-result-populating Dont know how to achieve
score: 0

http://stackoverflow.com/q/26632974
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/26633325
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26633301
accepted answer: http://stackoverflow.com/a/26633301
tagged with: jquery
tagged with: height
has answer: http://stackoverflow.com/a/26633325
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Please scroll down on my fiddle. I have an extra white space at the bottom that I don't know how to remove. If I scroll down by clicking NEXT, the layout is fine. Any help please much appreciated http://jsfiddle.net/cs1aobuk/ jS: var lines = function () { $('div.section').css('height', $(window).height() + 'px'); } lines(); $(window).resize(function () { lines(); heightsCalculator(); }); heightsCalculator(); function heightsCalculator() { var windowHeight = ($(window).height()), heightDocument = (windowHeight) + ($('#one').height()) + ($('#two').height()) + ($('#three').height()) + ($('#four').height()) + ($('#five').height()); $('#scroll-animate, #scroll-animate-main').css({ 'height': heightDocument + 'px' }); window.onscroll = function () { var scroll = window.scrollY; $('#scroll-animate-main').css({ 'top': '-' + scroll + 'px' }); $('#one').css({ 'background-position-y': 0 - (scroll * 100 / heightDocument) + '%' }); } }
has title: Jquery height calculation of divs

http://stackoverflow.com/q/26564032
has body: i wrote a function which do count down or up the numbers to another by pressing a button. look at this : var timer; function counterFn(element,oldCount,newCount,speed) { if(isNaN(speed)) speed=100; clearInterval(timer); if(oldCount===newCount) { element.text(newCount); return; } var counter=oldCount; timer=setInterval(function() { if(oldCount&lt;newCount) { if(counter&gt;newCount) clearInterval(timer); counter++; } else { if(counter&lt;newCount) clearInterval(timer); counter--; } if(counter===newCount) { clearInterval(timer); } element.text(counter); },speed); } $('.button').on("click",function() { counterFn('.endelement',10,100,1); }); description of the function attributes: element : the element which will show the result oldCount : is the start number newCount : is the end number speed : is the repeat time of setInterval now, according to above code, if you press the element with .button class, counterFn function will run. now if you press the button again (before clearing the setinterval by the function), every thing is OK. this is the working demo : http://jsfiddle.net/hgh2hgh/gpvn9hcq/4/ as you can see, clicking on the button, clear the previous interval and run the new one. now if the second element call that function like this : $('.button2').on("click",function() { counterFn('.endelement2',50,70,2); }); naturally the second request will stop the timer and run new timer with the new attributes. cause a global variable is defined for just one setInterval. look at the comments for demolink of this part : [1] in comments if definition of the variable be inside the function, pressing the button twice, mean running the function for two separate time. look at the comments for demolink of this part : [2] in comments OK, now how to run this function correct? thanks.
has comment: http://stackoverflow.com/comment/41748792
has comment: http://stackoverflow.com/comment/41747878
tagged with: javascript
score: 0
tagged with: setinterval
tagged with: countdown
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41747825
has title: Run the count down or up function
has comment: http://stackoverflow.com/comment/41748122
answer count: 0
has comment: http://stackoverflow.com/comment/41747794
has comment: http://stackoverflow.com/comment/41748864
type: Question

http://stackoverflow.com/comment/41685468
type: Comment
type: QuestionComment
has text: Thanks @ezanker, I'll keep that in mind for my project.
comment on: http://stackoverflow.com/q/26528924
score: 0

http://stackoverflow.com/a/26547549
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/26547527
type: Answer
accepted answer of: http://stackoverflow.com/q/26547527
has comment: http://stackoverflow.com/comment/41717851
has comment: http://stackoverflow.com/comment/41723878
score: 5
has body: You can try $('form table table').not(':has(select)'); form table table selects all tables that are in form table, then we excludes items that has a select element
type: AcceptedAnswer

http://stackoverflow.com/comment/41861585
type: Comment
type: QuestionComment
has text: @Mindrus, Tell the guy who has given you assignment that __jQuery__ is __JavaScript__
comment on: http://stackoverflow.com/q/26625619
score: 0

file
tags question: http://stackoverflow.com/q/26606415
type: Tag
tags question: http://stackoverflow.com/q/26630718
tags question: http://stackoverflow.com/q/26556970
tag name: file
tags question: http://stackoverflow.com/q/26568004
tags question: http://stackoverflow.com/q/26634616
tags question: http://stackoverflow.com/q/26593005
tags question: http://stackoverflow.com/q/26657632
tags question: http://stackoverflow.com/q/26662413
tags question: http://stackoverflow.com/q/26640439
tags question: http://stackoverflow.com/q/26559430

http://stackoverflow.com/q/26641574
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/26641839
has comment: http://stackoverflow.com/comment/41890440
has comment: http://stackoverflow.com/comment/41890397
has answer: http://stackoverflow.com/a/26641839
upvote count: 1
has comment: http://stackoverflow.com/comment/41890054
tagged with: css
has comment: http://stackoverflow.com/comment/41890527
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26642033
score: 1
has body: Being a noob at HTML, I only know a solution to this in C#. I'm just trying to separate each line of the .txt so I can randomly pull lines from it and display them when a button is pressed. In addition, rather than using a submit button, I wanted to create a div of my own styled button for the user to press. (Which I know how to do) and use a jQuery 'on click'. I'm a little unsure how to describe exactly what I'm trying to do, but I hope I did it well enough. Thank you guys in advance. Note This is the C# I used to create a relatively simple Trivia game. In a separate Trivia.cs I had split the question and answers from each other (In the .txt they were separated by an *) I'm not sure if this will help guide anyone, however. static List GetTriviaList() { //Get Contents from the file. Remove the special char "\r". Split on each line. Convert to a list. List contents = File.ReadAllText("trivia.txt").Replace("\r", "").Split('\n').ToList(); //Each item in list "contents" is now one line of the Trivia.txt document. //make a new list to return all trivia questions List&lt;Trivia&gt; returnList = new List&lt;Trivia&gt;(); // TODO: go through each line in contents of the trivia file and make a trivia object. // add it to our return list. // Example: Trivia newTrivia = new Trivia("what is my name?*question"); //Return the full list of trivia questions foreach (var item in contents) { Trivia bestTrivia = new Trivia(item); returnList.Add(bestTrivia); } return returnList; }
type: Question
has title: How do I pull contents from a .txt file and display a random line of it in HTML?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41890269
accepted answer: http://stackoverflow.com/a/26642033
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41669180
has text: I've used watir-webdriver on ec2 ubuntu instances and it was always striaghtforward.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26517852
score: 0

http://stackoverflow.com/comment/41918862
score: 0
comment on: http://stackoverflow.com/q/26658037
type: QuestionComment
type: Comment
has text: I do plan on doing some bundling. This is strictly for code organization for the team. Concerning the placement of the files in the body... I dont know how useful my html would without the js yet considering angular is rending most of my html

http://stackoverflow.com/comment/41858252
type: QuestionComment
type: Comment
score: 2
has text: You must be really very stressed right now, are you hungry? Grab a snickers. Hahahaha
comment on: http://stackoverflow.com/q/26624194

http://stackoverflow.com/comment/41882825
score: 0
type: Comment
type: QuestionComment
has text: dude to make you happy I updated it. The code I pasted FROM is correct, I simply pasted half of it in here and forgot to complete it.
comment on: http://stackoverflow.com/q/26637748

asp.net-mvc
tags question: http://stackoverflow.com/q/26530503
tags question: http://stackoverflow.com/q/26608253
tags question: http://stackoverflow.com/q/26527729
tags question: http://stackoverflow.com/q/26666766
tags question: http://stackoverflow.com/q/26550739
tags question: http://stackoverflow.com/q/26649153
tags question: http://stackoverflow.com/q/26554718
tags question: http://stackoverflow.com/q/26605569
tags question: http://stackoverflow.com/q/26597882
tags question: http://stackoverflow.com/q/26530413
tags question: http://stackoverflow.com/q/26613639
tags question: http://stackoverflow.com/q/26529838
tags question: http://stackoverflow.com/q/26550477
tags question: http://stackoverflow.com/q/26649451
tags question: http://stackoverflow.com/q/26541126
tags question: http://stackoverflow.com/q/26627288
tags question: http://stackoverflow.com/q/26664418
tags question: http://stackoverflow.com/q/26574454
tags question: http://stackoverflow.com/q/26650303
tags question: http://stackoverflow.com/q/26544825
tags question: http://stackoverflow.com/q/26579985
tags question: http://stackoverflow.com/q/26547799
tags question: http://stackoverflow.com/q/26623094
tags question: http://stackoverflow.com/q/26595355
tags question: http://stackoverflow.com/q/26531117
tags question: http://stackoverflow.com/q/26612628
tags question: http://stackoverflow.com/q/26522976
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/26635196
tags question: http://stackoverflow.com/q/26630092
tags question: http://stackoverflow.com/q/26531252
tags question: http://stackoverflow.com/q/26647758
tags question: http://stackoverflow.com/q/26564481
tags question: http://stackoverflow.com/q/26603597
tags question: http://stackoverflow.com/q/26605549
tags question: http://stackoverflow.com/q/26558746
tags question: http://stackoverflow.com/q/26630598
tags question: http://stackoverflow.com/q/26587211
tags question: http://stackoverflow.com/q/26628039
tags question: http://stackoverflow.com/q/26625894
type: Tag
tags question: http://stackoverflow.com/q/26536362
tags question: http://stackoverflow.com/q/26555169
tags question: http://stackoverflow.com/q/26530185
tags question: http://stackoverflow.com/q/26662254
tags question: http://stackoverflow.com/q/26521234
tags question: http://stackoverflow.com/q/26521729
tags question: http://stackoverflow.com/q/26554568
tags question: http://stackoverflow.com/q/26565381
tags question: http://stackoverflow.com/q/26591494
tags question: http://stackoverflow.com/q/26632693
tags question: http://stackoverflow.com/q/26533104
tags question: http://stackoverflow.com/q/26633673
tags question: http://stackoverflow.com/q/26610844
tags question: http://stackoverflow.com/q/26589427

http://stackoverflow.com/comment/41782715
comment on: http://stackoverflow.com/a/26583242
score: 0
has text: I tried with the same line of code, but its not working.the copy ,print options are not displaying now. But 'View Source' and 'View Frame Source','Save As' options are still visible. Is there any way to restrict this.. Thanks
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26607791
score: 0
has comment: http://stackoverflow.com/comment/41834800
tagged with: servlets
has body: I have one internal framework which can do refresh on click of check box. &lt;html&gt; &lt;script&gt; windows.onload() js code to show timer .. decrements from 20 t0 1 &lt;/script&gt; &lt;body&gt; &lt;div id="timer"/&gt;(to show the timer) please check the check box to get a permission: &lt;input type="check box" id="check" onclick="page refresh(internal framework take care)"/&gt; (if checked some other fields) &lt;/body&gt; &lt;/html&gt; So on-click of check box page is getting refreshed by internal framework , is there anyway i can pass the timer value to controller(servlet)?. Sorry i have very less information . goal is to start the timer where i left while checking the check box.as I added java script onload of page,the value getting resettled.
has title: How to get the value from Jsp to servlet without form submit?
answer count: 0
tagged with: jsp
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41827670
type: Question

http://stackoverflow.com/a/26556316
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26555641
upvote count: 1
has body: Your component needs to be created by a container to have everything properly injected. var comp = this.container.lookup('component:component-name'); Objects created by the container will have the container object automatically injected into it. In other words, code above will work only if the context object has been created by the container.

http://stackoverflow.com/comment/41784309
score: 0
type: AnswerComment
type: Comment
has text: Is `field1` the name of a global variable within your page, that holds an array of information? And the same for `field2` and `field3`? If so, then you want to call your function with `checkFields([field1, field2, field3], 'module1');`
comment on: http://stackoverflow.com/a/26584119

http://stackoverflow.com/q/26560072
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26560128
has comment: http://stackoverflow.com/comment/41740892
type: Question
has title: I'm trying to add "grades" to an array and it isn't going as planned
tagged with: javascript
has body: The idea for this is to enter a "grade" or a general number, check to make sure that it is a number, ad it to the grade array, and then for each number added create a list item containing an input which contains the entered number. I have 2 functions. The first one called ,check(), assigns the input value to the userInput variable, then checks that the variable is a number. if it is then it calls the adTo() function which is supposed to push the userInput variable into the grade[] array then update the list. This however is not what happens. here's my code: <Title>Ultimate Grader any ideas?
answer count: 1
tagged with: arrays
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26560128
tagged with: user-input
type: AnsweredQuestion

http://stackoverflow.com/a/26530159
has body: 1. Set gridLineWidthof xAxis to 0 to remove them. 2. Set tickInterval of yAxis larger than the maximum value in the data array so it will be the only grid line. $(function () { var myData = [5, 3, 4, 3, 2], tickIntr = Math.max.apply(null, myData) + 1; //this is to set //the tickInterval larger than the maximum value in data array $('#container').highcharts({ chart: { polar: true, type: 'line', }, title: { text: null, x: -80 }, xAxis: { categories: ['Sales', 'Marketing', 'Development', 'Customer Support','Information Technology'], tickmarkPlacement: 'on', lineWidth: 0, gridLineWidth: 0 //Remove xAxis lines }, yAxis: { gridLineInterpolation: 'polygon', lineWidth: 0, min: 0, tickInterval: tickIntr //set yAxis tickInterval }, legend: { enabled:false }, series: [{ data: myData, pointPlacement: 'on' }] }); }); http://jsfiddle.net/g7vpq8ce/2/
downvote count: 0
answers question: http://stackoverflow.com/q/26528564
accepted answer of: http://stackoverflow.com/q/26528564
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4

http://stackoverflow.com/comment/41695712
type: QuestionComment
comment on: http://stackoverflow.com/q/26534589
score: 0
has text: Transclude on the parent or child?
type: Comment

http://stackoverflow.com/comment/41931844
comment on: http://stackoverflow.com/a/26664991
type: Comment
has text: Thanks for js I have written the code which can dynamically load or unload CSS and Javascript. I guess its the only right way. I was thinking before let only load the new css and js which are not present in the current page from where the request being made to open a new page.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41912772
score: 0
has text: Misko explains it all: https://groups.google.com/forum/#!msg/angular/56sdORWEoqg/b8hdPskxZXsJ
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26653824

http://stackoverflow.com/comment/41931419
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26664718
has text: @Kousha Spend any time working with computers and time math and you'll find it's far more complicated than it seems. As an example, from 1909 to 1937 the Netherlands was exactly 19 minutes and 32.13 seconds ahead of UTC by law.
score: 0

http://stackoverflow.com/a/26657956
answers question: http://stackoverflow.com/q/26657793
downvote count: 0
has comment: http://stackoverflow.com/comment/41918176
has comment: http://stackoverflow.com/comment/41918706
type: Answer
upvote count: 1
has body: Since JavaScript won't have access to the server's file system, I believe you would need some server-side code. An easy way of accomplishing this is to write a web service that accepts a filename(string). Have it return a boolean. Something like this: [WebMethod] public bool CheckFile(string FileName) { return File.Exists(FileName); } Then, when someone clicks the link, you can call your WebService and write a CallBackFunction which evaluates the returned value. If it's true, you execute the logic you (presumably) already have. If it's false, you can pop a modal informing them that the file no longer exists on the server.
has comment: http://stackoverflow.com/comment/41919109
has comment: http://stackoverflow.com/comment/41918985
score: 1
has comment: http://stackoverflow.com/comment/41918490

http://stackoverflow.com/comment/41803733
comment on: http://stackoverflow.com/a/26594378
type: Comment
has text: Extremely helpful. Thank you very much! Saved me some serious blank stares at the computer.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26519725
upvote count: 1
has answer: http://stackoverflow.com/a/26519756
has comment: http://stackoverflow.com/comment/41668764
tagged with: node.js
has body: The contenders that I'm aware of: function() { the.call.I(want).to(make); } the.call.I(want).to.bind(null, make); ()=&gt;{ the.call.I(want).to(make); } None of which are all the way awesome. Are there any others? Libraries and Node packages welcome.
has comment: http://stackoverflow.com/comment/41669010
downvote count: 3
has comment: http://stackoverflow.com/comment/41668766
has comment: http://stackoverflow.com/comment/41668804
type: Question
has title: What's the shortest or clearest way to turn a function call into a no-argument function object?
tagged with: function
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41690894
score: -2
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26567729
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/29274923
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41755582
has comment: http://stackoverflow.com/comment/41755964
has answer: http://stackoverflow.com/a/29274923
has comment: http://stackoverflow.com/comment/41755487
tagged with: angularjs
downvote count: 0
has answer: http://stackoverflow.com/a/26569198
accepted answer: http://stackoverflow.com/a/26569198
has comment: http://stackoverflow.com/comment/41755417
has comment: http://stackoverflow.com/comment/41755290
has comment: http://stackoverflow.com/comment/41755875
has comment: http://stackoverflow.com/comment/41755247
has comment: http://stackoverflow.com/comment/41754966
type: AnsweredQuestion
score: 3
tagged with: internet-explorer
has title: Angular JS not working with IE9 but works with other browsers
type: Question
has body: So I am working on a small app that gets that from an API url like so... $http.get(s_url) .then(function(res) {... My app works well with chrome,safari,opera and firefox but displays a blank screen in IE9 Am I missing something in my html or js file? Here is what I have in my html file for IE... &lt;!--[if lte IE 8]&gt; &lt;script src="js/json2.js"&gt;&lt;/script&gt; &lt;script&gt; document.createElement('ng-include'); document.createElement('ng-pluralize'); document.createElement('ng-view'); document.createElement('x-restrict'); document.createElement('x-fileupload'); // Optionally these for CSS document.createElement('ng:include'); document.createElement('ng:pluralize'); document.createElement('ng:view'); //customized tags document.createElement('location'); document.createElement('temp'); document.createElement('image'); document.createElement('caption'); document.createElement('temps'); document.createElement('remtemps'); &lt;/script&gt; &lt;![endif]--&gt; &lt;div ng-view&gt;&lt;/div&gt; &lt;/head&gt;
answer count: 2
has comment: http://stackoverflow.com/comment/41762255
tagged with: javascript

http://stackoverflow.com/a/26654193
type: Answer
has body: var clickTime = -1; $('.selector').click(function() { if (clickTime == -1) { clickTime = new Date().getTime(); } var end = new Date().getTime(); var time = end - clickTime; if (!$(this).hasClass('selected') &amp;&amp; time &lt; 500){ e.addClass("selected"); // Do other stuff clickTime = new Date().getTime(); } }); I'm going to use this for now. Will most likely need to do more research on event calls and figure a different way to prevent this as I do not like my hacky solution. Any feedback would be much appreciated regardless.
score: 0
answers question: http://stackoverflow.com/q/26653183

http://stackoverflow.com/q/26618036
has title: JavaScript: The Good Parts - chapter 8, function.apply()
answer count: 4
tagged with: bind
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26618232
has answer: http://stackoverflow.com/a/26618338
has comment: http://stackoverflow.com/comment/41847268
type: Question
has comment: http://stackoverflow.com/comment/41847226
has answer: http://stackoverflow.com/a/26618302
tagged with: javascript
tagged with: apply
upvote count: 2
has comment: http://stackoverflow.com/comment/41847306
favorite count: 0
has body: For the following code, based on page 84 of "JavaScript: The Good Parts", can someone explain why [1] and [0] are used? I understand that they're supplying the arguments 1 and 0 to slice, respectively, but what's the point of that? Function.prototype.bind = function (that) { var method = this; var slice = Array.prototype.slice; var args = slice.apply(arguments, [1]); // Why is [1] here? return function () { return method.apply(that, args.concat(slice.apply(arguments, [0]))); // Why is [0] here? }; }; var x = function () { return this.value; }.bind({ value: 666 }); console.log(x()); // Returns 666. I believe I understand the big picture - the function x has been designed to extract the value of the value property. We then bind an object that has a value property name/value pair and execute the x function. The x function reaches into the supplied object, as if it where a method of that object, and returns the value of the value property. What I do not understand is how this is accomplished (I note Crockford's quasi-amusing use of 666). Thanks in advance.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26618270

http://stackoverflow.com/q/26570475
answer count: 1
tagged with: javascript
tagged with: gulp
has title: Lost files with gulp-clean
score: 0
tagged with: node.js
has body: I just started work with gulp and not completely understand some things. Here is my gulpfile gulp.task('css', function(){ var processors = [ csswring({ removeAllComments: true }) ]; gulp.src(['css/**/*.css', '!css/reset.css']) .pipe(concat('withoutReset.css')) .pipe(gulp.dest('./tmp')); return gulp.src(['css/reset.css', 'tmp/withoutReset.css']) .pipe(sourcemaps.init()) .pipe(concat('style.css')) .pipe(postcss(processors)) .pipe(sourcemaps.write('/map/style')) .pipe(gulp.dest('public/css')); }); gulp.task('main', ['css'], function() { return gulp.src('tmp', {read: false}) .pipe(clean()); }); gulp.task('default', ['main']); When I run this task in public/css/style.css I get just minify reset file without all other, but if I commented clean line, it's works fine. I thought style.css should created before run clean task, that's not true? How can I make it works fine without changing folder structure, that's means reset file can be on same level with some other which also should follow after it(lines from reset should be always first) And it will be nice if you explain or send link where I can read why it doesn't work with current code
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26571802
has comment: http://stackoverflow.com/comment/41760245
type: Question
tagged with: gulp-concat

http://stackoverflow.com/comment/41751944
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26566282
has text: Just edited in another potential solution that should let you not change any of your code.
type: AnswerComment

google-maps-api-3
tags question: http://stackoverflow.com/q/26528744
tags question: http://stackoverflow.com/q/26603664
tags question: http://stackoverflow.com/q/26541385
tags question: http://stackoverflow.com/q/26635820
tags question: http://stackoverflow.com/q/26597817
tags question: http://stackoverflow.com/q/26568905
tags question: http://stackoverflow.com/q/26614468
tags question: http://stackoverflow.com/q/26602099
tags question: http://stackoverflow.com/q/26590535
tags question: http://stackoverflow.com/q/26574771
tags question: http://stackoverflow.com/q/26608079
tags question: http://stackoverflow.com/q/26667376
tags question: http://stackoverflow.com/q/26551317
tags question: http://stackoverflow.com/q/26635749
tags question: http://stackoverflow.com/q/26589089
tags question: http://stackoverflow.com/q/26600183
tags question: http://stackoverflow.com/q/26607533
tags question: http://stackoverflow.com/q/26644885
tags question: http://stackoverflow.com/q/26561854
tags question: http://stackoverflow.com/q/26624515
tags question: http://stackoverflow.com/q/26625014
tags question: http://stackoverflow.com/q/26625448
tags question: http://stackoverflow.com/q/26654552
tags question: http://stackoverflow.com/q/26530547
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/26589745
tags question: http://stackoverflow.com/q/26624965
type: Tag
tags question: http://stackoverflow.com/q/26543548
tags question: http://stackoverflow.com/q/26596614
tags question: http://stackoverflow.com/q/26633253
tags question: http://stackoverflow.com/q/26586879
tags question: http://stackoverflow.com/q/26612372
tags question: http://stackoverflow.com/q/26562623
tags question: http://stackoverflow.com/q/26518801
tags question: http://stackoverflow.com/q/26574484
tags question: http://stackoverflow.com/q/26626827
tags question: http://stackoverflow.com/q/26550541
tags question: http://stackoverflow.com/q/26656573
tags question: http://stackoverflow.com/q/26524732

http://stackoverflow.com/q/26587720
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/18893402
has body: I can check that a string includes letter with using of .indexOf(): my_string = 'sdf sdfdsf dfdsdfs'; console.log(my_string.indexOf(' ')); // returns 4 Is exists method to do the same but from end to begin? (example above must returns 11 - the first white space from right to left)
has comment: http://stackoverflow.com/comment/41790571
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26587802
has comment: http://stackoverflow.com/comment/41790663
score: 0
answer count: 3
duplicate of: http://stackoverflow.com/q/18893402
favorite count: 0
possible better answer: http://stackoverflow.com/a/26587780
has title: How to get index of letter in a string from end to begin?
has answer: http://stackoverflow.com/a/26587780
has comment: http://stackoverflow.com/comment/41790673
has answer: http://stackoverflow.com/a/26587802
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26587801
has comment: http://stackoverflow.com/comment/41790438

http://stackoverflow.com/q/26649290
has answer: http://stackoverflow.com/a/26649534
score: 1
has title: Javascript/HTML error “the value of the property “selectReason” is null or undefined, not a function object
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41902965
has answer: http://stackoverflow.com/a/26649964
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: Hi I am new to javascript and html and was wondering if someone could help me understand why this error keeps occuring. The basic idea is that i have a dropdownlist that is populated with several options. When the customer selects an option an onchange event fires that will write the value of the selected option into a textarea. However when i debug it I get the message above I have included the relevant snippets of code below: function selectReason() { var selectindex = document.getElementById("selectmessage").selectedIndex; var selecttext = document.getElementById("selectmessage").value; document.getElementById("Txt").value = selecttxt; } Please select a reason
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/a/26527921
has comment: http://stackoverflow.com/comment/41682853
score: 1
has comment: http://stackoverflow.com/comment/41682883
upvote count: 1
has comment: http://stackoverflow.com/comment/41682748
has comment: http://stackoverflow.com/comment/41682522
has body: ~Prompt, alert.. will pause the execution of code (blocks the thread), to prevent the likes of setInterval, setTimeout to go crazy . The $digest loop is made up of two smaller loops: when you do a prompt. $evalAsync is used, and the code inside is executed outside angular.This is usually done with setTimeout(0). So In one sentence: this is prompt's fault, you might be better off with a widget that does the same thing. Edit: Sorry submitted to fast: here is the original answer: Error: $digest already in progress in angularjs when using alert
downvote count: 0
answers question: http://stackoverflow.com/q/26527703
type: Answer

http://stackoverflow.com/comment/41822295
has text: @PerHenrikLausten Tried the same thing, however, I do not get anything back ;(
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26603070

http://stackoverflow.com/q/26616826
score: 1
has body: Perhaps I'm asking too much but asking it is much better than assuming it doesn't exists. In order to create a converter of webpages into single file (including all the external resources the html), I'm planning to use Data URI Scheme. But the problem with such a conversion is that lots of pages incorporate Javascript codes to come up with the URI of a resource. i. e. it's completely ordinary for a page to set the src of an image with JS. In worst case scenario, the URI is composed in which cases it's absolutely impossible to replace the URI with Data URI Scheme, e. g. img.src = 'domain.com/' + some_variable + '.png';. The only way I can think of to overcome such scenarios and all other, is to introduce a middle block of code after URI is changed and before it is downloaded. If such opportunity exits, I can work on the requested URI and replace it with appropriate Data URI Scheme. It also benefits from a global Data URI Scheme storage that leads to smaller html file size. Does anyone know if such opportunity exists? Or if one can create it? [EDIT] Here's how I would like my single-file webpage to be: &lt;script&gt; var uri_dictionary = { 'http://www.domain.com/1.png': 'data:image/png;base64,iVBORw0KGgoAAAAN...', 'http://www.domain.com/2.png': 'data:image/png;base64,iVBORw0KGgoAAAAN...' }; function translateURI(url) { if (uri_dictionary[url]) { return uri_dictionary[url]; } else { return url; } } &lt;/script&gt; The above is a simplified version of the code that I'm planning to inject into the single-file webpage that I'm going to generate. It's just that the translateURI function needs to intercept all the outgoing requests before they are sent. And replace their requested URI in feasible cases.
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41844921
linked to: http://stackoverflow.com/q/5416822
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has title: Executing a block of code before browser sends any request to the server to manipulate the URI
has comment: http://stackoverflow.com/comment/41844985
linked to: http://stackoverflow.com/q/6929662
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26617102
has comment: http://stackoverflow.com/comment/41844888
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41845105

http://stackoverflow.com/comment/41885189
type: QuestionComment
has text: Thanks for the suggestion, think it would work but after reading up on it I think I will have too many browser compatibility problems :( http://en.wikipedia.org/wiki/Data_URI_scheme
comment on: http://stackoverflow.com/q/26633253
score: 0
type: Comment

http://stackoverflow.com/a/26652923
answers question: http://stackoverflow.com/q/26652772
type: Answer
has body: I'm not sure if there is a chance of creating parallel functions (maybe events or async; I'm not interested about this idea), but you can stop function like that: window.someCounter = 0; function doSomethingUntilOtherCall(){ var myID = ++window.someCounter; while (myID === window.someCounter){ // do something } }
score: 0

http://stackoverflow.com/q/26668783
favorite count: 0
has title: jQuery LayerSlider: LayerSlider not working with single image in IE 10
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: css
upvote count: 1
has body: I am using LayerSlider (http://kreaturamedia.com/layerslider-jquery-full-width-slider/) which is working fine on all browsers except IE 10. Even the demo link is working fine on the browser but when I integrate the slider in the website I am working on, it fails to load the image and the following error is shown in the console: "It seems like the URL of the image or background image "image name" is pointing to a wrong location and it cannot be loaded. Please check the URLs of all your images used in the slider." The link of the image is correct and the issue appears if only one image is added. If more than one image is added, then the above error does not show. I have checked for compatibility issues with other plugins by disabling other jQuery plugins but still no effect. I even tried to use the same version of jQuery the demo is using but still no luck. If anyone has an idea what the problem is, kindly help me out Thanks
downvote count: 0
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/26518621
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26518721
has answer: http://stackoverflow.com/a/26518721
has title: How to make an Add/Remove Array of strings in AngularJS
answer count: 2
accepted answer: http://stackoverflow.com/a/26518966
linked to: http://stackoverflow.com/q/13714884
tagged with: arrays
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41667244
has body: I need to make a data binding to an array of strings.. I need an array of directions. I module it this way: JS function ShoppingCartCtrl($scope) { $scope.directions = ["a", "b", "c"]; $scope.addItem = function (item) { $scope.directions.push(item); $scope.item = ""; }; $scope.removeItem = function (index) { $scope.directions.splice(index, 1); }; } HTML directions Remove Item {{$index}} {{directions}} Everything works as it was expected, but I have a bug that I can't find. When you try to modified the values directly from the inputs, you are not allow. You write and nothing happened (THIS WAS SOLVED WITH PUTTING THE LAST VERSION OF ANGULAR IN JSFIDDLE). Continue: Now you can modify the values, but they are not updated in the model. If anyone can help me, it would be awesome!! You can see it working in this jsfiddle
type: AnsweredQuestion
tagged with: data-binding
score: 2
upvote count: 3
has answer: http://stackoverflow.com/a/26518966

http://stackoverflow.com/q/26572508
answer count: 1
linked to: http://stackoverflow.com/q/25909609
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/41763326
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41763440
has answer: http://stackoverflow.com/a/26572652
has comment: http://stackoverflow.com/comment/41763117
tagged with: angularjs-orderby
score: 2
upvote count: 2
type: Question
tagged with: javascript
has body: I have searched and don't found an answer to my question. Hope, I've well searched ! So, this is my problem : &lt;div id="{{expression.comment_id.$id}}" class="comments" ng-repeat="expression in expressions| orderBy:orderProp" So, orderBy works great, but I have a specific need : expression.comment_id with '0' id must stay on top. How can do this ? I think I must use a personnal filter but I'm not sure this is the more efficient solution. If this is a good way, how can I implement it correctly ? Thanks for your help !
has title: AngularJS orderby : keep an element of array on top
downvote count: 0

http://stackoverflow.com/comment/41685136
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26529178
has text: What I came up with so far is: {{row.Name}} But this will only display the first level. Now I could add the second level by hand, and the 3rd, and so on. But since I dont know how many levels there will be, I need some general solution.

http://stackoverflow.com/q/26656718
duplicate of: http://stackoverflow.com/q/5832891
answer count: 4
score: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26657346
has title: How to achieve arbitrary chain on function call in javascript?
accepted answer: http://stackoverflow.com/a/26658167
type: Question
possible better answer: http://stackoverflow.com/a/26656759
tagged with: javascript
has answer: http://stackoverflow.com/a/26656759
has body: I have written code to achieve sum(1)(2) //3 the code looks like: function sum(a) { return function(b) { return a+b } } But I didn't work out the second question, which is how to achieve any arbitrary number of chain function call like: sum(1)(2) == 3 sum(5)(-1)(2) == 6 sum(6)(-1)(-2)(-3) == 0 sum(0)(1)(2)(3)(4)(5) == 15
downvote count: 0
tagged with: chaining
linked to: http://stackoverflow.com/q/5832891
favorite count: 0
has answer: http://stackoverflow.com/a/26657429
has answer: http://stackoverflow.com/a/26658167
upvote count: 8

http://stackoverflow.com/comment/41898437
type: Comment
has text: if you want renderSVG to be a Java Script function the function should be in calling scope. either do like above or call it from jquery scope- `jQuery(function(){function mostrarOdonto() { renderSVG(); }; };`
type: AnswerComment
comment on: http://stackoverflow.com/a/26646217
score: 0

http://stackoverflow.com/q/26665011
tagged with: css
has comment: http://stackoverflow.com/comment/41936133
has answer: http://stackoverflow.com/a/26669193
has body: I've been playing around with the animation aspect in AngularJS, and I just can't seem to get the kind of functionality I need: .box.ng-hide-add {-webkit-animation: fadeOutLeftBig 0.4s;} .box.ng-hide-remove {-webkit-animation: fadeInRightBig 0.4s;} .box.ng-show-add{-webkit-animation: fadeInRightBig 0.4s;} Ideally, when the user hits the 'Next' button, the current box should exit to the left, while the box next in line eases in from the right, creating that slideshow/carousel effect. But right now it's all from the same side. Is this even possible? I feel like I'm getting close, but I could just be thinking about it the wrong way. What am I overlooking or forgetting? Code snippet: (function(){ var app = angular.module("theapp", ['ngAnimate']); var controller = function($scope){ $scope.currentPage = 1; }; app.controller("controller", controller); }()); .box.ng-hide-add { -webkit-animation: fadeOutLeftBig 0.4s; } .box.ng-hide-remove { -webkit-animation: fadeInRightBig 0.4s; } .box.ng-show-add { -webkit-animation: fadeInRightBig 0.4s; } .box { height:100px; width:100px; } .red {background-color:red;} .blue {background-color:blue;} .purple {background-color:purple;} content content content Previous Next (fiddle: http://jsfiddle.net/poppypoop/Ldyvy062/3/) Any help is appreciated!
tagged with: ng-animate
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26669193
answer count: 1
downvote count: 0
tagged with: javascript
has title: Slide show css transition in Angular
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41936836

http://stackoverflow.com/a/26669343
answers question: http://stackoverflow.com/q/26669184
upvote count: 1
has body: I don't know if there is a built-in function like that sorry, but if you just have integers you can write your own function for that: function numberDigits(number) { return number.toString().length } Now you can easily dicide if the number is thousands or hundreds etc... Note that this only works with integer values!
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/41836260
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26609936
has text: Yes, of course you have to replace `showItemsList();` with `showItemsList(gallery);` at the beginning to pass your array...

http://stackoverflow.com/comment/41927187
score: 7
type: AnswerComment
type: Comment
has text: In my version of Chrome, you can't use `Object.observe` on the `window` object, it gives a `TypeError` saying "observe cannot be called on the global proxy object"
comment on: http://stackoverflow.com/a/26626841

http://stackoverflow.com/a/26519271
answers question: http://stackoverflow.com/q/26518847
has comment: http://stackoverflow.com/comment/41669228
type: Answer
has body: As others have said you are not updating the correct variables in your for loops. However I think you should reconsider your approach a bit. Right now you're splitting and joining on every iteration of the loop which is a bit unnecessary. This approach allows you to reduce your similar code and replaces the words in a temporary array and joins back once: function grammar() { replace(document.getElementById('first_p').value, { "my": "your", "myself": "yourself", "mine": "yours", "I": "you", "me": "you", "our": "your" }, document.getElementById('2_pe')); replace(document.getElementById('first_p').value, { "my": "her/his", "myself": "herself/himself", "mine": "hers/his", "I": "s/he", "me": "s/he", "our": "her/his" }, document.getElementById('3_pe1')); replace(document.getElementById('first_p').value, { "my": "their", "myself": "themself", "mine": "theirs", "I": "they", "me": "they", "our": "their" }, document.getElementById('3_pe2')); } function replace(inputText, replacements, displayElement) { var words = inputText.split(' '); for (var i = 0; i &lt; words.length; i++) { var word = words[i]; if (replacements[word.trim()]) { words[i] = replacements[word].trim(); } } displayElement.innerHTML = words.join(' '); } Updated JSFiddler
score: 0

http://stackoverflow.com/q/26520982
answer count: 1
has comment: http://stackoverflow.com/comment/41671033
favorite count: 0
has comment: http://stackoverflow.com/comment/41671369
type: UnansweredQuestion
score: -1
tagged with: typescript
has comment: http://stackoverflow.com/comment/41671044
has title: How do I output var f?
tagged with: output
has body: I have a button that runs a specific function when it is clicked. The issue now is I can't seem to get that specific value to display on the html page once click. How do you output var f so that it'll show on the html page and not just in the console? function get() { var tinput: HTMLInputElement = < HTMLInputElement > document.getElementById('total'); var t: number = parseFloat(tinput.value); var f: number = t * .45; var f: number = Math.round(f * 100) / 100 console.log(f); }
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26521029

http://stackoverflow.com/q/26614437
type: UnansweredQuestion
has title: Add element in a ng-repeat both view and json object
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41840873
has comment: http://stackoverflow.com/comment/41862515
type: Question
has comment: http://stackoverflow.com/comment/41860582
answer count: 1
tagged with: javascript
has body: The issue is I have a ng-repeat which source is a json object. I have an "Add item" button which is supposed to add a new item to that json object and at the same time is rendered as one item more of the json object. But this item, since it's a new item which wasn't originally in the json object, has the chance to be removed before saving it as an element more of this json object. I'm not pretty sure if this is only a controller action or i should perform some action in a directive compile/link function to render the element or for other action. The following code is just a reference about what I have in mind: Question: {{item.question}} Explanatory: {{item.explanatory}} Answer: {{item.answer}} Answer: {{item.answer}}
score: 0
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/41863601
has answer: http://stackoverflow.com/a/26640338
has comment: http://stackoverflow.com/comment/41842046
tagged with: angularjs

http://stackoverflow.com/a/26614725
type: Answer
has comment: http://stackoverflow.com/comment/41841401
has comment: http://stackoverflow.com/comment/41840916
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26614642
has comment: http://stackoverflow.com/comment/41841355
has comment: http://stackoverflow.com/comment/41841245
score: 0
has body: First - you need to do some js training. Check out eloquentjavascript.net and go to town. Answer: var pagelink = "http://www.roblox.com/catalog/browse.aspx?CatalogContext=1&amp;Subcategory=2&amp;Keyword=&amp;CurrencyType=0&amp;pxMin=0&amp;pxMax=0&amp;SortType=4&amp;SortAggregation=3&amp;SortCurrency=0&amp;PageNumber="; var num = 1; var maxnum = 32; // You need something to put the output in. Here's an array. var links = []; for(var i = num; i &lt;= maxnum; i++) { links.push(pagelink + i); } return links;

http://stackoverflow.com/comment/41691716
type: QuestionComment
comment on: http://stackoverflow.com/q/26516369
score: 1
has text: To me, line-endings are not something a compression algorithm should worry about - CR and LF are just bytes, just like any other byte, so CRLF shouldn't compress any different from any other common pair of bytes, and CR or LF alone would be no different from "E" or any other single byte. And I would expect that the raw bytes of the pre-compressed input and the post-decompressed output should always be identical, regardless of the convention of the OS you're currently running. But I guess there must be scenarios where that isn't true, otherwise this wouldn't have been done.
type: Comment

http://stackoverflow.com/q/26514841
score: 0
has comment: http://stackoverflow.com/comment/41659519
has body: Is there any calculation I can use with javascript which can get me Users monitor size i.e 15'' 17'' etc. I can get screen resoution using screen.width * screen.height
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41659493
has title: Get Monitor Screen size using javascript
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26515073

http://stackoverflow.com/comment/41729229
type: Comment
has text: Thanks, that does sound like an excellent idea. Is it a bad idea to do this? I want to store the user's information such as the user's name, user's ID, user's level and the number of times the user ran this program. Is it bad idea to create one table with only one row?
type: AnswerComment
comment on: http://stackoverflow.com/a/26538267
score: 0

arrays
tags question: http://stackoverflow.com/q/26642456
tags question: http://stackoverflow.com/q/26552421
tags question: http://stackoverflow.com/q/26650907
tags question: http://stackoverflow.com/q/26628559
tags question: http://stackoverflow.com/q/26566325
tags question: http://stackoverflow.com/q/26667270
type: Tag
tags question: http://stackoverflow.com/q/26552694
tags question: http://stackoverflow.com/q/26567564
tags question: http://stackoverflow.com/q/26597924
tags question: http://stackoverflow.com/q/26565106
tags question: http://stackoverflow.com/q/26621660
tags question: http://stackoverflow.com/q/26657821
tags question: http://stackoverflow.com/q/26666336
tags question: http://stackoverflow.com/q/26615809
tags question: http://stackoverflow.com/q/26598618
tags question: http://stackoverflow.com/q/26576151
tags question: http://stackoverflow.com/q/26580448
tags question: http://stackoverflow.com/q/26601648
tags question: http://stackoverflow.com/q/26629283
tags question: http://stackoverflow.com/q/26555326
tags question: http://stackoverflow.com/q/26570245
tags question: http://stackoverflow.com/q/26665447
tags question: http://stackoverflow.com/q/26546194
tags question: http://stackoverflow.com/q/26515239
tags question: http://stackoverflow.com/q/26514487
tags question: http://stackoverflow.com/q/26609769
tags question: http://stackoverflow.com/q/26646615
tags question: http://stackoverflow.com/q/26560031
tags question: http://stackoverflow.com/q/26523690
tags question: http://stackoverflow.com/q/26658053
tags question: http://stackoverflow.com/q/26665165
tags question: http://stackoverflow.com/q/26571582
tags question: http://stackoverflow.com/q/26665559
tags question: http://stackoverflow.com/q/26669484
tags question: http://stackoverflow.com/q/26528711
tags question: http://stackoverflow.com/q/26593427
tags question: http://stackoverflow.com/q/26619852
tags question: http://stackoverflow.com/q/26550220
tags question: http://stackoverflow.com/q/26537685
tags question: http://stackoverflow.com/q/26577768
tags question: http://stackoverflow.com/q/26560072
tags question: http://stackoverflow.com/q/26563451
tags question: http://stackoverflow.com/q/26549445
tags question: http://stackoverflow.com/q/26516638
tags question: http://stackoverflow.com/q/26614889
tags question: http://stackoverflow.com/q/26548263
tags question: http://stackoverflow.com/q/26516571
tags question: http://stackoverflow.com/q/26531286
tags question: http://stackoverflow.com/q/26604854
tags question: http://stackoverflow.com/q/26552322
tags question: http://stackoverflow.com/q/26607055
tags question: http://stackoverflow.com/q/26670279
tags question: http://stackoverflow.com/q/26644084
tags question: http://stackoverflow.com/q/26546715
tags question: http://stackoverflow.com/q/26520341
tags question: http://stackoverflow.com/q/26572094
tags question: http://stackoverflow.com/q/26548295
tags question: http://stackoverflow.com/q/26536087
tags question: http://stackoverflow.com/q/26594830
tags question: http://stackoverflow.com/q/26652777
tags question: http://stackoverflow.com/q/26636164
tags question: http://stackoverflow.com/q/26529250
tags question: http://stackoverflow.com/q/26666513
tags question: http://stackoverflow.com/q/26527665
tags question: http://stackoverflow.com/q/26569121
tags question: http://stackoverflow.com/q/26516149
tags question: http://stackoverflow.com/q/26658140
tags question: http://stackoverflow.com/q/26620926
tags question: http://stackoverflow.com/q/26565070
tags question: http://stackoverflow.com/q/26588104
tags question: http://stackoverflow.com/q/26637849
tags question: http://stackoverflow.com/q/26587284
tags question: http://stackoverflow.com/q/26653638
tags question: http://stackoverflow.com/q/26544407
tag name: arrays
tags question: http://stackoverflow.com/q/26592497
tags question: http://stackoverflow.com/q/26576050
tags question: http://stackoverflow.com/q/26578228
tags question: http://stackoverflow.com/q/26593898

http://stackoverflow.com/a/26522479
type: Answer
downvote count: 0
has body: Use event.stopPropagation() to prevent the event from firing on the containing elements. $(function(){ $('body *').click(function(e){ e.stopPropagation(); alert($(this).get(0).tagName.toLowerCase()); }); });
score: 1
accepted answer of: http://stackoverflow.com/q/26522466
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26522466
upvote count: 1

http://stackoverflow.com/q/26524439
favorite count: 0
has title: IE 8 fireEvent Unspecified error
has answer: http://stackoverflow.com/a/28069848
has body: I get through ajax call some text file and I need to save it on client side, I found a code that helped me with this (it's working in Opera, Chrome, FireFox), but in IE 8 it doesn't want to working, I'm getting "Unspecified error" in fireEvent line. Could you help me to understand, what is wrong? var url = 'data:application/octet-stream,' + responseData; var anchor = document.createElement('a'); anchor.setAttribute('href', url); anchor.setAttribute('download', fileName); var e; if (document.createEvent) { var e = window.document.createEvent("MouseEvents"); e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); anchor.dispatchEvent(e); } else if (window.document.createEventObject) { try { var clickEvent = document.createEventObject(); clickEvent.button = 1; anchor.fireEvent('onclick', clickEvent); // &lt;-- there is error "Unspecified error" } catch (ex) { alert(ex); } }
downvote count: 0
tagged with: onclick
type: UnansweredQuestion
tagged with: internet-explorer-8
score: 1
type: Question
upvote count: 1
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/38242714
type: AcceptedAnswer
type: Answer
has body: I came across this when using Closure Compiler directly via the Java API. It seems to be caused by running the compiler in checks-only mode but with protect hidden side effects enabled. The late pass to remove protection of hidden side effects is skipped in checks-only mode. I'm not sure about KJSCompiler specifically, but it might help to look at changing the compilation level to SIMPLE or ADVANCED, and/or how you might be able to control what checks and optimisations run to KJSCompiler, e.g. turning off CompilerOptions.protectHiddenSideEffects. See https://github.com/google/closure-compiler/issues/1875
answers question: http://stackoverflow.com/q/26665571
score: 0
accepted answer of: http://stackoverflow.com/q/26665571

slideshow
tags question: http://stackoverflow.com/q/26573330
tags question: http://stackoverflow.com/q/26527451
type: Tag
tag name: slideshow
tags question: http://stackoverflow.com/q/26587913
tags question: http://stackoverflow.com/q/26572335
tags question: http://stackoverflow.com/q/26630075

http://stackoverflow.com/comment/43561365
has text: Jani, could you dig further in your answer? I've tried all kinds of overwrite, but somehow because images is a many-to-many association it is preventing that specific field to be overwritten.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26973731
type: AnswerComment

http://stackoverflow.com/a/26515807
has body: I think you might find caolan/async useful. Look especially into async.waterfall. It will allow you to pass results from a callback from another and when done, do something with the results. Example: async.waterfall([ function(cb) { request.get({ url: 'aaa.com' }, function(err, res, body) { if(err) { return cb(err); } cb(null, JSON.parse(body).id); }); }, function(id, cb) { // do that otherFunc now // ... cb(); // remember to pass result here } ], function (err, result) { // do something with possible error and result now });
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26515671
upvote count: 1

http://stackoverflow.com/comment/41727587
type: QuestionComment
type: Comment
has text: No problem. Really appreciated your effort. Its not calling pageChanged() when $scope.current_page changed in code. Thank you I will use the way you suggested.
comment on: http://stackoverflow.com/q/26551576
score: 0

http://stackoverflow.com/comment/51566159
type: Comment
has text: I don't want to make a separate bundle or chunk for my separate library of components I'm sharing between projects, I just want to require the source files directly. Do you know a way to do this? (full question: http://stackoverflow.com/questions/31820641/how-to-set-up-a-private-shared-library-of-react-components-with-webpack)
comment on: http://stackoverflow.com/a/26628468
score: 0
type: AnswerComment

http://stackoverflow.com/q/26612627
has answer: http://stackoverflow.com/a/26613113
has body: I am converting SVG to PNG and I need to remove the angularjs attributes in my SVG. &lt;rect fill="#F9B24F" ry="5" rx="5" ng-attr-y="{{node.rectY}}" ng-attr-x="{{node.rectX}}" ng-attr-height="{{chart.height}}" ng-attr-width="{{chart.width}}" y="10" x="20" height="80" width="160"&gt; I need ouput as &lt;rect fill="#F9B24F" ry="5" rx="5" y="10" x="20" height="80" width="160"&gt; I am trying to replace using String Replace method in javascript.I have tried the following in console,but it's not working "ng-repeat='{{dddddsd}}' dfjdzjfhjk".replace(/ng-*\s/g," ");
possible better answer: http://stackoverflow.com/a/26613113
type: Question
accepted answer: http://stackoverflow.com/a/26612802
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41836916
linked to: http://stackoverflow.com/q/1732348
tagged with: regex
has title: Replace a word based on a pattern in Javascript
tagged with: http://stackoverflow.com/tag/svg
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/26612802
has comment: http://stackoverflow.com/comment/41859524
type: AnsweredQuestion

http://stackoverflow.com/q/26595767
type: Question
upvote count: 1
has body: I am having an issue while drawing a canvas from the image which is already sitting on the html. When I draw the cavas or extend the JCrop highlighted handles or move them then it shows this error "failed to execute 'drawimage' on 'canvasrenderingcontext2d' no function was found that matched the signature provided" Please check my code below. $("div.jcrop img").Jcrop({ onChange: showPreview, onSelect: showPreview, setSelect: [100, 100, 50, 50] }); function showPreview(c) { if (parseInt(c.w) &gt; 0) { // Show image preview var imageObj = new Image(); imageObj = $("div.jcrop img")[0]; var canvas = $("#preview")[0]; var context = canvas.getContext("2d"); context.drawImage(imageObj, c.x, c.y, c.w, c.h, 0, 0, canvas.width, canvas.height); } } I really appreciate your help
tagged with: javascript
has comment: http://stackoverflow.com/comment/43909792
favorite count: 0
linked to: http://stackoverflow.com/q/26973282
tagged with: html5-canvas
has title: javascript - Failed to execute 'drawImage' on CanvasRenderingContext2D (JCrop)
tagged with: jcrop
answer count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: image

http://stackoverflow.com/q/26562129
has comment: http://stackoverflow.com/comment/41744961
has title: How to overrideMin/Max for Time Axis in Dimple?
score: 0
has answer: http://stackoverflow.com/a/26606080
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26562574
has answer: http://stackoverflow.com/a/26562574
has comment: http://stackoverflow.com/comment/41744431
has body: I am using Dimple to plot data with dates on the Y axis, times of the day (0-23) on the X axis. Now I would like to always have the Y axis range cover a whole month and the X axis cover the whole 24 hours of a day. Dimple offers overrideMin and overrideMax but for Time Axes I have no idea how to specify the values: https://github.com/PMSI-AlignAlytics/dimple/wiki/dimple.axis#overrideMin I made a minimal example at http://jsfiddle.net/mfhrpy6e/ var svg = dimple.newSvg("#chartContainer", 590, 400); var data = [ {'Date': '04-03-2013', 'Time': '13:05:01'}, {'Date': '10-03-2013', 'Time': '12:45:52'}, {'Date': '19-03-2013', 'Time': '05:08:21'}, {'Date': '23-03-2013', 'Time': '21:55:01'}, ]; var myChart = new dimple.chart(svg, data); var x = myChart.addTimeAxis("x", "Time", "%H:%M:%S", "%H"); var y = myChart.addTimeAxis("y", "Date", "%d-%m-%Y", "%d-%m"); var s = myChart.addSeries(null, dimple.plot.bubble); myChart.draw();
accepted answer: http://stackoverflow.com/a/26606080
type: AnsweredQuestion
tagged with: dimple.js
tagged with: d3.js
type: Question

http://stackoverflow.com/a/26579895
upvote count: 1
has comment: http://stackoverflow.com/comment/41778870
has comment: http://stackoverflow.com/comment/41779010
has comment: http://stackoverflow.com/comment/41779003
has comment: http://stackoverflow.com/comment/41783556
has comment: http://stackoverflow.com/comment/41777132
has comment: http://stackoverflow.com/comment/41779150
has body: I think you're falling in the trap that many experienced front-end developers fall in to when using Angular. In most of other JS libraries we modify the DOM after it's been created and then add functionality to it. However, in Angular the functionality is defined in the HTML. Functionality and interactivity is created by using directives. In jQuery something like this is fine: Click here to do stuff Whereas in Angular something like the below is more idiomatic: Click here to do stuff As for your GoogleMap directive this is by far the simplest way to accomplish it. Albeit this is incredibly basic and may not do everything you need it to. app.directive('googleMap', [function() { return { link: function(element) { new google.maps.Map(element); } } } ]); Your map.html: As you mentioned however, this would recreate the Google map every time that controller is hit. One way around that is to save off the element and Map api and replacing it on subsequent calls: app.directive('googleMap', [function () { var googleMapElement, googleMapAPI; return { link: function (element) { if (!googleMapElement || !googleMapAPI) { googleMapAPI = new google.maps.Map(element); googleMapElement = element; } else { element.replaceWith(googleMapElement); } } } }]);
downvote count: 0
answers question: http://stackoverflow.com/q/26579678
type: Answer
score: 1

onfocus
tag name: onfocus
tags question: http://stackoverflow.com/q/26658474
type: Tag

http://stackoverflow.com/comment/45165496
score: 0
has text: The `ngInclude` directive is definitely the route to go here, and encapsulate the potential "views" as a collection within the controller that can then serve up the content as necessary.
type: Comment
comment on: http://stackoverflow.com/a/28355315
type: AnswerComment

google-maps
tags question: http://stackoverflow.com/q/26543548
tag name: google-maps
tags question: http://stackoverflow.com/q/26671491
tags question: http://stackoverflow.com/q/26528744
tags question: http://stackoverflow.com/q/26657630
tags question: http://stackoverflow.com/q/26547939
tags question: http://stackoverflow.com/q/26586879
tags question: http://stackoverflow.com/q/26541385
tags question: http://stackoverflow.com/q/26670254
tags question: http://stackoverflow.com/q/26635820
tags question: http://stackoverflow.com/q/26597817
tags question: http://stackoverflow.com/q/26542233
tags question: http://stackoverflow.com/q/26562623
tags question: http://stackoverflow.com/q/26518801
tags question: http://stackoverflow.com/q/26522739
tags question: http://stackoverflow.com/q/26574484
tags question: http://stackoverflow.com/q/26629864
tags question: http://stackoverflow.com/q/26658114
tags question: http://stackoverflow.com/q/26649854
tags question: http://stackoverflow.com/q/26587533
tags question: http://stackoverflow.com/q/26615184
tags question: http://stackoverflow.com/q/26656490
tags question: http://stackoverflow.com/q/26567505
tags question: http://stackoverflow.com/q/26605106
tags question: http://stackoverflow.com/q/26589089
tags question: http://stackoverflow.com/q/26600183
tags question: http://stackoverflow.com/q/26644885
tags question: http://stackoverflow.com/q/26568905
tags question: http://stackoverflow.com/q/26614468
tags question: http://stackoverflow.com/q/26602099
tags question: http://stackoverflow.com/q/26624515
tags question: http://stackoverflow.com/q/26625014
tags question: http://stackoverflow.com/q/26574771
tags question: http://stackoverflow.com/q/26608079
tags question: http://stackoverflow.com/q/26667376
tags question: http://stackoverflow.com/q/26654877
tags question: http://stackoverflow.com/q/26551317
tags question: http://stackoverflow.com/q/26535448
tags question: http://stackoverflow.com/q/26635749
tags question: http://stackoverflow.com/q/26646099
tags question: http://stackoverflow.com/q/26671249
tags question: http://stackoverflow.com/q/26579321
tags question: http://stackoverflow.com/q/26530547
tags question: http://stackoverflow.com/q/26576804
tags question: http://stackoverflow.com/q/26602459
tags question: http://stackoverflow.com/q/26525222
tags question: http://stackoverflow.com/q/26589745
type: Tag
tags question: http://stackoverflow.com/q/26639577
tags question: http://stackoverflow.com/q/26596614
tags question: http://stackoverflow.com/q/26581283
tags question: http://stackoverflow.com/q/26580448
tags question: http://stackoverflow.com/q/26520818
tags question: http://stackoverflow.com/q/26620233
tags question: http://stackoverflow.com/q/26603083
tags question: http://stackoverflow.com/q/26650087
tags question: http://stackoverflow.com/q/26632803
tags question: http://stackoverflow.com/q/26567712
tags question: http://stackoverflow.com/q/26656573
tags question: http://stackoverflow.com/q/26624965

http://stackoverflow.com/q/26563601
score: 0
answer count: 1
tagged with: web
has title: Use Google Apps Script functions in project
accepted answer: http://stackoverflow.com/a/26565473
tagged with: web-applications
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26303174
type: Question
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/26565473
tagged with: database
has body: I am very new to Google Apps Scripts and am curious how I can use functions created in my own project. For example, I have a script bound to a spreadsheet with just one function: function addOrder(title, content) { var sheet = SpreadsheetApp.getActiveSheet(); sheet.appendRow([ Date(), title, content]); } It simply takes 2 arguments and adds a row to the spreadsheet with that data. I have deployed it as a web app, but I'm not sure how to use this function in an environment like JSFiddle. Any help is appreciated. Thanks
tagged with: javascript

http://stackoverflow.com/a/26627570
answers question: http://stackoverflow.com/q/26627518
has comment: http://stackoverflow.com/comment/85971162
upvote count: 1
has comment: http://stackoverflow.com/comment/41864288
type: Answer
downvote count: 0
score: 1
has body: Yes its bad idea .So Fire 1 ajax And then On Success of it bind records u got using jquery or angular js .Why ?? It will consume resources of server so there will be traffic problem,CPU load and lot more Read more about AJAX optimization in this Article.

http://stackoverflow.com/comment/41779751
type: Comment
comment on: http://stackoverflow.com/a/26581594
type: AnswerComment
score: 0
has text: On the other hand, I'm not very good with plain old JS. How would I use `setTimeout` in the second piece of JavaScript?

http://stackoverflow.com/comment/41802572
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26593832
has text: Related: https://stackoverflow.com/questions/19048985/angularjs-better-way-to-watch-for-height-change . I think you'll need some kind of a `scope.$watch` there.

http://stackoverflow.com/comment/41937024
type: QuestionComment
has text: @ Ohgodwhy not duplicate , my function use image from url .
comment on: http://stackoverflow.com/q/26667832
score: 0
type: Comment

http://stackoverflow.com/comment/41791773
comment on: http://stackoverflow.com/q/26587409
score: 0
type: Comment
has text: Do the $stateChangeStart and $stateChangeSuccess events fire?
type: QuestionComment

http://stackoverflow.com/q/26652434
has body: I'm just trying to upload an excel file and do some processing on it. and want to show the progress step by step. I've tried much to show a real progress I've used Background-worker, and Web-method etc. but no success now I'm thinking to do this With the help of JavaScript and AJAX. Code i've tried with backgroundworker is below Imports System.ComponentModel Imports System.Threading Public Class _Default Inherits Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load End Sub Dim bw As BackgroundWorker = New BackgroundWorker Public Shared stopWorker As Boolean = False Public Function startWorker() As Int16 If Not bw.IsBusy = True Then bw.RunWorkerAsync() End If Return 0 End Function Public Function testww(sender As Object, e As EventArgs) As Int16 bw.WorkerSupportsCancellation = True bw.WorkerReportsProgress = True AddHandler bw.DoWork, AddressOf bw_DoWork AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted Return 0 End Function Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Dim worker As BackgroundWorker = CType(sender, BackgroundWorker) For i = 1 To 500 If bw.CancellationPending = True Then e.Cancel = True Exit For Else ' Perform a time consuming operation and report progress. System.Threading.Thread.Sleep(500) bw.ReportProgress(i * 0.5) End If Next End Sub Private Sub bw_ProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs) Me.tbProgress.Text = e.ProgressPercentage.ToString() &amp; "%" End Sub Private Sub bw_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs) If e.Cancelled = True Then Me.tbProgress.Text = "Canceled!" ElseIf e.Error IsNot Nothing Then Me.tbProgress.Text = "Error: " &amp; e.Error.Message Else Me.tbProgress.Text = "Done!" End If End Sub Private Shared Sub WorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Dim worker As BackgroundWorker = TryCast…
tagged with: vb.net
has comment: http://stackoverflow.com/comment/41908541
score: 2
upvote count: 2
has title: how to read excel file in javascript without using ActiveXObject?
has comment: http://stackoverflow.com/comment/41908547
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41908741
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29709710
type: UnansweredQuestion

http://stackoverflow.com/q/26553988
has body: I am a beginner at javascript. I have a question about the one of the 'hints' in the "A List" exercise problem from eloquent javascript: let's say I'm looping through the following list in the body of a function called listToArray: var list = { value: 1, rest: { value: 2, rest: { value: 3, rest: null } } }; The hint recommends using the following loop: for (var node = list; node; node = node.rest) {} The explanation is as follows: Can you see how that works? Every iteration of the loop, node points to the current sublist, and the body can read its value property to get the current element. At the end of an iteration, node moves to the next sublist. When that is null, we have reached the end of the list and the loop is finished. What I would like to know is: why don't we need to write node === null as the middle parameter like in every other for loop i've ever seen in my life? UPDATE: I understand that 'null' is falsy. To reiterate the question, perhaps more succinclty: why don't we need the comparison operator ('===') to terminate the loop?
downvote count: 0
tagged with: javascript
has title: Why does a for-loop terminate when the middle parameter is 'null'?
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26554169
upvote count: 1
has answer: http://stackoverflow.com/a/26554169
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26554035
tagged with: loops
type: Question
has comment: http://stackoverflow.com/comment/41733130
accepted answer: http://stackoverflow.com/a/26554035
answer count: 2

http://stackoverflow.com/comment/41841749
type: Comment
type: QuestionComment
score: 1
has text: They're not "related to each other" whether they're on the same line or not. If you just have an input and a text node, they're two elements that are just being rendered next to each other, one input and one text node, and whether there's any difference between putting them on one line or on separate lines is addressed in the question I linked to. You're getting hung up on the idea that putting them on the same line somehow "associates" them, but that isn't true. This is exactly the same as example 1 in the linked question, just one of the elements is a text node.
comment on: http://stackoverflow.com/q/26614400

http://stackoverflow.com/a/26645247
score: 0
type: Answer
has body: Assuming you mean crontab? If so, and if you have shell access to the box: crontab -e and add entry for the php script you want to run: 0 */4 * * * /path/to/php /full/path/to/script_to_run.php NOTE: Use full paths to both php and your script and your php might be installed in a different directory. Use 'which php' to get the full path.
answers question: http://stackoverflow.com/q/26644966

http://stackoverflow.com/comment/113231650
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/43374240
has text: Unfortunately this won't hit the button when a user presses [enter], but still tries to submit the form.

http://stackoverflow.com/comment/41881186
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26635517
has text: I tested this locally and it works. You can accept this as answer if it helps solve your problem.
type: AnswerComment

http://stackoverflow.com/q/26606415
tagged with: file
has answer: http://stackoverflow.com/a/57181126
type: Question
answer count: 2
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/26609005
accepted answer: http://stackoverflow.com/a/26609005
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
possible better answer: http://stackoverflow.com/a/57181126
tagged with: download
downvote count: 0
has body: Referring to this example: http://jsfiddle.net/m9nts8r1/ How can I update the content of updatedText.xml when pressing the 'Download' button, just as it does when the 'Save' button in any application? In this case I just get another updatedText (1).xml, updatedText (2).xml and so on. Moreover it would be nice if it was possible to specify the directory where the updatedText.xml is saved. Has someone an idea?
has title: Replace file when downloading
has comment: http://stackoverflow.com/comment/49606994
type: AnsweredQuestion

http://stackoverflow.com/q/26609169
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/26609329
answer count: 3
has title: Getting an error even when checkbox is checked
has comment: http://stackoverflow.com/comment/41830292
tagged with: jquery
has comment: http://stackoverflow.com/comment/41830339
has body: From all the examples I found, using is(':checked') should return true if checkbox is checked, and false if not. In my case it returns false on both situations. What is my mistake? { xtype: 'checkbox', boxLabel: 'Show message', id: 'mainBox', handler: function() { alert($(this).is(':checked')); }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26609228
score: 0
has answer: http://stackoverflow.com/a/26609291
type: Question

http://stackoverflow.com/a/26629485
has comment: http://stackoverflow.com/comment/41869400
has body: If source domain is yours or you can change the return value then you can do jquery ajax call with the data type jsonp. If you can't access the source domain then this is not possible because of security reasons. As an another solution we can use small proxy which manage requests and responses, but again you should have rights to access the source domain. look at this, proxy can comunicate with the server 2 without any restrictions since which are in the same domain. And you can implement proper interface in proxy which allow to communicate with external servers or clients like server1. Using this model you don't need to change server 2.
has comment: http://stackoverflow.com/comment/41867608
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26629394

http://stackoverflow.com/q/26584369
has comment: http://stackoverflow.com/comment/41784595
has comment: http://stackoverflow.com/comment/41784515
has comment: http://stackoverflow.com/comment/41818056
type: AnsweredQuestion
has title: jQuery process JSON string from variable withou making AJAX call
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41818639
type: Question
has body: I'm trying to make jQuery to process JSON string from variable without making AJAX call because this JSON string will be generated from JSON2HTML, but jQuery.getJSON require to make AJAX call which is waste of resource. Does anyone have a solution or workaround for this problem? JSON string which had been generate from JSON2HTML. [{"tag":"div","id":"0","class":"sgph","children":[ {"tag":"div","data-scoretype":"","class":"sgi","id":"1","children":[ {"tag":"button","data-btnrole":"satis_group","class":"up","html":"up"}, {"tag":"button","data-btnrole":"satis_group","class":"down","html":"down"}, {"tag":"button","data-btnrole":"satis_group","class":"edit","html":"change"}, {"tag":"button","data-btnrole":"satis_group","class":"del","html":"delete"} ]}, {"tag":"div","class":"scph","children":[ {"tag":"button","data-btnrole":"score_type","class":"add","html":"score type"} ]}, {"tag":"div","class":"stph","children":[ {"tag":"div","class":"sti","id":"1","children":[ {"tag":"button","data-btnrole":"satis_topics","class":"up","html":"up"}, {"tag":"button","data-btnrole":"satis_topics","class":"down","html":"down"}, {"tag":"button","data-btnrole":"satis_topics","class":"edit","html":"change"}, {"tag":"button","data-btnrole":"satis_topics","class":"del","html":"delete"} ]}, {"tag":"div","class":"sti","id":"3","children":[ {"tag":"button","data-btnrole":"satis_topics","class":"up","html":"up"}, {"tag":"button","data-btnrole":"satis_topics","class":"down","html":"down"}, {"tag":"button","data-btnrole":"satis_topics","class":"edit","html":"change"}, {"tag":"button","data-btnrole":"satis_topics","class":"del","html":"delete"} ]}, {"tag":"button","data-btnrole":"satis_topics","class":"add","html":"add topic"} ]} ]}, {"tag":"div","id":"1","class":"sgph","children":[ {"tag":"button","data-btnrole":"satis_group","class":"add","html":"add group"} ]} ] jQuery code that I did. //json_str will store JSON string which had been generate from JSON2HTML. var json_str=$.parseJSON(FormatJSON(toTr…
tagged with: javascript
has answer: http://stackoverflow.com/a/26611354
accepted answer: http://stackoverflow.com/a/26611354
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/26572623
answers question: http://stackoverflow.com/q/26572564
has comment: http://stackoverflow.com/comment/41763356
downvote count: 0
has comment: http://stackoverflow.com/comment/41763380
type: Answer
has comment: http://stackoverflow.com/comment/41763364
has comment: http://stackoverflow.com/comment/41763420
has comment: http://stackoverflow.com/comment/41763239
has body: JavaScript will always use your computer's locale to extract the date. It's using BST because this is the timezone that you have set (automatically perhaps?). You can extract a UTC time string by calling the following function: var d = new Date(); d.toUTCString(); // "Sun, 26 Oct 2014 11:46:11 GMT" There are libraries that deal specifically with manipulation of date objects. One such tool I recommend you checkout is moment.js. It gives you the option to convert between timezones as well as a whole lot of other useful time/date related features.
upvote count: 1
has comment: http://stackoverflow.com/comment/41763317
score: 1

http://stackoverflow.com/q/26672549
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/26672550
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26672550
score: 0
has answer: http://stackoverflow.com/a/26672634
type: Question
has title: jQuery: Changing the text of a button depending on the visibility state of a table
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26672634
has body: I am trying to change the text of a button when a table is visible or not by using jQuery. The problem is that jQuery .is(":visible") does not appear to do it. What am I doing wrong? I supposed that .is(":visible") is what is needed to check if an element is visible. $(function() { $( "#tabla" ).hide(); // We start hiding it. $("#boton").click(function() { var tabla = $("#tabla"); tabla.fadeToggle();// Change the table visibility // An tell us if it is visible or not if (tabla.is(":visible")) { alert("It's visible"); // This is always called. // TODO Change button text. } else { alert("It isn't visible"); // This is never called. // TODO Change button text. } }); }); Show First Second Foo Boo
favorite count: 0

http://stackoverflow.com/comment/41972867
type: AnswerComment
comment on: http://stackoverflow.com/a/26669284
type: Comment
has text: Welcome. I have a new plunker- http://plnkr.co/edit/geEqP4qvTpP9QSdGOqye?p=preview which i believe is what you are looking for.
score: 0

http://stackoverflow.com/a/26595563
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26595464
answers question: http://stackoverflow.com/q/26595464
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You can use the .promise() method on a collection of elements: $('.content').promise().then(function() { // all animations are finished }); From the jQuery docs: The .promise() method returns a dynamically generated Promise that is resolved once all actions of a certain type bound to the collection, queued or not, have ended. By default, type is "fx", which means the returned Promise is resolved when all animations of the selected elements have completed.
type: Answer

http://stackoverflow.com/comment/41773154
comment on: http://stackoverflow.com/a/26574369
type: Comment
has text: oops ! sorry i was pasted wrong link. please check this ( you can update it ) : http://jsfiddle.net/nz1gfo3c/
score: 0
type: AnswerComment

http://stackoverflow.com/a/26549757
answers question: http://stackoverflow.com/q/26549699
upvote count: 2
has body: On this line: list.rest = arrayToList(); … you recursively call the function but you don't specify an argument, so array becomes undefined. It looks like you should just pass array again (which you have modified). list.rest = arrayToList(array); live demo
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/26529074
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26526806
answers question: http://stackoverflow.com/q/26526806
type: Answer
upvote count: 1
has body: This is a known bug--> , and not yet fixed, this problem has came with android 4.4 's new webview, but i worked around this problem this way: respondRequest = String.format("javascript:mostar.respond(%d, %d,\"%s\")", invocationId, responseStatus,URLEncoder.encode(StringEscapeUtils.escapeEcmaScript(jsonStr)));
type: AcceptedAnswer

http://stackoverflow.com/a/26515819
has body: there is some issue on the dhtml part, You may need to change your html part as like below jsfiddle link `http://jsfiddle.net/d0Laxh6j/6/` &lt;input type="button" value="Check Selections" onclick="alert($('[name=offset]').val());"&gt;
answers question: http://stackoverflow.com/q/26515572
type: Answer
score: 0

http://stackoverflow.com/q/26613508
downvote count: 2
tagged with: backbone-model
has comment: http://stackoverflow.com/comment/41870347
score: -2
has answer: http://stackoverflow.com/a/26613563
has title: JavaScript, disable breakpoints
tagged with: google-chrome-devtools
has body: In order to secure my SPA, I need a way to disable all the JS breakpoints. Currently, I'm still able to add runtime breakpoints with Chrome DevTool and change variable value of my objects. Not in the console but in the runtime. If an attacker is able to change attributes value of the App objects my application is compromised. Do you have suggestion to prevent this behaviour? The best would be to insert in my JS: console.ignoreBreakPoints();
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: security
type: UnansweredQuestion

http://stackoverflow.com/q/26540319
has title: Start native time input from javascript
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26553614
answer count: 1
favorite count: 0
has body: I need to get a time from the user on mobiles. I dont want to show the html input field to the user. I thought I could simulate a click or give focus to on an input field to start the native time picker. It does not seem to work. any Idea How to do that ? I wrote this pen to try it on android. codepen.io/kbenoit/pen/gJmay Basically clicking on a button triggers this code: var e = document.getElementById("timeInput"); e.value = "8:00:00"; e.focus(); // or e.click(); Where &lt;input id="timeInput" type="time"&gt;&lt;/input&gt; I know I can implement my own picker in html, but it would be simpler and prettier to use the native time picker.
tagged with: android
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26553614
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/a/36013251
answers question: http://stackoverflow.com/q/26617719
score: 4
type: Answer
downvote count: 1
upvote count: 5
has body: the simplest solution if you use jQuery - use .one() instead of .on() this equals to triggering .off() in on http://api.jquery.com/one/

http://stackoverflow.com/a/73810199
has body: try using header:false, it'll display the header as array.
answers question: http://stackoverflow.com/q/26597460
score: 0
type: Answer

http://stackoverflow.com/q/26575279
has comment: http://stackoverflow.com/comment/41768413
tagged with: forms
has answer: http://stackoverflow.com/a/26575436
type: AnsweredQuestion
tagged with: validation
tagged with: javascript
has comment: http://stackoverflow.com/comment/41768397
type: Question
has title: Javascript only validates the first input field
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26575436
has body: I've been trying to validate this form using Javascript, however for some weird reason only the first input field seems to be doing what it is supposed to do. Here's the relevant snippet of code: Your details: First Name Please enter your name, you can only use alphabetic characters Surname Javascript: function validateName(x) { var re = /^[A-Za-z]{2,25}$/; if(re.test(document.getElementById(x).value)){ /* This checks the input's value corresponds with the regular expression (re) */ document.getElementById(x).style.background ='#ccffcc'; /* If it does it changes the background colour of the field to green*/ document.getElementById(x).style.border="4px solid #ccffcc"; document.getElementById(x + 'Error').style.display = "none"; /* This hides the error message because the function returned as true */ return true; } else{ /* If the function doesn't return as true this is what happens */ document.getElementById(x).style.background ='#e35152'; /* The background colour of the field changes to red */ document.getElementById(x).style.border="4px solid #e35152"; document.getElementById(x + 'Error').style.display = "block"; /* This displays the error message */ return false; } } function validateSurname(x) { var re = /^[A-Za-z]{2,25}$/; if(re.test(document.getElementById(x).value)){ document.getElementById(x).style.background ='#ccffcc'; document.getElementById(x + 'Error').style.display = "none"; return true; } else{ document.getElementById(x).style.background ='#e35152'; document.getElementById(x + 'Error').style.display = "block"; return false; } } function validateForm() { var error = 0; if(!validateName('name')) { document.getElementById('nameError').style.display = "block"; error++; } if(!validateSurname('surname')) { document.getElementById('surnameError').style.display = "block"; error++; } if(error > 0) { return false; } else if(error < 0) { return true; } }
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41768374

http://stackoverflow.com/a/36453953
type: Answer
answers question: http://stackoverflow.com/q/26608625
score: 0
has body: You could also listen to the i18nextLanguageChange event: $scope.$on('i18nextLanguageChange', function () { $scope.workouts = [ {id: 1, name: 'Workout 1', type: $i18next("type1")}, {id: 25, name: 'Workout 2', type: $i18next("type2")}, ]; }); You'll have to tackle other race conditions on your own that way.

http://stackoverflow.com/q/26595925
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41806662
favorite count: 0
tagged with: class
possible better answer: http://stackoverflow.com/a/26596161
upvote count: 1
has answer: http://stackoverflow.com/a/26596335
accepted answer: http://stackoverflow.com/a/26596335
has title: Trying to understand nodeJS and javascript objects
downvote count: 0
tagged with: node.js
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26596161
score: 1
has body: I was trying to write a quick example of a an object, and some prototypes for that object, and I was getting some unexpected results out of the code. I'm working with two files, index.js and cards.js The basic idea is to instantiate a new object called "deck" and then call some methods on that object. Here's my code cards.js //constructor function cardsClass() { this.cards = [ { suit: 'heart', number: 1, name: 'ace' }, { suit: 'heart', number: 10, name: 10 }, { suit: 'heart', number: 11, name: 'jack' }, { suit: 'heart', number: 12, name: 'queen' }, { suit: 'heart', number: 13, name: 'king' } ]; } //class method cardsClass.prototype.getCards = function() { return this.cards; } cardsClass.shuffle_helper = function (input_cards, return_deck, callback) { if (input_cards.length !=0) { index = Math.floor(Math.random() * input_cards.length); if (input_cards[index]) { return_deck.push(input_cards[index]); input_cards.splice(index, 1); } cardsClass.shuffle_helper(input_cards, return_deck, callback); } else { callback(null, 'success'); } } //class method cardsClass.prototype.shuffle = function (callback) { //set up a temp deck... var return_deck = []; cardsClass.shuffle_helper(this.cards, return_deck, function (err, results) { this.cards = return_deck; callback(null, this.cards); }); } module.exports = cardsClass; index.js var cards = require('./cards.js'); deck = new cards(); console.log( deck.getCards() ); deck.shuffle(function (err, results){ console.log ('our results of a deck.shuffle'); console.log (results); }); console.log ('and this is what our getCards function returns'); console.log( deck.getCards() ); console.log ('looking at deck.cards'); console.log (deck.cards); The results I get from running this code is below $ node index.js [ { suit: 'heart', number: 1, name: 'ace' }, { suit: 'heart', number: 10, name: 10 }, { suit: 'heart', number: 11, name: 'jack' }, { suit: 'heart', number: 12, name: 'queen' }, { suit: 'heart', number: 13, name: 'king' } ] our results of a…
type: Question

http://stackoverflow.com/comment/41896910
score: 0
comment on: http://stackoverflow.com/q/26644705
type: Comment
type: QuestionComment
has text: In case you're interested, here's a [generic image caching algorithm](http://stackoverflow.com/questions/10240110/how-do-you-cache-an-image-in-javascript/10240297#10240297). Then, rather than keep track of all the `img` objects, you can just assign the desired url to `.src` and it will already be in the browser cache so will load immediately.

http://stackoverflow.com/q/26572335
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41762990
tagged with: responsive-slides
has comment: http://stackoverflow.com/comment/41762931
type: Question
has body: I tried my code in http://jsfiddle.net/3J8vW/22/ and it worked perfectly, but when I tried it on my site it didnt work Maybe I got an error in my js line (function ($) { $('#slider1').responsiveSlides(); }(jQuery)); Website link /profil.html
has comment: http://stackoverflow.com/comment/41762798
has comment: http://stackoverflow.com/comment/41763029
tagged with: slideshow
has title: Responsiveslide.js doesn't work
tagged with: javascript

http://stackoverflow.com/q/26636104
tagged with: osx-yosemite
tagged with: applescript
upvote count: 3
has title: How to interact with controls in a pane with Javascript for Automation (Yosemite)
has answer: http://stackoverflow.com/a/26891850
tagged with: javascript
type: AnsweredQuestion
score: 3
has body: I'm trying to convert an old Applescript to Javascript. The purpose of the script is to toggle on and off Internet Sharing. I have been able to open up the Sharing pane and locate the Internet Sharing anchor, but cannot figure out how to interact with the controls on the pane. In Applescript I had System Events tell System Preferences to click a specific checkbox but everything I've tried to this point with Javascript has returned obtuse errors. Here's what I've gotten so far: prefs = Application('System Preferences') sharePane = prefs.panes.byName('Sharing') anchors = sharePane.anchors() netAnchor = "" for (i in anchors) { if (anchors[i].name().search('net') &gt; -1) { netAnchor = anchors[i] } }
downvote count: 0
accepted answer: http://stackoverflow.com/a/26891850
possible better answer: http://stackoverflow.com/a/27081138
favorite count: 0
has answer: http://stackoverflow.com/a/27081138
type: Question
answer count: 2

http://stackoverflow.com/comment/41803815
has text: You're going to have a heck of a time validating the check digit on 1981- VINs via regex. I strongly recommend [Wikipedia](http://en.wikipedia.org/wiki/Vehicle_identification_number) as a reference on this topic.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594504

http://stackoverflow.com/a/26675416
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: here's one way you could do it: // get primary entity's validation errors. var validationErrors = entity.entityAspect.getValidationErrors() // concat all child entity validation errors... .concat( // grab every navigation property array. entity.entityType.navigationProperties .filter(function (propertyInfo) { return !propertyInfo.isScalar; }) .map(function (propertyInfo) { return entity[propertyInfo.name]; }) // flatten the array of entity-arrays into one big array of entities. .reduce(function (a, b) { return a.concat(b); }) // validate the entities. .map(function (childEntity) { return childEntity.getValidationErrors(); }) // flatten the array of ValidationError-arrays into one big array of validation errors. .reduce(function (a, b) { return a.concat(b); }) );
answers question: http://stackoverflow.com/q/26661455
accepted answer of: http://stackoverflow.com/q/26661455
has comment: http://stackoverflow.com/comment/44919605
type: AcceptedAnswer

http://stackoverflow.com/q/26514845
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/26514993
has answer: http://stackoverflow.com/a/26515282
has body: I have a search page with a filter box on it. In this box are two date filters, Before and After. Each date filter uses the jquery ui-datepicker. The first one looks like this: The second one looks like this: I need the calendar for the Before Date box (image 2) to show up in the same place as the After Date box (image 1). I don't think I can hardcode the position for the second calendar though, because while that might work on my computer, wider or smaller screens would likely have it in the wrong place. I also can't set it to a relative value, because its position is already set using absolute value. How can I make the second calendar show up, say 200px to the left of where it would automatically show up?
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/26515282
tagged with: calendar
type: Question
score: 3
tagged with: javascript
linked to: http://stackoverflow.com/q/15131465
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26514993
has title: Positioning of JqueryUI datepicker: how to set its position relative to where it would automatically show up?

http://stackoverflow.com/a/45180190
score: -1
upvote count: 2
has body: Use -Number.MAX_VALUE instead of Number.MIN_VALUE to compare: 0 &gt; -Number.MAX_VALUE returns true.
has comment: http://stackoverflow.com/comment/92462606
downvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/26614728

http://stackoverflow.com/q/26609797
tagged with: cesiumjs
tagged with: javascript
has title: How to add custom UI elements (like checkboxes, combos and etc) to CesiumJS scene?
tagged with: user-interface
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26614426
tagged with: jquery
has body: I want to add checkboxes to the main scene, each indicating a WMS layer. Selecting them will automatically initialize the provider with the layer info and add them to the map. Couldn't find anything useful on this. How can I achieve this? Is there any way defined in the Cesium API to accomplish it, or should I just create custom HTML checkboxes and render the scene everytime a checkbox is selected? Thanks in advance fellas.
favorite count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/26552418
tagged with: javascript
tagged with: module-pattern
score: 0
has title: module pattern and closure discussion
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41734324
tagged with: design-patterns
has answer: http://stackoverflow.com/a/26556947
has comment: http://stackoverflow.com/comment/41734293
type: Question
has body: My friend has recently started working with JavaScript in a lot of his projects, especially the module pattern. I asked him if he can help me understand closure from his work experience: He put together this piece of code to explain both module pattern and closure but his code doesn't seem to do anything.. /* Write JavaScript here */ var test = test || {}; test.application = (function(){ function closure(){ var a = { name : 'Reena', age : 32, doSomeThing: function(){ alert(this.name); alert(this.age); } }; return a; } return { myapp: function(){ var myClosure = closure(); var a = myClosure.doSomeThing(); var myname =myClosure.name; alert("myname: " + myname); } }; })(); When he was demoing this over a teamview session, he started wrting the module in a very interesting way: He started out with the namespace object and then created an IIFE Shell function returning an object and then started filling out the inner functions: /* Write JavaScript here */ var test = test || {}; test.application = (function(){ function closure(){ //then he worked on this .. } return { //then he worked on the return value for the IIFE which is another javascript function }; })(); Now, can JS gurus explain me why the piece of code he wrote is not doing anything and if his example is a good demo for closure.
tagged with: closures

http://stackoverflow.com/q/26628673
has title: Extjs Toolbar crash, extjs 4.2.1, Chrome, Windows
tagged with: extjs
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26628970
tagged with: extjs4
type: UnansweredQuestion
has body: Verry weird bug when developing a application. The toolbar dissapears whenever i add a button to it. The code is as follows: Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width : window, height: window, items: [ { xtype : 'textfield', name : 'field1', emptyText: 'enter search term' }, '-', { xtype : 'button' // icon: 'img/cross_cursor.gif'} } ]}) No errors encountered
type: Question
tagged with: javascript

http://stackoverflow.com/q/26548404
answer count: 3
tagged with: string
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26550815
has answer: http://stackoverflow.com/a/41302633
has body: I have a problem with passing data to Highcharts chart. I am ok with passing the "data" variables, because they are numbers. What doesnt seem to work are the categories. Here I have text values for the individual data points. I created a string which looks something like this: string = "'One','Two','Three','Four'"; I then passed this as the categories in Highcharts like this: xAxis: { categories: string, }, The problem is that when I do this, instead of x-values being One, Two etc. I get each letter of the string as a category - ie. the first categorz is the apostrophe, second O, third n.... I know there is a problem that I need to somehow create an array and pass it in the correct format, but I tried various things and nothing worked. Just to add, if one is not using dynamic data, the syntax for highcharts should look like this for example: xAxis: { categories: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] },
score: 1
has title: Passing string data as categories to Highcharts
type: Question
tagged with: graph
tagged with: highcharts
has answer: http://stackoverflow.com/a/26548904
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26614727
tagged with: closures
tagged with: javascript
has body: A lambda or anonymous function is just a function without a name. e.g. $lambda = function($a, $b) { echo $a + $b; }; A closure is a function which has access to variables not specified in its parameter list. In PHP 5.3+ these variables are specified after the use keyword and are linked either by value or by reference at the time the function definition of the closure function is executed. e.g. $foo = 'hello'; $closure = function() use ($foo) { echo $foo; }; $closure(); In JavaScript, all functions are closures in the sense that when functions are nested, there exists a scope chain whereas for instance the innermost function has access to 1. its local variables, 2. the local variables of the function in its enclosing scope known as its closure scope, 3. the local variables of the enclosing scope of the enclosing scope, known as the closure scope of the closure scope, ..., and so on until we can also access N. the global variables which are defined in the topmost scope. Variables declared with var in innermost scopes mask those in outer scopes, otherwise if an innermost variable has the same name as one in an outer scope but is not declared with var then the variable from the outer scope is used. var zero = 0; // global scope function f1() { var one = 1; // third-level closure scope of f4 function f2() { var two = 2; // second-level closure scope of f4 function f3() { var three = 3; // first-level closure scope of f4 function f4() { var four = 4; // local scope of f4 console.log(zero + one + two + three + four); } f4(); } f3(); } f2(); } f1(); This is equivalent to the following PHP code: &lt;?php $zero = 0; // global scope $f1 = function() use ($zero) { $one = 1; // third-level closure scope of f4 $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 $f3 = function() use ($zero, $one, $two) { $three = 3; // first-level closure scope of f4 $f4 = function() use ($zero, $one, $two, $three) { $four = 4; // local scope of f4 echo $zero + $one …
tagged with: lexical-closures
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41841505
tagged with: php
tagged with: php-closures
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: PHP closure functions: why does a closure have to be an anonymous function?
type: Question

http://stackoverflow.com/comment/41843418
has text: I get "undefined" and (aka) it keeps referring back to the global variable, which is weird and frustrating.
comment on: http://stackoverflow.com/q/26616011
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41807925
comment on: http://stackoverflow.com/a/26596265
has text: @user3413252: If you test the first `console.log` test from above, you will see that it will write out `0`. There is no element with `id="username"` in the page, so the jQuery object will be empty. When you use `val()` on it, it will return `null`, and you can't use `toLowerCase` on a null reference so you will get an error there. When you get an error the exection will stop, so the next line that writes to the log will not be executed.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26595481
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26595713
tagged with: twitter-bootstrap-3
score: 0
answer count: 1
has title: Bootstrap 3 Tabs, active tab flicker on hover only in firefox
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26595713
has comment: http://stackoverflow.com/comment/41806392
has body: Firstly here's the link I've setup bootstrap3 tabs for some content. Only in firefox I get a flickr when I click the active tab and hover out. Chrome Link(works without issues): https://www.youtube.com/watch?v=c2gMde9M2-A&amp;feature=youtu.be Firefox Link: https://www.youtube.com/watch?v=WnpuUHTBxJo&amp;feature=youtu.be I did try to solve it myself but could not find any related styles which may be causing this. Maybe I've missed something. Any help would be appreciated.
type: AnsweredQuestion
tagged with: jquery

http://stackoverflow.com/comment/41763547
type: AnswerComment
comment on: http://stackoverflow.com/a/26567333
score: 0
type: Comment
has text: Actually i'm not sure about my data structure as well. Now I updated my template with your solution (it works) and better table structure and doesn't work anymore. Error: Cannot read property 'firstChild' of null. Anyway my idea was to create a week array of 6 spots and loop it in order to create 6 rows, then inside loop till 7(this part isn't there yet) and then insert the days Array with all the days in a month. If you have better structure i very happy to know it, seems you know quite good Emberjs :)

http://stackoverflow.com/a/26608426
answers question: http://stackoverflow.com/q/26603799
score: 0
type: Answer
has body: After some search and work I came up with a temp sol, This will give the calender event of the candidate whom you have added in your calender. So its basically how to add a user id to the calender of the id who is running the script. var events = user1_cal.getEvents(new Date("October 26, 2014"), new Date("October 28, 2014")); for (var i=0; i &lt; events.length; i++) { var details=[[events[i].getTitle(), events[i].getDescription(), events[i].getStartTime(), events[i].getEndTime()]]; var row=i+1; var range=sheet.getRange(row,1,1,4); range.setValues(details); } Logger.log('Number of events: ' + events.length);

http://stackoverflow.com/q/26569463
has title: Facebook SDK - Scroll on the Tab
has answer: http://stackoverflow.com/a/26569920
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: sdk
answer count: 1
tagged with: facebook-graph-api
has body: When I go to a specific Facebook tab, I want the facebook page itself to focus on the tab when fully loaded, thus the cover photo of the fanpage is not seen or partially seen on the screen when Facebook tab is fully loaded. Is this possible? Please don't say it's FB.Canvas.ScrollTo() , because this is intended for the Facebook App's Content only. Thank you very much!
tagged with: facebook
accepted answer: http://stackoverflow.com/a/26569920
type: AnsweredQuestion

http://stackoverflow.com/comment/43652789
has text: Sorry, you will see an error on dragging an image `ReferenceError: event is not defined - Firefox`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26603536

http://stackoverflow.com/a/26645353
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41896534
type: Answer
has comment: http://stackoverflow.com/comment/41896560
has body: What you can do is: Make the PHP file as backend. So that, xyz.php: // PUT YOUR CODE HERE $sql = "SELECT Name, Location, ID, Price From ProdTable where ID&gt;=2000"; $encode=array(); $result = mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($result)) { $encode[] = $row; } echo json_encode($encode); ?&gt; AND it should be accessible from the URL. For example: xyz.php?id=2000 Now, on the page from where you want to populate this data, use jQuery $.post And manipulate this json. This will ensure your page loads faster as dynamic data is getting populated after initial page load. Hope it works for you.
accepted answer of: http://stackoverflow.com/q/26645297
has comment: http://stackoverflow.com/comment/41896564
has comment: http://stackoverflow.com/comment/41940637
answers question: http://stackoverflow.com/q/26645297

http://stackoverflow.com/comment/41745568
comment on: http://stackoverflow.com/q/26562759
type: Comment
type: QuestionComment
has text: I am really looking to use the asynchronous call, can you help with it?
score: 0

http://stackoverflow.com/a/26661017
score: 2
downvote count: 0
has body: jQuery objects dont have an innerHTML property - you need to either use the html method, or reference the 0 index of the jQ object to get the native DOM object: $('#TransactionTable')[0].innerHTML = result.TableCode; Or $('#TransactionTable').html(result.TableCode);
accepted answer of: http://stackoverflow.com/q/26660964
answers question: http://stackoverflow.com/q/26660964
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41844580
comment on: http://stackoverflow.com/a/26612788
score: 0
type: AnswerComment
has text: Thank you dfsq. But here comes another question.. What if we are using colspan or rowspan? in that case the scenario would change completly. Any suggestion? bdw. ur code is really efficient.
type: Comment

http://stackoverflow.com/a/26543990
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26543645
has comment: http://stackoverflow.com/comment/41711739
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26543645
type: Answer
has body: Your first problem is that the slide element does not have a current value for left, so even parsing it will return NaN and not work. You can parseInt the current value (50px parses to 50), but default it to 0 using ||, then +/- 50. When you set the value you also need to say which units it is in, in your case 'px'. You could cache the value in a variable as some people have suggested, but I don't really see the need. Parsing it each time is quick enough, ensures the function does what it is meant to each time and you don't run the risk of the stored value getting out of sync. function prev() { var val = (parseInt(document.getElementById('slide').style.left, 10) || 0) - 50; document.getElementById('slide').style.left = val + 'px'; } function nxt() { var val = (parseInt(document.getElementById('slide').style.left, 10) || 0) + 50; document.getElementById('slide').style.left = val + 'px'; } Fiddle here
score: 3

http://stackoverflow.com/comment/41913573
type: Comment
score: 0
has text: It works great, i did little modification so the option values are now numbers.
comment on: http://stackoverflow.com/a/26602806
type: AnswerComment

http://stackoverflow.com/q/26658210
score: 1
has answer: http://stackoverflow.com/a/26659188
type: Question
has comment: http://stackoverflow.com/comment/41918716
tagged with: javascript
has body: i have a function to get the co-ordinates of the recently clicked position with respect to a div element without using JQuery which is working fine . without jquery (working) : var Board = document.getElementById("board"); // div element function mouseListener(e) { var posX = e.clientX - Board.getBoundingClientRect().left, posY = e.clientY - Board.getBoundingClientRect().top console.log(posX+" : "+posY); } window.addEventListener("mousedown", mouseListener,false); But this one uses JQuery and giving different co-ordinates as compared to the previous code using jquery(not working) : var Board = $("#board"); function mouseListener(e) { var posX = e.clientX - Number(Board.css("left").replace("px", "")), posY = e.clientY - Number(Board.css("top").replace("px", "")); console.log(posX+" : "+posY); } $(window).mousedown(mouseListener); How to write this properly on jQuery so that it'll work like the first code?
answer count: 2
accepted answer: http://stackoverflow.com/a/26660196
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26660196
has title: Getting currently clicked co-ordinates relative to an element
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26659188
downvote count: 0

http://stackoverflow.com/a/63558244
answers question: http://stackoverflow.com/q/26544865
score: 1
has body: Pay attention to your layers and their source, my mistake is that i should set: layer.getSource().getSource().getFeatures() instead of: layer.getSource().getFeatures()
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/26659839
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26659362
upvote count: 2
score: 2
has body: You can create another field (ex. PreviousScoreValue) that will have the previous score using beforeChange subscription: self.PreviousScoreValue = ko.observable(self.ScoreValue()); self.ScoreValue.subscribe(function(value) { self.PreviousScoreValue(value); }, null, 'beforeChange'); Then in the custom binding, use it to compare to new ScoreValue: init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var myscorevalue = valueAccessor(); var previousvalue = bindingContext.$data.PreviousScoreValue(); if (myscorevalue) { if(myscorevalue &lt; previousvalue) { $("#divarrow").hide(); } else if(myscorevalue &gt; previousvalue) { $("#divarrow").show(); } } },

http://stackoverflow.com/q/26615991
score: 1
tagged with: feed
has comment: http://stackoverflow.com/comment/41992940
type: Question
has title: Getting Images from an iTunes Podcast XML feed
tagged with: javascript
answer count: 1
linked to: http://stackoverflow.com/q/20035101
downvote count: 0
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
tagged with: appcelerator
has answer: http://stackoverflow.com/a/28037186
tagged with: rss
type: UnansweredQuestion
upvote count: 1
has body: I'm just finalising an iOS app made in Appcelerator at the moment and need it to pull in images from an iTunes podcast XML feed. This is the part I need to extract. &lt;media:content url="http://linktomyimage.com/image.jpg" medium="image"&gt; &lt;media:title type="html"&gt;Media Title Example&lt;/media:title&gt; &lt;/media:content&gt; I need to get the "url" from the media:content node. This is what I'm trying to use, but it doesn't work (podcastImage is my variable). var doc = this.responseXML.documentElement; var items = doc.getElementsByTagName("item"); var x = 0; var doctitle = doc.evaluate("//channel/title/text()").item(0).nodeValue; for (var c = 0; c &lt; items.length; c++) { var item = items.item(c); var podcasts = item.getElementsByTagName("title"); if (podcasts &amp;&amp; podcasts.length &gt; 0) { var media = podcasts.item(0).getAttribute("url"); var title = item.getElementsByTagName("title").item(0).text; var description = item.getElementsByTagName("content:encoded").item(0).text; var podcastURL = item.getElementsByTagName("enclosure").item(0).getAttribute("url"); var publishDate = item.getElementsByTagName("pubDate").item(0).text; var podcastImage = item.getElementsByTagName("media:content").item(0).getAttribute("url"); Any ideas? Simon

http://stackoverflow.com/comment/41893780
comment on: http://stackoverflow.com/q/26642247
score: 0
has text: yes it is , thank you Mathletics.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41953582
has text: Don't use flexbox. http://caniuse.com/#search=flexbox
type: Comment
comment on: http://stackoverflow.com/q/26664808
score: 0
type: QuestionComment

http://stackoverflow.com/q/26627288
favorite count: 0
type: UnansweredQuestion
has title: ASP MVC binding two controls to one field
has answer: http://stackoverflow.com/a/26627677
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/54424723
tagged with: asp.net-mvc
score: 1
tagged with: javascript
answer count: 2
has body: In my view model I have a field. This field can be selected from a drop down list or entered in a textbox. I have two radio buttons which allows to select between drop and textbox. &lt;div class="frm_row" id="contractorRow"&gt; @Html.RadioButton("IsContractorNew", "false", true) @Html.Label(@Resources.SomeLabels.Existing) @Html.RadioButton("IsContractorNew", "true", false) @Html.Label(@Resources.SomeLabels.New) &lt;div class="frm_row_input" id="contractorDropDownList"&gt; @Html.DropDownListFor(model =&gt; model.CONTRACTOR, Model.Contractors) @Html.ValidationMessageFor(model =&gt; model.CONTRACTOR) &lt;/div&gt; &lt;div class="frm_row_input" id="contractorTextBox" style="display: none;"&gt; @Html.TextBoxFor(model =&gt; model.CONTRACTOR) @Html.ValidationMessageFor(model =&gt; model.CONTRACTOR) &lt;/div&gt; &lt;/div&gt; I prepared a javascript code for hiding, showing and clearing controls while selecting radio buttons. The problem is - field is bound only to the first control (drop down list). EDIT: I solved this problem by creating one hidden field and scripting whole logic to bind active control with it and therefore with the model. Anyway if anyone knows simpler solution, please post it.
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/41858171
has text: How can we do it in Javascript? Please provide example, say for instance if I need to access node_title from the two objects.
comment on: http://stackoverflow.com/a/26624075
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26557483
has comment: http://stackoverflow.com/comment/41736523
has comment: http://stackoverflow.com/comment/41736486
accepted answer of: http://stackoverflow.com/q/26556762
upvote count: 1
answers question: http://stackoverflow.com/q/26556762
has body: This seems like an abuse of the language, but you can return arbitrarily named objects by doing something like this: function createANamespace(nameProvided) { return { constructor: {name: nameProvided} }; } I only tried this on chrome, so ymmv. Edit: Or, if you really want to abuse the language: function createANamespace(name) { return new Function('return new (function '+ name + '(){} )') }
type: Answer
downvote count: 0
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26570519
tagged with: jquery
duplicate of: http://stackoverflow.com/q/5503900
has answer: http://stackoverflow.com/a/26570563
type: Question
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 0
answer count: 2
has body: var json = $.parseJSON(data); var serializedMyObj = JSON.stringify(json); console.log(serializedMyObj); I displayed the json object in console shown below . NOW i want to sort it by Price . [{ "name": "HTC 816", "Manufacture": "htc", "price": "45.00", "url": "images/products/htc-desire-816-400x400.jpeg", "productId": "543J423" }, { "name": "HTC 616", "Manufacture": "htc", "price": "55.00", "url": "images/products/htc-desire-616.jpeg", "productId": "543J424" }, { "name": "HTC 716", "Manufacture": "htc", "price": "32.00", "url": "img/list grid.png", "productId": "543J425" }, { "name": "HTC 416", "Manufacture": "htc", "price": "70.00", "url": "img/list grid.png", "productId": "543J426" }, { "name": "HTC 316", "Manufacture": "htc", "price": "99.00", "url": "", "productId": "543J427" }, { "name": "HTC 216", "Manufacture": "htc", "price": "45.00", "url": "", "productId": "543J428" }, { "name": "HTC ONE", "Manufacture": "htc", "price": "25.00", "url": "images/products/htc-one-v.jpeg", "productId": "543J429" }, { "name": "HTC EYE", "Manufacture": "htc", "price": "60.00", "url": "", "productId": "543J430" }, { "name": "HTC DESIRE", "Manufacture": "htc", "price": "102.00", "url": "", "productId": "543J431" }]
upvote count: 1
downvote count: 1
has title: sorting json object data
has answer: http://stackoverflow.com/a/26570569
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/5503900
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/27692016
type: Answer
has comment: http://stackoverflow.com/comment/91848311
has comment: http://stackoverflow.com/comment/43866944
score: 17
upvote count: 17
has body: So, RSelenium is not the only answer (anymore). If you can install the PhantomJS binary (grab phantomjs binaries from here: http://phantomjs.org/) then you can use it to render the HTML and scrape it with rvest (similar to the RSelenium approach but doesn't require java): library(rvest) # render HTML from the site with phantomjs url &lt;- "http://www.scoreboard.com/game/rosol-l-goffin-d-2014/8drhX07d/#game-summary" writeLines(sprintf("var page = require('webpage').create(); page.open('%s', function () { console.log(page.content); //page source phantom.exit(); });", url), con="scrape.js") system("phantomjs scrape.js &gt; scrape.html", intern = T) # extract the content you need pg &lt;- html("scrape.html") pg %&gt;% html_nodes("#utime") %&gt;% html_text() ## [1] "10:20 AM, October 28, 2014"
accepted answer of: http://stackoverflow.com/q/26631511
has comment: http://stackoverflow.com/comment/85390443
answers question: http://stackoverflow.com/q/26631511
has comment: http://stackoverflow.com/comment/85453562
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/85453620

http://stackoverflow.com/a/26664879
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26664848
has comment: http://stackoverflow.com/comment/41931684
accepted answer of: http://stackoverflow.com/q/26664848
has comment: http://stackoverflow.com/comment/41932678
has body: Simply use request.remote_ip from within your controller action. Remember one thing, people behind a NAT are having the same IP, however they can even do not know each other but still, they're using the same IP address. Consider adding something more than just IP address, e.g. system name, browser name etc.
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41701535
score: 0
type: Comment
has text: No, it is available when you use --engine=phantomjs and --engine=slimerjs. So in both.
type: AnswerComment
comment on: http://stackoverflow.com/a/26537876

http://stackoverflow.com/comment/41845210
has text: Great, good you got it working
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26616525

http://stackoverflow.com/q/26622361
has comment: http://stackoverflow.com/comment/41855637
has comment: http://stackoverflow.com/comment/41855142
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41855190
has comment: http://stackoverflow.com/comment/41855284
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41855171
has body: I pretty new at JavaScript & JQuery, more knowledgeable at html & css but I have something I've been working on for days and banging my head to the desk and can't figure it out. Maybe someone could help me, any hint, suggestion would be greatly appreciated!! I have the following HTML: Close View Projects with the following JavaScript and JQuery: function myFunction() { document.getElementById("projectstxt").innerHTML = 'some text some text some text'; document.getElementById("projectstxt").style.borderBottom = "thin solid #000" ; document.getElementById("projectstxt").style.display = "block"; document.getElementById("projectstxt").style.paddingBottom ="10px"; document.getElementById("projectsimg").style.padding = "100px" ; document.getElementById("projectsimg").style.background = "url('../Assets/img/services/image1.png')" ; document.getElementById("projectsimg").style.backgroundRepeat = "no-repeat"; document.getElementById("projectsimg").style.backgroundSize = "20%"; document.getElementById("projectsimg").style.display = "block"; document.getElementById("projectsimg").style.transition = "all 0.5s ease-in-out"; document.getElementById("projectsimg").style.backgroundOrigin = "border-box"; document.getElementById("projectsimg").style.marginTop = "5%"; ;} function myFunction2() { document.getElementById("projectstxt").style.display = "none"; document.getElementById("projectsimg").style.display = "none"; ;} $(document).ready(function() { $(".viewprojects").click(function(){ $("#projects").animate({ height:"300px" }); }); $(".viewprojectsclose").click(function(){ $("#projects").animate({ height:"80px" }); }); }); Basically we have 2 buttons(OPEN and CLOSE). First opens the image and text DIV and 2nd one closes. What I'm trying to do is add another button below the image(within the div) that will redirect you to a specific page. I can add a regular button in the image DIV in HTML but when it loads the page that button appears on it by default though it should appear only w…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41855409
has comment: http://stackoverflow.com/comment/41855364
has comment: http://stackoverflow.com/comment/41855472
tagged with: innerhtml
type: Question
has answer: http://stackoverflow.com/a/26622769
has comment: http://stackoverflow.com/comment/41855085
has title: How can I add a button within an innerHTML section of a HTML div?
accepted answer: http://stackoverflow.com/a/26622769
has comment: http://stackoverflow.com/comment/41855074
has comment: http://stackoverflow.com/comment/41855443
has comment: http://stackoverflow.com/comment/41855589
tagged with: javascript

http://stackoverflow.com/comment/41853125
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26621285
score: 1
has text: Float didn't work when I spanned multiple columns.

http://stackoverflow.com/q/26572564
tagged with: jquery
tagged with: date
has body: I'm trying to get the current midnight date with Javascript and I use this: var mydate = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 0, 0, 0); I receive this: Sun Oct 26 2014 00:00:00 GMT+0100 (BST) The problem is, that it's not British Summer Time anymore, but for some reason javascript still thinks it is. This is messing up my entire application, as I convert this into a timestamp like this: mydate = Math.round(to_day.getTime() / 1000); How can I change this?
score: 2
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26572623
has comment: http://stackoverflow.com/comment/41763169
type: UnansweredQuestion
has title: How to force correct timezone for Javascript New Date()?
tagged with: datetime
has comment: http://stackoverflow.com/comment/41763246
upvote count: 2
has comment: http://stackoverflow.com/comment/41763369
type: Question
tagged with: javascript

http://stackoverflow.com/q/26586082
answer count: 4
favorite count: 0
type: UnansweredQuestion
score: 0
upvote count: 1
downvote count: 1
has title: Join strings with a separator, ignoring empty strings
has answer: http://stackoverflow.com/a/26586215
has answer: http://stackoverflow.com/a/26586167
type: Question
has answer: http://stackoverflow.com/a/26586281
has body: I am trying to form a variable. If it is not null or empty or undefined I don't want to append the @ symbol to it: var T1 = 'Popcorn' var T2 = 'Icecreams' var T3 = ''; var T4 = ''; if(T1!=''||T2!=''||T3!=''||T4!='') reqstr = T1+'@'+T2+'@'+T3+'@'+T4; alert(reqstr); Right now the output is: Popcorn@Icecreams@@ If the variable is empty I don't want to append @, meaning I require only: Popcorn@Icecreams Fiddle.
tagged with: javascript
has answer: http://stackoverflow.com/a/26586303

http://stackoverflow.com/comment/41667061
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26515671
has text: Ok, I just wrote the entire `recurse` function. As you can see we can prepare the calls that we want to perform in parallel before we issue `async.parallel`. The other catch here is that you have to use `bind` (with first argument `null`; that was in the link that I mentioned above), and then pass the parameters of the `get` functions that will be executed in parallel. The names that I had in my link were there because I tend to like giving names for a few such parallel calls. But you can perfectly well pass an array of functions and end of story. Anyway, I have a morning flight.
score: 0

http://stackoverflow.com/comment/41863538
type: AnswerComment
type: Comment
has text: Let's say you press the first div and then you press the second div. As you can see, the second div is covering the first div when both are "toggled" down. The first div should have z-index: 100, the second one should have a z-index: 99... and so on.
comment on: http://stackoverflow.com/a/26627030
score: 0

http://stackoverflow.com/q/26541428
answer count: 4
has title: Simple 'for' loop to create divs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26541444
type: Question
has answer: http://stackoverflow.com/a/26541468
has body: Why am I getting an 'undefined' at the top? http://jsfiddle.net/oybz69xy/1/ var tiles; function populateTiles(limit) { for (var i=0; i< limit; i++) { tiles += " Tile "; } } populateTiles(4); $('#container').html(tiles);
tagged with: javascript
has answer: http://stackoverflow.com/a/26541505
has answer: http://stackoverflow.com/a/26541452
score: 0

http://stackoverflow.com/q/26659791
has body: So this is the 3rd time I've wiped everything clean from my repo and started from scratch because of this issue.. I am not familiar with js or jquery so a lot of this is over my head, just hoping to make it functional. I copied the theme from bootstrap and it was working fine at first.. I added the "reportcard.js" feature and the nav-collapse menu stopped working. Here is my github addy - https://github.com/twotimes22/twotimes22.github.io Site is live at www.thomasweld.com Here is my code up through the Nav Thomas Weld | Developer + Marketer <!--[if lt IE 9]> <![endif]--> <!--[if lt IE 9]> <![endif]--> Toggle navigation Bootstrap theme Home About Contact Dropdown Action Another action Something else here Nav header Separated link One more separated link
accepted answer: http://stackoverflow.com/a/26659893
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26659893
has title: Navbar-collapse not working - Bootstrap + Github
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41923142
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/41759948
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26570706
has text: Hi there. That I have thought of, but the thing is I cannot do that. I use routing to route to different page, there for I cannot bind the data to the root-est controller, because the data needs to be changed each time a new view is loaded. I used `<ng-view>` inside the UsernameController.
score: 0

http://stackoverflow.com/comment/41930605
type: QuestionComment
has text: Yeah, but even if you don't click multiple times before previous animation it is still all messed up by 8px every time.
score: 0
comment on: http://stackoverflow.com/q/26663969
type: Comment

http://stackoverflow.com/comment/41788579
type: AnswerComment
comment on: http://stackoverflow.com/a/26586612
has text: That works perfectly cheers :) Can't believe i didn't think of trying that!
type: Comment
score: 0

http://stackoverflow.com/comment/41878974
type: Comment
score: 0
type: AnswerComment
has text: @CharlieKilian `parseInt` is usually not a good idea (especially without a radix parameter), because it strips trailing non-digits, allowing a user to type in a number and then any characters (assuming it comes from user input), but the calculation still magically working. Even if expecting an integer, why not use `+` (or `Number()`) consistently and get consistent results?
comment on: http://stackoverflow.com/a/26635698

http://stackoverflow.com/a/26607604
type: Answer
answers question: http://stackoverflow.com/q/26607485
has comment: http://stackoverflow.com/comment/41827747
has comment: http://stackoverflow.com/comment/41827739
has comment: http://stackoverflow.com/comment/41828332
has body: 1000000 and 1.0e6 is identically notation in javascript. Function parseInt(string[, radix]) simply convert string to number by radix. For back convert number to string you can use intValue.toString(radix)
has comment: http://stackoverflow.com/comment/41829892
has comment: http://stackoverflow.com/comment/41828007
has comment: http://stackoverflow.com/comment/41829260
has comment: http://stackoverflow.com/comment/41828155
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26607485

http://stackoverflow.com/q/26623911
has body: I am implementing an arabic site in which I want the url to be generated in arabic Fro eg:-program/يه تشامبيونز ليغ - مباشر I have implemented the same for english in angularjs and ruby.SO the url is generating for english language On click event I am calling a filter and the filter is helping me to deal with special characters. The following is the code I have implemented in the filter:- woi.filter('encodeUrl',['$routeParams','$rootScope',function($routeParams,$rootScope){ return function(value){ if(value != undefined) { return value.replace(/\$\#\*\!/g, 'CeNc').replace(/\"/g, 'DqO').replace(/\+/g, 'PLus').replace(/\[/g, 'ObR').replace(/\]/g, 'CbR').replace(/\@/g, 'AtR').replace(/\&amp;/g, 'EmPe').replace(/\#/g, 'HaSh').replace(/\*/g, 'StAr').replace(/\$/g, "DoLr").replace(/\-/g, "~").replace(/\s/g, "-").replace(/\//g, "$").replace(/\?/g, '*').replace(/\%/g, 'PeRc'); } else { return "" } } }]); But when I am trying to implement for arabic url it is giving me a strange output:- For eg for programs I am getting- www.example.com/#!/program/%D8%A8%D9%8A%D8%BA-%D8%A8%D9%88%D8%B3 So what should I do to generate the output ie url in arabic.Is there anything I can do to implement it in the filter
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: ruby-on-rails
score: 3
has answer: http://stackoverflow.com/a/32175238
downvote count: 0
tagged with: character-encoding
type: Question
has answer: http://stackoverflow.com/a/34378599
tagged with: javascript
has answer: http://stackoverflow.com/a/29992953
has title: Angularjs:-How to generate arabic url in angularjs
linked to: http://stackoverflow.com/q/23223718
upvote count: 3
tagged with: filter
answer count: 3

http://stackoverflow.com/q/26641426
answer count: 0
has comment: http://stackoverflow.com/comment/41889866
tagged with: google-chrome
type: Question
linked to: http://stackoverflow.com/q/14613403
tagged with: javascript
has title: Chrome.storage not performing as expected
score: 0
has body: I tried to implement the solution to the previous question here:chrome.storage set\get clarification Does this answer still work? Because I used the example given (and have tried the others knocking about, but none seem to work for me. The code in question is: chrome.storage.sync.set({'value': 12}, function() { chrome.storage.sync.get("value", function(data) { console.log("data", data); }); }); and I have the permissions in the Manifest, but the result is: data Object {} Thanks!
tagged with: google-chrome-app
has comment: http://stackoverflow.com/comment/42001557
type: UnansweredQuestion

http://stackoverflow.com/comment/41906378
type: AnswerComment
type: Comment
has text: with your solution add item and autocompete does not work. Could you please update your answer with complete code?
score: 0
comment on: http://stackoverflow.com/a/26650932

http://stackoverflow.com/comment/41936093
type: Comment
has text: Thank you this is the kind of help I was looking for! Just something to give me an example of something similar, not a line for line solve my own problem for me. This is much appreciated.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26667327

http://stackoverflow.com/a/26598973
answers question: http://stackoverflow.com/q/26598646
type: Answer
downvote count: 0
score: 1
has body: So when you try to execute s.match(regex), the object returned is an array of two String values. The first element is your s variable if it contains your regex value. The second element is the text that's been appended to your regex value. If your s value doesn't contain your regex at all, then s.match(regex) will return null. May I suggest you set up your code like this? -> s = "benisasillyhehehe"; regex = /benisasilly(.*)/; var match = s.match(regex); if(match) console.log(match[1] == "" ? null : match[1]); else console.log(null);
upvote count: 1
has comment: http://stackoverflow.com/comment/41812409

http://stackoverflow.com/q/26581669
answer count: 2
accepted answer: http://stackoverflow.com/a/26581918
tagged with: javascript
has comment: http://stackoverflow.com/comment/41779823
tagged with: jquery
has body: I have a jQuery Click Event that recently stopped working! It;s a really big project with hundreds of files so I could of easily changed it this past week and not realized it now that I see it is a problem. Below is the most basic example if the Click Event in question. Now I could of easily had it using document or body as the very 1st item last week and then I changed it to target an ID that is closer to the actual target for my click event. It seems like I was trying to improve that performance after reading that I should use an ID that is closer to the item that needs the click event instead of using document or body. With that in mind, I think in the past couple weeks I probably switched this out with this ID of #taskWrap to replace something like document. In either case if I did or didn't, a few days to a week ago it was working fine and now the click event does not trigger anything when the items are clicked on. I set up an alert() for testing it and nothing happens anymore. Now to further test, I changed my #taskWrap back to document and the click event immediately strated working again! So that does seem to be the issue. Below is the code that I have now that does not work! Below that is an image from Chrome Dev Tools that shows a little bit of the DOM structure for the area I am working with. I am hoping someone can show me what I did wrong when trying to target my item using an ID that is closer to the target than document and body are? $('#taskWrap').on('click', '#taskWrap .status_update', function(e) { alert('.status_update class checkbox task item clicked!'); }); I have also tried this with the same result, the click event does not happen... $('#taskWrap').on('click', '.status_update', function(e) { alert('.status_update class checkbox task item clicked!'); }); This DOES Work but I am trying to better optimize by not having to use document or body $('document').on('click', '.status_update', function(e) { alert('.status_update class checkbox task item …
has comment: http://stackoverflow.com/comment/41779931
has title: Click event using the on() function in jQuery is not working when I target an event with an ID in replace of DOCUMENT or BODY
score: 0
possible better answer: http://stackoverflow.com/a/26581951
has answer: http://stackoverflow.com/a/26581951
has comment: http://stackoverflow.com/comment/41779967
has answer: http://stackoverflow.com/a/26581918
has comment: http://stackoverflow.com/comment/41779906
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41779800
has comment: http://stackoverflow.com/comment/41780159
has comment: http://stackoverflow.com/comment/41779765
has comment: http://stackoverflow.com/comment/41780026
type: Question

http://stackoverflow.com/q/26541400
has answer: http://stackoverflow.com/a/26546124
accepted answer: http://stackoverflow.com/a/26546124
type: Question
tagged with: reactjs
tagged with: javascript
score: 0
answer count: 1
has title: Can you dynamically get parent component classname in ReactJs
has body: Is it possible for a reactjs child component to dynamically determine the class of its parent component? I have a component that can be rendered inside a handful of different components, and I want it to act differently depending on which parent it is. Is it possible to do this without passing in a flag to the child component?
type: AnsweredQuestion

http://stackoverflow.com/comment/41878934
comment on: http://stackoverflow.com/q/26635756
type: Comment
has text: Typo? function ApplicationController($scope, Username) should be function ApplicationController($scope, UserService){
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41706551
type: QuestionComment
comment on: http://stackoverflow.com/q/26540842
has text: it is because the form submission is not done by the button click(that action is prevented by calling `preventDefaul()`), instead a programtic form submission which is unaware about the button that is clicked
score: 0
type: Comment

http://stackoverflow.com/comment/41864938
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26627030
has text: Sort of, you can write one yourself, I've done it. Here's an early draft of one I had lying around. The animations aren't done and it could use some tidying up but it has the basic functionality. - http://codepen.io/Paulie-D/pen/mhwfg
type: AnswerComment

http://stackoverflow.com/comment/41893805
comment on: http://stackoverflow.com/a/26636660
type: AnswerComment
has text: I'm sure I'm using $resource incorrectly, but I'm basing its use on a book and internet resources, so if the answer is out there I'm striking out.
type: Comment
score: 0

http://stackoverflow.com/q/26568140
has comment: http://stackoverflow.com/comment/41755970
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/74029299
has title: Unwanted output from JavaScript Coderbyte
has comment: http://stackoverflow.com/comment/41755541
type: Question
has answer: http://stackoverflow.com/a/45613939
answer count: 2
has comment: http://stackoverflow.com/comment/41755813
tagged with: javascript
has body: Hi guys I am working on the following CoderByte problem. Using the JavaScript language, have the function PermutationStep(num) take the num parameter being passed and return the next number greater than num using the same digits. For example: if num is 123 return 132, if it's 12453 return 12534. If a number has no greater permutations, return -1 (ie. 999). Use the Parameter Testing feature in the box below to test your code with different arguments. My code is var PermutationStep = function(num){ var newNum = num.toString().split(""); for(var i = (newNum.length - 1); i &gt;= 0; i--){ if(newNum[i] &gt; newNum[i-1]){ newNum.splice(i-1,2,newNum[i],newNum[i-1]); var firstHalf = newNum.slice(0,i); var secondHalf = newNum.slice(i); break; } else{ return -1; } } var sorted = secondHalf.sort(function(a,b){return a - b}); return firstHalf.concat(sorted).join(""); }; My code consists of looping through an array of the number and switching the terms newNum[i-1] and newNum[i] when newNum[i] > newNum[i - 1] and then taking all numbers to the right of these two terms and sorting them. Logically this works, but my code is not behaving the way I would like it to. For example PermutationStep(112211) returns -1 when it should be returning 121112. Can anyone help me debug this?
score: 0
has comment: http://stackoverflow.com/comment/41755774

http://stackoverflow.com/comment/41758988
has text: well, I convert it to "label". It is form element right? But still it doesn't work. Here is the html code; Sipariş Listesi
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26567796
type: QuestionComment

http://stackoverflow.com/comment/41829310
type: Comment
type: QuestionComment
has text: @Tom - am looking for `onclick="deleteDocument(this, 'Document Draft.png')">`
score: 0
comment on: http://stackoverflow.com/q/26608526

http://stackoverflow.com/comment/41884203
has text: Is it possible to chain the promises without explicitly managing a `$q.defer()` object?
comment on: http://stackoverflow.com/q/26638507
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41723100
comment on: http://stackoverflow.com/q/26550397
score: 0
type: Comment
type: QuestionComment
has text: By database you mean... object?

http://stackoverflow.com/q/26606916
has comment: http://stackoverflow.com/comment/41829970
has answer: http://stackoverflow.com/a/26607421
score: 0
tagged with: flash
answer count: 1
has comment: http://stackoverflow.com/comment/41826591
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: embed
type: Question
has body: When loading initially there is a border, but then it disappears soon after (almost instantaneously). I am using the embed tag. It only appears to be happening for iexplorer9-11 (oddly no problem with ie8 or other browsers). I just need to hide the border when it first loads.
has title: Embed flash object loads with border but then border dissapears
tagged with: javascript
has comment: http://stackoverflow.com/comment/41826134

http://stackoverflow.com/q/26528989
score: 2
has answer: http://stackoverflow.com/a/26529494
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41685188
type: Question
tagged with: javascript
upvote count: 2
has body: I'm trying to create a simple content slider that could handle dynamically added content to the slider. None of the "lightweight" plugins I found provided such functionality or, if it did, it didn't work correctly. var $left = $('.left'), $right = $('.right'), $months = $('.sub ul'); $left.click(function(){ for(i = 0; i < 3; i++){ $months.find('li').first().before($.parseHTML(' xxx ')); } pos = $months.position(); $months.css('left', pos.left + 90); }); $right.click(function(){ for(i = 0; i < 3; i++){ $months.find('li').last().after($.parseHTML(' xxx ')); } pos = $months.position(); $months.css('left', pos.left - 90); }); This is the code I've got so far and here's a fiddle with an example - http://jsfiddle.net/kkr4zg0r/2/. It kind of works, but the problem is that since new content is added the navigation goes off (you can see what I mean by clicking left-right a couple of times). I understand what's the problem for this - the newly added items "shift" the content and I need to do better calculations than substracting/adding 90px to the left position of the element but I can't figure out how to get the correct index of the elements and basically get this sliding by exactly (and correctly) by 3(or 6) elements at the time. Currently the code is adding extra elements whenever a navigation button is pressed, if I could get the index of the currently visible first/last element, I could probably tell whether I need to add more elements and only add them then. This is a basic illustration of what I'm trying to achieve edit I've changed the jsfiddle to the correct one.
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41686250
favorite count: 0
has comment: http://stackoverflow.com/comment/41685024
accepted answer: http://stackoverflow.com/a/26529494
tagged with: slider
has title: Slide dynamically added content with jQuery

http://stackoverflow.com/a/26589714
has body: Trying to interpretate your question, this may be a solution to what you are looking for: function createNestedProperties(obj, array, value) { var result = {}; var result_tmp = obj; var i = 0; while (i &lt; array.length) { if (i &lt; (array.length - 1)) result_tmp[array[i]] = {}; else result_tmp[array[i]] = value; result_tmp = result_tmp[array[i]]; i++; } return obj; } used this way: var main_obj = {"value1":{"value2":{"value3":{}}}}; var dynamic_array = ["value1", "value2", "value3"]; main_obj = createNestedProperties(main_obj, dynamic_array, {"value_Z":"new value"}); Resulting object: {"value1":{"value2":{"value3":{"value_Z":"new value"}}}} This function would override existing properties in main_obj if already there.
score: 0
answers question: http://stackoverflow.com/q/26588996
type: Answer
has comment: http://stackoverflow.com/comment/41824197

http://stackoverflow.com/q/26669226
possible better answer: http://stackoverflow.com/a/26669279
answer count: 5
has body: Javascript do not have structures. So can i create a GLOBAL object like struct abc in javascript . Struct abc contains some variables &amp; array of another structure struct xyz. struct xyz { var age; var name; }; struct abc { var start; var end; var length; struct xyz xyz_array[100]; }; If structures is not possible in javascript how can i save data in this format ? ============================= Edit some solution i found ================= http://www.w3schools.com/js/js_object_definition.asp Javascript: How to create an array of object literals in a loop ============================================= var details = { Start: 0, End: 0, length: 0 }; var arr = []; var len = 100; for (var i = 0; i &lt; len; i++) { arr.push({ direction: "out", message : "" }); } ===================================== Array inside a Javascript Object? var details = { Start: 0, End: 0, length: 0 info_text : [] }; var len = 100; for (var i = 0; i &lt; len; i++) { details.info_text.push({ direction: "out", message : "" }); } =========================================
has answer: http://stackoverflow.com/a/26669361
has answer: http://stackoverflow.com/a/26669377
score: 2
type: AnsweredQuestion
has title: solution to create structure object in javascript
linked to: http://stackoverflow.com/q/1828924
linked to: http://stackoverflow.com/q/1290131
has comment: http://stackoverflow.com/comment/41939423
upvote count: 2
has comment: http://stackoverflow.com/comment/41939455
has comment: http://stackoverflow.com/comment/41939245
type: Question
has comment: http://stackoverflow.com/comment/41939230
has answer: http://stackoverflow.com/a/26669499
tagged with: javascript
has answer: http://stackoverflow.com/a/26669956
has answer: http://stackoverflow.com/a/26669279
downvote count: 0
accepted answer: http://stackoverflow.com/a/26669499
favorite count: 0

http://stackoverflow.com/comment/41835216
type: Comment
comment on: http://stackoverflow.com/q/26611566
type: QuestionComment
score: 1
has text: You're always mutating the same Array object. You need to make a copy if you want each result to hold a unique set of values. `slotRack.push(shuffle(items.slice())`

http://stackoverflow.com/q/26653336
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41910208
has answer: http://stackoverflow.com/a/26653915
has body: My parent container is to small to contain my child div. This is parent div. This is child div As you can see i get bad layout. Very similar example to my code is here : http://jsfiddle.net/buz72ck5/ Part of code : &lt;div class="space-container"&gt; &lt;div class="space-main-data"&gt; &lt;ul&gt; &lt;li&gt;sp1&lt;/li&gt; &lt;li&gt;59000&lt;/li&gt; &lt;li&gt;20000&lt;/li&gt; &lt;li&gt;&lt;/li&gt; &lt;li style="float: right"&gt; &lt;input type="hidden" value="355646" class="lease-space-id"&gt;&lt;span&gt;Available&lt;/span&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="additional-space-data-wrapper"&gt; &lt;div class="additional-space-data"&gt; &lt;dl class="ld-generalinfo-wrap ld-main-info"&gt; &lt;dt&gt;Date Available:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Term Range:&amp;nbsp;&lt;/dt&gt; &lt;dd&gt;&lt;strong&gt;1-30&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Lease Type:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Rental Rate Range:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Maximum Contiguous:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Dock High:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Minimum Divisible:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Drive In:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Office Space:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;Clear Height:&amp;nbsp;&lt;/dt&gt; &lt;dd class="unlisted-value"&gt;&lt;strong&gt;Unlisted&lt;/strong&gt;&lt;/dd&gt; &lt;dt&gt;&lt;/dt&gt; &lt;dd&gt;&lt;/d…
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26653915
has answer: http://stackoverflow.com/a/26653685
answer count: 2
upvote count: 1
has title: Make parent div contain all space of child div
tagged with: layout
tagged with: javascript
tagged with: containers
has comment: http://stackoverflow.com/comment/41910098
accepted answer: http://stackoverflow.com/a/26653685
has comment: http://stackoverflow.com/comment/41910319

http://stackoverflow.com/a/41302633
has body: try this $string = "'One','Two','Three','Four'"; xAxis: { categories: [&lt;?php echo $string; ?&gt;] , crosshair: true },
downvote count: 1
answers question: http://stackoverflow.com/q/26548404
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/a/56702353
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26586403
has body: In case someone reachs this and the image = image.replace(/^[^,]+,/, ''); solution doesn't work for them, I got the same error calling atob function in IE11. In my case, the error was caused because the base64 string had a carriage return each 76 characters. This wasn't a problem for Chrome or Firefox, but IE11 produced the InvalidCharacterError. b64Data = b64Data.replace(/\r\n/g, ''); solved my problem.
upvote count: 3
score: 3

http://stackoverflow.com/comment/41692406
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26532712
type: AnswerComment
has text: it just compares the two integers (hashes) which is way faster than char-per-char comparison ;). Of course in the ALU of your CPU an int comparison is not a single instruction but this is offtopic and we consider it O(1) or constant time

http://stackoverflow.com/comment/41666645
has text: Any suggestions to achieve the result that I am trying to get?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26517845

css
tags question: http://stackoverflow.com/q/26561673
tags question: http://stackoverflow.com/q/26654196
tags question: http://stackoverflow.com/q/26640478
tags question: http://stackoverflow.com/q/26577292
tags question: http://stackoverflow.com/q/26528371
tags question: http://stackoverflow.com/q/26590480
tags question: http://stackoverflow.com/q/26667444
tags question: http://stackoverflow.com/q/26621285
tags question: http://stackoverflow.com/q/26578027
tags question: http://stackoverflow.com/q/26613764
tags question: http://stackoverflow.com/q/26525471
tags question: http://stackoverflow.com/q/26516296
tags question: http://stackoverflow.com/q/26606995
tags question: http://stackoverflow.com/q/26552092
tags question: http://stackoverflow.com/q/26626042
tags question: http://stackoverflow.com/q/26517909
tags question: http://stackoverflow.com/q/26591100
tags question: http://stackoverflow.com/q/26642023
tags question: http://stackoverflow.com/q/26606528
tags question: http://stackoverflow.com/q/26521437
tags question: http://stackoverflow.com/q/26670048
tags question: http://stackoverflow.com/q/26538967
tags question: http://stackoverflow.com/q/26666783
tags question: http://stackoverflow.com/q/26535432
tags question: http://stackoverflow.com/q/26573871
tags question: http://stackoverflow.com/q/26640615
tags question: http://stackoverflow.com/q/26617113
tags question: http://stackoverflow.com/q/26561528
tags question: http://stackoverflow.com/q/26544067
tags question: http://stackoverflow.com/q/26588652
tags question: http://stackoverflow.com/q/26540894
tags question: http://stackoverflow.com/q/26558559
tags question: http://stackoverflow.com/q/26634107
tags question: http://stackoverflow.com/q/26666371
tags question: http://stackoverflow.com/q/26644490
tags question: http://stackoverflow.com/q/26542562
tags question: http://stackoverflow.com/q/26616479
tags question: http://stackoverflow.com/q/26580771
tags question: http://stackoverflow.com/q/26579598
tags question: http://stackoverflow.com/q/26561827
tags question: http://stackoverflow.com/q/26620504
tags question: http://stackoverflow.com/q/26633350
tags question: http://stackoverflow.com/q/26617516
tags question: http://stackoverflow.com/q/26645078
tags question: http://stackoverflow.com/q/26664032
tags question: http://stackoverflow.com/q/26604885
tags question: http://stackoverflow.com/q/26562178
tags question: http://stackoverflow.com/q/26555825
tags question: http://stackoverflow.com/q/26540227
tags question: http://stackoverflow.com/q/26534619
tags question: http://stackoverflow.com/q/26540994
tags question: http://stackoverflow.com/q/26582019
tags question: http://stackoverflow.com/q/26634675
tags question: http://stackoverflow.com/q/26536757
tags question: http://stackoverflow.com/q/26659773
tags question: http://stackoverflow.com/q/26640695
tags question: http://stackoverflow.com/q/26590725
tags question: http://stackoverflow.com/q/26556700
tags question: http://stackoverflow.com/q/26641574
tags question: http://stackoverflow.com/q/26665312
tags question: http://stackoverflow.com/q/26639925
tags question: http://stackoverflow.com/q/26518301
tags question: http://stackoverflow.com/q/26594456
tags question: http://stackoverflow.com/q/26579438
tags question: http://stackoverflow.com/q/26671899
tags question: http://stackoverflow.com/q/26557672
tags question: http://stackoverflow.com/q/26545012
tags question: http://stackoverflow.com/q/26577002
tags question: http://stackoverflow.com/q/26613438
tags question: http://stackoverflow.com/q/26518465
tags question: http://stackoverflow.com/q/26515386
tags question: http://stackoverflow.com/q/26624194
tags question: http://stackoverflow.com/q/26624985
tags question: http://stackoverflow.com/q/26607013
tags question: http://stackoverflow.com/q/26578770
tags question: http://stackoverflow.com/q/26630294
tags question: http://stackoverflow.com/q/26671856
tags question: http://stackoverflow.com/q/26515364
tags question: http://stackoverflow.com/q/26663074
tags question: http://stackoverflow.com/q/26558890

http://stackoverflow.com/comment/41907217
type: AnswerComment
comment on: http://stackoverflow.com/a/26651689
type: Comment
has text: As the elements are not dynamic, the use of `live` or `on` appears unnecessary to begin with (and certainly does not need a delegated event handler). You are not the only one confused here :)
score: 0

http://stackoverflow.com/a/26619426
score: 0
type: Answer
has body: Unless the vendor has a way to rewrite the flash for the chip that is enumerating the USB device you don't have a way to do this. Sometimes vendors provide ways to customize the devices, but not in end products usually, as this is something that should be done on their production line. The only other way I could see to distinguish is by plugging them in to a specific serial port and finding the device that way.
accepted answer of: http://stackoverflow.com/q/26584867
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26584867

http://stackoverflow.com/a/26530505
has body: You can simply add a class to tell when they have been used (this also means you can style them accordingly): http://jsfiddle.net/TrueBlueAussie/ej4mLoze/1/ $('.itemList').on('click', 'li:not(.used)', function () { $(this).addClass("used"); I changed the event handler to a delegated event handler so that the selection (i.e. not(.used)) will happen at event time (and not when the event is registered). Update based on comment: If you want to keep the tips, but not decrement the counter, you can simply test for the existence of a class when deciding to decrement: e.g. http://jsfiddle.net/TrueBlueAussie/ej4mLoze/3/ $('.itemList').on('click', 'li', function () { // check if has hints if (hintCounter &gt; 0) { if (!$(this).hasClass("used")) { hintCounter--; } $('.xHints').html(hintCounter + ' Hints'); } else { // else show the message out of hints $('.directions').html('Sorry you are all&lt;br /&gt; out of hints. &lt;br /&gt;Keep Searching!'); } $(this).addClass("used"); });
has comment: http://stackoverflow.com/comment/41687453
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26530447
answers question: http://stackoverflow.com/q/26530447
has comment: http://stackoverflow.com/comment/41687498
has comment: http://stackoverflow.com/comment/41687802
score: 3
type: AcceptedAnswer
downvote count: 0

unit-testing
tags question: http://stackoverflow.com/q/26546362
tags question: http://stackoverflow.com/q/26638076
tags question: http://stackoverflow.com/q/26557261
tags question: http://stackoverflow.com/q/26591402
tags question: http://stackoverflow.com/q/26650204
tags question: http://stackoverflow.com/q/26565770
tags question: http://stackoverflow.com/q/26589328
type: Tag
tags question: http://stackoverflow.com/q/26539565
tag name: unit-testing
tags question: http://stackoverflow.com/q/26561866
tags question: http://stackoverflow.com/q/26612156
tags question: http://stackoverflow.com/q/26616277
tags question: http://stackoverflow.com/q/26656266
tags question: http://stackoverflow.com/q/26545294
tags question: http://stackoverflow.com/q/26591009

http://stackoverflow.com/comment/41716986
has text: Point taken, perhaps my wording made this more off topic than was intended. I am simply trying to find a way to get ActionScript to trigger an event based on JavaScript actions. Whether this be here is some **simple stupid example code** or a simple **you need to investigate ExternalInterface.getMeWhatINeed** - you get the idea.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26546294

http://stackoverflow.com/comment/41882967
score: 0
type: Comment
type: QuestionComment
has text: I am using bootstrap 3. In that case what should I replace the span with. I am completely stuck at the moment.
comment on: http://stackoverflow.com/q/26637728

http://stackoverflow.com/q/26555257
tagged with: javascript
tagged with: jquery
has body: I'm trying to recreate a sample Android app from Treehouse in javascript/jQuery that refreshes an h3 with a new fact every time the "Next Fact" button is pressed and it works but only for the next random fact, then it stops. So how do I get it to refresh with a new fact every time the button is pressed? Here's my js: $(document).ready(function(){ var facts = [ "Ants stretch when they wake up in the morning.", "Ostriches can run faster than horses.", "Olympic gold medals are actually made mostly of silver.", "You are born with 300 bones; by the time you are an adult you will have 206.", "It takes about 8 minutes for light from the Sun to reach Earth.", "Some bamboo plants can grow almost a meter in just one day.", "The state of Florida is bigger than England.", "Some penguins can leap 2-3 meters out of the water.", "On average, it takes 66 days to form a new habit.", "Mammoths still walked the earth when the Great Pyramid was being built." ]; var fact = facts[Math.round(Math.random() * (facts.length - 1))]; $("#button").click(function() { $("#anotherfact").empty(); $("#anotherfact").append(fact); //Fix me }); });
favorite count: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26555311
has title: Repeating the action of a function when a button is pressed
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26555283
has answer: http://stackoverflow.com/a/26555311
has answer: http://stackoverflow.com/a/26555283
has answer: http://stackoverflow.com/a/26555302
score: 0

http://stackoverflow.com/a/26572196
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41762474
has body: You can use e.type but remove the on prefix. function listener(e) { if(e.type.indexOf("key") !== 1) console.log("onkey" + (e.type == "keydown" ? "down" : "up")); else { console.log("unknown"); } }
downvote count: 0
answers question: http://stackoverflow.com/q/26572145
type: Answer
has comment: http://stackoverflow.com/comment/41762581

http://stackoverflow.com/comment/41831595
type: Comment
comment on: http://stackoverflow.com/q/26609823
has text: if you are using django then it can be done
score: 0
type: QuestionComment

http://stackoverflow.com/q/26617795
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30217080
has body: I'm trying to create valid tabular markup using AngularJS but cannot figure out how to do it. I have seen similar questions, but none that specifically meet my needs. I have some race result data stored in a structure as follows: { "date": "1900-01-01", "venue": "Venue", "results": { "10k": { "freestyle": { "male": [ "...a bunch of individual racer results" ], "female": [ "...a bunch of individual racer results" ] }, "classical": { "male": [ "...a bunch of individual racer results" ], "female": [ "...a bunch of individual racer results" ] } }, "5k": { "freestyle": { "male": [ "...a bunch of individual racer results" ], "female": [ "...a bunch of individual racer results" ] }, "classical": { "male": [ "...a bunch of individual racer results" ], "female": [ "...a bunch of individual racer results" ] } } } } So it's structured as: distance, style, gender, individual racer. I can render these results into individual tables as follows: &lt;div ng-show="race.results" ng-cloak&gt; &lt;div ng-repeat="(dist, styles) in race.results"&gt; &lt;div ng-repeat="(style, genders) in styles"&gt; &lt;div ng-repeat="(gender, finishers) in genders"&gt; &lt;table class="raceResultsTable"&gt; &lt;tr&gt; &lt;th class="raceEvent" colspan="6"&gt; &lt;h3 class="tableHeading" id="{{ dist|createKey }}_{{ style|createKey }}_{{ gender|createKey }}_results"&gt;{{ dist }} {{ style }} {{ gender }}&lt;/h3&gt; &lt;a href="#result_index" class="backToTop" title="Back to results index"&gt;&amp;#65514;&lt;/a&gt; &lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;&lt;strong&gt;Place&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Age&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Age Group&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Pace&lt;/strong&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr ng-repeat="racer in finishers | orderObjectBy:'place'"&gt; &lt;td&gt;#{{ racer.place }}&lt;/td&gt; &lt;td&gt;{{ …
has title: iterating over hierarchical data to create a flattened table view in AngularJS
upvote count: 2
type: Question
tagged with: javascript
tagged with: html-table
score: 2
answer count: 1
downvote count: 0
favorite count: 0
tagged with: iteration
tagged with: angularjs

http://stackoverflow.com/a/26628407
answers question: http://stackoverflow.com/q/26628088
score: 0
type: Answer
has body: file1.coffee: module.exports = (word)-&gt; console.log "file1"+word return true file2.coffee: module.exports = (word)-&gt; console.log "file2"+word return true main.coffee: function1fromfiles1 = require('./file1.coffee') function1fromfiles2 = require('./file2.coffee') exemple1 = function1fromfiles1("hello") exemple2 = function1fromfiles2("hello")

http://stackoverflow.com/q/26607762
score: 0
tagged with: cross-domain
has comment: http://stackoverflow.com/comment/41827753
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41827647
has comment: http://stackoverflow.com/comment/41830288
answer count: 0
has comment: http://stackoverflow.com/comment/41827882
type: Question
tagged with: internet-explorer-8
tagged with: activexobject
has title: cross domain request with ActiveXObject("Microsoft.XMLHTTP") in IE8
has body: I want to send request by using only ActiveXObject("Microsoft.XMLHTTP") from IE8, to Cross-Domain which allows cross domain request. var url = "127.0.0.1:9845"; xObj = new ActiveXObject("Microsoft.XMLHTTP"); if(xObj!=null) { xObj.open("GET", url,false); xObj.send(null); } but, it display "Permission denied" on xObj.open("GET", url,false); . anybody help me to resolve this problem?

http://stackoverflow.com/q/26669699
upvote count: 2
score: 2
type: AnsweredQuestion
has body: I am using this function to load Web Page in Chunks for reducing the page load time of the home page. This is working fine in chrome and UC browser.Only the issue is coming in safari browser. This is my code : if($(window).scrollTop() + $(window).height() == $(document).height()) //user scrolled to bottom of the page? { } when i am going to alert something inside the loop its also not working in iphone. Guide me where i am doing something wrong. Thanks.
type: Question
has title: jQuery scrollTop() doesn't work in Safari
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26669815
accepted answer: http://stackoverflow.com/a/26669815
favorite count: 0

handlebars.js
tags question: http://stackoverflow.com/q/26521310
tags question: http://stackoverflow.com/q/26643503
tags question: http://stackoverflow.com/q/26602438
tags question: http://stackoverflow.com/q/26658856
tags question: http://stackoverflow.com/q/26599105
tags question: http://stackoverflow.com/q/26529338
tags question: http://stackoverflow.com/q/26592105
tags question: http://stackoverflow.com/q/26612749
tags question: http://stackoverflow.com/q/26660361
tags question: http://stackoverflow.com/q/26589800
type: Tag
tags question: http://stackoverflow.com/q/26535325
tags question: http://stackoverflow.com/q/26522713
tag name: handlebars.js
tags question: http://stackoverflow.com/q/26613048
tags question: http://stackoverflow.com/q/26588989
tags question: http://stackoverflow.com/q/26642048

http://stackoverflow.com/a/26518383
has body: Who is calling that recp(id) function? I'd say nobody. If nobody is calling it, it won't run. If it won't run, it won't conduct the page load. You need to call that function from somewhere. Also, so far this seems to be more of a JavaScript/jQuery issue than a PHP one. If you'd like the form to be sent, you'll need to add an onsubmit handler. I'd suggest taking a look here and here.
score: 0
answers question: http://stackoverflow.com/q/26518327
type: Answer
has comment: http://stackoverflow.com/comment/41666352
has comment: http://stackoverflow.com/comment/41666440
has comment: http://stackoverflow.com/comment/41666371
has comment: http://stackoverflow.com/comment/41666392

http://stackoverflow.com/a/26558296
upvote count: 1
type: AcceptedAnswer
has body: I prefer wrapping 3rd party non-Angular applications into value objects (which is functionally the same as using a factory and immediately calling it prior to injection, which feels cleaner). var globalVariable = 1; function globalFunction(){ return "cats"; } var app = angular.module('plunker', []); app.value('external', globalFunction); app.controller('MainCtrl', ['$scope', 'external', function($scope, external) { $scope.name = 'World'; $scope.cats = external(); // Treat the dependency as a service to resolve into the scope } ]);
type: Answer
answers question: http://stackoverflow.com/q/26556867
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26556867
has comment: http://stackoverflow.com/comment/41801175

http://stackoverflow.com/q/26568651
score: 1
type: Question
tagged with: angularjs-directive
answer count: 1
tagged with: javascript
has title: AngularJS How to require ngForm at the same level as directive
has answer: http://stackoverflow.com/a/26568703
downvote count: 0
favorite count: 0
has body: I'm trying to require the ngForm associated to each iteration of ngRepeat within my directive. I've tried to use require: 'form' but it comes back as undefined, also tried '^form', but it gives the mainForm outside the ngRepeat. Is there a special way like require: 'ngForm' that will give me the controller of the ngForm on the first element of my form-view directive? Parent directive template outside of form-view directive ... // some other markup ... // some other markup // Vertically stacked tabs directive // Creates left/right cols, left=stacked tabs, right=form associated content using transclude // Pill pane content with title attribute passed up to pills during compile for stacked tabs // Generated form content for each pill pane ... // some other markup Form-view directive template // want reference to this controller using require <div ng-repeat="field in form.mapping.fields" ... // bunch of generated fields Form-view directive .directive('formView', [function() { return { restrict: 'E', templateUrl: '/app/components/form-view/formview.html', scope: { form: '=', model: '=' }, require: ['^tabs', '^pills', '^form'], // also tried 'form', '?form', 'ngForm', 'ngform' link: function( $scope, $element, $attrs, ctrls ) { $scope.tabsCtrl = ctrls[0]; // got tabs $scope.pillsCtrl = ctrls[1]; // got pills $scope.formCtrl = ctrls[2]; // always undefined or grabs mainForm } }; }]);
tagged with: angularjs
tagged with: angular-directive
upvote count: 1
accepted answer: http://stackoverflow.com/a/26568703
type: AnsweredQuestion

http://stackoverflow.com/q/26629845
type: Question
has body: I know this is a common question, but I am struggling with this! I'm creating the HTML from a PHP file, so every HTML and Javascript is being passed as a variable ($string). This is some of my code, where I need to pass the values of $objects_list to the javascript variable objects_list: $string = '&lt;script type="text/javascript"&gt; function open_project(id) { var objects_list = '. json_encode($objects_list) .'; console.log(objects_list.lenght); } &lt;/script&gt;'; Thing is, that console.log prints undefined. How can I solve this? If I remove the json_encode I get an error for converting array to string. EDIT: Just noticed, if I console.log(objects_list[5], by example, it prints the correct value so the problem is actually with the objects_list.lenght I guess.
has answer: http://stackoverflow.com/a/26629914
score: 0
accepted answer: http://stackoverflow.com/a/26629914
answer count: 1
tagged with: arrays
tagged with: javascript
tagged with: php
tagged with: undefined
type: AnsweredQuestion
has title: Pass PHP array to Javascript inside a string variable (HTML Injection)

http://stackoverflow.com/q/26636354
has body: I am using exactly the same JQuery/Ajax call for other forms which work fine, so I have absolutely no idea why this isnt working for my 3rd form on this page. Maybe you have an idea what this might be. I want to do a Ajax Request for a form which needs to be send. Here is my index.php which includes the form: Add new smurfs - PHP Loader Gifting accounts Full IP accounts Accounts (required) <textarea class="text required" name="accountData" id="accountData" placeholder="<?php echo $deintext="tenur2es67|Tbuvp928|EUW|54469c27c687b332339627\nkibbutzm65|K5ph88|EUW|54469ba0dec3e703865612"; ?>" style="height: 250px;"> Load Accounts Reset My JQuery / Ajax Request: $( "#addSmurfsbtn" ).click(function( event ) { event.preventDefault(); var form_data = $( "#test" ).triggerHandler( "submitForm" ); if ( form_data ) { $.ajax({ type: "POST", url: "includes/loadsmurfs.php", data: form_data, success: function( data ) { $('#addSmurfsResult').append(data).hide().slideDown("slow"); //alertify.alert("Done"); } }); } }); My loadsmurfs.php: <?php echo "test"; ?> When I tried to alert "form_data" it alerts "undefined" so I think the problem is something with assigning the form_data to my variable, but I can't find the mistake. I really hope you can help me, I am struggling with this for 2 hours now.
has comment: http://stackoverflow.com/comment/41880192
type: Question
has answer: http://stackoverflow.com/a/26636683
upvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26636683
tagged with: ajax
has title: Assigning form data for Ajax Request with triggerHandler
answer count: 1
favorite count: 0
score: -1
tagged with: php
downvote count: 1
type: AnsweredQuestion
tagged with: forms

http://stackoverflow.com/comment/41831458
score: 0
type: AnswerComment
has text: @varun I have edited my answer please find that link.
type: Comment
comment on: http://stackoverflow.com/a/26603127

http://stackoverflow.com/a/26554630
accepted answer of: http://stackoverflow.com/q/26554093
has comment: http://stackoverflow.com/comment/50253787
answers question: http://stackoverflow.com/q/26554093
upvote count: 24
has body: For everyone who asks receives, and the one who searches finds.... (and yes, I did spend a long time searching and trying before posting here..) Kind of nice to debug node.js server with VS.. hope this helps someone Edit: The arguments to node.exe can be hard to read in the image. It must be --debug=&lt;portno&gt; that is with two dashes (and not just one) to specify the debug port.
has comment: http://stackoverflow.com/comment/52975724
has comment: http://stackoverflow.com/comment/52968988
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/91563016
type: Answer
score: 24
has comment: http://stackoverflow.com/comment/49750327

http://stackoverflow.com/q/26539518
has comment: http://stackoverflow.com/comment/41705310
has comment: http://stackoverflow.com/comment/41704777
linked to: http://stackoverflow.com/q/5076944
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41704301
score: 0
has comment: http://stackoverflow.com/comment/41704216
has body: I have a problem which I can't figure out myself! I'm trying to swap images on hovering with another image. The problem however is that the images are called/loaded dynamically from a Json call. Inside that JSON call I need to create some sort of variable to use outside that JSON call so I can swap the image. I think I can manage to swap the images myself but right now I'm having trouble to create a variable which can be used outside the getJSON call. In my case how can I use iHover image in var productHtml?? II thought returning iHover would do the trick but that isn't!! Right now iHover returns a blank string or when using [] a blank array. Any help?? My jQuery $.getJSON(url, function (data){ ... stuff ... $.each(product.related, function(index, rel){ ... stuff ... var image = 'http://cdn.webshopapp.com/i/' + image_id_convert(rel.image) + '/100x150x2/image.jpg'; // this is the main image!! var iHover = ''; $.getJSON(url, function (data){ var image2 = rel.images[1]; // this needs to be the second image in the json file var image2Pic = 'http://cdn.webshopapp.com/i/' + image_id_convert(image2) + '/100x150x2/image.jpg'; // this is needed to convert a string to an actual link!! ... more stuff ... }); iHover = image2Pic; return iHover; }); var productHtml = '&lt;img class="rollover" src="'+image+'" data-alt-src="'+iHover+'" alt="'+rel.fulltitle+'"/&gt;';
has title: Swap dynamic image with a variable from json call
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2235622
has answer: http://stackoverflow.com/a/26539575
has comment: http://stackoverflow.com/comment/41704419
has answer: http://stackoverflow.com/a/26540490
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/26631026
downvote count: 1
answers question: http://stackoverflow.com/q/26630628
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/41870213
type: Answer
has body: You are looking for event.stopImmediatePropagation() Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree. $(document).ready(function() { $("p").on("click touchend", function(e) { e.stopImmediatePropagation() console.log( "&lt;p&gt; was clicked" ); }); }); Fiddle: http://jsfiddle.net/7w0s43f7/

http://stackoverflow.com/comment/41861391
type: Comment
comment on: http://stackoverflow.com/a/26625841
has text: No, it doesn't work. Sharing you the fiddle, with the code you have given. Please have a look. http://jsfiddle.net/rajan222000/mkma3803/6/ . Also by default, both the comboboxes should be disabled by default.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41801991
comment on: http://stackoverflow.com/q/26592714
has text: jsFiddle is killing me w/o a console. Until I figure that out, you can see a quick & dirty of it here. http://onfilm.us/gamengai/ix2.html?sys=10 First issue: initial load only draws 1 row. 2nd issue is that it's called far too often.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26649120
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26649121
type: Question
tagged with: javascript
tagged with: fallback
has body: I'm using fallback to load a local file if the cdn is unavailable; The readme states: "The key must be the libraries window variable" - for example jQuery (or $ I guess) for jquery. fallback.load({ // [...] jQuery: [ '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.FAIL_ON_PURPOSE.min.js', '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', '//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js' ], 'jQuery.ui': [ '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', '//js/loader.js?i=vendor/jquery-ui.min.js' ] }, //[...] shim, callback etc }); However, when loading angularjs modules or jquery plugin, I do not have a window library to use as a test. Is there any way to use the library?
has title: How can I use fallback js with angular modules?
tagged with: cdn
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26649121
favorite count: 0
tagged with: angularjs
upvote count: 2
score: 2

http://stackoverflow.com/a/26625243
upvote count: 2
answers question: http://stackoverflow.com/q/26625224
has body: Try to use the id selector directly. why making the things complex.? $('#con3').focus();
has comment: http://stackoverflow.com/comment/41887628
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42012899
has text: Ok, thank you, I checked before on the main project website and there was the same version I was using. There is even 1.7 version on the GitHub now, after update works fine!
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26672263
type: Comment

http://stackoverflow.com/comment/41669263
type: Comment
has text: Yeah if phantomjs fails me, I will probably fall back on watir if its the only reliable play.
comment on: http://stackoverflow.com/q/26517852
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41857685
score: 1
type: AnswerComment
has text: That was really nice of you to do that Jonathan, thanks a ton. It is nice to know there are people out there who are willing to help others solely due to the goodness of their heart! Completely unexpected and appreciated greatly! Hopefully one day our paths will cross again and I will be a much more experienced developer than I am currently!
type: Comment
comment on: http://stackoverflow.com/a/26615376

http://stackoverflow.com/comment/41913096
score: 0
comment on: http://stackoverflow.com/q/26654937
has text: I see a bunch of issues here, although I'm not sure if they would cause your problem. 1. You are using the xmlhttp object if it's available. You should reverse this and only use it if xmlhttprequest is not available. 2. Why are you not doing this asynchronously? 3. Why are you setting content-type to x-www-form-urlencoded when you aren't posting data to a form?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26604503
score: 1
answers question: http://stackoverflow.com/q/26604051
has body: I recently encountered the same problem, and I solved it by only adding the spinner if the ajax request takes more than 1 second. So your code should look something like: var timer; $(document).on({ ajaxStart: function() { timer &amp;&amp; clearTimeout(timer); timer = setTimeout(function() { startSpinner("#145A8C"); $(".splash").show(); }, 1000); }, ajaxStop: function() { $('.splash').fadeOut(300); $('.splash').remove(); clearTimeout(timer); } }
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26604051
upvote count: 1

http://stackoverflow.com/comment/41874524
has text: Here is a list of supported browsers: http://caniuse.com/#feat=css-variables
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26633258

http://stackoverflow.com/a/26593136
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26589944
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26589944
has body: I've solved by adding a new var count=0; at the top. Now I use: $("[id^=code]:eq( " + count + " ) ").val(ui.item.id); the problem is the variable i Thank you everyone for the help select: function(event, ui) { $("[id^=code]:eq( " + count + " ) ").val(ui.item.id); } }); i++; count++; });
downvote count: 0

http://stackoverflow.com/a/32832949
has body: I am following a video tutorial from egghead (link bellow) which suggest this approach: describe("hello world", function () { var appCtrl; beforeEach(module("app")) beforeEach(inject(function ($controller) { appCtrl = $controller("AppCtrl"); })) describe("AppCtrl", function () { it("should have a message of hello", function () { expect(appCtrl.message).toBe("Hello") }) }) }) Controller: var app = angular.module("app", []); app.controller("AppCtrl", function () { this.message = "Hello"; }); I am posting it because in the answer selected we are creating a new scope. This means we cannot test the controller's scope vars, no? link to video tutorial (1min) : https://egghead.io/lessons/angularjs-testing-a-controller
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26591402
has comment: http://stackoverflow.com/comment/53546174

http://stackoverflow.com/comment/41856594
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26623121
has text: you can disable rest of the fields
score: 0

http://stackoverflow.com/comment/53560183
has text: So what is the meaning of this line: scope = $rootScope.$new();
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26707635

node.js
tags question: http://stackoverflow.com/q/26563310
tags question: http://stackoverflow.com/q/26546901
tags question: http://stackoverflow.com/q/26524625
tags question: http://stackoverflow.com/q/26670534
tags question: http://stackoverflow.com/q/26647720
tags question: http://stackoverflow.com/q/26533995
tags question: http://stackoverflow.com/q/26574056
tags question: http://stackoverflow.com/q/26646600
tags question: http://stackoverflow.com/q/26573152
tags question: http://stackoverflow.com/q/26533691
tags question: http://stackoverflow.com/q/26530656
tags question: http://stackoverflow.com/q/26591599
tags question: http://stackoverflow.com/q/26656827
tags question: http://stackoverflow.com/q/26614146
tags question: http://stackoverflow.com/q/26581715
tags question: http://stackoverflow.com/q/26633402
tags question: http://stackoverflow.com/q/26620263
tags question: http://stackoverflow.com/q/26593165
tags question: http://stackoverflow.com/q/26617959
tags question: http://stackoverflow.com/q/26526515
tags question: http://stackoverflow.com/q/26520780
tags question: http://stackoverflow.com/q/26534969
tags question: http://stackoverflow.com/q/26531836
tags question: http://stackoverflow.com/q/26526341
tags question: http://stackoverflow.com/q/26555843
tags question: http://stackoverflow.com/q/26563920
tags question: http://stackoverflow.com/q/26545060
tags question: http://stackoverflow.com/q/26655836
tags question: http://stackoverflow.com/q/26536890
tags question: http://stackoverflow.com/q/26551891
tags question: http://stackoverflow.com/q/26625868
tags question: http://stackoverflow.com/q/26552494
tags question: http://stackoverflow.com/q/26632854
tags question: http://stackoverflow.com/q/26550397
tags question: http://stackoverflow.com/q/26671442
tags question: http://stackoverflow.com/q/26562007
tags question: http://stackoverflow.com/q/26590830
tags question: http://stackoverflow.com/q/26524020
tags question: http://stackoverflow.com/q/26536486
tags question: http://stackoverflow.com/q/26667593
tags question: http://stackoverflow.com/q/26665256
tags question: http://stackoverflow.com/q/26596793
tags question: http://stackoverflow.com/q/26650754
tags question: http://stackoverflow.com/q/26601069
tags question: http://stackoverflow.com/q/26636960
tags question: http://stackoverflow.com/q/26552544
tags question: http://stackoverflow.com/q/26548204
tags question: http://stackoverflow.com/q/26663064
tags question: http://stackoverflow.com/q/26566243
tags question: http://stackoverflow.com/q/26514961
tags question: http://stackoverflow.com/q/26522367
tags question: http://stackoverflow.com/q/26595510
tags question: http://stackoverflow.com/q/26626581
tags question: http://stackoverflow.com/q/26544407
tags question: http://stackoverflow.com/q/26598409
tags question: http://stackoverflow.com/q/26649753
tags question: http://stackoverflow.com/q/26535325
tags question: http://stackoverflow.com/q/26543226
tags question: http://stackoverflow.com/q/26583355
tags question: http://stackoverflow.com/q/26642247
tags question: http://stackoverflow.com/q/26626096
tags question: http://stackoverflow.com/q/26640919
tags question: http://stackoverflow.com/q/26652110
tags question: http://stackoverflow.com/q/26558136
tags question: http://stackoverflow.com/q/26537319
tags question: http://stackoverflow.com/q/26566514
tags question: http://stackoverflow.com/q/26665395
tags question: http://stackoverflow.com/q/26639236
tags question: http://stackoverflow.com/q/26603544
tags question: http://stackoverflow.com/q/26658546
tags question: http://stackoverflow.com/q/26623774
tags question: http://stackoverflow.com/q/26540700
tags question: http://stackoverflow.com/q/26644990
tags question: http://stackoverflow.com/q/26567556
tags question: http://stackoverflow.com/q/26575459
tags question: http://stackoverflow.com/q/26671308
tags question: http://stackoverflow.com/q/26566057
tags question: http://stackoverflow.com/q/26662814
tags question: http://stackoverflow.com/q/26584867
tags question: http://stackoverflow.com/q/26659840

http://stackoverflow.com/q/26582906
linked to: http://stackoverflow.com/q/10415759
answer count: 1
has comment: http://stackoverflow.com/comment/41781906
favorite count: 0
tagged with: autoresize
type: UnansweredQuestion
has body: I've been trying to edit some pages as local htm files on my computer, but I've run into this problem where functions using the contentWindow property don't work when the parent page and the page within the iframe are local files. When all the pages are uploaded the exact same codes work fine, but not as local files. It's only in Chrome and Opera that I've had this problem. In Firefox and Safari and even Internet Explorer contentWindow works fine with local files. This is very annoying because I've got a dynamic iframe resize in the page I'm working on and I don't want to have to reupload all the pages every time I want to test them in Chrome which is my main browser. Is there some sort of security setting in Chrome (and Opera) that's causing this problem, and if so can it be disabled? The code is just: function resizeIframe(iframeName) { document.getElementById(iframeName).style.height = '1000px'; newHeight = document.getElementById(iframeName).contentWindow.document.body.scrollHeight; setTimeout(function () { document.getElementById(iframeName).style.height = newHeight + 'px'; }, 10); }
has answer: http://stackoverflow.com/a/27028694
downvote count: 0
has title: Why doesn't document.getElementById(id).contentWindow work for local htm files in Chrome?
tagged with: iframe
tagged with: google-chrome
type: Question
score: 3
tagged with: javascript
tagged with: resize
upvote count: 3

http://stackoverflow.com/comment/41701234
comment on: http://stackoverflow.com/a/26536773
score: 0
type: AnswerComment
type: Comment
has text: I just checked the _href value with an alert, and it actually is getting the correct location, so it must be something in the loadContent function that's screwing with it

http://stackoverflow.com/comment/41890973
type: Comment
score: 0
has text: Yes it does. You simply start the next Ajax call from the handler (or whatever calls the handler). This has been asked before. Search for `serial ajax requests` or something similar.
comment on: http://stackoverflow.com/q/26642013
type: QuestionComment

http://stackoverflow.com/comment/41746823
has text: well you said it wouldn't open, but now you say it does. We can't guess without being able to replicate problem
comment on: http://stackoverflow.com/q/26562357
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41720423
comment on: http://stackoverflow.com/q/26548807
type: Comment
type: QuestionComment
has text: Where does `total` come from?
score: 0

http://stackoverflow.com/q/26517865
answer count: 1
tagged with: jquery
favorite count: 0
has body: I have a JSON array grabbed using the code below: $.getJSON("somelist.php", function( json ) { list = json; }); somelist.php returns the following values: [{"id":"1","name":"John Doe"},{"id":"2","name":"Jane Doe"}] I also have a list box in the same page as shown: How do I go about inserting the following options to someotherclass, between the select tags? John Doe Jane Doe I have only done this using PHP before and it seems much more complicated to sort through using JS/jQuery.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: 2
accepted answer: http://stackoverflow.com/a/26518094
type: AnsweredQuestion
has title: JSON Object to List Box values
upvote count: 2
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/26518094
downvote count: 0

http://stackoverflow.com/comment/41816611
type: AnswerComment
comment on: http://stackoverflow.com/a/26600806
type: Comment
has text: You are welcome! $ and jQuery have same meaning :) http://stackoverflow.com/questions/3291680/jquery-syntax-when-to-use-dollar-vs-jquery
score: 0

http://stackoverflow.com/q/26569066
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41769172
downvote count: 0
score: 1
has title: Sort array of objects by booleans, then by numbers (javascript)
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: sorting
has comment: http://stackoverflow.com/comment/41757514
favorite count: 0
has comment: http://stackoverflow.com/comment/41757384
accepted answer: http://stackoverflow.com/a/26569263
has body: I have an array of objects, and I would like to sort them following these two rules (in order of priority): The objets whose "departeYet" property is true must be at the beginning The objects must then be sorted in numerical order (the "number" property) This would be ok: true : 005 true : 007 true : 027 false: 009 false: 020 This is the structure of the part of the objects that interests us: var notSortedData = { number: number, // it's a string departedYet: scheduled_date, // true or false } sortedTrains.push(notSortedData); So, notSortedData is pushed in sortedTrains via a for loop. Then, I need to sort it: sortedTrains.sort(function(a, b) { // sorting algorithm here }); What should I do? Thanks.
has answer: http://stackoverflow.com/a/26569263

http://stackoverflow.com/comment/41810845
type: QuestionComment
comment on: http://stackoverflow.com/q/26598194
score: 0
has text: Javascript is client-side. PHP is server-side. What you're trying to do here is not possible without some sort of bridge between the two.
type: Comment

http://stackoverflow.com/q/26665362
accepted answer: http://stackoverflow.com/a/26665876
has title: Hiding and Showing Quiz Questions with JavaScript
possible better answer: http://stackoverflow.com/a/26665408
score: 0
has answer: http://stackoverflow.com/a/26665408
type: Question
answer count: 2
has body: I'm building a quiz that asks the user 6 questions. Some questions display the answer options as a dropdown. Others use radio buttons. Some questions also show tips below the form field. At the end of the quiz, the quiz will add up the score based on the previous answers and tell the person if he or she is at risk of a heart attack. What is the best way to display the questions and their tips (if they have them)? Keeping them in the HTML file and hiding and displaying with JavaScript? Or moving the questions and options into an array in the JS file - in which case, how would I control which form inputs the question generates? Or something else? Here are the questions that are in the HTML: Question Question 1 of 5 What is your age range? 20-34 35-39 40-44 45-49 50-54 55-59 60-64 65-69 70-74 75-79 What is your total cholesterol? Less than 160 160-199 200-239 240-279 Greater than 279 Don't know your total cholesterol? Attend one of our free screenings. Click here to view upcoming screenings in our events calendar. Are you a smoker? Yes No What is your high-density lipoprotein (HDL) cholesterol level? 60 50-59 40-49 Less than 40 HDL cholesterol is also known as “good” cholesterol. If you don’t know your HDL level, ask your doctor for a cholesterol test. Don’t have a doctor? Click here to find a primary care doctor near you. Are you on blood pressure medication? Yes No What is your Systolic Blood Pressure reading (first number)? Less than 120 120-129 130-139 140-159 Greater than 159 Don't know your blood pressure? Attend one of our free screenings. Click here to view upcoming screenings in our events calendar.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26665876
type: AnsweredQuestion

http://stackoverflow.com/comment/41756972
type: Comment
score: 0
has text: Thanks. Tried it but I lose my error function in the opposite input after using the first input and clear still gives me a 0.00
comment on: http://stackoverflow.com/q/26568849
type: QuestionComment

http://stackoverflow.com/q/26584074
has comment: http://stackoverflow.com/comment/41784098
tagged with: php
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/41784231
type: Question
has answer: http://stackoverflow.com/a/26584264
has answer: http://stackoverflow.com/a/26584119
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41784754
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Passing array of array elements to a function
favorite count: 0
has body: I've been searching for an answer of this concept for a whole day and finally gave up and decided to ask it here. Here's the concept: I have a set of fields which are arrayed, I want that set of fields to be inside of array so that I can use a standard function for saving a module based on the fields involved and another param to check which to save. Sample code: module1.php &lt;?php $i=0; while($i&lt;5){ ?&gt; &lt;input type="text" name="field1[$i]" /&gt; &lt;input type="text" name="field2[$i]" /&gt; &lt;input type="text" name="field3[$i]" /&gt; &lt;?php $i++; } ?&gt; &lt;input type="button" name="process" onclick="checkFields(['field1', 'field2', 'field3'], 'module1');" /&gt; &lt;script&gt; function checkFields(f, m){ var fn = f.length; alert(fn); //Output is 3 for(i=0; i&lt;fn; i++){ var nfn = f[i].length; //Here's where it's not working alert(nfn); //Output should be 5 } } &lt;/script&gt; So, that part with comment is the thing I can't figure how to do, I tried using getElementById, getElementsByName but it's not working. Or is there any possibility that I can pass an array of elements like this: array(field1, field2, field3) to a function? Edit: I added a while loop statement to make the concept more comprehensive.
has answer: http://stackoverflow.com/a/26584109
type: UnansweredQuestion

http://stackoverflow.com/q/26571913
accepted answer: http://stackoverflow.com/a/26572083
has title: select2 get dropdown options array list
upvote count: 2
has answer: http://stackoverflow.com/a/26572083
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-select2
score: 2
has body: I am using "select2-selecting" event and would like to get an array with id and labels) of the dropdown. my code is: $('.mySelect').select2({ ... some options}).on("select2-selecting", function(e) { // I need to get an array with dropdown values }); I can get selected values by using $(this).select2('data') and I can get dropdown selector by $(this).select2('dropdown'); but how to get a an array of dropdown list with ids?
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/26531818
has body: With the jQuery.each function I'm trying to get all of the ".jpg" related url's of a certain div. What I want to accomplish is to find each A element containing such url and insert the following HTML in it: $('#right a[href*=".jpg"]').each(function(index){ var imgSrc = $(this).attr('href'); console.log(imgSrc); }); this above example is all I've got right now, I've tried things like: $('#destination img').attr('src', imgSrc); To maybe make some things more clear the example below wil make things more clear. /* Get the Urls of the a's in #right and put them inside this div wrapped in an img tag: */
has answer: http://stackoverflow.com/a/26532108
has comment: http://stackoverflow.com/comment/41690146
has comment: http://stackoverflow.com/comment/41690610
has title: jQuery .each() function to modify DOM
score: 0
possible better answer: http://stackoverflow.com/a/26531906
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/41690390
has comment: http://stackoverflow.com/comment/41689952
has comment: http://stackoverflow.com/comment/41690038
has answer: http://stackoverflow.com/a/26532210
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26532127
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26531906
has comment: http://stackoverflow.com/comment/41711390
tagged with: each
type: Question
has answer: http://stackoverflow.com/a/26532380
has answer: http://stackoverflow.com/a/26532254
accepted answer: http://stackoverflow.com/a/26532254

http://stackoverflow.com/a/26565315
has comment: http://stackoverflow.com/comment/41750128
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26564148
has body: First of all, unwrap your code from the handler, it makes no sense here. I've amended it in the code. Second, your for loop will run even if the length is empty. That's why you're getting undefined. You need to use just less than, not less than or equal. Because, if the length is zero, and i initiates at zero, then the conditional will be true and response[0] will be called, even though the response is an empty array. Returning undefined Third (and I can't help you with this), you have to check the response to make sure the data is present. It doesn't seem like it is. $.ajax({ url: 'parser', success: function (response) { var jsonlen = response.length - 1; for (var i = 0; i &lt; jsonlen; i++) { var item = response[i]; var iconFeature = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.transform([item.lon, item.lat], 'EPSG:4326', 'EPSG:3857')), name: 'Null Island', rainfall: 500 }); var vectorSource = new ol.source.Vector({ // empty vector }) vectorSource.addFeature(iconFeature); } } });
score: 1
answers question: http://stackoverflow.com/q/26564148
has comment: http://stackoverflow.com/comment/41749902
has comment: http://stackoverflow.com/comment/41749999
has comment: http://stackoverflow.com/comment/41750367
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41750909

http://stackoverflow.com/q/26568929
tagged with: javascript
has answer: http://stackoverflow.com/a/27728181
has body: I have a CSV file and I want to use it in different visualization frameworks (d3, Google Charts etc). Is there a platform that allows me to quickly: Upload the CSV file Access the content of the file as JSON Extra points if I could query the JSON (SQL style) Extra points if I could upload more than one CSV file and use query joins to link the two together I've tried to use Google Spreadsheets and Google Visualization API Query Language. The issue is that when you get the JSON from Spreadsheets, you get it in a spreadsheet format (as in, every cell gets one item, rather than the initial format of the CSV file). Thanks.
has title: CSV/Excel to JSON API for prototyping
tagged with: prototyping
score: 2
tagged with: http://stackoverflow.com/tag/csv
tagged with: sql
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27504138
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2

http://stackoverflow.com/a/26668340
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41938582
type: Answer
has body: use $watchCollection for array of element: $scope.sortableItems = [ {order: 1, text: 'foo'}, {order: 2, text: 'bar'}, ]; $scope.$watchCollection('sortableItems', function(newCol, oldCol, scope) { for (var index in newCol) { //apply operation } });
has comment: http://stackoverflow.com/comment/41938662
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26668270
answers question: http://stackoverflow.com/q/26668270

http://stackoverflow.com/comment/41936834
comment on: http://stackoverflow.com/q/26667693
has text: Add `| filter: {isDelegate: true} ` at the end of ng-options like this `ng-options="item.Key as item.Value for item in ComboBox track by item.Key | filter: {isDelegate: true} "`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41865064
has text: AFAIK there is no such method in JS/jquery. You have to use String's `replace`, or `substr`/`slice` with `indexOf`.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26627992

http://stackoverflow.com/q/26601648
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26601735
accepted answer: http://stackoverflow.com/a/26607987
has answer: http://stackoverflow.com/a/26601735
score: 0
answer count: 2
has title: Javascript - pull values of an element with matching property in one array and save to another array
has answer: http://stackoverflow.com/a/26607987
type: AnsweredQuestion
has body: I have 2 arrays, sendInstalls and sendUsers. Both arrays have a property called objId with matching values across the 2 arrays. The arrays are not sorted in any particular order. What I want to do: For each element of sendUsers array, find the element in the sendInstalls array with a matching objId property Return the devToken property value of that element in sendInstalls Save the value of that property in the objToken property of the sendUsers array (which already exists) I tried the below: sendUsers.forEach(function(theSentUser){ function findWithAttr(array, attr, value){ for (var i = 0; i &lt; array.length; i += 1){ if(array[i][attr] === value){ return i; }; }; }; var matchInstall = findWithAttr(sendInstalls,'devToken',theSentUser.objId); console.log(matchInstall); theSentUser.objToken = sendInstalls[matchInstall].devToken; }); However the console.log(matchInstall) line returns rows of 'undefined' instead of matching array indexes. Haven't pasted the data because it is user sensitive, but is there anything immediately apparent that is wrong with the above? if data is essential to resolving this I can try and anonymise an excerpt and update this question. Any help greatly appreciated. Cheers
type: Question

http://stackoverflow.com/comment/41747190
has text: `var Promise = Promise = required(...)`?
score: 1
comment on: http://stackoverflow.com/q/26563781
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26527086
has title: working with object properties - Javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41681213
has comment: http://stackoverflow.com/comment/41681349
has body: How do you reference an object property value from within another property: var myObj = { distance: function(){ x=2; y=2; return x + y ;}, distanceKm: //here reference to myObj distance's returned value } My object properties hold multiple calculation functions and I wish to access these values from within the same object. if I use this within distanceKM, would I be refering to distanceKM or the parent Object (myObj) Thanks, my usage based on JLRishe's answer : var myObj = { distance: function (unit) { var radlat1 = Math.PI * this.goingFrom[0] / 180; var radlat2 = Math.PI * this.goingTo[0] / 180; var radlon1 = Math.PI * this.goingFrom[1] / 180; var radlon2 = Math.PI * this.goingTo[0] / 180; var theta = this.goingFrom[0] - this.goingTo[0]; var radtheta = Math.PI * theta / 180; var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta); dist = Math.acos(dist); dist = dist * 180 / Math.PI; dist = dist * 60 * 1.1515; if (unit == "K") { dist = dist * 1.609344 }; if (unit == "N") { dist = dist * 0.8684 }; return dist; }, goingFrom: [x1, y1], goingTo: [x2, y2] } console.log(myObj.distance("N"));
downvote count: 1
type: Question
tagged with: object
accepted answer: http://stackoverflow.com/a/26527292
score: -1
has comment: http://stackoverflow.com/comment/41681269
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41681263
tagged with: javascript
has comment: http://stackoverflow.com/comment/41681300
favorite count: 0
has comment: http://stackoverflow.com/comment/41681467
has answer: http://stackoverflow.com/a/26527292

mongodb
tags question: http://stackoverflow.com/q/26624945
tags question: http://stackoverflow.com/q/26616942
tags question: http://stackoverflow.com/q/26532462
tags question: http://stackoverflow.com/q/26548204
tags question: http://stackoverflow.com/q/26627721
tags question: http://stackoverflow.com/q/26514961
tags question: http://stackoverflow.com/q/26633486
tags question: http://stackoverflow.com/q/26640919
tags question: http://stackoverflow.com/q/26542946
tag name: mongodb
tags question: http://stackoverflow.com/q/26558932
tags question: http://stackoverflow.com/q/26597727
tags question: http://stackoverflow.com/q/26591755
tags question: http://stackoverflow.com/q/26614475
tags question: http://stackoverflow.com/q/26654391
type: Tag
tags question: http://stackoverflow.com/q/26654145
tags question: http://stackoverflow.com/q/26592128
tags question: http://stackoverflow.com/q/26572547
tags question: http://stackoverflow.com/q/26536705
tags question: http://stackoverflow.com/q/26532609
tags question: http://stackoverflow.com/q/26663473
tags question: http://stackoverflow.com/q/26565364
tags question: http://stackoverflow.com/q/26626186
tags question: http://stackoverflow.com/q/26588916
tags question: http://stackoverflow.com/q/26624230
tags question: http://stackoverflow.com/q/26558284
tags question: http://stackoverflow.com/q/26670534
tags question: http://stackoverflow.com/q/26598373
tags question: http://stackoverflow.com/q/26569390
tags question: http://stackoverflow.com/q/26564864
tags question: http://stackoverflow.com/q/26661498
tags question: http://stackoverflow.com/q/26575184
tags question: http://stackoverflow.com/q/26555843
tags question: http://stackoverflow.com/q/26590092
tags question: http://stackoverflow.com/q/26562007
tags question: http://stackoverflow.com/q/26665256
tags question: http://stackoverflow.com/q/26657207
tags question: http://stackoverflow.com/q/26529617
tags question: http://stackoverflow.com/q/26628386
tags question: http://stackoverflow.com/q/26517208
tags question: http://stackoverflow.com/q/26599905
tags question: http://stackoverflow.com/q/26598731

http://stackoverflow.com/comment/41874491
has text: I can't find any feature detection for this functionality. Personally, I'd recommend not bothering with it, yet. There are no plans to implement this in chrome yet, not to mention IE...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26633258

http://stackoverflow.com/a/26659080
has body: Replace newEl.focus() with newEl[0].select(); (demo).
score: 1
answers question: http://stackoverflow.com/q/26658820
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/26599773
type: Answer
answers question: http://stackoverflow.com/q/26599709
accepted answer of: http://stackoverflow.com/q/26599709
has body: Nevermind, I forgot to pass the controller as the "this" in the event callbacks: App.Events.on('ajax.onStart', this, this.get('enableProcessingSubmit')); App.Events.on('ajax.onComplete', this, this.get('disableProcessingSubmit')); It's working now.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41718127
type: QuestionComment
comment on: http://stackoverflow.com/q/26547219
has text: Storing the value in the div is a bit ugly, but there is nothing actually wrong with the part of the code you've shown. I ran it and it works as it should; it certainly doesn't "come back to 1 at each try".
score: 0
type: Comment

http://stackoverflow.com/a/26594989
has body: Don't manipulate html in controllers, you should instead simply interact with the data. The data-binding will change the html for you. $http.get('/mydata.json').success(function (data) { if (data === "changed") { myCtrl.mydata = "rechanged"; } else { myCtrl.mydata = data; } }); If you ever find yourself trying to interact with html directly in angular, first try to avoid it, and if you can't you need a directive.
answers question: http://stackoverflow.com/q/26594738
score: 0
type: Answer

http://stackoverflow.com/comment/41840799
comment on: http://stackoverflow.com/q/26614453
type: Comment
type: QuestionComment
has text: Thanks. I know, unfortunately I cannot provide this here. Can you let me know if adding .length to what you provided should return 1 in my case ?
score: 0

http://stackoverflow.com/comment/41941146
comment on: http://stackoverflow.com/a/26660229
score: 0
type: Comment
type: AnswerComment
has text: there are more than 1000 lines in each CSS, I will not put !important on each line of one CSS, it will affect the other website

backbone-views
tags question: http://stackoverflow.com/q/26534139
tags question: http://stackoverflow.com/q/26612673
type: Tag
tags question: http://stackoverflow.com/q/26591323
tags question: http://stackoverflow.com/q/26584561
tag name: backbone-views
tags question: http://stackoverflow.com/q/26550963

http://stackoverflow.com/a/26655627
type: Answer
answers question: http://stackoverflow.com/q/26655460
score: 0
has body: var lat = pos.coords.longitude; or var lat = pos.coords.latitude;

http://stackoverflow.com/comment/41822461
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26604125
has text: @fuzzybabybunny No `responseObject` is defined, but it is a JSON string which should be converted to object (by `JSON.parse`). See updated answer
type: AnswerComment

http://stackoverflow.com/comment/41826414
type: Comment
type: QuestionComment
has text: Could you show more code?
comment on: http://stackoverflow.com/q/26607084
score: 0

http://stackoverflow.com/comment/41796129
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26584728
has text: This is real awesome thanks for this visual explanation! Can you add to the visual what happens when we delete both props of b and c. the subobject should disappear no?

http://stackoverflow.com/q/26583740
type: Question
has body: I need to show timer for each product... Bt when I put my code in loop it only give timer to one product.... I need to show timer for each and every product in my product page...I m creating Deal of The day.. I did some work...Bt it working one product only... I need to know that waht is the best way to give timer to every product... Currently I m getting timer in my last product... My code is bellow.. <?php if ($this->getProducts()->getSize() > '0') { ?> <?php foreach ($this->getProducts() as $_Product) { ?> <?php //echo $timespan = strtotime($_Product['special_to_date']) - strtotime($_Product['special_from_date']);exit; ?> <a href="<?php echo $_Product->getProductUrl(); ?>"><img src="<?php echo $this->helper('catalog/image')->init($_Product, 'small_image')->resize(145, 200) ?>" alt="<?php echo $_Product->getName(); ?>"> <?php echo $_Product->getName(); ?> <?php echo Mage::helper('core')->formatPrice($_Product->getPrice()); ?> <?php // echo " "; print_r($_Product->toArray());exit; ?> <div id="timeremaining<?php echo $_Product['sku'] ?>"> <?php } ?> <?php } ?>
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
answer count: 1
has answer: http://stackoverflow.com/a/26583816
favorite count: 0
type: UnansweredQuestion
tagged with: php
has title: how to show timer for each product
has comment: http://stackoverflow.com/comment/41783613
downvote count: 1

angularjs
tags question: http://stackoverflow.com/q/26525472
tags question: http://stackoverflow.com/q/26597690
tags question: http://stackoverflow.com/q/26551516
tags question: http://stackoverflow.com/q/26664588
tags question: http://stackoverflow.com/q/26625556
tags question: http://stackoverflow.com/q/26562247
tags question: http://stackoverflow.com/q/26536431
tags question: http://stackoverflow.com/q/26601468
tags question: http://stackoverflow.com/q/26526085
tags question: http://stackoverflow.com/q/26658120
tags question: http://stackoverflow.com/q/26591402
tags question: http://stackoverflow.com/q/26619112
tags question: http://stackoverflow.com/q/26642746
tags question: http://stackoverflow.com/q/26646120
tags question: http://stackoverflow.com/q/26581558
tags question: http://stackoverflow.com/q/26530667
tags question: http://stackoverflow.com/q/26640080
tags question: http://stackoverflow.com/q/26575978
tags question: http://stackoverflow.com/q/26591186
tags question: http://stackoverflow.com/q/26526601
tags question: http://stackoverflow.com/q/26636230
tags question: http://stackoverflow.com/q/26573029
tags question: http://stackoverflow.com/q/26543922
tags question: http://stackoverflow.com/q/26563067
tags question: http://stackoverflow.com/q/26615857
tags question: http://stackoverflow.com/q/26605153
tags question: http://stackoverflow.com/q/26581610
tags question: http://stackoverflow.com/q/26568723
tags question: http://stackoverflow.com/q/26617795
tags question: http://stackoverflow.com/q/26631806
tags question: http://stackoverflow.com/q/26522670
tags question: http://stackoverflow.com/q/26641516
tags question: http://stackoverflow.com/q/26657353
tags question: http://stackoverflow.com/q/26533736
tags question: http://stackoverflow.com/q/26621200
tags question: http://stackoverflow.com/q/26614242
tags question: http://stackoverflow.com/q/26521789
tags question: http://stackoverflow.com/q/26639314
tags question: http://stackoverflow.com/q/26579678
tags question: http://stackoverflow.com/q/26622870
tags question: http://stackoverflow.com/q/26541625
tags question: http://stackoverflow.com/q/26660017
tags question: http://stackoverflow.com/q/26640439
tags question: http://stackoverflow.com/q/26658702
tags question: http://stackoverflow.com/q/26649153
tags question: http://stackoverflow.com/q/26594270
tags question: http://stackoverflow.com/q/26566906
tags question: http://stackoverflow.com/q/26578458
tags question: http://stackoverflow.com/q/26543961
tags question: http://stackoverflow.com/q/26607890
tags question: http://stackoverflow.com/q/26582084
tags question: http://stackoverflow.com/q/26545816
tags question: http://stackoverflow.com/q/26637329
tags question: http://stackoverflow.com/q/26587400
tags question: http://stackoverflow.com/q/26525222
tags question: http://stackoverflow.com/q/26589328
tags question: http://stackoverflow.com/q/26571384
tags question: http://stackoverflow.com/q/26517845
tags question: http://stackoverflow.com/q/26603015
tags question: http://stackoverflow.com/q/26612209
tags question: http://stackoverflow.com/q/26580284
tags question: http://stackoverflow.com/q/26660664
tags question: http://stackoverflow.com/q/26578535
tags question: http://stackoverflow.com/q/26524563
tags question: http://stackoverflow.com/q/26593485
tags question: http://stackoverflow.com/q/26554355
tags question: http://stackoverflow.com/q/26629751
tags question: http://stackoverflow.com/q/26534303
tags question: http://stackoverflow.com/q/26594677
tags question: http://stackoverflow.com/q/26592714
tags question: http://stackoverflow.com/q/26606383
tags question: http://stackoverflow.com/q/26526785
tags question: http://stackoverflow.com/q/26665956
tags question: http://stackoverflow.com/q/26550765
tags question: http://stackoverflow.com/q/26631670
tags question: http://stackoverflow.com/q/26537960
type: Tag
tags question: http://stackoverflow.com/q/26653408
tags question: http://stackoverflow.com/q/26584781
tags question: http://stackoverflow.com/q/26668856

http://stackoverflow.com/a/26569633
has body: A very minor typo is preventing the loop from working. Change cartButArr[i].onclick = cartAdd(); to cartButArr[i].onclick = cartAdd; The reason it does not work is that cartAdd() invokes the cartAdd() function, triggering the alert. You saw the alert multiple times, because the loop called cartAdd() each time. Want you intended to do was assign the function to the callback handler, not invoke the function.
answers question: http://stackoverflow.com/q/26569605
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41758211
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26569605

http://stackoverflow.com/q/26648463
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26648688
has answer: http://stackoverflow.com/a/26648815
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26648696
tagged with: css
has body: how to select random 5 question and display for user? other question should be hide in page and display only 5 question. my sample code, i want when user load page see 5 question in many question's. Question 1: Question 2: Question 3: Question 4: Question 5: Question 6: Question 7: Question 8: Question 9: Question 10:
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26648908
has title: how to select random 5 TR and display for user?
has answer: http://stackoverflow.com/a/26648645
has comment: http://stackoverflow.com/comment/41901507
has comment: http://stackoverflow.com/comment/41902464
linked to: http://stackoverflow.com/q/4205166
type: Question
answer count: 8
possible better answer: http://stackoverflow.com/a/26648635
has comment: http://stackoverflow.com/comment/41901489
has answer: http://stackoverflow.com/a/26648635
tagged with: javascript
has comment: http://stackoverflow.com/comment/41902098
has answer: http://stackoverflow.com/a/26648771
has answer: http://stackoverflow.com/a/26648671
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26648671

http://stackoverflow.com/comment/41762592
comment on: http://stackoverflow.com/a/26550844
type: AnswerComment
score: 0
has text: Yeah, that i also saw in the source. But want to know whether these are any plugins or not.Like whether it can be used without any licence
type: Comment

timing
tags question: http://stackoverflow.com/q/26585171
type: Tag
tag name: timing

http://stackoverflow.com/comment/41756082
type: QuestionComment
comment on: http://stackoverflow.com/q/26568305
score: 0
has text: Did you check using the developer tools if the styles are getting overridden?
type: Comment

http://stackoverflow.com/a/37891401
has body: In the constraints of getUserMedia() use this for front camera: { audio: true, video: { facingMode: "user" } } or this for rear camera: { audio: true, video: { facingMode: { exact: "environment" } } } I hope this helps.
score: 0
has comment: http://stackoverflow.com/comment/63237640
type: Answer
answers question: http://stackoverflow.com/q/26519232

jasmine
tags question: http://stackoverflow.com/q/26539565
tag name: jasmine
tags question: http://stackoverflow.com/q/26616277
tags question: http://stackoverflow.com/q/26529953
tags question: http://stackoverflow.com/q/26660631
tags question: http://stackoverflow.com/q/26641088
tags question: http://stackoverflow.com/q/26618243
tags question: http://stackoverflow.com/q/26650204
tags question: http://stackoverflow.com/q/26591402
tags question: http://stackoverflow.com/q/26615857
tags question: http://stackoverflow.com/q/26594270
type: Tag
tags question: http://stackoverflow.com/q/26520349
tags question: http://stackoverflow.com/q/26583283
tags question: http://stackoverflow.com/q/26616676

http://stackoverflow.com/a/26566613
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41758309
has comment: http://stackoverflow.com/comment/41758040
has comment: http://stackoverflow.com/comment/41755119
has comment: http://stackoverflow.com/comment/41753660
has comment: http://stackoverflow.com/comment/41755514
has comment: http://stackoverflow.com/comment/41756588
type: Answer
accepted answer of: http://stackoverflow.com/q/26553098
score: 0
answers question: http://stackoverflow.com/q/26553098
has comment: http://stackoverflow.com/comment/41755561
has body: It seems like this could be simplified. It seems like you just want these async operations to be performed synchronously. If you return the promise, the original promise in the chain will become the new promise. The final fail will catch the first promise to be rejected. asyncAction: function(url, params, resultFunction, faultFunction) { puremvc.asyncproxy.AsyncProxy.prototype.asyncAction.call(this, resultFunction, faultFunction); if(!params.id) { //get master var queryString = this.url.parse(url, true).query; var offset = queryString.offset ? Number(queryString.offset) : 0; var limit = queryString.limit ? Number(queryString.limit) : 20; var data = {rows: null, total: null}; var self = this; this.getRecords(data, offset, limit) .then(function(data) { return self.getTotal(data); }) .then(this.onResult.bind(this)) .fail(this.onFault); } else { //get detail this.getDetail(params.id); } }, getRecords: function(data, offset, limit) { console.log('get records'); var defer = this.q.defer(); this.connection.query("SELECT title, name, company FROM speaker LIMIT ? OFFSET ?", [limit, offset], function(error, rows, fields){ console.log('get records done'); data.rows = rows; defer.resolve(data); //defer.reject("earlier"); }); return defer.promise; }, getTotal: function(data) { console.log('get total'); var defer = this.q.defer(); this.connection.query("SELECT * FROM speaker", function(error, rows, fields) { //SQL_CALC_FOUND_ROWS later data.total = rows.length; console.log('get total done'); defer.resolve(data); //defer.reject("just like that"); }); return defer.promise; }, onResult: function(data) { console.log('on result'); puremvc.asyncproxy.AsyncProxy.prototype.onResult.call(this, data); },
has comment: http://stackoverflow.com/comment/41758005

http://stackoverflow.com/q/26662798
tagged with: javascript
tagged with: variables
tagged with: string
has answer: http://stackoverflow.com/a/26662891
type: AnsweredQuestion
has title: Issue computing product with javascript
accepted answer: http://stackoverflow.com/a/26662891
type: Question
has comment: http://stackoverflow.com/comment/41927778
has answer: http://stackoverflow.com/a/26662950
has comment: http://stackoverflow.com/comment/41927648
has body: I was wondering if someone could help me understand why my code is not executing the sum of the user input variable and the line of code that converts centimeters to inches and reads the result to an input box. See code: Select Centimeters/Inches Input Value: Convert Result: Equals And my Javascript var op1 = document.getElementById("option"); var value = document.getElementById('value').value; var centimetersinches; function calcFunction() { if (op1.options[op1.selectedIndex].value == 'option1') { document.getElementById('resultbox1').value = 'Select a value'; document.getElementById('resultbox2').value = 'Select a value'; } else if (op1.options[op1.selectedIndex].value == 'option2') { centimetersinches = value * .394; document.getElementById('resultbox1').value = value + ' centimeters'; document.getElementById('resultbox2').value = centimetersinches + ' inches'; } I do have a bit of jquery before the calcFunction function, but I do not think that would have anything to do with it. From what I understand, this should work. The strings after the variables for the result boxes are displayed in the result boxes, but I cannot get the variable centimetersinches to display. Any help is greatly appreciated.
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26662950

http://stackoverflow.com/q/26631472
has title: Blueimp File Upload - preview image pixelated
type: Question
has answer: http://stackoverflow.com/a/26653717
tagged with: blueimp
has body: I'm using Blueimp File Upload on a .NET project with AMD/RequireJS. I'm currently only uploading images and would like a preview to be shown on the page before the image is uploaded. This is a native feature of the library and seems to be working okay. The problem is that the preview image is always blurry/pixelated when I set the "previewMaxWidth" and "previewMaxHeight" options to anything over 80 pixels (the default). So, setting these 2 options to e.g. 220 pixels creates a 220 pixel Canvas but the image inside is pixelated, as if it was being scaled up from 80 pixels. I couldn't find any similar issues here, but noticed the same behaviour occurs in the actual Blueimp demo pages if you change "previewMaxWidth" and "previewMaxHeight" to the same 220px I'm using. EDIT: issue only applies to JPG images. PNG does not blur/pixelate. Check here for a visual demo. Below is the my code: $(config.browseButton).fileupload({ url: "/myEndpointUrl.aspx", acceptFileTypes: /(\.|\/)(jpe?g)$/i, maxFileSize: 5000000, previewMaxWidth: 220, previewMaxHeight: 220, previewCrop: true, dataType: 'json', autoUpload: false, disableImageResize: /Android(?!.*Chrome)|Opera/.test(window.navigator.userAgent) }).on('fileuploadadd', function(e, data) { if (data.files &amp;&amp; data.files[0]) { // Successfully injects the Canvas preview in the DOM config.elements.pictureHolder.html(data.files[0].preview); } else { console.log("No files have been selected"); } }).on('fileuploadprocessalways', function(e, data) { // ... }).on('fileuploadprogressall', function(e, data) { // ... }).on('fileuploaddone', function(e, data) { // ... }).on('fileuploadfail', function(e, data) { // ... }); Thanks in advance!
answer count: 1
tagged with: upload
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26653717
score: 0
favorite count: 0
tagged with: image-uploading
upvote count: 1
downvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/41766035
type: AnswerComment
type: Comment
has text: Thank you.your method should work .i used this same code but strangely i did not work.i dont know why
comment on: http://stackoverflow.com/a/26572780
score: 0

http://stackoverflow.com/comment/44434923
type: Comment
has text: I wouldn't say misleading but rather incomplete. Yes, using CORS you can make requests to different domains but it has to be allowed by the server. I believe facebook API allows but if OP uses other APIs that maybe doesn't have the Access-Control-Allow-Origin header the same problem will appear. Other reason, for now, to use Nginx is that not all browsers fully support this feature. http://caniuse.com/#feat=cors
comment on: http://stackoverflow.com/a/26657359
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41775797
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26577954
has text: checkout http://stackoverflow.com/questions/291813/recommended-way-to-embed-pdf-in-html
score: 0

http://stackoverflow.com/a/26581680
type: Answer
accepted answer of: http://stackoverflow.com/q/26581610
score: 3
has comment: http://stackoverflow.com/comment/41792495
upvote count: 3
has comment: http://stackoverflow.com/comment/41780007
has body: You can calculate the time until midnight and then set a function to execute to reload the page or do whatever at that time runAtMidnight(window.location.reload); function runAtMidnight(fn){ var midnight = new Date(); midnight.setHours(24, 0, 0, 0); var timeUntilMidnight = midnight.getTime() - Date.now(); setTimeout(fn, timeUntilMidnight); } Note: this uses the user's local time....
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26581610

headless-browser
tags question: http://stackoverflow.com/q/26537829
type: Tag
tag name: headless-browser

http://stackoverflow.com/q/26568716
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41756831
answer count: 0
has title: Why jquery addClass does not work on all selectors
type: Question
has body: I have this code that is supposed to change my bootstrap nav from navbar-static-top to navbar-fixed-top but also, I want it to change &lt;body&gt; tag by adding or removing class .fixed-body . This css class is responsible for changing padding-top style to allow the content to appear. Problem is, the navbar position changes but the body tag does not add or remove the class. Also, the list tag &lt;li id="home"&gt; remains unaffected. I can see the change on the navbar by inspecting element on my google chrome browser. So, i know that part of the code works. I don't get why the rest does not.... var nav = $('nav'); var body = $('body'); $(window).scroll(function () { if ($(this).scrollTop() &gt; nav.offset().top) { nav.removeClass("navbar-static-top"); nav.addClass("navbar-fixed-top"); body.addClass('fixed-body'); $('li#home').removeClass('in'); } else { nav.removeClass("navbar-fixed-top"); nav.addClass("navbar-static-top"); body.removeClass('fixed-body'); $('li#home').addClass('in'); } }); Any ideas?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41756872
has comment: http://stackoverflow.com/comment/41756714
score: 0
tagged with: jquery
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26520481
upvote count: 2
has comment: http://stackoverflow.com/comment/41670299
type: Question
has answer: http://stackoverflow.com/a/26520501
tagged with: javascript
has answer: http://stackoverflow.com/a/26520526
has answer: http://stackoverflow.com/a/26520582
answer count: 3
possible better answer: http://stackoverflow.com/a/26520526
downvote count: 0
tagged with: jquery
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/41671110
favorite count: 0
has body: If I have something like: var result; var searchFunction = function(query) { $.ajax({ url: '..', type: 'GET', data: { 'query': query }, success: function(result) { r = result } }); }; will r always end up to be the result from the last searchFunction(query) call? For example, lets say I do this: searchFunction('query1'); // this one takes 3 seconds to return because of internet delay searchFunction('query2'); // this one takes 1 seconds to return because of less internet delay will my r be 'result1' or 'result2'? Since it is supposed to be an async (AJAX), I'd expect r = 'result1', but from some tests I did, I got r = 'result2'. What really happens?
tagged with: ajax
has title: jQuery- are ajax responses received in order?
accepted answer: http://stackoverflow.com/a/26520501
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/41836988
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26612449
has text: Okay, a simpler question: How to set this Sys property to "empty" so that the if statement will run?

http://stackoverflow.com/comment/41723533
type: Comment
comment on: http://stackoverflow.com/a/26549640
has text: I have added an edit above if you could help me with the route for this either way i put it i get this error: /usr/local/rvm/gems/ruby-1.9.3-p547/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:179:in `default_controller_and_action': missing :controller (ArgumentError)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41862035
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26626168
has text: Because `id` is unique, you don't want elements with the same `id`.
score: 0

http://stackoverflow.com/comment/41811306
comment on: http://stackoverflow.com/q/26598358
has text: That's a good idea skobaljic, I will try to implement it. @isim, only because there is no image until the user mouses over the text, it is being dynamically created and then placed in the background-image css tag
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41944537
type: AnswerComment
comment on: http://stackoverflow.com/a/26671428
type: Comment
has text: Indeed... always is the safer bet here!
score: 0

http://stackoverflow.com/comment/41690969
comment on: http://stackoverflow.com/a/26531829
type: Comment
has text: Very much so. The more relevant code provided, the easier it is to find a solution.
type: AnswerComment
score: 0

http://stackoverflow.com/a/26618270
score: 0
type: Answer
has body: Function.prototype.apply() takes 2 arguments, a value for this and an array of arguments. Even if there is only one argument, it expects an array. So: slice.apply(arguments, [1]); is almost equivalent to: arguments.slice(1); I say almost because arguments is not a real array, and it does not have a slice method, which is why you have to do this the funky way. As others note in the comments, you can use call instead to make this cleaner. call expects a value for this this and then any number of additional individual arguments. Which means you can instead do: slice.call(arguments, 1);
answers question: http://stackoverflow.com/q/26618036

http://stackoverflow.com/a/26645652
downvote count: 0
score: 1
upvote count: 1
has body: The solution was simple, but I'm posting it so anyone who faces the same confusion sees this. The error was being thrown at the line of chrome.storage.local.set() but in reality it was happening inside a method that was being called within the callback. The call stack of the error didn't bubble out of the callback of .set(), so it was reported at the line of the .set() call.
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26644587
accepted answer of: http://stackoverflow.com/q/26644587

http://stackoverflow.com/comment/41735293
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26556830
score: 0
has text: Can't I just use the `on('end')` callback. I mean isn't there a way to wait for the data chunks to fully load then return that data as a whole?

http://stackoverflow.com/comment/41702001
type: QuestionComment
score: 0
has text: You probably should be making them `disabled`, which will prevent them from being submitted and also from being considered actually required, regardless of the state of the `required` property.
type: Comment
comment on: http://stackoverflow.com/q/26538211

http://stackoverflow.com/comment/41767738
has text: thanks , I know that it is better to pre-process data before sending it to the template.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26574956

http://stackoverflow.com/q/26591633
tagged with: testng
tagged with: jmeter
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27052226
has title: How to read and write to a Temenos T24 application using JMeter?
score: 0
has answer: http://stackoverflow.com/a/27122264
answer count: 2
tagged with: javascript
has body: i am trying to perform a load test on a temenos T24 application ascertain the performance of the application using JMeter. It uses servlets which makes impossible to go to other pages because its fully javascript based. I am hoping the gurus would help me out . Thanks in Advance. Regards, Benjamin.
tagged with: load-testing
tagged with: performance-testing

http://stackoverflow.com/comment/79940817
has text: For those who are new to ES6, remember to use exactly the variable {render}. Because you export only the "render" item of the complete module. If you want to use a different name you can use -> `import {render as customRenderer} from 'react-dom';`
comment on: http://stackoverflow.com/a/37736834
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41756603
has text: But the console only shows what jquery is seeing. Add some outputs on the php side to see what is getting rec'd back.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26568739
type: Comment

http://stackoverflow.com/comment/41709918
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26542329
has text: mmm.. My apologize for that...

http://stackoverflow.com/comment/41936988
has text: possible duplicate of [php resize image on or before upload](http://stackoverflow.com/questions/12757005/php-resize-image-on-or-before-upload)
comment on: http://stackoverflow.com/q/26667832
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41748422
has text: It seems like it shows up there, but when I try something like this: Must contain a valid email address it doesn't work.
type: AnswerComment
comment on: http://stackoverflow.com/a/26564362
score: 0
type: Comment

http://stackoverflow.com/q/26528146
has answer: http://stackoverflow.com/a/26528282
type: Question
has answer: http://stackoverflow.com/a/26528276
has title: jQuery hide(), show() or html()
has comment: http://stackoverflow.com/comment/41683549
accepted answer: http://stackoverflow.com/a/26528297
possible better answer: http://stackoverflow.com/a/26528323
has answer: http://stackoverflow.com/a/26528323
tagged with: javascript
tagged with: jquery
score: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has body: I have a and three js variables that store different html: content1, content2 and content3. By user interactions, the content of mentioned above div changes to one of that that stored in js variables. What is preferable either to directly set div content to what I need by user interaction: $("#content").html(content2); or to change div structure to: // value of content1 variable here // value of content2 variable here // value of content3 variable here And doing hide() and show() to that inner blocks, i.e when I want content2 to be shown: $("#c1").hide(); $("#c2").show(); $("#c3").hide(); ?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26528273
has answer: http://stackoverflow.com/a/26528297

popup
tags question: http://stackoverflow.com/q/26556961
type: Tag
tag name: popup
tags question: http://stackoverflow.com/q/26565087
tags question: http://stackoverflow.com/q/26518689
tags question: http://stackoverflow.com/q/26642365
tags question: http://stackoverflow.com/q/26652207
tags question: http://stackoverflow.com/q/26623493
tags question: http://stackoverflow.com/q/26630373
tags question: http://stackoverflow.com/q/26667464
tags question: http://stackoverflow.com/q/26596478
tags question: http://stackoverflow.com/q/26640666
tags question: http://stackoverflow.com/q/26556921
tags question: http://stackoverflow.com/q/26546185

http://stackoverflow.com/q/26613087
upvote count: 1
has comment: http://stackoverflow.com/comment/41837921
has answer: http://stackoverflow.com/a/26613205
type: Question
downvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26613134
has comment: http://stackoverflow.com/comment/41838045
has answer: http://stackoverflow.com/a/26613184
has answer: http://stackoverflow.com/a/26613141
has body: So I was thinking something like number = 1; maxnum = 32; cat = true; if (cat == true){ number + 1; } something along those lines, but I don't know how to implement that into making a constant changing line of number from 1 to 32; On the console.log.
has comment: http://stackoverflow.com/comment/41837842
has comment: http://stackoverflow.com/comment/41837808
favorite count: 0
answer count: 5
type: UnansweredQuestion
has title: How do I make a the console.log count from 1 to 32?
has comment: http://stackoverflow.com/comment/41837970
has answer: http://stackoverflow.com/a/26613162
has comment: http://stackoverflow.com/comment/41837893
score: -4

http://stackoverflow.com/comment/41931121
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26661463
has text: You can inject `$state` right next to `$location` then you can do `$state.go(...)`. `stateProvider` is for setting up the states, `$state.go()` is to transition to a state.

http://stackoverflow.com/q/26555597
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41734017
type: UnansweredQuestion
has body: Background I've read through several posts and tutorials here on AJAX, and I've gotten it to work great - on one page, but I'm still new to utilizing AJAX so I hit a rough spot that I can't understand how to fix. I have my main page, ajaxtest.php which contains a drop-down with this code: <?php include('./db.php'); $PM = mysqli_query($con, "SELECT DISTINCT PMName FROM report WHERE PMname <> '' ORDER BY PMName ASC"); ?> <?php while ($row = mysqli_fetch_row($PM)) { $selected = array_key_exists('PMName', $_POST) && $_POST['PMName'] == $row[0] ? ' selected' : ''; printf(" %s \n", $row[0], $selected, $row[0]); } ?> which pulls this function: Sending the selection from the database off to my second page, getuser.php. The user then sees the rest of the initial page populated with the results of getuser.php, which contains the bulk of my code and the HTML tables populated with the SQL info. This is working fine. Issue My issue stems from the fact that once (and pardon my lack of technical jargon,) getuser.php is populated into the that is inside of ajaxtest.php, I can't utilize any other JavaScript or AJAX functions or the entire page just refreshes as if I were to reload ajaxtest.php again from scratch and it puts me back to the initial blank screen with the dropdown menu. On getuser.php, within the that surrounds the entire table, there is a submit button: and <input class="button" name="update"<?= $LineID ?>" type="submit" id="update" value="UPDATE"> and this is supposed to link to my JavaScript test() function that simply reads: function test() { alert("yo"); } but when I click the button, the entire page refreshes instead of executing this function. Why is this? If I manually go to localhost/getuser.php?q=John%20Doe instead of "having this page load inside of my ajaxtest.php " and click the button, it works just fine and I get the JavaScript alert to pop up. What am I doing wrong here?
tagged with: php
has comment: http://stackoverflow.com/comment/41734658
has comment: http://stackoverflow.com/comment/41733003
has answer: http://stackoverflow.com/a/26556093
has comment: http://stackoverflow.com/comment/41733145
has comment: http://stackoverflow.com/comment/41733251
has comment: http://stackoverflow.com/comment/41733569
has title: ajax query on secondary page
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41734398
has comment: http://stackoverflow.com/comment/41733290
has comment: http://stackoverflow.com/comment/41734312

http://stackoverflow.com/a/26639632
has body: I wrote a web audio library, Wad.js, which I think will help you in this case. var sound = new Wad({ source : 'soundeffect.ogg' }); sound.play(); Wad.js will create a new audio buffer source node every time you call play(), so you can hear multiple instances of the same sound, but all of those audio buffer source nodes use the same audio buffer, which saves you lots of computational work. Check it out. https://github.com/rserota/wad However, cross-browser compatibility is not perfect. I expect it'll work in chrome for android, but I haven't tested it.
upvote count: 4
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26606182
type: Answer

http://stackoverflow.com/a/26567575
answers question: http://stackoverflow.com/q/26567505
has body: success: function(json_data) { lat = json_data.results[0].geometry.location.lat; lng = json_data.results[0].geometry.location.lng; ret = true; } Results is an array, you also might want to include a some logic to handle the case in which multiple results are returned. /edited removed snippet
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/26609704
has comment: http://stackoverflow.com/comment/41832778
upvote count: 1
has comment: http://stackoverflow.com/comment/41832584
has comment: http://stackoverflow.com/comment/41832390
has comment: http://stackoverflow.com/comment/41832650
has comment: http://stackoverflow.com/comment/41831335
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41833000
has comment: http://stackoverflow.com/comment/41831281
has comment: http://stackoverflow.com/comment/41832213
answers question: http://stackoverflow.com/q/26609669
has comment: http://stackoverflow.com/comment/41832727
type: Answer
has comment: http://stackoverflow.com/comment/41831349
accepted answer of: http://stackoverflow.com/q/26609669
has body: Just like you would escape any other character: Add a \ in front of it: text = text.replace(":\\","&lt;img src='images/Smilleys_08.png' class='smilley' /&gt;"); This counts for both php as JavaScript. Working example: alert(":\\ bla bla :\\ test".replace(":\\","&lt;img src='images/Smilleys_08.png' class='smilley' /&gt;")); Just keep in mind that a string replace only replaces the first occurrence of the search string, as shown in the demo. To fix that, try this regex replace: alert(":\\ bla bla :\\ test".replace(/:\\/g,"&lt;img src='images/Smilleys_08.png' class='smilley' /&gt;"));
score: 1

http://stackoverflow.com/comment/41930203
score: 0
type: Comment
has text: It worked, but now I wonder. Is it possible to use '#' + $hash to select the div and use .fadeIn() on it then if the value of $hash changes the previous one would fade out and let the other one fade in. The sudden jump is really annoying.
comment on: http://stackoverflow.com/a/26664122
type: AnswerComment

http://stackoverflow.com/comment/41685519
comment on: http://stackoverflow.com/a/26529416
score: 0
type: Comment
has text: Hi so I enclosed the function within brackets because they did it here: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery. Would there be any differences or drawbacks in your normal function?
type: AnswerComment

http://stackoverflow.com/q/26545383
type: AnsweredQuestion
tagged with: java
has answer: http://stackoverflow.com/a/26548593
type: Question
has comment: http://stackoverflow.com/comment/41718328
has comment: http://stackoverflow.com/comment/41718422
accepted answer: http://stackoverflow.com/a/26548593
tagged with: javascript
tagged with: grails
score: 0
tagged with: groovy
has body: I will divide my question into two parts the first one being my actual problem and the second is the title question. FIRST: I have a table showing a list of data and I am trying to define a filter method to search value from the table and render results, search by name is working but by date is not. I have the following code: the view: <g:form class="input-group custom-search-form" id="searchsession"> <g:submitToRemote class="btn btn-default submitBtn" action="filter" update="listTable" value="Filter" onLoading="showLoading('listTable')" onLoaded="dismissLoading('listTable')"/> </g:form> The controller method: class SessionController extends BaseController { public static Date format(String val){ SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy HH:mm a") return sdf.parse(val) } def filter(Integer max){ println params params.max = Math.min(max ?:DEFAULT_MAX_PER_PAGE, 100) def result = Session.createCriteria().list(max: params.max, offset: params.offset) { if (params.searchValue && params.searchValue != 'null') { createAlias("imsi","I") createAlias("imsi.subscriber","S") or { ilike("I.imsi", params.searchValue.toLowerCase() + "%") ilike("S.name", params.searchValue.toLowerCase() + "%") } } if (params.seachDateFrom && params.searchDateFrom != 'null' && params.searchDateTo && params.searchDateTo != 'null'){ createAlias("imsi.subscriber","S") and{ ge("S.connectTime",format(params.searchDateFrom)) le("S.disconnectTime",format(params.searchDateTo)) } } order("imsi", "asc") } render(template: 'listTable', model: [sessionList: result, sessionListTotal: result.totalCount, fromDate:params.searchDateFrom, toDate: params.searchDateTo, searchValue: params.searchValue, max: params.max, offset: params.offset]) } } EDIT: involved domain classes are: class Session { String id Imsi imsi Date connectTime Date disconnectTime } class Imsi { String id String imsi Subscriber subscriber } The second part is how can I get the type of the parameters to know if am getting a date type or…
has title: Get parameter type using groovy/grails
answer count: 1
has comment: http://stackoverflow.com/comment/41718339
has comment: http://stackoverflow.com/comment/41715506
has comment: http://stackoverflow.com/comment/41715590

http://stackoverflow.com/comment/41691573
has text: try using a data structure like suffix tree for comparison
comment on: http://stackoverflow.com/q/26532550
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/26644978
type: Question
has comment: http://stackoverflow.com/comment/41906677
downvote count: 0
tagged with: javascript
score: 4
tagged with: webstorm
has body: I use Webstorm to manage Meteor project, and I'm fancy with the strong-type checking provided by Typescript. There are two options to convert Typescript to js, one is by the file watcher of Webstorm, another is to add meteortypescript:compiler. The former seems more strict, because it will complain if I not add the correct reference, but it cannot deal with existing files, do I have to add the generated js files to VCS? Otherwise other team members must manually generate the files after updating from VCS. On the other hand, generating by meteortypescript:compiler, makes the tests in tests/jasmine ignored by velocity, which are written in Typescript and not generate js files in the same path. And which definition files should I use? meteor add typescript-libs does not add any .d.ts in my project, how to refer them? mrt add typescript-libs adds typescript-libs in packages folder, but it seems out of date. tsd query meteor --action install installs a later version of meteor.d.ts, but can not find iron:router and some other definition files.
has answer: http://stackoverflow.com/a/30351691
answer count: 1
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
upvote count: 4
tagged with: typescript
has title: What's the best practice to make Meteor, Webstorm and Typescript work together?

http://stackoverflow.com/comment/41940367
type: Comment
has text: Nice, I played around with the parent thingy but couldn't get it to work. Thanks a lot, will mark this as answer. Just one little edit, the last line sets `var el` to equal recurseYou which no longer is needed.
comment on: http://stackoverflow.com/a/26664156
score: 0
type: AnswerComment

http://stackoverflow.com/q/26629773
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to append item to drop down and save
has comment: http://stackoverflow.com/comment/41868103
type: UnansweredQuestion
has body: I have the following drop down list which I am able to append new listings to. Load Name: URL: ADD What currently happens (for obvious reasons) is once the user closes the browser page, the list obviously returns to its previou state. How do I make it so the list remembers the appended items?
has answer: http://stackoverflow.com/a/26629921
has answer: http://stackoverflow.com/a/26630039

http://stackoverflow.com/comment/41765347
comment on: http://stackoverflow.com/a/26569670
has text: Thanks, If you could provide a way to access them using `arr[0]` ,`arr[1]` It would be better :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26548689
favorite count: 0
tagged with: node.js
score: 2
has answer: http://stackoverflow.com/a/26549582
type: AnsweredQuestion
upvote count: 2
has body: I'm trying a simple Node.js + Express RESTful API example, and I've created a simple action to simulate a login request. Here is my code: app.js var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var users = require('./routes/users'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); // uncomment after placing your favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: err }); }); } // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { res.status(err.status || 500); res.render('error', { message: err.message, error: {} }); }); module.exports = app; users.js var express = require('express'); var router = express.Router(); /* GET users listing. */ router.get('/', function(req, res) { res.send('respond with a resource'); }); /* My Login */ router.post('/login', function(req, res){ var data = { user : req.body.user, pass : req.body.pass }; res.send(data); }); module.exports = router; I'm simulating a POST request with Postman (user = joe, pass = 123456), but I'm receiving an empty {} as response. Already tried this solution, wi…
has comment: http://stackoverflow.com/comment/41720995
type: Question
has comment: http://stackoverflow.com/comment/41720808
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26549582
has comment: http://stackoverflow.com/comment/41720816
tagged with: express
has comment: http://stackoverflow.com/comment/41720231
has comment: http://stackoverflow.com/comment/41720547
has comment: http://stackoverflow.com/comment/41721110
has comment: http://stackoverflow.com/comment/41720843
has title: Can't capture POST params with Node.js and Express
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/5710358

function
tags question: http://stackoverflow.com/q/26586652
tags question: http://stackoverflow.com/q/26620648
tags question: http://stackoverflow.com/q/26663986
tags question: http://stackoverflow.com/q/26614889
tags question: http://stackoverflow.com/q/26670680
tags question: http://stackoverflow.com/q/26670116
tags question: http://stackoverflow.com/q/26536352
tag name: function
tags question: http://stackoverflow.com/q/26611511
tags question: http://stackoverflow.com/q/26539894
tags question: http://stackoverflow.com/q/26569605
tags question: http://stackoverflow.com/q/26666644
tags question: http://stackoverflow.com/q/26636653
tags question: http://stackoverflow.com/q/26525771
tags question: http://stackoverflow.com/q/26599725
tags question: http://stackoverflow.com/q/26546652
tags question: http://stackoverflow.com/q/26534105
tags question: http://stackoverflow.com/q/26551039
tags question: http://stackoverflow.com/q/26520507
tags question: http://stackoverflow.com/q/26599510
tags question: http://stackoverflow.com/q/26667674
tags question: http://stackoverflow.com/q/26618682
tags question: http://stackoverflow.com/q/26611618
tags question: http://stackoverflow.com/q/26543640
tags question: http://stackoverflow.com/q/26669184
tags question: http://stackoverflow.com/q/26629764
tags question: http://stackoverflow.com/q/26531187
tags question: http://stackoverflow.com/q/26606388
tags question: http://stackoverflow.com/q/26522564
tags question: http://stackoverflow.com/q/26610847
tags question: http://stackoverflow.com/q/26526169
tags question: http://stackoverflow.com/q/26658812
tags question: http://stackoverflow.com/q/26573423
tags question: http://stackoverflow.com/q/26610868
tags question: http://stackoverflow.com/q/26570659
type: Tag
tags question: http://stackoverflow.com/q/26568849
tags question: http://stackoverflow.com/q/26519725
tags question: http://stackoverflow.com/q/26644181
tags question: http://stackoverflow.com/q/26586379
tags question: http://stackoverflow.com/q/26601678
tags question: http://stackoverflow.com/q/26665618
tags question: http://stackoverflow.com/q/26619715
tags question: http://stackoverflow.com/q/26578762
tags question: http://stackoverflow.com/q/26557376
tags question: http://stackoverflow.com/q/26539810
tags question: http://stackoverflow.com/q/26539337
tags question: http://stackoverflow.com/q/26617606
tags question: http://stackoverflow.com/q/26637329
tags question: http://stackoverflow.com/q/26571874
tags question: http://stackoverflow.com/q/26542361
tags question: http://stackoverflow.com/q/26569473
tags question: http://stackoverflow.com/q/26555739
tags question: http://stackoverflow.com/q/26629283
tags question: http://stackoverflow.com/q/26574484

http://stackoverflow.com/q/26533961
tagged with: three.js
has answer: http://stackoverflow.com/a/26536070
accepted answer: http://stackoverflow.com/a/26536070
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25497541
has title: I can't add light with mouse event
type: Question
has comment: http://stackoverflow.com/comment/41694058
tagged with: javascript
score: 0
tagged with: 3d
has comment: http://stackoverflow.com/comment/41694435
answer count: 1
has comment: http://stackoverflow.com/comment/41698009
has body: I can't add light with keydown event in three.js scene. I have the following function function putLight(){ light = new THREE.SpotLight( 0xffffff ); light.position.set( 10, 80, 20 ); light.target.position.set( 0, 0, 0 ); light.castShadow = true; light.shadowCameraNear = 20; light.shadowCameraFar = 50; light.shadowCameraFov = 40; light.shadowMapBias = 0.1; light.shadowMapDarkness = 0.7; light.shadowMapWidth = 2*512; light.shadowMapHeight = 2*512; scene.add( light ); } And it works when I use it in my init function function init(){ camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); scene = new THREE.Scene(); geometry = new THREE.PlaneGeometry( 300, 300, 50, 50 ); geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) ); material = new THREE.MeshLambertMaterial( { color: 0xdddddd } ); mesh = new THREE.Mesh( geometry, material ); mesh.position.copy(groundBody.position); mesh.castShadow = true; mesh.receiveShadow = true; scene.add( mesh ); renderer = new THREE.WebGLRenderer(); renderer.shadowMapEnabled = true; renderer.shadowMapSoft = true; renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild(renderer.domElement); } it also works if I put it out of any function in main script: initCannon(); init(); loadModel(); putLight(); render(); but it doesn`t work in the next situation window.addEventListener("keydown",function(e){ switch( e.keyCode ) { case 76: putLight(); break; } }); Any suggestions? Thanks

http://stackoverflow.com/comment/41903660
has text: After that, I would suggest writing the individual pieces from CF into the page and the jquery stuff should be logged to the console. You should be able to figure out where the differences are with each element in your caluculation
comment on: http://stackoverflow.com/q/26649056
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26619457
score: 0
has body: The solution was adding the condition &amp;&amp; !$(e.target.parentNode).hasClass('cke_dialog_ui_input_textarea') now it works! Hopefully that helps anybody with this same issue.
type: Answer
answers question: http://stackoverflow.com/q/26600904

http://stackoverflow.com/a/26603434
answers question: http://stackoverflow.com/q/26603256
type: Answer
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26603256
has body: Basically I would go this way: Load your image into a &lt;canvas&gt; Crop the Image: http://www.html5canvastutorials.com/tutorials/html5-canvas-image-crop/ Save a image from the canvas: http://www.html5canvastutorials.com/advanced/html5-canvas-save-drawing-as-an-image/ Here is a very good tutorial. Disclaimer: I haven't tested this yet, but I heard that this way work. Also use background-size:cover; or background-size:contain; to get around nasty dimension problems.

http://stackoverflow.com/a/26642033
accepted answer of: http://stackoverflow.com/q/26641574
type: Answer
answers question: http://stackoverflow.com/q/26641574
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41896798
has body: Here's a working Plunker showing how you could do it with just JavaScript (using the jQuery library). http://plnkr.co/edit/BUCZOKd0MFDsa2jdMkJs?p=preview The basic process is as follows: Fetch the text file from the server Split it into an array of lines When the user clicks the button, generate a random number Display the line corresponding to the random number Here's the JavaScript for that (see the Plunker above for full source): var lines; var randomNumber; var lastRandomNumber; $(document.body).ready(function () { // load the trivia from the server $.ajax({ url: 'trivia.txt' }).done(function(content) { // normalize the line breaks, then split into lines lines = content.replace(/\r\n|\r/g, '\n').trim().split('\n'); // only set up the click handler if there were lines found if (lines &amp;&amp; lines.length) { $('#showLine').on('click', function () { // loop to prevent repeating the last random number while (randomNumber === lastRandomNumber) { randomNumber = parseInt(Math.random() * lines.length); // check to prevent infinite loop if (lines.length === 1) { break; } } // keep track of the last random number lastRandomNumber = randomNumber; // show the corresponding line $('#trivia').text(lines[randomNumber]); }); } }); }); UPDATE: Added some explanatory comments to the JavaScript (updated above and in the Plunker). Also added a check to prevent getting the same random line twice in a row.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/50071575

http://stackoverflow.com/q/26561964
tagged with: angularjs-ng-repeat
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41748228
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41749691
score: 0
tagged with: ng-switch
has title: Angular: switch inside repeat, memory problems
answer count: 1
has answer: http://stackoverflow.com/a/27004886
has body: I'm building a tr with different td components inside. There are many different td components available and only a few will be rendered. // and so on.. This takes a lot of memory. It seems like all my components is constructed, but only one is displayed for each iteration. What is the correct way of doing this? Tips on how to go around the problem and doing it another way?

http://stackoverflow.com/comment/41776144
type: AnswerComment
comment on: http://stackoverflow.com/a/26578073
score: 0
type: Comment
has text: @Donald Have a look at **[this](https://docs.angularjs.org/api/ng/directive/ngModelOptions)**. `Debounce` will make sure that the model doesn't get updated after a certain number of milliseconds have passed since the last user interaction. So, if the user is typing, it won't update the model until the user takes a pause. But in order to take advantage of that you need to use `ng-change`. Also, since this answer seems to solve your question I think that you should mark it as accepted. Thanks!

http://stackoverflow.com/q/26530076
type: Question
has answer: http://stackoverflow.com/a/26530819
has body: I am using the fullCalendar.js and the current problem is making i lose so much time on something that might be simple to whose understand javascript (more specific jquery) better than me. The link of my example is at the bottom but my main concern is this part: eventClick: function(event){ $(".closon").click(function() { $('#calendar').fullCalendar('removeEvents',event._id); }); }, I want to delete an event from the calendar with my close button and not on direct click of the event. I already tried using the $element.click outside of the eventClick trigger but it closed all the events on the calendar and the max i could reach was this poor situation, where the user need to click first on the calendar event and after on the 'X' to delete it. http://jsfiddle.net/59RCB/49/
downvote count: 0
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
has comment: http://stackoverflow.com/comment/41690109
favorite count: 0
accepted answer: http://stackoverflow.com/a/26530819
has comment: http://stackoverflow.com/comment/41686770
has answer: http://stackoverflow.com/a/50576952
possible better answer: http://stackoverflow.com/a/39722722
answer count: 5
has answer: http://stackoverflow.com/a/39722722
score: 16
upvote count: 16
has answer: http://stackoverflow.com/a/33260699
has answer: http://stackoverflow.com/a/48441053
type: AnsweredQuestion
has title: fullcalendar.js - deleting event on button click
has comment: http://stackoverflow.com/comment/41690394
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26577723
has comment: http://stackoverflow.com/comment/41774374
has comment: http://stackoverflow.com/comment/41774579
has comment: http://stackoverflow.com/comment/41774024
has comment: http://stackoverflow.com/comment/41773668
tagged with: getjson
accepted answer: http://stackoverflow.com/a/26580957
has comment: http://stackoverflow.com/comment/41772915
type: AnsweredQuestion
has body: This code does what I need but I want to store the JSON values it uses in a separate file using standard JSON format so the same data can be used elsewhere with getJSON requests. (I need to run this to match up data returned from a getJSON request with additional values. I use the id to do the match on returned items. This is how I build the complete HTML items I need.) CODE SAMPLE $(function() { var json = { "nwsltrs":[ { "id":"53c57dede4b07621dafde5d1", "nwsltrNames":"Hello", "author":"Joe" } // these entries will grow to a hundred or more. ] }; var titleID = "53c57dede4b07621dafde5d1"; // in actual code getting this value from a separate getJSON call $.each(json.nwsltrs, function(i, v) { if (v.id === titleID ){ nwsltrName = v.nwsltrNames; author = v.author; console.log(nwsltrName + ":" + author); return; } }); }); Want the external JSON file to look like this with and use .json extension: { "nwsltrs":[ { "id":"53c57dede4b07621dafde5d1", "nwsltrNames":"Hello", "author":"Joe", }, { "id":"54b57dede4b07621dafde5d2", "nwsltrNames":"Bye", "author":"Mary", } // these entries will grow to a hundred or more. ] I'm sure there are better ways to approach this and am open to hearing them—as long as I can use an external JSON file.
has comment: http://stackoverflow.com/comment/41775449
has comment: http://stackoverflow.com/comment/41774465
has title: Need to grab the JSON here from an external file
type: Question
has comment: http://stackoverflow.com/comment/41773936
has comment: http://stackoverflow.com/comment/41775190
has comment: http://stackoverflow.com/comment/41773722
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41774300
has comment: http://stackoverflow.com/comment/41773603
has answer: http://stackoverflow.com/a/26580957
score: 0
answer count: 1

http://stackoverflow.com/comment/41722438
type: QuestionComment
comment on: http://stackoverflow.com/q/26531008
has text: @trailmax, sounds interesting. How can i do that? Any code example?
type: Comment
score: 0

http://stackoverflow.com/a/26530809
has comment: http://stackoverflow.com/comment/41692078
has comment: http://stackoverflow.com/comment/41693145
answers question: http://stackoverflow.com/q/26530503
score: 1
has body: It means that the given function will be called when the request is finished. Your request might be successful or failed for some reason, but the given function will be executed, regardless of whether the request was successful or failed. Example: You define a function, let's call it callback. Case1: You send a request, it reaches the server successfully and after the response, callback is executed. Case2: You send a request, which is not successful, for instance the target does not exist. callback will be executed in this case as well.
has comment: http://stackoverflow.com/comment/41702826
upvote count: 1
has comment: http://stackoverflow.com/comment/41730281
has comment: http://stackoverflow.com/comment/41694396
downvote count: 0
has comment: http://stackoverflow.com/comment/41692437
type: Answer

http://stackoverflow.com/a/26603770
has body: Found the issue. I replaced radius: rad With radius: parseFloat(rad) Hope helps also someone else.
answers question: http://stackoverflow.com/q/26603664
score: 11
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/96967827
has comment: http://stackoverflow.com/comment/45191727
upvote count: 11
accepted answer of: http://stackoverflow.com/q/26603664

http://stackoverflow.com/a/26609593
accepted answer of: http://stackoverflow.com/q/26609256
answers question: http://stackoverflow.com/q/26609256
score: 0
type: AcceptedAnswer
type: Answer
has body: You could add another row and transfer the last two td elements to the new row. $('&lt;tr&gt;').insertAfter('tr').append($('td').slice(-2)) http://jsfiddle.net/g9xnsus5/2/

http://stackoverflow.com/q/26566623
has answer: http://stackoverflow.com/a/26566702
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41773222
has title: Fetch html content from different domain which is injectedt by javascript
has comment: http://stackoverflow.com/comment/41761396
tagged with: selenium
type: Question
answer count: 1
tagged with: javascript
score: 0
has body: It is possible to fetch html content from another domain in php via "file_get_contents" or cURL e.g. http://davidwalsh.name/curl-download . But how can i fetch it when DOM elements are injected via JavaScript? And if that is not possible on the server level, although i have no experience in Selenium, and this is a guess: can i somehow use Selenium (+RC?) on my local machine and access webpage from the third party domain? -i should add that the elements seem to be added onload and not bounded to any triggers.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41753021
tagged with: curl

background
tags question: http://stackoverflow.com/q/26617654
tags question: http://stackoverflow.com/q/26633806
tag name: background
tags question: http://stackoverflow.com/q/26532716
tags question: http://stackoverflow.com/q/26662180
type: Tag

http://stackoverflow.com/comment/41802881
comment on: http://stackoverflow.com/a/26579839
type: AnswerComment
type: Comment
has text: That did nothing to solve the problem. A gap is still created by the address bar.
score: 1

http://stackoverflow.com/q/26613488
linked to: http://stackoverflow.com/q/733482
possible better answer: http://stackoverflow.com/a/26613823
has comment: http://stackoverflow.com/comment/41838723
type: Question
has answer: http://stackoverflow.com/a/26613544
accepted answer: http://stackoverflow.com/a/26613544
tagged with: c#
tagged with: javascript
has body: I have a textbox(txtSearch) and button(search) and one link button. First I enter some name in the textbox and click the Search button(username is getting assigned) and click on the link button. Now username parameter value is not getting passed from searchbutton_click event to linkbutton_click event? How can i achieve this? public partial class Users: System.Web.UI.Page { public string username = string.empty; protected void Page_Load(object sender, EventArgs e) { } public void SearchButton_Click(object sender, EventArgs e) { username = txtUser.Text.ToString(); } protected void linkButton_Click(object sender, EventArgs e) { response.write(username) \\here username is coming as empty string. } }
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26613823
tagged with: asp.net
has title: How to pass parameters between two onclick event
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41838683

http://stackoverflow.com/q/26591599
tagged with: javascript
favorite count: 0
tagged with: busboy
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: node.js
has body: I have a form with 2 file and a text area to post to the serverside made with node.js to handle the upload part on node/express(4.0) I used multer. While to handle the upload from the angular side I relayed on angular-file-upload I'm trying to keep the express part super simple for now just to test out the fact that it actually works /// NODE JS EXPRESS app.use(multer({ dest: __dirname + '/public/uploads/', rename: function (fieldname, filename) { return filename; //.replace(/\W+/g, '-').toLowerCase() + Date.now() } })) /// ANGULAR cmsApp.controller("MyController", ['$scope', '$location', '$upload', function($scope, $location, $upload) { $scope.title = $location; //$scope.saveMiscs = function() { $scope.submit = function() { console.log("saving miscs"); var file_1 = $scope.formfile1; var file_2 = $scope.formfile2; //console.log('file is ', JSON.stringify(file_regole), " + " + JSON.stringify(file_statuto)); $scope.upload = $upload.upload({ url: '/api/misc/filupload1', //upload.php script, node.js route, or servlet url file: file_1, // or list of files ($files) for html5 only }).progress(function(evt) { console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total)); }).success(function(data, status, headers, config) { // file is uploaded successfully console.log("upload completed: ", data); }); }; $scope.onFileSelect = function($files) { $scope.files = angular.copy($files); console.log($scope.files); // Returns my object } $scope.setFiles = function(element) { $scope.$apply(function($scope) { console.log(element.files); if(element.id == "form__file1") file_1 = element.files; else if(element.id == "form__file2") file_2 = element.files; }); }; }]); /// ANGULAR HTML Documents Load file 1 here Load file 2 here Write something in here: If I try to post with a plain form, that does not involve angular, a simple multipart form with one "file" field, nodejs/multer takes the file and uploads is with no problem, but if I use this scenario involving express in the game, it …
has title: Angular not POSTing multipart data so express doesn't receive a thing?
score: 1
type: Question
tagged with: multer
downvote count: 0

http://stackoverflow.com/a/26672075
has comment: http://stackoverflow.com/comment/41945307
upvote count: 0
type: AcceptedAnswer
score: -1
has comment: http://stackoverflow.com/comment/42085931
has body: Just make the ajax call using jQuery to your server side language i.e. PHP and pass lat &amp; lang parameter to your PHP page. $.ajax({ type: 'POST', url: 'your_server_url.php', async:true, data: { 'lat': lat, 'lang': lang }, success: function(response){ // alert('wow' + msg); } }); In your php page read parameter Like this. $lat = $_POST['lat']; $lang = $_POST['lang']; //your database logic
type: Answer
has comment: http://stackoverflow.com/comment/42084108
has comment: http://stackoverflow.com/comment/42057212
has comment: http://stackoverflow.com/comment/42084095
accepted answer of: http://stackoverflow.com/q/26668557
has comment: http://stackoverflow.com/comment/41947733
answers question: http://stackoverflow.com/q/26668557
has comment: http://stackoverflow.com/comment/41948298
downvote count: 1

http://stackoverflow.com/q/26672071
has body: I'm really new to browserify world. I want to use this module peer-file, in order to allow the file transfer between two browsers. Reading the Usage section into readme, I note I have to include the script bundle.js in my web page. To build the bundle I need to type browserify -r ./index.js &gt; build.js, where -r option means external require, so I can use in my main script the keyword require(), like this: var send = require('peer-file/send') var receive = require('peer-file/receive') However, when I load the web page, I receive this error into the console. Uncaught Error: Cannot find module 'peer-file/send' Any suggestion?
tagged with: npm
score: 1
accepted answer: http://stackoverflow.com/a/26672130
has title: Browserify - create bundle with external module
upvote count: 1
type: AnsweredQuestion
tagged with: javascript
type: Question
answer count: 1
downvote count: 0
favorite count: 0
tagged with: browserify
has answer: http://stackoverflow.com/a/26672130

http://stackoverflow.com/comment/41663066
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26516573
type: Comment
has text: A class is not required here and adds more overhead in your solution.

http://stackoverflow.com/q/26525180
score: 1
tagged with: java
tagged with: javascript
has answer: http://stackoverflow.com/a/26525279
has comment: http://stackoverflow.com/comment/41679996
answer count: 2
has answer: http://stackoverflow.com/a/26525517
has comment: http://stackoverflow.com/comment/41678047
has title: node.js and Java
downvote count: 0
has comment: http://stackoverflow.com/comment/41678787
favorite count: 0
has comment: http://stackoverflow.com/comment/41690624
type: UnansweredQuestion
has body: I am working on a research project, which was described here: Searching Google Images from Java . I have the basic GUI working, minus the content that consists of the two pictures and the question, that was required there. I showed the guy who gave me the research position, and he wants to now make sure that I can up it to anywhere between those two pictures and six pictures, per panel. I figured out how to search Google programmatically, from Java, and decided to do it in Java, because it was the best language that I knew of to create GUI's in, as most of my GUI-creating experience is in Java. This is what I have so far However, the research project guy is wanting to move this to his server, and wanting me to use Node.js to make the GUI, as well as HTML/JavaScript/CSS. Is there anyway to have layouts in those client-side languages that are similar to Java's Layouts? /* If I could stay in Java, I could just use two JPanels: a picturePanel, which would have a GridLayout, and a questionPanel, which would have only the JLabel with the question in it. Also, he told me that Node.js works really well with Java. Could someone tell me how would it work, and how to determine the contents of the panels programmatically, using Node.js? (Would the latter work in a way that is similar to writing PHP code, in the sense that you can have it live alongside HTML code?)
tagged with: node.js
has comment: http://stackoverflow.com/comment/41758358
linked to: http://stackoverflow.com/q/26393873
upvote count: 1
type: Question

http://stackoverflow.com/comment/41686304
type: Comment
comment on: http://stackoverflow.com/q/26529838
has text: The values of input elements will always be strings. There's no need to convert them.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41895468
type: Comment
comment on: http://stackoverflow.com/a/26623213
score: 0
type: AnswerComment
has text: @user3581315 please try to view the page source so that you may come to know weather js file included or not.

http://stackoverflow.com/comment/41886540
has text: I try alot to coded something to do what i want but all what i coded it's dosn't work because the javascript code so i ask here to find some help about that. But can i save the picture in folder from the webpage using python?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26639672
type: Comment

http://stackoverflow.com/comment/72446769
type: QuestionComment
has text: Did you ever solve this, I'm dealing with the exact same issue
score: 0
comment on: http://stackoverflow.com/q/26590645
type: Comment

http://stackoverflow.com/q/26584836
has comment: http://stackoverflow.com/comment/41785521
tagged with: javascript
linked to: http://stackoverflow.com/q/201323
score: 0
has comment: http://stackoverflow.com/comment/41785358
possible better answer: http://stackoverflow.com/a/26585096
tagged with: regex
favorite count: 0
has title: Regex validation in java and java scipt for email address
downvote count: 2
type: AnsweredQuestion
has body: We are using below regular expression to validate email address in java ^[\\w!#\\$'\\*\\+=\\?\\^\\/_~-]+(\\.[\\w!#\\$'\\*\\+=\\?\\^\\/_~-]+)*@([a-zA-Z0-9\\-]+\\.)+[A-Z]{2,4}$ and it worked fine with invalid email address raju.rathi@gmail.com&amp;^(*&amp;^(*^2 but when I use the same regular expression in javascript , it doesn't work and failes with even valid email addresses . Please suggest what could be root cause of this mismatch? for e.g. in javascript , I'm getting false value with below test conditional - /^[\w!#\$'\*\+=\?\^\/~-]+(\.[\w!#\$'\*\+=\?\^\/~-]+)*@([a-zA-Z0-9\-]+\.)+ [A-Z]{2,4}$/.test("raju.rathi@gmail.com")
has answer: http://stackoverflow.com/a/26585096
tagged with: java
has answer: http://stackoverflow.com/a/26584876
accepted answer: http://stackoverflow.com/a/26584876
tagged with: email-validation
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/41785618

http://stackoverflow.com/comment/41790670
has text: From where do you want to get `title` and `message`?
type: Comment
comment on: http://stackoverflow.com/q/26587809
score: 0
type: QuestionComment

http://stackoverflow.com/a/26578750
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26578744
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26578744
score: 1
has body: This: contentType: "X-Requested-With:XMLHttpRequest", Is not a valid content type. Remove that line.

http://stackoverflow.com/q/26597618
has answer: http://stackoverflow.com/a/26597805
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26597664
has comment: http://stackoverflow.com/comment/41809659
has title: HTML DOM and jQuery DOM in one simple line?
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: canvas
has body: I am working on some code in Javascript using a HTML5 canvas and jQuery. I am using getElementById to get the canvas and I'm using $('canvas') to get the canvas to use a jQuery function. The problem is if I use getElementById I can't use jQuery on the element and vice versa. Is there a simple line that works with both?
has comment: http://stackoverflow.com/comment/41809544
tagged with: jquery
has comment: http://stackoverflow.com/comment/41809598

http://stackoverflow.com/comment/41757450
comment on: http://stackoverflow.com/q/26569130
score: 0
type: QuestionComment
type: Comment
has text: Voted to reopen as I'm pretty curious. There is presumably one or more specific, objective reasons for this decision. Presumably JavaScript could have used `/* use strict */` or `/* __STRICT__ */` or the like in place of `"use strict";`.

http://stackoverflow.com/a/26547515
score: 0
has comment: http://stackoverflow.com/comment/41718068
type: Answer
has comment: http://stackoverflow.com/comment/41717839
has comment: http://stackoverflow.com/comment/41718007
answers question: http://stackoverflow.com/q/26547339
has body: You are trying to call getElementsByTagName on a NodeList. root = xmlDoc.documentElement; weapons = root.getElementsByTagName("weapon"); weapons[0].childNodes[0].textContent;

http://stackoverflow.com/comment/41821736
type: Comment
has text: You can call function before submitting form like, and in this function you can actually getEelementById and iterate through values
comment on: http://stackoverflow.com/a/26604362
type: AnswerComment
score: 0

dom-events
tags question: http://stackoverflow.com/q/26667109
tags question: http://stackoverflow.com/q/26555638
tags question: http://stackoverflow.com/q/26656636
tags question: http://stackoverflow.com/q/26547793
tags question: http://stackoverflow.com/q/26670154
tags question: http://stackoverflow.com/q/26558155
tags question: http://stackoverflow.com/q/26528725
tags question: http://stackoverflow.com/q/26550413
tags question: http://stackoverflow.com/q/26540075
tags question: http://stackoverflow.com/q/26554607
tags question: http://stackoverflow.com/q/26527153
type: Tag
tag name: dom-events
tags question: http://stackoverflow.com/q/26659058
tags question: http://stackoverflow.com/q/26519206
tags question: http://stackoverflow.com/q/26624018
tags question: http://stackoverflow.com/q/26557304
tags question: http://stackoverflow.com/q/26592645

http://stackoverflow.com/q/26648378
linked to: http://stackoverflow.com/q/21332853
favorite count: 0
tagged with: cordova
has answer: http://stackoverflow.com/a/26649293
type: AnsweredQuestion
has body: Before I dive into some serious fiddling, have I got it right? PhoneGap is a build tool, not a dev tool. I can design my html/JavaScript routines in notepad if I wish, and use PhoneGap to "build" the native app housing the html/JavaScript container. I can use PhoneGap build service to build for all platforms, eliminating the need to have every platform available to me. PhoneGap seems to walk in the direction of using Eclipse. Eclipse will make my life easier allowing me to spool up my app directly on a virtual mobile device (it access the appropriate (installed) SDK/virtualizer) to show me my app and allow me to test it. Without Eclipse, I will have to build and physically test on the device ? I have never used Eclipse, but quite like Visual Studio, even for basic html/JavaScript coding. (Although Visual Studio 2012 does not debug JavaScript). Can Eclipse Debug Javascript ? Should I use (get used to) Eclipse to use that as my main mobile dev tool? As it stands now, is there a difference between PhoneGap and Cordova? Was/is there a code split, or it it just some naming that got stuck.
score: 1
has comment: http://stackoverflow.com/comment/41901557
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26649293
tagged with: mobile
tagged with: javascript
has title: PhoneGap - basic architecture
tagged with: development-environment
answer count: 1
downvote count: 0

http://stackoverflow.com/a/26606877
answers question: http://stackoverflow.com/q/26606670
type: Answer
has comment: http://stackoverflow.com/comment/41827077
has body: AngularJS provides an ng-trim directive for doing this see the input directive documentation. If this isn't what you were looking for, then using a regular expression as suggested by @KyleK.
accepted answer of: http://stackoverflow.com/q/26606670
upvote count: 1
has comment: http://stackoverflow.com/comment/41826709
has comment: http://stackoverflow.com/comment/41826553
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26638309
downvote count: 0
has comment: http://stackoverflow.com/comment/42020459
score: 4
has comment: http://stackoverflow.com/comment/42056800
type: Answer
answers question: http://stackoverflow.com/q/26561879
has body: Maybe I'm missing something here but couldn't you simply do this: if (userLanguage != 'en') { i18n.init({ lng : userLanguage, shortcutFunction : 'defaultValue', fallbackLng : false, load : 'unspecific', resGetPath : 'locales/__lng__/__ns__.json' }); } That way your script i18n wouldn't be initialized unless you actually needed the translation service.
upvote count: 4

http://stackoverflow.com/q/26596611
has title: Retrieving Database Data to JSON - Mobile Login Form
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41809425
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/41809122
tagged with: javascript
has answer: http://stackoverflow.com/a/26597680
has comment: http://stackoverflow.com/comment/41809058
score: 0
has body: Im creating Mobile App using Phonegap that first need to login. if login success It will retrieve the data to JSON. This is the PHP page that connects to mobile site and retrieve the data. <?php $con = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password,$mysql_database); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }else{ //echo 'ok'; } if(isset($_POST['username']) && isset($_POST['password'])){ $username = $_POST['username']; $password = $_POST['password']; } $sql = "SELECT * FROM member WHERE username = '$username' AND password = '$password'"; $result = mysqli_query($con,$sql); if (!$result) { //die('Error: ' . mysqli_error($con)); $data = array('status'=>'failure','Error: ' . mysqli_error($con)); }else { //$result = mysqli_query($con,$sql); $row = mysqli_fetch_array($result); $details = array( 'id'=>$row['id'], 'username'=>$row['username'], 'email'=>$row['email'], 'password'=>$row['password'], 'repassword'=>$row['repassword'], ); $data = array('status'=>'success','data'=>$details); } echo json_encode($data); mysqli_close($con); ?> but it doesnt work properly. I'm following my lecturer Code. but i think he has missed something here my HTML content Login Password Login
has comment: http://stackoverflow.com/comment/41809899
answer count: 1
tagged with: cordova

http://stackoverflow.com/q/26534010
has comment: http://stackoverflow.com/comment/41694882
answer count: 0
type: UnansweredQuestion
has title: Target appended item from database by using JQuery code
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/41695754
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
has body: How can target this appended item in a code when working with jquery? target: +item.Gender+ Appended items: $('#myListView').append('&lt;li class="ui-nodisc-icon" data-icon="listIcon" &gt; &lt;a href="" data- key='+item.randomPostId+'&gt;&lt;img class="feedImage" src='+item.Pic+'&gt;&lt;/img&gt;&lt;p&gt;&lt;strong&gt;'+item.Name+", "+item.Gender+'&lt;/p&gt;&lt;/strong&gt;' To be added in this line of code where it says item.Gender: $('#myListView li[item.Gender="female"]').hide();
linked to: http://stackoverflow.com/q/5891840

http://stackoverflow.com/comment/41736523
comment on: http://stackoverflow.com/a/26557483
type: AnswerComment
score: 0
type: Comment
has text: wow! It works, after running the function returned, the name provided is actually the name of constructor.

http://stackoverflow.com/a/26575340
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41768670
has comment: http://stackoverflow.com/comment/41768329
has body: Via REST there's no concept of sessions really. REST calls are meant to be stateless meaning that the (current) user at /me will be serialized from the token provided. If the token is associated to a user it will return the JSON representation of that user otherwise in returns an error. One way or another that call is asynchronous so you can't really use it in and if statement. You can do: app.get('/api', function(req, res, next) { var token = getTokenFromRequest(req); serializeUserFromToken(token,function(err,parseResponse) { if(err) return next(err) if(parseResponse.code &amp;&amp; parseResponse.code === 101){ // called to parse succedded but the token is not valid return next(parseResponse); } // parseResponse is the current User. next(); }); }); Where serializeUserFromToken makes a request to Parse with the token in the X-Parse-Session-Token header field.
has comment: http://stackoverflow.com/comment/41768381
accepted answer of: http://stackoverflow.com/q/26575125
answers question: http://stackoverflow.com/q/26575125
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41768732

http://stackoverflow.com/q/26543980
tagged with: ng-options
accepted answer: http://stackoverflow.com/a/26544287
answer count: 1
tagged with: javascript
score: 0
has title: default selected items dynamically in several options in angular
tagged with: html-select
tagged with: angularjs
type: AnsweredQuestion
has body: i am seeing the example here https://docs.angularjs.org/api/ng/directive/select and this have 3 select with the same value, how can i have different values selected in my options? i have this: {{tarea.NAME}} {{tarea.CLASIFICADORES}} Eliminar so i can have 5,10,15 options, and i want to make a selected item with the value that i have in tarea.CLASIFICADORES, i tried with this $scope.selectedOpt = $scope.clasificadores[1] but that make all the options with the same value, like in the example... how can i make different selected item in my options dynamically with a value i have in my ng-repeat in every item? i load the data with ajax... my problem is to set the default selected item with the tarea.CLASIFICADORES. for example, i have a todo list that have a classifier, i want my ng-options to select by default my database value clasifier when the page is load
has answer: http://stackoverflow.com/a/26544287
type: Question

python
tags question: http://stackoverflow.com/q/26560977
tags question: http://stackoverflow.com/q/26543226
tags question: http://stackoverflow.com/q/26578246
tags question: http://stackoverflow.com/q/26619698
tags question: http://stackoverflow.com/q/26593759
tags question: http://stackoverflow.com/q/26538871
tags question: http://stackoverflow.com/q/26664247
tags question: http://stackoverflow.com/q/26661054
tags question: http://stackoverflow.com/q/26529032
tag name: python
tags question: http://stackoverflow.com/q/26644490
tags question: http://stackoverflow.com/q/26584984
tags question: http://stackoverflow.com/q/26639437
tags question: http://stackoverflow.com/q/26536554
tags question: http://stackoverflow.com/q/26518355
tags question: http://stackoverflow.com/q/26572351
tags question: http://stackoverflow.com/q/26532327
tags question: http://stackoverflow.com/q/26518985
tags question: http://stackoverflow.com/q/26573148
tags question: http://stackoverflow.com/q/26525578
type: Tag
tags question: http://stackoverflow.com/q/26617775
tags question: http://stackoverflow.com/q/26584215
tags question: http://stackoverflow.com/q/26667990
tags question: http://stackoverflow.com/q/26653721
tags question: http://stackoverflow.com/q/26615742
tags question: http://stackoverflow.com/q/26576491
tags question: http://stackoverflow.com/q/26562430

http://stackoverflow.com/q/26599498
has answer: http://stackoverflow.com/a/26599577
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 1
has title: jQuery function to sometimes redirect after an AJAX Request is completed and to sometimes remain on the page?
accepted answer: http://stackoverflow.com/a/26599577
type: AnsweredQuestion
has body: I have a page that lets you Add/Edit/Delete "Project Tasks" and Save the data to a database using jQuery's AJAX function to save the POST data. I currently have 2 buttons on the page. Button 1 .save-tasks-ajax-redirect - You click it and it makes a regular non-ajax POST to my backend and you are redirected to another Project page. This button does not have a click event yet. Perhaps the best way might be to simply create a new click event for this button class and then have it call my save function but it could pass in a variable to indicate that it needs to redirect? Before I posted this questions I was sort of hoping to have both button share the same click event and everything but perhaps this is a better idea? Button 2 .save-tasks-ajax - You click it and it uses AJAX to Save the data and you can remain on the page editing more. Now my goal is to modify how Button 1 works. Instead of making a regular HTTP POST, I would like for it to also make an AJAX save but when it is done, I would like it to redirect to a project page. So below I have my 2 button HTML codes. Below that I have my jQuery Click event for my AJAX save button (Button 2) and below that I have my ajaxSaveTasks() function that my button calls to make the save. I would like to modify this function and perhaps all of this code so that my Button 1 can use the same function to make an AJAX save but somehow it needs to differentiate itself so that it can also do a redirect after the AJAX save is complete. Looking at the basic code below, how could I modify this to do that? Save Tasks and Return to Project Save Tasks and Continue Editing $(window).load(function () { // AJAX Save and Continue editing $('#content').on('click', '.save-tasks-ajax', function () { console.log('AJAX Save and Continue Editing Button Clicked!'); ajaxSaveTasks(); return false; // avoid to execute the actual submit of the form. }); }); function ajaxSaveTasks(){ console.log('ajaxSaveChanges() Ran and Tasks Saved.'); // Reset Flag that…
score: 0
type: Question

http://stackoverflow.com/a/26708645
answers question: http://stackoverflow.com/q/26668800
type: Answer
downvote count: 0
has body: To fix this issue, I enable the RegExp filter as bellow. $('#nameSel').on('change', 'select', function () { var name= $(this).val(); oTable.fnFilter( "^" + name + "$", 1, true); }); Note: nameSel is an id of the drop down. I enabled the RegExp filter by passing true as bellow. oTable.fnFilter( "^" + name + "$", 1, true);
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26668800
type: AcceptedAnswer

http://stackoverflow.com/q/26585553
possible better answer: http://stackoverflow.com/a/26585701
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41786547
has comment: http://stackoverflow.com/comment/41786668
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26585701
has body: i need a little help. i have a javascript with the variable row_id. i need the variable in my bootstrap modal window. can anybody help me? &lt;script type="text/javascript"&gt; $("#myModal").modal(); $("tr button").click(function(e) { e.preventDefault(); var row_id = $(this).closest("tr").attr("data-row-id"); alert(row_id); }); &lt;/script&gt;
has title: JavaScript Variable in Modal Window with Post or something else
has comment: http://stackoverflow.com/comment/41786593
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26585736
accepted answer: http://stackoverflow.com/a/26585736

http://stackoverflow.com/a/26590020
answers question: http://stackoverflow.com/q/26589882
has body: Looks like a typo to me: setTimeout's prototype: setTimeout(function,milliseconds,lang) You added the 5000 param to the ajax method and not to the setTimeout method. Here's the valid code: this.ItemId = function (ItemId) { var itemParameters = ItemId; //put a timer setTimeout(function() { $.ajax({ type: "POST", url: '/Menu/ChangeItemId', dataType: 'json', data: JSON.stringify(itemParameters), contentType: "application/json; charset=utf-8", success: self.ChangeItemIdSuccess, error: errorFunc }); }, 5000); }; Here's a simple example of setTimeout.
has comment: http://stackoverflow.com/comment/41794846
upvote count: 2
has comment: http://stackoverflow.com/comment/41794952
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41962001
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26652203
score: 0
has text: Right now I achieved to create something like this: http://jsfiddle.net/enne87/7r4roq0e/2/ Anyway, as you can see in this example, the two data-sets have to contain the exact same data-values. As soon as I change the data values in one of the sets, it does not work anymore.

http://stackoverflow.com/comment/41670948
type: Comment
type: QuestionComment
has text: My first thought is SVG. Write down the background path in SVG, use `path.getPointAtLength` to get the positions of points every .1% or so, use the right number of those points to create the foreground path.
score: 0
comment on: http://stackoverflow.com/q/26520878

http://stackoverflow.com/a/26786316
has comment: http://stackoverflow.com/comment/42192377
upvote count: 1
type: AcceptedAnswer
has body: By playing with jQuery and the SVG chart, you could do something like this: // Reduce the rectangle background of each label $(".dxc-labels-group rect").attr("x", "-16"); $(".dxc-labels-group rect").attr("y", "-12"); $(".dxc-labels-group rect").attr("width", "32"); $(".dxc-labels-group rect").attr("height", "15"); // Reduce the font-size of each label: $(".dxc-labels-group rect + text").css("font-size", "11px"); // Separate the labels by moving up/down some of them $.each($(".dxc-labels-group .dxc-labels &gt; g &gt; g[transform]"), function(i, elm) { // 1) Save the original Y coord of the label var translateY = $(elm).attr("transform").match(/translate\(\d{1,4},(\d{1,4})\)/); if(translateY &amp;&amp; translateY[1]) { // 2) Move up/down the label according to its color switch($(elm).children("rect").attr("fill")) { // 3/ For example, move up the blue ones case "#91bdc7": var move = 30; // Move up var transform = $(elm).attr("transform").replace(/(translate\(\d{1,4},)(\d{1,4})(\))/, "$1"+(translateY[1]-move)+"$3"); $(elm).attr("transform", transform); break; // Do similar things for other colors... } } }); To run this code, copy/paste it in the console (with Chrome it works like a charm).
has comment: http://stackoverflow.com/comment/42205268
has comment: http://stackoverflow.com/comment/42185883
type: Answer
accepted answer of: http://stackoverflow.com/q/26608715
downvote count: 0
has comment: http://stackoverflow.com/comment/42195394
answers question: http://stackoverflow.com/q/26608715
score: 1

http://stackoverflow.com/comment/41710218
comment on: http://stackoverflow.com/a/26542739
type: Comment
has text: FYI there is no need to do `.append($(span))`. In your code, `span` *already is* a jQuery object, `.append(span)` will do just fine. Or `span.appendTo("#myDiv")`. That's also the reason why the correct naming convention for that variable would have been `$span`.
score: 1
type: AnswerComment

http://stackoverflow.com/q/26615145
has comment: http://stackoverflow.com/comment/41841739
has comment: http://stackoverflow.com/comment/41843445
tagged with: jquery
has answer: http://stackoverflow.com/a/26615376
accepted answer: http://stackoverflow.com/a/26615376
favorite count: 0
has comment: http://stackoverflow.com/comment/41851392
has answer: http://stackoverflow.com/a/26615296
has comment: http://stackoverflow.com/comment/41842384
has answer: http://stackoverflow.com/a/26615413
has comment: http://stackoverflow.com/comment/41842410
has title: Turning vanilla JavaScript into jQuery
has comment: http://stackoverflow.com/comment/41857466
has comment: http://stackoverflow.com/comment/41841771
upvote count: 6
has comment: http://stackoverflow.com/comment/41841776
has comment: http://stackoverflow.com/comment/41845510
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41841742
score: -4
has comment: http://stackoverflow.com/comment/41844400
has comment: http://stackoverflow.com/comment/41842847
downvote count: 10
type: Question
possible better answer: http://stackoverflow.com/a/26615413
tagged with: javascript
has body: Noob here. I am currently in a development bootcamp (some of you may not like these types of things) and am learning a lot in a fast paced environment! Anyways, I have written this code which is fully functional, however my professor told me to rewrite this using jQuery (solely for teaching purpose, individual bias on which practice is better is unnecessary). I was hoping someone here could help me write some code that functions the exact same way as mine posted below, except using jQuery instead of vanilla JavaScript as I am having some trouble. Thanks in advance! electa.page.populateStates = function (array) { var array = [ { "id": 1, "countryCode": "NA", "stateCode": "NA", "regionName": "" }, { "id": 2, "countryCode": "AK", "stateCode": "US", "regionName": "Alaska" }, { "id": 3, "countryCode": "AL", "stateCode": "US", "regionName": "Alabama" }, { "id": 82, "countryCode": "WY", "stateCode": "US", "regionName": "Wyoming" } ]; var selectList = document.getElementById( 'location.state' ); for ( var i = 0; i &lt; array.length; i++ ) { var option = document.createElement( "option" ); option.setAttribute( "value", array[ i ].id ); option.text = array[ i ].regionName; selectList.appendChild( option ); } }
has comment: http://stackoverflow.com/comment/41842393
answer count: 3

http://stackoverflow.com/a/26644326
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26644255
type: Answer
has comment: http://stackoverflow.com/comment/41895146
score: 5
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/26644255
has body: This is what you need for a start: function draw() { context.clearRect(0, 0, canvas.width, canvas.height); context.fillStyle = "rgb(200, 100, 220)"; context.fillRect(50, 50, 100, 100); x += (speed * mod) * Math.cos(Math.PI / 180 * angle); y += (speed * mod) * Math.sin(Math.PI / 180 * angle); context.save(); context.translate(x, y); context.rotate(Math.PI / 180 * angle); context.drawImage(car, -(car.width / 2), -(car.height / 2)); context.restore(); } That is the original render function, but you use it as draw. Also, there were invalid width and height references inside, so I used canvas.width and canvas.height. This is the progress so far: http://jsfiddle.net/qf47mb4k/ Added an existing car image here, so no more errors in the console: http://jsfiddle.net/qf47mb4k/2/ WASD keys are now working, but you need to clear the canvas on every frame to get what you expected. After fixing your canvas and context objects (also removed jQuery): var canvas = document.getElementById('gameCanvas'); var context = canvas.getContext('2d'); To get the brakes working, you need to fix your keyup handler: window.addEventListener("keyup", keyup_handler, false); Everything seems fine now: http://jsfiddle.net/qf47mb4k/4/. Enjoy driving the car! Full Code / Working Example var x = 0; var y = 0; var speed = 5; var angle = 0; var mod = 0; var canvas = document.getElementById('gameCanvas'); var context = canvas.getContext('2d'); var car = new Image(); car.src = "http://images.clipartpanda.com/car-top-view-clipart-red-racing-car-top-view-fe3a.png"; window.addEventListener("keydown", keypress_handler, false); window.addEventListener("keyup", keyup_handler, false); var moveInterval = setInterval(function () { draw(); }, 30); function draw() { context.clearRect(0, 0, canvas.width, canvas.height); context.fillStyle = "rgb(200, 100, 220)"; context.fillRect(50, 50, 100, 100); x += (speed * mod) * Math.cos(Math.PI / 180 * angle); y += (speed * mod) * Math.sin(Math.PI / 180 * angle); context.save(); co…
has comment: http://stackoverflow.com/comment/41894969

http://stackoverflow.com/q/26540864
score: 0
accepted answer: http://stackoverflow.com/a/26541568
has body: I have a textarea and a submit button. When the button is clicked, I want the value of the textarea to be placed in a container (in a paragraph tag). And I want this value to be stored on my web server. How do I write this? Thanks
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41706628
tagged with: comments
type: Question
has answer: http://stackoverflow.com/a/26541568
tagged with: textarea
answer count: 1
tagged with: javascript
tagged with: webforms
has title: Simple Javascript Commenting Form

http://stackoverflow.com/comment/41729201
has text: @Mr.BigglesWorth For angular projects where upgrading wasn't an option I just loaded another directive like: https://github.com/shahata/angular-debounce
comment on: http://stackoverflow.com/a/26539472
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/83570005
has text: I can't believe I actually had to look this up to find out why my code was wrong. I swear, javascript, sometimes...
type: AnswerComment
comment on: http://stackoverflow.com/a/26614852
type: Comment
score: 2

http://stackoverflow.com/a/26669284
has comment: http://stackoverflow.com/comment/41960828
accepted answer of: http://stackoverflow.com/q/26668877
has body: Please refer to the plunker referred, the JS &amp; CSS for the colorpicker has been taken from the site you linked. http://plnkr.co/edit/nYSY6b7JJwdHXJ7SmcdP?p=preview Ideally this pattern would solve your problem- &lt;script&gt; $(function(){ $(".className").colpick({ /* Inner Code. */ }); }); &lt;/script&gt; EDIT: Okay, so your problem is not related to plugin. Take a look at the updated plunker- http://plnkr.co/edit/nYSY6b7JJwdHXJ7SmcdP?p=preview $.each($('.colorpicker'),function(){ $(this).css('background','#'+$(this).val()); }); This will solve your problem, since the plugin doesn't have any convenient methods/options available. EDIT - Final solution To load the colors already in the input field, and activate the script correctly, here's how to do it: $.each($('.colorpicker'),function(){ //init code var defCol = $(this).val(); $(this).css('border-color','#'+defCol); //plugin $(this).colpick({ layout:'hex', submit:0, color: defCol, onChange:function(hsb,hex,rgb,el,bySetColor) { $(el).css('border-color','#'+hex); // Fill the text box just if the color was set using the picker, and not the colpickSetColor function. if(!bySetColor) $(el).val(hex); } }).keyup(function(){ $(this).colpickSetColor(this.value); }); });
downvote count: 0
has comment: http://stackoverflow.com/comment/41943223
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41939806
upvote count: 1
answers question: http://stackoverflow.com/q/26668877
has comment: http://stackoverflow.com/comment/41972867
score: 1

http://stackoverflow.com/comment/41944153
type: AnswerComment
has text: Thanks. I used the word class only because MDN referred to it. In truth I do come from a C# background so my view is somewhat warped. This is why I'm going through various bits and pieces of documentation, to understand how to properly use OOP in JavaScript and not get lost in the C# vs. JavaScript implementations thereof.
score: 0
comment on: http://stackoverflow.com/a/26671525
type: Comment

http://stackoverflow.com/q/26534589
linked to: http://stackoverflow.com/q/17788289
has title: Isolated scope parent directive to ng-repeat children
type: Question
has comment: http://stackoverflow.com/comment/41695617
has comment: http://stackoverflow.com/comment/41697984
tagged with: javascript
has body: I have a parent directive: .directive("parentDirective", function(){ return{ restrict: "A", controller: "Ctrl", scope: {}, transclude: true, template: "{{output1}} ", link: function(scope, elem, attrs){ scope.output1 = "output1" scope.output2 = "output2" scope.output3 = "output3" scope.children = [1,2,3,4] } } }) The following parent directive is isolated scope and has children directives which I'd like to loop through via ng-repeat: .directive("childDirective", function(){ return{ restrict: "A", controller: "Ctrl", scope: {}, transclude: true, template: "{{output1}} ", link: function(scope, elem, attrs){ scope.output1 = "output1" scope.output2 = "output2" scope.output3 = "output3" } } }) HTML: {{output2}} {{children}} But due to the fact that I have isolated the scope, doing scope.children = [1,2,3,4] does not output to the html to then be used in the ng-repeat for the children. How can I solve this? See JSBIN: http://jsbin.com/gubamu/2/edit?html,js,output Thanks!
score: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41695712
answer count: 0

http://stackoverflow.com/comment/41863772
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26627030
score: 0
has text: I see. So it's a pain in the butt in other words to get what I want?

http://stackoverflow.com/comment/41780283
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26581987
has text: http://api.jquery.com/descendant-selector

http://stackoverflow.com/a/26609228
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26609169
has body: Because this inside a extjs event handler does not refer to the dom element instead this will refer to a extjs checkbox object. jQuery won't be able to find out the target element using the extjs object reference. Instead you have the getValue() method of checkbox which will return the checked state value, so Try { xtype: 'checkbox', boxLabel: 'Show message', id: 'mainBox', handler: function (el) { alert(el.getValue()); } }
downvote count: 0
type: Answer

http://stackoverflow.com/a/26668424
score: 0
has body: First in form tag use enctype="multipart/form-data" for upload image. And than run this script hope this will hemp you. if ($_POST) { $tmpname = $_FILES['image']['tmp_name']; @img_resize( $tmpname , 600 , "uploads" , "album_".$id.".jpg"); @img_resize( $tmpname , 120 , "uploads" , "album_".$id."_small.jpg"); @img_resize( $tmpname , 60 , "uploads" , "album_".$id."_maxheight.jpg", 1); } else echo "No Images uploaded via POST"; function img_resize( $tmpname, $size, $save_dir, $save_name, $maxisheight = 0 ) { $save_dir .= ( substr($save_dir,-1) != "/") ? "/" : ""; $gis = getimagesize($tmpname); $type = $gis[2]; switch($type) { case "1": $imorig = imagecreatefromgif($tmpname); break; case "2": $imorig = imagecreatefromjpeg($tmpname);break; case "3": $imorig = imagecreatefrompng($tmpname); break; default: $imorig = imagecreatefromjpeg($tmpname); } $x = imagesx($imorig); $y = imagesy($imorig); $woh = (!$maxisheight)? $gis[0] : $gis[1] ; if($woh &lt;= $size) { $aw = $x; $ah = $y; } else { if(!$maxisheight){ $aw = $size; $ah = $size * $y / $x; } else { $aw = $size * $x / $y; $ah = $size; } } $im = imagecreatetruecolor($aw,$ah); if (imagecopyresampled($im,$imorig , 0,0,0,0,$aw,$ah,$x,$y)) if (imagejpeg($im, $save_dir.$save_name)) return true; else return false; }
type: Answer
answers question: http://stackoverflow.com/q/26667832

http://stackoverflow.com/comment/43012196
has text: Notice that `==` doesn't work on `Date` objects as you would expect
type: Comment
score: 3
comment on: http://stackoverflow.com/a/27271132
type: AnswerComment

http://stackoverflow.com/q/26661394
has answer: http://stackoverflow.com/a/26662474
has title: pattern line in different scales
tagged with: design-patterns
type: AnsweredQuestion
has body: I'm drawing lines with a pattern i'm creating on different canvas. I'm translating and scaling the context matrices and creating another pattern to achieve that each line will start exactly from the beginning of the pattern. (as we know that patterns are created from the beginning of the context repeatedly for all context area and not depends on the drawing) I've managed to do so as show below for most of the cases. Each row represents a scale. and drawing many lines on different Y values. Each line should have red circles repeatedly along the X axis. It is working for many scales. The problem is in scale 1.6. The 3rd row lines. As we see, the lines in this row are not well patterned as the Y value is growing, and also the start is not right. I think it is some floating point problem.. but i can't find the problem. var ctx = demo.getContext('2d'), pattern, offset = 0; /// create main pattern ctx.fillStyle = 'red'; ctx.beginPath(); ctx.arc(8, 8, 7, 0, Math.PI * 2); ctx.fill(); runScale(1, 0); runScale(1.5, 120); runScale(1.6, 240); runScale(2, 360); runScale(3, 480); function runScale(scale, firstPntX) { var newCanvasSize = { width: demo.width * scale, height: demo.height * scale }; demo2.width = Math.round(newCanvasSize.width); demo2.height = Math.round(newCanvasSize.height); var firstPnt = { x: firstPntX }; var offsetPnt = { x: 0, y: (newCanvasSize.height / 2) }; var ctx2 = demo2.getContext('2d'); var pt = ctx2.createPattern(demo, 'repeat'); ctx = demo3.getContext('2d'); for (var i = 20; i &lt; 1000; i += (demo2.height + 10)) { drawLines(i); } function drawLines(y) { firstPnt.y = y; demo2.width = demo2.width; ctx2.fillStyle = pt; var offsets = [firstPnt.x, y - demo2.height / 2]; ctx2.translate(offsets[0], offsets[1]); ctx2.scale(scale, scale); ctx2.fillRect(-offsets[0] / scale, -offsets[1] / scale, demo2.width / scale, demo2.height / scale); ctx.lineWidth = newCanvasSize.height; pattern = ctx.createPattern(demo2, 'repeat'); ctx.beginPath(); ctx.moveTo(firstPnt.x, f…
type: Question
tagged with: canvas
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26662474
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/26531008
has comment: http://stackoverflow.com/comment/41688617
tagged with: javascript
has comment: http://stackoverflow.com/comment/41722638
score: 0
has comment: http://stackoverflow.com/comment/41736753
has comment: http://stackoverflow.com/comment/41697446
tagged with: asp.net-web-api
tagged with: asp.net
has body: I'm developing a MVC web application. I need to check authentication for the following purposes: Entering the application (users must be logged in). Web api calls from javascript (from within the application). I created a web api project with the ASP.Net users tables. On the login of the client side i'm posting a webrequest to get the token. I store the token in a cookie for the javascript usage (for purpose 2). It works well. What is the standard way to get the application to know that the user is logged in (for purpose 1)? Isn't there an implementation for all of it in the asp.net Identity?
has comment: http://stackoverflow.com/comment/41722438
type: UnansweredQuestion
has title: asp.net authentication for application + web api
answer count: 0
has comment: http://stackoverflow.com/comment/41746989
has comment: http://stackoverflow.com/comment/41733823
has comment: http://stackoverflow.com/comment/41691376
type: Question
tagged with: asp.net-identity
tagged with: c#

http://stackoverflow.com/comment/41765482
has text: Looks promising. I cannot use it without modification though. If I search for "Barn" it will not match "Barney", which I expect it to.
comment on: http://stackoverflow.com/a/26555044
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41814835
type: Comment
comment on: http://stackoverflow.com/a/26600047
has text: As the final callback .on, so I think there will be performance advantages; the other maybe removed, like .live
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42203698
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26549608
has text: yes @fonkap but the `ElementPolicy` does not permit to handle most of my usecases :( https://code.google.com/p/owasp-java-html-sanitizer/
type: Comment

http://stackoverflow.com/q/26593655
has comment: http://stackoverflow.com/comment/41806620
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41802474
score: 0
type: Question
has title: Determine value depending on input types
tagged with: javascript
has answer: http://stackoverflow.com/a/26593895
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26593891
has comment: http://stackoverflow.com/comment/41802294
has answer: http://stackoverflow.com/a/26593891
accepted answer: http://stackoverflow.com/a/26593895
has body: I have a select type dropdown, which upon selection redirects users to another page. I want them to be warned if they try to navigate away without saving when using this select dropdown. However it needs to ignore this specific select type as one of the input types when determining that an input type has changed. This is my script, but it doesn't perform the desired action, (where .send1 references to the actual select type): $(document).on('change', '.send1', function(){ if($(":input").not('.send1')){ $(":input").change(function(){ unsaved = true; }); } }); If unsaved == true then a users have a warning that there are unsaved changes.

http://stackoverflow.com/comment/41829263
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26608499
type: Comment
has text: Have you tried to add type="text/javascript" in your script tag ?

http://stackoverflow.com/comment/41720843
comment on: http://stackoverflow.com/q/26548689
score: 0
has text: Also, what does `console.log(req.headers['content-type'])` show?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/87816885
type: Comment
type: QuestionComment
score: 0
has text: Possible duplicate of [Why not take Javascript event delegation to the extreme?](https://stackoverflow.com/questions/9711118/why-not-take-javascript-event-delegation-to-the-extreme)
comment on: http://stackoverflow.com/q/26659058

http://stackoverflow.com/comment/41944313
score: 0
type: Comment
type: QuestionComment
has text: @KristofferNolgren I've posted another answer, check this fiddle: http://jsfiddle.net/pqse3er1/
comment on: http://stackoverflow.com/q/26671650

http://stackoverflow.com/comment/41892683
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26643049
has text: Possible? Yes. Practical? No. This is a bad question and not what stackoverflow is for. We're here to help people when they have code that doesn't work, and they've tried to figure out why but just can't figure it out.

http://stackoverflow.com/q/26663986
tagged with: rootscope
type: Question
upvote count: 2
tagged with: function
answer count: 1
has answer: http://stackoverflow.com/a/26664083
accepted answer: http://stackoverflow.com/a/26664083
tagged with: javascript
favorite count: 0
has title: Call function from directive in $rootScope - AngularJS
tagged with: angularjs
has body: What I want to do: I'm trying to create a function within a directive that can be called from the $rootScope. The Problem: It seems to only be working on the last item in the DOM which has this directive. I'm guessing that what's happening is rootScope.myFunction gets overwritten each time this directive runs. The Question: How can I create one function in the $rootScope which, when called, runs the internal function for each directive instead of just the last one? The Relevant Code: (function() { angular.module('home') .directive('closeBar', closeBar); closeBar.$inject = ['$rootScope', '$window']; function closeBar(rootScope, window) { return { scope: true, restrict: 'A', link: function(scope, element, attrs) { var myFunction = function() { // do stuff }; myFunction(); rootScope.myFunction = function() { myFunction(); }; } }; } })(); Then in a different script, I want to call: rootScope.myFunction(); Note, I'm not allowed to share actual code from the project I'm working on so this is a more general question not tied to a specific use case.
tagged with: angularjs-directive
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41777281
type: Comment
has text: try reading the docs about how jQuery works
comment on: http://stackoverflow.com/q/26578762
type: QuestionComment
score: 0

http://stackoverflow.com/q/26567835
has comment: http://stackoverflow.com/comment/41825959
has comment: http://stackoverflow.com/comment/41776566
type: Question
has comment: http://stackoverflow.com/comment/41776635
has comment: http://stackoverflow.com/comment/41830350
tagged with: javascript
score: 0
answer count: 3
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41773519
favorite count: 0
has comment: http://stackoverflow.com/comment/41754787
has answer: http://stackoverflow.com/a/26577636
has answer: http://stackoverflow.com/a/26567932
has body: I developed this short script but I'm wondering what is the best way to make $ul, $el and some functions e.g. select private. At the moment these are part of public interface but I would like to hide these. Wrap into another function returning DropDown object maybe? What would be the proper way to do this? Code below: namespace = {}; namespace.DropDown = function(el) { this.$el = $(el) this.$trigger = this.$el.find(".trigger"); this.$ul = this.$el.find("ul"); this.$li = this.$ul.find("li"); this.$trigger.text(this.$ul.find(".selected").text()); this.$trigger.on("click", $.proxy(this.open, this)); } namespace.DropDown.prototype.open = function(e) { e.stopImmediatePropagation(); this.$ul.addClass("open"); // position selected element in the middle var scrollUp, panelCenter = this.$ul.scrollTop() + (this.$ul.innerHeight() / 2), selectedPositionTop = this.$ul.scrollTop() + this.$ul.find(".selected").position().top; if (selectedPositionTop &gt; panelCenter) { scrollUp = selectedPositionTop - panelCenter; this.$ul[0].scrollTop = this.$ul[0].scrollTop + scrollUp; } else { scrollUp = panelCenter - selectedPositionTop; this.$ul[0].scrollTop = this.$ul[0].scrollTop - scrollUp; } // position elements whole container (list container) var triggerTop = this.$trigger.offset().top + (parseInt(this.$trigger.css("padding-top")) || 0) + (parseInt(this.$trigger.css("border-top") || 0)), t = Math.abs(triggerTop - this.$ul.find(".selected").offset().top); this.$ul.css("top", -t + "px"); this.$li.one("click", $.proxy(this.select, this)); $(document).one("click", $.proxy(this.close, this)); } namespace.DropDown.prototype.close = function() { this.$li.off("click"); this.$ul.removeClass("open"); this.$ul.css("top", "0px"); } namespace.DropDown.prototype.select = function(e) { $(document).off("click"); e.stopImmediatePropagation(); this.$li.removeClass("selected"); $(e.target).addClass("selected"); this.$trigger.text(this.$ul.find(".selected").text()); this.close(e); } $(function() { new name…
has comment: http://stackoverflow.com/comment/41756295
type: UnansweredQuestion
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/41755076
tagged with: prototypal-inheritance
has answer: http://stackoverflow.com/a/26601270
has comment: http://stackoverflow.com/comment/41755297
has title: How to make properties and functions private in JavaScript?
linked to: http://stackoverflow.com/q/55611

http://stackoverflow.com/q/26614245
has answer: http://stackoverflow.com/a/48147360
type: Question
tagged with: javascript
has title: using cv.readImage() with stream in nodejs
upvote count: 1
answer count: 1
favorite count: 0
has body: Im trying to build something like this https://github.com/xenomuta/caraweb Facedetection with OpenCV and nodejs. Im using Ubuntu and Im already able to stream the pictures from my webcam. So this is my .js for the webcam var socket = io.connect(); var fps = 30; socket.on('connect', function () { $('.serverStatus').text('Connected') }); socket.on('connecting', function () { $('.serverStatus').text('Connecting') }); socket.on('disconnect', function () { $('.serverStatus').text('Disconnected') }); var declinedCam = function(e) { alert('You have to enable the webcam'); }; window.URL = window.URL || window.webkitURL; navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); var video = document.querySelector('video'); if (navigator.getUserMedia) { navigator.getUserMedia({video: true}, function(stream) { video.src = window.URL.createObjectURL(stream); }, declinedCam); } else { alert('Your browser does not support the webcamcontrol'); } video.addEventListener('play', function(e) { var canvas = document.getElementById('frontendCanvas'); var goByScale = (video.videoHeight &gt;= video.videoWidth) ? 'Height':'Width'; var scale = (300/ video['video'+goByScale]); canvas.width = video.videoWidth * scale; canvas.style.width = canvas.width + 'px'; canvas.height = video.videoHeight * scale; canvas.style.height = canvas.height + 'px'; var ctx = canvas.getContext('2d'); setInterval(function() { if(video.paused !== true){ ctx.drawImage(video, 0, 0, video.videoWidth*scale, video.videoHeight*scale); socket.emit('videoStream', canvas.toDataURL('image/webp')); } }, 1000 / fps) }, false); and the app.js var express = require('express.io'); var app = express(); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var backend = require('./rou…
type: UnansweredQuestion
tagged with: stream
tagged with: node.js
tagged with: opencv
tagged with: webcam
downvote count: 0
score: 1

c#
tags question: http://stackoverflow.com/q/26610659
tags question: http://stackoverflow.com/q/26664632
tags question: http://stackoverflow.com/q/26591563
tags question: http://stackoverflow.com/q/26624527
tags question: http://stackoverflow.com/q/26541369
tags question: http://stackoverflow.com/q/26554205
tags question: http://stackoverflow.com/q/26587607
tags question: http://stackoverflow.com/q/26559703
tags question: http://stackoverflow.com/q/26623479
tags question: http://stackoverflow.com/q/26531008
tags question: http://stackoverflow.com/q/26589646
tags question: http://stackoverflow.com/q/26613617
tags question: http://stackoverflow.com/q/26551734
tag name: c#
tags question: http://stackoverflow.com/q/26552187
tags question: http://stackoverflow.com/q/26538888
tags question: http://stackoverflow.com/q/26518162
tags question: http://stackoverflow.com/q/26662534
tags question: http://stackoverflow.com/q/26595857
tags question: http://stackoverflow.com/q/26609737
tags question: http://stackoverflow.com/q/26635023
tags question: http://stackoverflow.com/q/26660748
tags question: http://stackoverflow.com/q/26528517
tags question: http://stackoverflow.com/q/26671619
tags question: http://stackoverflow.com/q/26541464
tags question: http://stackoverflow.com/q/26630092
tags question: http://stackoverflow.com/q/26557861
tags question: http://stackoverflow.com/q/26603597
tags question: http://stackoverflow.com/q/26578789
tags question: http://stackoverflow.com/q/26667568
tags question: http://stackoverflow.com/q/26624208
tags question: http://stackoverflow.com/q/26621194
tags question: http://stackoverflow.com/q/26661846
tags question: http://stackoverflow.com/q/26603607
tags question: http://stackoverflow.com/q/26617507
tags question: http://stackoverflow.com/q/26587947
tags question: http://stackoverflow.com/q/26669307
tags question: http://stackoverflow.com/q/26651283
tags question: http://stackoverflow.com/q/26624937
tags question: http://stackoverflow.com/q/26670096
tags question: http://stackoverflow.com/q/26537420
tags question: http://stackoverflow.com/q/26601475
tags question: http://stackoverflow.com/q/26587663
tags question: http://stackoverflow.com/q/26663793
tags question: http://stackoverflow.com/q/26583045
tags question: http://stackoverflow.com/q/26640406
tags question: http://stackoverflow.com/q/26648039
tags question: http://stackoverflow.com/q/26535285
tags question: http://stackoverflow.com/q/26657826
tags question: http://stackoverflow.com/q/26662011
tags question: http://stackoverflow.com/q/26668050
tags question: http://stackoverflow.com/q/26547890
tags question: http://stackoverflow.com/q/26662961
tags question: http://stackoverflow.com/q/26573070
tags question: http://stackoverflow.com/q/26668955
tags question: http://stackoverflow.com/q/26595300
tags question: http://stackoverflow.com/q/26554683
tags question: http://stackoverflow.com/q/26671499
tags question: http://stackoverflow.com/q/26608028
tags question: http://stackoverflow.com/q/26597449
tags question: http://stackoverflow.com/q/26630685
tags question: http://stackoverflow.com/q/26656914
tags question: http://stackoverflow.com/q/26611942
tags question: http://stackoverflow.com/q/26670212
tags question: http://stackoverflow.com/q/26623619
tags question: http://stackoverflow.com/q/26670700
tags question: http://stackoverflow.com/q/26523209
tags question: http://stackoverflow.com/q/26610000
tags question: http://stackoverflow.com/q/26587557
tags question: http://stackoverflow.com/q/26527729
tags question: http://stackoverflow.com/q/26628039
tags question: http://stackoverflow.com/q/26557153
type: Tag
tags question: http://stackoverflow.com/q/26530185
tags question: http://stackoverflow.com/q/26647754
tags question: http://stackoverflow.com/q/26641369
tags question: http://stackoverflow.com/q/26662254
tags question: http://stackoverflow.com/q/26561519
tags question: http://stackoverflow.com/q/26554568
tags question: http://stackoverflow.com/q/26603716

http://stackoverflow.com/comment/41945244
type: Comment
comment on: http://stackoverflow.com/a/26655095
type: AnswerComment
has text: Here it is moving ( http://jsfiddle.net/tzvdLsxn/ ) .Your problem: you didn't updated the u_move matrix in the vertex shader with the returned value from your `translation` function.
score: 0

http://stackoverflow.com/q/26557390
has comment: http://stackoverflow.com/comment/41736339
accepted answer: http://stackoverflow.com/a/26557664
type: Question
tagged with: http://stackoverflow.com/tag/json
has body: This code works fine for one record, but I'm trying to make it work with an array of ~500 records... var aaa = { aaa_id: 123, abbr_name: "j_doe", name: "john doe" } var bbb = { bbb_id: 789, } for (var attrname in bbb) { aaa[attrname] = bbb[attrname]; } console.log(aaa.aaa_id) This outputs: Object {aaa_id: 123, abbr_name: "j_doe", name: "john doe", bbb_id: 789} Here's what my JSON looks like for the other records: var aaaRecords [ { "first_name": "Hasheem", "last_name": "Thabeet", "aaa_player_id": "4562" }, ... ] var bbbRecords [{ "first_name": "Hasheem", "last_name": "Thabeet", "aaa_player_id": "4562" }, .... ] Any ideas on how to make this function work with these arrays? Thanks a lot for any help!
score: 0
tagged with: arrays
answer count: 1
has title: How do I combine two objects in different arrays while keeping both values?
tagged with: javascript
has answer: http://stackoverflow.com/a/26557664
has comment: http://stackoverflow.com/comment/41736495
has comment: http://stackoverflow.com/comment/41736457
type: AnsweredQuestion

http://stackoverflow.com/q/26556295
tagged with: javascript
has title: Parse.com: Remove public read access for array of objects
tagged with: parse-cloud-code
score: 0
answer count: 1
tagged with: parse-platform
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26570349
accepted answer: http://stackoverflow.com/a/26570349
type: Question
has body: I've got an iOS app I've written using Parse as the backend. A user can store items in the system. An item has one or more pictures associated with it. By default, a user's items and pictures are accessible only by that user. A user can generate an alert for an item. When an item has an alert, public read access is given to the item and its pictures. When the alert expires, I want to revoke public read access for those objects. Currently, I'm adding the public access through the iOS client when the alert is created. Because an alert can expire or be turned off by the user, I'm trying to handle the other half of the code in Parse's Cloud Code, in an after_save handler. I'm currently trying the following: if (alert.get("isActive") === false) { // This alert has been rendered inactive, so make sure all photos are not publically readable var photos = alert.get("photos"); if (photos !== undefined &amp;&amp; photos.length &gt; 0) { for (var i = 0; i &lt; photos.length; i = i + 1) { var photo = photos[i]; photo.fetch().then(function () { var photoACL = photo.getACL(); photoACL.setPublicReadAccess(false); photo.setACL(photoACL); photo.save(); }); } } } The alert has an Array named "photos". Each of those should be a pointer to an object with parseClassName "photo". When I look at my console log, I see expected data for what is reported for the incoming alert. I see the alert and its properties, etc. Specifically, the "photos" array looks as I believe it should. Problematically, though, I can't seem to figure out how to manipulate that array. The error I keep getting is that I can't call setPublicReadAccess on undefined. Great, so that means that photoACL is undefined, but WHY? The items in the alert.photos array are ParseObject instances. Shouldn't .fetch() work, then? Also, when I try logging the objects themselves to the console (using console.log(JSON.stringify(photo))), I get oddly inconsistent results. Sometimes I just get {"objectId":"whatever"}, but sometimes I see t…

http://stackoverflow.com/comment/41865188
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26627367
type: Comment
has text: I just gave you idea for this particular problem. You code is right for nth depth. However your problem is solved.

http://stackoverflow.com/a/26624958
has body: The best way for creating responsive website is using frameworks and i am recommending to use bootstrap
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26624926
downvote count: 0

http://stackoverflow.com/a/26630386
answers question: http://stackoverflow.com/q/26630092
downvote count: 0
has comment: http://stackoverflow.com/comment/41869106
has comment: http://stackoverflow.com/comment/41883348
upvote count: 2
type: AcceptedAnswer
has body: You can perform an AJAX request and then go 2 pages back in history using js history: function goBack() { window.history.go(-2) }
type: Answer
accepted answer of: http://stackoverflow.com/q/26630092
score: 2

http://stackoverflow.com/q/26605491
has body: HTML &lt;div id="menu-left-left"&gt; &lt;ul&gt; &lt;/ul&gt; &lt;/div&gt; jQuery var temp = ""; for (var i = 0; i &lt; 2; i += 2) { temp += "&lt;li&gt; &lt;a href='#' class='test'&gt; + "Test" + &lt;/a&gt; &lt;/li&gt;"; } $("#menu-left-left ul").html(temp); $(".test").click(function() { alert("Element test class"); }); I want to load #menu-left-left element using jQuery. When this code block works the menu seems to look like I want. But .test element's click event handler doesn't work. How can I run this event handler?
type: Question
has answer: http://stackoverflow.com/a/26605621
tagged with: javascript
score: 0
answer count: 2
has title: How can I run element's click event handler?
tagged with: jquery
tagged with: click
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26605572

http://stackoverflow.com/a/51395989
upvote count: 15
has body: You can preserve the key by converting to null since a valid JSON does not allow undefined; Simple one liner: JSON.stringify(obj, (k, v) =&gt; v === undefined ? null : v)
has comment: http://stackoverflow.com/comment/139123049
score: 12
has comment: http://stackoverflow.com/comment/117943108
has comment: http://stackoverflow.com/comment/90196125
answers question: http://stackoverflow.com/q/26540706
has comment: http://stackoverflow.com/comment/93956848
downvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/137094432

http://stackoverflow.com/q/26641114
type: Question
has body: I have this plunkr where i am using angularjs and d3.js. I am generating a few donut charts here i would like to know how to display the average of the data in the middle of the arc. My function works well and displays the calculations. But i want the number of decimals to be restricted to just 2. How do i do it? svg.append("text") .attr("dy", ".35em") .style("text-anchor", "middle") .attr("class", "inside") .text(function(d) { return (data[0]*4+data[1]*3+data[2]*2+data[3])/d3.sum(data); });
tagged with: javascript
answer count: 1
downvote count: 1
favorite count: 0
tagged with: angularjs
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26641204
type: AnsweredQuestion
upvote count: 0
has title: D3 dinut chart displaying more decimals than required
has answer: http://stackoverflow.com/a/26641204
has comment: http://stackoverflow.com/comment/41889195
score: -1

http://stackoverflow.com/q/26614877
accepted answer: http://stackoverflow.com/a/26614937
answer count: 1
tagged with: jquery
has body: I have form in which I am adding some dynamic actions. I have a table in which I have rows of positions applicants applied for. There is an offer postion button and when they click on the offer button I want to insert the offer fields to be submitted and updated. I can get the feilds to insert but when I click on the cancel transaction button, I can't get it to empty the div addapptrans where the form is built. Below is the code. I know it must be something simple I am missing. Positions applied For Position Department Date Applied Offer? 2281 Building Service Worker - Part time Environmental Services 08/13/2001
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26614937
type: Question
has comment: http://stackoverflow.com/comment/41841210
has title: Jquery will not remove div
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41928473
type: Comment
has text: Also, if anyone is able to find why the tr element is a seemingly valid child of a table in the w3c specification, please link the relevant documentation, as I can't find it.
comment on: http://stackoverflow.com/a/26663171
type: AnswerComment
score: 0

http://stackoverflow.com/comment/53541747
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26545220
score: 0
has text: Sorry, I had no luck with this issue

http://stackoverflow.com/comment/41779500
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26581159
has text: I want the effect of a cartoon-style flip book. @royhowie
score: 0

http://stackoverflow.com/comment/41934799
has text: @Ian Thanks for pointing that out. So this begs the question then, how do I create the equals method without this problem? Should I just create a standalone function that takes two arrays?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26666513
type: QuestionComment

http://stackoverflow.com/comment/41703044
type: AnswerComment
type: Comment
score: 2
has text: Thank you Artjom. You've answered 3 of my questions tonight and I'm really appreciated!
comment on: http://stackoverflow.com/a/26538659

http://stackoverflow.com/q/26655713
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26656440
has title: Jquery Hover Failing on Child Div Entry
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26655993
accepted answer: http://stackoverflow.com/a/26655993
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26656440
tagged with: http://stackoverflow.com/tag/html
has body: I have a div that when I hover it swaps an image, and makes a div visible. Everything seems fine, but when you enter the child div the hover fails and swaps the image back. I thought that hover should continue through children as you are still hovering over the parent element. I am using mouseenter and mouseleave on the text portion, tried that on the image swap, and it still would fain on entering the workerData div. Here is the Code. HTML Anita Art Maker Arty, Art, Art CSS #workerAre{ width:100%; } .viveWorkers{ width:100%; float:left; position:relative; } .workerImage{ position:relative; } .workerCover{ width:100%; } .workerData{ position:absolute; top:0; width:100%; text-align: center; display:none; } Jquery var sourceSwap = function () { var $this = $(this); var newSource = $this.data('alt-src'); $this.data('alt-src', $this.attr('src')); $this.attr('src', newSource); } $(function() { $('img[data-alt-src]').each(function() { new Image().src = $(this).data('alt-src'); }).hover(sourceSwap, sourceSwap); }); $('.workers').mouseenter(function(){ $(this).find('.workerData').show(); }); $('.workers').mouseleave(function(){ $(this).find('.workerData').hide(); }); Here is a link to a fiddle. Any input or a push in the right direction would be appreciated.
tagged with: css

http://stackoverflow.com/a/26640885
downvote count: 0
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41902379
upvote count: 1
has body: If you want to get rid of obj param fn should be context (this) agnostic because you should be able pass as fn any callable (eg. anonymous function that do not use this) so 1) pass function bound to obj or 2) leave context as is and call .apply w/o context param fn.apply(null, params): 1) if called anywhere bound fn to obj: syncCall(cb, fn.bind(obj)) or 2) if called inside obj context leave fn as is obj = { fn: function(){ // some logic to be done in syncCall }, someObjMethod: function(){ syncCall(cb, this.fn); //here this == obj and will be inside syncCall } }
accepted answer of: http://stackoverflow.com/q/26639967
answers question: http://stackoverflow.com/q/26639967
type: Answer

http://stackoverflow.com/a/26561573
score: 11
has comment: http://stackoverflow.com/comment/41746874
upvote count: 11
answers question: http://stackoverflow.com/q/26561157
has body: Array.apply(0, Array(x)).map(function() { return Array.apply(0, Array(y)); }) Simpler if you write a little convenience routine function make_array(x) { return Array.apply(0, Array(x)); } then make_array(x).map(function() { return make_array(y);} ) or if you prefer make_array(x).map(make_array.bind(0, y)) If you're writing ES6: Array(...Array(x)).map(() =&gt; Array(y)); If you'd prefer to use fill, since you seem to have it available: Array(x).fill().map(function() { return Array(y); }); or somewhat more concisely in ES6, using an arrow function: Array(x).fill().map(() =&gt; Array(y)); It turns out Array#fill requires no argument; without it, it replaces absent elements with undefineds.
accepted answer of: http://stackoverflow.com/q/26561157
has comment: http://stackoverflow.com/comment/56746097
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26636072
has comment: http://stackoverflow.com/comment/41945662
has comment: http://stackoverflow.com/comment/41898676
type: Answer
has comment: http://stackoverflow.com/comment/71397673
has body: You can have a look at this post nodejs - net or http module It states that http is built on top of net I can't see this on the NodeJS doc pages though http://nodejs.org/api/net.html http://nodejs.org/api/http.html
answers question: http://stackoverflow.com/q/26629302
has comment: http://stackoverflow.com/comment/41936692
has comment: http://stackoverflow.com/comment/41908185
score: 0

http://stackoverflow.com/a/26613134
downvote count: 0
score: 1
has body: maxnum = 32; for(var i=0; i&lt;maxnum; i++}{ console.log(i); }
answers question: http://stackoverflow.com/q/26613087
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41678124
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26524877
score: 0
has text: No need for an array, just do a selection after you're done adding all the elements: `var circles = svg.selectAll("circles");`.

http://stackoverflow.com/comment/41782578
has text: Sorry I've been googling for two days it was the closest I could find javascript is new to me. @mudasobwa Do I change this in the ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26583230

http://stackoverflow.com/a/26731420
type: AcceptedAnswer
has body: As MajoB mentioned in comment scope.$watch done the trick. Here is my updated directive code. automateOnApp.directive('foldertree', ['$timeout', function($timeout){ return { restrict: 'A', scope: { 'inputfromapicall': '=', 'fileName': "=" }, link: function (scope, element, attrs, ngModelCtrl, controller) { scope.fileName = ''; return $timeout(function() { scope.$watch(function () { return scope.inputfromapicall; }, function(newVal) { if(!angular.isUndefined(scope.inputfromapicall)){ $('#divid').html(''); $('#divid').fileTree({ root: newVal, script: '/project/current/source/data/jqueryFileTree.jsp', expandSpeed: 1, collapseSpeed: 1, multiFolder: false }, function (file) { scope.fileName = file; scope.$apply(); }); } }); }); } }; }]); Hope it helps someone in Future
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26657719
downvote count: 0
answers question: http://stackoverflow.com/q/26657719

http://stackoverflow.com/comment/41932025
score: 2
type: AnswerComment
has text: A bit over kill just to validate an email don't you think to install and a library plugin ?
type: Comment
comment on: http://stackoverflow.com/a/26664960

http://stackoverflow.com/a/26634529
answers question: http://stackoverflow.com/q/26634322
upvote count: 1
has comment: http://stackoverflow.com/comment/41877431
downvote count: 0
has body: $("button").click(function(){ $("selector").attr("alt","tooltipvalue"); });
type: Answer
score: 1

http://stackoverflow.com/q/26609301
tagged with: image
has answer: http://stackoverflow.com/a/26609436
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -4
tagged with: animation
tagged with: css
has title: Cant animate image with jQuery
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/41830792
has body: Can I somehow animate the image on the left in the picture on the right. need a smooth animation. I found how to do it without the animation. With CSS -webkit-filter: brightness(1000%);
has comment: http://stackoverflow.com/comment/41830847
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41944204
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26671962
has text: Use onchange event of javascript.
score: 0

http://stackoverflow.com/comment/41875656
type: Comment
score: 3
has text: You misunderstood the purpose of this whole website
comment on: http://stackoverflow.com/q/26633972
type: QuestionComment

http://stackoverflow.com/comment/41801471
type: QuestionComment
comment on: http://stackoverflow.com/q/26592463
has text: I would like to create zoom function, which has same effect as zoom(graph) function which I had show here. But I cannot use behavior functions, because I do not use mouse for controll. I would like to use leap motion to cotroll graph.
score: 0
type: Comment

http://stackoverflow.com/comment/43132561
comment on: http://stackoverflow.com/a/26544095
type: AnswerComment
score: 0
type: Comment
has text: regarding adding a resolve to every state, check out my sample solutions on github. they offer a routehelper (or statehelper) that provides an easy way to add a resolve on every route (for things like loading data or auth)

http://stackoverflow.com/a/26523748
upvote count: 0
answers question: http://stackoverflow.com/q/26523690
has comment: http://stackoverflow.com/comment/41675764
type: Answer
downvote count: 1
score: -1
has body: Try this one function getTextBetweenTags($string, $tagname) { $pattern = "/&lt;$tagname&gt;(.*?)&lt;\/$tagname&gt;/"; preg_match($pattern, $string, $matches); return $matches[1]; } You have to loop through the $matches array...

http://stackoverflow.com/a/26575349
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26575297
has body: You have to call the functions in attach1.js by either putting another tag in your html, or by calling it using a button, like this: Play Just replace "play function" with the name of the function that you have to play stuff.

http://stackoverflow.com/q/26614468
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41843680
tagged with: php
has comment: http://stackoverflow.com/comment/41842068
has title: Geocoding with Google Maps without OVER_QUERY_LIMIT errors - Trying with PHP-Solution
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I hope you can help. Actually I´m trying to prevent the Google Maps-Api-Error "OVER_QUERY_LIMIT". I want to solve it with PHP instead of using Javascript and playing around with Timeouts etc. For this I have replaced this line: geocoder.geocode( {'address': address}, function(results, status) { in my script with this one: var url_addr = encodeURIComponent(address); $.getJSON('geocode.php?addr='+url_addr, function(data) { var results = data.results, status = data.status; Additionally I have an PHP-Script for getting the geocode-coordinates: $params = "address=" . urlencode($_GET{'addr'}); $url = 'http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;' . $params; $json = file_get_contents($url); $status = json_decode($json)-&gt;status; // check for over_query_limit status while ($status=="OVER_QUERY_LIMIT") { sleep(0.2); // seconds $json = file_get_contents($url); $status = json_decode($json)-&gt;status; } header('application/json'); echo $json; After running this I can see the called PHP-script in the debugger-console with the attached geocode-coordinates on the URL like /geocode.php?addr=432345... Next in my JS-Script I want to check if the google.maps.GeocoderStatus is OK. So I call: if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { console.log("Everything OK"); } else { console.log("Geocode is not OK"); } But nothing happens. It seems that the status doesn´t arrive at the if-else. I played a bit around and tried to find out something with "Firebug", but I don´t find the answer. Do you have any ideas? Thank you and regards, Stefan
tagged with: google-maps-api-3
tagged with: geocode
tagged with: google-maps
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/28871975
favorite count: 0
has comment: http://stackoverflow.com/comment/41841469

http://stackoverflow.com/comment/41860128
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26625336
has text: @User089247 It's not multiple identical IDs, it's several similar IDs, but they are all unique.
type: Comment

http://stackoverflow.com/q/26626021
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/66837
has body: I can't find out what the problem is with this line of code: …sc', ' Nesmet El Bouhaira ');$('#vtem1 img… This is the error message I receive: **document type does not allow element "h4" here** What do I need to change? This is the whole
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26626077
has comment: http://stackoverflow.com/comment/41861354
score: 0
has comment: http://stackoverflow.com/comment/41861344
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: document type does not allow element "h4" here
has comment: http://stackoverflow.com/comment/41861378
accepted answer: http://stackoverflow.com/a/26626077
linked to: http://stackoverflow.com/q/802854

http://stackoverflow.com/comment/41961318
score: 0
comment on: http://stackoverflow.com/q/26643322
type: Comment
type: QuestionComment
has text: This should be possible without setting any attributes on the ` ` elements. None of them is totally necessary.

http://stackoverflow.com/q/26636050
has comment: http://stackoverflow.com/comment/41956170
has comment: http://stackoverflow.com/comment/41881575
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Javascript library source code appears instead of web page
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41894362
downvote count: 1
has comment: http://stackoverflow.com/comment/41879531
has body: When I go to a page on our website, it sometimes displays the source code of imported Javascript libraries, instead of the page. /*! * jQuery UI 1.8.18 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return ... Refreshing the page seems to make it go away, but I'm wondering why this happens and how to fix it? It doesn't seem to be browser-specific. Update: The source looks something like this: Test ...other html code

http://stackoverflow.com/q/26621517
answer count: 1
score: 0
downvote count: 1
has title: Adding and Deleting from objects in javascript
has answer: http://stackoverflow.com/a/26621546
has body: I am pretty sure I have this right, but trying to add and delete using two separate method in my javascript code. The first one, is specifically trying to add classStr to the HTML element object el, property of className. If it already contains classStr, then it is left alone. var addClass = function addClass(el, classStr) { if(el.className !== classStr) { el.className = classStr; } }; This one, I am trying to simply delete classStr from className without leaving any white spaces. el is an element object. The only thing I am unsure about, is if I am leaving white spaces. var removeClasfunction = function removeClass(el, classStr) { delete el.className; };
tagged with: javascript
type: UnansweredQuestion
type: Question
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/26545220
has comment: http://stackoverflow.com/comment/53541747
has title: SQLite Cordova: "Error Processing SQL: undefined" with pre populated db
answer count: 0
score: 1
tagged with: mysql
upvote count: 1
type: Question
has body: I followed this guide: http://www.corporatezen.com/2012/11/shipping-prepopulated-database-phonegap/ I have a pre populated db in /assets called coor_db.db Following the guide I modified the code of my main activity file: public class GoogleMaps extends CordovaActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by &lt;content src="index.html" /&gt; in config.xml loadUrl(launchUrl); try { File dbFile = getDatabasePath("coor_db.db"); if(!dbFile.exists()){ this.copy("coor_db.db", dbFile.getAbsolutePath()); } } catch (IOException e) { e.printStackTrace(); } } void copy(String file, String folder) throws IOException { File CheckDirectory; CheckDirectory = new File(folder); String parentPath = CheckDirectory.getParent(); File filedir = new File(parentPath); if (!filedir.exists()) { if (!filedir.mkdirs()) { return; } } InputStream in = this.getApplicationContext().getAssets().open(file); File newfile = new File(folder); OutputStream out = new FileOutputStream(newfile); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) &gt; 0) out.write(buf, 0, len); in.close(); out.close(); } } An then I create a js file where I try to open it and then try to make a query. var coor_db = (function (){ function init(){ var db = window.openDatabase("coor_db", "1.0", "coor_db", 200000); db.transaction(queryDB, errorCB); } function errorCB(err) { alert("Error processing SQL: "+err.code); } //select all from coor_db function queryDB(tx){ tx.executeSql('SELECT * FROM coor_db', [], querySuccess, errorQuery); } function errorQuery(err) { alert("Error processing SQL query: "+err.code); } //handle the result function querySuccess(tx, result){ alert("I'm called: "+result.rows.length); var array = []; for(var i = 0; i &lt; result.rows.length; i++){ var row = result.rows.item(i); alert("id: "+row['id']+" lat: "+row['lat']); array[i] = { id: row['id'], text: row['lat'] } } alert(array[2].id+" lat: "+array[2].text); } return { in…
tagged with: javascript
has comment: http://stackoverflow.com/comment/53459090
downvote count: 0
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/53615796

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/26565893
tags question: http://stackoverflow.com/q/26579592
tags question: http://stackoverflow.com/q/26553242
tags question: http://stackoverflow.com/q/26654256
tags question: http://stackoverflow.com/q/26584308
type: Tag
tags question: http://stackoverflow.com/q/26614457

http://stackoverflow.com/a/26650944
score: 2
downvote count: 0
has body: See here: Add DOM Elements (that are Angular directives) via jQuery .append()? You need to have the newly added DOM elements compiled by Angular, with $compile(...) (Although a more pure AngularJS codewould be better overall, you are mixing JQuery and NG. http://angular-ui.github.io/bootstrap/#modal)
upvote count: 2
answers question: http://stackoverflow.com/q/26650303
type: Answer

http://stackoverflow.com/comment/41724797
type: Comment
comment on: http://stackoverflow.com/a/26550038
has text: That's some pretty Christmas tree you got there... :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41849119
score: 1
comment on: http://stackoverflow.com/q/26618132
has text: @CodeGodie once you load an image, it's cached. There should be 0 loading the next time you display it (like in your fiddle, you repeat the same 2 images).
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26550843
duplicate of: http://stackoverflow.com/q/17897081
has answer: http://stackoverflow.com/a/26551011
upvote count: 0
linked to: http://stackoverflow.com/q/15886272
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41723916
has title: Two different ways of function calling in JavaScript
accepted answer: http://stackoverflow.com/a/26551011
has body: In the following code, once I run it, it waits for click event to fire an alert. However if I change the following javascript code from clickMeButton.onclick=runTheExample; to clickMeButton.onclick=runTheExample(); it always fires up an alert when page downloaded without any click event. I would like to know what is the difference. I am using Chrome. Snipped code is as follows: DOM Example DOM Example This is the first paragraph This is the second paragraph This is the third paragraph Google! //script13.js window.onload= function(){ var clickMeButton=document.getElementById('clickMe'); clickMeButton.onclick=runTheExample; } function runTheExample(){ alert('running the example'); }
type: AnsweredQuestion
downvote count: 2
linked to: http://stackoverflow.com/q/17897081
type: Question
has comment: http://stackoverflow.com/comment/41724045
score: -2

http://stackoverflow.com/q/26515004
favorite count: 0
tagged with: web-sql
has answer: http://stackoverflow.com/a/33425018
tagged with: http://stackoverflow.com/tag/html
has body: I have an object store "messages" with "timestamp" and "chat_id" fields inside it. I want to get all "chats" inside this object store ordered by "timestamp" field. As far as I see, I can't do it with IndexedDB only. I can get them like this using WebDatabase: SELECT * FROM messages GROUP BY chat_id ORDER BY timestamp In IndexedDB: if I create compound index using ["chat_id", "timestamp"], records still won't be sorted by "timestamp" field. Instead they will be sorted by "chat_id" first. So that 2-year-old messages with "chat_id" == 1 will be preceding messages with "chat_id" == 2, written yesterday. if I create simple index of "chat_id" and get records from this index using "nextunique", same chat messages are sorted with primary key. In my case it's message "id". Am I wrong? Is it possible to sort grouped selection in IndexedDB? UPD: I want to get all chats "grouped" by chat_id and sort this selection by timestamp. So that newest chats will be the first.
accepted answer: http://stackoverflow.com/a/33425018
upvote count: 2
has title: Order grouped selection by condition in IndexedDB
type: Question
score: 2
type: AnsweredQuestion
tagged with: indexeddb
possible better answer: http://stackoverflow.com/a/46863904
has answer: http://stackoverflow.com/a/26520813
has answer: http://stackoverflow.com/a/46863904
answer count: 3
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41798478
comment on: http://stackoverflow.com/q/26590813
score: 0
type: QuestionComment
has text: Ultimately you want to control what you are including in your project so that you are only including what is necessary, reducing the amount of code that isn't being used. For example, jQuery.js, that's 82kb minified(93kb for 1.11.1) of which you're likely only using a very small portion of, which is already included in angular itself! You don't really have very many options when it comes to loading these files on initial load. One way or another, you'll have to load the entire payload. The biggest improvement you can make is by reducing the size up front by writing DRY code.
type: Comment

http://stackoverflow.com/comment/41862123
type: Comment
comment on: http://stackoverflow.com/a/26626317
has text: I would also add to be sure that your controller wrap all the functions you have defined in it in the HTML. In your case the the add(nameTxt) was outside of your controller div but Max corrected it in his demo.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41950985
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26654254
score: 0
has text: I could. I did consider that, but it feels a little hackish. These directives are semi-scattered across a larger application framework, so keeping track of IDs could be annoying. I was hoping for a way to directly connect the settings directive with the chart directive. What you suggest would work though.

http://stackoverflow.com/comment/41662123
type: Comment
comment on: http://stackoverflow.com/a/26514617
score: 0
type: AnswerComment
has text: Thanks now is it much better. But I found problem with text pnut value. Check my update please.

http://stackoverflow.com/q/26575065
type: Question
tagged with: javascript
tagged with: postgresql
score: 0
has title: How can I put many script-generated records in PostgreSQL quickly from node.js?
answer count: 1
has comment: http://stackoverflow.com/comment/41768589
tagged with: database-performance
has body: The following code, which inserts 200,000 records into PostgreSQL server from node.js, is taking about 17 minutes on my laptop PC, which feels horribly slow. var pg = require('pg'); var Client = pg.Client; var async = require('async'); var client = new Client(connectionString); client.connect(); var rollback = function(client) { client.query('ROLLBACK', function() { client.end(); process.kill(); }); }; client.query('BEGIN',function(err,result){ if(err){ console.error(err); rollback(client);}; async.waterfall([ function(cb){ client.query('DROP INDEX idx',function(err,result){ client.query('TRUNCATE TABLE tbl',function(err,result){ async.forEach(values,function(value,valueNext){ client.query('INSERT INTO tbl (' + 'col1,' + 'col2) VALUES ($1,$2)',[ value, generatedSomething(value) ],function(err){ valueNext(); }); },function(err,result){ if(err){ console.error(err); rollback(client);cb(false);return;}; client.query('CREATE INDEX idx ON tbl',function(err,result){ cb(null); }); }); }); }); }); }, ],function(err){ client.query('COMMIT', client.end.bind(client)); }); There are some strategies I've applied to speed up. Drop all indices before insertion, create it after all insertion is done ... ok Use TRUNCATE TABLE instead of DELETE FROM ... ok Use COPY FROM instead of INSERT INTO ... not done It seems that using COPY FROM instead of INSERT INTO will make effect, but it's used for imported CSV files, not for script-generated values. So, does it mean that exporting script-generated values to temporary CSV file, and importing values using COPY FROM, is the most effictive way to insert values into PostgreSQL quickly?
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/50206687
has answer: http://stackoverflow.com/a/26585439
linked to: http://stackoverflow.com/q/29100807

http://stackoverflow.com/a/26601981
type: Answer
has comment: http://stackoverflow.com/comment/41821332
downvote count: 0
has comment: http://stackoverflow.com/comment/41817487
score: 1
has comment: http://stackoverflow.com/comment/41817609
has comment: http://stackoverflow.com/comment/41817662
upvote count: 1
has body: Try with loggin variable to check if login and do something on the call back function. function onBackKeyDown(evt) { evt.preventDefault(); evt.stopPropagation(); if(loggedin=='yes'){ //dont do anything or show popup }else{ history.back(); } } You need to bind the eventLinstener first, and call the app.initialize() in the page onLoad OR $(document).ready() method. var app = { // Application Constructor initialize: function() { this.bindEvents(); }, // Bind any events that are required on startup. Common events are: // 'load', 'deviceready', 'offline', and 'online'. bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function() { document.addEventListener("backbutton", onBackKeyDown, false); } };
answers question: http://stackoverflow.com/q/26601843
has comment: http://stackoverflow.com/comment/41822463

http://stackoverflow.com/comment/41940801
has text: Define "*doesn't work*".
comment on: http://stackoverflow.com/q/26669807
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41797195
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26591046
has text: @AnthonyGrist But form other hand, the question itself is really good. For example I didn't know that. Now I know, hence OP deserves upvotes. not downvotes. I'm sure many people can learn something from even simplest questions like this one.

http://stackoverflow.com/comment/41868894
has text: If there is a non-changing ancestor element, closer to the elements in question, use that instead of `document` for efficiency.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26629900

http://stackoverflow.com/comment/93227294
has text: This is dependent on a library for one simple function. I suggest reading this: https://github.com/you-dont-need/You-Dont-Need-Momentjs
type: AnswerComment
type: Comment
score: 3
comment on: http://stackoverflow.com/a/53168447

http://stackoverflow.com/q/26576093
possible better answer: http://stackoverflow.com/a/26576105
accepted answer: http://stackoverflow.com/a/26576101
has answer: http://stackoverflow.com/a/26576105
has comment: http://stackoverflow.com/comment/41769818
has body: I am working with a simple java script code which goes here &lt;script&gt; var x=prompt("Enter a number"); var n=x+2; alert(n); &lt;/scrip&gt; This code will throws a prompt If i enter 2 in the prompt.I am expecting output as 4,But it is generating 22 in alert. What mistake is happening here.
has answer: http://stackoverflow.com/a/26576133
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26576200
upvote count: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26576101
has title: Java script addition of numbers with giving wrong answer
type: Question
score: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41807684
score: 0
has text: Thanks for your help. if you could post an example of your last comment ("Like, if you are creating variables that your functions need, that aren't passed in. This keeps them contained and out of the global scope"), that would be great.
type: Comment
comment on: http://stackoverflow.com/a/26596253
type: AnswerComment

http://stackoverflow.com/a/33454218
has body: It actually has a way of saying if it's paused. Which is essentially the same thing. Just do if(!_audioInstance.paused){ // is playing }
score: 0
answers question: http://stackoverflow.com/q/26540214
type: Answer

http://stackoverflow.com/comment/41879524
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26635930
has text: @downvoter Please explain downvotes so I can delete/improve the answer

http://stackoverflow.com/comment/41689836
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26531124
has text: Duplicate of http://stackoverflow.com/questions/17175632/highcharts-passing-additional-information-to-a-tooltip and this: http://stackoverflow.com/questions/10594031/jquery-highchart-is-there-any-way-to-put-extra-custom-data-inside-tooltip-box and this: http://stackoverflow.com/questions/11294326/highcharts-pass-multiple-values-to-tooltip ....

http://stackoverflow.com/comment/41816160
has text: there are many other plugins which gives you the effect. example: http://www.jqueryrain.com/2012/12/best-jquery-page-flip-book-effect-with-examples/. i am not sure which one suit your requirement. If you are ok with jFlip, then i have added a function to flip the slides manually. I can share it if you want.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26581159

http://stackoverflow.com/comment/47717053
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26626454
has text: The best explanation of controlled vs uncontrolled inputs I've seen so far: http://buildwithreact.com/article/form-elements
type: Comment

http://stackoverflow.com/q/26645210
accepted answer: http://stackoverflow.com/a/26645262
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/41896452
tagged with: javascript
has comment: http://stackoverflow.com/comment/41896355
score: 0
has answer: http://stackoverflow.com/a/26645262
answer count: 1
has body: Creating a JavaScript Object. result is ---> John Doe is 50 years old. here whether the property firstName,"lastName" is enclosed in quotes or not the code still works.but what is the technical difference and in which cases it won't work for example in JSON the person object's firstName property is invalid json syntax unless the quotes are present. but javascript allows either syntax to work
has comment: http://stackoverflow.com/comment/41896660
linked to: http://stackoverflow.com/q/8294088
has title: understanding Javascript objects syntax
duplicate of: http://stackoverflow.com/q/8294088

http://stackoverflow.com/q/26582766
tagged with: diagram
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: d3.js network diagram slider filter
type: Question
has body: I have the following scenario (here, fiddle link), A simple diagram, which circles a various sizes from 1 to 10. And I have a slider which I would love to use to filter my nodes and redraw the links between the rest of them. For example if I slide or choose 5 I would like to filter out all circles and its connections, that has a diameter, say, less than 5 and most importantly redraw connecting the left ones (the ones that have the diameter 5 or more). Honestly, I looked at a million examples how to do similar stuff but it just doesn't go through my thick head. Please help me out here, feel free to edit my fiddle and update the function filterDiagram() slide: function( event, ui ) { filterDiagram(ui.value) }
tagged with: javascript
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42127702
tagged with: d3.js

http://stackoverflow.com/comment/41729539
score: 0
comment on: http://stackoverflow.com/a/26552865
type: Comment
has text: You might also consider using the $http service for this.
type: AnswerComment

http://stackoverflow.com/comment/41841357
type: AnswerComment
has text: Thanks for the help. One last question: do you have any example code for getting a website and picking something out?
type: Comment
comment on: http://stackoverflow.com/a/26614258
score: 0

http://stackoverflow.com/q/26615819
upvote count: 1
has comment: http://stackoverflow.com/comment/41843211
type: Question
has comment: http://stackoverflow.com/comment/41843074
has answer: http://stackoverflow.com/a/26616201
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41846234
favorite count: 0
accepted answer: http://stackoverflow.com/a/26616201
tagged with: ajax
has comment: http://stackoverflow.com/comment/41846601
has answer: http://stackoverflow.com/a/26741025
has title: Loading PHP Response with Jquery Ajax POST
tagged with: php
possible better answer: http://stackoverflow.com/a/26741025
has comment: http://stackoverflow.com/comment/41843070
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41843896
has body: I have a php script that loops over the results of a database query and prints them out. I am trying to load them into an Admin Interface Panel with AJAX, but to no avail. My job requires me to write mostly backend code, so I haven't gotten around to learning much JS/Jquery. Anyways, I have a page "insert.php" that has a button I want to click and have it call the results from the "posts.php" page. Here are my files insert.php Load Posts posts.php <?php require_once 'connect.php'; $user = 'admin'; $sql = "SELECT * FROM posts WHERE author = ?"; $stmt = $db->prepare($sql); $stmt->bindParam(1, $user); $stmt->execute(); $data = $stmt->fetchAll(); foreach ($data as $row) { $id = $row['id']; $title = $row['title']; $author = $row['author']; $date = $row['date']; $smalltext = $row['smalltext']; $bodytext = $row['bodytext']; $images = $row['images']; $imagelist = split(' ', $images); $shorttext = str_replace( array("\r\n", "\n"), array(" ", " "), $smalltext); echo " $title Post MetaData goes here $shorttext "; foreach ($imagelist as $key => $value) { echo " "; } echo " Edit Post Timestamp: $date Author: $user "; } ?> postAjax.js $.ajaxSetup ({ cache: false }); var loadUrl = "../../includes/posts.php"; $(function(){ $('#ajaxbtn').on('click', function(e){ e.preventDefault(); $('#ajaxbtn').fadeOut(300); $.post(loadUrl, {language: "php", version: 5}, function(res){ $("posts").html(res) }, "html"); }); }); This is the file that loads my scripts into the page When I click the #ajaxbtn button, it fades out so I know the JS is being called to that element onclick, but it doesn't post the results of posts.php. I think this may just be my misunderstanding of how Ajax works; if you would please tell me what I did wrong.

http://stackoverflow.com/a/26665002
answers question: http://stackoverflow.com/q/26664566
accepted answer of: http://stackoverflow.com/q/26664566
score: 0
type: AcceptedAnswer
has body: select: function (event, ui) { // window.location = ui.item.url; if (window.location != window.parent.location) window.parent.location = ui.item.url; } Boom. (if anyone else runs into this, this what solved it)
type: Answer

http://stackoverflow.com/comment/41721491
has text: Works for me, what version are you using?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26548831
score: 0

http://stackoverflow.com/comment/41672403
has text: It's the same concept
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26521604

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/26537007
tags question: http://stackoverflow.com/q/26547821
type: Tag
tags question: http://stackoverflow.com/q/26569778

http://stackoverflow.com/q/26635746
has comment: http://stackoverflow.com/comment/41879094
type: Question
linked to: http://stackoverflow.com/q/10992261
has comment: http://stackoverflow.com/comment/41903410
has comment: http://stackoverflow.com/comment/41878943
tagged with: javascript
tagged with: drop-down-menu
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26649781
has body: I need to create a drop down menu in HTML. The idea is that when I click on the option, let's say a city, below the menu automatically should appear detailed contact information. So for example. If I choose London, automatically should appear street address, phone, etc. Could be with submit button like below, but better without. London NY Rome Paris I'm not so good in HTML, will really appreciate some help
answer count: 1
score: 0
type: UnansweredQuestion
has title: HTML drop down menu with extra data after click

webpage-screenshot
type: Tag
tag name: webpage-screenshot
tags question: http://stackoverflow.com/q/26604942

http://stackoverflow.com/comment/41785102
comment on: http://stackoverflow.com/a/26584574
score: 1
type: AnswerComment
type: Comment
has text: `after` *can* move things, but it doesn't if you give it a string. `$('#ID2').after($('#ID1'));` works, for instance: http://jsfiddle.net/sbkL785c/1/

http://stackoverflow.com/a/26648168
has comment: http://stackoverflow.com/comment/41900981
answers question: http://stackoverflow.com/q/26648039
accepted answer of: http://stackoverflow.com/q/26648039
score: 5
type: AcceptedAnswer
upvote count: 5
type: Answer
has body: If you suffix the url to the pdf file with a unique query string parameter, that you change whenever the pdf file is changed, the browser will cache each version of the file separately Example: change http://site/myFile.pdf to http://site/myFile.pdf?v=f955b055-d551-4762-8313-a2417dc70568
downvote count: 0

http://stackoverflow.com/q/26536347
type: Question
has title: jQuery datepicker more than one input
has answer: http://stackoverflow.com/a/26536413
tagged with: javascript
tagged with: jquery
has body: I am using jQuery 2.1.0 and am trying to use a datepicker for more than one input. I can get it to work on the first input but how do I get it to work for the second? Any Suggestions? http://jsfiddle.net/j02p2sed/ &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"&gt; &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="/resources/demos/style.css"&gt; Date:&lt;/label&gt; &lt;input type="text" name="odate" id="datepicker"&gt; Date2:&lt;input type="text" name="purchasedate" id="datepicker" mask="99/99/9999"&gt; $(function() { $( "#datepicker" ).datepicker(); });
possible better answer: http://stackoverflow.com/a/26536427
accepted answer: http://stackoverflow.com/a/26536413
answer count: 2
has answer: http://stackoverflow.com/a/26536427
type: AnsweredQuestion
score: 0

http://stackoverflow.com/comment/41913674
type: Comment
type: QuestionComment
has text: Are you using `WKWebView` or `UIWebView` ?
score: 0
comment on: http://stackoverflow.com/q/26573528

http://stackoverflow.com/comment/41747032
type: Comment
comment on: http://stackoverflow.com/a/26563370
has text: I copy and paste your code in my page and i get the follow erro : $(document).ready(function () { $("#teste").click(function () { $("[data-toggle=popover]").popover();// 'undefined is not a function' });
type: AnswerComment
score: 0

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26641028
tags question: http://stackoverflow.com/q/26529530
tags question: http://stackoverflow.com/q/26525227
tags question: http://stackoverflow.com/q/26640812
tags question: http://stackoverflow.com/q/26576711
tags question: http://stackoverflow.com/q/26597460
tags question: http://stackoverflow.com/q/26646615
tags question: http://stackoverflow.com/q/26552695
tags question: http://stackoverflow.com/q/26650654
tags question: http://stackoverflow.com/q/26639631
tags question: http://stackoverflow.com/q/26625049
tags question: http://stackoverflow.com/q/26578859
tags question: http://stackoverflow.com/q/26565198
tags question: http://stackoverflow.com/q/26589427
tags question: http://stackoverflow.com/q/26669484
tags question: http://stackoverflow.com/q/26663473
tags question: http://stackoverflow.com/q/26550220
tags question: http://stackoverflow.com/q/26514477
tags question: http://stackoverflow.com/q/26529192
tags question: http://stackoverflow.com/q/26537685
tags question: http://stackoverflow.com/q/26588916
tags question: http://stackoverflow.com/q/26602007
tags question: http://stackoverflow.com/q/26549089
tags question: http://stackoverflow.com/q/26665672
tags question: http://stackoverflow.com/q/26589492
tags question: http://stackoverflow.com/q/26548300
tags question: http://stackoverflow.com/q/26653308
tags question: http://stackoverflow.com/q/26650414
tags question: http://stackoverflow.com/q/26564279
tags question: http://stackoverflow.com/q/26653603
tags question: http://stackoverflow.com/q/26603963
tags question: http://stackoverflow.com/q/26570993
tags question: http://stackoverflow.com/q/26514801
tags question: http://stackoverflow.com/q/26638046
tags question: http://stackoverflow.com/q/26589532
tags question: http://stackoverflow.com/q/26649460
tags question: http://stackoverflow.com/q/26545219
tags question: http://stackoverflow.com/q/26616012
tags question: http://stackoverflow.com/q/26625481
tags question: http://stackoverflow.com/q/26553154
tags question: http://stackoverflow.com/q/26629000
tags question: http://stackoverflow.com/q/26564763
tags question: http://stackoverflow.com/q/26596792
tags question: http://stackoverflow.com/q/26586743
tags question: http://stackoverflow.com/q/26661528
tags question: http://stackoverflow.com/q/26538669
tags question: http://stackoverflow.com/q/26616300
tags question: http://stackoverflow.com/q/26625692
tags question: http://stackoverflow.com/q/26542476
tags question: http://stackoverflow.com/q/26589869
tags question: http://stackoverflow.com/q/26562430
tags question: http://stackoverflow.com/q/26521604
tags question: http://stackoverflow.com/q/26559534
tags question: http://stackoverflow.com/q/26548978
tags question: http://stackoverflow.com/q/26589646
tags question: http://stackoverflow.com/q/26630353
tags question: http://stackoverflow.com/q/26526656
tags question: http://stackoverflow.com/q/26530076
tags question: http://stackoverflow.com/q/26582107
tags question: http://stackoverflow.com/q/26542233
tags question: http://stackoverflow.com/q/26656589
tags question: http://stackoverflow.com/q/26634932
tags question: http://stackoverflow.com/q/26593145
type: Tag
tags question: http://stackoverflow.com/q/26567230
tags question: http://stackoverflow.com/q/26602758
tags question: http://stackoverflow.com/q/26591079
tags question: http://stackoverflow.com/q/26595857
tags question: http://stackoverflow.com/q/26577247
tags question: http://stackoverflow.com/q/26596659
tags question: http://stackoverflow.com/q/26628040
tags question: http://stackoverflow.com/q/26544407
tags question: http://stackoverflow.com/q/26649753
tags question: http://stackoverflow.com/q/26660357
tags question: http://stackoverflow.com/q/26644993
tags question: http://stackoverflow.com/q/26627844
tags question: http://stackoverflow.com/q/26582381
tags question: http://stackoverflow.com/q/26590867
tags question: http://stackoverflow.com/q/26573204
tags question: http://stackoverflow.com/q/26651277

http://stackoverflow.com/q/26520899
accepted answer: http://stackoverflow.com/a/26520931
has title: Returning MySql object with each row as array
has answer: http://stackoverflow.com/a/26520931
tagged with: mysqli
tagged with: php
type: AnsweredQuestion
has body: I want to query my DB and get back an array of arrays. I'm getting all my rows merged into a flat array which makes parsing through it for my purposes very hard. php: function conn($sQuery){ $sMessage = ''; $db = new mysqli('localhost','root','','db') or die('unable to connect!'); if($db-&gt;connect_errno){ $message = $db-&gt;connect_error; } else{ if($db-&gt;query($sQuery)){ $stmt = $db-&gt;prepare($sQuery); $stmt-&gt;execute(); $oResult = $stmt-&gt;get_result(); while($rows = $oResult-&gt;fetch_assoc()){ foreach($rows As $value){ $aRows[] = $value; } } $oResult-&gt;free(); $db-&gt;close(); return $aRows; } else{ $sMessage = $db-&gt;error; $db-&gt;close(); return $sMessage; } } } function requestNote(){ $sQuery = "SELECT * FROM `note` WHERE `sender_Id` = '" . $_SESSION['user_Id'] . "'"; $oResult = conn($sQuery); if(!is_array($oResult)||!isset($oResult)||empty($oResult)||is_null($oResult)){ echo null; } else{ echo json_encode($oResult); } } js: request.done(function(oResult){ var jsonResult = $.parseJSON(oResult); console.log("Json returned: ", jsonResult); }); This prints: Json returned: [1, 100000, 100000, "This is a test note inserted directly into DB", "2014-10-22 15:34:15", 2, 100000, 100000, "This is the second test ...serted directly into DB", "2014-10-22 21:56:50"] What I want is: Json returned: [ [1, 100000, 100000, "This is a test note inserted directly into DB", "2014-10-22 15:34:15"], [2, 100000, 100000, "This is the second test ...serted directly into DB", "2014-10-22 21:56:50"] ]
has answer: http://stackoverflow.com/a/26520938
type: Question
possible better answer: http://stackoverflow.com/a/26520938
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/50071575
score: 0
type: Comment
has text: Hi there. what line do i change to make the script do the "random function" every time the page loads? this script seems to be the simplest i found and work but need to change every time the page loads - I don't know JavaScript but tried to pay with .on('onload' and .on('load', -- just don't know enough to get it working
comment on: http://stackoverflow.com/a/26642033
type: AnswerComment

http://stackoverflow.com/comment/41843669
comment on: http://stackoverflow.com/a/26615895
score: 0
has text: @Drewbietron , something like this can work i thnik?
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26605434
has answer: http://stackoverflow.com/a/26605873
has comment: http://stackoverflow.com/comment/41823782
has comment: http://stackoverflow.com/comment/41823756
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has title: Fade effect with .hide() .show() in JQuery
tagged with: http://stackoverflow.com/tag/html
has body: I found a nice method to split large post, on blogger, into multiple pages here: http://blogtimenow.com/blogging/splitting-long-blog-post-blogger/ I'm trying to add a fade effect when switching pages, but i don't know how to do this, i have no experience when it comes to jquery... I managed so far to make the page scroll back to the top, and added some animations using time values, but it's not looking quite right. jQuery(document).ready(function(){ jQuery('.page1').click(function(){ jQuery("html, body").animate({ scrollTop: 0 }, "slow"); jQuery('.content1').show(2000); jQuery('.content2').hide(1000); jQuery('.content3').hide(1000); jQuery('.content4').hide(1000); jQuery('.content5').hide(1000); So basically what i want is the current "page" to fade out and the next "page" to fade in...
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26605749
type: Question
has comment: http://stackoverflow.com/comment/41823789

http://stackoverflow.com/comment/41662928
type: Comment
type: QuestionComment
score: 0
has text: Ah, thanks @juvian It is helpful to see this!
comment on: http://stackoverflow.com/q/26516149

http://stackoverflow.com/comment/41959284
type: Comment
has text: Yes I've seen it but it doesn't help me. For me it seems karma can't attach to the jasmine adapter for whatever reason. I don't have a package.json but the book doesn't mention needing one.
comment on: http://stackoverflow.com/q/26661613
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41739842
type: QuestionComment
has text: @Mark.ewd yes, please, show us that code. Thanks!
comment on: http://stackoverflow.com/q/26555546
score: 0
type: Comment

http://stackoverflow.com/comment/41896043
has text: Add a `specialKey` value for space? (it's 32)
type: QuestionComment
comment on: http://stackoverflow.com/q/26645012
score: 0
type: Comment

http://stackoverflow.com/comment/41851773
comment on: http://stackoverflow.com/q/26617290
score: 0
type: Comment
type: QuestionComment
has text: Also how do I make the scripts available? I just checked the server and the file that you said was there.

http://stackoverflow.com/q/26635024
upvote count: 2
accepted answer: http://stackoverflow.com/a/26690499
tagged with: youtube
type: Question
linked to: http://stackoverflow.com/q/26262666
tagged with: javascript
has body: I'm noticing strange behavior with the YouTube iframe API and I'm looking for guidance. I'm trying to use the API to embed a video (or a playlist) which includes closed captioning enabled by default. The YouTube docs say to set cc_load_policy=1 in the URL to show captions even if the user's preferences do not include them by default. The problem is that I get inconsistent behavior - seemingly at random - across YouTube. Some videos show captions, others don't. Here's a working example It's embed code is: https://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&amp;cc_load_policy=1 Here's a non-working example using the exact same embed code syntax Code: https://www.youtube.com/embed/y9sriE5VMQc?enablejsapi=1&amp;cc_load_policy=1 Related SO post Does anyone have insight or thoughts into this behavior? Or is it a case of, "YouTube is a big website, wait a little longer?"
tagged with: api
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26690499
favorite count: 0
has title: YouTube closed captions with API Player
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/29087875
has body: Either your device does not have a magnetic sensor, or the vendor has not implemented support for it in the OS. Looking at the Android source code for the device-orientation plugin, the startup code is written like this (modified for brevity): List&lt;Sensor&gt; list = this.sensorManager.getSensorList(Sensor.TYPE_ORIENTATION); // If found, then register as listener if (list != null) this.setStatus(CompassListener.STARTING); // If error, then set status to error else this.setStatus(CompassListener.ERROR_FAILED_TO_START); Not sure why they made up their own error code there (public static int ERROR_FAILED_TO_START = 3), but really they should be reporting COMPASS_NOT_SUPPORTED as defined in the documentation.
answers question: http://stackoverflow.com/q/26642057
upvote count: 3
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/comment/41840602
comment on: http://stackoverflow.com/q/26613764
type: Comment
has text: Yes. that seems to fix the count problem. Thanks! it seems to work fine but now i need a way to import the table to a clean html page without the table being altered. In that way i can add a Random Number Generator which gives you a reservation code. (not the official way but it works for our purpose)
type: QuestionComment
score: 0

http://stackoverflow.com/a/48441053
score: 2
upvote count: 2
has body: This code may better help you. In this code remove icon display you whenever your mouse moving over event and whenever your mouse goes outside remove button will hide or removed. eventMouseover:function(event,domEvent,view){ var el=$(this); var layer=' Trash '; el.append(layer); el.find(".fc-bg").css("pointer-events","none"); $("#delbut"+event.id).click(function(){ calendar.fullCalendar('removeEvents', event._id); }); }, eventMouseout:function(event){ $("#events-layer").remove(); }
answers question: http://stackoverflow.com/q/26530076
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41779033
score: 0
type: AnswerComment
has text: I can only use getElementByID within DW selecter AFAIK and that's not going to work for me :/ I'm going to leave the answer open and try do it via regex. I know it's bad practice - but DW is lame ): once again thank you for trying!
comment on: http://stackoverflow.com/a/26580546
type: Comment

http://stackoverflow.com/q/26630628
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41869882
has answer: http://stackoverflow.com/a/26631026
has answer: http://stackoverflow.com/a/26630769
has answer: http://stackoverflow.com/a/26630870
score: 0
tagged with: jquery-events
tagged with: web-deployment
has comment: http://stackoverflow.com/comment/41869619
type: UnansweredQuestion
has body: How to fire event handler only once for multiple event types? $("p").on("click touchend", function(e) { console.log( "&lt;p&gt; was clicked" ); }); This handler is called on some devices twice - firstly for "touchend" event (or "touchstart" for example - it doesn't matter in this case), and then this handler is automatically triggered again for "click" event. It works like "click" &amp;&amp; "touchend" but I want it to act like "click" || "touchend". Is there a simple way to prevent calling the handler for "click" when "touch(start/end)" was triggered and vice versa? The only solution I figured out is to unbind "click" event if e.type was "touchend". I found information that .on("click touchend") should work only for one event form the collection, but I've checked that it's fired twice, at least on few mobile devices, so you have a better solution for this case?
answer count: 4
type: Question
has title: Handling multiple events but fire handler only for one event
has answer: http://stackoverflow.com/a/26630912

http://stackoverflow.com/comment/41712076
comment on: http://stackoverflow.com/q/26544197
type: QuestionComment
has text: Yes. Actually using mobile tethering while dont have proper connection..is that the problem?Checked other websites through the same connection and source looks nice with external links.
score: 0
type: Comment

http://stackoverflow.com/comment/41706293
has text: Yes, but when the image is redrawn using the manual method, it does not appear at the original (0,0) coordinates, it treats (10,0) or (20,0), etc as (0,0). However, with the loop the image never treats (10,0) or (20,0) as its (0,0) position, even when redrawn. This is what is confusing me.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26540520

http://stackoverflow.com/comment/41751455
has text: I'm running it from terminal.
type: Comment
comment on: http://stackoverflow.com/a/26566187
score: 0
type: AnswerComment

http://stackoverflow.com/q/26541374
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26541735
type: Question
accepted answer: http://stackoverflow.com/a/26541735
tagged with: javascript
tagged with: jquery
score: 0
has body: I am building a social network-type website. Each post has a set of replies. I have a ruby variable of (post.id) that I am using to distinguish between replies from one post, and replies from a different post. The replies are initially hidden. How do I make it so that clicking the "open-replies" button, only shows replies for that post. Instead of opening all the replies, for every post. Here is an example with the (post.id) variable being substituted with hard-coded numbers. Reply needs to open they both have the same "Post.id" and are both children of the http://codepen.io/sboland926/pen/ruwHz
answer count: 1
has title: How to Show Reply container with same ID as Post container?
tagged with: ruby-on-rails

http://stackoverflow.com/comment/41774917
type: AnswerComment
has text: @roggie The cookie warning is a legal requirement within the EU (and many web developers in the EU consider it rather heavy-handed). There is absolutely no requirement whatsoever to inform users that their IP address is being stored on the server. At least in the UK, an IP address alone is not personally identifiable information, especially since the user may be behind a proxy or one of many users on a wireless network, and most people have dynamic IP addresses.
type: Comment
comment on: http://stackoverflow.com/a/26578504
score: 1

android
tags question: http://stackoverflow.com/q/26645789
tags question: http://stackoverflow.com/q/26642057
tags question: http://stackoverflow.com/q/26619092
tags question: http://stackoverflow.com/q/26634412
tags question: http://stackoverflow.com/q/26551516
tags question: http://stackoverflow.com/q/26576678
tags question: http://stackoverflow.com/q/26525222
tags question: http://stackoverflow.com/q/26591011
tags question: http://stackoverflow.com/q/26555504
tags question: http://stackoverflow.com/q/26658869
tags question: http://stackoverflow.com/q/26657500
tags question: http://stackoverflow.com/q/26614121
tags question: http://stackoverflow.com/q/26562967
tags question: http://stackoverflow.com/q/26542690
tags question: http://stackoverflow.com/q/26520900
tags question: http://stackoverflow.com/q/26543733
tags question: http://stackoverflow.com/q/26577513
tags question: http://stackoverflow.com/q/26672326
tags question: http://stackoverflow.com/q/26628551
tags question: http://stackoverflow.com/q/26540319
tags question: http://stackoverflow.com/q/26649612
tags question: http://stackoverflow.com/q/26589548
tags question: http://stackoverflow.com/q/26574750
tags question: http://stackoverflow.com/q/26653754
tags question: http://stackoverflow.com/q/26657511
tags question: http://stackoverflow.com/q/26608564
tags question: http://stackoverflow.com/q/26662704
tags question: http://stackoverflow.com/q/26641762
tags question: http://stackoverflow.com/q/26586585
tags question: http://stackoverflow.com/q/26604952
tags question: http://stackoverflow.com/q/26606702
tags question: http://stackoverflow.com/q/26541791
tags question: http://stackoverflow.com/q/26664808
tags question: http://stackoverflow.com/q/26623353
tags question: http://stackoverflow.com/q/26569451
tags question: http://stackoverflow.com/q/26653771
tag name: android
tags question: http://stackoverflow.com/q/26597708
tags question: http://stackoverflow.com/q/26570414
tags question: http://stackoverflow.com/q/26579598
tags question: http://stackoverflow.com/q/26577904
type: Tag
tags question: http://stackoverflow.com/q/26611461
tags question: http://stackoverflow.com/q/26526806
tags question: http://stackoverflow.com/q/26541108
tags question: http://stackoverflow.com/q/26623361
tags question: http://stackoverflow.com/q/26603536
tags question: http://stackoverflow.com/q/26519358

http://stackoverflow.com/comment/110198853
score: 1
has text: This is possible since iOS 13.4: https://stackoverflow.com/a/62308410/1774081
comment on: http://stackoverflow.com/q/26666843
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26547324
accepted answer: http://stackoverflow.com/a/26547417
tagged with: asp.net
favorite count: 0
tagged with: ajax
has title: jQuery Uncaught TypeError: Cannot read property 'text' of null
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41718673
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41717407
score: 1
has body: Problem: I am loading a modal form from an ajax call. Within the modal, I have a span element holding an email address. I am needing to capture the value of the span element in javascript. Currently, I have a button click that calls a function to obtain the text. Code to read text: function AccountHistoryRedeemSendEmail(emailType) { clearNotifications(); console.log('Hit AccountHistoryRedeemSendEmail'); var url = "../../utility/account/ajaxAccountHistoryRedeemSendEmail.aspx"; var params = "eType" + emailType; //console.log($('#lblHRedeemEmailAddress')); console.log('Output text: ' + $('#lblHRedeemEmailAddress').text()); params += "&HRedeemEmailAddress=" + $("#lblHRedeemEmailAddress").text(); params += "&timestamp=" + new Date(); // new Ajax.Request( // url, // { // method: "get", // parameters: params, // onSuccess: parseAjaxResponseAccountHistoryRedeemSendEmail // } // ); } The error being returned is: "Uncaught TypeError: Cannot read property 'text' of null " I understand the error is telling me $('#lblHRedeemEmailAddress') is returning a null. Naturally, I have verified my element name to be correct. I have also inspected the element in chrome and verified it is present in the document. Here is html in the document: name@domain.com < img src="sendemail.jpg" id="SendEmail" alt="Email Certificate" onclick="AccountHistoryRedeemSendEmail('lblEmail');"> So, the question: Why is my lblHRedeemEmailAddress element null when I try to access it from the function? And, how do I fix this?
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26547417

http://stackoverflow.com/a/26655209
answers question: http://stackoverflow.com/q/26654416
downvote count: 0
has body: You need to modify what is called the colorAxis. It has default properties listed here for reversed. So for this example link you provided you need to set: colorAxis: { reversed: false, min: 0, minColor: '#FFFFFF', maxColor: Highcharts.getOptions().colors[0] }, It is different than the legend properties which for a colorAxis is just handling the location/alignment of the colorAxis item. To modify what the colorAxis does you have to edit the colorAxis properties.
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/41947450
score: 8
has comment: http://stackoverflow.com/comment/62853312
has comment: http://stackoverflow.com/comment/41928979
has comment: http://stackoverflow.com/comment/41950382

http://stackoverflow.com/comment/41955235
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26665963
type: Comment
has text: @squint Thanks for the correction. I've changed the answer to be less specific. For the purposes of this question, it's not important precisely which lists are live, as this solution works for both live and static NodeLists.

http://stackoverflow.com/comment/41721878
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26549699
has text: one idea: the function arrayToList() needs an array as an argument. In the recursive calls, it isn't getting that argument...

http://stackoverflow.com/a/26625802
has comment: http://stackoverflow.com/comment/107624997
has comment: http://stackoverflow.com/comment/107624980
type: Answer
has comment: http://stackoverflow.com/comment/107625008
has comment: http://stackoverflow.com/comment/41864172
has comment: http://stackoverflow.com/comment/41937421
answers question: http://stackoverflow.com/q/26625683
downvote count: 1
has comment: http://stackoverflow.com/comment/41861527
accepted answer of: http://stackoverflow.com/q/26625683
score: 3
has body: Try the filter property. Say that you have those values in an array arr=[1,1,1,2,3,4,5]; new_arr = arr.filter(function(item, pos) { return arr.indexOf(item) === pos; }); The filter, takes a callback function and calls it on each element of the array, like .map and takes at-most three argument, the value of the element(from your array), the index and the Array itself. The idea behind this is, you take the one element then check if the indexOf(that_element) is equal to the position of the element. Walkthrough. step 1: indexOf(1) = 0 and pos = 0, indexOf(1) === pos // true so the element is pushed in the new_arr step 2: indexOf(1) = 0 and pos = 1, // condition false, so discard. so on.. This property of allowing and discarding probably comes from duck-typing
has comment: http://stackoverflow.com/comment/41938418
has comment: http://stackoverflow.com/comment/41861590
upvote count: 4
has comment: http://stackoverflow.com/comment/41938402
has comment: http://stackoverflow.com/comment/41938097
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/107625401
has comment: http://stackoverflow.com/comment/41863183

http://stackoverflow.com/q/26641893
type: Question
has answer: http://stackoverflow.com/a/26641906
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26641942
answer count: 3
has comment: http://stackoverflow.com/comment/41890597
favorite count: 0
possible better answer: http://stackoverflow.com/a/26641921
upvote count: 1
has answer: http://stackoverflow.com/a/26641921
has answer: http://stackoverflow.com/a/26641942
type: AnsweredQuestion
has title: How to setup the Month for my date?
score: 1
has body: I have a weird bug regarding javascript date object I have something like var year = 2014; var month = 11; var day = 29 var date = new Date(year, month , day); console.log(date) -&gt; give me Mon Dec 29 2014 00:00:00 GMT-0800 (PST) var monthNum = date.getMonth(); console.log(monthNum) -&gt; give me 11 If I change month to 12, it gave me Thu Jan 29 2015 00:00:00 GMT-0800 (PST) I am not sure why the month is off by one. Can someone help me out about this? Thanks!
tagged with: date

http://stackoverflow.com/q/26666877
tagged with: casperjs
has comment: http://stackoverflow.com/comment/42006620
accepted answer: http://stackoverflow.com/a/26670012
type: AnsweredQuestion
score: 0
type: Question
has title: How to check if one of several elements exists?
tagged with: testing
tagged with: javascript
has answer: http://stackoverflow.com/a/26670012
answer count: 1
has body: How to check if one of elements exists? I know there is a function assertExists, but it only checks for one specific element. I need to check whether one of three elements exists on a page (for example I have a login link which is of different class for different sites, but normally I can group these sites in three categories). Is there any 'and/or' conditions that can be inserted in assertExists?

http://stackoverflow.com/comment/41700598
score: 0
comment on: http://stackoverflow.com/a/26531926
type: Comment
type: AnswerComment
has text: Thank you! I updated the question with the code that ended up doing what I need.

http://stackoverflow.com/comment/41767727
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26574968
has text: Yes, I get that, but my question is where the displaying of the actual number is coming from. I mean when i press 4, I see 4 on the screen of the calc, where is the line that makes the display? Something like System.out.print("4"); in JAVA :) does getElementsById('screen'); does it ? since screen is of type input?
score: 0

http://stackoverflow.com/q/26597112
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41834174
type: Question
linked to: http://stackoverflow.com/q/26614053
accepted answer: http://stackoverflow.com/a/26597229
has comment: http://stackoverflow.com/comment/41821045
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41808765
score: 0
has answer: http://stackoverflow.com/a/26597229
answer count: 1
has comment: http://stackoverflow.com/comment/41808727
has title: Cannot get .js to be called upon form POST
has body: I have a bit of code that's "working," but is not doing what I want it to do. On my page, I have a bit of code in the header: and inside my main page, I have: ...code... When I click the button inside of this form, I want the code inside of update.js to execute, but the page redirects to update.php and executes my code successfully instead. I am trying to bypass this redirect, and execute the code without doing a page refresh. I do not understand why it's not working. I got the .js from a tutorial on how to use AJAX. $(function() { // Get the form. var form = $('#updateChanges'); // Set up an event listener for the contact form. $(form).submit(function(event) { // Stop the browser from submitting the form. event.preventDefault(); // Serialize the form data. var formData = $(form).serialize(); // Submit the form using AJAX. $.ajax({ type: 'POST', url: $(form).attr('action'), data: formData }) }); }); my javascript file is not being called. Why?

http://stackoverflow.com/q/26544931
has answer: http://stackoverflow.com/a/26544979
downvote count: 1
has answer: http://stackoverflow.com/a/26544996
has answer: http://stackoverflow.com/a/26545118
tagged with: javascript
score: -1
type: Question
answer count: 3
upvote count: 0
has body: I have a html page which contains a form with fields for sign up (registration / new member) a form for sign in (login for already member) The sign in form is : E-mail PAssword The sign up form is : E-mail Password Repeat Password One the other side, I have a php script file which contains function to check and insert a userid. function getPassword($utilisateur) { try { $dbh = new PDO(DSN, USER, PASS); $uid = $utilisateur; $sql = "SELECT password FROM cc_users WHERE uid =:uid"; $sth = $dbh->prepare($sql); $sth->execute(array(':uid'=>$uid)); $result = $sth->fetchAll(); return (count($result) == 1) ; } catch (PDOException $e) { print "Erreur ! : " . $e->getMessage() . " "; die(); } } function setPassword($uid, $pass) { $dbh = new PDO(DSN, USER, PASS); $sql = "UPDATE cc_users SET password =:pass where uid =:uid"; $sth = $dbh->prepare($sql); $sth->execute(array(':pass'=>$pass ,':uid'=>$uid)); echo $count = $sth->rowCount(); return $dbh->exec($sql); } function newPassword($utilisateur, $pass) { $crypt = crypt($pass); return setPassword($utilisateur, $crypt); } function checkPassword($utilisateur, $pass) { if (empty($pass)) return FALSE; $interne = getPassword($utilisateur); $crypt = crypt($pass, $interne); return ($interne === $crypt); } print_r($_POST); My questions are : How I can check on which form the user is coming? How can I do an $.ajax call for checking the form? If yes how? Thanks
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41713343
tagged with: php
has title: Two form on a single page : How to identify which form validate using jquery ajax function
type: UnansweredQuestion

http://stackoverflow.com/comment/41757584
type: Comment
type: QuestionComment
has text: We need to see the code... [Try the new stack snippet feature](http://meta.stackoverflow.com/questions/269754/stack-snippets-sandbox-try-it-out-here).
comment on: http://stackoverflow.com/q/26569212
score: 0

http://stackoverflow.com/comment/41934589
type: AnswerComment
comment on: http://stackoverflow.com/a/26659482
type: Comment
has text: Is it something is possible that to Store button(start) state ?
score: 0

http://stackoverflow.com/comment/41854930
has text: Yes I too think the same and as per your error @Jiggles I think its error in scripts-2.js file
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26622141

http://stackoverflow.com/a/26565340
has comment: http://stackoverflow.com/comment/41749995
score: 1
has body: You can acheive this by iterating through the existing tabs and checking whether to_show exists, if we find a match set exists=true; exists = false; $.each($('.recipient_tab'),function(index,element){ if($(element).attr('data-recipient') == to_disp){ exists = true; } }) if(!exists){ $(".selected_recipients").show().append('' + to_show + 'x'); }
has comment: http://stackoverflow.com/comment/41749926
downvote count: 0
answers question: http://stackoverflow.com/q/26565264
upvote count: 1
type: Answer

http://stackoverflow.com/a/26621809
type: Answer
answers question: http://stackoverflow.com/q/26621658
score: 1
upvote count: 1
has body: I hope this piece of code helps you out, the listener attached on the ul tag is now catching all the click events on its children and parsing out their href values. You might want to use a jquery lib to further parse out the #hrefvalue. 1 2 3 4 5
downvote count: 0
has comment: http://stackoverflow.com/comment/41854342

http://stackoverflow.com/a/26577861
has body: You only close html tag, didin't open tag
answers question: http://stackoverflow.com/q/26577750
downvote count: 2
type: Answer
upvote count: 0
score: -2

http://stackoverflow.com/comment/41956794
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26665257
type: Comment
has text: so what can i do ??.. am new in this ..any ideas on how i can produce an audio after the download ?? it would be really helpful

http://stackoverflow.com/q/26653308
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41909885
has comment: http://stackoverflow.com/comment/41910437
has comment: http://stackoverflow.com/comment/41909886
has comment: http://stackoverflow.com/comment/41909746
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41909954
has body: I am trying to retrieve data from JSON. I have written this code. It alerts "1" but doesn't alert "2".
type: Question
has comment: http://stackoverflow.com/comment/41909850
tagged with: javascript
has comment: http://stackoverflow.com/comment/41909804
has comment: http://stackoverflow.com/comment/41910184
has title: JSON.parse(hr.response) error
score: 0
has comment: http://stackoverflow.com/comment/41910019
answer count: 1
has comment: http://stackoverflow.com/comment/41909758
tagged with: jquery
has answer: http://stackoverflow.com/a/26653410

http://stackoverflow.com/a/26615211
type: Answer
accepted answer of: http://stackoverflow.com/q/26614580
answers question: http://stackoverflow.com/q/26614580
has body: After hunting around I found that the variable I was dealing with was of type CSSStyleDeclaration which comes with a method getPropertyCSSValue Simplified extract var rules = document.styleSheets[0/*sheetIndex*/].rules[0/*ruleIndex*/]; console.log(rules.toString()); // "[object CSSStyleRule]" for(var a = 0; a&lt;rules.style.length; a++) { var rule = rules.style[a]; console.log(rule,rules.style.getPropertyCSSValue(rule).cssText); // eg: "text-align","center" } This avoids issues with "border" and "border-left"
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26613097
downvote count: 0
has body: I don't see the method you are using (evaluateJavaScript) in the current UIWebView API docs but it is in the WKWebView docs. Maybe you are using the wrong API? Perhaps try using stringByEvaluatingJavaScriptFromString(_:) instead: let script = "document.body.style.background = 'red'" if let result = webView.stringByEvaluatingJavaScriptFromString(script) { println("result is \(result)") } Also, i'm not sure if the "!" is needed (a hunch tells me it's not), as there is no context around your code. So maybe try both versions. Getting a string from a file is something like: let path = NSBundle.mainBundle().pathForResource("jsFileName", ofType: "js") if let content = String.stringWithContentsOfFile(path, encoding: NSUTF8StringEncoding, error: nil) { println("js content is \(content)") } Loading from disk has a lot of variables around how your file is being copied and stored so your going to have to do some work to fit the path variable to your structure.
answers question: http://stackoverflow.com/q/26573528
has comment: http://stackoverflow.com/comment/41866137
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/41887638
upvote count: 3
has comment: http://stackoverflow.com/comment/41887111

http://stackoverflow.com/a/26668305
has comment: http://stackoverflow.com/comment/41937855
has comment: http://stackoverflow.com/comment/41938222
type: Answer
has comment: http://stackoverflow.com/comment/41937871
has body: As you are having multiple save-sale div, you can use .each() to iterate them all and check its value for making save-sale and price-old hidden. DEMO
score: 2
has comment: http://stackoverflow.com/comment/41937822
upvote count: 2
has comment: http://stackoverflow.com/comment/41938689
accepted answer of: http://stackoverflow.com/q/26668288
answers question: http://stackoverflow.com/q/26668288
has comment: http://stackoverflow.com/comment/41938388
has comment: http://stackoverflow.com/comment/41938562
has comment: http://stackoverflow.com/comment/41938681
has comment: http://stackoverflow.com/comment/41937900
has comment: http://stackoverflow.com/comment/41938193
has comment: http://stackoverflow.com/comment/41938525
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41938289

http://stackoverflow.com/q/26542022
downvote count: 2
has comment: http://stackoverflow.com/comment/41781530
answer count: 3
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23740548
has answer: http://stackoverflow.com/a/26542081
has answer: http://stackoverflow.com/a/26542077
tagged with: php
upvote count: 0
has comment: http://stackoverflow.com/comment/41708250
has body: I am trying to store php value in my javascript variable. But this code is giving me syntax error. Is the code correct ? var b = &lt;?php echo $tagValue;?&gt;; alert("B is " +b);
has comment: http://stackoverflow.com/comment/41708294
type: Question
has comment: http://stackoverflow.com/comment/41708279
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/26542085
has title: Storing php value in javascript variable
has comment: http://stackoverflow.com/comment/41708297

http://stackoverflow.com/q/26562178
tagged with: css
has body: I am building a menu on a web site, and the thing is that I can't realize changing of a selected menu item. I know that it has to be made by adding some JS, however as I am new in the coding I did not find any solution. The menu is ready and works fine then I click on an item it switches to active, but when the page starts there is no any active item and not changing when I scroll it using mouse. CSS #menu li { display:inline-block; float: right; margin-top: 8px; } #menu { position:fixed; z-index: 70; height: 60px; width: 100%; background-color: #FFFFFF; } /**home-button**/ #menu #Home-button a:hover { background-image:url(images/home_hov.gif); background-repeat: no-repeat; } #menu #Home-button a { padding: 20px 20px; display:inline-block; background-image:url(images/home_st.png); background-repeat: no-repeat; } /**about-button**/ #menu #About-button a:hover { background-image:url(images/about_hov.gif); background-repeat: no-repeat; } #menu #About-button a { padding: 20px 20px; display:inline-block; background-image:url(images/about_st.png); background-repeat: no-repeat; } /**works-button**/ #menu #Works-button a:hover { background-image:url(images/works_hov.gif); background-repeat: no-repeat; } #menu #Works-button a { padding: 20px 20px; display:inline-block; background-image:url(images/works_st.png); background-repeat: no-repeat; } /**contacts-button**/ #menu #Contacts-button a:hover { background-image:url(images/contacts_hov.gif); background-repeat: no-repeat; } #menu #Contacts-button a { padding: 20px 20px; display:inline-block; background-image:url(images/contacts_st.png); background-repeat: no-repeat; } /**selected-items**/ #menu #Home-button.active a { background-image:url(images/home_act.png); background-repeat: no-repeat; } #menu #About-button.active a { background-image:url(images/about_act.png); background-repeat: no-repeat; } #menu #Works-button.active a { background-image:url(images/works_act.png); background-repeat: no-repeat; } #menu #Contacts-button.…
type: Question
tagged with: javascript
has title: Highlighting Current Menu Item On Page Scroll
has answer: http://stackoverflow.com/a/26562979
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41746440
type: Comment
has text: Works perfectly, but not only for numbers under 100. Tested it with 11 digit numbers and the result was correct. Thanks alot
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26563071

http://stackoverflow.com/comment/41663408
type: Comment
comment on: http://stackoverflow.com/a/26516729
score: 0
type: AnswerComment
has text: OP is trying to convert a current array of objects to a different format - I dont see how this answer helps?

http://stackoverflow.com/comment/41677119
score: 0
has text: @sabithpocker Oh ok, thnx. Could it be a host problem? Because the example seems to be working fine: [*link*](http://davidjbradshaw.com/iframe-resizer/example/)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26523521

http://stackoverflow.com/q/26563451
has answer: http://stackoverflow.com/a/26563620
has title: Javascript: sum all found .data() for an array of items
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26563802
has body: We have an un-ordered list. I am working on a function to return the maximum sum speed+delay from the $('.item') array. In the current example it should return 700. Something like function sumArrayData(ar) { return maximum speed+delay for ar } Thank you for your input.
has comment: http://stackoverflow.com/comment/41746854
score: 1
tagged with: sum
accepted answer: http://stackoverflow.com/a/26563802
type: Question
answer count: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26563620

http://stackoverflow.com/q/26513950
answer count: 1
tagged with: jquery-dialog
has title: Making jquery Dialog working between two pages
accepted answer: http://stackoverflow.com/a/26514731
score: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26514731
has body: I have a dialog setup as follow $("#myDialog").dialog({ autoOpen: true, close: function(event, ui) { $("#myDialog-content").html(""); $(this).dialog("destroy"); } }); $("#myDialog").css("min-height",""); $("#myDialog-content").html("Loading..."); $.ajax({ ... success: function(response) { $("#myDialog-content").html(response); } }); This working fine I load and close dialog in same page but not able to make it work properly where I move between pages. Here is a my page flow From source page(say PageA) I make AJAX call to load the page containing dialog div(say PageB). Link on this page call above method to display dialog. (For first time it runs OK). When I click close button. Dialog close and with firebug I can still see dialog div at the end with UI classes but in hidden state. If I go back to source page (Page A) and reload the PageB.In firebug I can see two div - one originally from JSP and second one from step 3. Now if I click button to load dialog box - It used hidden to populate new data and never use new div created by jquery. So I just have blank dialog box. I am not sure if this is jquery Dialog issue or my page flow. One possible solution I though of is use remove in close function to remove dialog div completely but it puts burden to create this div everytime page PageB is loaded. Is there any other way or any thing I am doing wrong in this scenario?
type: Question

http://stackoverflow.com/a/26526275
downvote count: 0
answers question: http://stackoverflow.com/q/26525219
accepted answer of: http://stackoverflow.com/q/26525219
type: Answer
score: 2
has body: If the HTML is not well-formed for jQuery (e.g. not starting with an &lt;&gt; element), you need to wrap it first (e.g. in a dummy div element) JSFiddle: http://jsfiddle.net/TrueBlueAussie/vme0us9s/1/ var nodeIdString = marker.title; // Create a new DIV and insert the content var $div = $('&lt;div&gt;').html(nodeIdString); var checkThisVal = $div.find('.nodeId').text(); alert(checkThisVal); // Alerts 117
upvote count: 2
has comment: http://stackoverflow.com/comment/41690719
type: AcceptedAnswer

http://stackoverflow.com/comment/41891490
type: AnswerComment
score: 0
type: Comment
has text: I have ajaxRequest1 - [0-10] time. ajaxRequest2 - [2-4] time hence ajaxRequest1 will get and handle after ajaxRequest2. For my application it is wrong
comment on: http://stackoverflow.com/a/26642261

http://stackoverflow.com/a/26609436
score: 1
upvote count: 1
has body: Just place one image on ot of another and use fadeOut() like HTML &lt;div class="container-with-relative-position"&gt; &lt;img1&gt; &lt;img2 style="position: absolute;" id="img2"&gt; &lt;/div&gt; JS $('#img2').fadeOut(1000); For js function you can use any trigger you want like click,'hover` etc. And html is just a scheme of what you have to do, not the actual code.
downvote count: 0
answers question: http://stackoverflow.com/q/26609301
type: Answer

http://stackoverflow.com/q/26575302
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/26575673
has body: I`m learning JQM and have a lot of questions. Not asking if not trying to do many things. I have a listview element. When page is loaded it sets listview with autodivider alphabetically by name. When you click on the "category" navigation button it sets elements according to its category, grouping. All is fine there. My problem is when trying to go back clicking on the "names" navigation button nothing changes. Please help. Here is simplified sample: http://jsfiddle.net/smatisen/v382r874/ Test Name Category Test Name 1 Test Name 2 Test Name 3
has answer: http://stackoverflow.com/a/26576313
accepted answer: http://stackoverflow.com/a/26576313
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26575673
has title: Changing listview dividers on the fly
tagged with: listview
type: Question
has answer: http://stackoverflow.com/a/26576476
answer count: 3
tagged with: jquery-mobile

http://stackoverflow.com/q/26655274
tagged with: hello.js
type: UnansweredQuestion
score: 0
has body: I'm using Hello.js to handle Flickr API. The problem I'm facing now is that when user clicks on Flickr button to get /me/albums from Flickr, the popup window appears and closes itself right away without asking for login. However, the same code does work for Facebook as it does open the popup and asks for login before closing when the user click Submit. What is the possible problem here?
has answer: http://stackoverflow.com/a/26675776
type: Question
answer count: 1
tagged with: javascript
tagged with: flickr
has title: Hello.js - Flickr API auth not displaying login form but rather close it

http://stackoverflow.com/q/26543609
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has body: I have a code like this BackendApp.controller('CustomCtrl', function ($scope) { $scope.names = [ {"name" : "John", "Year" : 18}, {"name" : "Tony", "Year" : 19} ]; $scope.saveTemplate = function() { console.log($scope.names); // [ // {"name" : "John", "Year" : 18}, // {"name" : "Tony", "Year" : 19} // ]; } }); and html {{name.name}} // if we write something in input we see the changed value here Save // when we click on it, we get old value vor the names array how can i get the access for names array in saveTemplate method ? :/ it returns only old value for variable
has comment: http://stackoverflow.com/comment/41711393
has comment: http://stackoverflow.com/comment/41711126
has comment: http://stackoverflow.com/comment/41711595
type: Question
has answer: http://stackoverflow.com/a/26543644
tagged with: javascript
has title: AngularJS - can't read the variable's changed value in one of my methods, it returns the old valud
has comment: http://stackoverflow.com/comment/41712881

http://stackoverflow.com/q/26592824
has comment: http://stackoverflow.com/comment/41800367
has title: Add first part of div, then add last part of div seperatley using javascript/jquery
has answer: http://stackoverflow.com/a/26593785
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has body: I want to warp this ul ( shown below ) in a 2 div test and i want to get . test
has comment: http://stackoverflow.com/comment/41800685
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26593785
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41800762
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41907903
type: QuestionComment
has text: Adding a script works : it will be ran after being append. Removing works as well but it's useless : it has allready been ran the vars and objects are stored in memory etc.
comment on: http://stackoverflow.com/q/26652166
score: 0
type: Comment

http://stackoverflow.com/q/26565795
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26565824
tagged with: authentication
has answer: http://stackoverflow.com/a/26565946
has answer: http://stackoverflow.com/a/26565835
tagged with: forms
type: Question
tagged with: javascript
score: 0
has title: Simple Javascript login form
has answer: http://stackoverflow.com/a/26565989
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: Username: Password: Please Login! I have created a little login form on Javascript and I want it to navigate to Content.html when username and password are correct but when I click my Login button it just removes the text from the text box's, can anybody see whats wrong?

http://stackoverflow.com/comment/41700879
has text: Please retag as @javascript.
comment on: http://stackoverflow.com/q/26537435
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41845672
type: QuestionComment
comment on: http://stackoverflow.com/q/26611809
has text: @Sharky XframeOrigins response is same origins. preventing the Results to be displayed by the iframe that the Javascript they provide genetrates
score: 0
type: Comment

http://stackoverflow.com/comment/41733672
type: AnswerComment
comment on: http://stackoverflow.com/a/26555634
type: Comment
has text: Its not all working in my case.. may be my css affecting it.. here is my css.. css is too long to upload
score: 0

http://stackoverflow.com/comment/41878518
type: AnswerComment
score: 0
has text: That is exactly my case i guess. It keeps on loading forever. i'll look into it, hopefully post an answer later today. thank you.
type: Comment
comment on: http://stackoverflow.com/a/26634922

http://stackoverflow.com/q/26663969
has comment: http://stackoverflow.com/comment/41930459
has body: Here is a fiddle. http://jsfiddle.net/p31L86wg/4/ Ideally, the green box should always be in the centre of the container, but for some reason when I set the left property it is choosing to stop 8 pixels before the pixel value I tell it to assume. angular.module('website', ['ngAnimate']) .controller('MainCtrl', function ($scope) { $scope.products = [ {name: 'p1'}, {name: 'p2'}, {name: 'p3'}, {name: 'p4'}, {name: 'p5'} ]; $scope.currentIndex = 0; $scope.setCurrentSlideIndex = function (index) { $scope.currentIndex = index; }; $scope.isCurrentSlideIndex = function (index) { return $scope.currentIndex === index; }; }) .directive('pan', function(panBuckets) { return function(scope, elm, attr) { elm.css('position', 'relative'); var parentWidth = elm.parent().width(); elm.css('left', Math.floor(parentWidth/2)-(70/2)+'px'); scope.pan = function(vector) { var bucket = panBuckets[attr['pan']]; if (bucket) { var result = bucket.selectNewItem(bucket.selectedIndex-vector); var rect = elm[0].getBoundingClientRect(); console.log('amount moved',rect.left, (vector*70)+'px',rect.left+(vector*70)+'px'); if (result!==false) elm.css('left', rect.left+(vector*70)+'px'); console.log(bucket.selectedItem[0].getBoundingClientRect().left, rect.left); } }; }; }) .service('panBuckets', function() { return {}; }) .directive('panItem', function(panBuckets) { var itemBuckets = panBuckets; return function(scope, elm, attr) { var bucket = itemBuckets[attr['panItem']]; if (!bucket) { itemBuckets[attr['panItem']] = []; bucket = itemBuckets[attr['panItem']]; elm.addClass('product-active'); bucket.selectedItem = elm; bucket.selectNewItem = function(idx) { if (idx &lt; 0) idx = 0; if (bucket.selectedIndex==idx) return false; if (!bucket[idx]) return false; bucket.selectedItem.removeClass('product-active'); bucket.selectedItem = bucket[idx]; bucket.selectedItem.addClass('product-active'); bucket.selectedIndex = idx; return idx; }; bucket.selectedIndex = 0; } bucket.push(elm); scope.panBucket = bucket; }; …
answer count: 3
has answer: http://stackoverflow.com/a/26664448
has title: Why does setting css left property result in it going off by 8?
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/26664667
score: 0
has answer: http://stackoverflow.com/a/26665274
has comment: http://stackoverflow.com/comment/41930605
type: Question
tagged with: javascript

http://stackoverflow.com/q/26606234
has comment: http://stackoverflow.com/comment/41834785
tagged with: javascript
has title: AngularJS - File Download through AJAX
has comment: http://stackoverflow.com/comment/41827960
upvote count: 4
has comment: http://stackoverflow.com/comment/41825820
answer count: 2
downvote count: 0
tagged with: url
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26607466
has comment: http://stackoverflow.com/comment/41826099
has body: I created an angular js program for downloading a file from the server here follows the code HTML Code EXPORT AS CSV AngularJS Controller $scope.exportCSVBulk=function(){ var page = "../importExportService/exportBulkCSV/"+batchExec.id; $http.get(page).success(function(response) { $scope.fullListUrl = 'data:text/csv;charset=utf-8,' + escape(response); }); } Here what i am doing is when a user click on the EXPORT AS CSV link the function exportCSVBulk fires and from that function the url value (fullListUrl) sets. But this is an ajax request, so when a user click on the link the url, the response time become little bit long which results the url will not redirected properly. Is it possible to fix this problem? or is there is any alternative way to fix this?
has comment: http://stackoverflow.com/comment/41826076
has comment: http://stackoverflow.com/comment/41825334
tagged with: spring-mvc
type: AnsweredQuestion
score: 4
tagged with: java
possible better answer: http://stackoverflow.com/a/37288180
type: Question
has answer: http://stackoverflow.com/a/37288180
has answer: http://stackoverflow.com/a/26607466

http://stackoverflow.com/comment/41840668
type: Comment
comment on: http://stackoverflow.com/q/26614580
has text: Whilst I'm not aware of a method to do so, it should be a fairly trivial job with a regex replace if the rules are assumed to just be "remove initial hyphen if present, and remove subsequent hyphens and capitalise the following letter"
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41671369
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26520982
has text: What language is this?

http://stackoverflow.com/a/26937691
accepted answer of: http://stackoverflow.com/q/26520818
type: Answer
has body: I have been working with the GEO chart for the EMBED api and had the exact same issues. It seems to me that the GEO chart is pretty feature limited, and the region you set has no bearing on what data it shows, but instead, only zooms the map to the appropriate viewing area. I added a filter to my query, I think this will work for you... "query": { "start-date": "14daysAgo", "end-date": "yesterday", "ids": "ga:91097884", "dimensions": "ga:city", "metrics": ["ga:sessions"], "start-index": 1, "max-results": 1000, "filters": "ga:region==Florida" }, Note the last line with the filter, I know this may not be ideal, but it is the only way I could get the Embed GEO chart to work properly.
answers question: http://stackoverflow.com/q/26520818
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42426925
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26613270
has comment: http://stackoverflow.com/comment/41838272
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26613611
has comment: http://stackoverflow.com/comment/41838258
has comment: http://stackoverflow.com/comment/41838233
accepted answer: http://stackoverflow.com/a/26613600
has title: PHP echoing emptying string in $.ajax response
has comment: http://stackoverflow.com/comment/41838416
score: 1
possible better answer: http://stackoverflow.com/a/26613611
favorite count: 0
has comment: http://stackoverflow.com/comment/41838914
has comment: http://stackoverflow.com/comment/41838778
upvote count: 1
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41838431
has answer: http://stackoverflow.com/a/26613600
has body: I'm trying to get back data from an AJAX call. I tested with a string but it's returning empty. I just want to print the string to console on response. JS: makeRequest: function(sService, oData){ var request = $.post( '../../Utils/utils/php/userQuery.php' ,{'sService' : sService, 'oData': oData} ,'json' ); request.done(function(oResult){ // This is firing off, but is printing empty string console.log(JSON.stringify(oResult)); var fail = errorHandler.check(oResult); if(!fail){ // This is firing off, but is printing empty string console.log(oResult); } else{ console.log(fail); } }); request.fail(function(oResult){ console.log("There was an error in retrieving service data"); }); } PHP: class request{ private $sService; function _construct($sService){ $_SESSION['user_Id'] = 100000; $this-&gt;$sService = $sService; switch($this-&gt;$sService){ case 'follower': break; case 'followee': break; case 'promoter': break; case 'promotee': break; case 'note': // This should be hit and return "hit" echo json_encode("hit"); break; case 'createFollowee': break; case 'createPromotee': break; case 'createNote': break; default: echo "ErrorCode: 4000"; break; } } } $request = new request($_POST['sService']); If I try to $.parseJSON(oResult) the response I get an error with parsing because it's empty. Where am I going wrong at? ANSWER: The updated code above works. There was several problems provided by answers. I didn't add 2 _ to construct().[before: _construct after: __construct] I didn't is $this to point to my global variable inside of my class. I originally didn't initialize my class. I wasn't passing my variable(s) to the construct when initializing class. I hope this helps someone else.
has comment: http://stackoverflow.com/comment/41838125
type: Question

http://stackoverflow.com/a/26571794
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26571521
score: 1
accepted answer of: http://stackoverflow.com/q/26571521
has body: Firstly, either you make id of items unique or use class instead of id as I done in this solution. $('#addToCartButton2').click(function(){ var toAdd=$("#chooseItem2 option:selected").text(); var itemNbr2=$("#itemNbr2").val(); if(toAdd !== defaultSelectFormText && itemNbr2 >=1){ $('#defaultText').remove(); $('.col-md-5').append(' ' + itemNbr2 + ' Adet ' + toAdd + 'Sipariş listesinden çıkarmak için tıklayın!' + ' '); ordersArray.push(itemNbr2 + ' Adet ' + toAdd); alert(ordersArray.toString()); }; }); $(document).on('click', '.items', function() { var index = ordersArray.indexOf($('span:first', this).text()); alert(index); if (index > -1) { ordersArray.splice(index, 1); } $(this).remove(); });
type: AcceptedAnswer

http://stackoverflow.com/q/26671526
answer count: 1
has title: string split '\' in jquery or javascript
tagged with: tokenize
score: 0
has comment: http://stackoverflow.com/comment/41943511
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26671605
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I tried to split the string with special character '\' but its not working. str = 'c:\images\jhjh.jpg'; result = str.split('\'); help me to resolve the issue. Thanks in advance
type: Question
accepted answer: http://stackoverflow.com/a/26671605
has comment: http://stackoverflow.com/comment/41943414
has comment: http://stackoverflow.com/comment/41943479
has comment: http://stackoverflow.com/comment/41943916
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/26564205
type: UnansweredQuestion
downvote count: 0
score: 1
has title: How to refresh chat message div based on message id?
has answer: http://stackoverflow.com/a/26565118
type: Question
tagged with: javascript
tagged with: chat
has body: Currently I am using ajax to refresh the messages div every second, however the messages div will not show after refresh or after reply a message. The page url is like http://stuweb.cms.gre.ac.uk/~mp261/Pepero%20College/tutor_message.php?id=1 This is my javascript: var auto_refresh = setInterval(function () { $('#messages') .load('tutor_message.php?_=' + Math.random() + ' #messages') .fadeIn("slow") ; }, 1000); // refresh every 10000 milliseconds How should I add in the id to the script above? Is it possible to do so? Sorry if my question is not clear enough. Thanks.
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/41752022
comment on: http://stackoverflow.com/q/26566460
has text: @gefei Really? https://developer.mozilla.org/en-US/docs/Web/API/Window.prompt
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26668165
favorite count: 0
upvote count: 1
has body: Background and Tools: I am using the Bootstrap Tags Input jQuery plugin with Rails. I am storing the plugin as vendor/assets/javascripts/bootstrap-tagsinput.js and it's stylesheet as vendor/assets/stylesheets/bootstrap-tagsinput.css. I am tagging all of my Books in a digital library Rails app. Problem: If I navigate directly to Book#new or Book#edit, tags work as expected from the project's demo page. However, if I navigate to the Books#edit or Books#new page via a link click on another page, then my text input is formatted as a typical html text input with the comma-separated string science,fiction,good,short displayed. More Info: My input looks like this: &lt;input class="form-control tagsinput" data-role="tagsinput" id="books_tags" name="books[tags]" type="text" value="science,fiction,good,short"&gt; The bootstrap-tagsinput.js file has these lines at the bottom of the file: /** * Initialize tagsinput behaviour on inputs and selects which have * data-role=tagsinput */ $(function() { $("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput(); }); })(window.jQuery); It seems that this initialization gets run by Rails and applies it's JavaScript magic to the &lt;input&gt; when entering a URL location directly, but not when navigating via links on pages. Question: How do I get the initialization to run when navigating from another page?
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has title: How do I initialize Bootstrap Tagsinput with Ruby on Rails and Bootstrap 3
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27010773
tagged with: ruby-on-rails-4
accepted answer: http://stackoverflow.com/a/27010773
tagged with: bootstrap-tags-input
has comment: http://stackoverflow.com/comment/50588888

http://stackoverflow.com/q/26646610
upvote count: 1
has title: fancybox directive not grouping images
type: Question
has comment: http://stackoverflow.com/comment/50154993
has body: I have created directive for fancy box. it opens image in fancy box not grouping images . i checked other solution here in Fancybox directive in ng-repeat is not grouping images but they won't solve my problem. HTML: &lt;a fancybox class="fancybox" rel="group" data-thumbnail="http://fancyapps.com/fancybox/demo/2_s.jpg" href="{[{i.location}]}" title="{[{i.name}]}" width="460" height="298"&gt; ## Image ###&lt;img src="{[{i.location}]}" alt="" width="460" height="298" /&gt; &lt;/a&gt; JS fancy Box Directive :: App.directive('fancybox',function($compile, $timeout){ return { link: function($scope, element, attrs) { alert('i am called'); element.fancybox({ openEffect : 'none', closeEffect : 'none', padding : 40, margin : [20, 60, 20, 60] ,// Increase left/right margin helpers: { thumbs: { width : 40, height : 40, source : function(current) { return $(current.element).data('thumbnail'); } } }, }); } }; });
linked to: http://stackoverflow.com/q/23688042
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/31067793
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/50158043
has comment: http://stackoverflow.com/comment/48126838
tagged with: fancybox
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/26634077
answers question: http://stackoverflow.com/q/26633638
type: Answer
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26633638
has body: $content.on('keyup click', function(e) { $(window.getSelection().baseNode).closest('p').addClass('hover'); $p.removeClass('hover'); });

http://stackoverflow.com/a/26565014
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/41769181
has body: $_GET just checks the query string in the URL (the part of the URL after the /?) for variables. Look at the URL the form actually submits to.
answers question: http://stackoverflow.com/q/26564586
type: Answer
has comment: http://stackoverflow.com/comment/41755259
downvote count: 1

http://stackoverflow.com/a/26667700
score: 2
has comment: http://stackoverflow.com/comment/41958790
downvote count: 0
has comment: http://stackoverflow.com/comment/41957378
upvote count: 2
type: Answer
has body: I would recommend a bit more robust implementation for these reasons: If it's a jQuery object passed in, then you should call the jQuery .remove() because jQuery may leak memory for data and event listeners if you don't let jQuery remove DOM elements that jQuery operations such as .data() or .on() have been used with. It's not enough to just do if (elem.length) because it could still be a nodeList or an Array with a .length of 0. I changed it to test to see if that property actually exists. FYI, if you want a more robust test to see if it's an actual single DOM node, there's a robust function to do that here, though I'm not sure that's needed here. To protect against a dynamic nodeList changing out from under you or children and parents both being in the list (you don't want to remove parent before child), it is best to iterate the nodeList backwards from back to front (you don't have to make a copy). If this is just a normal array of DOM elements that are not necessarily in document order and there are parent/child elements both in the list and out of order or anyone passes you an array with any old DOM elements in it, you could end up getting an exception on a .removeChild() operation so it is best to just catch any exceptions that might happen there so the operation can always complete through the whole list, even if there is a bad element in the list. Your code did not have a consistent return value. It had one path that wasn't returning anything. I changed it to return false if nothing elem was falsey and true if it was processed. You can obviously modify this as desired, but if you're going to have a meaningful return value, you should have a return value for all code paths (you didn't have one if it was a single DOM node). Recommended code: // _remove(elem) - remove one or more DOM nodes from their DOM hierarchy // elem can be an Array of DOM nodes or a pseudo-array like a nodeList // or elem can be a single DOM element function _remove(elem) { if (!elem) { r…
has comment: http://stackoverflow.com/comment/41957355
answers question: http://stackoverflow.com/q/26665916

http://stackoverflow.com/q/26657592
has comment: http://stackoverflow.com/comment/41919690
has comment: http://stackoverflow.com/comment/41919578
type: Question
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: meteor-blaze
linked to: http://stackoverflow.com/q/26575551
has body: Forgive me if this is an absolutely dumb question but I have spent like a day trying to fix this but just couldn't. So, I am using accounts-templates which has been recently renames to useraccounts. Specifically I'm using the unstyled version. On my home route(using Iron Router), I have the following code: Router.configure({ loadingTemplate: 'loading' }); Router.map(function() { this.route('home', { path: '/', onBeforeAction: function(pause) { return AccountsTemplates.ensureSignedIn.call(this, pause); } }); }); Router.onBeforeAction('loading'); But when I load up the home page, there is this flash showing the login page and then the home template loads up. Ideally a progress bar should show up while the user is logging in and everything runs smooth. I tried solving this with the iron-router-progress which I found out, doesn't work with Meteor 1.0. Then I tried integrating nprogress but that didn't work. So what's the solution?
has comment: http://stackoverflow.com/comment/41918881
has comment: http://stackoverflow.com/comment/47594056
tagged with: meteor
has title: Flash of login screen while user is logginIn in Meteorjs
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/41919842
has comment: http://stackoverflow.com/comment/41920130
accepted answer: http://stackoverflow.com/a/26658925
has answer: http://stackoverflow.com/a/28615882
downvote count: 0
possible better answer: http://stackoverflow.com/a/28615882
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26658925

http://stackoverflow.com/q/26666644
tagged with: object
has comment: http://stackoverflow.com/comment/41935651
tagged with: javascript
has comment: http://stackoverflow.com/comment/41935674
score: 0
tagged with: function
has body: I'm trying to get this car to move with the arrow keys and rotate as well. The car loaded onto the canvas, but its not moving with the keys. I think I've put in everything I need, or I'm wrong. Or, there just some minor mistakes. Anyways, please help a noob like me :D! Ball JS: //Set context for canvas var context = $('#gameCanvas')[0].getContext('2d'); //Dimensions For Canvas var width = $('#gameCanvas').width(); var height = $('#gameCanvas').height(); //Image for Car var car = new Image(); car.src = "http://thumb1.shutterstock.com/thumb_small/338038/192139124/stock-vector-illustration-of-a-red-sports-car-top-view-192139124.jpg"; //Car Variables and position var x = 80; var y = 80; var vx = 0; var vy = 0; var angle = 0; var mod = 0; //Draws car during motion var moveInterval = setInterval(function () { draw(); }, 30); //Clears Canvas function draw() { context.clearRect(0, 0, gameCanvas.width, gameCanvas.height); // Change direction and velocity of car x += (vx * mod) * Math.cos(Math.PI / 180 * angle); y += (vy * mod) * Math.sin(Math.PI / 180 * angle); context.save(); context.translate(x, y); context.rotate(Math.PI / 180 * angle); context.drawImage(car, -(car.width / 2), -(car.height / 2)); context.restore(); } //Codes for keyboard keys $('#gameCanvas').keydown(function(event) { code = event.keyCode; if (code == 37) vx = -10.0; // left key pressed if (code == 39) vx = 10.0; // rightkey pressed if (code == 38) vy = -2.0; // up key pressed if (code == 40) vy = 2.0; // down key pressed }); $('#gameCanvas').up(function(event) { code = event.keyCode; if (code == 37) vx = 0.0; // leftkey not pressed if (code == 39) vx = 0.0; // rightkey not pressed if (code == 38) vy = 0.0; // upkey not pressed if (code == 40) vy = 0.0; // downkey not pressed }); update();
tagged with: html5-canvas
answer count: 1
has answer: http://stackoverflow.com/a/26666985
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41935712
has comment: http://stackoverflow.com/comment/41934875
has title: How can I get my JS car to move?
upvote count: 1
has comment: http://stackoverflow.com/comment/41936224
downvote count: 1
type: Question

http://stackoverflow.com/a/26660535
has body: if(username.length &gt;= MIN_LENGTH &amp;&amp; username.length &lt;= MAX_LENGTH){ //allright Here we've checking MIN and MAX length of value of username
has comment: http://stackoverflow.com/comment/41923440
score: 0
answers question: http://stackoverflow.com/q/26660500
type: Answer

http://stackoverflow.com/comment/41683622
has text: Also `else if (status.record < 3600) {` does not make sense if status.record is an array - testing here: http://jsfiddle.net/mplungjan/kgcfafcf/
score: 0
comment on: http://stackoverflow.com/q/26527800
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41711439
score: 0
comment on: http://stackoverflow.com/q/26543640
has text: the $.chat function is defined in a .js file that is referenced in the tags, so it should already be outside the onload, but I may be mistaking, I am not really a web developer..
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41925265
type: QuestionComment
has text: I want to be able to split on both space and \n (will edit above to be clear). Therefore, the space example (that is currently working) of "sn1, sn2, sn3" becomes "sn1,sn2,sn3".I want to be able to split on both space and \n (will edit above to be clear). Therefore, the space example (that is currently working) of "sn1, sn2, sn3" becomes "sn1,sn2,sn3". Edit: After your comment, i tried what you suggested but with "\\n" and it didn't work.
comment on: http://stackoverflow.com/q/26661479
score: 0
type: Comment

http://stackoverflow.com/q/26569265
tagged with: php
upvote count: 0
tagged with: mysql
linked to: http://stackoverflow.com/q/3541711
downvote count: 1
has comment: http://stackoverflow.com/comment/41757536
type: Question
has comment: http://stackoverflow.com/comment/46425184
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26569269
has title: Send a variable containing "&" or "%" to a PHP page using Javascript
tagged with: sql
answer count: 1
has body: I've got a Javascript script that sends 4 variables to a php page. The fact is that, if one (or more) of these variables contain a character such as "&amp;" or "%", it just won't work, it only sends what there was before "&amp;" or "%". For instance, if the content of a variable is "Bolliger&amp;Mabillard", the result will be "Bolliger". Obviously, this happens because the script separate each variable with an "&amp;", how can I solve this? Here's the script I'm talking about &lt;script type="text/javascript"&gt; function save() { var shortname=location.hostname.replace(/^(www.|)([\w]+)(\..+|)/g, "$2"); var url="http://"+window.location.hostname+"/"; var link=window.location.href; var link_title="Bolliger&amp;Mabillard"; window.open("http://www.example.com/add.php?url=" + url + "&amp;shortname="+shortname + "&amp;link="+link + "&amp;link_title="+link_title); } &lt;/script&gt;
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26606456
accepted answer: http://stackoverflow.com/a/26606550
has comment: http://stackoverflow.com/comment/41825418
linked to: http://stackoverflow.com/q/13556941
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/42690792
has answer: http://stackoverflow.com/a/72286266
score: 0
has comment: http://stackoverflow.com/comment/41825350
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26606529
has answer: http://stackoverflow.com/a/26606529
has answer: http://stackoverflow.com/a/26606550
answer count: 4
type: AnsweredQuestion
has body: I have multiple select in which I want to clicked option on which I cliked. E.g. If I click on first option then display first option index or value. HTML Code &lt;select class="founder_designation" rel="Designation" placeholder="Designation" multiple="multiple" name="designation"&gt; &lt;option value=""&gt;-- Select Designation --&lt;/option&gt; &lt;option value="chairman_managing_director"&gt;Chairman &amp;amp; Managing Director&lt;/option&gt; &lt;option selected="selected" value="director" &gt;Director&lt;/option&gt; &lt;option value="whole_time_director"&gt;Whole Time Director&lt;/option&gt; &lt;option value="other"&gt;Other&lt;/option&gt; &lt;/select&gt; jQuery Code $(".founder_designation").on("change",function(){ alert($(this).val()); //It display all selected options with comma separated }) JS Fiddle
has comment: http://stackoverflow.com/comment/41825601
has title: Get index or value of clicked option from multiple select
has comment: http://stackoverflow.com/comment/41825442
type: Question

http://stackoverflow.com/a/26536682
has comment: http://stackoverflow.com/comment/41699711
type: Answer
answers question: http://stackoverflow.com/q/26536486
downvote count: 0
has comment: http://stackoverflow.com/comment/41700023
has body: You have it almost right. In your example : client.get('/test', function(req, res, next) { hlpr.deadSimple('stop here', function (err) { if (err) return next(err); }); console.log ('I dont want this code to be executed, but it will be...'); //this line is executed right away res.send('This code shall not be executed either'); }); It first executes hlpr.deadSimple, which expects a callback. But if you want to wait for this callback before executing the next functions, you need to place them inside your callback function : client.get('/test', function(req, res, next) { hlpr.deadSimple('stop here', function (err) { //everything inside this function will be executed only when it calls back if (err) return next(err); console.log ('I dont want this code to be executed, but it will be...'); res.send('This code shall not be executed either'); }); }); Let me try to explain using a simple analogy (it exists somewhere on this site, but I can't find it...) : You're at work, and you need a document from your colleague Jim across the city in order to fill in a form. You pickup your phone and call Jim, who says : 'I'll have a look and I'll call you back'. Then you hang up the phone and go for a coffee break. After a while, Jim calls you back, and gives you the info. You can then fill up your form. The situation above can be written as : Jim.call(function(info){ fillForm(info) //that's the part you do only when your colleague calls back } haveBreak(); // That's the action you take just after calling Jim, before he calls you back
score: 1
has comment: http://stackoverflow.com/comment/41722581
has comment: http://stackoverflow.com/comment/41699334
has comment: http://stackoverflow.com/comment/41699486
has comment: http://stackoverflow.com/comment/41711302
upvote count: 1

http://stackoverflow.com/a/26535372
score: 4
downvote count: 0
has body: http/https should make no difference in the authentication. Most likely your user/pass needs to be base64 encoded. Try var user = new Buffer('xxx').toString('base64'); var pass = new Buffer('yyy').toString('base64'); See: https://security.stackexchange.com/questions/29916/why-does-http-basic-authentication-encode-the-username-and-password-with-base64
answers question: http://stackoverflow.com/q/26534969
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/97080758

http://stackoverflow.com/q/26516624
score: 2
has answer: http://stackoverflow.com/a/26516941
downvote count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41663327
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26516704
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: I have the following: http://jsfiddle.net/yHPTv/2491/ I was wondering why the transition isn't working? What it's supposed to do is slide in the hidden element (which can be of variable width) to the right edge of the .block element, however, it just pops in. .block { position: relative; width: 500px; height: 300px; overflow: hidden; background: lightgrey; } .block .hidden { background: red; padding: 3px 10px; position: absolute; bottom: 0; left: 100%; transition: 1s; } .block:hover .hidden { transition: 1s; left: auto; right: 0; } ABCDEFGHIJKL I think it has something to do with left: auto because if I change it left: 50%, it works, but not in the way I need it to. Thanks.
favorite count: 0
has answer: http://stackoverflow.com/a/26516687
type: UnansweredQuestion
has title: Transition from 100% to auto
tagged with: css

http://stackoverflow.com/q/26562248
upvote count: 1
has comment: http://stackoverflow.com/comment/41744792
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41744574
has title: Can't Set the box-shadow CSS attribute for certain elements using JQuery
has comment: http://stackoverflow.com/comment/41744711
has comment: http://stackoverflow.com/comment/41745078
has comment: http://stackoverflow.com/comment/41744608
has comment: http://stackoverflow.com/comment/41744691
accepted answer: http://stackoverflow.com/a/26562463
has comment: http://stackoverflow.com/comment/41745123
downvote count: 0
answer count: 1
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41744802
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41745124
has body: I have written a javascript function that sets the box-shadow of an element: function changeBoxShadow(elmt, val) { $(elmt).css("-webkit-box-shadow", val); $(elmt).css("-o-box-shadow", val ); $(elmt).css("-moz-box-shadow", val ); $(elmt).css("-ms-box-shadow", val ); $(elmt).css("box-shadow", val ); } When I called this function like this: clickedCourseItem = this; changeBoxShadow(clickedCourseItem, ''); the code worked fine and the shadow's gone. When I used it again for different element: var shadowBox = $(openedcoursedetails).children(".libcoursefiles_shadow"); changeBoxShadow(shadowBox, ''); The element .libcoursefiles_shadow's box-shadow wasn't gone. I thought that the object was null or undefined so I alert() the class of the element by the alert($(shadowBox).attr("class")) and it gave me the name of the element (not undefined).. can anyone tell me whats the problem with my code??
has answer: http://stackoverflow.com/a/26562463

http://stackoverflow.com/comment/41870735
has text: Is this java or javascript you are talking about?
comment on: http://stackoverflow.com/q/26631072
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/26673060
downvote count: 0
type: Answer
has body: As you mentioned that the webview is loading remote url. So Ti.* or Titanium.* are not available at your remote server. What you can do is : Create a html file within the app and load the data via ajax and use fireEvent. Load the data via titanium http client and use Ti.Platform.openURL accordingly. Edit : Quote from Titanium WebView Docs Remote Scripts Scripts downloaded from remote web servers cannot access the Titanium namespace. To interact with remote content, wait until the content is loaded, then use the evalJS method to execute a JavaScript expression inside the web view and retrieve the value of an expression.
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26672326
answers question: http://stackoverflow.com/q/26672326
type: AcceptedAnswer

http://stackoverflow.com/comment/41857817
has text: "I'm not sure if I can just paste it here" --- well, jquery screenshot is useless. If you want help with particular code - then provide it. Otherwise the question lacks subject.
comment on: http://stackoverflow.com/q/26623394
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26514542
has body: You can extend the Array method like below after that you are free to use 'contains' and 'remove' if (!Array.contains) Array.prototype.contains = function(a) { for (var i in this) { if (this[i] == a) return true; } return false } if (!Array.remove) Array.prototype.remove = function(a) { for (var i in this) { if (this[i] == a) { this.splice(i, 1); } } }
answers question: http://stackoverflow.com/q/26514331
has comment: http://stackoverflow.com/comment/41659344
has comment: http://stackoverflow.com/comment/41659771
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41659511
accepted answer of: http://stackoverflow.com/q/26514331

http://stackoverflow.com/comment/41848177
score: 1
has text: show us what you have so far, I'm sure we'll be able to help you
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26618583

http://stackoverflow.com/q/26601607
tagged with: jquery
tagged with: jcrop
has answer: http://stackoverflow.com/a/26605827
type: UnansweredQuestion
has title: jquery.Jcrop.js not properly working in chrome
score: 0
tagged with: google-chrome
type: Question
has body: I am using jquery.Jcrop.js for cropping image. I have three images and images coming inside a loop and need to crop separately. My code is working fine in Firefox but in chrome when I crop second image then the control goes to third image (In first image this is working fine) I don't know why. I have checked everything but didn't get any issue. I am using below function function countTest(){ $( ".HM_img_cotent .preview" ).each(function( index ) { var HM_index = index+1; jcrop_api = this; $('#cropbox_'+HM_index).Jcrop({ aspectRatio: 1, dragEdges: false, //createHandles: ['n','s','e','w','nw','ne','se','sw'], onRelease: function () { clearCoords(HM_index); }, onSelect: function (coords) { updateCoords(coords, HM_index); } }); }); } function updateCoords(c, HM_index) { $('#x_'+HM_index).val(c.x); $('#y_'+HM_index).val(c.y); $('#w_'+HM_index).val(c.w); $('#h_'+HM_index).val(c.h); }; function clearCoords(HM_index) { $('#x_'+HM_index).val(''); $('#y_'+HM_index).val(''); $('#w_'+HM_index).val(''); $('#h_'+HM_index).val(''); }; The main function is being called inside a ajax function. Note: Each image size is 1000px x 1000px. jsfiddle Example is here
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/26604421
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26604520
answer count: 1
type: AnsweredQuestion
has title: print date object as an object instead of the overwritten tostring method
has answer: http://stackoverflow.com/a/26604520
has comment: http://stackoverflow.com/comment/41821976
type: Question
has comment: http://stackoverflow.com/comment/41821916
has body: How can I print in the console a Date as an object instead of a string? I tryed the Object.toString(MyDate); command but this didn't work. I need this because I extended my Date Object with prototype and want to see the object to look if it correct.

http://stackoverflow.com/comment/41666877
comment on: http://stackoverflow.com/q/26517845
score: 0
has text: This doesn't seem to work as all the checkboxes seem to binded together (checking one checkbox will check them all). I only want to check off 1 checkbox at once and filter based on that.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41803712
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26594370
type: Comment
has text: One thing to consider is that Firefox may be optimizing away the entire operation since all values are constant, the only function involved is deterministic, and the result is never used. But overall +1

http://stackoverflow.com/a/26515779
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26514689
answers question: http://stackoverflow.com/q/26514689
has comment: http://stackoverflow.com/comment/41661383
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: This is being added by WordPress to make room for the Admin toolbar when you are logged in. You can disable the toolbar in your user profile settings.

http://stackoverflow.com/a/68255444
type: Answer
has comment: http://stackoverflow.com/comment/120642219
upvote count: 3
answers question: http://stackoverflow.com/q/26554694
score: 3
has body: Just add form="nosubmit" to the input. This assigns the field to a different form altogether, so it won't be submitted.
downvote count: 0

http://stackoverflow.com/q/26612201
has comment: http://stackoverflow.com/comment/41836425
has answer: http://stackoverflow.com/a/26612312
linked to: http://stackoverflow.com/q/623172
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26612325
accepted answer: http://stackoverflow.com/a/26612325
score: 1
has title: Finding an Image's Width After Adding a CSS Class via Javascript
tagged with: image
type: Question
has body: I have a script setup that detects whether an image is portrait or landscape. In this case the image is landscape. What I want to do is crop and center the image using absolute positioning, setting the height to 100% and giving it a negative margin-left based on half the image's width. I was able to do the above but here's the the problem I'm running into: The images I'm using all have variable widths/heights due to each of them being called from an API (in this case the Spotify API). That being said I had to use some Javascript to find their correct width. Its doing just that but only before I add the class landscape, so in actuality its dividing the image width before being resized to fit in the 250px x 250px #container div using the css from that class. What I want it to do is divide the image's width after after its been resized using the properties from the landscape class. HTML &lt;div id="container"&gt; &lt;img src="https://i.scdn.co/image/9c4880556288e2f4d098a104f5125e477611be32" &gt; &lt;/div&gt; CSS #container {height: 250px; width: 250px; overflow: hidden; position: relative;} .landscape {position: absolute; height: 100%; left: 50%;} .portrait {width: 100%;} JS $(function() { var $img = $('img'), $imgHeight = $img.height(), $imgWidth = $img.width(); if ($imgWidth &gt; $imgHeight) { $img .addClass('landscape') .css({ marginLeft: '-' + $imgWidth / 2 + 'px', }); } else { $img.addClass('portrait'); } });
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41836253
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26612312
has comment: http://stackoverflow.com/comment/41836694

http://stackoverflow.com/q/26629077
has comment: http://stackoverflow.com/comment/41866883
type: Question
linked to: http://stackoverflow.com/q/2360655
has comment: http://stackoverflow.com/comment/41866807
has comment: http://stackoverflow.com/comment/41866799
score: -2
has comment: http://stackoverflow.com/comment/41867184
has comment: http://stackoverflow.com/comment/41866962
tagged with: javascript
tagged with: jquery
downvote count: 2
has comment: http://stackoverflow.com/comment/41867178
answer count: 1
tagged with: events
has comment: http://stackoverflow.com/comment/41866853
favorite count: 0
accepted answer: http://stackoverflow.com/a/26629324
has body: I have an image &lt;input type="image" onclick="javascript:form1.ACTION.value='Edit'; form1.cin.value='100104213'; form1.histSeq.value='85258'; form1.typeCd.value='BL'; form1.RMC_CONFLICT_STATUS.value=''; form1.submit(); return false" alt="Click to edit this record." title="Edit Row" src="/images/editImage.gif" name="editButton"&gt; If you look closely I have some statements which is executed onClick of the image. Now during the onload I want to associate an event(can be onlick) which should be called before the statements. I tried with $('#grid0').find('#'+(i+1)).find('input:image').on('click',function(){ console.log('Test'); }); But this is called after the statements.
has comment: http://stackoverflow.com/comment/41867277
has comment: http://stackoverflow.com/comment/41867101
has title: Execute a function before the onclick event
has comment: http://stackoverflow.com/comment/41866997
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26629324
upvote count: 0

http://stackoverflow.com/comment/41797229
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26581944
has text: Thank you! This seems to work great. Could you explain the reasoning for passing the variable e in the function in .on()?

http://stackoverflow.com/q/26590855
has comment: http://stackoverflow.com/comment/41796663
has title: .unbind() is not working on event.preventDefault()
has comment: http://stackoverflow.com/comment/41797197
favorite count: 0
has comment: http://stackoverflow.com/comment/41796664
upvote count: 2
has comment: http://stackoverflow.com/comment/41798028
has comment: http://stackoverflow.com/comment/41797341
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26594551
has comment: http://stackoverflow.com/comment/41796640
score: 1
has comment: http://stackoverflow.com/comment/41803758
has body: I have a responsive Javascript file that is working successfully on unbinding basic jQuery functions. When the browser is set to be in tablet, the navigation becomes toggled based on click, therefore I disable the linking to any li elements that have a ul. $('.main-navigation .menu &gt; ul &gt; li &gt; a, .main-navigation .menu &gt; ul &gt; li &gt; ul &gt; li:has(ul) &gt; a').on('click', function(event) { event.preventDefault(); }); Then when the browser is sized above the tablet constraint, I am attempting to reenable the linking functionality with this (I have tried 3 different ways): $('.main-navigation .menu &gt; ul &gt; li &gt; a, .main-navigation .menu &gt; ul &gt; li &gt; ul &gt; li:has(ul) &gt; a').unbind('on'); $('.main-navigation .menu &gt; ul &gt; li &gt; a, .main-navigation .menu &gt; ul &gt; li &gt; ul &gt; li:has(ul) &gt; a').unbind('click'); $('.main-navigation .menu &gt; ul &gt; li &gt; a, .main-navigation .menu &gt; ul &gt; li &gt; ul &gt; li:has(ul) &gt; a').on('click', function(event) { return true; }); Please let me know if there is anything else I can provide that might be helpful
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26594551

http://stackoverflow.com/comment/41833260
has text: @KishorePaparthi You would have to refresh the page each time which is not something you want to do. If all you are trying to do is display current date and time then you should use the code above. If you are trying to accomplish something else then maybe I can help you do it in javascript but passing variables from java to javascript/html usually requires page refresh which isn't very efficient.
comment on: http://stackoverflow.com/a/26610463
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26596079
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26596321
score: 1
downvote count: 1
type: Question
has title: How does the javascript confirm work?
has comment: http://stackoverflow.com/comment/41806687
tagged with: javascript
has answer: http://stackoverflow.com/a/26596157
has body: Let's assume I've got form with such input : &lt;input type="submit" value="Delete" onclick="return window.confirm('Are u sure?');"/&gt; Here is my question, how does it work? When I click on 'Delete' and then "Cancel/No" in the dialog box the action delete is not invoking, but why? I understand that after we click the Delete input the event onclick will be raised, but dont get why it can stop raising the form action. Where does method window.cofirm return the boolean so it can stop invoking form action?
answer count: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/41806674
has answer: http://stackoverflow.com/a/26596166
accepted answer: http://stackoverflow.com/a/26596166
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26596157

http://stackoverflow.com/q/26524877
has answer: http://stackoverflow.com/a/26529286
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41679640
has comment: http://stackoverflow.com/comment/41678124
has title: How to combine two d3 objects into one for bulk operations
upvote count: 3
type: Question
downvote count: 0
tagged with: javascript
has body: I'm creating some static SVG elements with d3.js and they share a lot of properties. var c1 = svg.append('circle').attr('r',20); var c2 = svg.append('circle').attr('r',40); ... I want to group these together to set other attributes. I thought that I could use push, i.e. var circles = svg.append('circle').attr('r',20); circles.push( svg.append('circle').attr('r',40)); ... circles.attr('stroke','black').attr('stroke-width',2); but that errors ("this.setAttribute is not a function") d3 is all about sets of stuff, and it's all about arrays, so I thought this work work? Is there a way? (I know I could do a data join but I'm wondering about a more generic case of manipulating several things at once)
accepted answer: http://stackoverflow.com/a/26529286
has comment: http://stackoverflow.com/comment/41679401
answer count: 2
score: 3
possible better answer: http://stackoverflow.com/a/63007612
favorite count: 0
has answer: http://stackoverflow.com/a/63007612
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js

http://stackoverflow.com/a/26670864
score: 4
type: Answer
upvote count: 4
downvote count: 0
has body: As you discovered yourself, it is indeed impossible to add an item to Omnibox context menu with the current iteration of contextMenus API. I don't know if there are any plans to change it.
answers question: http://stackoverflow.com/q/26668600
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26668600

http://stackoverflow.com/comment/41772115
comment on: http://stackoverflow.com/a/26577163
type: Comment
type: AnswerComment
score: 0
has text: @ViruZX Yes there's a mistake with your CSS selector, you should remove the space in `img #demo` just like `img#demo` - [Example](http://jsbin.com/josavezifi/1/edit?html,css,output) :)

http://stackoverflow.com/comment/41801830
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26592196
type: Comment
has text: That's how I usually do it. External components in one, my code in another. I have used jQuery in angular projects before, just not ones where performance is a concern.

http://stackoverflow.com/comment/41869327
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26630373
has text: Breaks in what way? It's probably better anyway to write `if (!document.cookie)`
score: 0

http://stackoverflow.com/a/26530302
accepted answer of: http://stackoverflow.com/q/26529882
answers question: http://stackoverflow.com/q/26529882
type: AcceptedAnswer
downvote count: 0
has body: You need to return false to prevent form from submitting. Also, you have declared type: "POST" two times and the data looks more like a $_GET request. I've changed the code below. $(document).ready(function() { $(".loginform").submit(function () { var username = $('input[id=username]').val(); var password = $('input[id=password]').val(); $.ajax({ type: "POST", url: "login.php", data : { username : username, password: password }, success: function (data) { var success = data['success']; if(success == false){ var error = data['message']; alert(error); } if(success == true) { $('#result').write('Login success! Loading dashboard...'); } } }); return false; }); });
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41798036
score: 1
has comment: http://stackoverflow.com/comment/41689204

http://stackoverflow.com/a/26576187
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26574493
has comment: http://stackoverflow.com/comment/41770600
downvote count: 0
has body: From your code I can see that you have injected modules that you did not declared. in order todo so you must add the following lines to your code: angular.module('hrsApp.controllers',[]); angular.module('hrsApp.services',[]); angular.module('hrsApp.directives',[]); angular.module('hrsApp.filters',[]);

http://stackoverflow.com/q/26650492
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41909449
has comment: http://stackoverflow.com/comment/41905689
has comment: http://stackoverflow.com/comment/41904915
accepted answer: http://stackoverflow.com/a/26667931
has comment: http://stackoverflow.com/comment/41905753
tagged with: asp.net-mvc-4
score: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41905936
has title: Unknown error when calling Array.length
has comment: http://stackoverflow.com/comment/41906495
has comment: http://stackoverflow.com/comment/41907209
type: Question
has comment: http://stackoverflow.com/comment/41906253
has comment: http://stackoverflow.com/comment/41905611
has comment: http://stackoverflow.com/comment/41904848
has comment: http://stackoverflow.com/comment/41905856
has comment: http://stackoverflow.com/comment/41906236
has answer: http://stackoverflow.com/a/26667931
has comment: http://stackoverflow.com/comment/41906154
has comment: http://stackoverflow.com/comment/41906798
upvote count: 4
has comment: http://stackoverflow.com/comment/41906666
linked to: http://stackoverflow.com/q/13817999
has body: first of all i need to say that i don't have much experience with JS. currently i'm trying to implement an web application with MVC framework. I'm in a work to develop an app that is also compatible with Internet explorer. in that case i'm using following JS method to populate a table which is working fine with all the browsers.... function populateTable(array) { document.getElementById("instalationTable").style.display = "block"; var table = document.getElementById("ActivityDescription_installationID"); table.innerHTML = ""; elementsInTable = array; var x = 0; for (i = 0; i < (array.length * 2) ; i++) { //alert(i); if ((i % 2) == 0) { //ID Row var row = table.insertRow(i); var cell_1 = row.insertCell(0); cell_1.innerHTML = " "; x = x + 1; var cell_2 = row.insertCell(1); cell_2.innerHTML = " "; var cell_3 = row.insertCell(2); cell_3.innerHTML = "X</apan>"; } else { //Detail Row var rowDetails = table.insertRow(i); var cell = rowDetails.insertCell(0); //cell.colspan = "3"; cell.innerHTML = " " + " " + " Application Server " + " " + " " + " Application version " + " " + " " + " " + " " + " " + " Empty Database Something Databse " + " " + " " + " " + "Oracle Version"+ " " + " Ora version " + " " + " " + " " + "Character Set" + " " + " Cha Set " + " " + " " + " " + " " + " " + "Something version" + " " + " Something version " + " " + " " + " " + "Something Charachter" + " " + " Something Cha " + " " + " " + " " + " " + " " + "Additional Requests " + " " + " "+ " "+ " "; rowDetails.style.display = 'none'; Lock(); } } document.getElementById("instalationTable").style.display = "block"; } i'm populating a form on the above table row, that collects some data to continue. to collect data i'm using following function which works fine with Google chrome but not with Internet explorer.. function getAllData() { var StringtoSent = ""; for (i = 0; i < (elementsInTable.length) ; i++) { var InsId = elementsInTable[i]; var _appServer = document.getElementById((i + 1) + "_appServer").…
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/9110044

http://stackoverflow.com/q/26538800
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26538997
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26538997
score: 0
tagged with: paypal
has answer: http://stackoverflow.com/a/26539261
type: Question
tagged with: javascript
answer count: 2
has title: Adding js variable to html input tag
accepted answer: http://stackoverflow.com/a/26539261
has body: Trying to set up a paypal button for recurring donations to end at a specific date (dec 2017). We want the subscription length to be dynamic (someone who signs up in 2 months will not have as many recurrences as someone who signs up now bc less time until dec 2017). I'm new to programming but think I've set up the js code to determine the remaining months. My question is how to input that variable (numberOfMonths) into the html input tag. I need to somehow place the variable in the value for the input name srt in the line: Right now the full code is: Enter Your Donation Amount $

http://stackoverflow.com/a/26547609
type: Answer
answers question: http://stackoverflow.com/q/26547112
has body: working fiddle here You calculate totals on ( $('.per').click(.....);, so when you type a number above, nothing happens, because the code does not run) The easier way to do this would be to automate a click after typing a number. Add this $('.okr').click(); after this line here $("#sum").html(sum.toFixed(2)); Like so: $("#sum").html(sum.toFixed(2)); $('.per').click(); Assuming you already chose from the dropdown it will be fine, otherwise the dropdown wont have a value to calculate with. Also, the problem with the dropdown is AS soon as I click it closes, i.e. I cant choose anything. To solve this issue I hold the mouse button down, so the dropdown wont close (this is not normal). The reason is because you do dropdown.click() { dropdown.change() } think about replacing this functinality
score: 0

http://stackoverflow.com/q/26645706
has comment: http://stackoverflow.com/comment/41897090
type: Question
tagged with: javascript
has title: AngularJS passing result of custom filter to another custom filter
has body: I created two custom filters and try to use both in ng-repeat. How can i pass result of first filter as a input for second filter? I tried as(alias) in ng-repeat but it not works, &lt;input type="text" ng-model = "ageLimit" /&gt; &lt;input type="text" ng-model = "lastSeen" /&gt; &lt;div ng-repeat = "member in lists | ageFilter:ageLimit:lists as results | LastSeenFilter:lastSeen:results"&gt; Error message Error: [ngRepeat:badident] alias ' results | LastSeenFilter:lastSeen:results' is invalid --- must be a valid JS identifier which is not a reserved name. http://errors.angularjs.org/1.3.0/ngRepeat/badident?p0=results%20%7C%20LastSeenFilter%3AselectLastSeen%3Aresults
answer count: 2
has answer: http://stackoverflow.com/a/26645750
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/41898180
has answer: http://stackoverflow.com/a/34513028
upvote count: 3

http://stackoverflow.com/q/26559452
duplicate of: http://stackoverflow.com/q/41746309
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26567646
linked to: http://stackoverflow.com/q/1643349
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41739924
linked to: http://stackoverflow.com/q/41746309
has comment: http://stackoverflow.com/comment/41740011
has comment: http://stackoverflow.com/comment/41739564
has comment: http://stackoverflow.com/comment/64773349
has comment: http://stackoverflow.com/comment/41740066
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41739970
has title: Find elements in a jQuery document fragment with jQuery's "find"
tagged with: fragment
has comment: http://stackoverflow.com/comment/41739557
type: Question
has comment: http://stackoverflow.com/comment/41739603
has body: If I do the following, then 0 and 2 are returned, respectively: $html = $(document.createDocumentFragment()); $html.append('First linkSecond link'); console.log($html.find('a').length); console.log($html[0].querySelectorAll('a').length); How can I make it so that the jQuery method will also work? So basically, I want to be able to search a document fragment with jQuery, rather than needing to switch back and forth with native JavaScript DOM functions.
has answer: http://stackoverflow.com/a/26559875
score: 7
has comment: http://stackoverflow.com/comment/41739585
has comment: http://stackoverflow.com/comment/41739992
answer count: 2
has comment: http://stackoverflow.com/comment/41739965
has comment: http://stackoverflow.com/comment/41739967
tagged with: jquery-selectors
upvote count: 7

http://stackoverflow.com/a/27248006
answers question: http://stackoverflow.com/q/26640905
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: The way you're trying it now, you can't, because the click handler is evaluated by a Function, which accepts a string as the function body. The scope is lost at that point. What you could do is create a static function which you call inside the click handler: ko.bindingHandlers.log = { functions: [], preprocess: function (str, name, addBindingCallback) { var fnIndex = ko.bindingHandlers.log.functions.length; var $scoped_obj = {a: 'b'}; ko.bindingHandlers.log.functions.push(function() { console.log($scoped_obj); }); addBindingCallback('click', "ko.bindingHandlers.log.functions["+fnIndex+"]"); } }; See http://jsfiddle.net/fpoeeb7L/ Alternatively you could use ko.toJSON to create the variable inside the click handler: ko.bindingHandlers.log = { preprocess: function (str, name, addBindingCallback) { var $scoped_obj = {a: 'b'}; addBindingCallback('click', "function() { var $scoped_obj = " + ko.toJSON($scoped_obj) + "; console.log($scoped_obj); }"); } }; See http://jsfiddle.net/5e5jbuum/ But this won't work if $scoped_obj contains functions.
type: Answer
score: 4
accepted answer of: http://stackoverflow.com/q/26640905

http://stackoverflow.com/q/26646428
answer count: 2
has comment: http://stackoverflow.com/comment/41898235
tagged with: javascript
tagged with: jquery
has title: Please help "data-ng-controller" is not working
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41898237
has comment: http://stackoverflow.com/comment/41898268
has answer: http://stackoverflow.com/a/26646848
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26647791
has comment: http://stackoverflow.com/comment/41898492
tagged with: css
has body: I have write down below code but when i am using "data-ng-controller" then my code stop working else it works. Please suggest me what is going wrong with my code. AngularJS | Scope {{ typename }} {{view.name}} - {{view.singh}}
has comment: http://stackoverflow.com/comment/41898782
has comment: http://stackoverflow.com/comment/41898134
type: Question
has comment: http://stackoverflow.com/comment/41898741

http://stackoverflow.com/a/26636378
score: 0
has comment: http://stackoverflow.com/comment/41880204
type: Answer
has body: you should try something like this: dyn.forEach(function(el){//dyn is the dynamic array console.log(el); //logs to console });
answers question: http://stackoverflow.com/q/26635976

http://stackoverflow.com/comment/41841331
type: Comment
score: 1
type: AnswerComment
has text: It is best to attach delegated event handlers to the nearest non-changing ancestor element (e.g. `#addapptrans` in this question). `document` is the fallback if nothing is closer.
comment on: http://stackoverflow.com/a/26614937

http://stackoverflow.com/q/26634851
type: Question
tagged with: javascript
score: 0
has title: Dropdown menu being hidden with in table after table is toggle hidden/shown using jquery toggle()
tagged with: jquery
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41877864
has comment: http://stackoverflow.com/comment/41878307
has body: I have a very wierd issue, here is the issue. I have a table, and in the row of that table i have a dropdown list. This table can be hidden, toggled show/hide by clicking on a button. When the table is hidden and then unhidden the dropdown menu now is only rendered within the dimensions of the table. So if the dropdown menu is longer than the table it does not rendered that portion of the dropdown. I am using the .toggle method from jQuery to hide/show the table and its something like this: $(".hideshow").click(function () { var tableToToggle = $(this).closest('table').next(); $(tableToToggle).toggle("slow", function () { // Animation complete. }); }); I have tried changing the z-index but this doesn't seem to have any effect, it just seems some how the drop down is stuck within the table now and will not render outside of it. any help on solving this is welcome. NOTE: working in ASP.net C#. using jquery. Thank you. Edit: more info: Was hoping it was some flag I missed that someone could just say. Seems thats not the case :( Also note that before I make the toggle on the table the drop down menu is working perfectly fine. renders as it should. The drop down is inside of a div tag as so: //Button toggles the list //Dropdown The tables are made at compile time, goes through a loop and creates all the tables and elements on the page. there are some CSS class but nothing that stands out, just padding / text size alignment that sort of thing. SOLUTION: Turns out it was jQuery. My jQuery Files were out of data, I had 1.8, updated to 1.11 and now everything works perfectly. So if you every come across something like what I describe up top, try update your jQuery files :)
answer count: 0

http://stackoverflow.com/comment/41701289
has text: Trying this now, will get back to you soon. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/26537772
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41728532
type: AnswerComment
comment on: http://stackoverflow.com/a/26516286
type: Comment
has text: Ok, I will ,but I forgot to ask about removing elements. It's loading what I saved but when I delete contact and refresh the page it's not deleting it. How can I fix that with localStorage? @rafaeleyng
score: 0

http://stackoverflow.com/comment/41752662
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26566774
score: 0
has text: Have you tried just the regular helper function `asset('assets/test_app/')`?

http://stackoverflow.com/comment/42097626
score: 1
comment on: http://stackoverflow.com/a/26665013
type: AnswerComment
has text: haha sorry, I'm new to stackoverflow and didn't get the "accept answer"-thing. Have done it now! I managed to solve the problem myself, by rewriting the code quite a bit. I did it so it puts up an order and then randomizes a number from that order, instead of randomizing the order each time and taking the first one. Then I did an if else statement where I said that if the randomized movie had a rating of == 3 then show, else, randomize a new number and show. Wouldn't been possible without your help though, so thank you so much!
type: Comment

http://stackoverflow.com/a/26549069
type: Answer
accepted answer of: http://stackoverflow.com/q/26548616
upvote count: 3
answers question: http://stackoverflow.com/q/26548616
score: 3
type: AcceptedAnswer
has body: I think there's some more complexity than there needs to be. I think the radio buttons really just need a "click" handler that calls a modified version of the "statedropDown" function, and no "change" handler. The "statedropDown" function should be changed so that it calls "calculateTotal()" at the end. And that line that references "titlestates" needs to be commented out in the fiddle, since that part of the DOM isn't there. &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" required="yes" message="Please select proof of ownership." value="MCO" onclick="statedropDown(this.value)"&gt;Manufacturer's Statement of Origin&amp;nbsp;&amp;nbsp;&lt;/label&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" value="FL Title" onclick="statedropDown(this.value)"&gt;Florida Certificate of Title&amp;nbsp;&amp;nbsp;&lt;/label&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" value="OOS Title" onclick="statedropDown(this.value)"&gt;Out-of-state Certificate of Title&amp;nbsp;&amp;nbsp;&lt;/label&gt; and then function statedropDown(ownership) { if (ownership == "OOS Title") { document.getElementById("div3").style.display = 'block'; document.getElementById("div4").style.display = 'none'; document.getElementById("div5").style.display = 'none'; document.getElementById("brandnewrv").checked = false; } else if (ownership == "FL Title") { document.getElementById("div4").style.display = 'block'; document.getElementById("div3").style.display = 'none'; document.getElementById("div5").style.display = 'none'; //document.getElementById("titlestates").selectedIndex = 0; document.getElementById("brandnewrv").checked = false; } else if (ownership == "MCO") { document.getElementById("div5").style.display = 'block'; document.getElementById("div3").style.display = 'none'; document.getElementById("div4").style.display = 'none'; //document.getElementById("titlestates").selectedIndex = 0; } calculateTotal(); } Here is the updated f…
downvote count: 0

jquery-tooltip
tags question: http://stackoverflow.com/q/26664233
tag name: jquery-tooltip
type: Tag

http://stackoverflow.com/a/26672474
upvote count: 5
type: Answer
answers question: http://stackoverflow.com/q/26672317
has body: Promise object is what it's name says it is - a promise. In frontend frameworks like Ember and Angular promise is an object returned by an asynchronous call. This call instead of blocking the whole system returns you a promise, which will eventually contain the data the asynchronous call returns. Promises have an event called resolve, which is triggered when the response come. That's why promise objects have method usually called then. You can use it like this (after Ember.js docs): var promise = fetchTheAnswer(); promise.then(fulfill, reject); function fulfill(answer) { console.log("The answer is " + answer); } function reject(reason) { console.log("Couldn't get the answer! Reason: " + reason); } When your request is fulfilled the promise will call the method fulfill with answer (response) as an argument, and when the request is rejected (ie. when the resource doesn't exist) it will call method reject with reason (error) as an argument. Such objects are similar to objects in other OO languages like java - they contain both data and methods you can call on them.
downvote count: 0
score: 5

http://stackoverflow.com/a/26635559
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26635235
has body: The problem is that your functions can only be accessed inside MyUtils, but not from the outside. You could use var MyUtils = { addClass: function(el, classStr) { if (el.className !== classStr) { el.className = classStr; } }, removeClass: function(el, classStr) { delete el.className; } /*, ... */ }; Or, if you also want to have private variables, var MyUtils = (function(){ var thisIsPrivate = whatever; function addClass(el, classStr) { if (el.className !== classStr) { el.className = classStr; } }, function removeClass(el, classStr) { delete el.className; } /* ... */ // Export public properties to the outside: return {addClass: addClass, removeClass: removeClass/*, ... */}; })();
answers question: http://stackoverflow.com/q/26635235
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41916546
type: Comment
type: QuestionComment
has text: Your delegation syntax is wrong. You need to use `.on()`, you can't give a selector as an argument to `.click()`.
score: 3
comment on: http://stackoverflow.com/q/26657058

http://stackoverflow.com/a/26664083
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26663986
downvote count: 0
has comment: http://stackoverflow.com/comment/41930032
has body: A simple solution would be to create a special function in your rootScope that accepts functions as an argument, and pushes it into an array, and you will be able to invoke that function later which will call all the registered functions. angular.module('myApp').run(['$rootScope', function($root) { var functionsToCall = []; $root.registerDirectiveFunction = function(fn, context) { context = context || window; functionsToCall.push({fn: fn, context: context}); } $root.myFunction = function(args) { functionsToCall.forEach(function(fnObj) { fnObj.fn.apply(fnObj.context,args); }); } } And in your directive: link: function($scope, $el, $attr) { function myFunct() { } $scope.$root.registerDirectiveFunction(myFunct, $scope); //call it if you want $scope.$root.myFunction(); } This should cover your scenario.
type: Answer
accepted answer of: http://stackoverflow.com/q/26663986
has comment: http://stackoverflow.com/comment/41929992
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41929983

http://stackoverflow.com/comment/41757923
type: QuestionComment
has text: due to the amount of like tabs your going to have a database to store the id of said like tab and the amount of times its been "liked" to then echo out would prob be your best bet
comment on: http://stackoverflow.com/q/26569480
type: Comment
score: 2

http://stackoverflow.com/a/26576309
type: Answer
upvote count: 1
has body: Your question is too broad . you should narrow down your approach. Split it into modules. Create a servlet to retrieve the userid and the password . Write the Java class to generate the random passwords with the email id you retrieve or you may follow other approaches also to generate random numbers. Send the mail using Java mail (you can configure the mail servers or you could use the existing ones too). Store the random generared values to the database. Once the mail is received at users end .prompt them to enter the code and validate from database .allow the activation process. Hope this helps!!
answers question: http://stackoverflow.com/q/26576225
downvote count: 0
score: 1

http://stackoverflow.com/q/26625683
has answer: http://stackoverflow.com/a/26625802
type: Question
tagged with: c#
has title: How to merge the same value
score: 1
has comment: http://stackoverflow.com/comment/41861517
answer count: 2
has comment: http://stackoverflow.com/comment/41860698
has comment: http://stackoverflow.com/comment/41860727
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26625802
linked to: http://stackoverflow.com/q/14203778
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26625795
linked to: http://stackoverflow.com/q/9229645
linked to: http://stackoverflow.com/q/14427659
duplicate of: http://stackoverflow.com/q/9229645
has body: I need some help. I would like to merge something like this 12,12,12,13,13,14,14,14,15,15 into 12,13,14,15. i have this code so far. if ($('#branchName' + branchList.branch).length == 0) { $('#zzz').append( '' + branchList.branch + '' + ' ' + ' ' + '' + branchList.combo + '' + ' ' + ' '); if ($('#combo' + branchList.combo).length == 0) { //if exists go to else } else { //append combo } } else { $('#branchName' + branchList.branch).append( ' ' + '' + branchList.combo + '' + ' '); } Update : I already merge the numbers on my if else by appending it on existing one. Now my problem is where should I put again the next if statement for my combo.
possible better answer: http://stackoverflow.com/a/26625795
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41860686
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/41793918
comment on: http://stackoverflow.com/q/26589511
type: Comment
type: QuestionComment
has text: The size of the element will also depend on the size and styles of its container. An element outside of the DOM has no container, so there is no reliable way to compute its size without adding it to the DOM (at least temporarily).
score: 2

http://stackoverflow.com/comment/41881947
score: 1
has text: @shakirthow you are right but nearly. On scrolling inside modal dialog, i want to fire CheckFunction() function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26637077

http://stackoverflow.com/comment/41889846
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26612465
has text: @Spokey complete script http://sitechat.ru/tests/chat1/

string
tags question: http://stackoverflow.com/q/26662798
tags question: http://stackoverflow.com/q/26581092
tags question: http://stackoverflow.com/q/26541404
tags question: http://stackoverflow.com/q/26520838
tags question: http://stackoverflow.com/q/26586753
tags question: http://stackoverflow.com/q/26623200
tags question: http://stackoverflow.com/q/26548404
tags question: http://stackoverflow.com/q/26541898
tags question: http://stackoverflow.com/q/26570698
tags question: http://stackoverflow.com/q/26574899
tags question: http://stackoverflow.com/q/26622974
tags question: http://stackoverflow.com/q/26515510
tag name: string
tags question: http://stackoverflow.com/q/26623567
tags question: http://stackoverflow.com/q/26621663
tags question: http://stackoverflow.com/q/26635904
tags question: http://stackoverflow.com/q/26532550
tags question: http://stackoverflow.com/q/26560948
type: Tag
tags question: http://stackoverflow.com/q/26560763
tags question: http://stackoverflow.com/q/26589807
tags question: http://stackoverflow.com/q/26584958
tags question: http://stackoverflow.com/q/26528711
tags question: http://stackoverflow.com/q/26622665
tags question: http://stackoverflow.com/q/26516894
tags question: http://stackoverflow.com/q/26658140
tags question: http://stackoverflow.com/q/26549715
tags question: http://stackoverflow.com/q/26598451
tags question: http://stackoverflow.com/q/26566243
tags question: http://stackoverflow.com/q/26644597

http://stackoverflow.com/q/26527727
has body: I just have a problem, to create a function to match this string combination. The first part contain I, II, III, or IV. And then separated by / character. And then followed by A, B, C, or D. So it would like III/A, IV/B, I/D. Any Idea how to solve this?
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41682295
has answer: http://stackoverflow.com/a/26527907
has title: How to create regex javascript function to match certain combination of string?
accepted answer: http://stackoverflow.com/a/26527907
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26527966
possible better answer: http://stackoverflow.com/a/26527847
tagged with: javascript
has answer: http://stackoverflow.com/a/26527847
type: Question
tagged with: regex

http://stackoverflow.com/a/33334465
score: 1
answers question: http://stackoverflow.com/q/26590854
type: Answer
upvote count: 1
has body: change this: if (BABYLON.Engine.isSupported()) { var myNewScene = null; var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); to something like this: var myNewScene, canvas, engine; if (BABYLON.Engine.isSupported()) { myNewScene = null; canvas = document.getElementById("renderCanvas"); engine = new BABYLON.Engine(canvas, true);
downvote count: 0

http://stackoverflow.com/q/26522593
has title: How do i set an Onclick effect to only work at a specific time?
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41674234
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41674419
has body: I have a gif on my page that only plays once and stops at the last frame. The reason for this is that I wish for the gif to only play when I click it, and then stop at the last frame until it's clicked again. I've added an onclick effect that makes the gif restart from the first frame, and I've made this effect work using the following JSFiddle link. The effect works like it's supposed to, but I noticed that if you double click, or click before the gif is finnished playing, it restarts the gif mid-play. Is there a way I can make the onclick effect (reloading the gif) only work after a set amount of time (preferably a set amount of time after the gif has started) so that the onclick effect only works when the gif has reached the last frame? I've got the idea of adding a layer-image (of the last frame) overlapping the gif, and then I give this image the onclick effect, aswell as the effect to hide/disappear on click, and then reapearing after a set amount of time (being the time it takes for the gif to play once), but I don't know how to do this. Could someone please help me? feel free to use the JSFiddle link I provided above. Also, being a noob, I don't know how to put the codes from my JSFiddle link into notepad, can someone help? So far I've got this... Around The World When I set it like this, the onclick effect doesn't work.. sorry for incompitance, I'm sure it's something obvious like a tag slip or something, but I'd apprechiate some assistance. Thanks to all in advance!
has answer: http://stackoverflow.com/a/26524278
tagged with: onclick
tagged with: loops
upvote count: 1
has answer: http://stackoverflow.com/a/26524833
type: Question
tagged with: javascript
answer count: 2

http://stackoverflow.com/a/60269803
answers question: http://stackoverflow.com/q/26518629
has body: The solution for me was to assign the imported Component to a variable(with CapitalCase) and then render that variable. Example: import React, { Component } from 'react'; import FooComponent from './foo-component'; import BarComponent from './bar-component'; class MyComponent extends Component { components = { foo: FooComponent, bar: BarComponent }; //this is the most important step const TagName = this.components.foo; render() { return &lt;TagName /&gt; } } export default MyComponent;
downvote count: 0
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/a/26560046
score: 1
accepted answer of: http://stackoverflow.com/q/26560001
answers question: http://stackoverflow.com/q/26560001
has body: The commenters are right. If you receive the actual source code, it means that the web server is not configured correctly to interpret the .php/.asp files and instead treat them as text files and return their contents.
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/q/26536394
tagged with: javascript
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26539893
has title: sending POST values javascript
has comment: http://stackoverflow.com/comment/41701962
type: Question
has comment: http://stackoverflow.com/comment/41698901
has comment: http://stackoverflow.com/comment/41698720
score: 0
answer count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/41698681
possible better answer: http://stackoverflow.com/a/26536571
has answer: http://stackoverflow.com/a/26536571
has body: Don't know why this doesn't work....oh yeah, I'm a newb still. I have a form that posts data to a db, and it works fine if I just use POST. I doesn't work if I pass it to a javascript function with some AJAX and then submit it. It DOES work w/ 'GET' being submitted from the function, does not work with 'POST'. With 'POST' I connect to DB fine, but the values from the form are all blank so the db gets updated w/ a new record that has all it's fields blank. HEre's the fiddle, I put the php code where the CSS is supposed to go: http://jsfiddle.net/DuckofDeath/6var7103/. HEre is a link to the page, all the feedback from the script gets sent tot he page at the top: http://www.modernmediaworld.com/diaboli/register3.php function checkForm(){ function checkForm(){ if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("formFeedback").innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST","addNewSeeker.php",true); xmlhttp.send(); }
has comment: http://stackoverflow.com/comment/41698942
has answer: http://stackoverflow.com/a/26539893
type: AnsweredQuestion

http://stackoverflow.com/comment/41886492
type: Comment
type: QuestionComment
has text: so that's JS code you've already got somewhere? You're not going to be able to use PHP to convert that to json without implementing a javascript parser in PHP. if it's already in JS to being with, then you've got `JSON.stringify()` to do the conversion for you.
comment on: http://stackoverflow.com/q/26639631
score: 0

http://stackoverflow.com/comment/41737034
type: QuestionComment
comment on: http://stackoverflow.com/q/26557770
has text: As said `return this.foo() + 1;` should work. It all depends how your calling `MyClass.prototype.bar`. The value of `this` is determined by how the function is *called*, not how it is defined. Unfortunately you don't show how you call it, so we can't really help you.
score: 0
type: Comment

http://stackoverflow.com/a/50341635
downvote count: 0
has body: I think there is a simpler solution. function dateDiffToString(a, b){ // make checks to make sure a and b are not null // and that they are date | integers types diff = Math.abs(a - b); ms = diff % 1000; diff = (diff - ms) / 1000 ss = diff % 60; diff = (diff - ss) / 60 mm = diff % 60; diff = (diff - mm) / 60 hh = diff % 24; days = (diff - hh) / 24 return days + ":" + hh+":"+mm+":"+ss+"."+ms; } var today = new Date() var yest = new Date() yest = yest.setDate(today.getDate()-1) console.log(dateDiffToString(yest, today))
answers question: http://stackoverflow.com/q/26580509
has comment: http://stackoverflow.com/comment/106181082
upvote count: 3
type: Answer
score: 3

http://stackoverflow.com/comment/41835172
score: 0
comment on: http://stackoverflow.com/a/26610939
has text: edited, i meant to say the same. IE means the same ancient thing btw ;)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41810489
comment on: http://stackoverflow.com/q/26597817
score: 0
type: QuestionComment
type: Comment
has text: Would you please post it as an answer to accept it or what I shall do @Alex I am a new user of stackoverflow.com

http://stackoverflow.com/a/26522668
downvote count: 0
answers question: http://stackoverflow.com/q/26522507
upvote count: 8
has body: There is but it's not intended to work like that in React. 2-way data binding isn't the way to go in React, excerpt from the docs. In React, data flows one way: from owner to child. So what you want to do if you want to manipulate parent state in your child component is passing a listener. //parent component's render function return ( &lt;Child listenerFromParent={this.doSomething} /&gt; ) //child component's render function return ( &lt;div onClick={this.props.listenerFromParent}&gt;&lt;/div&gt; )
type: Answer
score: 8

http://stackoverflow.com/a/26534842
downvote count: 0
has comment: http://stackoverflow.com/comment/41695730
upvote count: 2
type: AcceptedAnswer
has body: Here's one solution: http://jsfiddle.net/f7u6yxLq/. HTML: &lt;div&gt;&lt;/div&gt; CSS: * { margin: 0; padding: 0; } body { padding: 10px; } div { position: relative; display: table; width: 200px; height: 100px; background: url("http://placehold.it/200x100") no-repeat top left; } div:before, div:after { content: ""; position: absolute; width: 50px; height: 50px; border: solid white; border-width: 2px 2px 0 0; display: none; } div:before { right: 5px; top: 5px; } div:after { border-width: 0 0 2px 2px; bottom: 5px; left: 5px; } div:hover:after, div:hover:before { display: block; }
accepted answer of: http://stackoverflow.com/q/26534619
type: Answer
answers question: http://stackoverflow.com/q/26534619
score: 2

http://stackoverflow.com/a/27052226
score: -3
type: Answer
answers question: http://stackoverflow.com/q/26591633
downvote count: 3
has body: T24 is not a JavaEE web application, even it can be accessed via web. The named JBasic is major programming language. You should access background terminal to check routine(E.g. Shh tool). But I suggest you first read helptext in T24, if you understand what's the APPLICATION, VERSION and FUNCTION, and then you could be batter understand T24. Good luck!
has comment: http://stackoverflow.com/comment/48129871
upvote count: 0

http://stackoverflow.com/q/26572646
has answer: http://stackoverflow.com/a/26572668
answer count: 2
accepted answer: http://stackoverflow.com/a/26572668
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26572674
score: 0
tagged with: validation
has answer: http://stackoverflow.com/a/26572674
has title: jQuery validate input type checkbox value
type: AnsweredQuestion
has body: I'am stoked at a basic task. I want to check if a checkbox i checked or not using jQuery. The problem is that the if condition is being executed no matter its checked or not. What am I doing wrong? ($('#betingelser').prop('checked', false)){ console.log("checked if"); isValid = false; result += 'Venligst accepter betingelserne&lt;br&gt;'; } Thanks for your time Thar
type: Question

http://stackoverflow.com/comment/41880638
has text: @user3331456 I've update a small portion of a code and added comments. Do not forget to select the most useful answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/26623011
score: 0
type: Comment

http://stackoverflow.com/comment/41780631
type: QuestionComment
type: Comment
has text: The problem because of loading jquery 2 times and bootstrap min file 2 times hope so.
score: 3
comment on: http://stackoverflow.com/q/26581305

http://stackoverflow.com/q/26657489
has answer: http://stackoverflow.com/a/26657663
tagged with: meteor
tagged with: file-upload
favorite count: 0
score: 16
has body: I'm using Dropzone without creating a dropzone form. It works great for me in this way. But in this case I can not create another instance of Dropzone in my page. var myDropzone1 = new Dropzone( document.body, { url : "upload1"... . . . some parameters }; var myDropzone2 = new Dropzone( document.body, { url : "upload'"... . . . some parameters }; When I do this, I'm getting the error Dropzone already attached.
has comment: http://stackoverflow.com/comment/41917753
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/60224002
type: Question
has answer: http://stackoverflow.com/a/60224002
has title: Multiple Dropzone in a single page
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26657663
has answer: http://stackoverflow.com/a/74001981
tagged with: dropzone.js
answer count: 3
downvote count: 1
upvote count: 17

http://stackoverflow.com/comment/41715781
score: 0
comment on: http://stackoverflow.com/q/26543922
type: QuestionComment
has text: Revisit the http://plnkr.co/edit/1yhFAcGq7nUS37VtpAlr?p=preview for a 'signalling' approach.
type: Comment

http://stackoverflow.com/a/26664811
has body: document.getElementById("FORMBUTTON_SUBSCRIBE").onclick=function(event) { window.location="http://www.google.com"; event.preventDefault(); } Default action on form button click is submitting of form, so we should prevent it.
score: 0
answers question: http://stackoverflow.com/q/26664535
type: Answer

http://stackoverflow.com/comment/41790147
has text: You are changing the string while iterating over it.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26587594

http://stackoverflow.com/q/26539872
has comment: http://stackoverflow.com/comment/41705175
tagged with: video
answer count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41706639
type: Question
tagged with: javascript
has title: How do I do something when an element is scrolled to the vertical middle of the viewport?
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41734388
type: UnansweredQuestion
has body: I'm trying to create video-highlighting functionality like this page. As each video scrolls into the center of the page, that video is highlighted. But, instead of their site's map content on the right sidebar, each video's title/description would become highlighted and vertically centered. Like so: Here's what I have so far: http://jsfiddle.net/annablabber/gw9yoq06/4/ HTML Title of video Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Title of video Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Title of video Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Title of video Excepteur sint occaecat cupidatat non proident. Title of video sunt in culpa qui officia deserunt mollit anim id est laborum. Title of video Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Title of video Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Title of video Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Title of video Neque porro quisquam est. Title of video Qui dolorem ipsum quia dolor sit amet, consectetur. CSS /** * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time,…
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41853139
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26621285
score: 0
has text: yeah html/css wasn't really designed with horizontal newspaper layouts in mind, so this isn't going to be easy unless you want to constrain the image to one column.

http://stackoverflow.com/comment/41900316
comment on: http://stackoverflow.com/q/26628383
type: Comment
type: QuestionComment
score: 0
has text: It worked man. Thank you. I changed my path to this strLinkPath = "/DNN7/PRODUCTPDF/" + strProductID + ".pdf" again and removed the ranut and its fine now. Thanks alot

http://stackoverflow.com/q/26640905
tagged with: knockout.js
type: Question
tagged with: knockout-3.0
tagged with: javascript
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/26649296
favorite count: 0
has answer: http://stackoverflow.com/a/27248006
accepted answer: http://stackoverflow.com/a/27248006
has body: From knockout documentation : ko.bindingHandlers.<name>.preprocess(value, name, addBindingCallback) Parameters: value: ... name: ... addBinding: a callback function you can optionally use to insert another binding on the current element. This requires two parameters, name and value. For example, inside your preprocess function, call addBinding('visible', 'acceptsTerms()'); to make Knockout behave as if the element had a visible: acceptsTerms() binding on it. For example we can have bindings like : ko.bindingHandlers.live = { preprocess: function (str, name, addBindingCallback) { addBindingCallback('value', str); addBindingCallback('valueUpdate', "'afterkeydown'") } }; // Or ko.bindingHandlers.log = { preprocess: function (str, name, addBindingCallback) { addBindingCallback('click', "function(){console.log('test');}"); } }; My Question: Is it possible to pass a variable within the scope of preporcess method to the newly added bindings ? ko.bindingHandlers.log = { preprocess: function (str, name, addBindingCallback) { // an object which is not in my viewmodel and context var $scoped_obj = get_from_some_external_service(str); // i want to pass `$scoped_obj` to the newly added click binding addBindingCallback('click', "function(){console.log($scoped_obj);}"); } }; Is that possible ? and How ?
has comment: http://stackoverflow.com/comment/41890229
possible better answer: http://stackoverflow.com/a/26649296
type: AnsweredQuestion
score: 2
downvote count: 0
has title: knockoutjs custum bindings preprocess method & addBindingCallback?

http://stackoverflow.com/comment/41799011
score: 0
type: AnswerComment
has text: I paste it under var canvas = document.getElementById('myCanvas'); and it works, but on the right side and the bottom of the window came a scrollable bar.... How can I fit it?
comment on: http://stackoverflow.com/a/26591470
type: Comment

http://stackoverflow.com/a/26646515
answers question: http://stackoverflow.com/q/26646483
score: 0
has body: Use: function userlist(typeVal) { $('#user-list').append(' '+ ' Some Users '+ ' All Users > '); $('#users-type-customers').val(typeVal); }
type: Answer
accepted answer of: http://stackoverflow.com/q/26646483
type: AcceptedAnswer

http://stackoverflow.com/q/26537372
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41701770
has title: Bootstrap prevent navbar jumping
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41700552
has comment: http://stackoverflow.com/comment/41700415
has body: I don't know if this is a thing you can't change in bootstrap, but i want to ask you if this is maybe possible. When i look at my page (Joomla with purity iii template) on a mobile phone, it works out good but there is a thing that does not look good. To illustrate: X=content | ====== navbar This is what the page looks like on the beginning ======= X X X X When i scroll down, the navbar disapears X X X X When i stop scrolling, navbar jumps back to its position ======= X X X X When i scroll up, navbar covers the content X X ======= X X When i stop scrolling, navbar jumps back to the position What i want to achieve is that the navbar IS ON TOP ALL THE TIME and does not disappear or cover the content when scrolling Here is my site: autransfer
type: Question
has comment: http://stackoverflow.com/comment/84361012
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26587511
upvote count: 1
has body: It's working. (Latest jQuery library) jQuery Autocomplete
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26587344
score: 1

http://stackoverflow.com/q/26664508
type: Question
has title: jQuery: previous children with class name
answer count: 1
has answer: http://stackoverflow.com/a/26664993
tagged with: javascript
tagged with: jquery
score: 0
has body: I'm trying to get the height of all the previous children inside of a ul element, that has the same class name off the "active" element. HTML example: So I need to get the height off previous children with class 'item-left' and then the height off 'item-right'. jQuery example: $('.item-left').each( function(){ $(this).prevAll().outerHeight(); }); I have also made a JSFiddle that shows something similar to my problem, but the thing is that it will be with images inside the li elements, so the height will be different. If anything is unclear, please let me know. Example: The last item-left should only get the combined height of each previous children with the same class name and the same for item-right
has comment: http://stackoverflow.com/comment/41931080
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41931188
accepted answer: http://stackoverflow.com/a/26664993

http://stackoverflow.com/comment/41788789
has text: @jSang: *If* the code precedes the elements on the page. Otherwise it will work anyway.
comment on: http://stackoverflow.com/q/26586798
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26594677
score: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/12581439
has body: What I need: I need to add extra validation to input by adding attribute to this input. Firstly, my plnkr example is here What I'd tried?: I added directive, so when I add attribute to the input, the value of the input is being validated by regexp ^5$. Also, I added required to the input. I am talking about 2nd input now (name of the input is input2). So, I'd added attributes "my-attribute" and "required". When there is nothing in input I expect two items in myForm.item[1].$error: its ok – there are properties myAttribute and required. Now, I will add some to the input2, for example "abc", now I expect in myForm.item[1].$error only myAttribute property (because required validation is passed, but myAttribute validation is not), but there is properties myAttribute and parse in myForm.item[1].$error. What is parse property? Why it is adding to $error? I should notice, that when I put 5 to the input2 myForm.item[1].$error is empty, because both require and myAttribute validations passed (and this behaviour is expected). Now, when I clear input2 there are properties parse and myAttribute again. Why? When field input2 is empty, I expect required and myAttribute in myForm.item[1].$error, but there are no ones. So, why I get strange property parse in $error and how I can make my example working? Form example code was founded here and approach to validate input by directive was founded in answer to this post.
tagged with: regex
accepted answer: http://stackoverflow.com/a/26595403
tagged with: angularjs-directive
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26595403
type: Question
tagged with: validation
answer count: 1
has title: How to add directive for extra validation properly in angular?
tagged with: javascript

http://stackoverflow.com/comment/48742254
comment on: http://stackoverflow.com/a/26594752
has text: Thanks @PSL you have saved me a headache as I was able to inject the $modal dependency when i was testing directives that got compiled but because this does not get compiled the controller didn't recognise the injected dependency, so your approach to mocking the modal worked like a charm
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26552007
tagged with: ngresource
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: I have a json file of events setup like this: { 2: { sched_conf_id: "38", title: "Coffee Break", }, 3: { sched_conf_id: "39", title: "registration", }, } I setup and angular factory like this: .factory('eventFactory', ['$resource', function($resource) { return { query: function(event_id) { return $resource('/assets/events.json', {}, { query: { method: 'GET', params: {id:event_id}, isArray: false } }).query(); } } } ]) and lastly I have my angular controller which calls the query method from the factory with the id being the id from the url: .controller('eventCtrl', function($scope, $routeParams, eventFactory) { var eventId = $routeParams.event_id; $scope.eventData = eventFactory.query(eventId); }) The return data seems to be just the entire events.json file rather than just the specific id I want to query for in the parameters. In the params I am trying id but that is obviously not correct. Using this setup how can I return just the data from event_id: 2?
has answer: http://stackoverflow.com/a/26552865
tagged with: angularjs
type: Question
has title: How do you search and return a specific index of a JSON resource in AngularJS?
score: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26649860
has title: Load Select2 jQuery plugin immediately on load RequireJS
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26650526
tagged with: jquery-select2
score: 0
has answer: http://stackoverflow.com/a/26651226
linked to: http://stackoverflow.com/q/22991490
linked to: http://stackoverflow.com/q/22210144
possible better answer: http://stackoverflow.com/a/26651226
has body: I have a RequireJS setup that loads the Select2 jQuery plugin. I have an issue however that means on page load, the browser default select input is shown for a few seconds, and then swapped out for the advanced Select2 input presumably as RequireJS is loading my scripts asynchronously. Is there a way I can avoid this without having to include the script in the HTML? This is my RequireJS setup: require.config({ baseUrl: '/assets/js', paths: { jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', async: 'libs/async', modernizr: 'libs/modernizr-custom', jqueryUI: 'libs/jquery-ui.min', bootstrap: 'libs/bootstrap.min', select2: 'libs/select2.min', }, shim: { 'select2': { deps: ['jquery'], exports: 'Select2' }, 'bootstrap': { deps: ['jquery'], exports: 'Bootstrap' }, 'jqueryUI': { deps: ['jquery'], exports: 'jQueryUI' }, } }); requirejs(["app/polyfills"]); requirejs(["app/filter"]); requirejs(["app/select"]); // Select2 plugin trigger requirejs(["app/datepicker"]); requirejs(["app/popover"]); requirejs(["app/dropdown"]); requirejs(["app/tooltip"]); requirejs(["app/layout"]); requirejs(["app/menu"]); requirejs(["app/toggles"]); And this is the actual script: define(['select2'], function(Select2) { var app = {}; app.select = (function(){ var module = {}; module.init = function(){ $(".select-advanced").select2({ width: 'off', dropdownAutoWidth: 'true', }); }; return module; })(); $(document).ready(function(){ app.select.init(); console.log('select'); }); });
tagged with: requirejs
has answer: http://stackoverflow.com/a/26650526
type: AnsweredQuestion

http://stackoverflow.com/a/35192223
has body: If we want to use the most recent loader (r73), we can also convert the BufferGeometry to a Geometry, and then back! The only caveat is that I had to merge the vertices before computing the vertex normals. I'm guessing that converting from the buffers messes with the triangles, so we gotta merge them before anything. var geometry = new THREE.Geometry().fromBufferGeometry( child.geometry ); geometry.computeFaceNormals(); geometry.mergeVertices(); geometry.computeVertexNormals(); child.geometry = new THREE.BufferGeometry().fromGeometry( geometry );
upvote count: 8
answers question: http://stackoverflow.com/q/26607094
score: 8
type: Answer
downvote count: 0

http://stackoverflow.com/a/26677950
downvote count: 0
answers question: http://stackoverflow.com/q/26654089
has body: I believe dfsq is right, but if you can't this might be because of the scope of the Ext.Ajax This should help anyways: response.request.options.url
accepted answer of: http://stackoverflow.com/q/26654089
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3

http://stackoverflow.com/comment/41659496
comment on: http://stackoverflow.com/q/26514591
score: 0
type: Comment
type: QuestionComment
has text: Apparently, it is common for frameworks to edit JSON to prevent hijacking. Similar [question](http://stackoverflow.com/questions/24147100/json-data-changes-while-transferring-from-c-sharp-to-extjs) where asp.net adds `d:` to the json string.

http://stackoverflow.com/comment/41663187
has text: There's no built-in way to do that in JavaScript, but you can truncate an array simply by setting the `.length` to 2.
comment on: http://stackoverflow.com/q/26516571
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/26627690
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26627485
upvote count: 2
has body: First, it's not very good to use object for a variable name in javascript. I'm using 'o' instead. As i can figure out from your code, the values in code blocks can be derived from conditional statements: var scoreLimits = [0,40,65,85,95,100]; for(var i = 1; i &lt; scoreLimits.length; i++) { var limit = scoreLimits[i]; if ( userScore &lt;= limit ) { o.setMinValue(scoreLimits[i-1]); o.setMaxValue(limit); break; } } Here is a working example: http://jsfiddle.net/xsasjs6t/ And if you want it to run really fast, you can precompute a map for the entire range of possible userScore values and use it later: var mapper = {}; for(var i = 0; i &lt; scoreLimits.length - 1; i++) { var limits = { minValue : scoreLimits[i], maxValue : scoreLimits[i+1] }; for (var j = scoreLimits[i] + 1; j &lt;= scoreLimits[i + 1]; j++) { mapper[j] = limits; } } Working example: http://jsfiddle.net/8cqwp4fz/
accepted answer of: http://stackoverflow.com/q/26627485
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41864459

http://stackoverflow.com/comment/41837118
type: QuestionComment
type: Comment
has text: Actually, Firefox seems to be the *only* browser that handles it correctly. Neither Chrome nor Opera refresh the list properly. Bummer.
comment on: http://stackoverflow.com/q/26610752
score: 0

http://stackoverflow.com/comment/41693057
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26532300
has text: I think I got it resolved. Thanks again for all the help here. You all rock!
score: 0

http://stackoverflow.com/comment/41754169
score: 0
type: Comment
has text: How does this have anything to do with OPs question?
type: AnswerComment
comment on: http://stackoverflow.com/a/26567605

http://stackoverflow.com/comment/41663683
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26516718
has text: Can you share a sample of the relevant markup (HTML).
score: 0

http://stackoverflow.com/a/26651175
upvote count: 2
answers question: http://stackoverflow.com/q/26649205
has body: The way you work with nested array in ngtable is not suitable ,in your case you can make array one dim again and allow directive to groupping html {{people.id}} {{people.desig}} {{people.name}} {{people.place}} contoller $scope.mytable = new ngTableParams({ page: 1, // show first page count: 10, // count per page sorting: { name: 'desc' } }, { total: peoples.length, groupBy:'group', getData: function ($defer, params) { peoples = $filter('orderBy')(peoples, params.orderBy()); $defer.resolve(peoples); } }); data var peoples = [{ "id": 145, "desig": "doctor", "name": "Manu", "place": "ABCD", "group": "ime123" //for grouping }, { "id": 148, "desig": "engineer", "name": "John", "place": "POLK", "group": "ime148" //for grouping }, { "id": 150, "desig": "scientist", "name": "Mary", "place": "USE", "group": "ime148" //for grouping }]; here almost working jsfiddle. default desc not working yet (ver 0.3.1)
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/26604952
accepted answer: http://stackoverflow.com/a/26609184
has comment: http://stackoverflow.com/comment/41828539
possible better answer: http://stackoverflow.com/a/34517554
tagged with: javascript
has comment: http://stackoverflow.com/comment/41830278
tagged with: android
tagged with: sqlite
has answer: http://stackoverflow.com/a/34517554
favorite count: 0
upvote count: 20
tagged with: cordova
downvote count: 0
type: AnsweredQuestion
has body: I was working on an Android app project using Cordova which in I had a simple Sqlite database. -------------------- ID | Name | Number | -------------------- Since I'm new in android apps, I just Got the UI ready. I have two text inputs, a tag to show the table data and 3 buttons. And when the user taps on each columns, a popup show's up for deleting or editing the row contents. Here's the HTML code for UI: My first App Open Database //The hidden div tag for implementing the popup Delete Edit Discard Name Number Insert Search Show All Also I used some Css styles to make my app looks better. Here's my style.css file: input[type='text'] { border: 1px solid black; width: 200px; margin-left: 10px; } table { width:100%; } table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { padding: 5px; text-align: left; } table#t01 tr:nth-child(even) { background-color: #eee; } table#t01 tr:nth-child(odd) { background-color:#fff; } table#t01 th { background-color: black; color: white; } button { margin: 10px; font: bold 13px "Helvetica Neue", Helvetica, Arial, clean, sans-serif !important; text-shadow: 0 -1px 1px rgba(0,0,0,0.25), -2px 0 1px rgba(0,0,0,0.25); border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5); -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5); display: inline-block; color: white; padding: 5px 10px 5px; white-space: nowrap; text-decoration: none; cursor: pointer; background-color: #BE3E76; border-style: none; text-align: center; overflow: visible; } button:active { background-position: 0 -100px; -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.7); -webkit-box-shadow: none; } #qrpopup { position:fixed;z-index:9999;background-color:rgba(0, 0, 0,0.9);width:100%; height:100%;display:none; } But I want to know how can I create insert, edit, delete and search functions using javascript in Cordova?
type: Question
has title: A simple Cordova android example including Sqlite read/write and search
score: 20
answer count: 2
has answer: http://stackoverflow.com/a/26609184

http://stackoverflow.com/q/26523209
tagged with: c#
has answer: http://stackoverflow.com/a/26523359
tagged with: http://stackoverflow.com/tag/json
has title: Json to DateTime - change format
has comment: http://stackoverflow.com/comment/41674819
answer count: 2
has comment: http://stackoverflow.com/comment/41674829
tagged with: javascript
has body: I send from JS (with JSON) to server (C#) a string date in format "dd/mm/yyyy" - for example "23/10/2014", but C# DateTime gets null. If I send "10/23/2014" it works. I use MVC4. How can I change that format that DateTime gets to I'll be able to send "23/10/2014"?
accepted answer: http://stackoverflow.com/a/26523359
score: 0
has answer: http://stackoverflow.com/a/26523429
tagged with: date-format
tagged with: datetime
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26523429
type: Question

http://stackoverflow.com/q/26631304
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26631376
has answer: http://stackoverflow.com/a/26631429
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41870782
possible better answer: http://stackoverflow.com/a/26631429
has title: Capturing String Segments between Special Characters using Regular Expressions
tagged with: regex
has body: I have the following string of text: textString1:textString2:textString3:textString4 I'm looking to capture each text string and assign them to variables. I've somehow managed to come up with the following: var errorText = 'AAAA:BBBB:CCCC:DDDD'; var subString, intro, host, priority, queue = ''; var re = /(.+?\:)/g; subString = errorText.match(re); intro = subString[0]; host = subString[1]; priority = subString[2]; //queue = subString[3]; console.log(intro + " " + host + " " + priority); JS Bin Link However, I'm having problems with: capturing the last group, since there is no : at the end the variables contain : which I'd like to strip
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26631376
type: Question

http://stackoverflow.com/comment/41885643
type: QuestionComment
has text: also this http://code.tutsplus.com/articles/chrome-dev-tools-networking-and-the-console--net-28167
comment on: http://stackoverflow.com/q/26638636
score: 0
type: Comment

http://stackoverflow.com/a/26560022
answers question: http://stackoverflow.com/q/26559743
type: Answer
has body: Assuming another page means another view, see this answer. Basically, create a service.
score: 0

http://stackoverflow.com/comment/41793876
score: 0
type: AnswerComment
type: Comment
has text: Yes, it works. Thanks, Alexandros. You have completely cleared this task which was so difficult for me.
comment on: http://stackoverflow.com/a/26588477

http://stackoverflow.com/q/26651762
has comment: http://stackoverflow.com/comment/41910070
has comment: http://stackoverflow.com/comment/41936912
tagged with: tree
answer count: 0
has body: Here i'm using Ext js 4.1, When i click on the collapse icon it is not changing to expand state. This happens only in IE. Please help me out. Thanks in Advance https://fiddle.sencha.com/#fiddle/4ja
type: Question
tagged with: javascript
score: 0
tagged with: panel
tagged with: extjs
has title: EXT js 4.1.1 Tree panel expand collapse icon is not working in IE 10
type: UnansweredQuestion

http://stackoverflow.com/comment/41945047
type: AnswerComment
has text: The code I put is jQuery. This is because .hide() adds a "display:none;" css directive to your table, so use my code to check and it'll be ok.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26672550

http://stackoverflow.com/comment/61882524
type: Comment
comment on: http://stackoverflow.com/a/26515815
score: 0
type: AnswerComment
has text: This was the best most concise answer for me. Thanks @Quentin.

http://stackoverflow.com/comment/41787675
score: 0
type: Comment
has text: Please read through and confirm you understood the [Architecture Overview](https://developer.chrome.com/extensions/overview#arch). I have a feeling you may be executing this code in the wrong place.
type: QuestionComment
comment on: http://stackoverflow.com/q/26580771

http://stackoverflow.com/comment/41819806
type: QuestionComment
has text: Try using the name as `com_photo[]` this will send files as an array.
comment on: http://stackoverflow.com/q/26603371
score: 0
type: Comment

http://stackoverflow.com/comment/41696137
type: Comment
comment on: http://stackoverflow.com/q/26529250
type: QuestionComment
has text: It kind of does, but it doesn't help when the newData has a greater or shorter length than the orgData. How would I know to either add the object to the array or remove an object from the array.
score: 0

http://stackoverflow.com/comment/41914560
comment on: http://stackoverflow.com/q/26653771
score: 0
has text: That was it, I added value="false" and now its working. Put that as the answer and Ill mark it.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26586682
has answer: http://stackoverflow.com/a/26586805
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I have some text like this: Once upon a time, there lived a cat. The cat liked to watch fish swim. I need to place some text, in a e.g. text which is hidden if placed inside , but not hidden when outside. E.g.: Once upon a time, there this text is invisible lived a cat. The cat liked to watch this text is visible fish swim. Similarly, some text placed in will be hidden only when outside of . Here hidden means: The text cannot be seen. The text cannot be selected. The text occupies no space. The text does not interfere with the formatting of the other text. Is there any way to hide or reveal text depending on whether or not it appears within another ?
tagged with: css
has answer: http://stackoverflow.com/a/26586738
has answer: http://stackoverflow.com/a/26586757
has title: How to make text hidden or revealed when inside or outside a ?
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41790714
type: Comment
type: QuestionComment
has text: You should read the second answer on that page. And also the comment under the code you've copied which says **This is plain wrong**
comment on: http://stackoverflow.com/q/26587862
score: 0

http://stackoverflow.com/comment/41660508
score: 1
has text: something like this? http://jsfiddle.net/egbbagkm/
comment on: http://stackoverflow.com/q/26515252
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26631569
has comment: http://stackoverflow.com/comment/41871465
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26631912
type: Question
has body: Ok so I have a jquery tag plugin which works perfectly, but then I thought ho!, it would be cool to add a "placeholder"to my text box. I did so... and nothing appeared apart from the jquery plugin... My place holder should be "hello type here"... I guess it doesn't work, because of the plugin, which is between "script" tags... I would be very thankful if someone could help me:) Sport: Aloha to you mate!
tagged with: javascript
has comment: http://stackoverflow.com/comment/41871306
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41871368
has title: Jquery plugin stops placeholder to appear

http://stackoverflow.com/q/26641373
type: Question
score: 5
upvote count: 5
has answer: http://stackoverflow.com/a/26641658
tagged with: javascript
answer count: 3
accepted answer: http://stackoverflow.com/a/26641658
possible better answer: http://stackoverflow.com/a/26641576
has comment: http://stackoverflow.com/comment/41889725
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/26641576
has body: I want to use a slider control to input a selection. The possible values are: 5000, 25000, 50000, 75000, and 100000. However, I cannot get the range input to limit to those choices. The closest thing I've got is this: 5000 25000 50000 75000 100000 You can see the full sample here: http://jsfiddle.net/au14Lv2t/1/ The problem with this solution is that it allows for invalid values like 10000, 15000, etc. I'm looking for an AngularJS (or pure HTML5/JS/CSS) solution. I would prefer not to introduce jQuery. Thanks!
has comment: http://stackoverflow.com/comment/41889970
has comment: http://stackoverflow.com/comment/41890075
has answer: http://stackoverflow.com/a/31424363
favorite count: 0
tagged with: angularjs
has title: HTML5 input type range - non-linear sequence?
has comment: http://stackoverflow.com/comment/41890089
type: AnsweredQuestion

http://stackoverflow.com/comment/41859881
score: 0
comment on: http://stackoverflow.com/q/26625193
has text: `getWeatherForCity` is a private function and it is not call when you do `weather.getWeatherForCity('2878234')`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/43226670
type: Comment
score: 0
type: AnswerComment
has text: didn't work. at least on chrome. I can find the div but the focus don't work :(
comment on: http://stackoverflow.com/a/27388439

http://stackoverflow.com/a/26604378
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41822040
has comment: http://stackoverflow.com/comment/41828414
has comment: http://stackoverflow.com/comment/41822434
has comment: http://stackoverflow.com/comment/41823264
type: Answer
has comment: http://stackoverflow.com/comment/41822876
has comment: http://stackoverflow.com/comment/41822700
answers question: http://stackoverflow.com/q/26604260
upvote count: 1
has comment: http://stackoverflow.com/comment/41823374
accepted answer of: http://stackoverflow.com/q/26604260
has body: The ID of an ASP element is not the same than the ID of the html element created. You can get it with yourElement.ClientID In jQuery, to get your element : $('#&lt;%= hdFileId.ClientID %&gt;').val() or in classic JavaScript : document.getElementById('&lt;%= hdFileId.ClientID %&gt;').value ======= EDIT ======== OK I get it. Your HiddenField is into a GridView, so you have (number of rows) hiddenfields. So you can't access to an unique HiddenField. To access to each HiddenField you have to do it in the RowDataBound method : protected void dgFileList_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { (HiddenField) hdFileId = (HiddenField) e.Row.FindControl("hdFileId"); } } In your case, you should add a &lt;asp:LinkButton&gt; rather than the html link element &lt;a&gt;, and then you could access in the code-behind to set the HREF of the LinkButton for each HiddenField. Another solution is to not use an HiddenField (which is an ASP element) because you must pass by the code-behind. But you can use a &lt;span&gt; which you set as style="display:none" to be invisible and you can access directly in your javascript code. Hope it helps.
has comment: http://stackoverflow.com/comment/41823182
type: AcceptedAnswer

http://stackoverflow.com/comment/41777907
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26574797
has text: i try to write in jsfiddle. It's not working properly . http://jsfiddle.net/009a9gc0/2/
type: AnswerComment

http://stackoverflow.com/comment/41910491
type: Comment
has text: Thanks! And can you tell me what difference will be if i set instead of `display : table` - `display : inline-block`? For me ther are no difference on UI, but maybe in some cases there are some difference
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26653685

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/26556949
tags question: http://stackoverflow.com/q/26594270
tags question: http://stackoverflow.com/q/26543961
type: Tag
tags question: http://stackoverflow.com/q/26607368
tags question: http://stackoverflow.com/q/26544766

http://stackoverflow.com/comment/41808984
type: QuestionComment
type: Comment
has text: did you define css rule for .visitstatus , the date value in your sample html is belong to visitstatus and you should define the format within this class
comment on: http://stackoverflow.com/q/26597232
score: 0

http://stackoverflow.com/comment/41896300
comment on: http://stackoverflow.com/a/26643859
type: Comment
has text: It just seems a little bit too cumbersome for just saving the state... http://plnkr.co/edit/a88cOYDVORDHQV3b5NGJ?p=preview
score: 0
type: AnswerComment

http://stackoverflow.com/q/26549699
has answer: http://stackoverflow.com/a/26549749
has body: I am working on an exercise from the book Eloquent JavaScript (see 'a list' at bottom of linked page). Basically, I want to make an object that takes an array and turns it into a list with the following structure: var list = { value: 1, rest: { value: 2, rest: { value: 3, rest: null } } }; When I run the code below in the console, I get TypeError: Cannot read property 'length' of undefined (line 3 in function arrayToList). Why is the array on which I am calling .length not defined? function arrayToList(array){ var list = {}; if(!array.length){ list.value = null; } else{ list.value = array.shift(); list.rest = arrayToList(); } return list; } console.log(arrayToList([10, 20])); Note: Stack Overflow question List data structures in JavaScript is a very similar post on the same problem. I'm not looking for a solution here so much as an explanation as to what is going haywire in the recursive call.
favorite count: 0
accepted answer: http://stackoverflow.com/a/26549741
linked to: http://stackoverflow.com/q/24231056
has comment: http://stackoverflow.com/comment/41727342
has answer: http://stackoverflow.com/a/26549759
answer count: 4
type: AnsweredQuestion
tagged with: recursion
has comment: http://stackoverflow.com/comment/41721878
type: Question
upvote count: 15
has comment: http://stackoverflow.com/comment/41722464
possible better answer: http://stackoverflow.com/a/26549757
has answer: http://stackoverflow.com/a/26549757
tagged with: arrays
score: 10
downvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26549741
has title: Why is this array undefined when I call .length?

http://stackoverflow.com/a/26665822
has body: If you don't need the class and id attributes (style it instead as .container div) you could use the enclosing tag property of the fieldrenderer: &lt;div class="container"&gt; &lt;sc:FieldRenderer FieldName="Steak" EnclosingTag="div" runat="server" /&gt; &lt;sc:FieldRenderer FieldName="Bacon" EnclosingTag="div" runat="server" /&gt; &lt;sc:FieldRenderer FieldName="Eggs" EnclosingTag="div" runat="server" /&gt; &lt;/div&gt; If the field is populated then the text will be wrapped with a div tag, otherwise nothing will be rendered.
accepted answer of: http://stackoverflow.com/q/26662011
answers question: http://stackoverflow.com/q/26662011
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41686008
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26529618
has text: That's pretty much what I asked actually. I find Mark's idea a bit better, but definitely does the job.
score: 0

http://stackoverflow.com/q/26544501
linked to: http://stackoverflow.com/q/5999118
has comment: http://stackoverflow.com/comment/41712875
tagged with: request.querystring
type: Question
answer count: 1
tagged with: javascript
has body: I have a web page that reads an xml file using ajax. Ajax because I only want to update the numbers not the entire page. It reads the file every 5 Seconds using SetInterval(), because the file is updated every 5 Seconds. I would like to know how many times the xml file has reloaded, by adding a Counter into the querystring. I fail at this, because the page reloads if I change the querystring. Is it possible to do this in JavaScript/JQuery? This is how I tried to solve this: function loadXMLDoc(filename) { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else // code for IE5 and IE6 { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } var href = window.location.href; if (counter &lt; 1) { href += "index.html?count=" + ++counter; window.location.href = href; } else { href = href.substring(0, href.length - 1); window.location.href = href + ++counter; } xmlhttp.open("GET", filename + "?count=" + counter, false); xmlhttp.send(); var xdoc = xmlhttp.responseXML; var xmlDoc = new ActiveXObject('Msxml2.DOMDocument.6.0'); xmlDoc.loadXML(new XMLSerializer().serializeToString(xdoc)); return xmlDoc; also this does not produce the querystring I want either: http://localhost:52646/index.html?count=1index.html?count=1 Is this possible to acheive?
tagged with: jquery
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Update querystring in javascript
has answer: http://stackoverflow.com/a/26544621
type: UnansweredQuestion

http://stackoverflow.com/a/26667190
score: 0
has body: basically what you want to do is add an event on the parent container and wait for the event to bubble up and identify if the event originating is from your x mark and if it is then trigger the callback function.. This is the concept I think most of the libraries use.. Or use a library like jQuery, why solve a problem that has already been solved by others.
answers question: http://stackoverflow.com/q/26667109
has comment: http://stackoverflow.com/comment/41936041
has comment: http://stackoverflow.com/comment/41935829
type: Answer
has comment: http://stackoverflow.com/comment/41946650
has comment: http://stackoverflow.com/comment/41935938
has comment: http://stackoverflow.com/comment/41935922
has comment: http://stackoverflow.com/comment/41935991
has comment: http://stackoverflow.com/comment/41936101

http://stackoverflow.com/comment/41755524
comment on: http://stackoverflow.com/a/26555707
type: Comment
has text: @Xan "(any resources used by sidebar.html)" is not necessary. The resources within sidebar.html don't need to be web accessible in order to be used in the extension iframe.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26534307
downvote count: 0
has body: What is this.age? You did not encapsulate it correctly: this.myAge = function(){ return myage; }; Note that you don't have to use var age = myage;. DEMO.
has comment: http://stackoverflow.com/comment/41694697
has comment: http://stackoverflow.com/comment/41694805
has comment: http://stackoverflow.com/comment/41695107
answers question: http://stackoverflow.com/q/26534278
upvote count: 2
has comment: http://stackoverflow.com/comment/41694767
has comment: http://stackoverflow.com/comment/41694969
type: Answer
score: 2

http://stackoverflow.com/comment/41876316
score: 0
type: Comment
has text: This is an answer to my 2nd question.
comment on: http://stackoverflow.com/a/26633846
type: AnswerComment

http://stackoverflow.com/comment/41763195
has text: That's not what I was looking for. I was looking for a placeholder in which only a part of the text is clickable.
comment on: http://stackoverflow.com/a/26572601
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41784270
has text: This code has no effect: `var updateTime = function() { setTimeout("doDate()", 1000); }`
comment on: http://stackoverflow.com/q/26584233
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26588628
answer count: 1
has answer: http://stackoverflow.com/a/26589667
has comment: http://stackoverflow.com/comment/41792352
linked to: http://stackoverflow.com/q/25003675
has comment: http://stackoverflow.com/comment/41792477
linked to: http://stackoverflow.com/q/21939736
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41792310
has comment: http://stackoverflow.com/comment/41793960
has comment: http://stackoverflow.com/comment/41792967
linked to: http://stackoverflow.com/q/12265096
accepted answer: http://stackoverflow.com/a/26589667
type: Question
has comment: http://stackoverflow.com/comment/41792353
tagged with: javascript
tagged with: jquery
has title: CSS Animation not working in Chrome
score: 0
has comment: http://stackoverflow.com/comment/41793780
has body: Some insight into the project: A full interactive website, where animations will play.. then they'll stop, once they've stopped and a mouseover event on an animation occurs it will play until 70% of the animation is complete, when clicking on another object (in this case text) it will complete it's cycle. My project partner made the animation in Google web designer, we've tried multiple programs for our project such as Adobe Edge, but unfortunately due to the size of our animations we are unable to use SVG or PNG sequences, and the same goes for spritesheets.. so we arrived at css animations, unfortunately my knowledge of css animations is quite limited and I was wondering if anyone would be able to help me out. I have a problem: why doesn't my CSS animation act the same in Chrome as in Firefox? I've tried the following solutions and looked at the following posts: css3 animation not working in chrome CSS Animation not working on Chrome Chrome Keyframe animation not working jquery: &lt;script&gt; $(document).ready(function(){ //$('.gwd-img-r1sa').toggle(function () { // $('.gwd-img-r1sa').css({"animation-play-state":"paused","-webkit-animation-play-state":"paused"}); //}, function () { // $('.gwd-img-r1sa').css({"animation-play-state":"running","-webkit-animation-play-state":"running"}); //}); $(".gwd-img-r1sa").on("mouseenter", function(){ $(".gwd-img-r1sa").css({"animation-iteration-count":"0.7", "-webkit-animation-iteration-count":"0.9"}); }); $("#play").on("click", function(){ $(".gwd-img-r1sa").css({"animation-iteration-count":"1", "-webkit-animation-iteration-count":"1"}); }); }); &lt;/script&gt; css: &lt;style type="text/css"&gt; /**.gwd-img-r1sa:hover, .gwd-img-r1sa:focus { -webkit-animation-play-state: paused; animation-play-state: paused; } **/ html, body { width: 100%; height: 100%; margin: 0px; } body { background-color: transparent; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -moz-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, …
has comment: http://stackoverflow.com/comment/41792756
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41875208
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26633738
has text: @MarcB Thought it was obvious, I edited my question with the "real" question. Thanks for the comment ;)
score: 0

http://stackoverflow.com/comment/41768893
type: QuestionComment
comment on: http://stackoverflow.com/q/26574806
type: Comment
score: 1
has text: Please provide a code example. Your link will be useless once you'll change your site.

http://stackoverflow.com/comment/43866944
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27692016
has text: I would note that RSelenium allows you to drive phantomjs and also doesnt require java http://rpubs.com/johndharrison/RSelenium-headless.
type: Comment

http://stackoverflow.com/comment/41681300
has text: myObj.distance is a function definition not a function call. The return value exists only after you actually call it.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26527086

http://stackoverflow.com/comment/41926960
score: 0
type: Comment
type: QuestionComment
has text: I really think we need to see more of the method to help you out. Could you post more code?
comment on: http://stackoverflow.com/q/26662281

http://stackoverflow.com/comment/41829639
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26589667
type: Comment
has text: Alright thank you for your help so far.. I got it to work in everything except for the fact that in Firefox it doesn't work at all, not even when i add in -moz-

http://stackoverflow.com/a/31363899
downvote count: 0
answers question: http://stackoverflow.com/q/26614704
type: Answer
score: 1
upvote count: 1
has body: First setup an emtry point in your html file: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;script data-main="entrypoint" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.15/require.min.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; Then in entrypoint.js you can configure jquery and magnific popup: require.config({ paths : { jquery : '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min', magnificpopup : 'path/to/magnific-popup.min', }, shim: { 'magnificpopup': ['jquery'] } }); require([ 'popuptest' ], function(popuptest) { popuptest.show(); }); Finally, on popuptest.js we can open a youtube popup like this: define(['jquery', 'magnificpopup'], function($, magnificpopup) { return { show: function() { $.magnificPopup.open({ items: { src: 'https://www.youtube.com/watch?v=btPJPFnesV4' }, type: 'iframe', iframe: { cursor: null, titleSrc: function(item) { return 'Video title'; }, patterns: { youtube_short: { index: 'youtu.be/', id: 'youtu.be/', src: '//www.youtube.com/embed/%id%?autoplay=1' } } } }); } }); }); Hope this helps.

http://stackoverflow.com/comment/41806100
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594123
has text: You can create HTML content such as e.g. ` <input id="clockUser99" ... ` based on your database. Try exploring `innerHTML`. You can build a string `content` defining an element's content, then use a JavaScript statement such as `document.getElementById('clock1').innerHTML = content;` to replace the div container's content

http://stackoverflow.com/q/26670096
tagged with: windows-services
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/26670524
tagged with: javascript
tagged with: browser
has comment: http://stackoverflow.com/comment/41940859
answer count: 2
has answer: http://stackoverflow.com/a/26670493
downvote count: 0
accepted answer: http://stackoverflow.com/a/26670493
favorite count: 0
has answer: http://stackoverflow.com/a/26670524
has body: I need to call a javascript function inside a chrome-window from a windows service written in c#. The browser is entirely at my disposal so I can configuration is no problem. For example, the windows service is a file checker, when a certain file is changed there has to popup a js alert. -EDIT- The following works fine for client to client communication (server-side code). So when a specific event happens on the server I can display this on the client (I hoped commented would do that) using System; using System.Threading.Tasks; using Microsoft.AspNet.SignalR.Client; using SignalR.Hosting.Self; using SignalR.Hubs; namespace Net.SignalR.SelfHost { class Program { static void Main(string[] args) { string url = "http://localhost:8081/"; var server = new Server(url); server.MapHubs(); server.Start(); Console.WriteLine("SignalR server started at " + url); Console.ReadLine(); // Clients[collection].flush("bericht: " + message + collection); } //public void PushMessage(string bericht) //{ // var hubConnection = new HubConnection("http://localhost:8081/"); // var serverHub = hubConnection.CreateProxy("CollectionHub"); // serverHub.On("flush", message =&gt; System.Console.WriteLine(message)); // hubConnection.Start().Wait(); // serverHub.Invoke("Subscribe", "Product"); // string line = null; // while ((line = bericht) != null) // { // serverHub.Invoke("Publish", line, "Product").Wait(); // } // System.Console.Read(); //} public class CollectionHub : Hub { public void Subscribe(string collectionName) { Groups.Add(Context.ConnectionId, collectionName); Console.WriteLine("Subscribed to: " + collectionName); //serverHub.Invoke("Publish", "dit is een eerste test", "Product").Wait(); } public Task Unsubscribe(string collectionName) { return Clients[collectionName].leave(Context.ConnectionId); } public void Publish(string message, string collection) { Clients[collection].flush("bericht: " + message + collection); } } } }
has title: Call javascript function from windows service c#
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41941365
score: 1
upvote count: 1

http://stackoverflow.com/q/26549966
tagged with: http://stackoverflow.com/tag/html
has body: I'm curious to know if there´s an option to go back from a page to one-pages and to a specific location? I have a webpage that is a one-pager with fixed menu - on that page is a button "apply for a job" that takes you to a external page but with the same fixed menu. Can I make people click on the menu so it goes back to the one-pager an autoscroll down to the location Is this possible? NOTABENE: I´m not looking for going back to the previus location - just any location that the user will click on the menu (because it´s the same menu for application and the one pages (the whole site) have a nice weekend
has answer: http://stackoverflow.com/a/26553943
possible better answer: http://stackoverflow.com/a/26553943
tagged with: css
type: AnsweredQuestion
type: Question
has title: Click any menu-button to go back to one-pager AND scroll down to location
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26550334
accepted answer: http://stackoverflow.com/a/26550334

http://stackoverflow.com/q/26551891
linked to: http://stackoverflow.com/q/21571145
tagged with: javascript
has answer: http://stackoverflow.com/a/26648762
score: 0
has body: My only purpose is do profiling of JavaScript code under Node.js with vTune. I tried to follow the steps that appear under this post: Profiling Nodejs with vTune, but I have no luck. I use Debian 7 x86_64, and my version of vTune Amplifier XE is 2015 (evaluation mode). The modules are loaded with the service sep3_15 start on boot, and I can see them with lsmod. Also, I build the sample jitprofiling project provided with vTune, and it works (I can see the dynamic content). So, my problem is building Node.js with vTune support. If I do the above steps, and I just change vcbuild.bat nosign with ./configure and make, I get an error "../src/node.cc:22:67: fatal error: v8-vtune.h: No such file or directory", and the only solution that continues compiling correctly is by adding also the next line in node.gyp: 'include_dirs': [ // ... 'deps/v8/src/third_party/vtune', // ... It is the only way to fetch the includes (v8-vtune.h) and compile node. But when importing with vTune Amplifier I cannot see the Dynamic code nor the sources of JS. I tried many different things, like building node for debugging with ./configure --build and even ./configure --debug --gdb, and then forcing to execute the node binary from out/Debug/node, instead from out/Release/node. I can see that it has the symbol definitions (strings node | wc -l is much bigger than in the Release version) because It doesn't throw a warning when profiling with vTune. And although I can see all node source code, I cannot see the Dynamic code. I even tried to force variables gdbjit=on and vtunejit=on under deps/v8/Makefile I tried with the nightly build 0.11.11 and with the latest 0.11.14. I have no clue what to do. EDIT: I was doing more compilations with different options (above mentioned). Finally, I can see how it works up to the 0.11.12 version, but no 0.11.13 nor 0.11.14.
answer count: 1
has title: Compiling nodejs with vtune and jitprofiling.h support
tagged with: node.js
tagged with: intel-vtune
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26648762

http://stackoverflow.com/a/26544115
score: 3
answers question: http://stackoverflow.com/q/26543732
has body: The only way to hide you variables is to store them on server side and use session to pass them between scripts. POST variables are not hidden at all, there are many ways to reveal them.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26543732
type: Answer
upvote count: 3

http://stackoverflow.com/q/26555928
has body: I would like to send the values of dynamically generated input boxes to the php page. I got the below code which appends input box on click from another question and was wondering how could I be able to pass the values as an array to php page. can someone help me out? Build your own form! Add submit a $(document).ready(function() { $(".sbn").click(function() { var intId = $("#buildyourform div").length + 1; var fieldWrapper = $(" "); var fName = $(" "); var removeButton = $(" "); removeButton.click(function() { $(this).parent().remove(); }); fieldWrapper.append(fName); fieldWrapper.append(removeButton); $("#buildyourform").append(fieldWrapper); }); $('.submit').click(function(){ $.ajax({ method:'POST', url:'test.php', data:{}, success:function(response){ // } }); }); });
has title: ajax send value of dynamically created input boxes
tagged with: php
possible better answer: http://stackoverflow.com/a/26556080
has comment: http://stackoverflow.com/comment/41733509
has answer: http://stackoverflow.com/a/26556080
has comment: http://stackoverflow.com/comment/41733549
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26555994
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/41733590
has comment: http://stackoverflow.com/comment/41733554
has comment: http://stackoverflow.com/comment/41733471
has comment: http://stackoverflow.com/comment/41733649
accepted answer: http://stackoverflow.com/a/26555994
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/41707435
score: 0
type: Comment
type: QuestionComment
has text: Have you tried GridView.OptionsSelection.MultiSelect = True; ?
comment on: http://stackoverflow.com/q/26541369

http://stackoverflow.com/comment/41889560
comment on: http://stackoverflow.com/a/26640929
type: Comment
has text: @maths4js I have edited my answer to use box-shadow and I have confirmed that it works
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41936338
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26667261
has text: what is the error msg which you are getting?

google-chrome-extension
tags question: http://stackoverflow.com/q/26519959
tags question: http://stackoverflow.com/q/26644587
tags question: http://stackoverflow.com/q/26659579
tags question: http://stackoverflow.com/q/26605514
tags question: http://stackoverflow.com/q/26580771
tags question: http://stackoverflow.com/q/26667191
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/26640666
tags question: http://stackoverflow.com/q/26633457
tags question: http://stackoverflow.com/q/26634168
tags question: http://stackoverflow.com/q/26539801
tags question: http://stackoverflow.com/q/26662901
tags question: http://stackoverflow.com/q/26546019
tags question: http://stackoverflow.com/q/26668600
tags question: http://stackoverflow.com/q/26582701
tags question: http://stackoverflow.com/q/26625128
type: Tag
tags question: http://stackoverflow.com/q/26555550
tags question: http://stackoverflow.com/q/26613121
tags question: http://stackoverflow.com/q/26570625
tags question: http://stackoverflow.com/q/26517988
tags question: http://stackoverflow.com/q/26619522
tags question: http://stackoverflow.com/q/26525903
tags question: http://stackoverflow.com/q/26552340
tags question: http://stackoverflow.com/q/26601347
tags question: http://stackoverflow.com/q/26660934
tags question: http://stackoverflow.com/q/26558280
tags question: http://stackoverflow.com/q/26531664
tags question: http://stackoverflow.com/q/26527153
tags question: http://stackoverflow.com/q/26577068
tags question: http://stackoverflow.com/q/26557107
tags question: http://stackoverflow.com/q/26645639
tags question: http://stackoverflow.com/q/26524479
tags question: http://stackoverflow.com/q/26621042
tags question: http://stackoverflow.com/q/26565419
tags question: http://stackoverflow.com/q/26656529
tags question: http://stackoverflow.com/q/26648444
tags question: http://stackoverflow.com/q/26569565

http://stackoverflow.com/comment/41943818
has text: wouldn't set the src of the video source tag to the url of the file be enough to download it asynchronously (instead of setting the data:video/avi;base64, + responseText)?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26671553

http://stackoverflow.com/a/26587416
answers question: http://stackoverflow.com/q/26587312
accepted answer of: http://stackoverflow.com/q/26587312
has comment: http://stackoverflow.com/comment/41793761
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41794104
has comment: http://stackoverflow.com/comment/41790591
type: Answer
has comment: http://stackoverflow.com/comment/41790002
has body: try with lower case $(this).attr('id', 'tableToChart' + i); also you don't have to do var i = 0; //outside the each loop // and you don't need i++; // inside the each loop

http://stackoverflow.com/q/26550889
answer count: 2
has answer: http://stackoverflow.com/a/26551374
accepted answer: http://stackoverflow.com/a/26551374
has answer: http://stackoverflow.com/a/26551229
has comment: http://stackoverflow.com/comment/41724627
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26551229
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Keep UL visible when hovering from div to UL
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41724500
tagged with: javascript
has comment: http://stackoverflow.com/comment/41724727
has comment: http://stackoverflow.com/comment/41727589
has body: I've got a custom header / nav where I have two elements that represent two sections of a website. I want to be able to hover over one of the elements and display a particular menu. However the Menu list isn't a child of the element. So I can't do it with CSS. The problem i'm having is when I hover over the element, the menu shows. But I move my mouse to hover over the menu and and as soon as move away from the element the menu disappears. I have tried adding a display:block to the manu items, with a .delay() method running but there is still a slight flicker when moving the mouse away from the div. Here is my current code: //HTML Hover over me to show menu Hover over me to show menu testing testing testing testing // jQuery jQuery("a.hoverOverOne").hover( function () { jQuery('#menuToShow-One').slideDown('medium').delay(500); }, function () { jQuery('#menuToShow-One').slideUp('medium').delay(500); }); jQuery("a.country").hover( function () { jQuery('#menuToShow-Two').slideDown('medium').delay(500); }, function () { jQuery('#menuToShow-Two').slideUp('medium').delay(500); }); // CSS #menuToShow-One{ display:none; } #menuToShow-Two{ display:none; } Any help would be much appreciated. Thanks.
score: 0

http://stackoverflow.com/comment/41779121
type: Comment
comment on: http://stackoverflow.com/a/26581052
has text: you just have to add an action (a link where the form can be processed) [fiddle](http://jsfiddle.net/xzaxuyjr/2/)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41839609
has text: This worked, only thing I had to change was createSpyObject(... to createSpy(..., not sure if createSpyObject is an actual function. Thank you so much!
type: Comment
comment on: http://stackoverflow.com/a/26612300
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42037068
type: AnswerComment
score: 0
type: Comment
has text: I would like both mouse events to go to the javascript. Not just the one
comment on: http://stackoverflow.com/a/26720347

http://stackoverflow.com/q/26523082
has answer: http://stackoverflow.com/a/26523458
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: In fullcalendar, when an event is added, if the user resizes that event without refreshing, the modifications are not being updated in the database. Inserting and modifying is working perfectly. This is my insert code $.ajax({ url: 'events.add.php', data: 'start='+ copiedEventObject.start +'&amp;end='+ copiedEventObject.end +'&amp;color='+ copiedEventObject.backgroundColor +'&amp;title='+ copiedEventObject.title +'&amp;cure_type='+ copiedEventObject.cure_type, type: "POST", success: function(json) { location.reload(); // I wish not to use this refresh method because then I loose the location of the calendar. The calendar comes back to today's date. } }); if ($('#drop-remove').is(':checked')) { // if so, remove the element from the "Draggable Events" list $(this).remove(); } This is my update code // load events from MySQL events:'events.json.php', // if event is moved around in the calendar eventDrop: function(event, delta) { start = $.fullCalendar.formatDate(event.start, "yyyy-MM-dd HH:mm:ss"); end = $.fullCalendar.formatDate(event.end, "yyyy-MM-dd HH:mm:ss"); startTime = $.fullCalendar.formatDate(event.start, "Hmm"); $.ajax({ url: 'events.update.php', data: 'start='+ start +'&amp;end='+ end +'&amp;id='+ event.id, type: "POST", success: function(json) { //alert("Updated Successfully"); } }); }, // if event is rezided in the calendar eventResize: function(event) { start = $.fullCalendar.formatDate(event.start, "yyyy-MM-dd HH:mm:ss"); end = $.fullCalendar.formatDate(event.end, "yyyy-MM-dd HH:mm:ss"); $.ajax({ url: 'events.update.php', data: 'start='+ start +'&amp;end='+ end +'&amp;id='+ event.id, type: "POST", success: function(json) { //alert("Updated Successfully"); } }); }
has title: Fullcalendar not refreshing after event drop
score: 2
has comment: http://stackoverflow.com/comment/41680465
has comment: http://stackoverflow.com/comment/41709607
type: Question
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery

http://stackoverflow.com/a/34738254
score: 2
has comment: http://stackoverflow.com/comment/71338531
has body: Insert Proper Code from below InAppBrowser.java in to your plugin LOCATED IN platforms\android\src\org\apache\cordova\inappbrowser\InAppBrowser.java Filtered code from below java code: import android.net.http.SslError; import android.webkit.SslErrorHandler; @SuppressLint("SetJavaScriptEnabled") public class InAppBrowser extends CordovaPlugin { private boolean ignoreSSLError = false; private HashMap&lt;String, Boolean&gt; parseFeature(String optString) { if (optString.equals(NULL)) { return null; } else { HashMap&lt;String, Boolean&gt; map = new HashMap&lt;String, Boolean&gt;(); StringTokenizer features = new StringTokenizer(optString, ","); StringTokenizer option; while(features.hasMoreElements()) { option = new StringTokenizer(features.nextToken(), "="); if (option.hasMoreElements()) { String key = option.nextToken(); if(key.equalsIgnoreCase(IGNORE_SSL_ERROR)) { Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; map.put(key, value); } else { Boolean value = option.nextToken().equals("no") ? Boolean.FALSE : Boolean.TRUE; map.put(key, value); } } } return map; } } public String showWebPage(final String url, HashMap&lt;String, Boolean&gt; features) { // Determine if we should hide the location bar. showLocationBar = true; showZoomControls = true; openWindowHidden = false; ignoreSSLError = false; if (features != null) { Boolean show = features.get(LOCATION); if (show != null) { showLocationBar = show.booleanValue(); } Boolean SSLError = features.get(IGNORE_SSL_ERROR); if(SSLError != null){ ignoreSSLError = SSLError.booleanValue(); } Boolean zoom = features.get(ZOOM); if (zoom != null) { showZoomControls = zoom.booleanValue(); } Boolean hidden = features.get(HIDDEN); if (hidden != null) { openWindowHidden = hidden.booleanValue(); } Boolean hardwareBack = features.get(HARDWARE_BACK_BUTTON); if (hardwareBack != null) { hadwareBackButton = hardwareBack.booleanValue(); } Boolean cache = features.get(CLEAR_ALL_CACHE); if (cache != null) { clearAl…
answers question: http://stackoverflow.com/q/26547918
has comment: http://stackoverflow.com/comment/57222540
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/41674419
type: Comment
score: 0
has text: That's brilliant! Just what I need, thank you! though how would I write these codes? I'm new to scripting (only 1 week or so), so I haven't really been exposed to this type of scripting. Thanks for your help and interest
type: QuestionComment
comment on: http://stackoverflow.com/q/26522593

http://stackoverflow.com/comment/41718214
has text: this won't change behavior of OP code. Should be fairly obvious that user can't access the links within `.menu`
type: Comment
comment on: http://stackoverflow.com/a/26547728
type: AnswerComment
score: 0

selenium-webdriver
tags question: http://stackoverflow.com/q/26560655
tags question: http://stackoverflow.com/q/26630519
tags question: http://stackoverflow.com/q/26584215
tag name: selenium-webdriver
tags question: http://stackoverflow.com/q/26566514
type: Tag

http://stackoverflow.com/comment/41928004
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26662833
has text: I get erros like: "Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement'". @plalx, I know, but I have to work with that class. Would you suggest to make a method on that class, that returns an array of all attributes I need to send over Json? Or make another class to represent the data send over Json?
type: QuestionComment

http://stackoverflow.com/q/26671932
downvote count: 0
tagged with: javascript
answer count: 1
has comment: http://stackoverflow.com/comment/41944123
favorite count: 0
has body: How can I add a Arrow at the end of the x and y axis in a d3js line diagram? I want to achieve this: I added a definition to my svg in the render method, but I couldn't figure out how to add it to the correct position. svg.append("defs").append("marker") .attr("id", "arrowhead") .attr("refX", 6 + 3) .attr("refY", 2) .attr("markerWidth", 13) .attr("markerHeight", 9) .attr("orient", "right") .append("path") .attr("d", "M2,2 L2,13 L8,7 L2,2"); You can see my test scenario at http://codepen.io/anon/pen/kLtrb
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/26673097
tagged with: d3.js
score: 6
upvote count: 6
accepted answer: http://stackoverflow.com/a/26673097
type: AnsweredQuestion
has title: d3js display arrow at the end of each axis
type: Question

http://stackoverflow.com/comment/105343550
type: Comment
type: AnswerComment
has text: This didn't help. Not in any way at all. (I didn't downvote.) I don't want to type "allow pasting" — it takes long, I need to do it thousands of times over the weeks and months ... causing me to search for how to disable this.
comment on: http://stackoverflow.com/a/47451648
score: 0

http://stackoverflow.com/comment/41812876
type: QuestionComment
comment on: http://stackoverflow.com/q/26598731
score: 0
has text: you are right, there should be a special rule for including certain files only on Cordova or only for browsers. We didn't build that yet but plan to do so in the future.
type: Comment

http://stackoverflow.com/a/26668042
has comment: http://stackoverflow.com/comment/41937594
has comment: http://stackoverflow.com/comment/41937679
score: 0
type: Answer
has body: I would both decrease the polling rate and make sure the server isn't creating a new connection for every request. You don't mention what type of server it is but the setting should be called KeepAlive on all servers. Besides that maybe look into why the server went down?
answers question: http://stackoverflow.com/q/26667981
has comment: http://stackoverflow.com/comment/41937534

http://stackoverflow.com/comment/41803155
type: Comment
comment on: http://stackoverflow.com/q/26593302
type: QuestionComment
has text: ...and his jsperf underscores the point that you seem to be trying so hard to avoid, which is to *test it* because these things can vary in different implementations and at different times.
score: 0

http://stackoverflow.com/comment/41753098
type: QuestionComment
score: 0
has text: can also set the popup data as data attributes in html if data not too large. Overall question is too vague to supply the best solution
comment on: http://stackoverflow.com/q/26566940
type: Comment

http://stackoverflow.com/q/26607859
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26608103
favorite count: 0
has title: To Do List in JavaScript/HTML
has answer: http://stackoverflow.com/a/26608094
has body: I have set up this To Do List and almost everything is working perfect. However, if I delete everything in the list. It won't let me add a new entry and I can't seem to figure it out why. It will work fine as long as I have at least one entry on the list. Any help is much appreciated thank you. < head > < script type = "text/javascript" > /* */ function addTask() { if (document.forms[0].newtask.value == "") window.alert("You must enter a value in the New Task field."); else { if (document.forms[0].tasks.options[0].value == "tasks") document.forms[0].tasks.options[0] = null; var newTask = new Option(); newTask.value = document.forms[0].newtask.value; newTask.text = document.forms[0].newtask.value; var numTasks = document.forms[0].tasks.options.length; document.forms[0].tasks.options[numTasks] = newTask; document.forms[0].newtask.value = ""; } } function deleteTask() { var selectedTask = 0; var taskSelected = false; while (selectedTask < document.forms[0].tasks.length) { if (document.forms[0].tasks.options[selectedTask].selected == true) { taskSelected = true; break; } ++selectedTask; } if (taskSelected == true) document.forms[0].tasks.options[selectedTask] = null; else window.alert("You must select a task in the list."); } function ascendingSort() { var newTasks = new Array(); for (var i = 0; i < document.forms[0].tasks.length; ++i) { newTasks[i] = document.forms[0].tasks.options[i].value; } newTasks.sort(); for (var j = 0; j < document.forms[0].tasks.length; ++j) { document.forms[0].tasks.options[j].value = newTasks[j]; document.forms[0].tasks.options[j].text = newTasks[j]; } } /* */ < /script> To Do List < /head> To Do List New Task Tasks
type: AnsweredQuestion
tagged with: forms
possible better answer: http://stackoverflow.com/a/26608103
type: Question
upvote count: 4
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: sorting
score: 4
answer count: 3
accepted answer: http://stackoverflow.com/a/26608094
has answer: http://stackoverflow.com/a/26608131

http://stackoverflow.com/comment/92462606
score: 1
type: AnswerComment
has text: `-Number.MAX_VALUE` is not equal to `Number.MIN_VALUE`. Furthermore, `-Number.MAX_VALUE` is a negative number, so you're saying `0 > [a negative number]`, which is always true.
comment on: http://stackoverflow.com/a/45180190
type: Comment

http://stackoverflow.com/a/42114590
score: 0
answers question: http://stackoverflow.com/q/26629302
type: Answer
has body: Basically you use the net module when you need to do lower level things than what http module let you do. http: wraps everything in the request and response objects for you to interact with. net: gives you the TCP socket itself for you to do whatever you want. @neil-shah indeed http is based on net as you can see here: https://github.com/nodejs/node/blob/master/lib/_http_server.js#L4

http://stackoverflow.com/q/26603047
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26606633
upvote count: 0
answer count: 1
favorite count: 0
score: -2
has body: Please look at the sample code below: var sample = (function () { var a, b; var sample = function (x, y) { a = x; b = y; }; return { add: function () { return a + b; } } })(); Is there anything wrong with this? How can I create multiple objects of the sample object? How should I write constructors? I tried creating object by: var s = new sample(1, 2); But, it throws an error!
has title: Create multiple objects of module pattern
accepted answer: http://stackoverflow.com/a/26606633
type: AnsweredQuestion
downvote count: 2

http://stackoverflow.com/a/26615923
has comment: http://stackoverflow.com/comment/41865606
has comment: http://stackoverflow.com/comment/41843212
has body: If you don't want repetition, simply remove the used elements from the array. var h = new Array("Good", "Bad", "Ugly", "Random Headline"); while (h.length &gt; 0) { var i = Math.floor(Math.random() * h.length); var t = h.splice(i, 1); console.log(t); }
answers question: http://stackoverflow.com/q/26615809
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/26554035
score: 3
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26553988
has body: null is falsy in js, so the condition evaluates to false, terminating the for loop. Comparison operators return booleans. You don't need a comparison operator, because you already have a boolean(ish) term.
answers question: http://stackoverflow.com/q/26553988
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26555606
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41733474
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has body: I have the following HTML, containing 4 's - 2 are doors and 2 are colors, as you can guess from their id. I'd like to be able to drag either colour to either door (such as blue on the left door and black on the right) and change the background colour on the style. I'd be grateful even if someone could point me in the right direction at least.
answer count: 2
has answer: http://stackoverflow.com/a/26575273
upvote count: 1
has title: jQuery drag and drop colour div to change background of another
has answer: http://stackoverflow.com/a/26556671
tagged with: jquery-ui-draggable
favorite count: 0
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/q/26642935
has title: JQuery - JNotify - Click-function issue
has answer: http://stackoverflow.com/a/26643086
has body: I'm using JNotify-plugin to display notifications on my site. I works well, but I need to use a click-function to trigger some events. Basiclly what happens is: When I get a new chat-message my JNotify-function triggers and a notification-div shows up. Then when I click that div, I want to trigger my other fuction(the #showNewMsg-click-function). But it won't work. If I use any other div to trigger the #showNewMsg-click-function everything works fine. But not when clicking the JNotify rendered div. So how can a make this work? Here is my try... JNotify-fuction: var newMessage; $(function () { newMessage = function () { jSuccess( "&lt;div id='showNewMsg'&gt;&lt;i class='glyphicon glyphicon-envelope'&gt;&lt;/i&gt;" + ' New chat msg! Click to read!' + '&lt;/div&gt;', { autoHide: false, HideTimeEffect: 500, LongTrip: 20, ColorOverlay: '#000', HorizontalPosition: "center", VerticalPosition: "bottom", ShowOverlay: false, OpacityOverlay: 0.5, MinWidth: 350 }); } newMessage(); }); Click-funtion to trigger some other click events: $("#showNewMsg").click(function () { $("#chat-toggle").click(); $('a[href="#room1"]').click(); }); JNotify GitHub
possible better answer: http://stackoverflow.com/a/26643086
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26643078
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26643078
score: 0

http://stackoverflow.com/q/26524096
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26524186
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26524118
has answer: http://stackoverflow.com/a/26524186
accepted answer: http://stackoverflow.com/a/26524118
favorite count: 0
has answer: http://stackoverflow.com/a/26524506
has title: Check browser width after resize, without reload (Javascript)
tagged with: css
type: AnsweredQuestion
score: 1
has body: I have a small piece of Javascript that checks what the browser's width is on load and, depending on the result, runs a piece of jQuery. This to display a different menu on mobile devices However, it CAN happen a user starts with a very small browser on his desktop, running the jQuery (and therefore the mobile menu). If he then resizes to full-screen, the menu doesn't change, because the check on the browser's width doesn't run again. The question: How do I adapt the Javascript so it checks every time the browser is resized? My code: if (window.innerWidth &lt;= 992) { jQuery(document).ready(function($) { $(".main-menu").hide(); $(".mobile-nav-button").click(function() { $(".main-menu").slideToggle(500); }); }); } else { jQuery(document).ready(function($) { $(".mobile-nav-button").hide(); $(".mobile-cart-button").hide(); }); }
upvote count: 1
type: Question

http://stackoverflow.com/comment/42473314
type: QuestionComment
comment on: http://stackoverflow.com/q/26653847
has text: Hi Barmar, thanks for the responses. Turns out, my question was irrelevant at the end. Without the js iterations, it was doing what the customer wanted it to do. :)
score: 0
type: Comment

http://stackoverflow.com/a/26571911
downvote count: 1
score: 0
has body: When functions are called, where are the method signatures? The closet JavaScript comes to having method signatures is that, when declaring a function, you can name the arguments. function foo (named_argument, another_named_argument) { Arguments are always optional. If you don't specify a value, it will get undefined. You can specify as many arguments as you like and the function can access them through the arguments object. Also, when returning a value of function with parameters like $scope, $element, $attr, are these just place holders for the variables that will be passed? Yes If so, then why do they have such funny names, why not drop the dollar sign? The dollar sign is just a character that is allowed in a JavaScript identifier. Some people use it to indicate that the variable is expected to hold a jQuery object (because jQuery keys all its functionality off a variable called $).
answers question: http://stackoverflow.com/q/26571874
type: Answer
has comment: http://stackoverflow.com/comment/41762011
upvote count: 1

http://stackoverflow.com/a/26573501
downvote count: 0
has comment: http://stackoverflow.com/comment/41765126
accepted answer of: http://stackoverflow.com/q/26573469
type: Answer
answers question: http://stackoverflow.com/q/26573469
has comment: http://stackoverflow.com/comment/41765044
has comment: http://stackoverflow.com/comment/41765179
has body: The result is converted to an integer with the | operator, which is the bitwise OR. From MDN, the first step in computing the result is: The operands are converted to thirty-two-bit integers and expressed by a series of bits (zeros and ones). And because you're ORing with 0, this operation will not change the value of the result (other than the previously mentioned conversion).
has comment: http://stackoverflow.com/comment/41765119
score: 4
has comment: http://stackoverflow.com/comment/41765021
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/41925908
comment on: http://stackoverflow.com/a/26661931
has text: And typeof (new Number(123)) // "object"
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41754086
score: 0
type: Comment
type: QuestionComment
has text: Can you also post HTML?
comment on: http://stackoverflow.com/q/26567531

http://stackoverflow.com/q/26585976
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26591472
has comment: http://stackoverflow.com/comment/41788022
has title: Searching for a value in a column, with multiple values, in Jqgrid
tagged with: jqgrid
tagged with: javascript
has body: Suppose I have a column which contains multiple values e.g Lets say we have a table which contains teacher's Name &amp; departments (comma separated). In which a teacher can belong to many departments. I want to search for the rows which contains the department starting with the letter typed in search field. Right now I am using bw filter which works for only the first entry in the comma separated list (as it takes whole list as a single string).
downvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41787886
favorite count: 0
accepted answer: http://stackoverflow.com/a/26591472
type: AnsweredQuestion

http://stackoverflow.com/q/26531937
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26531938
score: 7
has body: Brief Description Resetting a test server to a known state causes my tests to fail due to Ajax requests launched by DataTables instances being ongoing at the time the server is reset. I'd like to prevent this by stopping the DataTables requests before the server is reset. Detailed Description I have an application in which I use DataTables on some pages. These DataTables all perform server-side queries to populate their tables. When I perform system testing, sometimes there is a race condition that can happen: The test runner starts the test server. The test runner loads in a test browser a page with a DataTable instance somewhere on it. The test runner runs the test, which performs its checks and ends. The test runner resets the test server to a known state for the next test. An alert shows up on the page, saying that DataTables experienced an Ajax error. The alert says: DataTables warning: table id=[some id] - Ajax error. For more information about this error, please see http://datatables.net/tn/7 My testing system, which is not expecting the alert, is confused and registers a failure even though the test was in fact successful. (Or in some cases, it crashes.) I know this happens because the server abruptly interrupted an Ajax request. What I am looking for is a way to prevent the alert from coming up in the first place. I'd like to stop all ongoing DataTables requests before the server is reset. Solutions already rejected Tell the DataTables instances not to use alerts: I want my tests to fail louldly if a DataTables instance runs into an issue that is not related to resetting the test server. Modifying the test server: I prefer to keep the server simple and not worry there about requests that may go unanswered. Wait client-side for all requests to be over: this can slow down tests considerably, especially when this wait is repeated for dozens of tests. Direct the test browser to a new page, without DataTables on it, as this will interrupt the current requests: a…
downvote count: 1
tagged with: system-testing
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/41510360
has title: How can I stop all the currently ongoing Ajax queries that DataTables instance have started?
answer count: 3
has answer: http://stackoverflow.com/a/41510360
has answer: http://stackoverflow.com/a/26531938
tagged with: datatables
tagged with: jquery
has answer: http://stackoverflow.com/a/72975519
favorite count: 0
tagged with: ajax
upvote count: 8

http://stackoverflow.com/comment/41944264
has text: Where are you setting that the divs are draggable? `draggable="true"`
comment on: http://stackoverflow.com/q/26671973
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41787827
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26586298
has text: Why would you create a function with insufficient scope, then make it accessible by binding it to a new way invoking it (`fileDelete` - `file-delete`) which *is* in scope? I'm confused too.
type: QuestionComment

http://stackoverflow.com/comment/41833945
type: AnswerComment
has text: @KishorePaparthi I edited my code again to convert to UTC time try it out let me know what you think.
type: Comment
comment on: http://stackoverflow.com/a/26610463
score: 0

http://stackoverflow.com/q/26578182
tagged with: caching
type: Question
has title: Why isn't my javascript Image() caching in Chrome?
has comment: http://stackoverflow.com/comment/41774344
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I implemented a javascript function that creates and caches an Image() object, allowing images to be preloaded into the browser. When the image finishes loading, it executes a callback function. Here is the code: var sprite; function preloadimage(src, callback) { sprite = new Image(); sprite.onload = callback; sprite.src = src; } Here is how I am calling the function: preloadimage(src,function(){$('#mainimage').attr('src',sprite.src);}); For some reason, this bit of code runs fine on Internet Explorer, but doesn't seem to want to work on Chrome. When preloadimage is called on Chrome, sprite doesn't seem to be cached and changing #mainimage's src causes the browser to temporarily freeze for about half a second as it loads the new image. This is odd, since caching is still enabled on Chrome and other preloading methods, such as hiding the image directly inside of the html using: &lt;img style="position:fixed;height:1px;width:1px" src="imageiwanttopreload"&gt; still work. Is there any way to force Chrome to cache Image objects using jQuery/ Javascript? Does this have something to do with setting up cache-control and max-age? If so, how do I set it up locally? Currently I am not running any server like Apache and am simply running .html files off of my hard drive.
has comment: http://stackoverflow.com/comment/41774876
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41773769
tagged with: image

http://stackoverflow.com/comment/41663501
has text: @ReynierPM try console.log your `$(tableBody).find("input:checkbox")` length first. Probably script doesn't see any
comment on: http://stackoverflow.com/q/26516319
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41863893
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26620481
type: AnswerComment
has text: You could also use `.text(function(d) { return d3.mean(data); });` as another way to get the mean

http://stackoverflow.com/q/26555239
has title: jQuery .show() not working as intended. hides well but does not show
has comment: http://stackoverflow.com/comment/41732306
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26555719
has comment: http://stackoverflow.com/comment/41732350
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26555285
has body: So I have this, after the user clicks on the .item_list it shows what it should, if they click .upload_items li it doesn't do anything. I am very lost as to why. here is the fiddle with more details. too much html to post here $('.upload_items').hide(); $('.item-list').click(function() { $(".upload_items").slideDown(); $('#node_project_form_group_document').show(); $('#edit-field-video').hide(); $('#edit-field-images-upload').hide(); }); $('.upload_items').children('li').eq(1).click(function () { $('#node_project_form_group_document').show(); });
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26555285
accepted answer: http://stackoverflow.com/a/26555719
has comment: http://stackoverflow.com/comment/41732786
has comment: http://stackoverflow.com/comment/41732439
type: AnsweredQuestion

http://stackoverflow.com/comment/41779568
has text: Why not use the [`maxHeight` option](http://wiki.nicedit.com/w/page/515/Configuration%20Options)?
comment on: http://stackoverflow.com/q/26581412
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26650856
accepted answer of: http://stackoverflow.com/q/26650352
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26650352
has body: From what I understand you basically want to communicate between two controllers. The first instinct might be to create a parent scope and bind data to it, but there is a better way, a service. You bind data to this service and it can act as the messenger between your controllers, like so: angular.module('app', []) .factory('Data', dataService) .controller('firstController', firstController) .controller('secondController', secondController); function dataService() { return { message: "I'm data from a service" }; } function firstController($scope, Data) { $scope.data = Data; } function secondController($scope, Data) { $scope.data = Data; } And markup: First controller {{ data.message }} Second controller {{ data.message }} Demo Explained very good at egghead.io
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26657113
has body: I am making a notification system userscript.. Basically what it does, is that it sends a GET request to a site with a .txt file on it. The file outputs like this: 12345|User notification all|Everyone will see this 12345 is the user's ID and all is just set to display the message to everyone. When I write the user's ID (like 12345), it will send a notification to the specific user with the ID 12345, and if I write "all" it will send a notification to everyone. PROBLEM: I have a dismiss button for each of the notifications (because both can be shown at the same time), but when I dismiss both, then send a new notification, both notifications will be shown, even though I dismissed one of them. Here's my code: GM_xmlhttpRequest({ method: "GET", url: "http://website.com/notification.txt", ignoreCache: false, onload: function(response){ res = trim(response.responseText); array = res.split("\n"); for(i = 0; i &lt; array.length; i++) { array2 = array[i].split("|"); if(array2[0] == uid) { userMessage = array2[1]; } if(array2[0] == "all") { allMessage = array2[1]; } } if(typeof userMessage !== 'undefined'){ if(GM_getValue("userMessage") != userMessage) { GM_setValue("userMessage", userMessage); GM_setValue("userDismiss", false); } } if(typeof allMessage !== 'undefined'){ if(GM_getValue("allMessage") != allMessage) { GM_setValue("allMessage", allMessage); GM_setValue("allDismiss", false); } } } }); Look at these two if-statements: if(array2[0] == uid) { if(array2[0] == "all") { That checks if the user ID equals the user's uid (user ID) or if it says all. Then look at these: if(GM_getValue("userMessage") != userMessage) { if(GM_getValue("allMessage") != allMessage) { Those check if the stored message (inside GM_getValue) from previous notifications does not equal the new data it just received. If it's the same, it shouldn't continue, however, if only ONE of the notifications are different, it will say both if-statements are true and then continue. Even though GM_getValue("userM…
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26915476
type: Question
tagged with: userscripts
tagged with: javascript
tagged with: jquery
score: -1
answer count: 1
downvote count: 1
has title: Variable = true even though the if-statement is false
favorite count: 0

http://stackoverflow.com/q/26530690
tagged with: jquery
has comment: http://stackoverflow.com/comment/41687872
has comment: http://stackoverflow.com/comment/41687845
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41688022
tagged with: php
has body: This isn't a duplicate question by any means and I have tried a lot finding solutions.So, please read it before down voting. Background: This application is like a note-taking web app where you can post/delete your notes. Each item in the list has an id which is needed when making a delete call. In my application, I have to delete individual items from a list which is generated by looping over a JSON response (by a REST API) using PHP.The JSON response can be obtained after successful login. Question: To implement delete functionality I have to send id of each of the items as a parameter to the rest api delete call. So, for this I have to generate dynamic links of the form : http://localhost/myfolder/api/notes/:id which should be passed to the delete.php function (Which I have implemented in CURL). I searched for possible ways : Using a PHP function: It seems to be complex, however if there is some way to invoke a PHP function (the delete code using CURL) on click of a link (Which I found not possible as per some answers ?) this could be a great solution. Using Javascript: I have to call a function upon click of link that sets a variable $_SESSION["id"] to the current item["id"] and then goes to delete.php where I use the $_SESSION variable to first set up the link and then use the CURL code. I tried basic implementation using the second approach but I have hit a roadblock in this issue. It would be great if you could tell with a bit of code which approach should be followed or any other way to do this ? This functionality is present in twitter/facebook and almost every such service, how do they implement this, the basic approach should be the same, right: Generate dynamic links and pass them to a php script on click ? Basic Javasript approach : &lt;script&gt; &lt;script&gt; var el = document.getElementById('del1'); el.onclick = del1; function del() { // I have to set $_SESSION here return false; } &lt;/script&gt; echo "&lt;a href=\"delete.php\" title=\"Delete\" id=…
has title: Call a PHP Link with Onclick
tagged with: curl
has comment: http://stackoverflow.com/comment/41688262
has comment: http://stackoverflow.com/comment/41688588
has answer: http://stackoverflow.com/a/26530851
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41688026
has comment: http://stackoverflow.com/comment/41688796
answer count: 1
has comment: http://stackoverflow.com/comment/41687874
tagged with: web

http://stackoverflow.com/q/26536431
has body: Im trying to create an editable table who support the CRUD operations while for editing/delete/create i'll open a pop up dialog to effect these operations. What's important to me is: I'd like to fully customize the table and it's rows (HTML &amp; CSS) I want to implement a dialogs functionality that can be used for CRUD operations Right now i have some mixed solution (i used ng-grid for modals which allows me to control the dialogs html but the table itself can't really be changed as i see it). Anyway it just limits me and i'd be happy if anyone who is experienced with that could describe me an idea of how such requirement should be implemented and in what libraries i should be using?
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26537242
tagged with: modal-dialog
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/52105255
tagged with: angularjs
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/21375073
score: 0
has title: Angular: Creating CRUD editable table with custom html
linked to: http://stackoverflow.com/q/52634511
has comment: http://stackoverflow.com/comment/128778438

http://stackoverflow.com/comment/41746567
type: Comment
comment on: http://stackoverflow.com/q/26563382
type: QuestionComment
has text: There was a typo, If you mean the typo by saying the functions is not recursive, I have edited it. I think if a function calls itself, it is recursive, isn't it?
score: 1

http://stackoverflow.com/a/26537365
answers question: http://stackoverflow.com/q/26536981
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41700563
has body: One solution would be synchronous requests. http://api.jquery.com/jquery.ajax/ look at the async property. $.ajax( "/custom_data/getState/" + type[i], {async: false}).done(...) Another solution would look like this var requestCount = 0; for (i = 0; i &lt; count; i++){ var jqxhr = $.ajax( "/custom_data/getState/" + type[i]).done(function(result) { for (j = 0; j &lt; count; j++){ if(result.type == type[j]){ if(result.value == "GREEN"){ $("#" + type[j]).css("color","#468847"); count_green = count_green + 1; } if(result.value == "YELLOW"){ $("#" + type[j]).css("color","#f89406"); count_yellow = count_yellow + 1; } if(result.value == "RED"){ $("#" + type[j]).css("color","#b94a48"); count_red = count_red + 1; } } } requestFinished(count_green, count_yellow, count_red); }); } function requestFinished(count_green, count_yellow, count_red){ requestCount++; if(requestCount == count){//all requests finished addCounters(count_green, count_yellow, count_red); } }
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26536981

http://stackoverflow.com/a/26590631
has comment: http://stackoverflow.com/comment/41796583
has body: you can preventDefault() on the img $("img").click(function(e){ e.preventDefault(); e.stopPropagation(); console.log("stop click"); }); FIDDLE
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26590541
answers question: http://stackoverflow.com/q/26590541

http://stackoverflow.com/a/26607833
answers question: http://stackoverflow.com/q/26607499
has body: here canvas.height = document.height || document.body.clientHeight; canvas.width = document.width || document.body.clientWidth; you set document in browser size http://www.w3schools.com/js/js_window.asp In case screen.availHeight The availHeight property returns the height of the user's screen, in pixels, minus interface features like the Windows Taskbar. http://www.w3schools.com/jsref/prop_screen_availheight.asp You can use Math.max(window.innerHeight, document.body.clientHeight)
type: Answer
score: 0

http://stackoverflow.com/comment/96758005
comment on: http://stackoverflow.com/a/42664008
has text: This is not working, Please can you provide jsfiddle? Is anything changed recently in HTML5? Thanks
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/139123049
comment on: http://stackoverflow.com/a/51395989
has text: JSON.stringify(obj, (_, v) => v ?? null)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41752945
comment on: http://stackoverflow.com/q/26566940
score: 0
type: QuestionComment
type: Comment
has text: The only other way to have a bunch javascript array key/value pairs that would correlate to ids or something in your table...but that is a dumb idea to load all that just so's not to have to use `AJAX`.

http://stackoverflow.com/comment/41669941
has text: @LoganWayne What do you mean, in the demo it works fine, right? Can you provide additional context?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26520011

http://stackoverflow.com/q/26598378
has body: I have a page that I need to create and not sure how to go about doing the front end. I have two tables, oders and order_details (master/detail) I need to somehow create a couple of search fields, send the query out to the server bring back the orders and display them in a grid type of view. When the user clicks on one of these rows, I can go back to the server, say with the order id, grab the order_details records and display them in the bottom somehow. I can do json, can also return java result sets, but I'm not sure how to go about doing the frontend.. if anybody can point me to jquery examples, or anything along those lines it would be greatly appreciated.
upvote count: 0
tagged with: javascript
tagged with: jquery
downvote count: 4
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: Order master detail for the web
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41811183
score: -4
has answer: http://stackoverflow.com/a/26598825
has comment: http://stackoverflow.com/comment/41811395
type: Question

http://stackoverflow.com/comment/41796616
type: QuestionComment
has text: If you change your error function to: `error: function (xhr, msg, e) { alert(JSON.parse(xhr.responseText).Message); }` .. what do you see?
comment on: http://stackoverflow.com/q/26589646
type: Comment
score: 0

http://stackoverflow.com/a/31813318
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26614641
has body: // $scope.gridApi.grid.cellNav.lastRowCol = null; $scope.gridApi.grid.cellNav.focusedCells = []; var cells = $(".ui-grid-cell"); // var focused = $(".ui-grid-cell-focus"); for (var i = 0; i &lt; cells.length; i++) { var div = $(cells[i].children[0]); div.removeClass('ui-grid-cell-focus'); }

http://stackoverflow.com/comment/41841991
comment on: http://stackoverflow.com/q/26609777
score: 0
type: Comment
type: QuestionComment
has text: No i want modal dialog also at the same time i want to type in textarea

http://stackoverflow.com/a/26517631
has comment: http://stackoverflow.com/comment/41665155
score: 0
answers question: http://stackoverflow.com/q/26517574
type: Answer
has body: I suggest using a loop: for(i in array1){ if(abc === array1[i]){ // do stuff } }

http://stackoverflow.com/comment/71976414
has text: Link is no longer there.
comment on: http://stackoverflow.com/a/26554004
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26618038
score: 0
answers question: http://stackoverflow.com/q/26617719
type: Answer
has body: If you're using jQuery, might as well just use Off() The .off() method removes event handlers that were attached with .on(). Here's the documentation: http://api.jquery.com/off/
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/41675412
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26523437
type: AnswerComment
has text: Your regex is first replacing any non-alphanumeric characters (excluding comma, full stop, and `'`) with `_`, then replacing any `__` with `_`, and then trimming off any `_` at the beginning or end of the string, removing any `/` characters (which would already have been removed in the first regex), and removing `,` and `'`. It looks like the last `replace` was added as an afterthought as it duplicates work that has already been done.

http://stackoverflow.com/comment/41927315
score: 0
comment on: http://stackoverflow.com/q/26661942
type: Comment
type: QuestionComment
has text: i'm sorry but you are limited to what the browser can give you.

http://stackoverflow.com/comment/41737203
score: 0
type: QuestionComment
has text: another consideration is that modifying the DOM is very expensive and slow, so you want to change it as little as possible. if you write out each node like that, you're changing it a ton, and that will almost assuredly take much longer than an optimized DB query would save...
type: Comment
comment on: http://stackoverflow.com/q/26557420

http://stackoverflow.com/a/26629921
type: Answer
answers question: http://stackoverflow.com/q/26629773
score: 0
has body: You can use cookies to save local data for the user, whenever the user adds an item to the list update the local cookie and when the page loads for the first time after a user comes back use an onLoad event to load the items from the cookie into the list. this ofcourse will only be saved on the BROWSER level for that user, meaning if the same user opens the page in a difrent browser or on a difrent device these changes will not be saved. to save info on a global nature you will need server side proccessing.

http://stackoverflow.com/comment/41865893
has text: yeah but i need both either user can do it mannualy or via button click, so animate will not work
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26628127
type: QuestionComment

http://stackoverflow.com/comment/41885230
comment on: http://stackoverflow.com/q/26638774
type: QuestionComment
type: Comment
has text: @TedHopp I can't see any connection to the count of corners in my "equation", it should work starting from `Nc=3`, when the first side starts at `[r, 0]`. Probably it needs some adjusting to get the polygon always to "sit" on a side though.
score: 0

http://stackoverflow.com/a/26609474
has body: In the doc, It says : Route path (matched against $location.path). If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition. Path can contain named groups starting with a colon: e.g. :name. All characters up to the next slash are matched and stored in $routeParams under the given name when the route matches. path can contain named groups starting with a colon and ending with a star: e.g.:name*. All characters are eagerly stored in $routeParams under the given name when the route matches. path can contain optional named groups with a question mark: e.g.:name?. For example, routes like /color/:color/largecode/:largecode*/edit will match /color/brown/largecode/code/with/slashes/edit and extract: So if i use what it says, your code becomes : .when('/prettyPhoto:anyArray/:anyNumber', { redirectTo: '/projects' }) Doc : https://docs.angularjs.org/api/ngRoute/provider/$routeProvider I hope my answer fit you :)
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41832261
score: 1
answers question: http://stackoverflow.com/q/26608235
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26608235

search
tags question: http://stackoverflow.com/q/26587409
tags question: http://stackoverflow.com/q/26538427
type: Tag
tags question: http://stackoverflow.com/q/26609769
tags question: http://stackoverflow.com/q/26624825
tag name: search
tags question: http://stackoverflow.com/q/26528859

http://stackoverflow.com/q/26598376
answer count: 1
tagged with: parsing
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I came across this issue while creating a way to manage cookies in JS. My cookies can contain strings that are in JSON format: var cookieContents = '{"type":"cookie","isLie":true}'; ... or that are just plain strings: var cookieContents = 'The cookie is a lie'; To parse the cookie, I would ideally do JSON.parse(cookieContents). The problem with this is JSON.parse() cannot parse a plain string and throws a fatal error. My question is what is the best/most widely accepted way to handle a situation like this? I have tried using a try/catch statement: var cookie1 = '{"type":"cookie","isLie":true}'; var cookie2 = 'The cookie is a lie'; function parseCookieString(str){ var output; try{ output = JSON.parse(str); } catch(e){ output = str; } console.log(output); } parseCookieString(cookie1); // outputs object parseCookieString(cookie2); // outputs string http://jsfiddle.net/fmpeyton/7w60cesp/ This works perfectly fine, but feels dirty. Maybe because I usually do not handle JS fatal errors. Is it very common to handle fatal errors more gracefully in a scenario like this?
has answer: http://stackoverflow.com/a/26598506
type: Question
has title: Handling exception from unparsable input into JSON.parse()
has comment: http://stackoverflow.com/comment/41811146
tagged with: javascript
score: 0

http://stackoverflow.com/q/26568231
accepted answer: http://stackoverflow.com/a/26568452
has body: I'm using angular to write a web application. I have a topbar with some links, and I would like to apply a css class to the link when it is clicked and to remove this class from the rest of the links. For that I'm using the following code: Home Sign in Login Contact Arena Club And then my controller: app.controller('AppController', ['$scope','$http','menuFactory',function($scope,$http,menuFactory) { var _init=function() { console.log('Starting Init AppController'); $scope.selected=false; console.log('Finished Init AppController'); } $scope.clickedHeaderLink=function(element) { var parentElement=element.$parent; angular.element(parentElement).addClass("active"); } As you can see in my controller I have a function called clickedHeaderLink that is taking the element that is clicked. As I need to apply the style to the 'li' element, I'm taking the parent of the element clicked (in that case 'a'), but it is not working. Something wrong with my code. Any help here would be appreciated. Thanks!!
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41755559
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26568452
type: Question
has comment: http://stackoverflow.com/comment/41755605
has title: How to dynamically change an element's css class with Jquery?
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41701076
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26536941
has text: As far as I know, you can append the img src with a random string to keep it from caching. I suspect that is not the full problem though. eg. src="images/image.jpg?3453452"
score: 0

http://stackoverflow.com/comment/41782814
type: Comment
comment on: http://stackoverflow.com/q/26583417
score: 0
type: QuestionComment
has text: Could you set up a [Plunker](http://plnkr.co/) / [JSFiddle](http://jsfiddle.net/)?

gridview
tags question: http://stackoverflow.com/q/26538888
tags question: http://stackoverflow.com/q/26518162
tags question: http://stackoverflow.com/q/26627420
tags question: http://stackoverflow.com/q/26541369
tag name: gridview
tags question: http://stackoverflow.com/q/26583045
type: Tag
tags question: http://stackoverflow.com/q/26628976
tags question: http://stackoverflow.com/q/26582045
tags question: http://stackoverflow.com/q/26586431

http://stackoverflow.com/comment/41955875
type: AnswerComment
comment on: http://stackoverflow.com/a/26671119
score: 0
type: Comment
has text: Thanks. My model.save() ultimately calls parse.com, fitting your theory about being outside the framework. I thought I had parse apis wrapped in angular promises via a project I found on github, but investigating now, I see that code is not running. Thanks for the tips (thanks also @zrz).

http://stackoverflow.com/comment/41740647
comment on: http://stackoverflow.com/a/26557172
type: Comment
has text: I see. So what I did was to keep a variable that holds the last passed priority, and after each `create` I incremented it and on the next `create` it showed up again. Is there a simpler way? Thanks!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41865127
has text: You have to define the JSONtoTransfer variable before you loop through the object: var JSONtoTransfer = []; for(...) { JSONtoTransfer.push(objectName[indexName].queryAction); }
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26628040

http://stackoverflow.com/a/26536002
has body: It's not by default but you can easily store the info on DOM element if you really need it. I edited the example from Angular docs http://plnkr.co/edit/s4JxOkEBHNsRObBWq1hc?p=preview Look at data-index: [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
type: Answer
answers question: http://stackoverflow.com/q/26535857
accepted answer of: http://stackoverflow.com/q/26535857
has comment: http://stackoverflow.com/comment/41699439
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26618194
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26618394
type: Question
has body: How to Verify my text boxes? This is a JSP page created to take in information. First name should no have Numbers in there, I can enter the name as "103249" and the text box takes it. Also, How do I fix the last name as well? var btn = ""; function validate(myform) { if (btn == "submit") { //Validate Form only on 'submit' button (not for 'clear' button) var num = 0; var message = ""; if(myform.firstname.value == "") { message += "- First Name must be completed \n"; num = 1; } if(myform.lastname.value == "") { message += "- Last Name must be completed \n"; num = 1; } if(myform.dateofbirth.value == "") { message += "- Date of Birth must be completed \n"; num = 1; } //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.gender.length; i++) { if (myform.gender[i].checked) { //Changes value of "g" if a value is selected g = myform.gender[i].value; } } //If no radio button selected, "g" will still = "" if (g == "") { message += "- Gender must be completed \n"; num = 1; } if(myform.gpa.value == "") { message += "- GPA must be completed \n"; num = 1; } //Dropdown if(myform.education.value == "") { message += "- Education must be completed \n"; num = 1; } //Dropdown if(myform.job.value == "") { message += "- Occupation must be completed \n"; num = 1; } //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.married.length; i++) { if (myform.married[i].checked) { //Changes value of "g" if a value is selected g = myform.married[i].value; } } //If no radio button selected, "g" will still = "" if (g == "") { message += "- Married must be completed \n"; num = 1; } //if(myform.spouse.value == "") { //message += "- Spouse must be completed \n"; //num = 1; //} //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.children.length; i++) { if (myform.children[i].checked) { //Changes value of "g" if a value is selected…
answer count: 1
tagged with: jsp
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26618394
has title: Verify Textbox Names

http://stackoverflow.com/comment/41915096
type: QuestionComment
comment on: http://stackoverflow.com/q/26650127
has text: Good point that would probably do it.
score: 0
type: Comment

http://stackoverflow.com/comment/41932306
comment on: http://stackoverflow.com/a/26665132
type: AnswerComment
score: 0
has text: So you don't want to do the redirection after every ajax call. Nice. Then you should do what iSunRise suggested, read the ajax response content, and then "decide" whether you want to do the redirect or not.
type: Comment

http://stackoverflow.com/a/26668708
has body: Here I used -->> http://code.jquery.com/jquery-latest.min.js function getOption(){ var obj = document.getElementById("commentList"); document.getElementById('display2').innerHTML = obj.options[obj.selectedIndex].text ; document.getElementById('display1').innerHTML = obj.options[obj.selectedIndex].value ; } function selectQty(){ $(".qtyClass").change(function(){ var quantity= $(this[this.selectedIndex]).val(); $('.pakQuantity1').html(quantity); $('.pakQuantity2').html(quantity); }); } Add a comment: Choose a Comment Extra Spicy Extra Sugar Alabama Add Quantity: Quantity 1 2 3 4 5 Package: Samsang 4GS Price: 1000 VAT: 15% Quantity: 1 Comment: No Comments Samsang 4GS Name:1000 vat:15 Quantity:1 Commment No:
has comment: http://stackoverflow.com/comment/41949545
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41947104
answers question: http://stackoverflow.com/q/26668543

http://stackoverflow.com/comment/41892084
has text: Okay then. Thank you. Is there a way to exclude repeated events from the list and just show events that have no repeat dates?
type: AnswerComment
comment on: http://stackoverflow.com/a/26616371
score: 0
type: Comment

http://stackoverflow.com/comment/42013200
has text: Is there any specific reason why you check for "firstConfirmButton" to be set?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26654632

http://stackoverflow.com/comment/41752460
comment on: http://stackoverflow.com/a/26566715
score: 1
type: AnswerComment
has text: No. In this case global modifier is redundant. I edited the code.
type: Comment

http://stackoverflow.com/comment/41937533
score: 0
has text: But there are still only 10 elements in the array, therefore making the array length still 10. At least I think....
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26667973

http://stackoverflow.com/comment/71315943
has text: Thank you ! If someone needs previous exe files: https://bitbucket.org/ariya/phantomjs/downloads
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/34613599

http://stackoverflow.com/comment/41813463
type: Comment
type: QuestionComment
has text: I feel like this must be easy to do, but I just can't think of how.
comment on: http://stackoverflow.com/q/26599556
score: 0

http://stackoverflow.com/q/26596109
has comment: http://stackoverflow.com/comment/41891339
has title: jQuery IF statements to calculate fees based on two drop downs and a textbox field
has comment: http://stackoverflow.com/comment/41847824
tagged with: jquery
has comment: http://stackoverflow.com/comment/41847682
has comment: http://stackoverflow.com/comment/41847503
has body: This is an example of a fee calculator that will run a live tally of fees (jQuery) based on what the user selects and answers. I am trying to figure out how to create many IF statements to calculate fees based on two drop downs and a textbox field. What I am trying to accomplish is a jQuery IF function that calculates with an onChange="calculateTotal()" when the user will select there birth month (calculate months) this will calculate how many months from now until there next birthday. But I need to have the IF function based on the vehicle drop down (vehiclebody) and the weight (ew) that is entered those three items will decide the price. Like the examples below and snippet below. For example (three scenarios): [1] if 4-12 months from now is chosen, as well as 2dr vehicle with a weight under 2499 the price will be 28.10 added to the running fee calculator. [2] if 4-12 months from now is chosen, as well as 2dr vehicle with a weight between 2500 and 3499 the price will be 36.10 added to the running fee calculator. [3] if 4-12 months from now is chosen, as well as 2dr vehicle with a weight greater than 3500 the price will be 46.10 added to the running fee calculator. So long story short I want a IF function that calculates onChange="calculateTotal()" and var titleFees = getProofOfOwnership() + (New IF Function); depending on (vehiclebody) chosen &amp; (ew) entered &amp; then IF (monthsToGo) is equal to 4 thru 12 its such and such price. If (monthsToGo) is 1,2,3,13,14,or 15 the price will be prorated so it will have its own price as well. If its 1 month away they require the user to pay for that month and the full year so 13 months, but if its 2 months they let the user choose either 2 months or 14 months same with 3 months or 15 months (as you see on the calculate months drop down) but once it is 4 months (they pay the full amount no matter if its 4-12 months) What is horrible is I will have to figure out like 50 different combinations of this so hopefully it will be …
favorite count: 0
has comment: http://stackoverflow.com/comment/41807376
upvote count: 8
accepted answer: http://stackoverflow.com/a/26702543
has comment: http://stackoverflow.com/comment/41850272
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41847701
has comment: http://stackoverflow.com/comment/41807433
has comment: http://stackoverflow.com/comment/41847667
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41848097
has comment: http://stackoverflow.com/comment/41848082
has comment: http://stackoverflow.com/comment/41847723
has comment: http://stackoverflow.com/comment/41848064
has comment: http://stackoverflow.com/comment/41848653
downvote count: 2
score: 6
has comment: http://stackoverflow.com/comment/41847962
type: Question
possible better answer: http://stackoverflow.com/a/26641775
has comment: http://stackoverflow.com/comment/41850338
has comment: http://stackoverflow.com/comment/41975237
has comment: http://stackoverflow.com/comment/41847839
has comment: http://stackoverflow.com/comment/41807405
has comment: http://stackoverflow.com/comment/41807532
has comment: http://stackoverflow.com/comment/41871893
has comment: http://stackoverflow.com/comment/41848059
has comment: http://stackoverflow.com/comment/41847751
has comment: http://stackoverflow.com/comment/41870370
has answer: http://stackoverflow.com/a/26641775
has answer: http://stackoverflow.com/a/26702543
has comment: http://stackoverflow.com/comment/41847854
has comment: http://stackoverflow.com/comment/41848115
tagged with: javascript
has comment: http://stackoverflow.com/comment/41807266
answer count: 2
has comment: http://stackoverflow.com/comment/41849001

http://stackoverflow.com/comment/41942333
type: QuestionComment
has text: Did you try the pseudo `$j('.brandPagination:eq(xx)')` or `$j('.brandPagination').eq(xx)`?
score: 0
comment on: http://stackoverflow.com/q/26670942
type: Comment

http://stackoverflow.com/a/26578372
has body: I found the error of my ways. It had nothing to do with the code I posted. When I was done creating the canvas, I was using toDataURL with the parameter to create a jpeg rather than a png. When I changed to PNG it worked as desired.
type: Answer
answers question: http://stackoverflow.com/q/26574682
score: 0

http://stackoverflow.com/q/26662761
has comment: http://stackoverflow.com/comment/41927568
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26663651
has comment: http://stackoverflow.com/comment/41928907
has body: I am trying to have a $watch on a scope so I Can listen for changes, however, I do not want the watch to start listening until the data has come in and populated. I am using a $q factory and then to populate the items, then I want the watch to start listening after everything is populated. I can't seem to get down how to control these order of events. SO I have in my controller - //call to the $q factoy to execut all http calls getDefaults.resource.then(function(data){ //fill in scopes with data $scope.allAccounts = data[0].data.accounts; //THEN watch the scope for changes $scope.$watch('selectedResources', function (newValue) { //do action on change here }); } SO I'm wondering if there is any way to control these order of events in angular. Thanks for reading!
has title: Angular, "activate" a watch after data has come in
has comment: http://stackoverflow.com/comment/41927583
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26663651
type: Question
has comment: http://stackoverflow.com/comment/41927931

http://stackoverflow.com/a/26603127
score: 1
has comment: http://stackoverflow.com/comment/41823740
has body: Try this- FIDDLE $(window).on("navigate", function (event, data) { var direction = data.state.direction; if ( !! direction) { alert(direction); } }); Please refer following link. Refer This Or you can use window.history.forward(1); when back button get pressed. But it loads and then redirected not proper way.
has comment: http://stackoverflow.com/comment/41829898
downvote count: 0
has comment: http://stackoverflow.com/comment/41829431
has comment: http://stackoverflow.com/comment/41831458
has comment: http://stackoverflow.com/comment/41857917
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26602874

http://stackoverflow.com/q/26537249
has title: set a cookie clicking a menu link in wordpress
type: UnansweredQuestion
tagged with: cookies
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41704890
has comment: http://stackoverflow.com/comment/41709743
type: Question
has answer: http://stackoverflow.com/a/26549295
tagged with: javascript
score: 0
has body: I need to register a cookie when a specific menu link is clicked (I use this cookie to redirect a mobile user from the mobile version of the site to the desktop version). In a non WP site I just use the onclick attribute to achieve this, like in this example: Desktop version But I'm having trouble doing this in Wordpress due to how the menus are handled, the HTML structure is this (I added the class desktop-redirect using the custom CSS WP menu field). Desktop version I've tried something like this: function setupCookie() { document.cookie = "desktop=true;domain=.mysite.com"; } element.addEventListener("click", setupCookie(),false); var element = document.getElementsByClassname("desktop-redirect")[0].getElementsByTagName("a")[0]; But it doesn't work (the desktop-redirect class is unique to that li element). Thanks in advance.
answer count: 1

http://stackoverflow.com/comment/41762940
comment on: http://stackoverflow.com/a/26572489
type: AnswerComment
score: 0
type: Comment
has text: viewContentLoaded is instead of onload i think .what about onready ?

http://stackoverflow.com/q/26589481
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has title: Dynamic hide/unhide tab regarding a form field value in django template
score: 1
has body: I have a template that renders three forms in tabs. The third form is hidden and I want to dynamically in if a value in a field (having choices via drop down) of the second form is selected. When I select the option b-option on the second form, I want to unhide the third tab. Any ideas? input.html (template) {% csrf_token %} Demographics Diagnosis A_b_sickle {%crispy frm%} {%crispy frm_d%} {%crispy frm_a_b_s%} views.py def input(request): context = RequestContext(request) if request.method == 'POST': my_demographics = DemographicForm(request.POST, prefix="demo") my_diagnosis = DiagnosisForm(request.POST, prefix='diag') my_a_b_sickle= A_b_sickle_thalForm(request.POST,prefix='a_b_s') if my_demographics.is_valid() and my_diagnosis.is_valid() and my_a_b_sickle.is_valid: my_demographics_object = my_demographics.save() my_diagnosis_object = my_diagnosis.save(commit=False) my_diagnosis_object.patient = my_demographics_object my_diagnosis_object.save() my_a_b_sickle_object = my_a_b_sickle.save(commit=False) my_a_b_sickle_object.patient = my_demographics_object my_a_b_sickle_object.save() else: my_demographics = DemographicForm(prefix='demo') my_diagnosis = DiagnosisForm(prefix='diag') my_a_b_sickle= A_b_sickle_thalForm(prefix='a_b_s') return render_to_response('input.html', {'frm':my_demographics, 'frm_d': my_diagnosis, 'frm_a_b_s': my_a_b_sickle}, context) models.py class Diagnosis(models.Model): patient = models.ForeignKey(Demographic) age_of_diagnosis = models.IntegerField(null=True,blank=True) diagnosis_option_value = ( ('a-option', 'a-option'), ('b-option', 'b-option'), ) diagnosis_option = models.CharField( max_length=45,choices=diagnosis_option_value, default=diagnosis_option_value[0][0]) def __str__(self): return str(self.patient) Edit: template code after rendering Diagnosis option* a-option b-option select> Edited: my solution
accepted answer: http://stackoverflow.com/a/26589859
tagged with: django
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26589859
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/26556121
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: Call function from span by icon
favorite count: 0
has comment: http://stackoverflow.com/comment/41734350
possible better answer: http://stackoverflow.com/a/26556322
has answer: http://stackoverflow.com/a/26556322
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41733906
has answer: http://stackoverflow.com/a/26556744
accepted answer: http://stackoverflow.com/a/26556744
has comment: http://stackoverflow.com/comment/41734021
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41733868
score: 0
upvote count: 1
has body: I have some issues with this code here: &lt;script&gt; jQuery(document).ready(function($) { jQuery("#check_in").datepicker({ dateFormat: "yy-m-dd", minDate: 0, showOtherMonths: true, firstDay: 1, onSelect: function( selectedDate ) { jQuery( "#check_out" ).datepicker( "option", "minDate", selectedDate ); }, }); jQuery("#check_out").datepicker({ dateFormat: "yy-m-dd", minDate: 0, showOtherMonths: true, firstDay: 1, onSelect: function( selectedDate ) { jQuery( "#check_in" ).datepicker( "option", "maxDate", selectedDate ); }, }); }); &lt;/script&gt;'; &lt;div class="row_field field_text"&gt; &lt;label class="label_title"&gt;'.__('Check Out','tfuse').'&lt;/label&gt; &lt;input type="text" name="check_out" value="" id="check_out"&gt; &lt;span class="icon icon-calendar"&gt;&lt;/span&gt; &lt;/div&gt; the problem is that I want, when I am clicking on span icon to call the function like it dose from input fields. if someone has any solution please help Sorry but I am not good at Java &amp; jQuery so pleased if you could show me the answer with HTML tags. thanks in advance

http://stackoverflow.com/a/26561538
type: Answer
accepted answer of: http://stackoverflow.com/q/26561028
has comment: http://stackoverflow.com/comment/41748151
answers question: http://stackoverflow.com/q/26561028
has comment: http://stackoverflow.com/comment/41745391
score: 0
type: AcceptedAnswer
has body: Your problem is the way you're using ng-model in your select that's contained in a ng-repeat. The explanation is a bit involved, but I'll try nevertheless. ng-repeat creates a new scope for each of the iterations. Within a single iteration's scope, you then create a select with a ng-model of i. But what you don't realize is that the ng-model binding gets created within that scope, not the parent scope. Now, when you modify the involved collection, ng-repeat retriggers and the child scopes get recreated. Since the value never propagated to the parent scope, it's now lost. You can observe this in action by adding a somewhere. There are a couple of ways to fix this. The general rule of thumb is that you should have a dot in your ng-model, always. Practically this means that your ng-model bindings should refer to a property on an object, like so: ng-model="model.property" and your parent scope should have a property named model. In your case, however, ng-model="involved[$index]" seems like a better choice. The reason for all this has to do with prototypical inheritance. When you create a child scope, it inherits properties from its parent scope, like so: parent.foo = 1; child.foo === 1; // this is true even if nobody sets child.foo However, if you set the value of a child's property, it overrides it only within the child scope: parent.foo = 1; child.foo === 1; // true child.foo = 2; child.foo === 2; // true parent.foo === 1; // still true -- child now has its own, overriding foo property But if you use objects or arrays, things act a bit differently: parent.foo = { bar = 1 }; child.foo.bar === 1; // true child.foo.bar = 2; parent.foo.bar === 2; // true! This might seem a bit surprising, but the reason is actually very simple: the child scope inherits the foo object reference from its parent, and since it's a reference, assignment to one of its properties will propagate everywhere, like they should. And since arrays are also object references, the same …
has comment: http://stackoverflow.com/comment/41744759
has comment: http://stackoverflow.com/comment/41748509

http://stackoverflow.com/q/26610872
possible better answer: http://stackoverflow.com/a/26611045
has comment: http://stackoverflow.com/comment/41834306
has answer: http://stackoverflow.com/a/26611045
has body: I am new to javascript, don't mind if this question seems silly. What is the significance of return keyword in third last line of code when we can omit this? function showName (firstName, lastName) { var nameIntro = "Your name is "; function makeFullName () { alert( nameIntro + firstName + " " + lastName); } return makeFullName(); // here we can omit "return" then also it is functioning same } showName ("Michael", "Jackson");
accepted answer: http://stackoverflow.com/a/26611071
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41834505
answer count: 3
favorite count: 0
has title: Significance of return keyword in javascript
has answer: http://stackoverflow.com/a/26611071
tagged with: return
has comment: http://stackoverflow.com/comment/41834003
upvote count: 2
has comment: http://stackoverflow.com/comment/41834031
downvote count: 2
has answer: http://stackoverflow.com/a/26611097
has comment: http://stackoverflow.com/comment/41833772
has comment: http://stackoverflow.com/comment/41834400
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41833589

http://stackoverflow.com/comment/41893575
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26627211
type: Comment
has text: Just for clarification, would your arrays always be sequential? For example, could you have an array that looks like `[1,2,5,7,10]`? Or, will it always be something like `[0,1,2,3,4,5]`. Also, will it always start with 0? Or, could you have an array that looks like `[2,3,4]`, which outputs `[2,3,4,5,6,7,8,9]` or would it output `[0,1,2,3,4,5,6,7,8,9]`?

http://stackoverflow.com/comment/41839483
has text: But this way your script will not run unless other methods to create call test.js
type: Comment
comment on: http://stackoverflow.com/a/26613820
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41910184
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26653308
has text: @Regent agree it is probably a typo -- i'm sure that both errors would show up in the debug console -- .... if just people would read the error messages instead of asking questions....
type: Comment

http://stackoverflow.com/a/26565583
downvote count: 0
answers question: http://stackoverflow.com/q/26565364
type: Answer
score: 2
has body: I think You have the same names for your methods in app/collections/collection.js
upvote count: 2

http://stackoverflow.com/a/26557172
accepted answer of: http://stackoverflow.com/q/26557107
has body: The id in the create function is specifically for reusing. IDs must be unique. If you use create with an ID of an existing notification, it basically behaves like an update. If a notification exists, it may no longer be shown but only be visible in the Message Center. In this case, the notification IS updated - but not shown again. The API docs specify that you can pass an empty string to the notification to get a unique new id. If you need it, it is passed to the callback. But if you do want to reuse the ID (ensuring that the notification is unique), you can use priority trick to make it show again.
has comment: http://stackoverflow.com/comment/41740647
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/41742395
answers question: http://stackoverflow.com/q/26557107
type: AcceptedAnswer
score: 4

http://stackoverflow.com/comment/41928251
type: Comment
type: QuestionComment
score: 0
has text: Sounds like you should use socket.io chat rooms. They are built in groups of sockets and it's simple to broadcast to everyone in a given chat room and a given socket can be in 0, 1 or more chat rooms as desired. You can read about rooms here: http://socket.io/docs/rooms-and-namespaces/
comment on: http://stackoverflow.com/q/26662976

http://stackoverflow.com/comment/41740369
comment on: http://stackoverflow.com/a/26559482
score: 0
type: Comment
has text: I tried, it works, thank you,But actually in controller if I removed the AM.store, just use stores: [ 'Users' ], it will work fine. I just think it's two weird why it cannot work if I add the Am.store
type: AnswerComment

http://stackoverflow.com/comment/41726353
score: 0
type: Comment
has text: But is it possible to achieve it with subscriptions? I have already this observable in my autogenerated viewmodel and if possible I wouldn't like to change that observable into computed.
type: AnswerComment
comment on: http://stackoverflow.com/a/26547751

http://stackoverflow.com/a/26530998
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26530286
type: AcceptedAnswer
has body: Here you find a cached version of the page cached version there you find the link to the Github page with the source you should definatly write the developers that their site delivers server error and if you have the script you should host the file on your own
downvote count: 0
answers question: http://stackoverflow.com/q/26530286

http://stackoverflow.com/q/26514935
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41739189
tagged with: http://stackoverflow.com/tag/html
has title: search result of other website
has body: I tried doing the method form action="http://www.domain.com/search" method="GET" target="_blank" it work with some website but it doesnt work with and i m new to this. can anyone explain me how it work ?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41660186
has comment: http://stackoverflow.com/comment/41659975
answer count: 0
has comment: http://stackoverflow.com/comment/41659701
has comment: http://stackoverflow.com/comment/41659796
tagged with: forms
has comment: http://stackoverflow.com/comment/41660612
type: Question
has comment: http://stackoverflow.com/comment/41659792

http://stackoverflow.com/comment/41885939
score: 0
has text: You don't seem to be doing anything to reconnect nodes there. It sounds like you'd want to check, for nodes that have no connections left, which node is closest and add a new connection to that. Besides, that example has the same problem as yours here where the node and link variables are overwritten.
comment on: http://stackoverflow.com/a/26635719
type: AnswerComment
type: Comment

http://stackoverflow.com/a/45991504
answers question: http://stackoverflow.com/q/26614368
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26614368
score: 3
has body: Using GWT 2.8 JsInterop with MapBox GL JS goes like this: Add the css and js on your index page as per MapBox Tutorial Make the mapboxgl.Map available to your Java: @JsType(isNative = true, namespace = "mapboxgl") class Map { @JsOverlay private static long serial = 0L; @JsConstructor protected Map(JavaScriptObject options) { } @JsOverlay public static Map build(AbsolutePanel panel) { return Map.build(panel, new JSONObject()); } @JsOverlay public static Map build(AbsolutePanel panel, JSONObject mapOptions) { String id = "map" + serial++; mapOptions.put("container", new JSONString(id)); panel.getElement().setId(id); Map result = new Map(mapOptions.getJavaScriptObject()); return result; } } Later on you can add other Methods, Properties, Events to your Map class Use the parameter JSONObject mapOptions to set your map properties, for example: { center: [-122.420679, 37.772537], zoom: 13, style: 'mapbox://styles/mapbox/dark-v9' } Create a class that extends AbsolutePanel to become your Map Widget public class MapPanel extends AbsolutePanel { private static boolean accessTokenIsSet = false; Map map; JSONObject mapOptions; MapPanel instance; public MapPanel(int width, int height) { this(width, height, new MapOptions()); } public MapPanel(int width, int height, JSONObject mapOptions) { instance = this; this.mapOptions = mapOptions; if ( !accessTokenIsSet ) { setAccessToken(); accessTokenIsSet = true; } getElement().getStyle().setWidth(width, Unit.PX); getElement().getStyle().setHeight(height, Unit.PX); this.addEvents(); } private void addEvents() { addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if ( event.isAttached() ) { map = Map.build(instance, mapOptions); } } }); } private static native void setAccessToken() /*-{ mapboxgl.accessToken = '&lt;your-key&gt;'; }-*/; } Instantiate your MapPanel widget and add wherever needed JSONObject mapOptions = new JSONObject(); JSONArray center = new JSONArray(); center.set(0, ne…
upvote count: 3
has comment: http://stackoverflow.com/comment/133465371
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41953227
score: 0
type: Comment
type: QuestionComment
has text: I did: I've noticed that the method is not specified in the @RequestMapping, and the default is GET.
comment on: http://stackoverflow.com/q/26671281

http://stackoverflow.com/comment/41868311
comment on: http://stackoverflow.com/a/26629819
score: 0
type: AnswerComment
type: Comment
has text: Actually, in my browser your fiddle behaves as I expect. Which is my point about the differences in how it looks vs. the calculations used to determine how the box model renders.

http://stackoverflow.com/a/26594551
has body: I was able to find the solution to my own problem here. Thought I would post just in case someone else has a similar issue. My responsive JavaScript has 2 functions per screen size. I had something like this: function tabletInit() { // add jQuery that is supposed to fire within these constraints function mobileNavInit() { var submenus = $('.main-navigation .children'); submenus.each(function() { var parentLink = $(this).prev(), parentHref = parentLink.attr('href'), overview = ' Overview '; $(overview).prependTo($(this)); }); } $('.main-navigation .menu > ul > li > a, .main-navigation .menu > ul > li > ul > li:has(ul) > a').on('click', function(event) { event.preventDefault(); }); } function tabletClear() { // undo or 'unbind()' anything that should be cancelled out if tablet is sized above $(overview)unbind('prependTo'); $('.main-navigation .menu > ul > li > a, .main-navigation .menu > ul > li > ul > li:has(ul) > a').unbind('click'); } The interference was one the unbinding of the overview function. Though the unbinding was performing as needed, it ended up interfering with some of the other JavaScript. So I simply changed it to: $('.overview, .overview2').remove();
answers question: http://stackoverflow.com/q/26590855
accepted answer of: http://stackoverflow.com/q/26590855
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/41908736
comment on: http://stackoverflow.com/a/26652663
type: Comment
score: 2
has text: _"make it support modern browsers"_? You mean it would be a huge undertaking to install modern browsers? Installing chrome really isn't that much work. Just keep in mind the `querySelector` does _not_ work in IE7. (There basically isn't a decent way to do this in IE7)
type: AnswerComment

http://stackoverflow.com/q/26549320
tagged with: jquery
type: Question
has title: Select element and subsequent text
has comment: http://stackoverflow.com/comment/41721606
favorite count: 0
upvote count: 2
answer count: 1
has body: I'm having following markup: Boy Girl Twins How can I select each radio button and it's subsequent text. My goal is to wrap both in a label, so the output would be: Boy Girl Twins Unfortunately, the markup is created by a CMS. (It also adds id="sex" multiple times, blergh).
has answer: http://stackoverflow.com/a/26549423
accepted answer: http://stackoverflow.com/a/26549423
has comment: http://stackoverflow.com/comment/41721232
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41756247
type: QuestionComment
score: 0
has text: I working on local host
comment on: http://stackoverflow.com/q/26568305
type: Comment

http://stackoverflow.com/a/26546757
score: 3
answers question: http://stackoverflow.com/q/26545549
downvote count: 0
type: Answer
upvote count: 3
has body: Okay, this is going to be mostly speculation but I'll try and reason through it. The ECMAScript specification (which is currently down) states the following for the bind function (emphasis my own): 15.3.4.5 Function.prototype.bind (thisArg [, arg1 [, arg2, …]]) The bind method takes one or more arguments, thisArg and (optionally) arg1, arg2, etc, and returns a new function object by performing the following steps: Let Target be the this value. If IsCallable(Target) is false, throw a TypeError exception. Let A be a new (possibly empty) internal list of all of the argument values provided after thisArg (arg1, arg2 etc), in order. Let F be a new native ECMAScript object . Set all the internal methods, except for Get, of F as specified in 8.12. Set the Get internal property of F as specified in 15.3.5.4. Set the TargetFunction internal property of F to Target. Set the BoundThis internal property of F to the value of thisArg. Set the BoundArgs internal property of F to A. Set the Class internal property of F to "Function". Set the Prototype internal property of F to the standard built-in Function prototype object as specified in 15.3.3.1. Set the Call internal property of F as described in 15.3.4.5.1. Set the Construct internal property of F as described in 15.3.4.5.2. Set the HasInstance internal property of F as described in 15.3.4.5.3. If the Class internal property of Target is "Function", then a. Let L be the length property of Target minus the length of A. b. Set the length own property of F to either 0 or L, whichever is larger. Else set the length own property of F to 0. Set the attributes of the length own property of F to the values specified in 15.3.5.1. Set the Extensible internal property of F to true. Let thrower be the ThrowTypeError function Object (13.2.3). Call the DefineOwnProperty internal method of F with arguments "caller", PropertyDescriptor {Get: thrower, Set: thrower, Enumerable:…

http://stackoverflow.com/q/26595464
answer count: 1
accepted answer: http://stackoverflow.com/a/26595563
has title: Wait for animation of multiple elements to end?
type: AnsweredQuestion
score: 0
has body: I'm building a collapsable list, when a user clicks on an item I collapse all other items before expanding the clicked item. I want to wait until all elements are collapsed to expand the item but I don't know how to do it. (right not it all happens simultaneusly) How can I wait until all items collapse before running the rest of the code? $(".content").slideUp(); This is what I'm trying: $(".content").slideUp(function () { alert("done"); });
type: Question
has answer: http://stackoverflow.com/a/26595563
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26641211
has body: You can solve this problem with jQuery.queue(), here's how you can do it: var queue = $({}); var deferreds = []; Plant.prototype.pullCoordinatesFromDB = function(dfd){ var $this = this; console.log("pulling farm coords for: "+$this.address); $.ajax({ type: "POST", data: { address: $this.address }, url: "actions/getCoordinates.php" }).always(function(){ console.log("request sent"); }).fail(function(jqXHR, textStatus, errorThrown){ console.log("failed"); console.log(textStatus); console.log(errorThrown); }).done(function(data){ console.log("got farm coords"); if(data.numRows){ $this.latCoord = data.latCoord; $this.lngCoord = data.lngCoord; } else{ queue.delay(5000).queue(function(next){ $this.pullCoordinatesFromAPI(); dfd.resolve(); next(); }); } }); return 1; }; var plants = [Plant, Plant, ...]; for(var i = 0; i &lt; plants.length; ++i){ var dfd = new $.Deferred(); plants[i].pullCoordinatesFromDB(); deferreds.push(dfd); } $.when.apply(null, deferreds).done(YOUR_CALLBACK_FUNCTION); EDIT: Added deferreds to see when all calls from api are done.
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41920622
has comment: http://stackoverflow.com/comment/41923551
accepted answer of: http://stackoverflow.com/q/26615184
has comment: http://stackoverflow.com/comment/41928713
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26615184

http://stackoverflow.com/a/26595960
answers question: http://stackoverflow.com/q/26595857
upvote count: 1
has comment: http://stackoverflow.com/comment/41819159
has comment: http://stackoverflow.com/comment/41816434
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41810340
has comment: http://stackoverflow.com/comment/41810512
has body: Web API already uses Newtonsoft serializer, so you need only to configure it. Add these lines to WebApiConfig.Register method: var json = GlobalConfiguration.Configuration.Formatters.JsonFormatter; json.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); And return IEnumerable&lt;Contact&gt; instead of the string, please take a look at this sample project https://github.com/maxbrodin/camel-case-serialization-webapi Edited
type: Answer
accepted answer of: http://stackoverflow.com/q/26595857
has comment: http://stackoverflow.com/comment/41806993
has comment: http://stackoverflow.com/comment/41839274

http://stackoverflow.com/q/26573152
accepted answer: http://stackoverflow.com/a/26573738
has title: node.js crypto module cannot encrypt 16+ characters
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: node.js
favorite count: 0
tagged with: encryption
upvote count: 1
has body: I am still rather new to all the terminology around cryptology, so please excuse my ignorance on the subject. I am having something strange happening when using node.js' crypto module. It will encrypt exactly 16 characters only. Any more and it fails with this error message: TypeError: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt at Decipher.Cipher.final (crypto.js:292:27) at decrypt (C:\node_apps\crypto_test\app.js:39:21) at C:\node_apps\crypto_test\app.js:16:21 at Interface._onLine (readline.js:200:5) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.emit (events.js:98:17) at emitKey (readline.js:1095:12) at ReadStream.onData (readline.js:840:14) The code I am using looks like this: var rl = require('readline'); var crypto =require('crypto'); var interface = rl.createInterface({ input: process.stdin, output:process.stdout }); interface.question('Enter text to encrypt: ',function(texto){ var encrypted = encrypt(texto); console.log('Encrypted text:',encrypted); console.log('Decrypting text...'); var decrypted = decrypt(encrypted); console.log('Decrypted text:',decrypted); process.exit(); }); function encrypt(text) { var cipher =crypto.createCipher('aes192','password'); text = text.toString('utf8'); cipher.update(text); return cipher.final('binary'); } function decrypt(text) { var decipher = crypto.createDecipher('aes192','password'); decipher.update(text,'binary','utf8'); return decipher.final('utf8'); } Why does this not encrypt more than 16 characters? Is it because of the algorithm I am using? How can I encrypt something without caring how long it is?
tagged with: node-crypto
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26573738
type: Question

http://stackoverflow.com/q/26657308
tagged with: design-patterns
has body: Say I got this JS code function Parent(){} Parent.prototype.do = function(){ // Get here the Child(1|2)'s class name } function Child1(){} Child.prototype = new Parent(); function Child2(){} Grandson.prototype = new Parent(); Child1.do(); Child2.do(); I know that there was a (currently deprecated) "caller" info within arguments. How can this be done? Is this a common pattern of doing things in JavaScript, or is it an anti-pattern? How is usually done this type of stuff?
type: Question
has title: Get the child who called parent's method in JavaScript
tagged with: javascript
has comment: http://stackoverflow.com/comment/41932236
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26657781
linked to: http://stackoverflow.com/q/16063394
accepted answer: http://stackoverflow.com/a/26657781
type: AnsweredQuestion

http://stackoverflow.com/q/26565544
type: AnsweredQuestion
has body: I'm trying to use three.js to import and render an object I made. Everything was find, I even succeded to apply a wireframe texture. But i wanted to apply a Point cloud texture (here) but either it just display a color on my object either i get an error like writte non the tittle my code is like that var loader = new THREE.OBJLoader( manager ); loader.load( 'obj/moimeme2.obj', function ( object ) { object.traverse( function ( child ) { if ( child instanceof THREE.Mesh ) { child.material = new THREE.PointCloudMaterial( {color: 0x6FF060 } ); } } ); /*object.scale.y = 5; object.scale.x = 5; object.scale.z = 5;*/ scene.add( object ); }, onProgress, onError ); I'm kinda a beginner in JS and i don't really get what is the problem this Thank you for reading !
type: Question
has answer: http://stackoverflow.com/a/26565602
accepted answer: http://stackoverflow.com/a/26565602
tagged with: javascript
has title: ThreeJS - OBJLoader "Cannot read property 'uniforms' of undefined
score: 0
answer count: 1
tagged with: loader
tagged with: three.js

http://stackoverflow.com/comment/41766139
score: 0
comment on: http://stackoverflow.com/q/26574240
type: Comment
type: QuestionComment
has text: use getTime on a date object. var d = new Date; d.getTime()

http://stackoverflow.com/comment/41757982
comment on: http://stackoverflow.com/q/26569513
has text: And that's just fine. That's what's I want. But it isn't replacing the second string (considering that the first should be gone when the time to replace the second comes). Also, the replace result on the first one is some sort of mix of two values from the `fgana` array. If you look closely, the desired value to replace the latter 時 is different from the former. By doing .split followed by .join I manage to replace both of them, but the result is still a mismatch because of the weird issue of two values from `fgana` being used.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41911839
type: Comment
comment on: http://stackoverflow.com/a/26654481
has text: @Pointy you are right but its not working as i apply styling to print and screen media
type: AnswerComment
score: 0

http://stackoverflow.com/a/26652495
accepted answer of: http://stackoverflow.com/q/26652403
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26652403
has body: doSomething() needs a return statement. The last line should be: return formValidation();
type: Answer

http://stackoverflow.com/comment/42193440
has text: @stempler By looking at example I think it is not possible to make the parameterized state a sticky one. Or am I wrong? I'd like to make `order/1` first state, `order/2` other state and so on, but dynamically. I mean, I don't know what number of orders do I have. Do you think that's possible with Sticky States?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26591335
type: QuestionComment

list
tags question: http://stackoverflow.com/q/26526279
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/26654487

http://stackoverflow.com/a/26759697
has comment: http://stackoverflow.com/comment/42392926
type: Answer
has comment: http://stackoverflow.com/comment/42260457
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42200162
answers question: http://stackoverflow.com/q/26615158
upvote count: 1
has body: Looks like perhaps you have used the sourcefile, rather than the compiled version of gridster. Did you download from GitHub? Use dist/jquery.gridster.min.js, rather than src/jquery.gridster.js For future reference, the version in src/ is for use when being compiled by Grunt.

http://stackoverflow.com/q/26519665
answer count: 1
tagged with: javascript
has title: Is this an acceptable practice or convention of parenthesis use?
accepted answer: http://stackoverflow.com/a/26521195
tagged with: convention
has comment: http://stackoverflow.com/comment/41670825
has body: return (zS.value*0.1).toPrecision(3); I'm curious if wrapping parenthesis around this return statement follows best practices or if there is a more correct way, such as making the zS.value*0.1 a variable. Does it even matter?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41668893
type: Question
has comment: http://stackoverflow.com/comment/41668991
has answer: http://stackoverflow.com/a/26521195
score: 0
tagged with: canvas

http://stackoverflow.com/q/26576773
has comment: http://stackoverflow.com/comment/41771311
has title: JQuery how to capture enter key or double click on select->option tag
type: AnsweredQuestion
has body: Lets say i have this html: option 1 option 2 option 3 option 4 and this is my js: $('select').on('dblclick',function(){ alert('something'); }); it's working fine when i double click on an item, but it's not working after navigating using UP/Down keys and then pressing Enter key. what is the solution? I have used size attrib in select so i have a list now Fiddle
type: Question
has answer: http://stackoverflow.com/a/26576795
has comment: http://stackoverflow.com/comment/41771233
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26576795
tagged with: http://stackoverflow.com/tag/html
score: 0

http://stackoverflow.com/q/26565070
tagged with: javascript-objects
has answer: http://stackoverflow.com/a/26565457
has title: JavaScript copying object arrays
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
has body: I tried copying an array of objects and i failed terribly. Every time I ended up with an array of references to original aray. I tried ".concat()", I used "for" copying every element separately, but every time I made change in temporary array, original array changed too. Here's the code. Glossary: tablicaZnacznikow - original array placeholder - temporary array tempClosest - id of closest marker startingPointID - id of marker from witch i start calculation .meta field - defines if marker has been added to polyline var placeholder = tablicaZnacznikow.concat(); var tempArrayOfSomething = [placeholder[startingPointID].latLng]; for (var i = 0; i &lt; placeholder.length; i++) { var tempClosest = findClosestMarkerToAnotherMarker(placeholder, startingPointID); tempArrayOfSomething.push(placeholder[tempClosest].latLng); startingPointID = tempClosest; placeholder[tempClosest].meta = "USED"; console.log(tempClosest); } I use this code to make an array for making a path for gMap3 polyline. Thanks in advance.
answer count: 2
has comment: http://stackoverflow.com/comment/41749439
tagged with: arrays
tagged with: jquery-gmap3
tagged with: javascript
linked to: http://stackoverflow.com/q/728360
favorite count: 0
accepted answer: http://stackoverflow.com/a/26565145
possible better answer: http://stackoverflow.com/a/26565457
linked to: http://stackoverflow.com/q/122102
has answer: http://stackoverflow.com/a/26565145

http://stackoverflow.com/comment/41894314
score: 0
type: AnswerComment
type: Comment
has text: The md5 plugin you are using has a note at the top of it. // depends on: utf8_encode. It is throwing a javascript error which means your return false never gets called. If you include the above encoding, the md5 script wont error and the page will not submit. Does the snippet not work for you? what browser are you using?
comment on: http://stackoverflow.com/a/26620262

http://stackoverflow.com/q/26539437
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I'm doing a type ahead style form that has a ng-model of findSearchValue and when the user types in the input I watch this and when it updates I fire off the search function. The issue that I'm having is when a user types a word (for example Spaceship) the function fires off 9 requests for Spaceship; 1 for each letter in the word. I tried using a timeout, but all this does is wait 900ms and then fires off all 9 requests. What would ensure that the request is only fired after the user has stopped typing for a given amount of time. Here is my current code: $scope.findSearchValue = ''; $scope.getFindResults = function(findSearchValue) { if ($scope.findSearchValue.length &gt; 2) { $timeout(function(){ $http.get('/search.json?term=' + $scope.findSearchValue).success(function(data) { $scope.findResults = data; $scope.showSearchResults = true; }); }, 900); } else { $scope.showSearchResults = false; } }; $scope.$watch('findSearchValue', function(newValue, oldValue) { if (newValue !== oldValue) { $scope.getFindResults(); } }); Also, I know there are plenty of directives that handle this use case. I do not feel like installing a large directive just to do something so small. Thanks
has answer: http://stackoverflow.com/a/26553118
tagged with: angular-ui-typeahead
type: Question
accepted answer: http://stackoverflow.com/a/26539472
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26539472
upvote count: 1
has title: Using $timeout to limit the amount of http request that go out in Angularjs 1.2 Search app
possible better answer: http://stackoverflow.com/a/26553118
tagged with: angularjs-ng-repeat
favorite count: 0

http://stackoverflow.com/comment/43652743
type: QuestionComment
comment on: http://stackoverflow.com/q/26603536
has text: i see no error in console
score: 0
type: Comment

http://stackoverflow.com/a/26625253
has body: You will need to extend the bounds using all the latlngs as shown below. var latlngbound = new google.maps.LatLngBounds(); for (i = 0; i &lt; locations.length; i++) { // CREATE LATLNG OBJECT AND USE IT TO EXTEND THE LATLNGBOUNDS var latlng = new google.maps.LatLng(locations[i].latitude, locations[i].longitude); latlngbound .extend(latlong); marker = new google.maps.Marker({ position: latlng, map: map, animation: google.maps.Animation.DROP, icon: {size: new google.maps.Size(30, 30), scaledSize: new google.maps.Size(30, 30), url: locations[i].iprofilephoto,} }); And in the end you need to fit the bounds to the map. map.fitBounds(latlngbounds);
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26624515
type: Answer
accepted answer of: http://stackoverflow.com/q/26624515
upvote count: 1

http://stackoverflow.com/comment/41867581
has text: Why would you remove the overflow?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26629506
score: 0

http://stackoverflow.com/comment/41884938
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26636857
has text: I chose to go with this solution as it is fairly easy to understand the relationship of the scope as well as it fits my situation perfectly. Thanks for the help!!
score: 0

http://stackoverflow.com/a/26555319
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26535825
answers question: http://stackoverflow.com/q/26535825
has body: $.post('getuser.php' This syntax is exclusive to a javascript library called jQuery. Furthermore, $q is not an integer it is a string considering the DB query you perform initially, so why are you wrapping $_GET['q'] with intval()?
type: Answer
has comment: http://stackoverflow.com/comment/41732419

http://stackoverflow.com/q/26562768
score: -1
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26563135
possible better answer: http://stackoverflow.com/a/26563069
has answer: http://stackoverflow.com/a/26563069
has body: I have a problem with my image centering in jquery tab. I have created this DEMO from codepen.io . If you click my DEMO page then you see 1.Tab , 2.Tab and 3.Tab and there is 1.Tab is active. 1.Tab image centering is working but if you click 2.Tab and 3.Tab then you see image centering is not working. What i need to do here anyone can help me ? I am using this css code for img: .img { float:left; width:310px; height:180px; overflow:hidden; } .img img { width:100%; -webkit-transition: -webkit-transform 0.5s ease; -moz-transition: -moz-transform 0.5s ease; -webkit-backface-visibility: hidden; } .img:hover img { -webkit-transform:scale(1.25); /* Safari and Chrome */ -moz-transform:scale(1.25); /* Firefox */ -ms-transform:scale(1.25); /* IE 9 */ -o-transform:scale(1.25); /* Opera */ transform:scale(1.25); } Not: I think this is not css problem.
tagged with: css
type: AnsweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41745705
type: Question
has answer: http://stackoverflow.com/a/26563135
has title: Jquery and CSS image centering not working in tab
tagged with: javascript

http://stackoverflow.com/comment/41974519
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26680937
has text: That's kind of the same as Franco's answer, but I would have to write another class. Since I can write in class Socket directly, I'm not sure how using is helping
type: AnswerComment

http://stackoverflow.com/q/26653621
tagged with: http://stackoverflow.com/tag/csv
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: excel
type: Question
has answer: http://stackoverflow.com/a/26654584
has body: I have several HTML tables that I want to allow the user to export its content to a csv. I currently have this solution implemented and it almost works perfectly: function exportTableToCsv($table, filename) { var $rows = $table.find('tr:has(td,th)'), tmpColDelim = String.fromCharCode(11), tmpRowDelim = String.fromCharCode(0), colDelim = ' ', rowDelim = '"\r\n"', csv = '"' + $rows.map(function (i, row) { var $row = $(row), $cols = $row.find('td,th'); return $cols.map(function (j, col) { var $col = $(col), text = $col.text(); return text.replace('"', '""'); }).get().join(tmpColDelim); }).get().join(tmpRowDelim) .split(tmpRowDelim).join(rowDelim) .split(tmpColDelim).join(colDelim) + ' ', // Data URI csvData = 'data:application/csv;charset=utf-8,' + encodeURIComponent(csv); $(this) .attr({ 'download': filename, 'href': csvData, 'target': '_blank' }); } Which I call like this: $(".ExportSummary").on('click', function () { exportTableToCsv.apply(this, [$('#SummaryTable'), 'ExportSummary.csv']); }); Fiddle Example Now, my issue is that I cannot get the string formatting to work by putting the &lt;td&gt; in separate cells in Excel. I simply don't know how to get the text to be placed in separated cells since it is being mapped together into a whole string content. I want the desired output that is provided with this JsFiddle - but this solution does not provide the ability to choose filename and setting the appropiate content-type (application/csv) to be recognized by the browser. Any help is appreciated. Thanks in advance!
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Export table to CSV - string formatting issue into separate cells
accepted answer: http://stackoverflow.com/a/26654584

http://stackoverflow.com/q/26568380
type: UnansweredQuestion
has body: How to encode the url in this case: http://jsfiddle.net/spem/c89r1vu1/4/ Isto é um teste HP Q1292-67026
has title: How to encode the url in Javascript
has answer: http://stackoverflow.com/a/26568400
type: Question
tagged with: urlencode
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/46953146
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26537720
score: 9
upvote count: 9
has body: To remove a record. var db = firebase.database(); var ref = db.ref(); var survey=db.ref(path+'/'+path); //Eg path is company/employee survey.child(key).remove(); //Eg key is employee id

http://stackoverflow.com/a/26589458
score: 1
downvote count: 0
type: Answer
has body: You have to understand the prototype-based inheritance here. var Manager = function() { this.user = []; } var manager = new Manager(); These lines will define a Manager constructor function and create a new object. When you call the new Manager(), what happens is: a new, empty, object is created: {}. the code inside the constructor will run with this new, empty, object being the value of this. So, it will set the user property of the new object ({}) to be an empty array. the __proto__ property of the new object will be set to the value of Manager.prototype. So, this happens without you seeing: manager.__proto__ = Manager.prototype. Then, you want to define new methods on your prototype objects, using the inheritance. Keep in mind that the prototype is a plain JS object. Not a constructor, but an object. So every object created from the Manager function will have its __proto__ property set to the same object. Then, you start defining new methods on the prototype object, like the filters function. When you, later, call manager.filters(), it will first look up its own properties for the filters function and won't find it. So, then, it will go for its prototype properties, and there if will find it. manager will then run the filters function that was defined on the prototype, but using itself (manager) as the context, as the this inside the function. So, to use your user property inside the filters function, all you have to do is: Manager.prototype.filters = function () { this.user = ...; } Manager.prototype.filters_main = function () { this.user = ...; } and you'll be manipulating the same user property defined when the object was constructed.
answers question: http://stackoverflow.com/q/26589210
upvote count: 1

http://stackoverflow.com/comment/41693177
type: AnswerComment
type: Comment
has text: you are the best! Thank you so much. I was breaking my head trying to find a solution.
comment on: http://stackoverflow.com/a/26530730
score: 0

http://stackoverflow.com/a/26583911
has body: I would use a chain of setTimeouts instead of setIntervals here: var i = 1; setTimeout(function tOutFunc() { setTimeout(function() { document.getElementById("box-" + i).className = document.getElementById("box-" + i).className.replace ( /(?:^|\s)hide(?!\S)/g , '' ) }, i == 3 ? 10000 : 1000); i++ }, 1000);
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26582971

http://stackoverflow.com/comment/41839168
type: QuestionComment
has text: @adeneo: I can use other element also like div etc.Yes it is third party script but it is loading from same doamin.
comment on: http://stackoverflow.com/q/26613526
score: 0
type: Comment

http://stackoverflow.com/q/26625942
tagged with: jquery
has comment: http://stackoverflow.com/comment/41861388
has comment: http://stackoverflow.com/comment/62362251
has body: I want to add ellipsis in the dropdown list options if I click the ellipsis able to see the full option values for example, dropdown list looking like this One - A long text need to be cut off with ellipsis Two - A long text need to be cut off with ellipsis I am expecting the output like as follows One - A long option.... Two - A long option.... when clicking the ellipses able to see the full option values like One - A long text need to be cut off with ellipsis Please see the code which I done so far John Smith,1019 Your Company PO Box 7169 Poole BH15 9EL 91 Western Road,Brighton PO Box 7169 East Sussex England BN1 2NWL John Smith,1019 Your Company PO Box 7169 Poole BH15 9EL Please help me to get the expected result as above
has comment: http://stackoverflow.com/comment/41864530
linked to: http://stackoverflow.com/q/7289769
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41861176
has title: set dropdown list option with ellipses
has comment: http://stackoverflow.com/comment/41862190
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41864581
has comment: http://stackoverflow.com/comment/41863452
tagged with: css
has answer: http://stackoverflow.com/a/26626619
has answer: http://stackoverflow.com/a/47669580
score: 0
has answer: http://stackoverflow.com/a/26627224
type: Question
tagged with: javascript

http://stackoverflow.com/a/26647044
has comment: http://stackoverflow.com/comment/75872498
has body: Try this. mob-1 mob-2 mob-3
downvote count: 0
answers question: http://stackoverflow.com/q/26646591
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/26671899
has comment: http://stackoverflow.com/comment/41945658
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I want to replace the standard menu(on wordpress) with a menu i created(http://jsfiddle.net/nxy9jkdx/1/). Im new to using wordpress and still learning. I was wondering if anyone could take me through what files i edit and how i go about adding my own code. http://jsfiddle.net/nxy9jkdx/1/ (code) Ive managed to do it! heres the code! <?php _e('Menu', 'themify'); ?> The only problem is that when a link in the menu is clicked i want to run the js function: closemenu(). can anyone guide me to what file and code i should be editing to achieve this.
has comment: http://stackoverflow.com/comment/41944443
answer count: 0
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41944625
type: Question
has comment: http://stackoverflow.com/comment/41948731
tagged with: javascript
has comment: http://stackoverflow.com/comment/41944897
score: 0
has title: Adding own menu function to wordpress theme

http://stackoverflow.com/q/26604260
type: AnsweredQuestion
score: 1
type: Question
tagged with: datagrid
tagged with: javascript
has title: Javascript to find a hidden field value in a datagrid
answer count: 1
downvote count: 0
has body: I have a an asp:DataGrid which has columns and also another asp:DataGrid nested inside it. This shows my data correctly. I have been asked to change things so that the data in the nested datagrid is displayed as links, so that when selected, the associated file content is shown. Shown below is part of the markup. It shows the nested datagrid, a hidden field and the filename shown as a link. I have a javascript function (not shown) called “viewFile” that does the showing of the file which it is expecting to be passed a fileId. When a link is selected my viewField function is called but the fileId is not passed to it. I am assuming that the javascript “javascript:viewFile($('#hdFileId').val()” is not finding the hidden field. Can anyone advise if I am doing this wrong or can they help with providing the correct javascript? <asp:TemplateColumn HeaderText="Files" > <asp:DataGrid ID="dgFileList" runat="server" AutoGenerateColumns="false" ShowHeader="False" GridLines="None"> <asp:TemplateColumn> <asp:HiddenField runat="server" ID="hdFileId" Value='<%# DataBinder.Eval(Container.DataItem, "FileId") %>'/> <%# DataBinder.Eval(Container.DataItem, "FileName") %> </asp:TemplateColumn> </asp:DataGrid> ====EDIT===================== Here is the whole section of markup for the datagrid: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <asp:DataGrid AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" AllowCustomPaging="True" Width="90%" CellPadding="2" CellSpacing="2" DataKeyField="AccountNumber" UseAccessibleHeader="true" GridLines="None" HeaderStyle-CssClass="grid_header" ID="dgFileView" OnItemCommand="dgFileView_OnItemCommand" OnItemDataBound="dgFileList_ItemDataBound" OnPageIndexChanged="MyDataGrid_Page" runat="server" ShowHeaderWhenEmpty="True" PageSize="18" PagerStyle-Mode="NumericPages" PagerStyle-PageButtonCount="20" PagerStyle-ForeColor="Navy" PagerStyle-HorizontalAlign="right" ItemStyle-VerticalAlign="top"> <asp:TemplateColumn HeaderText="Company" SortExpre…
has answer: http://stackoverflow.com/a/26604378
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/26604378
upvote count: 1

http://stackoverflow.com/comment/41931398
score: 0
type: Comment
has text: @rhino Thank you for that information, I only tested it in FF33. Truth be told, I created the code in VB.NET and then translated it to JS.
comment on: http://stackoverflow.com/a/26662625
type: AnswerComment

http://stackoverflow.com/comment/41823154
type: Comment
has text: `javascript:` links are pretty much always evil. Please, on behalf of your users, don't use them!
score: 0
comment on: http://stackoverflow.com/q/26605170
type: QuestionComment

http://stackoverflow.com/comment/41937440
score: 1
has text: if the argument itself is [1, 2, 3], arguments[arguments.length-1] will return [1, 2, 3], not the values inside
type: AnswerComment
comment on: http://stackoverflow.com/a/26667571
type: Comment

http://stackoverflow.com/q/26618609
downvote count: 0
score: 1
tagged with: meteor
favorite count: 0
tagged with: iron-router
type: Question
has body: (Meteor) So I was working in my project and I realized that if you navigate to http://localhost:3000/signup in my application everything works fine, but if you go to http://localhost:3000/signup/ all my images are not found (url its broke), I just added the / at the end of the url, I would like to know how to solve this, I don't know if this is relate to iron-router or to Meteor. Im just using a really simple route code: Router.route('/signup',function(){ users.init(); this.render('signupUser'); }); I wanna solve it because I can see people writing the url on the browser nav input and adding the / at the end of the url. I know you can solve it via redirect (which I dont want to do it, cause I have to validate all my others links as well), so how to solve it? why its this happening? -- EDIT -- I know that I could solve the problem with location.href I did something similar to solve the problem of the // on the homepage. if(window.location.pathname === "//"){ location.href = "/"; } I dont think this is a good way to solve this problem. suggestion accept.
has title: images not found because `/` its added at the end of the URL
upvote count: 1
has answer: http://stackoverflow.com/a/26618850
tagged with: javascript
type: UnansweredQuestion
answer count: 1

http://stackoverflow.com/a/26626171
has body: Follow these steps : &lt;input type="text" id="name" ng-model="nameTxt"/&gt; &lt;input ng-click="add()" type="submit"/&gt; $scope.add = function (){ $scope.customers.push({"id":$scope.customers.length,"name":nameTxt,"age":"---fill---"}); };
has comment: http://stackoverflow.com/comment/41861698
type: Answer
has comment: http://stackoverflow.com/comment/41862041
has comment: http://stackoverflow.com/comment/41861890
answers question: http://stackoverflow.com/q/26626107
has comment: http://stackoverflow.com/comment/41862166
score: 0

http://stackoverflow.com/q/26538068
score: 1
has comment: http://stackoverflow.com/comment/41701839
upvote count: 1
possible better answer: http://stackoverflow.com/a/26538276
type: Question
has answer: http://stackoverflow.com/a/26538293
has body: I have such button in form: &lt;button class="delete-file-btn" "&gt;&lt;img src="/img/del.png"/&gt;&lt;/button&gt; Then I attach event via jQuery: $('#Form').on('click', 'button.delete-file-btn', function(e) { // Some code here }); When I press the button in Crome, e.target points at img element, but not button. What's wrong with event assignment? in FF everything works fine.
tagged with: javascript
tagged with: jquery
has title: jQuery: Event is attached to button, but fires at image element inside button in Chrome
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26538293
favorite count: 0
has comment: http://stackoverflow.com/comment/41701778
has comment: http://stackoverflow.com/comment/41701816
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26538276

http://stackoverflow.com/a/26580904
has comment: http://stackoverflow.com/comment/42208662
accepted answer of: http://stackoverflow.com/q/26565908
type: Answer
has body: See this: http://jsfiddle.net/moizhb/rLwaytnp/ All you need is to subscribe the click event and call setZoom on(dom.byId("zoomInBtn"), "click", function(evt){map.setZoom(map.getZoom()+1);}); on(dom.byId("zoomOutBtn"), "click", function(evt){map.setZoom(map.getZoom()-1);});
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26565908

http://stackoverflow.com/q/26548431
has comment: http://stackoverflow.com/comment/41723231
type: Question
has comment: http://stackoverflow.com/comment/41719737
has answer: http://stackoverflow.com/a/26548666
tagged with: javascript
score: -3
has comment: http://stackoverflow.com/comment/41719605
downvote count: 4
tagged with: bookmarklet
accepted answer: http://stackoverflow.com/a/26548666
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41719689
has comment: http://stackoverflow.com/comment/46152077
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41719544
type: AnsweredQuestion
has body: I have a webpage which I am experimenting with, where the user has to have a specific bookmarklet from another one of my sites to continue the game. This bookmarklet adds code to the tag, and enables the user to continue. The problem is that I am having trouble making the bookmarklet, since I am fairly new at using javascript. Can anyone help me with this?
has comment: http://stackoverflow.com/comment/41719589
has title: Javascript code to add HTML code to body tag

http://stackoverflow.com/q/26665256
type: Question
tagged with: mongodb
answer count: 1
tagged with: mongoose
has answer: http://stackoverflow.com/a/26666182
tagged with: javascript
tagged with: express
score: 0
has comment: http://stackoverflow.com/comment/41932382
tagged with: node.js
has body: I'm very new to express/mongo stack, so the question is pretty simple, couldn't find anything on stackoverflow which would resolve my problem, so here it is: I have a index.js file which looks more or less like this: var mongoose = require('mongoose'); // Connections var developmentDb = 'mongodb://localhost/admin'; var usedDb; // If we're in development... if (process.env.NODE_ENV === 'development') { // set our database to the development one usedDb = developmentDb; // connect to it via mongoose mongoose.connect(usedDb); } // get an instance of our connection to our database var db = mongoose.connection; db.once('open', function callback () { console.log('Databsae Connection Successfully Opened at ' + usedDb); }); module.exports = db; Then I'm requireing it in my express route like this: var express = require('express'); var router = express.Router(); var db = require('../../database'); /* GET users listing. */ router.get('/', function(req, res) { var users = db.collection('users'); var test = users.find(); res.send(test); }); module.exports = router; I'm sending request and the result I'm getting is 'undefined' so nothing is returned from the back end. Db connection is 100% correct and works. I'm not entirely sure, do I have to have a schema definition on express side, or is it possible to query any data, without knowing the schema?
has title: Get mongodb collection with node
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41932502

http://stackoverflow.com/comment/41927648
has text: try moving your var declarations inside your function. They are executing when the page renders, then not updated when you are executing your function (best guess w/o full source).
score: 1
comment on: http://stackoverflow.com/q/26662798
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26633541
type: Question
has answer: http://stackoverflow.com/a/26633668
tagged with: javascript
has body: the page in question: t.whstonecabinet.com The element in question is the the module title "Counter Top" Under the slideshow image, I want this title to be thicker. From the developer tools, I can see the font-weight style is governed by a delcaration h1,h2,h3,h4,h5,h6{font-weight:normal}, so I tried to add font-weight:bold into element.style. But it seems nothing changes to the title. I also check it with javascript: $('h2.title&gt;div')[0].style.fontWeight returns '', so I do $('h2.title&gt;div')[0].style.fontWeight='bold' It turns out this is equivalent to directly write the style into element.style. So I'm stuck here, why font-weight:bold won't affect this element? Besides, when I use javascript to check this element's fontWeight property, it returns a empty string. I understand that indicates the style isn't set explicitly, but how can I get a computed style of an element using javascript even it is not set?
has comment: http://stackoverflow.com/comment/41874963
has answer: http://stackoverflow.com/a/26633731
accepted answer: http://stackoverflow.com/a/26633731
score: 0
has comment: http://stackoverflow.com/comment/41874834
answer count: 4
has title: why font-weight is not working on some elements, and side questions
possible better answer: http://stackoverflow.com/a/26633668
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41875008
has answer: http://stackoverflow.com/a/26634055
has answer: http://stackoverflow.com/a/26633846

http://stackoverflow.com/comment/41848214
has text: please also tag the question with the programming language OR program using regex OR regex-flavor
score: 1
comment on: http://stackoverflow.com/q/26618363
type: Comment
type: QuestionComment

http://stackoverflow.com/a/30246610
has body: Add tinyMCE.init { ... ... apply_source_formatting : false }
score: 0
answers question: http://stackoverflow.com/q/26647305
type: Answer

http://stackoverflow.com/q/26532546
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26533328
tagged with: javascript
score: 2
has comment: http://stackoverflow.com/comment/41691764
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41692165
has title: Game restart Javascript/Jquery
has body: I am trying to make a restart button on the Game Over Menu, I have a fadein for the game over screen when it touches and obstacle. Every time you hit retry it hides it, problem is that it is still touching it, so how could i reset the whole game so he is not touching it? Below is some code that I have tryed but did not work because the player is still frozen. $('#levelOne').animate({ 'margin-top': '-=1520px' }); And here is a link: http://jsfiddle.net/38bod36e/86/
has comment: http://stackoverflow.com/comment/41691712
upvote count: 2

http://stackoverflow.com/q/26668734
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41939401
favorite count: 0
has body: I'm trying to write a spell-check script. Let's say I have a keyed list of 10 English words: var wordList = { "moas" : "moas", "moat" : "moat", "moated" : "moated", "moating" : "moating", "moatlike" : "moatlike", "moats" : "moats", "mob" : "mob", "mobbed" : "mobbed", "mobber" : "mobber", "mobbers" : "mobbers", } and one misspelled word: "motelike" which I want to correct from the word list by finding the most similar word. If the closest word has a similarity above a certain threshold, I'll replace it. I could put something together that loops through all of the words and checks each letter for a match, but that would be monstrously expensive to process when my dictionary is > 200,000 items). I think there must be a way to target the word's possible matches more efficiently than looping the whole array with the advantage of having a keyed list. I can't think of how to go about doing this. It seems like it shouldn't be that hard, but I'm drawing a blank on how to get it done. Maybe something with regex involved?
has comment: http://stackoverflow.com/comment/41938528
tagged with: dictionary
tagged with: regex
accepted answer: http://stackoverflow.com/a/26669370
has comment: http://stackoverflow.com/comment/41939315
has title: How can I check for word similarity from a list in JavaScript (without looping through an entire dictionary)?
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26669370

http://stackoverflow.com/q/26544469
has body: JS $(function(){ $('.fadein img:gt(0)').hide(); setInterval(function(){ $('.fadein :first-child').fadeOut(1000) .next('img').fadeIn(1000) .end().appendTo('.fadein');}, 5000); }); HTML &lt;div class="fadein"&gt; &lt;img src="IMG 1.."&gt; &lt;img src="IMG 2.."&gt; /div&gt; This works fine but the moment when I add &lt;a href="LINK" target="_blank"&gt;&lt;img src="IMG 3..."&gt;&lt;/a&gt; The IMG 3... dissapears for some reason ? Could anyone explain why and provide me a solution for it ?
type: Question
has comment: http://stackoverflow.com/comment/41712588
has comment: http://stackoverflow.com/comment/41712985
answer count: 2
downvote count: 0
tagged with: hyperlink
tagged with: javascript
has answer: http://stackoverflow.com/a/26544692
possible better answer: http://stackoverflow.com/a/26544510
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26544510
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/26544692
has title: Image dissapears when using a href
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/26640373
tagged with: streaming
tagged with: php
has comment: http://stackoverflow.com/comment/41893644
answer count: 0
has body: I am trying to read a mp3 stream on iOS. This is my code : { } and the javascript script is : $('audio,video').mediaelementplayer(); On FireFox it is working very well, but Safari, Chrome, IE nothing ! and no error. On my iPad, Safari refresh the page because there is an error ! of course I had loaded jquery first ! I beleive the stream is "correct" because Firefox is reading it ! I made it with php, the header is header("Content-Type: audio/mp3"); Could somebody help me ! please ! Thank you !
tagged with: http://stackoverflow.com/tag/mp3
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/10688588
score: 0
tagged with: mediaelement.js
has comment: http://stackoverflow.com/comment/41887693
has comment: http://stackoverflow.com/comment/45453014
type: UnansweredQuestion
has title: with MediaElement.js how to streaming mp3

http://stackoverflow.com/comment/41677108
has text: Under what circumstance will putting a ``\`` character in to the mix make a browser render a line break instead of showing a less than sign, a b, a r and then a greater than sign? You appear to be trying to solve the problem opposite to the one that the OP is having… for a language that isn't HTML.
comment on: http://stackoverflow.com/a/26524543
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26667827
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26801197
score: 0
has title: Intel XDK service function not returning
tagged with: angularjs
tagged with: web-services
tagged with: intel-xdk
has answer: http://stackoverflow.com/a/26801197
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42164351
has body: This is my function $scope.login=function(username,password){ intel.xdk.services.login({"userID":username,"password":password}) .then(function (response) { if(response.statusMessage=="Successful"){ console.log(response.statusMessage); $scope.go('/Home'); } else { $scope.errorMessage = response.statusMessage; } }); }; The log is printing Successful message but the go function not working. If I use go function outside of service function its working. Go function $scope.go = function (path) { $location.path(path); };
type: Question
has comment: http://stackoverflow.com/comment/42161511

http://stackoverflow.com/comment/46846297
score: 0
type: Comment
type: QuestionComment
has text: ping check my answer :)
comment on: http://stackoverflow.com/q/26626186

http://stackoverflow.com/q/26621999
has body: I'm trying to get an element to change its class to one with a different height attribute to make a reveal effect. I'm just getting an error which says uncaught type error undefined is not a function. html - 1 2 3 see more Javascript - $(".btnRetract").on("click", function() { var $content = $("#rollup"); switchClasses($content); return false; function switchClasses($content){ if($content.hasClass("header-container")){ $content.switchClass("header-container", "header-container-retracted"); } else { $content.switchClass("header-container-retracted", "header-container"); } } CSS - .header-container { border-bottom: 20px solid #e44d26; height: 90vh; position:relative; } .header-container-retracted { border-bottom: 20px solid #e44d26; height: 20vh; position:relative; }
answer count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26622097
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26629858
type: Question
has comment: http://stackoverflow.com/comment/41854459
has comment: http://stackoverflow.com/comment/41854430
tagged with: javascript
tagged with: jquery
has title: trying to use jQuery switchClass to create a reveal animation
score: 0
has answer: http://stackoverflow.com/a/26622058

http://stackoverflow.com/q/26566019
tagged with: jqgrid
has answer: http://stackoverflow.com/a/26571545
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has title: Server push jqgrid
has body: I have jqgrid displaying some data which is coming from a remote service. Initially we show static data but on click of refresh button we have to load fresh data. The remote service is an async operation. Now my question is how to update the grid when I receive the response. How can I push the data back to client browser. I don't want to use polling mechanism.
type: Question

http://stackoverflow.com/q/26600705
score: -1
tagged with: post
upvote count: 0
answer count: 1
tagged with: asynchronous
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/41815582
has comment: http://stackoverflow.com/comment/41815438
has body: Here's my JS var req = new XMLHttpRequest(); req.open('POST','/some-location',true); req.send("A string to be processed server-side"); var resp = req.responseText; Trouble is, it just doesn't work. Whenever I use console.log(resp) to see the response, it's an empty string. But when I change the second line to req.open('POST','/some-location',false);, resp is the processed result. I don't want to set async to false, though. Is there a plan Javascript way to see what I'm doing wrong?
has title: XMLHttpRequest doesn't work asynchronously
has answer: http://stackoverflow.com/a/26603625
downvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/26628987
tagged with: javascript
answer count: 3
downvote count: 0
score: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26629031
has answer: http://stackoverflow.com/a/26629416
favorite count: 0
has title: detect height of element through attribute javascript
possible better answer: http://stackoverflow.com/a/26629416
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26629120
has body: I have a div that has a certain attribute. Is it possible to give this attribute the height of my element dynamically? for example: HTML OUTPUT
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26629031

http://stackoverflow.com/comment/41788617
type: QuestionComment
has text: Apparently is not the enclosed function, but running "asynchronously".. a part when using plain XHR instead, which works almost the expected way (although request is still done twice)
score: 0
comment on: http://stackoverflow.com/q/26586454
type: Comment

http://stackoverflow.com/comment/42173331
has text: ... just... wow. Many humble thanks - can't believe you went to all the effort of making a little box so I can test it out. I'm blown away that you'd go to so much trouble, even to go away, think about it, then come back to it! Really, really grateful Jack. There's no WAY I would have sussed that on my own. Thanks. Researched and understand the pop method, the concat method and have also realised that if I spent more time going through my Definitive Guide I'd have more chance at being able to do things like this by myself!
comment on: http://stackoverflow.com/a/26770553
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/41917162
score: 0
type: Comment
has text: I don't think anyone can help unless you at least tell us what `qry` you are passing to this.
type: QuestionComment
comment on: http://stackoverflow.com/q/26657356

http://stackoverflow.com/comment/41824243
type: Comment
type: QuestionComment
has text: RouteConfig.cs hasn't been touched - just the vanilla version generated for the solution by VS. Not sure what you mean by this not being mvc though...
score: 0
comment on: http://stackoverflow.com/q/26605549

http://stackoverflow.com/q/26558016
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26558762
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26558762
has title: Bootstrap dismiss on click
tagged with: twitter-bootstrap
score: 0
has body: I have the following input, which appears on click and disappears on the next click: Hello However, I only want the popup to disappear on the next click if the person is not clicking on the box. Here is what I have so far:

http://stackoverflow.com/q/26590129
type: AnsweredQuestion
score: 1
has body: I have a template, which gets data from a service. The data in the service are updated by a directive. After the data gets updated, it won´t be updated in the template. // In my template {{service.get()}} // In my service .service('service', function($http){ var _val = 5; return{ get:function(){ return val; }, set:function(val){ _val = val; } }; }); // In my directive var someDirective = angular.module('app.someDirective',[]); someDirective.directive('someDirective', ['service', function(service) { return function(scope, element, attrs){ $(element).on('scroll', function(event){ service.set(15); }); }; }]); If I call service.set(x) in any other place (like an other controller) it works 100% fine. Maybe somebody knows, what I did wrong. (Thanks very much) Edit To make it a bit more clear: When the pages load, '5' is displayed (correctly). But when the value should be updated, the service.set()-function is called correctly (from the directive), but nothing changes in the template. If I call service.set() anywere else, it works (value is updated in template).
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26590348
has answer: http://stackoverflow.com/a/26590343
possible better answer: http://stackoverflow.com/a/26590348
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26590343
upvote count: 1
has title: AngularJS: Data from service is not updated

http://stackoverflow.com/q/26624527
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: Get Elements using class prefix name in IE BHO using c#?
tagged with: bho
type: Question
answer count: 1
score: 0
has body: i am working in IE Plugin using BHO.i want to get a element using class prefix(starting) name.i have already done it in javascript and jquery. var myClass = $('[class^="ii gt"]'); and var myClass = $(document).find('div[class^="ii gt"]'); So,the same thing i want to get in IE browser using C# BHO.How can i achieve it? note: the above class name may be like ii gt aaa or ii gt bbb sss
tagged with: c#
has answer: http://stackoverflow.com/a/26624667
tagged with: internet-explorer

http://stackoverflow.com/comment/41814330
has text: IMHO if you use a word like "best" you should clarify the fitness criteria you are using to make that subjective judgement.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26597969

http://stackoverflow.com/a/26615471
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/26606256
upvote count: 3
has body: This seems to work: var xlUp = -4162; var sheet = objExcel.Workbooks.Open(filePath).ActiveSheet; alert(sheet.cells(sheet.rows.count,1).end(xlUp).row);
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26606256

http://stackoverflow.com/a/26684260
type: AcceptedAnswer
has body: The solution described in "Get belongsTo ID without fetching record" seems to work as of Ember Data 1.0.0-beta.10. Briefly, you can do the following to access the underlying modelInstance.get('data.belongsToRelation.id'); Presumably you can also do this (though I have not tested it): modelInstance.get('data.hasManyRelation'); Original Answer (DO NOT USE): I have accomplished this on a belongsTo by adding a second model field for the id. My example: App.User = DS.Model.extend({ group: DS.belongsTo('group', { async: true }), groupId: DS.attr('number') }); So maybe you can do this? App.User = DS.Model.extend({ shipments: DS.hasMany('shipment', { async: true }), shipmentIds: DS.attr('array') }); You will need to add an array transform in app/transforms/array.js (assuming you use ember-cli) import DS from 'ember-data'; var ArrayTransform = DS.Transform.extend({ deserialize: function(serialized) { return serialized; }, serialize: function(deserialized) { return deserialized; } }); export default ArrayTransform; Let me know if it works as I probably will need to something similar in my app soon.
has comment: http://stackoverflow.com/comment/42797353
accepted answer of: http://stackoverflow.com/q/26517897
answers question: http://stackoverflow.com/q/26517897
has comment: http://stackoverflow.com/comment/42872344
type: Answer
has comment: http://stackoverflow.com/comment/41977025
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42580521
has comment: http://stackoverflow.com/comment/42181318
upvote count: 2
has comment: http://stackoverflow.com/comment/42682717

http://stackoverflow.com/a/26567649
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26567581
accepted answer of: http://stackoverflow.com/q/26567581
has comment: http://stackoverflow.com/comment/41754303
type: Answer
has body: You can use the exec() method in a loop, pushing the match result of the captured group to the results array. If the string has no square brackets, you will get an empty matches array [] returned. var str = 'I [have] strings that [are] like this.' var re = /\[([^\]]*)]/g, matches = []; while (m = re.exec(str)) { matches.push(m[1]); } console.log(matches) //=&gt; [ 'have', 'are' ] Note: This will only work correctly if the brackets are balanced, will not perform on nested brackets.

http://stackoverflow.com/comment/41673931
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26522420
has text: @KingKing yes, you are right, I just want to see the solid white color~
score: 0

http://stackoverflow.com/q/26619162
tagged with: javascript
tagged with: http://stackoverflow.com/tag/r
tagged with: shiny
upvote count: 7
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26690543
type: AnsweredQuestion
downvote count: 0
score: 7
tagged with: twitter
has title: How can I embed a twitter timeline in a Shiny app
has answer: http://stackoverflow.com/a/26690543
type: Question
has body: I am keen to embed a twitter timeline as part of a Shiny App. I have got the relevant code snippet Soccer I have created a twitter.js file (the above minus the script tags ) and a ui.R as below library(shiny) shinyUI(fluidPage( tags$head(includeScript("twitter.js")), titlePanel(""), sidebarLayout( sidebarPanel( ), mainPanel( a("Soccer", class="twitter-timeline", href="https://twitter.com/pssGuy/timelines/524678699061641216", data-widget-id="524686407298596864") ) ) )) This produces an error ERROR: C:\Users\pssguy\Documents\R\testGoogleTwitter/ui.R:19:124: unexpected '=' 18: mainPanel( 19: a("Soccer", class="twitter-timeline", href="https://twitter.com/pssGuy/timelines/524678699061641216", data-widget-id= If I omit the data-widget-id="524686407298596864", I get a link which, when clicked on, opens a browser window with the correct timeline One thing I have noticed is that the script given is not quite the same as that in twitters development tutorial https://dev.twitter.com/web/embedded-timelines TIA

http://stackoverflow.com/comment/41668892
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26519786
has text: I tried this one, the same problem. Anyway thanks for your answer
type: AnswerComment

http://stackoverflow.com/comment/41729271
comment on: http://stackoverflow.com/q/26551933
has text: By the way, I tried changing $self.trigger("reloadGrid"); to $self.trigger("location.reload ()"); but that just makes the new row disappear until I refresh the page manually using F5. (I also tried resetForm() and got the same results)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41722095
type: AnswerComment
has text: I just realized that what I said about the .toggleClass() is not needed for the css implementation. are the stars you are displaying their own html elements? You might want to try to ensure that they stay inline by: `.stars{overflow:hidden;}` and maybe setting a fixed height.
comment on: http://stackoverflow.com/a/26540431
type: Comment
score: 1

http://stackoverflow.com/comment/42189729
type: Comment
comment on: http://stackoverflow.com/a/26770553
has text: Thanks @HenryDavidTHROW. The `||` operator is used to pass in the max value on recursive calls (otherwise, we'd recalculate the `sum` and get a different value each time). It could have been global, but it's nice to minimize those! `arguments` is an object in JS specific to a function. When a function is defined, you also define the parameters. However, in JS, it's not required to call your function with all of the arguments (or, you can pass additional arguments to your your function - or `varargs`).When you pass additional arguments, the question becomes: How do you access those?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26532712
has comment: http://stackoverflow.com/comment/41692119
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41692202
has comment: http://stackoverflow.com/comment/41692274
has body: The first does the same things. If the strings are different lengths, it will return false. Then it checks to see if the characters are the same at the same indices. However, it is implemented at the JS implementation level, so it is running as fast as C, C++, Java or whatever language the JavaScript implementation is written in.
has comment: http://stackoverflow.com/comment/41692406
upvote count: 2
answers question: http://stackoverflow.com/q/26532550
downvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26532550

http://stackoverflow.com/comment/41890486
score: 0
comment on: http://stackoverflow.com/a/26641545
has text: I didn't downvote.. Someones gone through all the answers and doing it
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41740392
score: 0
has text: Is it posible to have data attribute in your HTML ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26559854

http://stackoverflow.com/a/26612802
upvote count: 1
has comment: http://stackoverflow.com/comment/41859557
accepted answer of: http://stackoverflow.com/q/26612627
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26612627
has body: If you can rely on the Angular attributes always being in the form ng-xyz="...", you can do it like this: str = str.replace(/\bng-[^\s]+="[^"]*"/g, ''); If some are in single quotes, you can follow up with a second replace: str = str.replace(/\bng-[^\s]+='[^']*'/g, ''); Obviously that's a big "if," but it's the kind of "if" that you have to have if you want to manipulate SGML-like markup with regular expressions, which fundamentally you can't really do. Example: var str = '&lt;rect fill="#F9B24F" ry="5" rx="5" ng-attr-y="{{node.rectY}}" ng-attr-x="{{node.rectX}}" ng-attr-height="{{chart.height}}" ng-attr-width="{{chart.width}}" y="10" x="20" height="80" width="160"&gt;'; display("Before: " + str); str = str.replace(/\bng-[^\s]+="[^"]*"/g, ''); display("After: " + str); function display(msg) { var p = document.createElement('p'); p.innerHTML = String(msg).replace(/&amp;/g, "&amp;amp;").replace(/&lt;/g, "&amp;lt;"); document.body.appendChild(p); }
score: 1

http://stackoverflow.com/q/26561924
accepted answer: http://stackoverflow.com/a/26562005
has body: I am trying to make text appear on an image when you hover over it. I've tried a few different ways but none seem to work, or work reliably. I am writing my code in HTML with jQuery, please show me what to do! :D $(document).ready(function() { $('img').css('height', '150px'); $('img').css('width', '150px'); $('img').css('padding', '10px'); $('img').css('border-radius', '30px'); $('#container').css('width', '1040px'); $('#container').css('margin-left', 'auto'); $('#container').css('margin-right', 'auto'); }) $(document).ready(function() { $('img').click(function() { $('#container').append(" It worked chaps "); }); }); It worked
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/26562026
has title: Text over image jQuery
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26562005
favorite count: 0
has comment: http://stackoverflow.com/comment/41744840
answer count: 3
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26561979
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26561979

http://stackoverflow.com/q/26594454
tagged with: ajax
score: 0
has body: See the following code snippet: $("#someid").autocomplete({ source: function (req, resp) { $.ajax({ url: "/api/someapi", type: "GET", dataType: "json", data: { id: req.someid }, beforeSend : function() { }, success: function (data) { resp($.map(data, function (item) { return { label: "&lt;div class='result'&gt;" + item.name + "&lt;/div&gt;", value: item.Name, emailName: item.EmailName }; })); } } }); }); My questions are listed below: the source of ajax call is a function - function(req, resp) - does jQuery accept a function with two parameters as source data provider? Is this by default? Can any one explain the function after success:? Basically, I could get that it uses the data from ajax response; map each data to one item with some css decoration. But my question is: what's the goal of wrapping $.map with resp? We can see that there're a couple of callbacks in this code snippet. However, since I'm pretty new to jQuery, I wonder how to determine how many parameters to pass into each callback, say after source: we can have a callback with two parameters; after $.map, we can have another callback with only one parameter ?
has answer: http://stackoverflow.com/a/26594587
type: AnsweredQuestion
has title: Jquery questions about callback of ajax
accepted answer: http://stackoverflow.com/a/26594587
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/26589089
tag name: google-fusion-tables

http://stackoverflow.com/comment/41873334
comment on: http://stackoverflow.com/q/26632636
score: 3
has text: assuming you're doing a full-blown round-trip to the server and back with the form, e.g. completely rebuilding the page, then your page rebuild would have to include any added rows at that time as well. otherwise you'll just be back to where you started.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26566042
has answer: http://stackoverflow.com/a/26566142
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41761945
linked to: http://stackoverflow.com/q/16063394
tagged with: prototype-programming
type: Question
has title: Sub.prototype = new Base() vs Sub.prototype = Base.prototype
accepted answer: http://stackoverflow.com/a/26566162
has answer: http://stackoverflow.com/a/26572024
upvote count: 4
downvote count: 0
tagged with: javascript
has body: There are many resources online about JavaScript prototyping and inheritance. Most of which use code similar to this: function Base() {} function Sub() {} with inheritance implemented like this: Sub.prototype = new Base(); But I am wondering what is wrong with inheritance implemented this way instead: Sub.prototype = Base.prototype; It seems like the second is working just as well. The only two differences that I've spotted (which IMO are advantages of the second approach) are: there is one less dummy instantiation of Base, which is obviously better as the instance is never used anyway inspecting instances shows that the first approach produces two nested __proto__ properties whereas the second only single one, which makes the instance cleaner. The latter is illustrated in below code snippet: function Base(){} Base.prototype.bogus = function(){}; function SubNew(){} function SubProto(){} SubNew.prototype = new Base(); SubProto.prototype = Base.prototype; var sn = new SubNew(); var sp = new SubProto(); console.log(sn); console.log(sp); gives: But I'm under the impression that I'm missing some very important point here. My question is: what is the case against the second approach?
possible better answer: http://stackoverflow.com/a/26566097
tagged with: inheritance
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26566097
linked to: http://stackoverflow.com/q/19790839
answer count: 5
has answer: http://stackoverflow.com/a/26566162
duplicate of: http://stackoverflow.com/q/19790839
has answer: http://stackoverflow.com/a/26566139

http://stackoverflow.com/a/26667931
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
has body: Finally i found the Error cell.innerHTML = "&lt;table style='background-color:rgb(98, 98, 98);color:black;border- radius: 5px;' margin:2%; &gt;" + in above line i mistakenly added a CSS attribute "margin:2%;" in to a wrong place. Google chrome is intelligence enough to manage the situation and proceed the activity but Internet Explorer is not. as i found, this is the fact that prompt same error in different situations. EG: http://www.webdeveloper.com/forum/showthread.php?22946-innerHTML-amp-IE-Unknown-Runtime-Error http://www.webdeveloper.com/forum/showthread.php?22946-innerHTML-amp-IE-Unknown-Runtime-Error So if you got any unknown error in your Java Script code which uses "element.InnerHTML" or "document.Write" its better to check whether your tags are properly closed. and i found several other situations that is generating same error IE shows run time error for innerHTML InnerHTML issue in IE8 and below most of the times you can avoid this error by following W3C tag recommendations (http://www.w3.org/TR/html401/struct/global.html).
accepted answer of: http://stackoverflow.com/q/26650492
answers question: http://stackoverflow.com/q/26650492

http://stackoverflow.com/a/26514576
has body: You can use closet() or parentsUntil(). With parentsUntil, you can even select multiple parents alert($('.monkeys').parentsUntil(".animals").attr("food"))
answers question: http://stackoverflow.com/q/26514433
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41863596
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26626978
has text: Hm, nope. What I want is that if you press two divs and both are open, you can compare the info that is inside these two. That's why I want the first div (which is open to have a z-index more than the div under). Hope you understand!
type: AnswerComment

http://stackoverflow.com/q/26578762
has body: What is the purpose of the period in front of the answer in parameter of the following code?: $jq(".answer-status").click( function() { more complete: $jq =jQuery.noConflict(); $jq(document).ready( function() { $jq(".answer-status").click( function() { var answer_button = $jq(this); var answer_status = $jq(this).attr("data-ques-status"); thank you.
has comment: http://stackoverflow.com/comment/41777281
has comment: http://stackoverflow.com/comment/41774865
type: Question
tagged with: function
score: -2
tagged with: javascript
tagged with: jquery
tagged with: webforms
has title: period in jQuery function parameters
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/41774880
favorite count: 0
has answer: http://stackoverflow.com/a/26578815
accepted answer: http://stackoverflow.com/a/26578815
tagged with: parameters
type: AnsweredQuestion
upvote count: 0

dynamic
tags question: http://stackoverflow.com/q/26541497
tags question: http://stackoverflow.com/q/26601743
tag name: dynamic
tags question: http://stackoverflow.com/q/26652771
tags question: http://stackoverflow.com/q/26637287
tags question: http://stackoverflow.com/q/26667031
tags question: http://stackoverflow.com/q/26561028
tags question: http://stackoverflow.com/q/26626033
tags question: http://stackoverflow.com/q/26617928
tags question: http://stackoverflow.com/q/26557454
tags question: http://stackoverflow.com/q/26635171
type: Tag
tags question: http://stackoverflow.com/q/26516718

http://stackoverflow.com/q/26519796
downvote count: 0
has comment: http://stackoverflow.com/comment/41669245
has answer: http://stackoverflow.com/a/26527881
accepted answer: http://stackoverflow.com/a/26527881
has comment: http://stackoverflow.com/comment/41668921
type: Question
answer count: 2
tagged with: soundcloud
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41669410
has comment: http://stackoverflow.com/comment/41669350
tagged with: api
possible better answer: http://stackoverflow.com/a/26520229
has comment: http://stackoverflow.com/comment/41669565
has comment: http://stackoverflow.com/comment/41669469
linked to: http://stackoverflow.com/q/20956812
has comment: http://stackoverflow.com/comment/41669425
has answer: http://stackoverflow.com/a/26520229
favorite count: 0
linked to: http://stackoverflow.com/q/24076885
upvote count: 4
has title: How play a private track with soundcloud Javascript SDK
has body: I have a problem with my privates tracks. I have public track and privates tracks in my soundcloud account. When a track is public is correcte, but when i'm a private track the api return an 404 error : GET http://api.soundcloud.com/tracks/123?client_id=xxxxx&amp;format=json&amp;_status_code_map[302]=200 404 (Not Found) in my console. Here my function for to play a track : // Play a Single track $('#app').on('click','.play_btn_single',function(event){ event.preventDefault(); var el = $(this); var id = el.attr('id'); SC.stream('/tracks/'+id,function(sound){ sound.play(); }); }); Thank you of your help.
type: AnsweredQuestion

jquery-select2
tags question: http://stackoverflow.com/q/26663777
tags question: http://stackoverflow.com/q/26611924
tag name: jquery-select2
tags question: http://stackoverflow.com/q/26571913
tags question: http://stackoverflow.com/q/26561403
type: Tag
tags question: http://stackoverflow.com/q/26649860
tags question: http://stackoverflow.com/q/26521321

http://stackoverflow.com/q/26524479
tagged with: yui
tagged with: javascript
has comment: http://stackoverflow.com/comment/41676902
has comment: http://stackoverflow.com/comment/41679598
score: 0
tagged with: google-chrome-extension
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41705242
has answer: http://stackoverflow.com/a/26524693
type: UnansweredQuestion
has title: how to use YUI to make a real mouse click event in a select tag?
has body: I am trying to automate a html page where there is form needs to be filled. There is a select tag in form, when user click and select a option in it, it will trigger the page to show another input field. When I use the following code $([name=selectTagName]).val('valueThatIneed') It select the option as expected, but the input field won't show up unless you actually use your mouse to click on that option. Updated: Now I find that page actually wrote in YUI. But I am not familiar with framework. So the question becomes how to do this in a YUI way, not jquery.
has comment: http://stackoverflow.com/comment/41676916
tagged with: google-chrome
type: Question

http://stackoverflow.com/comment/41766960
has text: console.log body what does it give now console.log(req.query); ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26572963
type: Comment

http://stackoverflow.com/comment/41746874
has text: Not to forget ES6 array comprehensions `[for (i in Array(y).fill(x)) Array(i)]`.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26561573
type: Comment

http://stackoverflow.com/comment/41779414
has text: Code looks fine except `document.getElementById('twitchtitle').textContent = data.status;`, which would set the title to the last status, as each `.ttitle` is only setting the text. Change that to `document.getElementById('twitchtitle').textContent = document.getElementById('twitchtitle').textContent + ' ' +data.status;`
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26581302
type: QuestionComment

http://stackoverflow.com/comment/41785399
has text: Do you have `position:relative` on the `div`? - [fiddle](http://jsfiddle.net/Luxjjjdh/1/)?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26584812

http://stackoverflow.com/q/26560430
has body: I'm trying to submit a form with a field element when a user clicks a button. I'm using the change function, which is called after a file has been chosen. The problem is that the form data is submitted without the field data. How can I make it submit the form after the field data is set? The below code works fine if I call it with submit instead of change. &lt;form method="POST" action="public/index.php/students/edit/49" accept-charset="UTF-8" id="fileform" enctype="multipart/form-data"&gt; &lt;input type="button" onclick="document.getElementById('fileupload').click(); return false;" value="UPLOAD CV / RESUME" class="add" /&gt; &lt;input type="file" id="fileupload" style="visibility: hidden;" /&gt; &lt;/form&gt; &lt;script&gt; $('#fileupload').change(function() { var formData = new FormData($(this)[0]); var request = $.ajax({ type: "POST", processData: false, contentType: false, url: "{{URL::action('StudentController@addDocument')}}", data: formData, }); request.done(function( msg ) { console.log( msg ); }); request.fail(function( jqXHR, textStatus ) { console.log(textStatus ); }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41741515
type: Question
has comment: http://stackoverflow.com/comment/41741417
has comment: http://stackoverflow.com/comment/41741547
tagged with: javascript
has comment: http://stackoverflow.com/comment/41741494
has comment: http://stackoverflow.com/comment/41741764
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41741546
has comment: http://stackoverflow.com/comment/41741759
has answer: http://stackoverflow.com/a/26561840
has comment: http://stackoverflow.com/comment/41741373
tagged with: jquery
has comment: http://stackoverflow.com/comment/41741526
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26560635
has title: jQuery: submit form on change

http://stackoverflow.com/a/26563117
answers question: http://stackoverflow.com/q/26563067
upvote count: 3
has comment: http://stackoverflow.com/comment/41746240
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41758756
has body: Just pass obj in your function, and then remove the object obj from objList in your controller, it will disappear from your view, that's how angular's data binding works : Remove And in you controller: $scope.removeRow = function(obj) { var index = $scope.objList.indexOf(obj); $scope.objList.splice(index, 1); }
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/26563067
has comment: http://stackoverflow.com/comment/41746325
has comment: http://stackoverflow.com/comment/41769020

http://stackoverflow.com/a/26619465
type: Answer
answers question: http://stackoverflow.com/q/26619346
score: 1
upvote count: 1
has body: You could do this with JavaScript and jQuery. Create function like: function importCSS(){ var import = document.createElement('link'); i=0; while(i&lt;importData.length){ import.href=importData[i]; import.rel="stylesheet" document.head.appendChild(import) i++; } importData=["css1.css","css2.css",..."cssN.css"]; } And then just call importCSS() in your file like: $(document).ready(importCSS()); Otherwise I would use a language like PHP to pull the style information from a file or database.
downvote count: 0

http://stackoverflow.com/a/26552586
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26551988
has body: I think, you did not reset specialFee to 0. function showhideSPForm(SP) { if (SP == "Yes") { document.getElementById("div8").style.display = 'block'; document.getElementById("div9").style.display = 'none'; } else if (SP == "No") { document.getElementById("div9").style.display = 'block'; document.getElementById("div8").style.display = 'none'; document.getElementById("SPECIAL").selectedIndex = 0; } specialFee = 0; calculateTotal(); }
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26551988

http://stackoverflow.com/q/26589020
favorite count: 0
has comment: http://stackoverflow.com/comment/41792981
tagged with: download
has comment: http://stackoverflow.com/comment/41793850
has body: Suppose I have an image hosted with Google: https://www.google.ae/images/srpr/logo11w.png I want to make this image file download instead of opening directly in the browser. I have tried: &lt;?php function downloadFile($file, $type) { header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Type: $type"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($file)); readfile($file); } downloadFile("img.jpg", "image/jpg"); ?&gt; This works but only for locally hosted imges, not for images hosted remotely like the Google example, above.
upvote count: 1
has comment: http://stackoverflow.com/comment/41793147
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41793994
has answer: http://stackoverflow.com/a/26590600
score: 1
has comment: http://stackoverflow.com/comment/41793019
has comment: http://stackoverflow.com/comment/41793020
accepted answer: http://stackoverflow.com/a/26590600
type: Question
has title: Force download remotely hosted images to browser
tagged with: javascript
tagged with: jquery
tagged with: image
has comment: http://stackoverflow.com/comment/41793456
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41793188

http://stackoverflow.com/a/26858462
accepted answer of: http://stackoverflow.com/q/26560097
has body: This link here helped immensely. I had to do some tweaking to fit my uses but it was 99% there for me. http://docs.shopify.com/manual/configuration/store-customization/advanced-navigation/linked-product-options
answers question: http://stackoverflow.com/q/26560097
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/26584660
tagged with: angularjs-controller
has body: I am trying to link models to services which will allow me to update global models throughout my app, however it does not seem to be working as anticipated. I have recently started looking into AngularJS so it is possible I am misunderstanding my code however from what I understand a service will work as an instance as oppose to a factory singleton which should allow me to use a service to control all $scoped models. I am trying to chain my model like this: model: {{ language.title }} >>> ctrl1: $scope.language = langSrvic.store; >>> srvic: langSrvic.store = myFactory; >>> ctrl2: langSrvic.set('locale', 'fr'); >>> language instance store updated (should reflect change in controller 1 model) jsFiddle of my working code //Application var app = angular.module('app',[]); //Controller 1 app.controller('first', ['$scope', 'language', function($scope, language){ $scope.language = language.store; setTimeout(function(){ console.log($scope.language.title); //My application console.log(language.store.title); //Something something french }, 1500); }]); //Language service app.service('language', ['i18n', function(i18n){ return { locale: 'en', store: i18n['en'], set: function(prop, val){ this[prop] = val; this.store = i18n[this.locale]; } } }]); //Factory - storing instead of an api temporarily app.factory('i18n', [function(){ return { en:{ title: 'My application' }, fr:{ title: 'Something something french' }, } }]); //Controller 2 - changing locale to fr which should update the instance store and so update the first scope app.controller('second', ['$scope', 'language', function($scope, language){ language.set('locale', 'fr'); $scope.language = language.store; }]); &lt;div ng-controller="first"&gt; {{ language.title }} &lt;div ng-controller="second"&gt; {{ language.title }} &lt;/div&gt; &lt;/div&gt;
upvote count: 1
type: Question
tagged with: angularjs-service
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/26584753
answer count: 1
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
has title: Angular Modal>Ctrl>Service>Ctrl inheritance not working
accepted answer: http://stackoverflow.com/a/26584753
type: AnsweredQuestion

http://stackoverflow.com/q/26633265
has title: Slider issue with :first-child
possible better answer: http://stackoverflow.com/a/26633660
has answer: http://stackoverflow.com/a/26633660
accepted answer: http://stackoverflow.com/a/26633589
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
answer count: 2
tagged with: css-selectors
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26633589
has body: I just wrote a few jQuery lines to have a simple slider on a page. I don't want this slider to loop, so I disable PREV/NEXT buttons when we reach the begin/end of the list. It works well for the NEXT, but I can't figure why it's not working for PREV (you can see the button is not disabled, even if the first element is active). Does anybody see something I would have missed? $(function(){ function sliderUpdate(elements) { $(elements).toggleClass('active'); var active = $('#slider li.active'); $('#slider .prev').toggleClass('disabled', active.is(':first-child')); $('#slider .next').toggleClass('disabled', active.is(':last-child')); } $('#slider').on('click', '.previous:not(.disabled)', function(event) { var toToggle = $('#slider li.active'); toToggle = toToggle.add(toToggle.prev('li')); sliderUpdate(toToggle); }); $('#slider').on('click', '.next:not(.disabled)', function(event) { var toToggle = $('#slider li.active'); toToggle = toToggle.add(toToggle.next('li')); sliderUpdate(toToggle); }); sliderUpdate($('#slider li').first()); }); #slider li.active { color: red; } #slider .disabled { color: #ddd; cursor: default; } PREVIOUS 1 2 3 4 5 NEXT
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/26594123
has title: Stopwatch with multiple displays
type: Question
has comment: http://stackoverflow.com/comment/41808036
has comment: http://stackoverflow.com/comment/41806100
tagged with: javascript
has comment: http://stackoverflow.com/comment/41804554
has body: Hi there i am currently using a javascript stopwatch (found online) i have made a few changes but got to this point and not sure how to proceed, i want to have one stopwatch running but for it display multiple times (depending on how many users are in the mysql table) i have managed to get it to run more than one at a time but it always crashes my browser so im assuming i was doing it the incorrect way? my javascript is var flagclock = 0; var flagstop = 0; var stoptime = 0; var splitcounter = 0; var currenttime; var splitdate = ''; var output; var output1; var clock; function startstop() { var startstop = document.getElementById('startstopbutton'); var startdate = new Date(); var starttime = startdate.getTime(); if(flagclock==0) { startstop.value = 'Stop'; flagclock = 1; counter(starttime); } else { startstop.value = 'Start'; flagclock = 0; flagstop = 1; splitdate = ''; } } function counter(starttime) { output = document.getElementById('output'); output1 = document.getElementById('output1'); clock = document.getElementById('clock'); currenttime = new Date(); var timediff = currenttime.getTime() - starttime; if(flagstop == 1) { timediff = timediff + stoptime } if(flagclock == 1) { clock.value = formattime(timediff,''); refresh = setTimeout('counter(' + starttime + ');',10); } else { window.clearTimeout(refresh); stoptime = timediff; } } function formattime(rawtime,roundtype) { if(roundtype == 'round') { var ddds = Math.round(rawtime/1) + ''; } else { var ddds = Math.floor(rawtime/1) + ''; } if(roundtype == 'round') { var dds = Math.round(rawtime/10) + ''; } else { var dds = Math.floor(rawtime/10) + ''; } if(roundtype == 'round') { var ds = Math.round(rawtime/100) + ''; } else { var ds = Math.floor(rawtime/100) + ''; } var sec = Math.floor(rawtime/1000); var min = Math.floor(rawtime/60000); ds = ds.charAt(ds.length - 1); dds = dds.charAt(dds.length - 1); ddds = ddds.charAt(ddds.length - 1); if(min &gt;= 60) { startstop(); } sec = sec - 60 * min + ''; if(sec.charAt(sec…
has comment: http://stackoverflow.com/comment/41806361
score: 0
has comment: http://stackoverflow.com/comment/41806805
has comment: http://stackoverflow.com/comment/41803309
has comment: http://stackoverflow.com/comment/41809018
type: UnansweredQuestion
answer count: 0
tagged with: mysql

http://stackoverflow.com/a/26594608
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26594146
has body: You have quite some problems with your current approach: You need to fix your Event function to take some parameter to fill in with data: function Event(data) { var self = this; self.title = ko.observable(data.title); self.start = ko.observable(data.start); self.starttextt = ko.computed(function () { return " Hello world " + this.start(); }, this); } Then writing var data = [Event]; just create an array with the Event function and it does not do any kind of mapping. You need to call map on your objs array: var objs = JSON.parse(js); var data = objs.map(function (e) { return new Event(e) }); And you need to use data in your viewModel instead of obj var viewModel = function () { var self = this; self.events = ko.observableArray(data); }; Demo JSFiddle. However you don't need to write all these mapping code because there is already a plugin exists called Mapping plugin which is built to handle these kind of situations. Here is your sample rewritten with the mapping plugin: var mapping = { create: function (options) { var event = ko.mapping.fromJS(options.data); event.starttextt = ko.computed(function () { return " Hello world " + event.start(); }, event); return event; } } var viewModel = function () { var self = this; self.events = ko.mapping.fromJSON(js, mapping); }; Demo JSFiddle.
accepted answer of: http://stackoverflow.com/q/26594146
has comment: http://stackoverflow.com/comment/41808435
type: AcceptedAnswer

http://stackoverflow.com/comment/41930658
type: Comment
score: 5
comment on: http://stackoverflow.com/q/26664344
has text: possible duplicate of [Are +0 and -0 the same?](http://stackoverflow.com/questions/7223359/are-0-and-0-the-same)
type: QuestionComment

http://stackoverflow.com/q/26619522
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26620277
has body: This is for accessing preferences saved in chrome.storage.sync using JavaScript for a Chrome Extension. Code: chrome.storage.sync.get('allWeights', function(obj) { allWeights = obj.allWeights(); chrome.storage.sync.get('allIDs', function(obj2) { allIDs = obj2.allIDs(); alert("ALL WEIGHTS: " + allWeights); alert("ALL IDS: " + allIDs); }); }); Error: Error in response to storage.get: TypeError: object is not a function at HTMLDocument.restore_options And the error is pointing to the first line (chrome.storage.sync.get('allWeights'). What is causing this error and how can I fix it?
score: 2
has comment: http://stackoverflow.com/comment/41850865
has comment: http://stackoverflow.com/comment/41850218
has comment: http://stackoverflow.com/comment/41850367
has comment: http://stackoverflow.com/comment/41850414
tagged with: google-chrome-devtools
linked to: http://stackoverflow.com/q/20476784
tagged with: google-chrome
type: Question
has title: TypeError: Object Is Not A Function (JavaScript Chrome Storage Sync)
tagged with: javascript
has comment: http://stackoverflow.com/comment/41850752
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/41850461
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41850842
tagged with: google-chrome-app

http://stackoverflow.com/comment/41922600
has text: What is your time zone set to in the Windows control panel?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26659445

http://stackoverflow.com/comment/41800580
comment on: http://stackoverflow.com/q/26556221
type: Comment
type: QuestionComment
score: 0
has text: `[]`'s don't work for ID in javascript like they do for name in php. Every element should have a unique ID.

http://stackoverflow.com/a/26546810
score: 1
has body: function sync(source, target) { if(getType(source) !== 'object' || getType(target) !== 'object') { return; } for(var p in source) { if(getType(target[p]) === 'object') { if(getType(target[p]) !== 'object') { target[p] = {}; } sync(source[p], target[p]); } else if(getType(target[p]) === 'null' || getType(target[p]) === 'undefined'){ target[p] = source[p]; } } }; function getType(arg) { if(arg === null) { return 'null'; } else if(arg === undefined) { return 'undefined'; } var type = Object.prototype.toString.call(arg); return type.slice(8, type.indexOf(']')).toLowerCase(); };
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26546090
downvote count: 0

http://stackoverflow.com/a/26600322
accepted answer of: http://stackoverflow.com/q/26600183
score: 1
upvote count: 1
has body: Marker: var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Here Is Where We Found It!', icon: "1368298974442034922android-car-home-256-th.png" }); Satellite View: var mapOptions = { zoom: 20, center: myLatlng, mapTypeId: google.maps.MapTypeId.SATELLITE };
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26600183
type: Answer

http://stackoverflow.com/a/26658500
has comment: http://stackoverflow.com/comment/41920264
has comment: http://stackoverflow.com/comment/41923201
has comment: http://stackoverflow.com/comment/41919917
accepted answer of: http://stackoverflow.com/q/26658194
has body: You define onEdit2(event) inside the if statement block, but you never execute it. Defining a function inside of a block like that is bad practice. You can't really conditionally define a function. See this link for more information on why this is bad. It seems like you want to execute the onEdit2 function if the if condition is true. If so, you should define the function globally so you can execute it from wherever you need to. You probably want to do something like this: function onEdit(event){ var sheet = event.source.getActiveSheet(); var editedCell = sheet.getActiveCell(); var columnToSortBy = 10; var tableRange = "J:J3"; // What to sort. if(editedCell.getColumn() == columnToSortBy){ var range = sheet.getRange(tableRange); range.sort( { column : columnToSortBy, ascending: true } ); onEdit2(event); // Execute the function, passing it whatever event was passed to onEdit } } // End definition of onEdit function onEdit2(passedEvent) { // Do the actual function definition out here var ss = SpreadsheetApp.getActiveSpreadsheet(); var s = passedEvent.source.getActiveSheet(); var r = passedEvent.source.getActiveRange(); if(s.getName() == "Orders" &amp;&amp; r.getColumn() == 10 &amp;&amp; r.getValue() == "5. Archive") { var row = r.getRow(); var numColumns = s.getLastColumn(); var targetSheet = ss.getSheetByName("Archive"); var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1); s.getRange(row, 1, 1, numColumns).moveTo(target); s.deleteRow(row); } }
answers question: http://stackoverflow.com/q/26658194
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41920117
has comment: http://stackoverflow.com/comment/41919432
score: 0
type: Answer

http://stackoverflow.com/comment/41706471
comment on: http://stackoverflow.com/q/26540700
has text: What is the exact output you get from the `node` command?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26629394
type: UnansweredQuestion
has body: I have a requirement where I have to load a content in a DIV from a domain other than source domain. Eg: $("#myDiv").load("https://www.google.com") Now in above example, I want to load google page content into a DIV on my JSP. Now, the problem is request is blocked due to browser's same origin policy. I have gone through some solutions to set headers at server. But I am not suppose to alter headers in this case as this may affect other aspects of my application. Also, solutions like YQL may not work as I am not suppose to make java script/ ajax call to other locations due to som security concerns. I am currently looking for a library / api / workaround or any open source solution that can address my problem. P.S: I am working with servlets and JSP Any suggestions/solution please. Thanks in advane.
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: cross-domain
has title: load DIV content from other domain using JQuery load/ajax
answer count: 1
tagged with: jsp
has answer: http://stackoverflow.com/a/26629485
tagged with: ajax
has comment: http://stackoverflow.com/comment/41867433

http://stackoverflow.com/q/26652987
has answer: http://stackoverflow.com/a/26653132
accepted answer: http://stackoverflow.com/a/26653132
tagged with: attributes
has body: I am trying to build a custom checkbox that adds or subtracts a value depending on if it is checked or not. ie: all checked boxes are summed. $("div[active=1]").on("click",function(){ var itemPrice = $(this).attr("itemprice"); sum -= Number(itemPrice); $("#current_price").html(sum); $(this).attr("active","0"); }); $("div[active=0]").on("click",function(){ var itemPrice = $(this).attr("itemprice"); sum += Number(itemPrice); $("#current_price").html(sum); $(this).attr("active","1"); }); My issue is changing the boxes status as "checked" or unchecked". I'm using $(this).attr("checked",1); to change the status after the clicking. Here is what I have so far, as you can see, a click on the 100 box (for example) just continues to ADD 100 as opposed to add/subtract/add/subtract.... http://jsfiddle.net/L76xzbLj/
type: AnsweredQuestion
tagged with: selector
type: Question
has title: Custom checkbox toggles attribute value
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41660110
score: 0
comment on: http://stackoverflow.com/q/26515147
type: Comment
type: QuestionComment
has text: Do you have a class called "action_buttons" on your elements? Any errors in the console?

http://stackoverflow.com/a/26523823
type: Answer
has comment: http://stackoverflow.com/comment/64192262
upvote count: 10
score: 10
accepted answer of: http://stackoverflow.com/q/26522875
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/64135858
answers question: http://stackoverflow.com/q/26522875
has body: You can create a service which is responsible clearing all the the data from the other services. In this case you only have to call the "clear" method of this service, and implement the individual clear calls inside of this one (so only implemented once). This gives you also the advantage that you have an overview of which services data need to be cleared all the time, since you might have exceptions in the future. Also see this answer for your reference: Injecting a service into another service in angularJS
has comment: http://stackoverflow.com/comment/64192234
has comment: http://stackoverflow.com/comment/41677298

http://stackoverflow.com/comment/41918465
has text: Just went through this a few months ago. FWIW, I believe the issue was caused by a custom font size and going back to default solved it.
comment on: http://stackoverflow.com/q/26657630
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26552197
has title: javascript - an assert function that doesnt require you to enter an error message
has body: Implementing an assert in javascript is not difficult: assert = function(expression,errorMessage){ if (!expression){ errorMessage = errorMessage || "(no msg)"; throw new Error("assert failed: "+errorMessage); } return true; }; However, using this version of assert is tiresome because you have to have a meaningful error message for every test case: var types = {isNumber:function(x){return typeof x === "number" &amp;&amp; isFinite(x)}} assert(types.isNumber(1)===true,"types.isNumber(1)===true"); assert(types.isNumber(NaN)===false,"types.isNumber(NaN)===false"); My question is that is there a way to implement the assert function such that it only takes one expression and it can return meaningful error message if that expression is not met? Like: assert(SOMETHING_that_is_not_true); // throw Error: SOMETHINGELSE that refers to this particular assertion assert(SOMETHING_that_is_not_true2); // throw Error: SOMETHINGELSE2 that refers to this different assertion
type: Question
has answer: http://stackoverflow.com/a/26552312
has answer: http://stackoverflow.com/a/26552493
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26552493
score: 0
answer count: 2
tagged with: assert
has comment: http://stackoverflow.com/comment/41726858
accepted answer: http://stackoverflow.com/a/26552312
has comment: http://stackoverflow.com/comment/41726831
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41726780

http://stackoverflow.com/q/26603544
has body: I've tried suggestions and tricks by reading various answers on stack overflow but they don't seem to be sufficient or maybe there's something basic i'm missing. Basically i'm trying to encrypt a value in php and pass it to the webpage from where it's read by JavaScript and send to node server for processing. But i'm unable to get the same value back on node server which i encrypted in php. Below is the php code and php version is 5.5.12 running on windows 7 64 bit:- function encrypt($string){ $key = hash("SHA256", '1d417e2ffb2a00a3', true); $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $blockSize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $padding = $blockSize - (strlen($string) % $blockSize); $string .= str_repeat(chr($padding), $padding); $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key,$string, MCRYPT_MODE_CBC, $iv); $result['cipher'] = base64_encode($ciphertext); $result['iv'] = base64_encode($iv); return $result; } My node.js version is 0.10.31 running on windows 7 64 bit and code is below:- var express = require("express"); var Server = require("http").Server; var cookie = require("cookie"); var app = express(); var server = Server(app); var sio = require("socket.io")(server); var crypto = require('crypto'); sio.sockets.on("connection", function(socket) { try{ socket.on('incoming_data', function(data){ var txt = new Buffer(data.encrypted_text,'base64'); var key = new Buffer('1d417e2ffb2a00a3','utf8'); var iv = new Buffer(data.iv,'base64'); var decipher = crypto.createDecipheriv('aes-128-cbc',key,iv); var chunks = []; chunks.push(decipher.update(txt,'hex','binary')); chunks.push(decipher.final('binary')); var fuid = chunks.join(''); console.log(fuid); }); }catch(e){ console.log("err:-"+e); console.log(e); } });// on connection ends server.listen(9267, function(){ console.log('Node server listening on *:9267'); }); process.on('uncaughtException', function(err) { cons…
tagged with: php
tagged with: node.js
type: AnsweredQuestion
has title: encryption in PHP and decryption in node.js
tagged with: encryption
type: Question
has answer: http://stackoverflow.com/a/26604504
accepted answer: http://stackoverflow.com/a/26604504
tagged with: character-encoding
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26531117
tagged with: jquery
type: UnansweredQuestion
tagged with: razor
tagged with: checkbox
has comment: http://stackoverflow.com/comment/41689132
has comment: http://stackoverflow.com/comment/41688958
answer count: 0
has title: checkbox list in Razor
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has body: I'm trying to generate checkboxes dynamically in Razor. The checkboxes should have the same name but a different id. @foreach (var item in ViewBag.Institute) { &lt;text&gt; &lt;input type="checkbox" name="myname" id="@item.InstituteID" /&gt; @item.InstituteName &amp;nbsp;&amp;nbsp; &lt;/text&gt; } My problem is that when I click on a one checkbox it automatically selects all the others. Basically, I cannot select one checkbox. It always selects them all. Can anyone help with this? Thanks
score: 0
has comment: http://stackoverflow.com/comment/41691500

http://stackoverflow.com/q/26602326
answer count: 1
tagged with: jquery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41818227
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26602503
tagged with: checkbox
tagged with: treeview
type: Question
tagged with: javascript
score: 0
has body: I am new to angularJS. I want to create checkboxes dynamically using templates in directives. I created controller and directives in separate files. I am creating checkbox in template in directive and want to invoke controller's function on ng-click of check box but I am unable to do so. Here is my code sample. Controller: var app=angular.module('abc',[]); app.controller('DemoCtrl', function($scope) { $scope.ctrlFn = function(test) { alert("hi "+test); console.log(test); } }); I referred the https://github.com/iVantage/angular-ivh-treeview to create checkboxes tree view. I inlcuded all the css and js files in my sample. From the link I got the following js file which is creating the checkboxes in template in directive as shown below: ivh-treeview.min.js: angular.module("ivh.treeview",[]), angular.module("ivh.treeview").directive("ivhTreeviewCheckbox",[function(){ "use strict"; return{restrict:"A", scope:{node:"=ivhTreeviewCheckbox"}, require:"^ivhTreeview", link:function(a,b,c,d){ var e=a.node,f=d.opts(),g=f.indeterminateAttribute,h=f.selectedAttribute; a.isSelected=e[h], a.ctrl=d, a.$watch(function(){return e[h]},function(b){a.isSelected=b}), a.$watch(function(){return e[g]},function(a){b.find("input").prop("indeterminate",a)})}, template:['&lt;input type="checkbox"','ng-model="isSelected"','ng-change="ctrl.select(node, isSelected)" /&gt;'].join("\n")} }]); View: &lt;div class="col-sm-8" ng-controller="DemoCtrl as demo"&gt; &lt;div ivh-treeview="demo.bag" ivh-treeview-selected-attribute="'isSelected'" ivh-treeview-id-attribute="'uuid'" ivh-treeview-expand-to-depth="0"&gt; &lt;/div&gt; &lt;/div&gt; I want to call ctrlFn() on click of checkbox created in directive template. Please suggest a way to do the same. Thanks In Advance
has title: AngularJS- How to call controller's function on click of checkbox which is created in directive template

http://stackoverflow.com/a/26596964
accepted answer of: http://stackoverflow.com/q/26596615
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26596615
has body: It looks like the issue occurs when the video is loaded before theme.js starts executing. if you have access to theme.js I would change the following function: all_videos.each( function() { var video = $(this); if ( video.parents( 'object' ).length ) return; if ( ! video.prop( 'id' ) ) video.attr( 'id', 'rvw' + Math.floor( Math.random() * 999999 ) ); video .wrap( '&lt;div class="responsive-video-wrapper" style="padding-top: ' + ( video.attr( 'height' ) / video.attr( 'width' ) * 100 ) + '%" /&gt;' ) .removeAttr( 'height' ) .removeAttr( 'width' ); } ); to: all_videos.each( function() { var video = $(this); if ( video.parents( 'object' ).length || video.parents('#jwplayer-0_wrapper').length) return; if ( ! video.prop( 'id' ) ) video.attr( 'id', 'rvw' + Math.floor( Math.random() * 999999 ) ); video .wrap( '&lt;div class="responsive-video-wrapper" style="padding-top: ' + ( video.attr( 'height' ) / video.attr( 'width' ) * 100 ) + '%" /&gt;' ) .removeAttr( 'height' ) .removeAttr( 'width' ); } ); As a very quick and dirty fix. The main issue is that the jwplayer is conflicting with the theme.js functionality which seems to try to wrap all object elements in a responsive container
type: Answer
downvote count: 0
score: 2
has comment: http://stackoverflow.com/comment/41808595
upvote count: 2

http://stackoverflow.com/q/26609488
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33649853
has title: AngularJS Multi-Step Form Using UI-Router (With Navigation Links)
upvote count: 1
has body: I followed this tutorial to implement my own multi-step form: http://scotch.io/tutorials/javascript/angularjs-multi-step-form-using-ui-router The problem here is this only works if your page is the form page only and nothing else. I currently have a SPA that has four pages, one of which is the registration form. Home Registration Mechanics Terms & Conditions My index.php Home Registration Mechanics Terms & Conditions I am using ui-router to navigate through these pages. This works okay. I tried to use ui-router within the Registration page with nested views, but apparently it does not behave as expected. I want the Registration Page to load the first nested view, but it does not bind with it. Here are my nested views: registration-profile.php (should be the default view) registration-artist.php (step 2) registration-share.php (final step) Here is my stateProvider code mixing the two (navigation and registration nested views): spinnrApp.config(function ($stateProvider, $urlRouterProvider) { // // Now set up the states $stateProvider .state('home', { url: "/", templateUrl: "app/components/home/home.php" }) .state('registration', { url: "/registration", templateUrl: "app/components/registration/registration.php", controller: "RegController" }) .state('registration.profile', { // nested state for the registration form url: "/profile", // url will be nested /registration/artist templateUrl: "app/components/registration/partials/registration-profile.php" }) .state('registration.artist', { // nested state for the registration form url: "/artist", // url will be nested /registration/artist templateUrl: "app/components/registration/partials/registration-artist.php" }) .state('registration.share', { // each nested state will have their own view url: "/share", // url will be nested /registration/share templateUrl: "app/components/registration/partials/registration-share.php" }) .state('mechanics', { url: "/mechanics", templateUrl: "app/components/mechanics/mechanics.php" }) .s…
type: Question
score: 1

http://stackoverflow.com/comment/41902948
type: QuestionComment
has text: whatever passed to client can be viewed/read by client. but you can obfuscate or encrypt the url and pass it to client then, at the time of action you can decrypt and use it.
score: 0
comment on: http://stackoverflow.com/q/26649215
type: Comment

http://stackoverflow.com/q/26609498
answer count: 1
downvote count: 0
favorite count: 0
has title: Missing requests from phantomjs network monitoring results
has comment: http://stackoverflow.com/comment/41836751
has comment: http://stackoverflow.com/comment/41831140
tagged with: network-monitoring
accepted answer: http://stackoverflow.com/a/26613275
has comment: http://stackoverflow.com/comment/41835811
has comment: http://stackoverflow.com/comment/41831105
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41835732
has comment: http://stackoverflow.com/comment/41837663
has comment: http://stackoverflow.com/comment/41834673
tagged with: https
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41835046
linked to: http://stackoverflow.com/q/12021578
tagged with: ssl
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41863888
upvote count: 4
has answer: http://stackoverflow.com/a/26613275
has body: I have a web application which is built with AngularJS. I am using phantomjs network monitoring for sniffing all requests triggered from the website on a page load. I get the following list of requests: "https:.../assets/application-bf61473a35661d960c262995b314b0af.css" "https:.../assets/lib/modernizr-c569e351684c78953f5f6298b4e1e485.js" "https:.../assets/application-04936fc61dbebda777c3f816afa39726.js" "https://www.google-analytics.com/analytics.js" "https://ssl.google-analytics.com/ga.js" "https:.../assets/app_install_page_header-a4b182016c1769bad626d1409b6c95f1.png" "https:.../assets/app_install_page_landing_text-14a162dca43a9a84b9fe0a7a77472fad.png" The problem is that the list doesn't include any dynamic requests such as: request with data for google analytics; "https://www.google-analytics.com/collect?v=1&amp;vb=..." request for pictures witch are requested from a backend; ... I used a waitFor method in order to give phantomjs time to wait for the delayed requests but it didn't help. I used this documentation http://phantomjs.org/network-monitoring.html. Code: var page = require('webpage').create(); page.onConsoleMessage = function(msg, lineNum, sourceId) { console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); }; page.onError = function(msg, trace) { var msgStack = ['ERROR: ' + msg + trace]; console.error(msgStack.join('\n')); }; page.onResourceRequested = function(request) { url = request.url console.log(url); }; page.onRecourseReceived = function(response) { console.log('received: ' + JSON.stringify(response, undefined, 4)); }; page.onLoadFinished = function() { page.render("on_finish.png"); }; page.open(address, function(status){ setTimeout(function(){ phantom.exit(); }, 15000); });

http://stackoverflow.com/q/26525383
has comment: http://stackoverflow.com/comment/41678617
type: AnsweredQuestion
has title: Message about sent is not working
tagged with: forms
tagged with: post
type: Question
has body: I have code that checks whether the address is ok and sends it. After sending the information appears that the message was sent. When I give the wrong email address format - appears the message. Then when I give the correct address - the message you sent is not working. What is wrong? jQuery code: &lt;script type="text/javascript"&gt; {literal} function validateEmail(email) { return /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/.test(email); } {/literal} $(document).ready(function() { $('#mybtn').click(function() { var sEmail = $('#email').val(); if ($.trim(sEmail).length == 0) { alert('Please input your email'); //e.preventDefault(); } if (validateEmail(sEmail)) { $('#contact').submit(function() { $.ajax({ url : '/contact/process', data : $('#contact').serialize(), type: "POST", success : function(){ $('form').find('#name, #email, #message').val(''); $('#messageAfterSend').addClass('alert alert-success').text("Thank you for send email").slideUp(3200); } }); return false; }); } else { $('#messageAfterSend').addClass('alert alert-success').text("Invalid email.").slideUp(3200); $('form').find('#email').val(''); } }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41678801
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: email
has answer: http://stackoverflow.com/a/26525881
accepted answer: http://stackoverflow.com/a/26525881
has comment: http://stackoverflow.com/comment/41679461

http://stackoverflow.com/comment/41720330
has text: Because in the code, we have limited the zoom level to a minimum scale 1 and maximum scale 8 by this code 'd3.behavior.zoom().scaleExtent([1, 8])'. You can remove 'scaleExtent' to get infinite zoom in and out.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26545479
type: AnswerComment

http://stackoverflow.com/a/26535146
type: Answer
upvote count: 1
score: 1
has body: As far as I understand Array(5) returns an instance of Array Object with a property length (value 5), but without values. One way to be able to use reduce (or other array methods like map) here is: String(Array(5)).split(',').reduce(function (cur, prv, n, a) { /* ... */ }) An alternative could be: Array.apply(null,{length: 5}).map( [callback] ); // or Array.apply(null,Array(5)).map( [callback] ); But that will encounter a maximum call stack error at some point. The string/split method keeps working (albeit a bit slower) for large arrays. Using node.js on my (not so fast) computer mapping Array(1000000) with the string/split-method lasts 0.47 seconds, the array.apply method for the same crashes with a RangeError (Maximum call stack size exceeded). You can also write a 'static' Array method to create an Array with n values and all usable/applicable Array methods in place: Array.create = function (n, mapCB, method, initial) { method = method in [] ? method : 'map'; var nwArr = ( function(nn){ while (nn--) this.push(undefined); return this; } ) .call([], n); return mapCB ? nwArr[method](mapCB, initial) : nwArr; }; // usages Array.create(5, [callback], 'reduce', ''); Array.create(5).reduce( [callback], ''); Array.create(5).map( [callback] ).reduce( [callback] ); // etc.
has comment: http://stackoverflow.com/comment/41696416
downvote count: 0
answers question: http://stackoverflow.com/q/26535003

http://stackoverflow.com/comment/41852183
score: 0
type: Comment
type: QuestionComment
has text: `button.onclick = function() { clearOrSelectAll(button.id); }`
comment on: http://stackoverflow.com/q/26620735

http://stackoverflow.com/comment/41884816
comment on: http://stackoverflow.com/q/26638774
type: Comment
type: QuestionComment
score: 0
has text: Inscribed lines: `P1=[sin(a*n)*r+Cx, cos(a*n)*r+Cy]; P2=[sin(a*(n+1))*r+Cx, cos(a*(n+1))*r+Cy]; n=0..Nc`.

http://stackoverflow.com/comment/41799206
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26589800
type: QuestionComment
has text: What updates selectedTmHit, and what is the model with this controller?

http://stackoverflow.com/comment/41946514
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26654254
has text: Could you not give each chart a unique ID, and then store the settings in a factory inside of an associative array/object, where the key matches the chart ID? So where you declare the chart, use

http://stackoverflow.com/comment/41911749
has text: However, if the stylesheet isn't being applied, then it won't look right.
comment on: http://stackoverflow.com/a/26654481
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41933817
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26665672
has text: I'm trying to use var_dump($amount) or print_r($amount) but not printing anything or I'm doing it wrong

http://stackoverflow.com/comment/41936713
comment on: http://stackoverflow.com/q/26667674
has text: Well, that would depend on the language.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41663244
type: QuestionComment
comment on: http://stackoverflow.com/q/26516654
has text: I want to use `val1` as key for main array.
score: 0
type: Comment

http://stackoverflow.com/q/26577231
score: 0
has answer: http://stackoverflow.com/a/26579497
has title: Cannot register to background task in JavaScript Windows app
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30279499
tagged with: javascript
type: Question
possible better answer: http://stackoverflow.com/a/30279499
answer count: 2
accepted answer: http://stackoverflow.com/a/26579497
has body: I am using Javascript to register a background task. Everything goes ok, but I cannot register. var background = Windows.ApplicationModel.Background; var builder = new background.BackgroundTaskBuilder(); builder.Name = "Background Task for Loadshedding App"; builder.TaskEntryPoint = "../js/backgroundTask.js"; builder.setTrigger(hourlyTrigger); var task = builder.register(); //Error points to this line Error: 0x80040154 - JavaScript runtime error: Class not registered
has comment: http://stackoverflow.com/comment/41774549
tagged with: windows
has comment: http://stackoverflow.com/comment/41774540

http://stackoverflow.com/a/26525791
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41688492
answers question: http://stackoverflow.com/q/26525695
has comment: http://stackoverflow.com/comment/41694888
type: Answer
has comment: http://stackoverflow.com/comment/41679402
upvote count: 1
has body: It's an EcmaScript 6 feature which is not stable or supported by all modern browsers. You need to wait for it to be stable or you can use a transpiler like Traceur which will convert your ES6 code to ES5.

http://stackoverflow.com/comment/41896560
type: AnswerComment
has text: @Fred-ii-, I think everything fixed now. :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26645353

http://stackoverflow.com/comment/41930757
score: 0
has text: @adeneo yeah, maybe your right. I took it as a learning experience, and I like how JSON feels.. if that makes sense..
comment on: http://stackoverflow.com/q/26663611
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26526305
accepted answer: http://stackoverflow.com/a/26527141
answer count: 1
has comment: http://stackoverflow.com/comment/42440520
has body: DEMO Problem: I am using ScrollSection plugin &amp; having a problem with inner div scroll. i.e inside a section there is a div with scroll but when i hover over it to scroll the div, it scrolls the page instead. What I have tried: I have added a global Boolean variable(named disableScrollSectionMouseWheel) inside the core file of scrollSection plugin which can pause it's functionality of mouse-wheel, Using this switch i have added an event for mouse enter and leave on div, it does stops the page scroll but does not turn on the div scroll!!. By the way i have created a simple version of this issue in jsFiddle but later i have to integrate it with scroll-magic on this site. CODE: $(function() { disableScrollSectionMouseWheel = 0; scrollSectionsController = $('section.scrollsections').scrollSections({ speed: 2000, touch: false, mousewheel: true, exceptions: true, scrollMax: 1, exceptions: true, alwaysStartWithFirstSection: true, scrollbar: true }); /* My Script To pause on hover */ $('section.scrollsections .title').hover(function(e) { if ($(this).hasScrollBar()) { disableScrollSectionMouseWheel = 1; } }); $('section.scrollsections .title').mouseleave(function(e) { disableScrollSectionMouseWheel = 0; }); }); (function($) { $.fn.hasScrollBar = function() { return this.get(0).scrollHeight &gt; this.height(); } })(jQuery);
tagged with: javascript
has comment: http://stackoverflow.com/comment/42473063
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/26527141
has title: Scrollsection Plugin stops inner scrolls
type: Question
has comment: http://stackoverflow.com/comment/42459266
linked to: http://stackoverflow.com/q/6271237
score: 0
tagged with: scroll
has comment: http://stackoverflow.com/comment/42412640
has comment: http://stackoverflow.com/comment/42459280

http://stackoverflow.com/comment/41699204
has text: not a problem. I'll let you know if I get it working.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26535753

http://stackoverflow.com/a/26521184
has body: You need to provide a data: option to $.ajax(): $.ajax({ url: "submit_request.php", type: "POST", data: { content: StoreEditorContent }, success: function (response) { // Do something with the response sent from PHP } }); Then your PHP can do: writeMsg($_POST['content']); You should use POST rather than GET for large requests because the limit on GET parameters is relatively small.
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41671445
answers question: http://stackoverflow.com/q/26521146
has comment: http://stackoverflow.com/comment/41671432
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26521146
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41835535
type: Comment
type: QuestionComment
has text: See also http://stackoverflow.com/questions/1063007/arr-sort-does-not-sort-integers-correctly
comment on: http://stackoverflow.com/q/26611836
score: 0

http://stackoverflow.com/q/26608028
type: Question
has comment: http://stackoverflow.com/comment/41846045
tagged with: c#
has comment: http://stackoverflow.com/comment/41830348
linked to: http://stackoverflow.com/q/2117538
tagged with: javascript
has comment: http://stackoverflow.com/comment/41831330
score: 0
has body: How it supposed to work: User starts typing in a textbox. If the textbox is populated with something, i show a div with 3 radiobuttons. If the user clicks one of the radiobuttons a postback on the server is made and we retrive some data. If the user clears the textbox we should uncheck the radiobuttons and hide their container. In the next step the user writes another value in the textbox and the radiobuttons appears on the screen, with neither of them selected. Unfortunately, if the user selects the previously selected radio, the postback (selectionchangedhandler) on the server is not fired, presumably because i didn't unchecked correctly the radio button. Do you have any ideas hot to make this work? I can't modify the c# source code because the website is generated from a CMS tl;dr how to notify that we have no more a selectedIndex in a radioButtonGroup in c# from javascript?
has comment: http://stackoverflow.com/comment/41828703
tagged with: jquery
has title: Radio button unchecked from javascript does not reset selectedIndex on C#
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41828308
has comment: http://stackoverflow.com/comment/41828559
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41828544
has comment: http://stackoverflow.com/comment/41828164
answer count: 0
has comment: http://stackoverflow.com/comment/41828382
type: UnansweredQuestion

http://stackoverflow.com/q/26551275
type: Question
tagged with: extjs4
score: 0
has body: I have this problem where I'm trying to show a spinner (ie: Loading...) right before logic that can take 1 to even 10 seconds depending on how many fields I have to render and also network access. Here's the current code for the show event of the window: this.mainWindow().setLoading({ msg: this.strings.Messages.str_Wait }); this.Utils.formHelper.renderFormFields(this.mainWindow()); this.fieldsRendered = true; this.hideEmptyTabs(w); this.mainWindow().setLoading(false); renderFormFields is basically a loop that freezes the interface while adding/rendering fields to a form. But it seems to kick in even before the setLoading spinner even shows so all the user sees is a blank window with no fields rendered, suddenly being available 2-3 seconds after. So here's what I did: this.mainWindow().setLoading({ msg: this.strings.Messages.str_Wait }); setTimeout(function () { this.Utils.formHelper.renderFormFields(this.mainWindow()); this.fieldsRendered = true; this.hideEmptyTabs(w); this.mainWindow().setLoading(false); }, 1000); So this would basically leave the spinner 1 second to properly show before processing starts. The issue here is that plenty of events are triggered and their logic needs this to be the actual scope, not the window object, which is this in the setTimeout function. I know you can pass the scope as an argument to setTimeout but the thing is that all the code that is called uses this, literally and needs to, since the same code will be called outside of that setTimeout call. Any ideas so this stays the same within setTimeout's function ?
answer count: 1
has title: Heavy processing leaves no time for spinner to show
has answer: http://stackoverflow.com/a/26551452
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26551452
type: AnsweredQuestion
tagged with: extjs

input
tags question: http://stackoverflow.com/q/26635550
tags question: http://stackoverflow.com/q/26555236
tags question: http://stackoverflow.com/q/26536532
tags question: http://stackoverflow.com/q/26568364
tags question: http://stackoverflow.com/q/26603548
tags question: http://stackoverflow.com/q/26624267
tags question: http://stackoverflow.com/q/26535785
tags question: http://stackoverflow.com/q/26658820
tags question: http://stackoverflow.com/q/26640307
tags question: http://stackoverflow.com/q/26620648
tags question: http://stackoverflow.com/q/26593005
tags question: http://stackoverflow.com/q/26669807
tags question: http://stackoverflow.com/q/26572400
tags question: http://stackoverflow.com/q/26526022
tag name: input
tags question: http://stackoverflow.com/q/26662413
tags question: http://stackoverflow.com/q/26559430
type: Tag
tags question: http://stackoverflow.com/q/26602850
tags question: http://stackoverflow.com/q/26601022

http://stackoverflow.com/q/26525915
tagged with: functional-programming
downvote count: 0
tagged with: javascript
has title: Introducing functional programming in Javascript
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26527673
type: Question
has body: I am trying to get my head around functional programming. Let's assume I have those two functions: /** * Input like: [[key1, value1], [key2, value2] ...] * Output like: { key1: value1, key2: value2, ... } */ function flattenSomeArray(arr) { return arr.reduce(function(prev, curr) { prev[curr[0]] = curr[1]; return prev; }, {}); } /** * Input like: 'a=b;c=d;...' * Output like: { a: 'b', c: 'd', ... } */ function expandSomeString(str) { return str.split(';').reduce(function(prev, curr) { var split = curr.split('='); prev[split[0]] = split[1]; return prev; }, {}); } I can see that that they have kind of a duplicated code like prev[curr[0]] = curr[1]; return prev; or something.reduce. But in my expandSomeString there needs to be some mixin for the extra split. And also in my flattenSomeArray I can directly use reduce, but in expandSomeString I need to split the string first. I really have no clue how to proceed, as this functional concept is completely new to me. But I'm sure there's a way for these simple functions. I think the procedure I am looking for is currying, but I don't know how to apply this concept to my functions.
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/26526524

http://stackoverflow.com/comment/41671319
type: Comment
comment on: http://stackoverflow.com/a/26520844
type: AnswerComment
score: 0
has text: hmm, now its saying in the js console: [05:03:42.998] json is not defined @ file:///C:/Users/Joe/AppData/Roaming/Mozilla/Firefox/Profiles/dvgqchtj.default/gm_scripts/true/true.user.js:8 [05:03:43.338] json is not defined @ file:///C:/Users/Joe/AppData/Roaming/Mozilla/Firefox/Profiles/dvgqchtj.default/gm_scripts/true/true.user.js:8 [05:03:47.745] Error: Permission denied to access property 'toString'

http://stackoverflow.com/comment/71240410
comment on: http://stackoverflow.com/a/26595701
has text: Thanks that worked for me. I did have to put app/**/*.module.js first in the list for my particular app.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41685639
comment on: http://stackoverflow.com/q/26529172
type: Comment
type: QuestionComment
score: 1
has text: Like Paul D. Waite mentionned, I don't really know about the performance impact although it will be negligible, but it is good practice... It is the beginning of one of the most popular JavaScript pattern, the [module pattern](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#modulepatternjavascript).

http://stackoverflow.com/a/26549749
downvote count: 2
score: 0
has body: function arrayToList(array) { var list = {}; if (!(array instanceof Array) || array.length == 0) { list.value = null; } else { list.value = array.shift(); list.rest = arrayToList(); } return list; }
type: Answer
answers question: http://stackoverflow.com/q/26549699
upvote count: 2

http://stackoverflow.com/q/26569150
tagged with: shopping-cart
has comment: http://stackoverflow.com/comment/41757794
type: Question
has title: Making an offline basic html/jquery shopping cart
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41757742
score: 0
has comment: http://stackoverflow.com/comment/41772841
tagged with: http://stackoverflow.com/tag/html
has body: I could use some help on navigating this. I have gone with making a basic "add to cart" submit form button setup. I would like to be able to have a separate area on the right to 'clone' them? into that list, and calculate their price in a different currency like "P 2000" Lastly when checkout button to write whatever is in the list send it in an email. so my html looks like this, Dark Magic II P2000 Northstar P2500 I do have jquery I just did not include it for now. Much help would be appreciated thanks!
tagged with: text-files
has comment: http://stackoverflow.com/comment/41759530
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41757405
has comment: http://stackoverflow.com/comment/41757574
answer count: 0

http://stackoverflow.com/a/26597285
score: 0
has body: In the end we decided to simply have duplicate pages with different names and just do a no-index. A shame that we could not get this working in any browser but Chrome.
type: Answer
answers question: http://stackoverflow.com/q/26590497
accepted answer of: http://stackoverflow.com/q/26590497
type: AcceptedAnswer

http://stackoverflow.com/q/26624230
has title: Mongoose with JSON Data having values as property names
has body: I have a json object in the format - { 'Which is the Capital of India ? ': { 'Delhi': 1, 'Bangalore': 0, 'Mumbai': 0, 'Chennai': 0 } } And I am trying to write the schema in mongoose for this object. I have written - exports.quiz = mongoose.Schema({ question: { answer: Boolean } }); Since I am a mongodb and mongoose newbie, I need to know whether is this the right approach?
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: mongodb
answer count: 1
accepted answer: http://stackoverflow.com/a/26626539
tagged with: mongoose
tagged with: javascript
has comment: http://stackoverflow.com/comment/41858284
linked to: http://stackoverflow.com/q/26650304
score: 0
has comment: http://stackoverflow.com/comment/41858316
has answer: http://stackoverflow.com/a/26626539

http://stackoverflow.com/comment/41712022
has text: Thank You for the "edit", Mr-Green. I apreciate it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26544067

http://stackoverflow.com/comment/41751967
type: QuestionComment
comment on: http://stackoverflow.com/q/26563454
has text: Hi @squint . Thank you for very nice method. Thank you so much. Please add your answer and I will mark yours best.
score: 0
type: Comment

http://stackoverflow.com/q/26563933
answer count: 2
has comment: http://stackoverflow.com/comment/41750141
has comment: http://stackoverflow.com/comment/41748623
has comment: http://stackoverflow.com/comment/41747483
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41759347
tagged with: flux
has comment: http://stackoverflow.com/comment/41747431
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26565423
has title: Passing store state as props, or each component accessing global stores?
upvote count: 28
type: Question
has comment: http://stackoverflow.com/comment/41747455
possible better answer: http://stackoverflow.com/a/31434784
score: 26
has answer: http://stackoverflow.com/a/31434784
has answer: http://stackoverflow.com/a/26565423
has body: I am a bit confused by the statements: "Renders the whole application" and "Passing state to child components". Example 1: I have a todos app with a AppComponent and TodosListComponent. The AppComponent grabs the array of todos from the store and passes it as a property to the TodosListComponent. Example 2: I have a huge application with lots state. I have like 50 components building up my app. Do I want to pass all the state from the stores from AppComponent down through all the 50 components? So I am wondering, what is the convention? It makes more sense to me to let individual components listen directly to the stores they care about. The advantage is that only individual components rerender, but why then the concept of "the whole application rerender on state change"? What are the pros and cons of each? What is the common convention?
tagged with: reactjs
downvote count: 2

http://stackoverflow.com/comment/41752730
comment on: http://stackoverflow.com/q/26566774
type: QuestionComment
score: 0
has text: Is your file a Blade Template? It has to end with `.blade.php`
type: Comment

http://stackoverflow.com/a/26587371
downvote count: 0
score: 1
type: Answer
has body: You need both the number of unmatched beginning parenthesis and the number of unmatched end parenthesis. Here is a rough solution: function pars(str) { var p = 0; var minp = 0; for (var i = 0; i &lt; str.length; i++) { if (str[i] == "(") p++; if (str[i] == ")") { p--; if (p&lt;minp) minp = p; } } for (i = 0; i &gt; minp; i--) { str = "(" + str; } p = p - minp; // If we added any starting parenthesis, we need to end those as well. for (i = 0; i &lt; p; i++) { str = str + ")"; } return str; }
upvote count: 1
has comment: http://stackoverflow.com/comment/41790263
answers question: http://stackoverflow.com/q/26586753

http://stackoverflow.com/comment/41894956
comment on: http://stackoverflow.com/q/26644222
has text: There is `$state.go` function that you can use.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41774002
has text: I think i've been looking at this stuff so long i've gone crazy! adding automcoplete ="off" (which i'm sure i'd tried many times) within my textbox now works. However, I still need to prevent double space being replaced by a period.
comment on: http://stackoverflow.com/q/26577904
score: 0
type: Comment
type: QuestionComment

polygon
tags question: http://stackoverflow.com/q/26638774
tag name: polygon
type: Tag

http://stackoverflow.com/q/26671115
tagged with: text-to-speech
has comment: http://stackoverflow.com/comment/137387077
upvote count: 5
answer count: 0
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/46339078
has comment: http://stackoverflow.com/comment/41943131
has title: Text to speech in HTML5, JavaScript which runs on all browser
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41942817
has body: I have created one sample example for text to speech in HTML5 using JavaScript which runs on only Chrome, but when I am trying to run it on other browser i.e. IE, Mozilla, Safari nothing will happen. What should I do to run my text to speech demo code on all browsers.
score: 5

http://stackoverflow.com/comment/41676349
comment on: http://stackoverflow.com/q/26523221
type: Comment
has text: why you did not use filter property of CGridView?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41773019
has text: Can you show us some runnable Javascript that demonstrates this happening, because something in your description of this problem doesn't add up.
comment on: http://stackoverflow.com/q/26577768
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/33425018
has comment: http://stackoverflow.com/comment/54820639
has comment: http://stackoverflow.com/comment/59398130
score: 1
answers question: http://stackoverflow.com/q/26515004
has comment: http://stackoverflow.com/comment/54646474
accepted answer of: http://stackoverflow.com/q/26515004
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/54840421
has body: To clarify, you want all messages from the chat_id that contains the message with the lowest timestamp first, then all the (as yet unseen) messages from the chat_id that contains a message the next lowest timestamp, etc? Indexed DB doesn't provide anything specifically helpful here. A simple approach would use two indexes: one on timestamp, one on chat_id. Let set be a new empty Set Open an unbounded cursor on the timestamp index For each message seen: If message's chat_id is in set continue() the cursor Otherwise: add chat_id to set open a cursor on the chat_id index with IDBKeyRange.only(chat_id) as bounds fetch all the records
has comment: http://stackoverflow.com/comment/54678091
has comment: http://stackoverflow.com/comment/54843990
type: Answer
upvote count: 1

http://stackoverflow.com/q/26634882
tagged with: php
has title: CodeIgniter PHP: change value in database when checkbox is mark/unmark
downvote count: 0
score: 1
tagged with: codeigniter
has answer: http://stackoverflow.com/a/26640005
accepted answer: http://stackoverflow.com/a/26640005
has comment: http://stackoverflow.com/comment/41949121
has body: Ok, I manage somehow to get value of checkbox, but now i have another issue. This is my view, rssFeeds.php <?php foreach( $feeds as $row ) : ?> <input type="checkbox" class="chkbox" value="chkbox_<?php echo $row->category; ?>_<?php echo $row->id; ?>"> Mark Read // here are my feeds.... <?php endforeach; ?> I have this script, which take checkbox value, and send it to my controller: In my controller, i just load a model which change a value on my database, 0 or 1( meaning read or unread). The problem is that nothing change on my table... I need to put something in that .succes function in ajax ? What.. ? I just need to change one value in my database....
tagged with: mysql
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41949232
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/41949667
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41877894
tagged with: ajax
has comment: http://stackoverflow.com/comment/41950661

http://stackoverflow.com/a/26656856
type: Answer
has comment: http://stackoverflow.com/comment/41916866
has comment: http://stackoverflow.com/comment/41918152
answers question: http://stackoverflow.com/q/26656589
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/41975624
accepted answer of: http://stackoverflow.com/q/26656589
has comment: http://stackoverflow.com/comment/41916448
has body: Something like this may work: var a = 0.05; var b = 10; //play with these values to your liking var y; //loop here from 0 to whatever y = a * x^2 + b * x * Math.random(); //or using your randomMumber function: y = a * x^2 + randomMumber(- b * x / 2, b * x / 2); This way the noise gets bigger when further to the right
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41944283
has comment: http://stackoverflow.com/comment/41939124
has comment: http://stackoverflow.com/comment/41916592

http://stackoverflow.com/comment/41890682
type: Comment
has text: I really just need to add text to the page but also for it to persist. No validation needs to occur as I will be monitoring the report and it will only be available to a few colleagues. I am on a team that reports on various issues in our company and we are currently just adding/removing data from a template of a lot of text in an email which is proving less than ideal.
comment on: http://stackoverflow.com/q/26641506
score: 0
type: QuestionComment

http://stackoverflow.com/q/26541684
possible better answer: http://stackoverflow.com/a/26541723
tagged with: ajax
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26541703
has title: .post() failure callback function?
has answer: http://stackoverflow.com/a/26541703
has body: In the documentation for the .post() method, there's a callback function for when the request is successful, but is there a similar method to tell if the request was a failure?
has answer: http://stackoverflow.com/a/26541723
has comment: http://stackoverflow.com/comment/41707772
type: AnsweredQuestion
tagged with: post
type: Question
tagged with: javascript

http://stackoverflow.com/a/26635793
type: Answer
accepted answer of: http://stackoverflow.com/q/26635600
has body: What you're executing is a function, at the very beginning: $('#btnHello').click(function () { alert('Hi there'); }); You're hooking up your alert function to the element #btnHello. But at the time it executes, #btnHello hasn't been loaded. It doesn't exist yet. So nothing gets hooked up. You can get around this either by executing your code at the very end, or (more reliably, I think) deferring this code's execution until the document has finished loading: $(function () { $('#btnHello').click(function () { alert('Hi there'); }); }); You would put this in your global.js, but it wouldn't execute until your page is completely loaded.
answers question: http://stackoverflow.com/q/26635600
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26546536
type: Question
has answer: http://stackoverflow.com/a/26546611
tagged with: javascript
has answer: http://stackoverflow.com/a/26546768
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26546768
has answer: http://stackoverflow.com/a/26546665
downvote count: 0
has title: Getting the result one by one from Ajax Request
has answer: http://stackoverflow.com/a/26546771
favorite count: 0
tagged with: ajax
upvote count: 2
answer count: 4
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/26546665
has body: I have the following files index.html Click me main.js $.ajax({ type: 'POST', url: 'get_db.php', data: {name: 'users'}, success: function(result) { $(result).hide().appendTo('div ul').fadeIn(1000); } }); get_db.php include('db_connect.php'); $db_name = $_POST['name']; $query = "SELECT * FROM ".$db_name; if($result = $conn->query($query)) { while($row = $result->fetch_assoc()) { $content .= " ".$row['id']." ".$row['name']." "; echo $content; } } And the question is: How can I get the results 1 by 1 and append to 'div ul'? In my case all the result show up at once.

browser
tags question: http://stackoverflow.com/q/26597449
tags question: http://stackoverflow.com/q/26630685
tags question: http://stackoverflow.com/q/26665331
tags question: http://stackoverflow.com/q/26611942
tags question: http://stackoverflow.com/q/26549509
tags question: http://stackoverflow.com/q/26571443
tags question: http://stackoverflow.com/q/26619320
tags question: http://stackoverflow.com/q/26616701
tags question: http://stackoverflow.com/q/26665322
tags question: http://stackoverflow.com/q/26540672
tags question: http://stackoverflow.com/q/26659547
tags question: http://stackoverflow.com/q/26529405
tags question: http://stackoverflow.com/q/26583900
tags question: http://stackoverflow.com/q/26619096
tags question: http://stackoverflow.com/q/26548455
tags question: http://stackoverflow.com/q/26554757
tags question: http://stackoverflow.com/q/26670096
tags question: http://stackoverflow.com/q/26628507
tags question: http://stackoverflow.com/q/26626884
tags question: http://stackoverflow.com/q/26646784
tags question: http://stackoverflow.com/q/26652394
tags question: http://stackoverflow.com/q/26647511
tag name: browser
tags question: http://stackoverflow.com/q/26560279
tags question: http://stackoverflow.com/q/26557153
type: Tag
tags question: http://stackoverflow.com/q/26537657

http://stackoverflow.com/comment/41785137
score: 0
comment on: http://stackoverflow.com/a/26584574
has text: @T.J.Crowder Good point. `inserAfter` is cleaner though as it just takes the selector.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26590830
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41796893
has body: var inner = function() { console.log(x); } // test 1 (function(cb) { var x = 123; cb(); })(inner); // test 2 (function(cb) { var x = 123; cb.apply(this); })(inner); // test 3 (function(cb) { var x = 123; cb.bind(this)(); })(inner); // test 4 (function(cb) { cb.bind({x: 123})(); })(inner); All tests result in: ReferenceError: x is not defined Do someone know how it is possible to access 'x' as a local variable inside the callback?
has answer: http://stackoverflow.com/a/26591182
has title: Access local variable inside a callback function
type: Question
has comment: http://stackoverflow.com/comment/137272613
accepted answer: http://stackoverflow.com/a/26591182
tagged with: javascript
has answer: http://stackoverflow.com/a/26590883
score: 15
has answer: http://stackoverflow.com/a/54765485
upvote count: 15
has answer: http://stackoverflow.com/a/77858584
possible better answer: http://stackoverflow.com/a/26590883
downvote count: 0
has answer: http://stackoverflow.com/a/47256801
has comment: http://stackoverflow.com/comment/41798640
favorite count: 0
has comment: http://stackoverflow.com/comment/41796747
answer count: 5
has comment: http://stackoverflow.com/comment/41796609

http://stackoverflow.com/a/26621788
upvote count: 2
has comment: http://stackoverflow.com/comment/42042063
has comment: http://stackoverflow.com/comment/42040157
type: Answer
has comment: http://stackoverflow.com/comment/42083220
score: 1
has comment: http://stackoverflow.com/comment/42083154
has body: This is a fairly basic solution. You should do research before posting a question on StackOverflow. But here's your solution var intNumber = 0; var arrListOptions = document.getElementById('id_cur_month_catering').options; for(intIterator = 0; intIterator &lt; arrListOptions.length; intIterator ++){ if (arrListOptions[intIterator].selected == true){ intNumber += parseInt(arrListOptions[intIterator].value.split('-')[2]); } } intNumber would contain the sum of each number selected in the list. Here's the list of link that would allow you to learn the basis on javascript for this short script: http://www.w3schools.com/js/js_loop_for.asp http://www.w3schools.com/jsref/coll_select_options.asp http://www.w3schools.com/jsref/jsref_parseint.asp Also, here's an example of a similar question you could have inspired yourself from: Javascript Get Values from Multiple Select Option Box I would also recommand you to learn jQuery as this would allow you to have access to more coding functionnality that are relatively common nowday (like foreach in php, would be .each in jQuery). That would help you be more prepared later when doing development. I hope this have been helpful :-)
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26621509
has comment: http://stackoverflow.com/comment/42040178
has comment: http://stackoverflow.com/comment/41854402
answers question: http://stackoverflow.com/q/26621509
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41854338

http://stackoverflow.com/q/26574641
score: 0
has body: I got a problem concerning query autocomplete. I read so many posts about this issue, but all suggestions I tried are so far not working. This is my website http://www.lactoscanner.com and I can see that autocomplete is undefined. TypeError: undefined is not a function (evaluating 'jQuery("#searchfield").autocomplete({ source:'handlesearch.php', minLength:1 For me it seems that I just miss something. I actually don't load any extra js files which could mess up something. So I wonder why it's not working. Thanks for your help!
has answer: http://stackoverflow.com/a/26574711
type: AnsweredQuestion
tagged with: autocomplete
type: Question
accepted answer: http://stackoverflow.com/a/26574711
answer count: 2
has answer: http://stackoverflow.com/a/26575532
has title: JQuery autocomplete is not working, TypeError undefined
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26575532

ios
tags question: http://stackoverflow.com/q/26525458
tags question: http://stackoverflow.com/q/26573894
tags question: http://stackoverflow.com/q/26596426
tags question: http://stackoverflow.com/q/26539218
tags question: http://stackoverflow.com/q/26637578
type: Tag
tags question: http://stackoverflow.com/q/26566610
tags question: http://stackoverflow.com/q/26641762
tags question: http://stackoverflow.com/q/26646895
tags question: http://stackoverflow.com/q/26607736
tags question: http://stackoverflow.com/q/26590087
tags question: http://stackoverflow.com/q/26625018
tags question: http://stackoverflow.com/q/26615205
tags question: http://stackoverflow.com/q/26641180
tags question: http://stackoverflow.com/q/26633129
tags question: http://stackoverflow.com/q/26536318
tags question: http://stackoverflow.com/q/26554950
tags question: http://stackoverflow.com/q/26650083
tag name: ios
tags question: http://stackoverflow.com/q/26556604
tags question: http://stackoverflow.com/q/26666783
tags question: http://stackoverflow.com/q/26597708
tags question: http://stackoverflow.com/q/26554856
tags question: http://stackoverflow.com/q/26623361
tags question: http://stackoverflow.com/q/26657555
tags question: http://stackoverflow.com/q/26587069
tags question: http://stackoverflow.com/q/26620947
tags question: http://stackoverflow.com/q/26562967
tags question: http://stackoverflow.com/q/26542690
tags question: http://stackoverflow.com/q/26654877
tags question: http://stackoverflow.com/q/26628551
tags question: http://stackoverflow.com/q/26640176
tags question: http://stackoverflow.com/q/26626811

http://stackoverflow.com/a/26642792
type: Answer
answers question: http://stackoverflow.com/q/26642690
has body: A couple of changes. Change $pattern ="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$) |(\.Gif$)"; to $pattern = '/\.(png|jpg|jpeg|gif)$/i'; and eregi($pattern, $file) to preg_match($pattern, $file) and see what happens. eregi deprecated as PHP 5.3.0.
score: 0

http://stackoverflow.com/q/26556856
tagged with: regex
has body: How to generate random numbers with below criteria in Javascript String should contain at least 4 lower case letters from [a-z] String should contain at least 4 upper case letters from [A-Z] String should contain at least 4 numbers from [0-9] Note: I don't want to use any JS library due to leagacy reasons I tried below code but it doesn't match above criteria for example sometimes it does not contain numbers at all.... function randomString(length, chars) { var mask = ''; if (chars.indexOf('a') &gt; -1) mask += 'abcdefghijklmnopqrstuvwxyz'; if (chars.indexOf('A') &gt; -1) mask += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; if (chars.indexOf('#') &gt; -1) mask += '0123456789'; var result = ''; for (var i = length; i &gt; 0; --i) result += mask[Math.round(Math.random() * (mask.length - 1))]; return result; } document.write(randomString(12, 'aA#')); Is there any better approach to do it?
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26557204
type: Question
has comment: http://stackoverflow.com/comment/41735246
possible better answer: http://stackoverflow.com/a/26557204
tagged with: javascript
has answer: http://stackoverflow.com/a/26556930
has comment: http://stackoverflow.com/comment/41735222
linked to: http://stackoverflow.com/q/2450954
answer count: 3
has answer: http://stackoverflow.com/a/26557403
linked to: http://stackoverflow.com/q/3079385
has title: Javascript RegExp Generate string with 4 lower case letters, 4 upper case letters & 4 numbers
accepted answer: http://stackoverflow.com/a/26556930

http://stackoverflow.com/comment/41844146
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26616343
has text: Thanks but this is not working as images are stored in an array and are appended to the ul tag via function so if we creating a div inside the image then same caption might appear on every image but every image should have a different caption. Moreover, I tried it still no text appears on hover.

http://stackoverflow.com/q/26671962
has title: Restrict number of input in a form when selected in a select dropdown
tagged with: php
has answer: http://stackoverflow.com/a/26672092
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41944179
has comment: http://stackoverflow.com/comment/41945038
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41944359
linked to: http://stackoverflow.com/q/6141680
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41944204
favorite count: 0
type: UnansweredQuestion
has body: I am wondering how to restrict number of input using maybe javascript/html (form validation) when selected a select input. SCENARIO: I have first a dropdown box where you can choose your country code for mobile number; once selected, ofcourse one must input their mobile number (length of the mobile number depending on what country code you have chosen, e.g. +63[philippines] and the users mobile number must only be 11 characters long). The following is my line of codes: &lt;div class="input-append"&gt; &lt;select name="mobile" tabindex="15" style="height: 30px; width: 80px;" required&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="Philippines") ?&gt;&gt;+63 (Philippines)&lt;/option&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="America") ?&gt;&gt;+1 (America)&lt;/option&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="UK") ?&gt;&gt;+44 (United Kingdom)&lt;/option&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="Japan") ?&gt;&gt;+81 (Japan)&lt;/option&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="Korea") ?&gt;&gt;+82 (Korea)&lt;/option&gt; &lt;option &lt;?php if (isset($source) &amp;&amp; $source=="China") ?&gt;&gt;+86 (China)&lt;/option&gt; &lt;/select&gt; &lt;input type="number" name="mobile_phone" tabindex="16" style="height: 30px; width: 127px;" placeholder="Enter your Mobile Phone Number" maxlength="11"required&gt; &lt;/div&gt; thankyou for your kind responses!
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41699361
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26536569
has text: How do you refresh the page?
score: 0

http://stackoverflow.com/a/26632944
has body: You can use $location to pull out whatever you need to build a URL. Here is a Plunker from the official docs that shows all the different parts. You probably want something like this: function buildBaseUrl() { return $location.protocol() + '://' + $location.host() + ':' + $location.port() + $location.path() }
accepted answer of: http://stackoverflow.com/q/26632075
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26632075

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/26549687
tags question: http://stackoverflow.com/q/26526341
tag name: google-oauth

http://stackoverflow.com/comment/41689181
comment on: http://stackoverflow.com/q/26531304
score: 0
has text: Can you specify the question *clearly* ? I cannot find your question in the post.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41827959
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26605334
has text: this doesn't work as I use `event.preventDefault()`. Why you said there is no matter of safe when send password in POST with JS?

http://stackoverflow.com/a/26628008
has comment: http://stackoverflow.com/comment/41868115
has comment: http://stackoverflow.com/comment/41869246
has comment: http://stackoverflow.com/comment/41877312
has comment: http://stackoverflow.com/comment/41866301
has comment: http://stackoverflow.com/comment/41866787
answers question: http://stackoverflow.com/q/26627749
score: 0
has comment: http://stackoverflow.com/comment/41865351
type: Answer
upvote count: 1
has body: It's fastest if you cache the array's length and then do a reverse loop on it: var arr = [1,2,3], sum = 0, i = arr.length; while( i-- ) sum += arr[i]; // 6
downvote count: 1
has comment: http://stackoverflow.com/comment/41868037

http://stackoverflow.com/a/26605666
has body: I have fixed the directive in this way: app.directive('riumFocusOn', function() { return { link: function(scope, elem, attrs) { var model = attrs.riumFocusOn; scope.$watch(model, function(value) { if (value === true) { setTimeout(function() { elem[0].focus(); }, 200); } }); } }; }); Now It works fine as before to update to Angular 1.3
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/26522665
type: Answer
answers question: http://stackoverflow.com/q/26522665

http://stackoverflow.com/a/26549957
has comment: http://stackoverflow.com/comment/41722635
has comment: http://stackoverflow.com/comment/41722891
type: Answer
has comment: http://stackoverflow.com/comment/41722653
has comment: http://stackoverflow.com/comment/41722603
has body: According to the ECMAScript 5.1 Specification's Strict Equal Comparison algorithm, even if the type of Objects being compared is String, all the characters are checked to see if they are equal. If Type(x) is String, then return true if x and y are exactly the same sequence of characters (same length and same characters in corresponding positions); otherwise, return false. Interning is strictly an implementation thingy, to boost performance. The language standard doesn't impose any rules in that regard. So, its up to the implementers of the specification to intern strings or not.
answers question: http://stackoverflow.com/q/26549715
has comment: http://stackoverflow.com/comment/41722579
has comment: http://stackoverflow.com/comment/41722687
score: 3
has comment: http://stackoverflow.com/comment/41722983
has comment: http://stackoverflow.com/comment/41722726
has comment: http://stackoverflow.com/comment/41722862
has comment: http://stackoverflow.com/comment/41722298
has comment: http://stackoverflow.com/comment/41722556
upvote count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41722627
has comment: http://stackoverflow.com/comment/41722796

react-rails
type: Tag
tags question: http://stackoverflow.com/q/26627665
tag name: react-rails

http://stackoverflow.com/a/26601548
accepted answer of: http://stackoverflow.com/q/26601372
answers question: http://stackoverflow.com/q/26601372
type: Answer
has comment: http://stackoverflow.com/comment/84207429
upvote count: 2
has comment: http://stackoverflow.com/comment/41817322
has body: This is a good case for an optimistic locking scenario. This will only work in the backend server code. You cannot lock the user using java script on the front end. Let me explain in simple terms how to do this: Add a version number column and a status flag to a database table. Probably on the record table. Manager 1 clicks on record, select the record from the database first, increment the version number and update the flag saying the record is now picked up. Manager 2 clicks on the record, (if he does so at the same Manager 2 will select the same record as selected by Manager 1). But when Manager 2 tries to update the record, the version number will not match up and the update will return back with no rows updated. Use this to update your UI saying the record is in progress. The conversation will be like the below: Manager1: select status, ver_no from record where record_id=? (ver_no is now zero) Manager2: select status, ver_no from record where record_id=? (ver_no is now zero) Manager1: update record set status='In progress', ver_no=1 where record_id=? and ver_no=0 (ver_no is now 1 - Success) Manager2: update record set status='In progress', ver_no=1 where record_id=? and ver_no=0 (This will fail to update any row) The above is only in case they both attack the same row at the same time. Most of the time when Manager 2 selects itself, the status will already be In progress. If not you can work with that record.
has comment: http://stackoverflow.com/comment/41817089
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26615871
has body: Whenever I open my website http://earncsgoitems.com/ through a mobile device I notice a white area to its right (which can be seen by scrolling horizontally). I've been trying to figure out what's causing it for hours to no avail. I have tried using "overflow-x: hidden;" to disable scrolling but my header doesn't function properly when I implement that in my CSS. How can I remove this white area?
type: Question
has answer: http://stackoverflow.com/a/26616001
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0
tagged with: css
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/26616001
has title: Annoying white space to the right of my mobile website

http://stackoverflow.com/comment/41861354
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26626021
has text: What tags are around the * * element?
type: Comment

http://stackoverflow.com/comment/41659464
type: Comment
type: QuestionComment
has text: `.get(0)` returns the `HTMLElement` at `0`th index...
score: 0
comment on: http://stackoverflow.com/q/26514734

http://stackoverflow.com/q/26626168
has answer: http://stackoverflow.com/a/26626642
has answer: http://stackoverflow.com/a/26626733
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/26626453
type: UnansweredQuestion
downvote count: 8
score: -8
has answer: http://stackoverflow.com/a/26626278
has title: Element does not appear if order changed
has comment: http://stackoverflow.com/comment/41862035
has body: I displayed 3 li elements with HTML and 3 using JavaScript code. If I change my JavaScript div tag to last it displays both the ul elements, else it's not displaying the HTML ul tags. Can you tell me why? my javascript eg Hi Dude !!! orange blue yellow
type: Question
upvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26668290
has answer: http://stackoverflow.com/a/26668656
answer count: 3
has comment: http://stackoverflow.com/comment/41938134
has comment: http://stackoverflow.com/comment/41938053
tagged with: variables
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26668656
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41938040
has answer: http://stackoverflow.com/a/26668529
has title: Jquery/JavaScript - Store Ajax jSONP response into variables
accepted answer: http://stackoverflow.com/a/26668529
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41937976
upvote count: 2
score: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26668652
type: Question
tagged with: jsonp
has comment: http://stackoverflow.com/comment/41938116
has comment: http://stackoverflow.com/comment/41937990
tagged with: javascript
has body: I'm getting the result of an ajax request using JSONP without any issues. Here is my code function TestJSONP() { $.ajax({ url: "https://www.sample.com/api/users.json?account_api_key=0000&amp;unique_install_id=0000&amp;email_address=test@test.com&amp;locale_id=en-US&amp;operating_system_version=6.1.7601.65536&amp;operating_system_architecture=64&amp;outlook_version=2013&amp;version=0.0.5.0", // the name of the callback parameter, as specified by the YQL service jsonp: "callback", // tell jQuery we're expecting JSONP dataType: "jsonp", // tell YQL what we want and that we want JSON data: { q: "select title,abstract,url from search.news where query=\"cat\"", format: "json" }, // work with the response success: function (response) { console.log(response); // server response } }); } I need to set the response data into variables which I can access outside that request. Please advice me. (I read some similar questions and I was not able to apply their solutions for mine. Because I think my response data structure is bit different) Please see following block to see the results of console.log(response); { account: { id: "sadasdd4234", name: "Sample Development", support_email_address: "test1@sample.com", report_threat_button_text: "text1", successful_report_text: "text2", false_report_text: "text3", }, current_plugin_version: "0.0.1", id: "trt45rety", status: "ok", type: "api_response", user: { id: "erwrretV0", language: "en", first_name: "Robert", last_name: "Croos", email_address: "test2@sample.net" } } Thanks in advance. Kushan Randima

http://stackoverflow.com/q/26629537
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26630380
has comment: http://stackoverflow.com/comment/41868542
has title: Update textarea by adding selected date
possible better answer: http://stackoverflow.com/a/26630396
has answer: http://stackoverflow.com/a/26630396
type: Question
type: AnsweredQuestion
has body: This might be easy but I'm unable to do it. I'm using jQuery datepicker. There is a textarea in my form, I want to be able to INSERT THE DATE (from the datepicker) TO THE END of the text. example: user types this in the textarea: I would like my items to be delivered by then uses the datepicker and pick select a date : 1/1/2015 final result should be: I would like my items to be delivered by 1/1/2015 Example Fiddle $( "#fieldA" ).datepicker({ showOn: "button", buttonText: "Day", inline: true, altField: '#updateTextField' }); #updateTextField{ width:150px; } Add date at the end of sentence.
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/26630380

http://stackoverflow.com/comment/43568231
has text: Excellent, exactly what I was looking for. Thanks! It seems you used the same jsfiddle for example 2 and 3?
type: Comment
comment on: http://stackoverflow.com/a/27552044
score: 0
type: AnswerComment

http://stackoverflow.com/a/26575537
answers question: http://stackoverflow.com/q/26575486
has body: PHP is executed server-side and JavaScript is executed client-side (in the browser). You can only pass PHP variables to the JS script, like this: <?php $x1 = 'foo'; echo (' '); ?> but the script generated in the PHP is going to be executed on the clients browser, and by that time PHP will stop working. So you can't (directly) pass your JS variables to the PHP script. You could do that using AJAX, but I don't think this is what you mean.
score: 0
type: Answer

http://stackoverflow.com/a/26529390
has comment: http://stackoverflow.com/comment/41686349
answers question: http://stackoverflow.com/q/26528728
type: Answer
score: 0
has body: You can use a function in a watch to return the value to watch. Try: $scope.$watch(function () { return $scope.data.localization[$scope.locale].properties[0].value; } , function () { //show/hide another texbox if I have a value });

http://stackoverflow.com/comment/41722983
score: 0
type: AnswerComment
type: Comment
has text: @lexicore I made one - I removed the function wrappers
comment on: http://stackoverflow.com/a/26549957

http://stackoverflow.com/comment/41852022
comment on: http://stackoverflow.com/q/26620233
score: 0
type: QuestionComment
type: Comment
has text: Your sample polyline has zero length.

meteor
tags question: http://stackoverflow.com/q/26598731
tags question: http://stackoverflow.com/q/26571711
tags question: http://stackoverflow.com/q/26534113
tags question: http://stackoverflow.com/q/26541797
tags question: http://stackoverflow.com/q/26559201
tags question: http://stackoverflow.com/q/26627996
tags question: http://stackoverflow.com/q/26621628
tags question: http://stackoverflow.com/q/26618609
tags question: http://stackoverflow.com/q/26533477
tags question: http://stackoverflow.com/q/26516979
tags question: http://stackoverflow.com/q/26537974
tags question: http://stackoverflow.com/q/26635354
tags question: http://stackoverflow.com/q/26641271
tags question: http://stackoverflow.com/q/26657592
type: Tag
tags question: http://stackoverflow.com/q/26660402
tags question: http://stackoverflow.com/q/26600884
tags question: http://stackoverflow.com/q/26590645
tags question: http://stackoverflow.com/q/26620208
tags question: http://stackoverflow.com/q/26518689
tags question: http://stackoverflow.com/q/26664299
tags question: http://stackoverflow.com/q/26614475
tags question: http://stackoverflow.com/q/26657489
tags question: http://stackoverflow.com/q/26565364
tags question: http://stackoverflow.com/q/26644978
tags question: http://stackoverflow.com/q/26638617
tags question: http://stackoverflow.com/q/26540810
tags question: http://stackoverflow.com/q/26661498
tags question: http://stackoverflow.com/q/26575184
tags question: http://stackoverflow.com/q/26630079
tags question: http://stackoverflow.com/q/26625868
tags question: http://stackoverflow.com/q/26585313
tags question: http://stackoverflow.com/q/26525127
tag name: meteor
tags question: http://stackoverflow.com/q/26535875
tags question: http://stackoverflow.com/q/26616277
tags question: http://stackoverflow.com/q/26622366
tags question: http://stackoverflow.com/q/26607360

http://stackoverflow.com/a/26676689
score: 2
has body: I'm not sure if you have tried this, but maybe is worth it to give it a shot and see if it works for you.. I think, you could try using one of these two functions.. as $.performSelector... and see if it works for you.. [self performSelectorOnMainThread:@selector(myTask) withObject:nil waitUntilDone:YES]; [self performSelector:@selector(myTask) onThread:[NSThread mainThread] withObject:nil waitUntilDone:YES]; I hope it helps..
has comment: http://stackoverflow.com/comment/41956690
type: Answer
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26578795
has comment: http://stackoverflow.com/comment/41959531
has comment: http://stackoverflow.com/comment/41960015

http://stackoverflow.com/comment/41908074
has text: So you want to import a file after that file has been created? Sounds like a bad pattern to depend on something not yet existent.
type: Comment
comment on: http://stackoverflow.com/a/26651647
score: 0
type: AnswerComment

http://stackoverflow.com/q/26577094
accepted answer: http://stackoverflow.com/a/26577251
has comment: http://stackoverflow.com/comment/41773109
favorite count: 0
has comment: http://stackoverflow.com/comment/41772880
has title: Javascript - Change FullCalendar.js callback after initialization
has answer: http://stackoverflow.com/a/43898317
upvote count: 4
has answer: http://stackoverflow.com/a/37420627
has comment: http://stackoverflow.com/comment/41772636
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/43898317
type: Question
has body: I am trying to extend functionality of the FullCalender JS plugin. I am quite new to javascript OOP concepts as well as jQuery plugin development. In a first step I am wondering how to use and access the FullCalendar plugin. The fullCalendar method can be called on any DOM Element while the calendar parameters can be given as JSON object: $('#calendar').fullCalendar({ editable: true, // a parameter events: "./events.php", // some events eventRender: function(event, element) { // a callback // do something here } }); I tried calling this creation method again and change the callback eventRender but it does not work. I guess its because the calendar allows only one instance active on the DOM element. But how can I change parameters and callbacks without destroying and recreating the calendar? Furthermore I tried to access the calendar object directly but I guess due to encapsulation it is not exposed through the FullCalendar. In contrast I see that the fullCalendar function can be called with a string specifying a method to be called on the Calendar. Is this a common mechanism on plugin encapsulation?
has comment: http://stackoverflow.com/comment/41773149
tagged with: javascript
linked to: http://stackoverflow.com/q/1117086
tagged with: fullcalendar
has comment: http://stackoverflow.com/comment/41771820
score: 4
tagged with: jquery-plugins
answer count: 3
has answer: http://stackoverflow.com/a/26577251

http://stackoverflow.com/a/26606389
answers question: http://stackoverflow.com/q/26603913
has body: Try this: var node = document.createElement ("object"); node.type = "text/html"; node.data = fieldsPage; node.style.width = "70%"; node.style.height= "90%"; document.getElementById("fields").innerHTML = ""; document.getElementById("fields").appendChild(node); Good luck.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41869230

http://stackoverflow.com/q/26579865
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26586286
has answer: http://stackoverflow.com/a/26580107
tagged with: css
score: 2
has body: The website I'm working on: zarwanhashem.com You can find my previous question (which includes my code) here: Bootstrap one page website themev formatting problems The selected answer solved my issues but I have another problem because of the jQuery adjustment with the -50. Now the navbar incorrectly indicates the page I am on. i.e. The navbar is supposed to darken the section that you are currently in. So if you click "about" it will take you to the about page and darken the about link in the navbar. But the link BEFORE the page you are on is highlighted because the -50 makes the navbar think that it is on the previous section. You can easily try this to see what I mean. How can I fix this? Thanks. The reason I didn't add this onto my old question is because the person stopped looking at it. Also please keep your explanations simple/dumb them down a little for me. I know very basic HTML and CSS, and I don't know any Javascript. scrolling js: //jQuery to collapse the navbar on scroll $(window).scroll(function() { if ($(".navbar").offset().top &gt; 50) { $(".navbar-fixed-top").addClass("top-nav-collapse"); } else { $(".navbar-fixed-top").removeClass("top-nav-collapse"); } }); //jQuery for page scrolling feature - requires jQuery Easing plugin $(function() { $('a.page-scroll').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top -50 }, 1500, 'easeInOutExpo'); event.preventDefault(); }); }); js added at end of document as suggested by poster in previous question: $(window).ready(function(){ $('div[class^="content-section"]').css('min-height', $(window).height()); })
has title: Bootstrap scrolling navbar issues
type: Question
linked to: http://stackoverflow.com/q/26575468
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26618166
tagged with: web-applications
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26618328
has body: I would like to create a website that fetches data from several APIs and display them. Because I wanted to try and lean AngularJS I deceided to use it for this project. My problem is that I do not know how to fetch data every x seconds in an easy way, so the feed keeps live and shows new events as quick as possible.
tagged with: javascript
has answer: http://stackoverflow.com/a/26618328
has title: Create live feed with AngularJS
score: 0
answer count: 1
tagged with: web
tagged with: angularjs

http://stackoverflow.com/q/26651337
tagged with: jquery
has title: One Page Website - Url Waypoints
type: AnsweredQuestion
has body: I'm trying to create a one page website with jQuery. i'm trying to figure out how I change the URL of the website (E.g. www.test.be) when I click the right menu item. Right now it just gives (www.test.be/#) But I'd like it to say (www.test.be/work) for example. Also when I refresh I'd like the website to be on the page where the user was, not the first page. Would this be possible to achieve?
has answer: http://stackoverflow.com/a/26651405
type: Question
has comment: http://stackoverflow.com/comment/41906456
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26651405
has comment: http://stackoverflow.com/comment/41906369
answer count: 1

http://stackoverflow.com/comment/41724161
comment on: http://stackoverflow.com/a/26550433
type: AnswerComment
score: 0
type: Comment
has text: @Barmar And it is. But, the first terror is that an unknown method is called. If the say() method would exist, different error would be produced - `ReferenceError: Invalid left-hand side in assignment`

http://stackoverflow.com/a/26615931
has comment: http://stackoverflow.com/comment/41852098
has body: HttpResponse POST. If you know the keys of the data, then you can access via request.POST['KEY']. Otherwise, iterate through the dictionary and grab what you like.
has comment: http://stackoverflow.com/comment/41847367
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26615742
score: 0
answers question: http://stackoverflow.com/q/26615742
has comment: http://stackoverflow.com/comment/41847648
type: Answer

http://stackoverflow.com/q/26527514
upvote count: 3
has title: How do I upload multiple files at a time in express using formidable
type: Question
has comment: http://stackoverflow.com/comment/41829195
tagged with: formidable
tagged with: javascript
tagged with: express
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I am trying to upload files using formidable module. But when I select multiple files to upload, only the first one gets uploaded. I am new to node. here is my upload function exports.uploadPhotos = function(req, res) { console.log("upload received"); var form = new formidable.IncomingForm(); form.multiples = true; form.parse(req, function(err, fields, files) { res.status(200, { 'content-type': 'text/plain' }); res.end('received upload:\n\n'); res.end(util.inspect({ fields: fields, files: files })); }); form.on('end', function(fields, files) { /* Temporary location of our uploaded file */ var temp_path = this.openedFiles[0].path; /* The file name of the uploaded file */ var file_name = this.openedFiles[0].name; /* Location where we want to copy the uploaded file */ var new_location = 'uploads/'; fs.copy(temp_path, new_location + file_name, function(err) { if (err) { console.error(err); } else { console.log("success!"); } }); }); }; and when I call this, following gets printed received upload: { fields: { itemPhoto: '' }, files: { upload: [ [Object], [Object] ] } } what should I do to get all files uploaded?
has comment: http://stackoverflow.com/comment/41829172
tagged with: node.js
score: 3
answer count: 0

http://stackoverflow.com/comment/41699019
score: 0
type: Comment
has text: you should however put `;` at the end of both of those lines
comment on: http://stackoverflow.com/a/26534548
type: AnswerComment

http://stackoverflow.com/comment/41880784
score: 0
comment on: http://stackoverflow.com/q/26636472
type: Comment
type: QuestionComment
has text: Beyerz: Your `var modal = 'null'` does not create a property on an object. It creates a local variable that is shard by all the functions inside the IIFE. The value of `this` in a function is dynamic, and defined at the time of the call. Do you intend `this` to refer to the instance and for `this.modal` to refer to a property on the instance? If so, then put a `modal: null` property in your `createInstance()` and change the condition to `if(this.modal != null)`

http://stackoverflow.com/q/26646526
tagged with: jquery
has body: I have the below table with checkboxes in it that will compare what is in each row up to a maximum of 3 items to compare. So I am wanting some jQuery that will only allow 3 checkboxes to be selected, and then it will dynamically add a number to the end of the name attribute. So if there were 2 to compare, the name attributes would be "horse_1" and "horse_2". I have no clue where to start! 1 2 3 4
accepted answer: http://stackoverflow.com/a/26647988
has comment: http://stackoverflow.com/comment/41898318
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26647988
has title: Add number to checkbox attributes and limit number of checked checkboxes
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41898299
has comment: http://stackoverflow.com/comment/41899170
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41783254
type: Comment
has text: This is an example I wrote to test, and everything is okay. http://jsfiddle.net/creeper/pka43o5c/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26583195

http://stackoverflow.com/a/26642309
has body: you need to add track by in the ng-options and that's it.
score: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/55339276
answers question: http://stackoverflow.com/q/26641536
upvote count: 1
has comment: http://stackoverflow.com/comment/55347746

http://stackoverflow.com/a/26596661
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26596532
has body: I am not sure but this might be it....you are calling two functions with return statement in both, as soon as it encounters the first return statement, your code execution ends. Did you try putting an alert in your regex() function? Can you try that and prove my statement right/wrong here. your workaround: function both(){ var valid = validation(); var regexvalid = regex(); if(valid &amp;&amp; regexvalid) return true; else return false; }

http://stackoverflow.com/comment/41826735
type: QuestionComment
comment on: http://stackoverflow.com/q/26607084
has text: @Toby That pastebin url is not yours.
score: 0
type: Comment

http://stackoverflow.com/comment/41870926
has text: Welcome to Stack Overflow. Best way to check is to use a get request to see if you get a 404 status code. There may be some issue with the google maps url you're using because my sites (using their embed option) never have 404s when showing the map.
score: 0
comment on: http://stackoverflow.com/q/26630650
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26662295
answers question: http://stackoverflow.com/q/26662080
score: 0
has body: As I understand it, 2 + 2 + "hello" is evaluated this way: Find any operators and push them on the operator stack: stack: +, + Find any symbols and push them on the operand stack: stack: 2, 2, "hello" Take the first operator from the operator stack and the first 2 operands from the operands stack, do: 2 + 2 = 4 Take the first operator and the first 2 operands, do: 4 + "hello" = "4hello" Mind you, JS automatic type conversion works this way with the + operator (which is both addition and concatenation), it may (and does) work differently in other places. 4 - "hello" will make no sense and "0" == true will evaluate to false whereas 0 == '' stands. This is one of the reasons Javascript is one of the most beloved languages of today.
type: Answer

http://stackoverflow.com/a/26661910
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26661685
upvote count: 1
answers question: http://stackoverflow.com/q/26661685
has comment: http://stackoverflow.com/comment/41926860
type: Answer
downvote count: 0
score: 1
has body: I recommend using either chrome/chromium or safari for their web console. You can then open up the web inspector and set the inspector to catch all errors. The tools there should help you figure out where the problem is. Update: Looking at the link you provided I saw the problem is with the imageloader.js call. It seems to be defining multiple times the same object. You could try wrapping it in a js check. Update 2: Ok so I tested your scripts in jsfiddle. I found the problem to be based in a conflict between dojo and the imagesloaded script. I set up a jsfiddle to test out the scripts to see if the class imagesLoader is defined. In the left toolbar if you change in the settings on the left between jQuery and Dojo frameworks the imagesLoaded js script stops working. The problem is that since it is packaged it doesn't signal an error. Either you make a new script from scratch or find an alternative. if(!alreadyDefined) { alreadyDefined=true; //Rest of your code. }

http://stackoverflow.com/q/26555821
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26556028
accepted answer: http://stackoverflow.com/a/26556028
tagged with: css
has answer: http://stackoverflow.com/a/26556825
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26556035
has title: Change an img height so it's at a certain aspect ratio to it's width with jQuery
has body: I have an image that I need to change the dimensions of with jQuery. The image width should be the same as the width of it's parent div. The parent div is a responsive column container, so it's width is dynamic(fluid). Once the width of the image is changed, the height should also be changed to a value that would correspond with the aspect ratio of 16:9 in relation to the image's width. So let's say the column width is 1920... the image height would then be 1080. How can I modify my code to do this? $(document).ready(function(){ $('#featured-articles').find('.featured').each(function(){ var slide = $(this); $(this).find('img[rel="featured_preview"]').each(function(){ var new_width = slide.width(); var new_height = ????? $(this).prop("width", new_width).prop("height", new_height); }); }); }); &lt;div id="featured-articles"&gt; &lt;div class="featured"&gt; &lt;img src="slide.jpg" rel="featured_preview"&gt; &lt;/div&gt; &lt;div class="featured"&gt; &lt;img src="slide2.jpg" rel="featured_preview"&gt; &lt;/div&gt; &lt;/div&gt;
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/26556035

http://stackoverflow.com/comment/41751948
comment on: http://stackoverflow.com/q/26566325
type: Comment
type: QuestionComment
has text: @isim - of course! :) and done..there seems to be a time limit to when i can accept the answer.
score: 0

http://stackoverflow.com/a/26629195
accepted answer of: http://stackoverflow.com/q/26628718
score: 1
has body: the way you wrote document.getElementById(id).innerHTML = " "; the tag was getting closed instantly with the elements outside, changed it to 1 string instead of all the += and the formatting from CSS applied and the closed at the right place. from document.getElementById(id).innerHTML = " "; document.getElementById(id).innerHTML += " days"; document.getElementById(id).innerHTML += " "+ days +" "; document.getElementById(id).innerHTML += " "; document.getElementById(id).innerHTML += " hours"; document.getElementById(id).innerHTML += " "+ hours +" "; document.getElementById(id).innerHTML += " "; document.getElementById(id).innerHTML += " minutes"; document.getElementById(id).innerHTML += " "+ minutes +" "; document.getElementById(id).innerHTML += " "; document.getElementById(id).innerHTML += " seconds"; document.getElementById(id).innerHTML += " "+ seconds +" "; document.getElementById(id).innerHTML += " "; document.getElementById(id).innerHTML += " "; to document.getElementById(id).innerHTML = " " + " days" + " " + days + " " + " " + " hours" + " " + hours + " " + " " + " minutes" + " " + minutes + " " + " " + " seconds" + " " + seconds + " " + " " + " " DEMO: http://jsfiddle.net/fqs3L4pr/
answers question: http://stackoverflow.com/q/26628718
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26551011
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26550843
has body: var x = func(); //Means you execute the function and output its return value to x; var x = func; //Means you attribute the function to the variable, so you can call it, using x. Example function f(){ return 4; } var x = f(); // x = 4 var x = f; // x = f()
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/41724180
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26550843

http://stackoverflow.com/comment/41753724
type: Comment
type: QuestionComment
has text: You haven't loaded jQuery in your page, please do it and use the dev tools for debugging.
comment on: http://stackoverflow.com/q/26567301
score: 0

http://stackoverflow.com/a/63550969
type: Answer
answers question: http://stackoverflow.com/q/26594531
score: 1
has body: You don't HAVE to use an ajax call, depending on your app. To play with Ace you can so something simple like this: <?php $s = file_get_contents('foo.php'); ?> Note that you can pass EITHER an element id or an element to ace.edit. You can display any string content using setValue()
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/41848276
type: AnswerComment
score: 1
type: Comment
has text: I wondered about that. Since `orderNum` is a variable, it should be outside the quotes, and simply removing `objIE` should fix it. You were very close!
comment on: http://stackoverflow.com/a/26618634

http://stackoverflow.com/a/53712287
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26652110
downvote count: 0
score: 1
has body: Some crawling functionalities may be achieved with Google Puppeteer. According to the documentation: Most things that you can do manually in the browser can be done using Puppeteer! Here are a few examples to get you started: Generate screenshots and PDFs of pages. Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)). Automate form submission, UI testing, keyboard input, etc. Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features. Capture a timeline trace of your site to help diagnose performance issues. Test Chrome Extensions.

http://stackoverflow.com/comment/41897292
has text: try out http://momentjs.com/
score: 0
comment on: http://stackoverflow.com/q/26645656
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41670299
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26520481
has text: one way to do it is to abort the previous request before sending a new request...
score: 0

http://stackoverflow.com/a/26533683
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42141276
accepted answer of: http://stackoverflow.com/q/26527689
downvote count: 0
answers question: http://stackoverflow.com/q/26527689
has comment: http://stackoverflow.com/comment/60267553
score: 4
has comment: http://stackoverflow.com/comment/42248674
type: AcceptedAnswer
has body: The Safari extension settings API might be the best thing to use for this. This works similarly to localStorage and is accessible via safari.extension.settings. However, this isn't accessible directly from injected scripts, so you have to use messages to pass data from a global page. Something like this in your injected script: safari.self.addEventListener('message', handleMessage, false); safari.self.tab.dispatchMessage('getSetting', 'myVar'); function handleMessage(msg) { if (msg.name === 'returnSetting') { var setting = msg.message; } } And in your global page: safari.application.addEventListener('message', handleMessage, false); function handleMessage(msg) { if (msg.name === 'getSetting') { var setting = safari.extension.settings(msg.message); safari.application.activeBrowserWindow.activeTab.page.dispatchMessage('returnSetting', setting); } } Alternatively, you could do more or less the same thing with localStorage within the domain of the global page, so it isn't restricted to web pages of one domain.
has comment: http://stackoverflow.com/comment/42132554

http://stackoverflow.com/a/26526725
has body: Well no you can't use is finite as that will only return true for a finite number. For example isFinite(1/0) returns false. Infinity is a number its just not finite. I'd suggest looking at how the big libraries do it for example: Jquery isNumeric: function( obj ) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN return obj - parseFloat( obj ) &gt;= 0; } Underscore.js function isNumber(obj) { return toString.call(obj) == '[object Number]'; }
answers question: http://stackoverflow.com/q/26526511
score: 0
type: Answer

http://stackoverflow.com/comment/41842732
type: AnswerComment
has text: there is one helpfull property you can use `input.validity` that will provide you with `badInput customError patternMismatch rangeOverflow rangeUnderflow stepMismatch tooLong typeMismatch valid`
type: Comment
comment on: http://stackoverflow.com/a/26615470
score: 3

http://stackoverflow.com/comment/41931677
has text: figured out the problem, see the update for details
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26664441

http://stackoverflow.com/q/26549933
has answer: http://stackoverflow.com/a/26550132
has answer: http://stackoverflow.com/a/26550029
downvote count: 3
has comment: http://stackoverflow.com/comment/41722450
type: Question
tagged with: jsfiddle
has answer: http://stackoverflow.com/a/26550067
tagged with: javascript
score: -3
has comment: http://stackoverflow.com/comment/41767451
answer count: 3
has body: Sorry for the stupid question...I found other similar question but I couldn't figure it out. I don't understan why it doesn't work. I copy the code from http://jsfiddle.net/sB49B/21/ I think the problem should be the onload but i'm not sure because what I tried didn't work. I tride to include the code in: jQuery(document).ready(function($){ code javascript )}; and in: $(document).ready(function(){ code javascript )}; Do you have any Idea??! This is the error: Uncaught SyntaxError: Unexpected token ) Here the code: jsfiddle.net/sB49B/18/ n/a 1 2 3 4 5 6 7 8
has title: Copy the code from JSFiddle
upvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/26564307
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41749100
has body: I've made an onkeyup event, and once I click on another textbox anywhere, and then click again on the textbox that fires the onkeyup, it won't fire it. It does work the first time I click the textbox, though. My code: HTML: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <asp:TextBox ID="email" runat="server" AutoPostBack="true" onkeyup="checkUsernameUsage(this.value)" style="font-size: 20px; text-align:center; border-radius: 20px;" class="RegisterButton" ValidationGroup="registergroup" placeholder="What's your Email?"></asp:TextBox> <asp:Label ID="Label2" runat="server"></asp:Label> </asp:UpdatePanel> Javascript: Any suggestions?
answer count: 0
score: 0
type: Question
has title: How do I fire onkeyup event after I lost focus?
has comment: http://stackoverflow.com/comment/41748673
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26565301
has comment: http://stackoverflow.com/comment/41750450
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41750463
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/26565346
score: 0
has comment: http://stackoverflow.com/comment/41749865
upvote count: 1
linked to: http://stackoverflow.com/q/336859
answer count: 1
downvote count: 1
has body: Why does function expressions does not be in stack if it is invoked before its occurence? console.log( myFunc()); var myFunc = function(){ }; Regular function declaration works right.
has answer: http://stackoverflow.com/a/26565346
has title: Javascript functions initialized as a expression

regex
tags question: http://stackoverflow.com/q/26601038
tags question: http://stackoverflow.com/q/26653700
tags question: http://stackoverflow.com/q/26560763
tags question: http://stackoverflow.com/q/26515510
tags question: http://stackoverflow.com/q/26592205
tags question: http://stackoverflow.com/q/26609726
tags question: http://stackoverflow.com/q/26635027
tags question: http://stackoverflow.com/q/26668800
tags question: http://stackoverflow.com/q/26668249
tags question: http://stackoverflow.com/q/26632476
tags question: http://stackoverflow.com/q/26584958
tags question: http://stackoverflow.com/q/26567581
tags question: http://stackoverflow.com/q/26605584
tags question: http://stackoverflow.com/q/26566843
tags question: http://stackoverflow.com/q/26550543
tags question: http://stackoverflow.com/q/26540086
tags question: http://stackoverflow.com/q/26667973
tags question: http://stackoverflow.com/q/26523690
tags question: http://stackoverflow.com/q/26612627
tag name: regex
tags question: http://stackoverflow.com/q/26620206
tags question: http://stackoverflow.com/q/26671307
tags question: http://stackoverflow.com/q/26513835
tags question: http://stackoverflow.com/q/26617270
tags question: http://stackoverflow.com/q/26520367
tags question: http://stackoverflow.com/q/26645638
tags question: http://stackoverflow.com/q/26556856
tags question: http://stackoverflow.com/q/26589545
tags question: http://stackoverflow.com/q/26539571
tags question: http://stackoverflow.com/q/26566696
tags question: http://stackoverflow.com/q/26527727
tags question: http://stackoverflow.com/q/26598646
tags question: http://stackoverflow.com/q/26580481
tags question: http://stackoverflow.com/q/26661947
tags question: http://stackoverflow.com/q/26660459
tags question: http://stackoverflow.com/q/26541550
tags question: http://stackoverflow.com/q/26586242
tags question: http://stackoverflow.com/q/26584836
tags question: http://stackoverflow.com/q/26553113
tags question: http://stackoverflow.com/q/26655648
tags question: http://stackoverflow.com/q/26596532
tags question: http://stackoverflow.com/q/26660377
tags question: http://stackoverflow.com/q/26631304
tags question: http://stackoverflow.com/q/26634403
tags question: http://stackoverflow.com/q/26659202
tags question: http://stackoverflow.com/q/26570687
tags question: http://stackoverflow.com/q/26600303
tags question: http://stackoverflow.com/q/26572476
tags question: http://stackoverflow.com/q/26550021
tags question: http://stackoverflow.com/q/26631022
tags question: http://stackoverflow.com/q/26525516
tags question: http://stackoverflow.com/q/26583674
tags question: http://stackoverflow.com/q/26536793
tags question: http://stackoverflow.com/q/26587230
tags question: http://stackoverflow.com/q/26580849
tags question: http://stackoverflow.com/q/26519292
tags question: http://stackoverflow.com/q/26656148
tags question: http://stackoverflow.com/q/26655972
tags question: http://stackoverflow.com/q/26595788
tags question: http://stackoverflow.com/q/26586753
tags question: http://stackoverflow.com/q/26572036
tags question: http://stackoverflow.com/q/26588888
tags question: http://stackoverflow.com/q/26562701
tags question: http://stackoverflow.com/q/26556969
tags question: http://stackoverflow.com/q/26623200
tags question: http://stackoverflow.com/q/26606679
tags question: http://stackoverflow.com/q/26611678
tags question: http://stackoverflow.com/q/26541898
tags question: http://stackoverflow.com/q/26608622
tags question: http://stackoverflow.com/q/26570804
tags question: http://stackoverflow.com/q/26668734
tags question: http://stackoverflow.com/q/26571625
tags question: http://stackoverflow.com/q/26583633
tags question: http://stackoverflow.com/q/26640653
tags question: http://stackoverflow.com/q/26533116
tags question: http://stackoverflow.com/q/26618363
tags question: http://stackoverflow.com/q/26594504
tags question: http://stackoverflow.com/q/26659840
tags question: http://stackoverflow.com/q/26629703
tags question: http://stackoverflow.com/q/26575839

http://stackoverflow.com/a/26672263
has body: This is an issue with the plugin which has previously been fixed. Update to the latest version (currently 1.6.2) from the GitHub - the version loopj.com is only the last major revision - now several years old.
has comment: http://stackoverflow.com/comment/42012899
accepted answer of: http://stackoverflow.com/q/26612278
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26612278
score: 0
type: Answer

http://stackoverflow.com/q/26640666
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/100527327
has comment: http://stackoverflow.com/comment/41903372
has comment: http://stackoverflow.com/comment/41888885
has comment: http://stackoverflow.com/comment/41891306
has comment: http://stackoverflow.com/comment/41903308
has comment: http://stackoverflow.com/comment/46742279
downvote count: 0
answer count: 1
has body: For some reason, I have a very small delay when I click my extension before the popup is loaded. It's a 1-2 second hiccup before the popup displays, while all my other extensions display the popup html immediately. As you can see above, there is even the loading cursor animation when I click the popup, which never happens for the other extensions. Here is my popup html: Add a website to block Website Address: My popup.js var addWebsiteForm; document.addEventListener('DOMContentLoaded', function(){ addWebsiteForm = document.getElementById("addWebsiteForm"); addWebsiteForm.addEventListener('submit', addWebsite); }); function addWebsite(event) { event.preventDefault(); var websiteAddressInput = document.getElementById("websiteAddress"); var websiteAddress = websiteAddressInput.value; var storedWebsites; chrome.storage.local.get('websites', function(objects) { if (!objects.websites) { storedWebsites = []; } else { storedWebsites = objects.websites; } storedWebsites.push({'address':websiteAddress}); chrome.storage.local.set({'websites':storedWebsites}); addWebsiteForm.reset(); websiteAddressInput.focus(); }); } And my manifest: { "manifest_version": 2, "name": "Quizlet Extension", "description": "Go through your flashcards before moving onto a website", "version": "1.0", "options_page":"options.html", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "storage" ] } Any ideas?
has answer: http://stackoverflow.com/a/40540982
favorite count: 0
has comment: http://stackoverflow.com/comment/41888836
has comment: http://stackoverflow.com/comment/41888341
type: UnansweredQuestion
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41899027
linked to: http://stackoverflow.com/q/29191671
tagged with: popup
score: 1
has comment: http://stackoverflow.com/comment/41903236
upvote count: 1
linked to: http://stackoverflow.com/q/26276815
has title: Slight loading delay with chrome extension popup

http://stackoverflow.com/q/26598166
tagged with: javascript
has body: The problem: I just successfully got my Node.js server all working properly and setup with SSL, great. But then I see this: [blocked] The page at 'https://www.mywebsite.com/' was loaded over HTTPS, but ran insecure content from 'http://54.xxx.xxx.77:4546/socket.io/socket.io.js': this content should also be loaded over HTTPS. I tried just changing the socket.io URL to https, but of course that doesn't work because socket.io insists on serving it's own generated file, a process that I don't think I control. I can change the port that socket.io listens on, that's it. The question: So how do I securely serve socket.io (1.0)? The codez: var port = 4546; var io = require('/node_modules/socket.io')(port); As a side note, I think socket.io (its back and forth communication) should run over HTTPS properly without any extra work; I read that somewhere. Perhaps someone can confirm. It is important that the web socket's communications be securely transferred.
linked to: http://stackoverflow.com/q/24237184
tagged with: node.js
favorite count: 0
has comment: http://stackoverflow.com/comment/41810688
type: UnansweredQuestion
upvote count: 1
tagged with: socket.io-1.0
tagged with: socket.io
tagged with: https
score: 1
has answer: http://stackoverflow.com/a/26599396
type: Question
has comment: http://stackoverflow.com/comment/41812874
has title: How do I serve socket.io over HTTPS with Node?
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/41772463
comment on: http://stackoverflow.com/a/26565920
type: AnswerComment
score: 0
type: Comment
has text: http://jsfiddle.net/kj5eft82/2/? Show me plz your logic by example, i don't understand what you want. In your example i see 1 in + N out, and 1 out + N in.

http://stackoverflow.com/q/26613681
score: 0
answer count: 1
tagged with: django-tables2
has body: I have an html table rendered with django-tables2 and I need to take the value from the three fistt columns and pass it as argument to another template. {% block table %} {% block table.thead %} {% for column in table.columns %} {% if column.orderable %} {{ column.header }} {% else %} {{ column.header }} {% endif %} {% endfor %} {% endblock table.thead %} {% block table.tbody %} {% for row in table.page.object_list|default:table.rows %} {# support pagination #} {% block table.tbody.row %} {% for column, cell in row.items %} {{ cell }} {% endfor %} {% endblock table.tbody.row %} {% endfor %} {% endblock table.tbody %} {% block table.tfoot %} {% endblock table.tfoot %} {% if table.page %} {% block pagination %} {% bootstrap_pagination table.page %} {% endblock pagination %} {% endif %} {% endblock table %} I need to take the value from the three first columns and pass it as argument. In the fourth column I have a drop down button inserted with a javascript function, I can insert the input text with an JS function but I don't know how to pass the value of the cell to the input cell. If change this line {{ cell }} like this <input type="text" value="{{ cell }}" Works but all the cells are converted to input text and I only need to convert the first three columns
type: UnansweredQuestion
tagged with: django
has answer: http://stackoverflow.com/a/26647322
tagged with: django-forms
type: Question
has title: convert table cells to form input text with django
tagged with: javascript

http://stackoverflow.com/a/26635823
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: I'm not sure this is the best way of having a partial menu. But to make it load earlier, just remove the 'dom ready' part. And put that inside the #navbar-partial element in your HTML, and it will work. I would however suggest that you look in to using a server side include, which AFAIK most web servers support. then all you'd need is something like this You can read more about them here: http://www.ssi.su/#include
answers question: http://stackoverflow.com/q/26635111

http://stackoverflow.com/comment/41806674
has text: Clicking "cancel" makes [`confirm()`](https://developer.mozilla.org/en-US/docs/Web/API/Window.confirm) return false to your `onclick` handler, which prevents the default action (submit).
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26596079

http://stackoverflow.com/a/26667801
score: 41
has comment: http://stackoverflow.com/comment/41936948
has comment: http://stackoverflow.com/comment/101984474
has comment: http://stackoverflow.com/comment/131289701
has comment: http://stackoverflow.com/comment/41937120
has comment: http://stackoverflow.com/comment/41937067
has body: This should do the trick $(function() { $("#datepicker").datepicker(); $("#datepicker").on("change",function(){ var selected = $(this).val(); alert(selected); }); }); It's basic but here is a jsfiddle with it alerting the selected date when selected update to change the date format $(function() { $( "#datepicker" ).datepicker({ dateFormat: "yy-mm-dd" }); $("#datepicker").on("change",function(){ var selected = $(this).val(); alert(selected); }); }); jsfiddle 3rd update $(function() { $("#datepicker").datepicker({ dateFormat: "yy-mm-dd", onSelect: function(){ var selected = $(this).val(); alert(selected); } }); }); I have used a little more of the native markup for datepicker ui here try this and see if you get the alert as you are after. 4th Update $(function() { $("#datepicker").datepicker({ dateFormat: "yy-mm-dd", onSelect: function(){ var selected = $(this).datepicker("getDate"); alert(selected); } }); }); The 4th method uses $(this).datepicker("getDate") instead of $(this).val() as $(this).datepicker("getDate") returns a date object and $(this).val() returns the date as a string. Depending on your needs select which one is appropriate. (Added 4th method and explanation of the difference after @TimothyC.Quinn commented that the getDate being the correct method)
type: AcceptedAnswer
downvote count: 0
upvote count: 41
answers question: http://stackoverflow.com/q/26667720
has comment: http://stackoverflow.com/comment/41937258
type: Answer
has comment: http://stackoverflow.com/comment/41937082
has comment: http://stackoverflow.com/comment/41937038
has comment: http://stackoverflow.com/comment/131296621
has comment: http://stackoverflow.com/comment/41937341
accepted answer of: http://stackoverflow.com/q/26667720

http://stackoverflow.com/q/26657488
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41953596
upvote count: 2
answer count: 2
tagged with: javascript
tagged with: jquery
has title: How to hide div when it's already open?
possible better answer: http://stackoverflow.com/a/26658177
has body: I couldn't think of any better title, so I will try to explain my question here as clear as possible. I'm quite a newbie in JQuery so this is probably a very easy question. I have some divs with a button on it. When you click the button, another div should pop-up. My question is: How can I make the div, which is already open, close when clicking on another button? I made a fiddle with some example code: http://jsfiddle.net/zuvjx775/1/ And the example code here: HTML: JQuery: $('.showDiv').on('click', function(){ var id = $(this).attr('id'); $('.show_'+id).show(); }); When show_1 for example is visible, and I click on the button in div2, I want show_2 to come up, which it does, but show_1 to dissapear. Can someone point me in the right direction?
has answer: http://stackoverflow.com/a/26658177
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26657541
accepted answer: http://stackoverflow.com/a/26657541
type: Question

http://stackoverflow.com/a/26639290
has body: you need to define the variables elemin and elemout locally Demo $(".goodi").hover(function () { var elemin = this; $(elemin).animate({ "height": "50px" }, 1000); }, function () { var elemout = this; setTimeout(function () { $(elemout).animate({ "height": "100px" }, 1000); }, 1000); });
answers question: http://stackoverflow.com/q/26639176
upvote count: 3
score: 3
downvote count: 0
type: Answer

http://stackoverflow.com/a/26563802
accepted answer of: http://stackoverflow.com/q/26563451
score: 2
has comment: http://stackoverflow.com/comment/41753823
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: Javascript only. You might not need to return the entire unsorted array. But this should do the trick so far. I have to admit that actually don't know if its faster than the jquery solution, as you mentioned performance reasons. var elements = document.getElementsByClassName('item'); function maximum(e){ var arr = []; var delay = 0; var speed = 0; var res = 0; for(var i=0;i&lt;e.length;i++) { speed = parseInt(e.item(i).getAttribute('data-speed'), 10); delay = parseInt(e.item(i).getAttribute('data-delay') || 0, 10); res = speed + delay; arr.push(res); } return arr.sort(function(a, b){return b-a}); } var myMax = maximum(elements); alert(myMax[0]);
answers question: http://stackoverflow.com/q/26563451
type: Answer

http://stackoverflow.com/q/26554424
linked to: http://stackoverflow.com/q/7615214
has comment: http://stackoverflow.com/comment/41738347
tagged with: javascript
duplicate of: http://stackoverflow.com/q/7496727
has comment: http://stackoverflow.com/comment/41738029
upvote count: 2
downvote count: 1
answer count: 1
has body: I have the following JavaScript/jQuery code: if (isVariance &amp;&amp; value) tableCell.addClass('NonZeroVariance'); Where: isVariance == true and value == "0.00". (isVariance &amp;&amp; value) == "0.00". (isVariance &amp;&amp; !!value) == true. The if condition evaluates to true, and the class is added to tableCell. So, my expectation was that zero would be interpreted as false, and that "0.00" would be evaluated as false. But that's not what happens here. Can someone tell me why?
has comment: http://stackoverflow.com/comment/41730743
favorite count: 0
has comment: http://stackoverflow.com/comment/41731916
has title: Boolean Value of Zero
linked to: http://stackoverflow.com/q/7496727
has comment: http://stackoverflow.com/comment/41730671
has comment: http://stackoverflow.com/comment/41730598
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41733487
has comment: http://stackoverflow.com/comment/41730656
has comment: http://stackoverflow.com/comment/41738109
type: Question
has answer: http://stackoverflow.com/a/26554533
accepted answer: http://stackoverflow.com/a/26554533

http://stackoverflow.com/q/26630096
tagged with: combobox
has comment: http://stackoverflow.com/comment/41906120
has comment: http://stackoverflow.com/comment/41909594
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41870202
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41906448
has title: Please help out for the below code for combobox properties
answer count: 1
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41923769
tagged with: jquery
has comment: http://stackoverflow.com/comment/41870000
has comment: http://stackoverflow.com/comment/41910076
favorite count: 0
has body: I have three comboboxes, with same values for all. Here is the Code : $(document).ready(function(){ $("select").change(function(e){ var id = $(this).attr("id"); var value = this.value; $("select option").each(function(){ var idParent = $(this).parent().attr("id"); if(id != idParent){ if(this.value == value){ this.disabled = true; } else if($("#box_g1 option:selected").val()!="Default"){ $("#box_g2").prop("disabled", false); $("#box_g3").prop("disabled", false); }else{ $("#box_g2").prop("disabled",true).val('Disabled'); $("#box_g3").prop("disabled",true).val('Disabled'); } } }); }); }); Default A B C Disabled A B C Disabled A B C Problem i am getting : when i select value 'A' from combobox1 and then select value 'B' from combobox1 (from same combobobox), the value in combobox2 disabled value should be 'B' not 'A'. Same behaviour is for combobox3. If we select, value 'Default' from combobox1, then all the combobxes should reset with default values and also combobox2 and combobox3 with 'Disabled' attribute. Please help.
has comment: http://stackoverflow.com/comment/41896989
has comment: http://stackoverflow.com/comment/41916755
has answer: http://stackoverflow.com/a/26630267

http://stackoverflow.com/a/77087211
answers question: http://stackoverflow.com/q/26638432
has body: if you don't need to use handled onClick Event use : marker.off('click'); if you wnat to handel event and prevent popUp to show use : .on('click', function (event) { try{ event.preventDefault(); }catch(err){} });
score: 0
type: Answer

http://stackoverflow.com/comment/112223445
comment on: http://stackoverflow.com/a/26834631
type: AnswerComment
type: Comment
has text: The thing with plotly is, whereas the implementation is quite easy, the time it needs to render is kind of slow. D3.js in comparision is way faster than this. Nowadays (since this question is already 5 years old) there is a package called [R2D3](https://rstudio.github.io/r2d3/articles/shiny.html), which connects R to D3 quite easily.
score: 1

http://stackoverflow.com/comment/41826863
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26607323
has text: is it possible anyway to control other's browser???
score: 0

http://stackoverflow.com/q/26652905
has answer: http://stackoverflow.com/a/26652977
has answer: http://stackoverflow.com/a/26653042
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26653042
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41908979
possible better answer: http://stackoverflow.com/a/26652977
has body: Often there is situation when I need to add some event with some customizations and then apply those customizations on page ready. Usually I was doing it like: $(window).resize(function(){ //some code }).resize(); //trigger it when event defined Problem with this solution is that if I have many resize events, then if I trigger it like this - it will re-execute all previously defined events too. So another solution could be: var myCallback = function(){ /*some code*/ }; $(window).resize(function(){ myCallback(); }); myCallback(); And it does it correctly but I find it not so good looking code and also there is no this inside function changed to event target DOM element that is very useful quite often. Great would be something like $(window).addEventAndFireOnce("resize", function(){}); such function is not so hard to implement, but I'm wondering if there is something like this there already in js or jQuery.
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41910174
has answer: http://stackoverflow.com/a/26653076
answer count: 3
upvote count: 1
tagged with: events
favorite count: 0
has comment: http://stackoverflow.com/comment/41909073
has title: jQuery add event and instantly execute it
tagged with: triggers
has comment: http://stackoverflow.com/comment/41909111

http://stackoverflow.com/a/65439623
answers question: http://stackoverflow.com/q/26667720
type: Answer
score: 0
has body: The ideal way is to get the date and convert it to a common format and utilize the same. (may passing to server or so.) $("#datepicker").datepicker('getDate').toISOString() so it will get the date in ISO stander.

http://stackoverflow.com/q/26619346
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41850040
has comment: http://stackoverflow.com/comment/41849667
has title: Is there a way for include a or in all pages one time?
accepted answer: http://stackoverflow.com/a/26619486
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26619465
tagged with: import
possible better answer: http://stackoverflow.com/a/26619465
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41849861
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/26618893
has answer: http://stackoverflow.com/a/26619486
score: 0
has comment: http://stackoverflow.com/comment/41850298
has body: For example in a web application/website I have n... pages, and I must write always in all pages the information of imports css and javascript, is there a way for import this only in the index.html and apply it all pages? Thanks in advance!

http://stackoverflow.com/q/26666716
score: 1
has title: How to set an element to a default condition (hide ()) and when clicked (show())
tagged with: jquery
favorite count: 0
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41935486
tagged with: mouseevent
has body: Say I have a left-side chat bar with chat users. Each user has their image (much like Facebook's chat)and is clickable to open a chat box to start chatting away. Here's my code: $('.msg_wrap').hide(); $('.msg_box').hide(); $('.chat_user').click(function() { $('.msg_wrap').show(); $('.msg_box').show(); } I know this is wrong but what I want to do here is when the page loads for the first time, all the chatboxes to be hidden (hide ()). It is not until I click on a chat user (.chat_user) that a pop up/chat box appears (show()). How do I fix this code? Do I have to create a function?
has answer: http://stackoverflow.com/a/26667044
downvote count: 0

http://stackoverflow.com/comment/41838035
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26613242
has text: What do you mean by "does not work"?

icanhaz.js
tags question: http://stackoverflow.com/q/26645412
tag name: icanhaz.js
type: Tag

http://stackoverflow.com/comment/41869460
score: 0
comment on: http://stackoverflow.com/q/26630075
type: Comment
type: QuestionComment
has text: Regarding your solution, I think I see what you mean. If I understand correctly, this would make a scrolling page. Unfortunately I need to show/update the images in the exact same place to easily see what has changed from minute to minute for each picture. I'm afraid scrolling is not a viable option.

http://stackoverflow.com/a/26561375
has comment: http://stackoverflow.com/comment/41743293
has body: The reason you're seeing "Y" at the end is that you're overwriting the value you've put on Object.prototype.getName. When you call new X(), you're putting a getName property on prototypeX, which is a reference to (not a copy of) Object.prototype. So now Object.prototype has a getName which returns "X". When you call objectX.getObject(), that's doing a new Y() call, which involves setting getName on prototypeY. prototypeY is also a reference to (not a copy of) Object.prototype, and so the value set by Y overwrites the value set by X. The solution is don't change Object.prototype. Adding properties to Object.prototype is generally a bad idea. Adding enumerable properties (ones that show up in for...in loops) like your getName and getObject properties is always a bad idea. Below you've said: I have a background in java and i would like to do that : class Y, class X ( public Y getY() ( return new Y ) That's dramatically simpler than what you have: // Constructor function X function X() { } // Add some things to the prototype it assigns objects created via `new`. // Note that the object `X.prototype` refers to has `Object.prototype` as // its prototype, that's already been set up for you. X.prototype.getName = function() { return "X"; }; X.prototype.getObject = function() { return new Y(); }; // Constructor function Y function Y() { } // Add something to the prototype it assigns objects created via `new`. // `Y.prototype` also refers to an object that uses `Object.prototype` as // its prototype. Y.prototype.getName = function() { return "Y"; }; Or if you want to use named functions for debugging purposes, or have information that is only available to code within the various functions related to X and Y (like statics in Java), you might do this: // Define X var X = function() { // If you had `var` statements here, the vars would be accessible to // the code within this anonymous function, kind of like Java static // variables within a class. // Constructor function X func…
has comment: http://stackoverflow.com/comment/41743285
has comment: http://stackoverflow.com/comment/41745434
has comment: http://stackoverflow.com/comment/41745690
has comment: http://stackoverflow.com/comment/41743188
has comment: http://stackoverflow.com/comment/41743207
downvote count: 0
has comment: http://stackoverflow.com/comment/41743256
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26561348

http://stackoverflow.com/a/26548576
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26538976
answers question: http://stackoverflow.com/q/26538976
has body: I'm not seeing any errors, but one thing I noticed is a spelling mistake here: $('.next-sbumit').on('click', function(e) { e.preventDefault(); showSpinner(); }); next-sbumit should likely be next-submit - correct?
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41921829
comment on: http://stackoverflow.com/q/26659445
score: 0
type: Comment
type: QuestionComment
has text: Thanks for posting it, but you should [edit your question](http://stackoverflow.com/posts/26659445/edit) and include your code in there, so it's more readable for the other users.

http://stackoverflow.com/q/26540873
has title: jQuery to find element outside of current DOM not working
score: 0
answer count: 1
tagged with: jquery
has body: I am prototyping a commenting system. As there will be multiple posts to comment on. I am testing this by inserting text when the button "Send comment is clicked". When this button is clicked, it should search the parent to find the empty comment and append it with placeholder text, but it's not doing anything. HTML 0/400 Send comment jQuery $('.submit-comment').click(function() { event.preventDefault(); $(this).parent().find('.empty-comment').append('comment inserted'); }); JSFiddle
accepted answer: http://stackoverflow.com/a/26540892
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26540892
tagged with: find
tagged with: javascript

http://stackoverflow.com/comment/41824601
score: 0
type: Comment
has text: Hmm i don't think you understand for what i use this script. Basically i have a big post, and i split it into smaller parts, without making another post.
type: AnswerComment
comment on: http://stackoverflow.com/a/26605749

http://stackoverflow.com/comment/41832549
type: QuestionComment
score: 1
has text: with "$(window).scrollTop() > num" you will be then comparing pixels and percentage, which is kinda strange
comment on: http://stackoverflow.com/q/26610304
type: Comment

http://stackoverflow.com/a/26670670
has comment: http://stackoverflow.com/comment/41949748
has body: Here is a way to make a grid out of div tags. Live example here: http://jsfiddle.net/3x1kmcme/ var rows = 8, cells = 8, count = 0; var i, j, top = 0, left = 0; var boxWidth = 50, boxHeight = 50; var $canvas = $('#canvas'); var $fragment = $(document.createDocumentFragment()); function addBox(opts) { var div = document.createElement('div'); div.id = opts.id; div.className = 'alive'; div.style.top = opts.top + "px"; div.style.left = opts.left + "px"; div.innerHTML = '&lt;p&gt;' + opts.count + '&lt;/p&gt;'; $fragment.append(div); } for (j = 0; j &lt; rows; j += 1) { top = j * boxHeight; for (i = 0; i &lt; cells; i += 1) { count += 1; addBox({ count: count, id: 'item' + i, top: top, left: i * boxWidth }); } } // Append all $canvas.html($fragment);
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41950484
accepted answer of: http://stackoverflow.com/q/26668556
score: 0
answers question: http://stackoverflow.com/q/26668556
type: Answer
has comment: http://stackoverflow.com/comment/41965499

knockout-sortable
tag name: knockout-sortable
type: Tag
tags question: http://stackoverflow.com/q/26547025

http://stackoverflow.com/q/26670696
answer count: 4
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/41973375
has comment: http://stackoverflow.com/comment/41941959
has body: I have simple page with javascript which validates email written in input: email.html: Email validation email.js: var checkEmail = function() { var regexp = /BIG_REGEX/; var email = document.getElementById('email-input').value; if (email === '') removeFrame(); else if (regexp.test(email)) drawFrame('green'); else drawFrame('red'); }; var removeFrame = function() { var input = document.getElementById('email-input'); input.parentNode.style.backgroundColor = input.parentNode.parentNode.style.backgroundColor; }; var drawFrame = function(color) { var input = document.getElementById('email-input'); input.parentNode.style.backgroundColor = color; }; window.onload = function() { document.getElementById('email-input').onkeyup = checkEmail; }; I want to test validation functionality using CasperJS. Here is my test case: test/validator.test.js: var fillEmail = function(browser, email) { browser.sendKeys('#email-input', email, {reset: true}); }; var getValidation = function(browser) { var color = browser.evaluate(function () { return document.getElementById('email-input').parentNode.style.backgroundColor; }); return color; }; var validate = function(browser, email) { fillEmail(browser, email); return getValidation(browser); }; casper.test.begin('Validation testing', function suite(test) { casper.start('http://localhost:8000/email.html', function() { test.assertEquals(validate(this, 'uskovm@gmail.com'), 'green', 'uskovm@gmail.com'); test.assertEquals(validate(this, 'vnbgfjbndkjnv'), 'red', 'vnbgfjbndkjnv'); }).run(function() { test.done(); }); }); But when I run tests using casperjs test test/validator.test.js, there is always error after information about tests: Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///C:/Users/home/AppData/Roaming/npm/node_modules/casperjs/bin/bootstrap.js. Domains, protocols and ports must match. What's wrong? PhantomJS version: 1.9.8
has answer: http://stackoverflow.com/a/33816947
tagged with: integration-testing
upvote count: 24
has title: CasperJS and 'Unsafe JavaScript attempt to access frame with URL' error
has comment: http://stackoverflow.com/comment/41942062
tagged with: javascript
has comment: http://stackoverflow.com/comment/41942986
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27083831
linked to: http://stackoverflow.com/q/26608391
has answer: http://stackoverflow.com/a/34613599
favorite count: 0
score: 24
tagged with: casperjs
possible better answer: http://stackoverflow.com/a/32908270
type: Question
accepted answer: http://stackoverflow.com/a/27083831
has answer: http://stackoverflow.com/a/32908270

http://stackoverflow.com/comment/41798194
comment on: http://stackoverflow.com/q/26591506
score: 0
type: QuestionComment
type: Comment
has text: @Barmar It is a new property that I am adding.

http://stackoverflow.com/comment/41875821
comment on: http://stackoverflow.com/a/26634117
score: 0
type: AnswerComment
type: Comment
has text: What he said. You can also put the line `System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;` before the conversion code.

http://stackoverflow.com/a/26672459
upvote count: 1
answers question: http://stackoverflow.com/q/26671465
has body: this will allso help you &lt;input type="submit" id="demo" value="Submit form" onclick="getDate();"&gt; &lt;script language="javascript" type="text/javascript"&gt; function getDate() { var month_name = new Array("January", "February", "March","April", "May", "June","July", "August", "September","October", "November", "December"); var date = new Date(); var curr_month = date.getMonth(); var curr_year = date.getFullYear(); document.write(month_name[curr_month] + "," + curr_year); } &lt;/script&gt;
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/41847824
has text: What? the other 2 dropdowns aren't even showing though. Think you can make this into a fiddle instead? might be easier to work with.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26596109
type: QuestionComment

http://stackoverflow.com/q/26653232
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/26653275
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26653697
has title: checkbox combined with javascript
has comment: http://stackoverflow.com/comment/41909583
type: Question
has answer: http://stackoverflow.com/a/26653248
has body: I want to make a filter which works with a checkbox. When the checkbox is checked it should show some elements and when its not it should hide it. This is the code I've got so far but I cant get it to work properly. Anyone who can help me out? The html what got to hide/show &lt;li class="verwijder" class="kleding"&gt;&lt;img class="aanbieding" src="images/jack.png"&gt;&lt;span id="timer"&gt;&lt;/span&gt;&lt;/li&gt; The checkbox &lt;input id="checkboxeten" type="checkbox" name="filter" value="eten"&gt;&lt;br&gt; Javascript $(document).ready(function(){ if (document.getElementById("checkboxeten").checked = true) { $( ".kleding" ).show(); } else { $( ".kleding" ).hide(); } });

http://stackoverflow.com/a/26516276
type: Answer
answers question: http://stackoverflow.com/q/26516194
score: 3
upvote count: 3
has body: The default behaviour for your anchor is to redirect you to a new page. Return false from your function and click handler to prevent this. function addStudent() { d1 = document.getElementById('main-content'); d2 = document.getElementById('add-student'); d3 = document.getElementById('delete-student'); d4 = document.getElementById('para'); d2.style.display = "none"; d3.style.display = "none"; d4.style.display = "none"; d1.innerHTML = " Hello World "; return false; } Choose an Option: Add Student Delete Student
has comment: http://stackoverflow.com/comment/41662506
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26516194

http://stackoverflow.com/a/26621013
has comment: http://stackoverflow.com/comment/41853298
answers question: http://stackoverflow.com/q/26620979
score: 0
has comment: http://stackoverflow.com/comment/41853508
type: Answer
has comment: http://stackoverflow.com/comment/41852846
has comment: http://stackoverflow.com/comment/41853415
has body: Once you change the page's location the javascript stops running as the javascript was running on the previous page. So document.getElementById doesn't get executed.

http://stackoverflow.com/comment/41696632
type: Comment
type: QuestionComment
has text: Got it! Reading canvasTracking with canvasTracking = $(xml).find("canvasTracking").html(); brings it all back. The textContent just read the text node, which excluded anything that looked like HTML.
score: 0
comment on: http://stackoverflow.com/q/26530545

http://stackoverflow.com/comment/41784464
comment on: http://stackoverflow.com/q/26571733
type: Comment
type: QuestionComment
has text: possible duplicate of [Render template inside template using Backbone](http://stackoverflow.com/questions/26575526/render-template-inside-template-using-backbone)
score: 0

http://stackoverflow.com/q/26593474
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41807402
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42337010
has comment: http://stackoverflow.com/comment/41804228
has comment: http://stackoverflow.com/comment/41806854
answer count: 0
has comment: http://stackoverflow.com/comment/41902690
type: Question
has comment: http://stackoverflow.com/comment/41845160
has comment: http://stackoverflow.com/comment/41806419
has title: undefined function highcharts
has body: Hi I have been using highcharts and highstock for a year now and there has been no problem but suddenly when I load my website I am getting the below error: Uncaught TypeError: undefined is not a function highcharts.js:22a.fn. I have arranged all the libraries in the correct order and path and I did not get these errors before but now I am getting them. Please help me! I even tried previous stack overflow answers but none of them helped
tagged with: highcharts

http://stackoverflow.com/q/26614303
has comment: http://stackoverflow.com/comment/41842967
type: UnansweredQuestion
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/50552886
has title: JQGrid successfunc and errorfunc both fire on save
tagged with: jqgrid
tagged with: javascript
score: 0
has body: Edit: Using JQGrid 4.5.4 I am using JQGrid for inline editing and have overridden the inline save button to trigger the function "SaveRow". By default, the "successfunc" function only receives the server response but I need the rowID as well. As such I've written "successfunc" to take an extra parameter: function SaveRow(rowID) { //Get grid var grid = $('#' + JQGridName); //Create save parameters saveParams = { "successfunc": function(response) { SaveRowSuccess(rowID, response); }, "url": null, "extraparam": {}, "aftersavefunc": null, "errorfunc": SaveRowFailure, "afterrestorefunc": null, "restoreAfterError": false, "mtype": "POST" }; grid.jqGrid('saveRow', rowID, saveParams); } On a failed inline edit (code 500) "errorfunc" fires. The problem is that on a successful inline edit (code 200 ok) both "successfunc" and "errorfunc" fire. I believe this is a problem with how I've formatted "successfunc". What is the proper way to pass the rowID to this function?
has comment: http://stackoverflow.com/comment/41841283
tagged with: jquery

http://stackoverflow.com/a/26575706
type: Answer
answers question: http://stackoverflow.com/q/26575648
has comment: http://stackoverflow.com/comment/41818471
downvote count: 0
has body: If you remove those lines, rect instanceof Shape will return false. The following snippet writes rect instanceof Shape if those lines are commented out. // Shape - superclass function Shape() { this.x = 0; this.y = 0; } // superclass method Shape.prototype.move = function(x, y) { this.x += x; this.y += y; console.info('Shape moved.'); }; // Rectangle - subclass function Rectangle() { Shape.call(this); // call super constructor. } // subclass extends superclass // lines commented out: //Rectangle.prototype = Object.create(Shape.prototype); //Rectangle.prototype.constructor = Rectangle; var rect = new Rectangle(); rect instanceof Rectangle; // true document.getElementById("result").innerHTML = (rect instanceof Shape).toString(); &lt;div id="result"&gt;&lt;/div&gt;
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41818769

http://stackoverflow.com/q/26533038
has answer: http://stackoverflow.com/a/26533323
type: AnsweredQuestion
downvote count: 0
has body: I was wondering if there is a way to parse a URL in JavaScript so that you could get a piece of the URL you need? For example, the two urls below, for the first one, if I wanted to get the number at the end, what could I use? And would it be the same if I used the second URL to store 21 in a variable? Thanks. http://domain.com/test/?=23 http://domain.com/test/21
score: 1
has comment: http://stackoverflow.com/comment/41692499
type: Question
accepted answer: http://stackoverflow.com/a/26533222
tagged with: javascript
has title: Parse URL in JavaScript
answer count: 2
has answer: http://stackoverflow.com/a/26533222
upvote count: 1
has comment: http://stackoverflow.com/comment/41692381
favorite count: 0
tagged with: parsing
possible better answer: http://stackoverflow.com/a/26533323

http://stackoverflow.com/comment/41667624
comment on: http://stackoverflow.com/q/26517321
score: 0
type: Comment
type: QuestionComment
has text: You already answered the question: `individually if it works` you're replacing the entire prototype of Element with an object containing only 2 methods. I am not sure if JS allows you to replace the prototype of Element so the methods will not show up or if it does allow you to break Element.

http://stackoverflow.com/a/26623306
upvote count: 1
answers question: http://stackoverflow.com/q/26623121
downvote count: 0
score: 1
has body: Try this code. I have found number of fields filled using filter function and disabled other fields using each, when the maximum number of fields allowed are filled. JSFiddle jQuery(document).ready(function($){ $("#choices").on('keyup', function() { var maxAllowed = 3; var els = $(this).find('input, textarea'); var elsFilled = els.filter(function(i,el){ return el.value!="" }).length; if(elsFilled==maxAllowed) els.each(function(i,el){ if(el.value=="") el.disabled = true; }); else els.each(function(i,el){ if(el.value=="") el.disabled = false; }); }); });
type: Answer

http://stackoverflow.com/comment/41846693
has text: `$(".category-navbar value value")` what are you trying to select?
type: QuestionComment
comment on: http://stackoverflow.com/q/26617797
type: Comment
score: 1

http://stackoverflow.com/comment/41906895
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26646325
has text: Links IMO are the best way because it then means you can re navigate to the same page state when sharing a link or opening a link in a new tab.
score: 0

http://stackoverflow.com/q/26565198
type: UnansweredQuestion
answer count: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: JSON changes not staying?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41749642
has comment: http://stackoverflow.com/comment/41749821
score: 0
has comment: http://stackoverflow.com/comment/41749702
tagged with: attributes
has body: I needed to manipulate a JSON object so d3.js would know how to render it. It was structured { name:"Films", children:[...] } Later I looped through the children to add X and Y attributes to them similarly to this: for(var i = 0; i&lt;jsonobject.children.length; i++) { jsonobject.children[i].x=123; jsonobject.children[i].y=456; console.log(jsonobject.children[i]); } When I logged each element after the attribute assignment, it was clear that the X and Y were valid. After exiting the loop, all the X and Y attributes of the children were NaN. It appears that the X and Y were 'reset' at each iteration. Not sure if this this is a weird javascript thing, or if I'm doing something wrong. Code: http://jsfiddle.net/6kwn857o/

http://stackoverflow.com/q/26618934
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41848941
has answer: http://stackoverflow.com/a/26619070
answer count: 5
has answer: http://stackoverflow.com/a/26619172
tagged with: styles
has comment: http://stackoverflow.com/comment/41848937
tagged with: css
has answer: http://stackoverflow.com/a/26619223
accepted answer: http://stackoverflow.com/a/26619070
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41849048
has title: how to style a javascript button?
has body: Hello I am really struggling with styling the add button inside of this code I am just learning javascript , so it is kinda confusing on which to call for the css class. Check out the js fiddle. http://jsfiddle.net/infinityswift19/6xwyc6tn/ Attemping to style this line >> &lt;input type="button" value="Add" onclick="addItem(document.getElementById('ch1').rowIndex)" /&gt; Thanks for any response.
possible better answer: http://stackoverflow.com/a/26619154
type: Question
has comment: http://stackoverflow.com/comment/41849054
has answer: http://stackoverflow.com/a/26619154
tagged with: javascript
has comment: http://stackoverflow.com/comment/41848934
has comment: http://stackoverflow.com/comment/41848824
score: 0
has comment: http://stackoverflow.com/comment/41849097
has comment: http://stackoverflow.com/comment/41850110
has answer: http://stackoverflow.com/a/26619157
has comment: http://stackoverflow.com/comment/41849639

http://stackoverflow.com/q/26666513
has comment: http://stackoverflow.com/comment/41937932
has comment: http://stackoverflow.com/comment/41934719
answer count: 1
has comment: http://stackoverflow.com/comment/41934694
has answer: http://stackoverflow.com/a/26666625
favorite count: 0
has comment: http://stackoverflow.com/comment/41934799
has comment: http://stackoverflow.com/comment/41935059
has title: Why does my Array.prototype.equals function show up as an element in arrays copied using jQuery.extend()?
has comment: http://stackoverflow.com/comment/41934939
has comment: http://stackoverflow.com/comment/41934732
linked to: http://stackoverflow.com/q/7837456
downvote count: 1
has comment: http://stackoverflow.com/comment/41934737
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41934808
has comment: http://stackoverflow.com/comment/41934617
accepted answer: http://stackoverflow.com/a/26666625
has comment: http://stackoverflow.com/comment/41934877
upvote count: 1
has comment: http://stackoverflow.com/comment/41934925
has comment: http://stackoverflow.com/comment/41934993
has comment: http://stackoverflow.com/comment/41935001
type: Question
has comment: http://stackoverflow.com/comment/41935174
has comment: http://stackoverflow.com/comment/41934848
tagged with: arrays
has comment: http://stackoverflow.com/comment/41934884
has comment: http://stackoverflow.com/comment/41937906
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41935065
tagged with: prototype
has comment: http://stackoverflow.com/comment/41934803
has comment: http://stackoverflow.com/comment/41934769
score: 0
has body: In my program I have added the Array.prototype.equals() function listed in this SO post. I have the following function to perform deep-copies of arrays (I am using this strictly for logging purposes - so that I can see what my arrays look like at various points in time in the Chrome console.) function deepCopy(array) { return $.extend(true, [], array); } I then use this as such: console.log("Sorting metrics list by metric name..."); console.log("Metrics list before sort:"); console.log(deepCopy(metrics)); metrics.sort(compare); console.log("Metrics list after sort:"); console.log(deepCopy(metrics)); For reference, my compare function is: function compare(a, b) { return a.name.localeCompare(b.name); } When I view my metrics array in the Chrome console after the deepCopy(), the equals method defined for the Array.prototype is IN the array! Picture: As you can see from the screen shot, I check the actual value of the metrics array after everything has run, and it clearly does not contain the equals method. This is my reasoning for believing it has something to do with how jQuery().extend handles copying arrays. Any ideas on how to fix my deepCopy function to stop this? (Or change my prototype function, if needed.)

http://stackoverflow.com/comment/41696706
type: QuestionComment
has text: well its not clear to me, thats why im asking. What is your desired output? From what I understand, you have select dropdowns in the HTML and you need to compare each option to your XML, if theres a match, you want to set OR conditions?... thats where im confused. Explain it better so that we can help. The more info you provide the better.
comment on: http://stackoverflow.com/q/26534759
score: 0
type: Comment

http://stackoverflow.com/q/26516517
has comment: http://stackoverflow.com/comment/41663131
has answer: http://stackoverflow.com/a/26516547
has comment: http://stackoverflow.com/comment/41662968
downvote count: 2
has body: I am developing an application with Struts and jsp on a page I want to run Javascript 2 functions in the onclick event of a button How do I do? I've tried to separate the functions with a semicolon.
answer count: 1
tagged with: jsp
favorite count: 0
type: UnansweredQuestion
tagged with: events
upvote count: 0
has comment: http://stackoverflow.com/comment/41662855
type: Question
score: -2
has title: Running two Javascript functions in the onclick event of a button
tagged with: javascript

http://stackoverflow.com/comment/41811146
has text: this is actually a design error in `JSON.parse()` (oh! a design error in JavaScript! So rare! ohwait...) -> this shan't be a fatal error, it should return `null` or something. Or it should have a method that only checks validity (like `JSON.isValid()`, this would probably be the cleanest solution.)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26598376

http://stackoverflow.com/comment/41895513
type: QuestionComment
has text: the question is more about how to make the first code working.
comment on: http://stackoverflow.com/q/26644661
score: 0
type: Comment

http://stackoverflow.com/comment/46378573
score: 0
comment on: http://stackoverflow.com/a/26609459
type: Comment
has text: How to implement this. Can you please explain?
type: AnswerComment

http://stackoverflow.com/a/26602526
downvote count: 0
has body: This will work. Reason for this to work is that function is just defined and not evaluated at the time of writing this function. So, by the time you call this function, updateData variable already has a reference to function object and that reference will be passed to the object that you have defined inside.
type: Answer
answers question: http://stackoverflow.com/q/26602261
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26602261
type: AcceptedAnswer

http://stackoverflow.com/comment/41900487
has text: also, button isn't self closing.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26647758

http://stackoverflow.com/q/26652595
downvote count: 0
score: 1
type: Question
tagged with: handler
answer count: 1
tagged with: button
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26652735
has comment: http://stackoverflow.com/comment/41908540
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: action
linked to: http://stackoverflow.com/q/1955048
has answer: http://stackoverflow.com/a/26652735
favorite count: 0
has body: I am trying to implement the following to increase text size based on button click. I am trying to use one handler for this. The idea is to increase/decrease the fontsize for the text in "demo" area by +/-5 px. But I am not getting the desired result. Change font size Larger Smaller HOW_BIG_OR_SMALL_AM_I When I checked it in developers console, I see that my target has the same value as button1. But I cannot see the font size increasing (same is true for button2). I tried to use my java knowledge as much as I can, but not getting anywhere. I think I might be using the wrong element Id or I am not registering the handler correctly. Any help or kind suggestion is appreciated ! Thanks.
has title: JavaScript onclick() text size increase with EventListener
type: AnsweredQuestion

http://stackoverflow.com/a/26543231
upvote count: 2
answers question: http://stackoverflow.com/q/26534303
type: Answer
has comment: http://stackoverflow.com/comment/41722589
score: 2
has body: It looks like you're not really chaining promises, and using the forgotten promise/deferred anti pattern. Making a few assumptions about how you actually want it to behave, and factoring out the calls to $translate, then something like the following I suspect is what you're after: login: function(email, password) { return AuthService.login(email, password).then(function(response) { return { 'accountToken': response.accountToken, 'email': response.username, 'onboarded': response.onboarded, 'verified': response.verified }; }, function() { return $q.reject('ALERTS.LOGIN_FAILED'); }).then(function(user) { return SyncStorageService.write(SyncStorageService.storageKeys.user, user).catch(function() { return $q.reject('ALERTS.UNKNOWN'); }); }).catch(function(message) { return $translate(message).then(function(translatedValue) { return $q.reject(translatedValue); }); }); } The main things to keep in mind are: If you definitely want to reject the derived promise, return $q.reject(error) from the success or error callback. All the error callbacks above do this. The ones after attempted login or saving use the translation key as the error that will be eventually passed to the final catch callback. The success callback from $translate also does this to transform its resolved promise to a rejected one, so the final catch callback returns a rejected promise, so the calling code gets a rejected promise, and (presumably) shows the translated error to the user. If you definitely want to resolve the derived promise, return anything that isn't a promise from he success or error callbacks. The derived promise will be resolved with that value. (This includes undefined if you don't have an explicit return value). This is what is done above when returning the user return {'accountToken'.... in the first callback. If you want to defer the resolution/rejection of a promise, return another promise from the success or error callback. Then the derived promise will be eventually resolved or reje…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26534303

http://stackoverflow.com/q/26549068
tagged with: iphone
answer count: 1
tagged with: jquery
has title: How to make iPhone call
linked to: http://stackoverflow.com/q/16781772
type: UnansweredQuestion
has body: How can i make my iPhone call by pressing some element on web-page? I need something like $("#container").click(function() { /Making a call/ });
tagged with: call
type: Question
has comment: http://stackoverflow.com/comment/41720929
tagged with: javascript
has answer: http://stackoverflow.com/a/26549539
score: 0

http://stackoverflow.com/q/26644619
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Why is my HTML5 progress bar not changing with jQuery AJAX?
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 1
answer count: 2
linked to: http://stackoverflow.com/q/19126994
upvote count: 1
has body: I am trying to make a progress bar for my jQuery/AJAX upload script. Everything in the script works fine, except the progress bar's value never changes. Also, in console, the percentComplete variable is always just 1 and it logs twice. I've tried every different thing I can find, but nothing seems to work. The progress bar itself is added to my div, but that's about it. $.ajax({ beforeSend : function(){ $(settings.message_div).html('&lt;progress id="#upload-progress" value="0" max="100"&gt;&lt;/progress&gt;'); }, xhr: function() { var xhr = new window.XMLHttpRequest(); //Upload progress xhr.upload.addEventListener("progress", function(evt){ if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with upload progress console.log(percentComplete); $('#upload-progress').val(percentComplete); } }, false); //Download progress xhr.addEventListener("progress", function(evt){ if (evt.lengthComputable) { var percentComplete = evt.loaded / evt.total; //Do something with download progress console.log(percentComplete); $('#upload-progress').val(percentComplete); } }, false); return xhr; }, type: "POST", dataType: "xml", data: formData, url: settings.ajax_url, processData: false, contentType: false, cache: false, success: function(xml){ //console.log('ajax called'); }, error: function(xhr){ $(settings.message_div).html(xhr.responseText); //console.log(xhr.responseText); } }); This was taken from here
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26645485
linked to: http://stackoverflow.com/q/15668339
has answer: http://stackoverflow.com/a/26645446
downvote count: 0

http://stackoverflow.com/q/26657353
has answer: http://stackoverflow.com/a/53168447
has comment: http://stackoverflow.com/comment/41920192
has comment: http://stackoverflow.com/comment/41917155
score: 10
tagged with: javascript
tagged with: webkit
has comment: http://stackoverflow.com/comment/41917482
has answer: http://stackoverflow.com/a/73670830
downvote count: 0
has body: i'm currently developing a cordova web based application with ionic and angularjs. now i've created a service that returns a formatted time the way my client wants it.. the problem with this is that whilst it works on android and in browser, it displays NaN on an iOS device. The date i insert is from a database in timestamp : NOW() format, is there a fix for this? this is my date service: .factory('displaydate',['$filter', function($filter) { return function (date){ var maandarray = new Array('Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December'); var actiondate = new Date(date); var today = new Date(); if(today.getDate() == actiondate.getDate()){ var hourssince = today.getHours() - actiondate.getHours() var minutessince = today.getMinutes() - actiondate.getMinutes() var secondssince = today.getSeconds() - actiondate.getSeconds() if(hourssince &gt; 0){ date = hourssince+'u'; }else if(minutessince &gt; 0){ date = minutessince+'m'; }else{ date = secondssince+'s'; } }else{ var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var diffDays = Math.round(Math.abs((today.getTime() - actiondate.getTime())/(oneDay))); if(diffDays &gt; 28){ var identifier = actiondate.getMonth() - 1; var month = maandarray[identifier]; date = $filter('date')(actiondate,"d ") + month + $filter('date')(actiondate," yy " + " HH:" + "mm"); }else{ date = diffDays+'d'; } } return date; } }]);
favorite count: 0
tagged with: angularjs
tagged with: datetime
possible better answer: http://stackoverflow.com/a/45186166
answer count: 4
has answer: http://stackoverflow.com/a/45186166
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26671796
has comment: http://stackoverflow.com/comment/41943720
upvote count: 10
has comment: http://stackoverflow.com/comment/41917434
type: Question
has title: Date on iOS device returns NaN
accepted answer: http://stackoverflow.com/a/26671796

http://stackoverflow.com/comment/41892535
type: Comment
type: QuestionComment
has text: Get rid of `window.location.reload();` for starters. Are you trying to make a Facebook Web App?
comment on: http://stackoverflow.com/q/26642824
score: 0

http://stackoverflow.com/comment/41834418
type: Comment
has text: jQuery's `animate` method has options `scrollTop` and `scrollLeft`. The later one is probably doing what you are looking for. see http://api.jquery.com/animate/ and also http://stackoverflow.com/questions/6875054/jquery-animate-scrollleft
score: 0
comment on: http://stackoverflow.com/q/26610423
type: QuestionComment

http://stackoverflow.com/q/26563329
tagged with: javascript
has answer: http://stackoverflow.com/a/26662794
linked to: http://stackoverflow.com/q/2762075
has body: I have a large, messy JS codebase. Sometimes, when the app is being used, a variable is set to NaN. Because x = 2 + NaN results in x being set to NaN, the NaN it spreads virally. At some point, after it has spread pretty far, the user notices that there are NaNs all over the place and shit generally doesn't work anymore. From this state, it is very difficult for me to backtrack and identify the source of the NaN (and there could very well be multiple sources). The NaN bug is also not easily reproducible. Despite hundreds of people observing it and reporting it to me, nobody can tell me a set of steps that lead to the appearance of NaNs. Maybe it is a rare race condition or something. But it's definitely rare and of uncertain origins. How can I fix this bug? Any ideas? Two stupid ideas I've thought of, which may not be feasible: Write some kind of pre-processor that inserts isNaN checks before every time any variable is used and logs the first occurrence of NaN. I don't think this has been done before and I don't know how hard it would be. Any advice would be appreciated. Run my code in a JS engine that has the ability to set a breakpoint any time any variable is set to NaN. I don't think anything does this out of the box, but how hard would it be to add it to Firefox or Chrome? I feel like I must not be the first person to have this type of problem, but I can't find anyone else talking about it.
score: 6
has comment: http://stackoverflow.com/comment/42022781
has comment: http://stackoverflow.com/comment/41810658
has comment: http://stackoverflow.com/comment/41746695
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/26626841
has comment: http://stackoverflow.com/comment/41746851
has title: Detecting when any variable in a large JS program is set to NaN
tagged with: nan
favorite count: 0
has comment: http://stackoverflow.com/comment/41982848
possible better answer: http://stackoverflow.com/a/26626841
has answer: http://stackoverflow.com/a/26661867
has answer: http://stackoverflow.com/a/26657282
upvote count: 6
linked to: http://stackoverflow.com/q/6976721
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26597973
has answer: http://stackoverflow.com/a/26677780
linked to: http://stackoverflow.com/q/17573249
has comment: http://stackoverflow.com/comment/41810479
type: Question
tagged with: debugging
has comment: http://stackoverflow.com/comment/41809460
has answer: http://stackoverflow.com/a/26603962
has comment: http://stackoverflow.com/comment/41810808
has comment: http://stackoverflow.com/comment/41810673
accepted answer: http://stackoverflow.com/a/26661867

http://stackoverflow.com/a/26527779
type: Answer
has comment: http://stackoverflow.com/comment/41682610
score: 2
upvote count: 2
has body: You can simply do like this var index = 0; $(".slider:not(:first)").hide(); $(".nextSlide").click(function() { $(".slider").hide(); index++; index = index % $(".slider").length; $(".slider").eq(index).show(); }); $(".prevSlide").click(function() { $(".slider").hide(); index--; index = index % $(".slider").length; $(".slider").eq(index).show(); }); Fiddle Edit var index = 0; $(".slider:not(:first)").hide(); $(".nextSlide").click(function() { var slider=$(this).closest(".slideshow").find(".slider") slider.fadeOut(); index++; index = index % slider.length; slider.eq(index).fadeIn(); }); $(".prevSlide").click(function() { var slider=$(this).closest(".slideshow").find(".slider") slider.fadeOut(); index--; index = index % slider.length; slider.eq(index).fadeIn(); }); Updated Fiddle
has comment: http://stackoverflow.com/comment/41682339
has comment: http://stackoverflow.com/comment/41682376
has comment: http://stackoverflow.com/comment/41682806
answers question: http://stackoverflow.com/q/26527451
downvote count: 0

http://stackoverflow.com/comment/41702219
has text: should we repeat the question?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26538309

http://stackoverflow.com/a/26537802
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26525652
has body: Take a look at moment.js' functions for formatting dates.
type: Answer
downvote count: 0

http://stackoverflow.com/q/26638331
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32507655
type: Question
has comment: http://stackoverflow.com/comment/41888920
tagged with: force-layout
has comment: http://stackoverflow.com/comment/41887450
has comment: http://stackoverflow.com/comment/41898306
score: 5
has comment: http://stackoverflow.com/comment/41886892
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41884172
has comment: http://stackoverflow.com/comment/41889182
favorite count: 0
has body: I have a d3 force layout graph viz working pretty nicely, but it often gets 'stuck' prematurely. For example, nodes are jiggling towards a good placement, and if 'bump' them (injecting a bit of randomness to their placement and start() again, they finally get there. The problem also gets worse if I decrease friction, because the users think it's too frenetic. I see mention of 'annealling' (ala simulated annealling) in the force.js source code, and the exposed alpha parameter is one key ingredient. I'm wondering if anyone has figured out how to manage the general annealling schedule directly (without patching force.js!)?
upvote count: 5
has title: modifying d3's force layout "annealling" schedule
downvote count: 0
tagged with: d3.js

http://stackoverflow.com/comment/41875392
comment on: http://stackoverflow.com/q/26633738
score: 0
type: Comment
type: QuestionComment
has text: What @MarcB is getting at is...perhaps you should post what you've tried. You'll get more action that way.

http://stackoverflow.com/comment/41688515
has text: can you tell me what's wrong with the way i'm calling the helper in the template?
comment on: http://stackoverflow.com/a/26530795
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41798258
type: AnswerComment
comment on: http://stackoverflow.com/a/26591425
type: Comment
has text: vh unit is equal to 1% of the height of the initial containing block. It's the same in this case?
score: 0

http://stackoverflow.com/comment/41879105
score: 0
comment on: http://stackoverflow.com/a/26635015
has text: No problem, let me know if you run into any other issues.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41859335
type: QuestionComment
comment on: http://stackoverflow.com/q/26611809
score: 0
type: Comment
has text: by reading your answer and your comment, it seems you are saying that google custom search engine does not work for anyone because of the xframeorigins. please describe what *you* are doing different than the instructions say, which makes the xframeorigins problematic

http://stackoverflow.com/comment/41716063
type: Comment
type: QuestionComment
has text: are you saying "http://jsfiddle.net/nuxfxz1w/" this is not working
score: 0
comment on: http://stackoverflow.com/q/26546100

http://stackoverflow.com/a/26593227
answers question: http://stackoverflow.com/q/26593145
type: AcceptedAnswer
type: Answer
score: 0
has body: try var site_phone=' ' notice the extra \' basicly some how you need to send the numper as a whole this way it renders as 077-123456
accepted answer of: http://stackoverflow.com/q/26593145

http://stackoverflow.com/comment/41755654
comment on: http://stackoverflow.com/a/26556251
score: 0
type: AnswerComment
type: Comment
has text: @Rudie these are chained async calls, first `getResult` has to succeed for `getTotal` to be called and then finally `onResult` if everything goes fine else `onFault`

http://stackoverflow.com/comment/41794649
has text: great, you figured out.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26587812

http://stackoverflow.com/comment/41847860
has text: It worked, just got to figure out the way to convert to milliseconds since epoch. EDIT - Perfect! The performance increased insanely. Thank you.
comment on: http://stackoverflow.com/a/26618157
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/41875159
comment on: http://stackoverflow.com/q/26633738
score: 0
type: Comment
type: QuestionComment
has text: That's nice. good luck figuring it out. Did you have a question?

http://stackoverflow.com/a/26549423
type: AcceptedAnswer
type: Answer
score: 6
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26549320
has comment: http://stackoverflow.com/comment/41721368
has body: The shortest I can think of: $('.controls :radio').each(function() { $(this).add(this.nextSibling).wrapAll(' '); }); Boy Girl Twins
answers question: http://stackoverflow.com/q/26549320
upvote count: 6

http://stackoverflow.com/a/26556151
has comment: http://stackoverflow.com/comment/41740265
type: Answer
accepted answer of: http://stackoverflow.com/q/26555777
upvote count: 12
answers question: http://stackoverflow.com/q/26555777
downvote count: 0
has comment: http://stackoverflow.com/comment/41733850
has body: Because of the stuctured manner/control flow of CasperJS compared to PhantomJS, such a task is not easy. 1. Pull approach (file polling) Let's say there is a secondary program (type 1) which handles showing the CAPTCHA, receiving the input and writing a text file with the CAPTCHA input. All that CasperJS can handle is to write the CAPTCHA screenshot to disk and wait for the file with the "parsed" text. var fs = require("fs"), captchaFile = "cfile.png", parsedFile = "pfile.txt"; casper.waitForCaptcha = function(captchaFile, parsedFile){ casper.then(function(){ this.captureSelector(captchaFile, "someSelectorOfTheCaptcha"); }); casper.waitFor(function check(){ return fs.exists(parsedFile); }, function then(){ // do something on time // check if correct... if (!correct) { fs.remove(captchaFile); fs.remove(parsedFile); this.waitForCaptcha(captchaFile, parsedFile); // Problem: the secondary process needs to sense that a new CAPTCHA is presented } }, function onTimeout(){ // do something when failed }, 60000); // 1min should suffice as a timeout return this; }; casper.start(url).waitForCaptcha(captchaFile, parsedFile).run(); This code assumes that you want to retry when the CAPTCHA was wrong, but not if the minute deliberately passed without the decoded file. This is a pull process by polling if files are already there. 2. Push approach A push process is also possible where the secondary program (type 2) sends requests to the CasperJS process by utilizing the PhantomJS webserver module. Because there will be two concurrent control flows, the CasperJS part needs to wait a long time, but as soon as a request is received with the decoded words the waiting can be broken with unwait. var server = require('webserver').create(), fs = require("fs"), captchaFile = "cfile.png"; function neverendingWait(){ this.wait(5000, neverendingWait); } casper.checkCaptcha = function(captchaFile, phantomPort, secondaryPort){ // here the CAPTCHA is saved to disk but it can also be set directly if…
score: 12
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41792831

http://stackoverflow.com/a/26523889
has comment: http://stackoverflow.com/comment/41676030
has body: I don't really know what you're watching with your $watch on 'trigger', but if it's just about autofocusing an element when it's beeing shown you could always use "autofocus" if it's okay that it won't work in &lt; ie10. &lt;input autofocus id="edit--menu__input" rium-escape-input="" ... /&gt;
has comment: http://stackoverflow.com/comment/41677329
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26522665

http://stackoverflow.com/comment/41896297
comment on: http://stackoverflow.com/a/26645147
score: 0
type: AnswerComment
type: Comment
has text: @Chakri - Wouldn't the Control key be considered a "modifier" of existing keys? I can see it being used as an "action" key on a game but for a text input string, I don't think it introduces any new data into the field.

http://stackoverflow.com/comment/41870868
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26631329
has text: In my first code block the response.redirect is working. it is in the current system. But I want to change it and redirect user to back page (i.e not into any particular page)
type: Comment

http://stackoverflow.com/q/26649612
possible better answer: http://stackoverflow.com/a/26755850
type: Question
has answer: http://stackoverflow.com/a/26755850
linked to: http://stackoverflow.com/q/15193359
tagged with: javascript
has comment: http://stackoverflow.com/comment/41903483
has comment: http://stackoverflow.com/comment/41903766
score: 0
answer count: 2
has body: Im trying to redirect to another html page on load of one page. Below is my code (I want to automatically load 2.html when i open 1.html) P.S: I could not use window.location.href because of specific use case 1.html click I tried $("#second")[0].click() and document.getElementById("second").click(). Both works fine in desktop browsers. But in android Both doesn't seems to work. Do we have any ways to achieve it ? Please Help
tagged with: user-interface
has title: Redirect to another page on document.ready in android browsers
tagged with: android
tagged with: http-redirect
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41904157
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26651077
accepted answer: http://stackoverflow.com/a/26651077

http://stackoverflow.com/comment/41669331
type: QuestionComment
comment on: http://stackoverflow.com/q/26519854
has text: It looks like `DOMSubtreeModified` is deprecated. Look at the second answer in this post: http://stackoverflow.com/questions/2844565/is-there-a-jquery-dom-change-listener
score: 0
type: Comment

http://stackoverflow.com/q/26560623
has body: i'm developing on large frontend app in angularjs. I wonder if this approach can be used in angularjs and, if there are holes, performance problems or other disadvantages. first code in controller function ServiceHandler() { var self = this; self.init(); } ServiceHandler.prototype = { constructor : ServiceHandler, request : undefined, init : function(){ self.callService(); }, createRequest : function() { self.request = {}; self.request = Service.getRequest(); }, callService : function() { self.iAmLoading = true; self.createRequest(); Service.callService(self.request).then(function(response) { self.iAmLoading = false; if (angular.isDefined(response) &amp;&amp; angular.isDefined(response.data)) { self.handleRequest(response); } }, function(error) { self.handleSystemError(error); }); }, handleRequest : function(response) { if (angular.isUndefined(self.response)) { self.response = {}; } if (angular.isUndefined(response.data)) { self.handleError(response); }else { self.response = response.data; } }, handleSytemError : function(error) { // show 404 }, handleError : function(response) { // think on what to do with your response } } then i bound it with controller init method $scope.init(){ $scope.myServiceHandler = new ServiceHandler(); // in this manner i call the service first time because the constructor call the init method on my ServiceHandler object also } i bound it in dom with &lt;div ng-controller="myController" ng-init="init()"&gt; and in the html i can refer to my response obect with: {{myServiceHandler.response.myResponseProperty}} and if i want a botton for a recall to my service i can do: &lt;button ng-click='myServiceHandler.callService()'&gt;&lt;/button&gt; Personally I think the advantage of this structure is the organization of the code and that this structure seems to be more ojects oriented and more fun to achieve let me know what do you think. thanks and regards Antonio PS - i write this code for this question, i write it on the fly, i think it's work,…
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26560735
tagged with: oop
has title: AngularJS and javascript oop
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41741852
tagged with: javascript
has answer: http://stackoverflow.com/a/26750424
tagged with: angularjs

http://stackoverflow.com/comment/41812756
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26598931
has text: can you keep contact form 7 format? I need that format so it send me a copy.

http://stackoverflow.com/comment/41683689
comment on: http://stackoverflow.com/a/26528487
has text: OP says: "(period needs to be the values, not the index, otherwise I would use an array.)"
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26645131
score: 58
has body: The code is wrapped in an IIFE (Immediately Invoked Function Expression), which means the function is executed immediately. That's what the following means: (function x() { console.log('hello'); })(); You can also do: (function() { console.log('hello'); }()); IIFEs are commonly used to create a "private" scope for a bit of code so that it plays nice (doesn't conflict) with anything else. The second function you provided makes more sense and perhaps the first one must have been just an example. Handlebars allows you to **precompile** your templates so you don't have to compile them at run-time. Also this way you don't have to make extra HTTP requests just to load the template(s). For example if I have the following project structure - (note that my models, collections, and views are all within main.js just for this example and all my .js files are in my root directory): ├── Gruntfile.js ├── handlebars-v2.0.0.js ├── index.html ├── main.js ├── package.json └── templates └── todo.handlebars My `todo.handlebars` looks like so - just html with Handlebars syntax: {{title}} Created by: {{author}} To precompile my template I would do the following in the command line (*you have to install the handlebars precompile script first with: `npm install -g handlebars`*): > handlebars templates/todo.handlebars -f todo.tpl.js Now my project structure looks like so: ├── Gruntfile.js ├── handlebars-v2.0.0.js ├── index.html ├── main.js ├── package.json ├── templates │ └── todo.handlebars └── todo.tpl.js You'll see that a todo.tpl.js file has been added to my root directory. I could have named it something different if I wanted to as long as the extension is a .js because the file contains valid JavaScript code. Also I could have specified a different directory to output it to. Remember that the todo.tpl.js file is the actual template that your Backbone View will use. You write your HTML in todo.handlebars and compile it as todo.tpl.js. Now that I have the `todo.tpl.js` file I can use Gru…
answers question: http://stackoverflow.com/q/26643503
has comment: http://stackoverflow.com/comment/45252371
has comment: http://stackoverflow.com/comment/48602868
accepted answer of: http://stackoverflow.com/q/26643503
has comment: http://stackoverflow.com/comment/76656877
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 58
has comment: http://stackoverflow.com/comment/45243430

http://stackoverflow.com/a/59298312
answers question: http://stackoverflow.com/q/26583753
type: Answer
has body: Replace below code $("#bod").html(row); to $("#bod").append(row); and it work. Append is used to add the data from jquery to html. Please mark the correct answer if you got the resolution.
score: 0

http://stackoverflow.com/a/26568452
score: 1
has comment: http://stackoverflow.com/comment/41756015
has body: I would probably take a different approach with this since it's using angular, but a quick and dirty jQuery selector would be something like: $scope.clickedHeaderLink=function(element) { $(element).parent().addClass('active').siblings().removeClass('active'); //var parentElement=element.$parent; //angular.element(parentElement).addClass("active"); } A different solution might be: /*I would take a different approach and not use jQuery here. Especially since you're already using angular.*/ var menuItems = {}; ['home', 'register', 'loginController', 'contact'].forEach(function(name) { menuItems[name] = {}; }); $scope.menuItems = menuItems; app.controller('AppController', ['$scope','$http','menuFactory',function($scope, $http, menuFactory) { var _init=function() { console.log('Starting Init AppController'); $scope.selected=false; console.log('Finished Init AppController'); } $scope.clickedHeaderLink=function(element) { var x; var name = element.id; for (x in menuItems) { menuItems[x].active = (name !== x); } /*var parentElement=element.$parent;*/ /*angular.element(parentElement).addClass("active");*/ } // ... }); // html Home Sign in Login Contact Arena Club
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26568231
type: Answer
answers question: http://stackoverflow.com/q/26568231
upvote count: 1

http://stackoverflow.com/a/26540431
accepted answer of: http://stackoverflow.com/q/26540227
has comment: http://stackoverflow.com/comment/41722593
has comment: http://stackoverflow.com/comment/41721758
answers question: http://stackoverflow.com/q/26540227
has comment: http://stackoverflow.com/comment/41722968
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41723552
type: Answer
has body: Hopefully I understand your question correctly. You can get trigger an event for on and off like this: $( ".stars" ).hover( function() { $( ".stars" ).animate({ width: "100px" },1000); }, function() { $( ".stars" ).animate({ width: "20px" },1000); } ); Just an FYI, I think it might be better to just use css transitions and just use the .toggleClass() to expand and contract the div. It works better with some mobile browsers that have less processing power but either way works. This is how you would do that with css: .stars { width:20px; -webkit-transition: width 1s; /* For Safari 3.1 to 6.0 */ transition: width 1s; } .stars:hover{ width:100px; }
upvote count: 3
has comment: http://stackoverflow.com/comment/41723141
has comment: http://stackoverflow.com/comment/41722095

http://stackoverflow.com/q/26561528
has title: inline form validation error is collapse css alignments
tagged with: yii
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: This is yii framework code for inline form. when error ms.g display alignment is collapsed ...how can i solve it Framework Code <?php CHtml::$requiredCss = ''; CHtml::$afterRequiredLabel = '*'; $form = $this->beginWidget('CActiveForm', array( 'id' => 'clients-form', // Please note: When you enable ajax validation, make sure the corresponding // controller action is handling ajax validation correctly. // There is a call to performAjaxValidation() commented in generated controller code. // See class documentation of CActiveForm for details on this. 'enableAjaxValidation' => true, 'enableClientValidation' => true, 'errorMessageCssClass' => 'has-error', 'clientOptions' => array( 'validateOnSubmit' => true, ), 'htmlOptions' => array( 'class' => 'form-inline', ),)); ?> <?php // echo $form->errorSummary($model); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->labelEx($model, 'firstname', array('class' => "span2")); ?> <?php echo $form->textField($model, 'firstname', array("class" => "form-control ")); ?> <?php echo $form->error($model, 'firstname', array('class' => "errorMessage")); ?> <?php echo $form->labelEx($model, 'lastname', array('class' => "span2")); ?> <?php echo $form->textField($model, 'lastname', array("class" => "form-control")); ?> <?php echo $form->error($model, 'lastname', array('class' => "errorMessage")); ?> <?php echo $form->labelEx($model, 'username', array('class' => "span2")); ?> <?php echo ($model->isNewRecord) ? ($form->textField($model, 'username', array('size' => 47, 'maxlength' => 40, "class" => "form-control"))) : ($form->textField($model, 'username', array("readOnly" => "readOnly"))); ?> <?php echo $form->error($model, 'username', array('class' => "errorMessage")); ?> <?php echo $form->labelEx($model, 'dob', array('class' => "span2")); ?> <?php echo $form->textField($model, 'dob', array("class" => "form-control")); ?> <?php echo $form->error($model, 'dob', array('class' => "errorMessage")); ?> <?php echo $form->labelEx($model, '…
favorite count: 0
answer count: 0
type: UnansweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/41743458
score: 1
type: Question

http://stackoverflow.com/q/26630415
has title: How to approach this map UI functionality with Leaflet? Grid of rectangles for displaying data where zooming in increases the resolution of the grid
favorite count: 0
tagged with: dictionary
score: 2
tagged with: leaflet
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: I want to have a grid over the Leaflet map where intensity of a static scalar value based on the events inside each rectangular cell is shown primarily using opacity and coloring of the cell. (It's not exactly what I'm doing but, for an example of how I want it to work visually: Compared to a cell containing no events, a cell with a greater number of events might have a more opaque white overlay on top of the map covering the bounds of that cell.) When the user zooms in/out I want the resolution to change, i.e. zooming in means each visible cell covers a smaller geographical area and zooming out means each cell covers a larger area. I'm very much a newbie to Leaflet and I'm stuck on how to approach the problem. Is there a plugin that can do this? Or else how would I go about constructing the grid layer myself?
type: Question
tagged with: javascript
downvote count: 0

http://stackoverflow.com/q/26610847
has answer: http://stackoverflow.com/a/26610939
answer count: 3
tagged with: function
tagged with: events
possible better answer: http://stackoverflow.com/a/26610939
has answer: http://stackoverflow.com/a/26610954
has answer: http://stackoverflow.com/a/26610914
has title: eventListener and attachEvent
type: AnsweredQuestion
has body: Currently working on a piece of code written by someone else for event handling. there are parts of the code that I am unsure about and if possible would like to get an explanation of what it all means. if (div.addEventListener) { div.addEventListener("click", handleClick, false); } else if (div.attachEvent) { div.attachEvent("click", handleClick); }; function handleClick(e) { var evt = e || window.event; var target; if (evt.target) { target = evt.target; } else { target = evt.srcElement; } alert("You clicked on " + target.id); }; I understand that it is checking to see if there is an event occurring, but why does it addEventListener twice as well as attachEvent twice? Also why does one return a false value and the other does not? I am unsure as to what the second part of code is doing altogether, any possible explanation? I know it is the code that is called once the event(s) occur.
accepted answer: http://stackoverflow.com/a/26610954
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/a/26670856
has comment: http://stackoverflow.com/comment/41942163
has comment: http://stackoverflow.com/comment/51807824
has comment: http://stackoverflow.com/comment/72204322
type: AcceptedAnswer
downvote count: 0
has body: It is simple, you just only need to add excluded: [':disabled'], Into validation init. Example: $('#emailForm').bootstrapValidator({ feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, excluded: [':disabled'], fields: { email: { validators: { emailAddress: { message: 'The value is not a valid email address' } } } } });
score: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/26670478
upvote count: 6
answers question: http://stackoverflow.com/q/26670478
has comment: http://stackoverflow.com/comment/41942205

http://stackoverflow.com/comment/116547278
has text: you nailed it, working like a charm, thanks a lot @Kursad Gulseven
comment on: http://stackoverflow.com/a/26634006
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26666867
answer count: 1
tagged with: video
has comment: http://stackoverflow.com/comment/41936472
type: UnansweredQuestion
has title: How to restrict only video upload using javascript or Jquery?
downvote count: 0
tagged with: javascript
has body: Hi I have one requirement where I am expecting a lot of video upload traffic but I want to make sure the uploaded file only are videos. I have not used any uploader plugin for some specific reason. &lt;input type="file" id="upload" class="btn btn-blue" style="height: 35px;" name="file" /&gt;&lt;br /&gt; I am using simple html file type input and I want to restrict only video upload. I have tried checking extensions but It's lot of extension and difficult to check each one of it. http://www.fileinfo.com/filetypes/video Any idea on this?
tagged with: jquery
has answer: http://stackoverflow.com/a/26666904
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41936490
score: 1
tagged with: file-upload
tagged with: video-processing
has comment: http://stackoverflow.com/comment/41936406
upvote count: 1

http://stackoverflow.com/comment/41823589
has text: I want to take screenshot of youtube video for a particular second. Dynamically url is entered and screenshot is generated. This will not work. Thanks.
type: Comment
comment on: http://stackoverflow.com/a/26604314
score: 1
type: AnswerComment

http://stackoverflow.com/a/26560201
answers question: http://stackoverflow.com/q/26559532
score: 0
type: Answer
has body: if your not married to the idea of using php and learning how to manage and access a database you could use jquery and a trird party backend like parse.com If your new to storing and retrieving data, I would definately reccomend the services that https://parse.com/ offeres. It makes storing and retrieving data trivial. Best of all, the service is free unless your app makes more than 30 API requests per second. I have an app that 61 users use daily and we have never come close to the 30 req per second limit. To save your info, you could write: $('document').ready(function(){ $('#submit_btn').on('click',function(){ // detect button click, need to add "submit_btn" as the id for your button var Message = Parse.Object.extend("Message"); //create a reference to your class var newObject = new EventInfo(); //create a new instance of your class newObject.set("messageText", $("#myMessage").val()); //set some properties on the object, your input will need the id "myMessage" newObject.save(null, { //save the new object success: function(returnedObject) { console.log('New object created with objectId: ' + returnedObject.id); }, error: function(returnedObject, error) { console.log('Failed to create new object, with error code: ' + error.message); } }); }); }); Retrieving that info later would be as easy as: var Message = Parse.Object.extend("Message"); //create a reference to your class var query = new Parse.Query(Message); //create a query to get stored objects with this class query.find({ success: function(results) { //"results" is an array, you can fine tune your queries to retrieve specific saved objects too for (var i = 0; i &lt; results.length; i++) { var object = results[i]; $(body).append("Message #" + (i+1) + object.get("messageText"); } }, error: function(error) { console.log("Failed to complete Query - Error: " + error.code + " " + error.message); } });

http://stackoverflow.com/comment/41764426
score: 0
type: Comment
type: QuestionComment
has text: You are right, sorry.
comment on: http://stackoverflow.com/q/26566514

http://stackoverflow.com/comment/41827727
comment on: http://stackoverflow.com/a/26607456
score: 0
has text: And it's called 'method chaining' - http://schier.co/blog/2013/11/14/method-chaining-in-javascript.html
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41834988
score: 0
type: Comment
has text: Try it. My example does work as expected in the latest Chrome. It does the oposite in Firefox however. You should use `html` in firefox... Not sure why yet. FF version: http://jsfiddle.net/xxs82dsk/2/
type: AnswerComment
comment on: http://stackoverflow.com/a/26611530

http://stackoverflow.com/comment/41830840
score: 0
comment on: http://stackoverflow.com/q/26608634
has text: Hm, I had the same issues you are having now when I started to develop with cordova and it was always a problem with the sop and using jsonp fixed it usually.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26633402
score: 0
tagged with: require
has comment: http://stackoverflow.com/comment/41874908
tagged with: jquery
type: UnansweredQuestion
tagged with: node.js
has title: Use require in jQuery javascript file
linked to: http://stackoverflow.com/q/7576001
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41874729
has comment: http://stackoverflow.com/comment/41874832
tagged with: javascript
has body: I have a jquery javascript to update to page every x minutes/seconds. I want to define this update interval in a separate json-config file so that the project can be easily configurated. I have a javascript named ConfigReader which has a method to read this config-file. I want know to load this ConfigReader to my jQuery javascript with 'require' but because the jQuery is on Clientside it does not know require. How can I import my ConfigReader to my jQuery javascript file? Here is the jQuery file: var ConfigReader = require('../libs/ConfigReader'); var update = function() { var divs = $('div[id^="data-"]') for (var i = 0; i &lt; divs.length; i++) { var id = divs[i].id; var dataType = id.split('-')[1]; var cacheId = id.split('-')[2]; $.ajax({ type: "GET", url: '/' + dataType + 'View?cacheId=' + cacheId, context: id, success: function(data) { console.log("id=" + id + " this=" + this); $("#" + this.replace(/\./g, '\\\.')).html(data); }, error: function(jqXHR, textStatus, errorThrown) { console.log(this + "View", jqXHR, textStatus, errorThrown); } }); } } var configReader = new ConfigReader(); var configUpdate; var configuration = configReader.getConfigutation(); for(var i = 0; i &lt; configuration.length; i++){ var current = configuration[i]; switch(current["name"]){ case "update": configUpdate = parseInt(current["interval"]); break; } } $(document).ready(function() { update(); window.setInterval(update, configUpdate); });

http://stackoverflow.com/comment/41684612
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26527800
has text: From the code I cannot even guess what it is supposed to do. It is riddled with logical errors. At least provide us with an example of results that show the different situations. the fiddle I provided does not give any errors and it does put something in the div depending on the value of the record.
score: 0

http://stackoverflow.com/q/26549563
has body: Guys have a little problem with ajax.I have 2 actions on view @Html.Action("SetSearchFilter") @Html.Action("FillTable") First Action is a DropDownList @Html.LabelFor(m => m.Manager, new { @class = "control-label" }) @Html.DropDownList("SearchingManagerId", new SelectList(Model.Managers, "UserId", "PrettyFullName", Model.SelectedValueManager), string.Empty, new { style = "width: 200px" }) Second is a Table formed by public PartialViewResult FillTable(int year, int? ManagerId) { int currentUserId = (int)Session["CurrentUserId"]; return PartialView("_QualificationTable", planService.GetQualificationViewModel(year.ToString(), currentUserId,ManagerId)); } How i can filtering by ajax,get data from dropdownlist and took it to table?I think i should use smth like this $("#DropDownListId").on("change", function () { var valueForSearch = //How i can get?; $.ajax({ url: '@Url.Action("FillQualificationTable")', dataType: 'html', async: false, data: { year: currentYear, ManagerId: valueForSearch }, beforeSend: showSpinner, success: function (data) { $('#tableid').html(data); }, complete: hideSpinner, }); I working with ajax first time,so have some problems =( values in DDList looks like this user1 user2
type: Question
tagged with: c#
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26549718
score: 0
tagged with: asp.net
has title: took date from dropdownlist and filter table by ajax
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26549718

http://stackoverflow.com/q/26586376
has body: Is it possible to get the scrollTop or offSet value of an element inside an iFrame? e.g $("iframe").contents(".controlPanel").scrollTop(); or any other way possible? I get a return value of null
tagged with: iframe
has title: Getting the scrollTop() value of an element inside an Iframe
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41788144
answer count: 1
has answer: http://stackoverflow.com/a/26586871
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41788329
linked to: http://stackoverflow.com/q/251420

http://stackoverflow.com/comment/41832577
type: QuestionComment
has text: Are the 10 questions on a single sheet? Otherwise you can listen to the change event of the radio buttons and add to a counter.
comment on: http://stackoverflow.com/q/26605047
score: 0
type: Comment

http://stackoverflow.com/comment/109669844
has text: He was quite specific about grabStrength **not** being a good approach for his requirements. This questions is also rather old. If something has changed since 2014 then please be specific about why it is working now. Right now your answer is way too short to be helpful to others...
comment on: http://stackoverflow.com/a/62006205
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41689865
comment on: http://stackoverflow.com/a/26531770
has text: Note that I'm not familiar at all with that collection API, so my assumptions about its behavior could be wrong. However, a function with "Async" in its name and success/failure callbacks is almost certainly asynchronous.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26589883
score: -3
type: Answer
answers question: http://stackoverflow.com/q/26589807
has comment: http://stackoverflow.com/comment/41794797
downvote count: 3
has comment: http://stackoverflow.com/comment/41794719
upvote count: 0
has comment: http://stackoverflow.com/comment/41797029
has comment: http://stackoverflow.com/comment/41794587
has comment: http://stackoverflow.com/comment/41794717
has comment: http://stackoverflow.com/comment/41794843
has comment: http://stackoverflow.com/comment/41794640
has body: Just use Jquery: $('#div1').html()

http://stackoverflow.com/a/26594370
upvote count: 106
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26593302
has comment: http://stackoverflow.com/comment/99015330
has comment: http://stackoverflow.com/comment/99015775
answers question: http://stackoverflow.com/q/26593302
has comment: http://stackoverflow.com/comment/41803930
type: AcceptedAnswer
score: 106
has comment: http://stackoverflow.com/comment/41804149
has body: Note: Questions like this change over time as browser engines change how their optimizations work. For a recent look comparing: Math.pow(x1, 2) x1 * x1 x1 ** 2 // ES6 syntax See this revised performance test and run it in the browsers you care about: https://jsperf.com/math-pow-vs-simple-multiplication/32. As of April 2020, Chrome, Edge and Firefox show less than 1% difference between all three of the above methods. If the jsperf link is not working (it seems to be occasionally down), then you can try this <a href="https://perf.link/#eyJpZCI6IjBiMjF6bGh4ejg4IiwidGl0bGUiOiJGaW5kaW5nIG51bWJlcnMgaW4gYW4gYXJyYXkgb2YgMTAwMCIsImJlZm9yZSI6ImNvbnN0IHggPSAxOTU4Njc7IiwidGVzdHMiOlt7Im5hbWUiOiJQbGFpbiBtdWx0aXBsaWNhdGlvbiIsImNvZGUiOiJsZXQgeSA9IHggKiB4OyIsInJ1bnMiOlsxNTAwMCwzMjAzMDAwLDcwMjAwMCwyOTU2MDAwLDc5NTQwMDAsNjk1ODAwMCwzNjE5MDAwLDM0ODkwMDAsMjE2MDAwMCwxMTIwMDAsMjYzNDAwMCwzNDQ2MDAwLDY3MjQwMDAsMTMzMDAwLDc3MTQwMDAsMjk2MTAwMCw5MzMwMDAsMjMyMDAwLDMzMjUwMDAsNjc0MzAwMCwzOTIzMDAwLDIwMTcwMDAsMTYyNTAwMCw3MTM2MDAwLDIzMDUwMDAsNjU5NDAwMCw1ODQ1MDAwLDMzMTAwMDAsNTIzNzAwMCw4MDgwMDAwLDQzNDIwMDAsMzYwMDAwLDcwODEwMDAsMzQ3MDAwLDY3NDIwMDAsNjE5NzAwMCwxNDk5MDAwLDU5NTkwMDAsNDU0MjAwMCw0NTc2MDAwLDc4OTkwMDAsMjcwNzAwMCwyMzYyMDAwLDEwMDAsNDQxNTAwMCw0MTIwMDAsMzg3MTAwMCw0ODUwMDAwLDE4OTEwMDAsMzI0OTAwMCwyMTY5MDAwLDQyNTkwMDAsNzUyNTAwMCwxNTc4MDAwLDYyODEwMDAsMTk3ODAwMCw3ODQwMDAsMjg1MDAwMCwzNTAyMDAwLDI3NjYwMDAsNjQxNjAwMCw5OTEwMDAsNjIyMDAwMCwxOTMwMDAwLDQ4NTMwMDAsNDU1NTAwMCw2OTk4MDAwLDQ0NDEwMDAsOTQ0MDAwLDM4MDUwMDAsNzA3NzAwMCwyNDYyMDAwLDI2MDAwMDAsMTM0NDAwMCw1NzU3MDAwLDQ4MzYwMDAsNTgyOTAwMCw0MjI0MDAwLDMwMjAwMCw1OTE5MDAwLDc4OTAwMCwzOTE5MDAwLDM1NjQwMDAsNDU0ODAwMCw2MTI5MDAwLDE5OTAwMDAsNTgxMzAwMCw3MzA3MDAwLDI2NTYwMDAsMTYyMjAwMCwzNzkwMDAwLDM3MjMwMDAsNzgyNTAwMCwzNzAzMDAwLDEyNTUwMDAsNTc4MTAwMCw3NjQ4MDAwLDE3NTYwMDAsMzE2ODAwMCwxNzY4MDAwXSwib3BzIjozNzkzMzYwfSx7Im5hbWUiOiJFeHBvbmVudGlhdGlvbiAqKiBvcGVyYXRvciIsImNvZGUiOiJsZXQgeSA9IHggKiogMjsiLCJydW5zIjpbNDYzNzAwMCw2MTAwMDAsNTI3MjAwMCwzMDg5MDAwLDQ2NjcwMDAsMzU2NTAwMCwxMzUxMDAwLDY2NjAw…
has comment: http://stackoverflow.com/comment/116498290
type: Answer
has comment: http://stackoverflow.com/comment/92637585
has comment: http://stackoverflow.com/comment/116498695
has comment: http://stackoverflow.com/comment/41803712

http://stackoverflow.com/q/26613394
tagged with: jquery
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap-2
tagged with: css
has answer: http://stackoverflow.com/a/26615556
has body: Hi this is using twitter Bootstrap 2.3.2 I have a form setup that has a checkbox to the right of a dropdown. The idea is that if the user clicks the check box, it will hide the dropdown and show a new input field so the user can enter a new position title. When the checkbox is clicked, it hides the div with the label and the div that contains the drop down. The div with the new input label does show but the next line of the form is shifted over. http://jsfiddle.net/mwoods98/sdcs3gka/3/ One other odd thing is that I have the second hidden div set to .hide() but it's still in view at load time but on page load, you can still see it for a brief second. $(function () { $('#NewPositionDiv').hide(); $('#NewlabelPosTitle').hide(); $('#fcbNewPos').change(function () { if ($('#fcbNewPos').is(':checked')) { $('#PositionDiv').hide(); $('#labelPosTitle').hide(); $('#NewPositionDiv').show(); $('#NewlabelPosTitle').show(); $('#NewPositionName').focus(); } else { $('#PositionDiv').show(); $('#NewPositionDiv').hide(); $('#NewlabelPosTitle').hide(); } }).change(); }); This is the JS code that hides the div's. Thanks in advance!
type: Question
has title: How to stop form fields from shifting in a Bootstrap form
tagged with: javascript

http://stackoverflow.com/comment/41688493
score: 0
type: AnswerComment
has text: How do I use this to perform the functions described above
type: Comment
comment on: http://stackoverflow.com/a/26531000

http://stackoverflow.com/comment/106416056
type: AnswerComment
comment on: http://stackoverflow.com/a/28748160
type: Comment
has text: `_this.getDOMNode is not a function` what the heck is this code?
score: 3

http://stackoverflow.com/comment/41933367
type: Comment
has text: Then use it as a comment. Because it doesn't actually answer the question.
comment on: http://stackoverflow.com/a/26664960
type: AnswerComment
score: 0

http://stackoverflow.com/a/26629914
type: Answer
answers question: http://stackoverflow.com/q/26629845
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41868222
accepted answer of: http://stackoverflow.com/q/26629845
type: AcceptedAnswer
downvote count: 0
has body: Spelling mistake: console.log(objects_list.lenght); Should be console.log(objects_list.length);

http://stackoverflow.com/q/26558155
type: Question
has answer: http://stackoverflow.com/a/26558226
answer count: 2
has title: Global var is not defined inside JavaScript function when calling in onClick
tagged with: javascript
score: 0
tagged with: dom-events
linked to: http://stackoverflow.com/q/14028959
type: UnansweredQuestion
has body: In HTML form, I want to display the user input when a button is clicked. This is done by calling a JavaScript function. The user input is hold into a variable which then is used inside a function. The problem, the function doesn't recognize the var unless it's defined inside it. The following is the HTML and JS code. To view (https://dl.dropboxusercontent.com/u/4301151/stackoverflow/varNoDefined.html) Name: Name Provided: var userName = document.getElementById("userName").value; function run() {document.getElementById("outputUserName").innerHTML = userName;} It will work fine if I have the following inside the function: document.getElementById("outputUserName").innerHTML = document.getElementById("userName").value; or if I define the var inside the function I need the var to be global so to use it with other functions and not define it so many times
has answer: http://stackoverflow.com/a/26558172
tagged with: dom

http://stackoverflow.com/q/26634760
has title: adding events to a javascript generated calender
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26635699
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has body: i'm making a calender for a school assignment, i generated the calender using javascript loops. i'd like to be able to add events to specific dates (things like birthdays and such). i want to make them appear in a box under the calender. i'm pretty stuck atm as i don't know how to make this happen. HTML: Vorige Volgende JavaScript: var dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; var today = new Date(); var dag = today.getDay(); var myMonth = today.getMonth(); var jaar = today.getFullYear(); var volBtn = document.getElementById('Volgende'); var vorBtn = document.getElementById('Vorige'); var monthLengthCorrected = 0; function Kalender(){ var myHTML =''; var firstDayDate = new Date(jaar, myMonth, 1); var firstDay = firstDayDate.getDay(); myHTML+=' '+monthNames[myMonth] + " " + jaar+' '; for (var i = 0; i < dayNames.length; i++){ myHTML += ' ' + dayNames[i] + ' ' + ' '; if ((i+1)%7 == 0){ myHTML += " "; } }; monthLengthCorrected = monthLength[myMonth]; if (myMonth == 1) { if (jaar % 4 == 0) monthLengthCorrected = 29; }; monthLengthCorrected += firstDay; for (var i=1; i <= monthLengthCorrected; i++){ if (i <= firstDay){ myHTML += " "; } else { myHTML+=" " + (i - firstDay) + " "; }; if (i%7 == 0){ myHTML += " "; }; }; myHTML+=' '; document.getElementById('div').innerHTML = myHTML; } var VolgendeFunc = function(){ myMonth = myMonth + 1; if (myMonth == 12){ myMonth = 0; jaar = jaar + 1; } document.getElementById('month').innerHTML = myMonth; Kalender(); } var VorigeFunc = function(){ myMonth = myMonth - 1; if (myMonth == -1){ myMonth = 11; jaar = jaar - 1; } document.getElementById('month').innerHTML = myMonth; Kalender(); } Kalender(); CSS: #Vorige{ background: #3498db; background-image: -webkit-linear-gradient(top, #3498db, #2980b9); background-ima…
tagged with: javascript

phrase
type: Tag
tag name: phrase
tags question: http://stackoverflow.com/q/26569594

http://stackoverflow.com/q/26522474
tagged with: forms
tagged with: jquery-validate
has title: jQuery Validation: determine if field was validated on form submit, or a diff. event?
has body: I'm using jQuery Validation for a few forms. How can I determine if a field was validated when the form was submitted rather than from a separate event, such as key up, blur, etc.? For example in this jsFiddle, clicking submit prints two "Validation: success" messages before a "Form submitted" message. I would like to stop the "Validation: success" messages from being printed ONLY when the form is submitted. $("form").validate({ success: function(label, element) { $(element).next(".help") .addClass("valid").removeClass("invalid"); }, onkeyup: function(element, event) { return this.element(element); }, errorPlacement: function(error, element) { var help = $(element).next(".help"); if (error.html().length === 0) { log("Validation: success"); help .addClass("valid").removeClass("invalid") .html(originalHelp[element.attr("id")]); } else { log("Validation: failure"); help .addClass("invalid").removeClass("valid") .html(error.html()); } }, submitHandler: function(form) { log("Form submitted"); }, rules: { firstname: "required", surname: "required" } }); Edited for clarity, hopefully this makes more sense.
has comment: http://stackoverflow.com/comment/41694186
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41673761
has comment: http://stackoverflow.com/comment/41684088
has comment: http://stackoverflow.com/comment/41687721
has comment: http://stackoverflow.com/comment/41699943
score: 2
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/41698910
has answer: http://stackoverflow.com/a/26534606
accepted answer: http://stackoverflow.com/a/26534606
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41851924
type: QuestionComment
comment on: http://stackoverflow.com/q/26620233
has text: What does downloadUrl/xmlParse look like?
score: 0
type: Comment

marker
tag name: marker
type: Tag
tags question: http://stackoverflow.com/q/26586879

http://stackoverflow.com/q/26614580
accepted answer: http://stackoverflow.com/a/26615211
tagged with: css
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26615211
has title: Convert CSS rule to JavaScript property
type: AnsweredQuestion
has body: Is there a quick way or predefined JavaScript method that converts "text-align" "-webkit-transform" "position" "background-image" into "textAlign" "webkitTransform" "position" "backgroundImage" with vanilla javascript (no jQuery, ect)?
has answer: http://stackoverflow.com/a/26614754
type: Question
possible better answer: http://stackoverflow.com/a/26614754
has comment: http://stackoverflow.com/comment/41840668

http://stackoverflow.com/q/26623479
accepted answer: http://stackoverflow.com/a/26623972
has body: I have a dropdwnlist control in my parent page - ASP.NET C#, on click of button there is a popup opening to add new value to the control. [+] In PopUp page - Save button , I have the following code : Response.Write(" "); Response.Write(" "); where loadOptionLandlord is a function in my parent page : function loadOptionLandlord(val,txt) { var opt = document.createElement(' '); opt.innerText = txt; var sCtrl = document.getElementById('<%= ddlLandlord.ClientID %>'); sCtrl.options[sCtrl.options.length] = new Option(txt, val, false, true); } The value is being saved to the database and the popup window is closing , but the newly added data is not refreshing in the dropdownlist. This is working for IE, but not for Chrome. Please help ..
score: 0
tagged with: popupwindow
has answer: http://stackoverflow.com/a/26623692
tagged with: asp.net
has answer: http://stackoverflow.com/a/26623972
has comment: http://stackoverflow.com/comment/41857050
has title: Refresh parent dropdownlist from popup in asp.net c#
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41856881
possible better answer: http://stackoverflow.com/a/26623692
type: Question
tagged with: c#
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/41939004
has text: 1: in the console in the browser debugging tools,2: in the debugging mode in visual studio 3: this is all the code!
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26668955

http://stackoverflow.com/a/26571888
downvote count: 0
has body: Try this $('.howdy').on('click', function(){ console.log($(this).closest('table').find('.info').text()); }); You start travesring from $('.howdy') button and looking for closest &lt;table&gt; then you looking for .info class inside and getting the .text() JSFIDDLE
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26571829
answers question: http://stackoverflow.com/q/26571829
type: Answer
score: 2

http://stackoverflow.com/a/26664721
has body: This should work: &lt;div ng-init="hovered = {}"&gt; &lt;wa-svg ng-repeat="page in Pages" ng-mouseover="hovered.index = $index" /&gt; &lt;wa-tooltip ng-repeat="page in Pages" ng-class="{on: hovered.index == $index}" /&gt; &lt;/div&gt; To sum up: Hovering over the wa-svg sets the hovered.index, which you can access in wa-tooltip. The only reason for the hovered = {} part is because the repeaters create new scopes, so I've created an object outside of the new scope, so that the index is accessible from both repeaters. You could / should put that statement into a controller.
upvote count: 2
has comment: http://stackoverflow.com/comment/41931312
has comment: http://stackoverflow.com/comment/41931192
has comment: http://stackoverflow.com/comment/41931563
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41931282
type: Answer
has comment: http://stackoverflow.com/comment/41931353
answers question: http://stackoverflow.com/q/26664588

http://stackoverflow.com/a/26628468
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26603499
type: Answer
score: 11
has comment: http://stackoverflow.com/comment/51149289
upvote count: 11
has comment: http://stackoverflow.com/comment/59409230
has body: With webpack you'd use multiple entry points and the CommonChunkPlugin. Taken from the webpack docs: To split your app into 2 files, say app.js and vendor.js, you can require the vendor files in vendor.js. Then pass this name to the CommonChunkPlugin as shown below. module.exports = { entry: { app: "./app.js", vendor: ["jquery", "underscore", ...], }, output: { filename: "bundle.js" }, plugins: [ new webpack.optimize.CommonsChunkPlugin( /* chunkName= */"vendor", /* filename= */"vendor.bundle.js" ) ] }; This will remove all modules in the vendor chunk from the app chunk. The bundle.js will now contain just your app code, without any of it’s dependencies. These are in vendor.bundle.js. In your HTML page load vendor.bundle.js before bundle.js. &lt;script src="vendor.bundle.js"&gt;&lt;/script&gt; &lt;script src="bundle.js"&gt;&lt;/script&gt;
has comment: http://stackoverflow.com/comment/51566159
answers question: http://stackoverflow.com/q/26603499
has comment: http://stackoverflow.com/comment/51149140

http://stackoverflow.com/comment/41876168
has text: I see what you mean. But if you set the font-family to 'foo' and use Chrome Dev tools to check the font-family its set to foo.. so the function is returning the correct value. But what really happens is. depending on the browser/OS, if the family is not found it sets a default family.. now the question will be how to get the default browser font-family. not sure how to get it dynamically but here is a list to get started [link](http://www.granneman.com/webdev/coding/css/fonts-and-formatting/web-browser-font-defaults/)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26633731

http://stackoverflow.com/comment/41909887
score: 0
comment on: http://stackoverflow.com/q/26652957
type: Comment
has text: the problem is i have no idea how to separate the two value that are submitted through the request
type: QuestionComment

http://stackoverflow.com/comment/41708750
type: QuestionComment
comment on: http://stackoverflow.com/q/26542301
has text: You are missing brackets after first if and Your code always execute break after first if. Omitting the fact that in first if You should have continue instead of break.
score: 0
type: Comment

http://stackoverflow.com/comment/41881416
has text: Instead of `data("uiAutocomplete")`, try `data("ui-autocomplete")`
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26636873

http://stackoverflow.com/a/26658311
answers question: http://stackoverflow.com/q/26657960
has body: I think you want to do something like this: $('div') .contents() .filter(function() { return this.nodeType === 3 &amp;&amp; this.nodeValue.trim(); }) .wrap('&lt;p&gt;') .end() .filter('br') .remove(); Output: &lt;p&gt; hello how r u- dummy Text &lt;/p&gt;&lt;p&gt; hie how - dummy Text &lt;/p&gt; &lt;p&gt; Have a good day- dummy Text Have a good day- dummy Text Have a good day- dummy Text &lt;/p&gt; I am right? Here is the demo
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41924287

http://stackoverflow.com/comment/41825376
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26606360
has text: You're sending your data with a POST request and trying to retrieve it with GET parameters on your server side.
score: 0

http://stackoverflow.com/comment/106183027
type: AnswerComment
type: Comment
has text: `setcap` and `authbind` can allow non-root processes to set ports. [reference](https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443)
comment on: http://stackoverflow.com/a/26579107
score: 0

http://stackoverflow.com/a/42188500
type: Answer
answers question: http://stackoverflow.com/q/26590091
upvote count: 1
score: 1
downvote count: 0
has body: I am not sure i completely understood your questions, but here is what i did for external config file in PDFViewer, hope this will help to some extent: $(function () { var customData = { serviceUrl: 'services/PDFWebService.asmx', token: '<%=initialDoc.Value %>', isReadonly: '<%=IsReadonly?"yes":"no" %>' }; var myWebViewer = new PDFTron.WebViewer({ path: "Resources/js/PDFTron", mobileRedirect: false, // Disable redirect in mobile view. stream: true, config: 'Resources/js/PDFViewerConfig.js', documentType: "pdf", custom: JSON.stringify(customData), l: '<%=LicenseKey%>', initialDoc: customData.serviceUrl + '/GetFile?token=' + customData.token }, document.getElementById('viewer')); }); My PDFViewerConfig.js is : (function () { $(document).on('viewerLoaded', function () { customData = JSON.parse(window.ControlUtils.getCustomData()); SetupCustomizations(); }); $(document).on('documentLoaded', function () { setDisabled("#btnSave"); setDisabled("#btnReset"); setDisabled("#btnPushUp"); }); $(document).on('pageChanged', function (event) { var currentPageNumber = readerControl.getCurrentPageNumber(); var totalPages = readerControl.docViewer.getDocument().getPageCount(); if (currentPageNumber == totalPages) { setDisabled("#btnPushDown"); setEnabled("#btnPushUp"); } else if (currentPageNumber == 1) { setDisabled("#btnPushUp"); setEnabled("#btnPushDown"); } else { setEnabled("#btnPushUp"); setEnabled("#btnPushDown"); } }); })(); function SetupCustomizations() { if (customData && customData.isReadonly != "yes") { var removeButton = $(''); var saveButton = $(''); var resetButton = $(''); var rotateRightButton = $(''); var rotateLeftButton = $(''); var pushDownButton = $(''); var pushUpButton = $(''); removeButton.on('click', onRemove); removeButton.on('keydown', onRemove); saveButton.on('click', onSave); saveButton.on('keydown', onSave); resetButton.on('click', onReset); resetButton.on('keydown', onReset); rotateRightButton.on('click', onRotateRight); rotateRightButton.on('keydown'…

http://stackoverflow.com/comment/41772523
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26577251
has text: Yes I supposed this way to change the handler, but I hoped there would be another way.

http://stackoverflow.com/q/26575590
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26575757
has answer: http://stackoverflow.com/a/26575757
score: 0
has answer: http://stackoverflow.com/a/26575742
has title: Cannot get source of image
has comment: http://stackoverflow.com/comment/41769058
has comment: http://stackoverflow.com/comment/41768918
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26575742
has body: I am trying to get the source of an image to use in a bigger image and the problem is that it just says that it is undefined when it is not. Here is my code and I appreciate the help in advance. edit It appears the code works perfectly in the code snippet but not here when I open the index file ;(, I have no idea why this is happening... halp me! D:, also, when I inspect the element with my own index.html file, it says that the source is equal to undefined var src = $('.button').attr('src'); $(document).ready(function() { $('.button').click(function() { $('.backdrop').animate({ 'opacity': '.5' }, 300, 'linear'); $('.box').animate({ 'opacity': '1.00' }, 300, 'linear'); $('.box, .backdrop').css('display', 'block'); $('.box').html(' '); }); }); $(document).ready(function() { $('.backdrop').click(function() { close_box(); }); $('.close').click(function() { close_box(); }); }); function close_box() { $('.backdrop, .box').animate({ 'opacity': '0' }, 300, 'linear', function() { $('.backdrop, .box').css('display', 'none'); }); } .backdrop { position: absolute; display: none; top: 0px; left: 0px; background-color: #000; opacity: 0; height: 100%; width: 100%; } .box { position: absolute; display: none; background-color: white; opacity: 0; top: 10%; left: 10%; width: 80%; height: 80%; border-radius: 13px; } .close { float: right; margin-right: 5px; } .boximg { position: absolute; top: 3%; left: 2%; width: 96%; height: 94%; } .button { border-radius: 30px; height: 300px; width: 300px; }
type: Question

http://stackoverflow.com/comment/41775991
type: AnswerComment
has text: @MatthewDaly what do you mean by "static files"?
comment on: http://stackoverflow.com/a/26579107
score: 0
type: Comment

http://stackoverflow.com/q/26531304
favorite count: 0
accepted answer: http://stackoverflow.com/a/26531449
has comment: http://stackoverflow.com/comment/41689028
has body: I have three radio buttons: Click the first radio button and a checkbox appears if you check the box but change your mind and select the second radio button it does not uncheck the checkbox. Same if it was checked and then you changed your mind and chose the third radio button. So what I am trying to figure out is if there is a way make it uncheck or un choose or clear any option that was chosen when a new radio button (of the same group) is picked. Same if the drop down was picked from the third radio button and then they went back and chose radio 1 or radio 2. Any help is greatly appreciated! PS for some reason my JavaScript was not working in the JavaScript section but did work when it was on the html section... very strange http://jsfiddle.net/b9uevhqz/2/ &lt;label&gt;&lt;strong&gt;Proof of Ownership&lt;/strong&gt;&lt;/label&gt;&lt;br /&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" value="MCO" onclick="calculateTotal()" onchange="statedropDown(this.value);"/&gt; Manufacturer's Statement of Origin&amp;nbsp;&amp;nbsp;&lt;/label&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" value="FL Title" onclick="calculateTotal()" onchange="statedropDown(this.value);"/&gt; Florida Certificate of Title&amp;nbsp;&amp;nbsp;&lt;/label&gt; &lt;label class='radiolabel'&gt; &lt;input type="radio" name="ownership" value="OOS Title" onclick="calculateTotal()" onchange="statedropDown(this.value);"/&gt; Out-of-state Certificate of Title&amp;nbsp;&amp;nbsp;&lt;/label&gt; &lt;div id="div3" style="display:none"&gt; &lt;div class="clearfix"&gt; &lt;select name="month1" id="month1" size="1"&gt; &lt;option value=""&gt;Choose a Month&lt;/option&gt; &lt;option value="0"&gt;January&lt;/option&gt; &lt;option value="1"&gt;February&lt;/option&gt; &lt;option value="2"&gt;March&lt;/option&gt; &lt;option value="3"&gt;April&lt;/option&gt; &lt;option value="4"&gt;May&lt;/option&gt; &lt;option value="5"&gt;June&lt;/option&gt; &lt;option value="6"…
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41689181
upvote count: 2
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26531931
has answer: http://stackoverflow.com/a/26531931
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41690446
has answer: http://stackoverflow.com/a/26531449
has comment: http://stackoverflow.com/comment/41710581
has title: Radio button clearance
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26606182
upvote count: 2
type: UnansweredQuestion
has body: I'm trying to play a sound effect when the user clicks a button in my web app. I first tried this method: var sound = new Audio("soundeffect.ogg"); function clickHandler(){ sound.play(); } However, if the user presses the button twice in quick succession, the sound is only played once. I assumed this is because the sound hasn't finished playing, and therefore isn't rewinded. I then tried this solution. var sound = new Audio("soundeffect.ogg"); function clickHandler(){ sound.currentTime = 0; sound.play(); } However, this causes the first sound to cut off before the next one is played. I then tried this version, which creates a new sound effect each time the button is clicked: function clickHandler(){ var sound = new Audio("soundeffect.ogg"); sound.play(); } This works perfectly on my developer machine, but using android chrome on mobile data, the sound effect seems to have to load each time the button is clicked, causing a delay of several seconds before the sound is played. I was hoping declaring the sound effect in the global scope, then cloning it might help keep it in the cache, but it didnt seem to help. var sound = new Audio("soundeffect.ogg"); function clickHandler(){ var oneShotSound = sound.cloneNode(); oneShotSound.play(); }
type: Question
has title: Playing multiple one shot sound effects at the same time on mobile browsers?
has answer: http://stackoverflow.com/a/26639632
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
tagged with: html5-audio

http://stackoverflow.com/comment/41897972
type: QuestionComment
comment on: http://stackoverflow.com/q/26645862
score: 0
has text: It isn't my wish. I want to get something like: do something - script_file.js (event.[HTMLObject].click), do something - script_file.js (function PrintDoSomething())
type: Comment

http://stackoverflow.com/a/26517234
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41664571
has comment: http://stackoverflow.com/comment/41664676
score: 2
has body: How can I access ctx in the function loadImage? You cannot. Unless you create the loadImage function inside the constructor's scope. See Javascript: Do I need to put this.var for every variable in an object? for details. I have seen snippets that worked exactly like this Then those snippets didn't work either.
has comment: http://stackoverflow.com/comment/41664650
has comment: http://stackoverflow.com/comment/41664724
has comment: http://stackoverflow.com/comment/41664538
answers question: http://stackoverflow.com/q/26517194
downvote count: 0

http://stackoverflow.com/comment/41770166
has text: If you refresh the page, does it for the first time you click on the ".element"?
score: 0
comment on: http://stackoverflow.com/q/26576275
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26640080
has body: Running protractor tests that had previously worked now seem to be failing! The following code snippet is an ng-repeat with a sort applied to it. When this is displayed, the user will see four columns. I would like to select the first item in first row, inside this row are the study details. I need to select the third column i.e. study.TASK_ITEM_CNT from the chosen element. Code Snippet: Mod. screen{{ study.TASK_ITEM_CNT == 1 ? '' : 's' }} The old protractor test looked like the following; var firstElement = element(by.repeater('study in studyItems.drafts').row(0).column('')) expect(firstElement.getText()).toBe('TEST); There are no error messages except to say that the test failed. This had worked previously, I got it working with the following as shown; element.all(by.repeater('study in studyItems.drafts')).get(0).then(function(args){ expect(args.getText()).toContain('TEST'); }); This is not as elegant as I would like! Any suggestions are welcome. Thanks. J
score: 0
has comment: http://stackoverflow.com/comment/41921821
possible better answer: http://stackoverflow.com/a/29283115
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27032220
type: AnsweredQuestion
tagged with: protractor
has answer: http://stackoverflow.com/a/27032220
has title: Protractor and ng-repeat inside AngularJS application
tagged with: gruntjs
type: Question
has answer: http://stackoverflow.com/a/29283115
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/26583033
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41782111
has comment: http://stackoverflow.com/comment/41782204
has comment: http://stackoverflow.com/comment/41782271
tagged with: model-view-controller
answer count: 6
has comment: http://stackoverflow.com/comment/41782136
tagged with: iframe
has comment: http://stackoverflow.com/comment/41782312
has comment: http://stackoverflow.com/comment/41782175
has comment: http://stackoverflow.com/comment/41782274
downvote count: 1
has comment: http://stackoverflow.com/comment/41782189
has answer: http://stackoverflow.com/a/63102005
has comment: http://stackoverflow.com/comment/41782244
has answer: http://stackoverflow.com/a/26583242
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3130983
has answer: http://stackoverflow.com/a/59818838
has body: I have a document content displayed on IFrame in MVC web application. The content should not be copied and printed . I tried to disable right click using two functions style="pointer-events:none;" oncontextmenu="return false" for Iframe, which is working fine. But on right click, the pop up with 'View Frame Source', 'View Source' are displaying. How can I restrict this.! Also, how to restrict the print screen option. I know there are other utilities from where anybody can capture data. But the client wants to restrict the print screen option. &lt;script lang=JavaScript&gt; function clickIE() { if (document.all) { return false; } } function clickNS(e) { if (document.layers || (document.getElementById &amp;&amp; !document.all)) { if (e.which == 2 || e.which == 3) { return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS;`enter code here` } else { document.onmouseup = clickNS; document.oncontextmenu = clickIE; } document.oncontextmenu = new Function("return false") &lt;body oncontextmenu="return false" onkeydown="if ((arguments[0] || window.event).ctrlKey) return false" &gt; &lt;div id="div1" style="background-color:Red; height:120px"&gt; &lt;iframe id="id1" src="" name="I1" scrolling="no" height="100%" width="100%" marginwidth ="0" marginheight="0" onload="disableContextMenu();" style="pointer-events:none;" /&gt; &lt;/div&gt; Please Any help appreciated.. !!
has comment: http://stackoverflow.com/comment/41782135
has comment: http://stackoverflow.com/comment/41782249
has answer: http://stackoverflow.com/a/57567319
tagged with: jquery
score: 7
has answer: http://stackoverflow.com/a/26583436
favorite count: 0
has comment: http://stackoverflow.com/comment/41782074
upvote count: 8
has answer: http://stackoverflow.com/a/26583209
type: Question
has title: How to disable right click on IFRAME

http://stackoverflow.com/comment/41891779
has text: Why the downvotes? This is a reasonable question
comment on: http://stackoverflow.com/q/26642516
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26682046
type: Answer
has comment: http://stackoverflow.com/comment/42128831
has body: I used Eventlistener but not still redirecting, check what may be wrong as am not good in javascript &lt;script&gt; document.getElementById("FormButton_Subscribe").addEventListener("click", function(){ window.location.href=" http://www.google .com"; }); &lt;/script&gt;
score: 0
answers question: http://stackoverflow.com/q/26664535

http://stackoverflow.com/q/26514298
type: AnsweredQuestion
score: -2
tagged with: javascript
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26514652
has answer: http://stackoverflow.com/a/26514538
has body: I have a mobile site already, and what I want to do is add an image that shows up when you hit the page for 5 seconds. Once 5 seconds has passed it just disappears and you're at the homepage. Is this possible for an android device? Is there a way to make the image display on the entire screen? Thanks!
favorite count: 0
possible better answer: http://stackoverflow.com/a/26514652
accepted answer: http://stackoverflow.com/a/26514538
has title: Mobile Splash Page
downvote count: 3
upvote count: 1

http://stackoverflow.com/comment/41827307
has text: Excellent point there. The order isn’t crucial. I have amended my question to clarify this.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26607055

http://stackoverflow.com/q/26649153
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: telerik
score: 3
has answer: http://stackoverflow.com/a/32024556
has body: I'm looking for a solution that would allow me to make a horizontal drag and drop day scheuler. I have been looking at AngularJS UI-calendar's day view and Telerik Kendo UI Scheduler's day view, but there dosen't seem to be an option to flip it from vertical to horizontal. I want hours to be placed on the x-axis instead of the usual y-axis. Am I correct in my assumption that neither solution would allow me to accomplish that? If so any suggetion for a workaround/another solution?
type: Question
tagged with: asp.net-mvc
tagged with: javascript
upvote count: 3
has title: Horizontal day planner/scheduler (drag and drop) with angularJS
downvote count: 0
answer count: 1
tagged with: angular-ui

http://stackoverflow.com/a/32908270
answers question: http://stackoverflow.com/q/26670696
type: Answer
upvote count: 1
score: 1
has body: This issue is fixed in phantomjs version 1.9 "phantomjs": "^1.9.9" for casperJs casperjs --ssl-protocol=tlsv1 test run.js
downvote count: 0

http://stackoverflow.com/comment/41890009
type: Comment
comment on: http://stackoverflow.com/a/26620212
type: AnswerComment
has text: @CyberClown can you explain what you mean? do you mean sub directory or sub domain?
score: 0

http://stackoverflow.com/comment/42202299
has text: Have you tried [OWASP Java HTML Sanitizer](https://www.owasp.org/index.php/OWASP_Java_HTML_Sanitizer_Project#tab=Main)? I don't but it seems highly configurable and it is open source. Found at [wikipedia](http://en.wikipedia.org/wiki/HTML_sanitization) in "HTML sanitization" entry. Hope it helps.
comment on: http://stackoverflow.com/q/26549608
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41667850
comment on: http://stackoverflow.com/q/26519131
type: QuestionComment
type: Comment
score: 0
has text: @SatishShinde I updated my code above using what you said, but it's still not working, thanks for the reply though:)

http://stackoverflow.com/a/45202410
score: 3
downvote count: 0
has body: I am using ace in react, this is a code snippet of how I replace text const text = 'Text replacement'; const editor = this.ace.editor; const selectedContent = editor.getSelectedText(); const range = editor.selection.getRange(); editor.session.replace(range, text);
answers question: http://stackoverflow.com/q/26555492
upvote count: 3
type: Answer

http://stackoverflow.com/comment/41913638
has text: Updated question for better understanding.
score: 0
comment on: http://stackoverflow.com/q/26655390
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26528107
has answer: http://stackoverflow.com/a/30055866
type: UnansweredQuestion
has body: I am new in grunt and I am doing some geek plays. I was trying grunt-contrib-symlink to create a symlink in /dest/path/ from /origin/path. I have seen that when /origin/path doesn't exists the grunt proces stops because fails. Basically I am doing this task. symlink: { options: {overwrite: false}, explicit: {src: '/opt/origin/path',dest: '/opt/dest/path} }, The point it's that depending on the case, 'src' hope doesn't exists. I expect that exists some way to protect this situation, but I can't find it :( Can someone help me?
type: Question
tagged with: javascript
has title: How grunt can continue building even grunt-contrib-symlink doesn't find a path
tagged with: gruntjs
score: 0
tagged with: symlink
answer count: 1

http://stackoverflow.com/q/26557153
has comment: http://stackoverflow.com/comment/41736154
has title: C#: Headless Browser with Proxy and JavaScript
score: 1
downvote count: 1
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/26557674
tagged with: headless
tagged with: javascript
tagged with: proxy
tagged with: browser
has body: I am currently using SimpleBrowser.WebDriver, a headless browser, for a project. The browser only needs to be able to run some basic javascript code on a page, I do not want to manipulate the site with jscript or something. Is there any way to set a proxy for it? If not, can you recommend another solution for a headless browser with javascript and proxy support? Thanks in advance
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/18921099
upvote count: 2
has answer: http://stackoverflow.com/a/26557674
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41735910

http://stackoverflow.com/a/26542961
type: Answer
has body: http://jsfiddle.net/0xjhvq5r/1/ // Start when document is done with loading $(document).ready(function() { // jQuery puts automaticlly all images in an array, if you're selector fits on more html elements var $images = $('#form1 img'); // With this easy loop you select each img in the array and make many magic with this element $images.each(function() { var $image = $(this), imgId = $image.attr('id'); console.log(imgId); }); });
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26542834

http://stackoverflow.com/q/26644612
tagged with: javascript
has body: Issue: I am creating records in my Parse.com custom object. Here is how my request / JSON payload looks like... [INFO] : {"message":"My record with ACL","ownerName":"Dude","ACL":{"77cUXY2h1T":{"read":true,"write":true}}} Here is the response I get... [INFO] : {"createdAt":"2014-10-30T03:19:26.789Z","objectId":"0bcd7RfYf0"} When I look at the record from my data browser, the ACL appears to be set correctly. I am logged in as the current user but when I query the records, I do not get the ones where I have ACL set up. I can still create records with no ACL and retrieve them fine. Did I not set something correctly or am I missing something? Here is a screenshot of the data browser with ACL's setup. I have spent a lot of hours trying to figure this out and will appreciate any pointers / help. Thanks!
score: 0
has comment: http://stackoverflow.com/comment/41896494
answer count: 1
has title: Trouble retrieving Parse data with ACL using REST API / JS
has answer: http://stackoverflow.com/a/26645491
tagged with: parse-platform
tagged with: rest
accepted answer: http://stackoverflow.com/a/26645491
linked to: http://stackoverflow.com/q/16475957
has comment: http://stackoverflow.com/comment/41896322
has comment: http://stackoverflow.com/comment/41895582
type: AnsweredQuestion
tagged with: acl
tagged with: titanium
has comment: http://stackoverflow.com/comment/41895891
type: Question

http://stackoverflow.com/comment/41850595
comment on: http://stackoverflow.com/a/26619355
has text: Im not trying to iframe google. It was just an example. I added more info to the description. Im not an experienced coder so any help is appreciated
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41797558
type: AnswerComment
comment on: http://stackoverflow.com/a/26591080
has text: Why did you add `display:inline` also to the ` ` tag?
type: Comment
score: 0

http://stackoverflow.com/q/26671329
has body: I am working on an HTML website. PDF file is saved in database (MS SQL Server 2008 R2) as binary data. This need to be fetched and displayed in a webpage using jQuery. I tried using object tag in HTML. But PDF is not getting displayed. Can we convert binary data to pdf format using jQuery/javaScript? $('#pdf-container').html('&lt;object type="application/pdf" src="sample.pdf"&gt;&lt;/object&gt;'); &lt;div id="pdf-container" /&gt;
has answer: http://stackoverflow.com/a/29696021
type: Question
tagged with: javascript
has title: How can i render PDF which is saved in database as binary data using jQuery?
has answer: http://stackoverflow.com/a/26671851
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41943222
accepted answer: http://stackoverflow.com/a/29696021
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26671851
has comment: http://stackoverflow.com/comment/41943126
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/133277348
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).
comment on: http://stackoverflow.com/a/75499247
score: 0
type: AnswerComment

http://stackoverflow.com/a/29811314
type: Answer
answers question: http://stackoverflow.com/q/26632415
has body: I have been using Binary Muse's example from the Fluxxor ajax example. Here is my very simple example using the same approach. I have a simple product store some product actions and the controller-view component which has sub-components that all respond to changes made to the product store. For instance product-slider, product-list and product-search components. Fake Product Client Here is the fake client which you could substitute for calling an actual endpoint returning products. var ProductClient = { load: function(success, failure) { setTimeout(function() { var ITEMS = require('../data/product-data.js'); success(ITEMS); }, 1000); } }; module.exports = ProductClient; Product Store Here is the Product Store, obviously this is a very minimal store. var Fluxxor = require("fluxxor"); var store = Fluxxor.createStore({ initialize: function(options) { this.productItems = []; this.bindActions( constants.LOAD_PRODUCTS_SUCCESS, this.onLoadSuccess, constants.LOAD_PRODUCTS_FAIL, this.onLoadFail ); }, onLoadSuccess: function(data) { for(var i = 0; i &lt; data.products.length; i++){ this.productItems.push(data.products[i]); } this.emit("change"); }, onLoadFail: function(error) { console.log(error); this.emit("change"); }, getState: function() { return { productItems: this.productItems }; } }); module.exports = store; Now the product actions, which make the AJAX request and on success fire the LOAD_PRODUCTS_SUCCESS action returning products to the store. Product Actions var ProductClient = require("../fake-clients/product-client"); var actions = { loadProducts: function() { ProductClient.load(function(products) { this.dispatch(constants.LOAD_PRODUCTS_SUCCESS, {products: products}); }.bind(this), function(error) { this.dispatch(constants.LOAD_PRODUCTS_FAIL, {error: error}); }.bind(this)); } }; module.exports = actions; So calling this.getFlux().actions.productActions.loadProducts() from any component listening to this store would load the products. You could imagine having diffe…
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/41884710
score: 0
has text: What do you expect it to do? What does it do instead?
comment on: http://stackoverflow.com/q/26638773
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41879894
score: 0
comment on: http://stackoverflow.com/a/26631507
type: Comment
type: AnswerComment
has text: Still the same issue... doesn't look like your app knows what "checkout" is. Just because you made it a controller does not mean the dom will have access to it.

http://stackoverflow.com/q/26566317
has comment: http://stackoverflow.com/comment/94560629
has answer: http://stackoverflow.com/a/34944576
tagged with: dom
has answer: http://stackoverflow.com/a/26566330
has answer: http://stackoverflow.com/a/27693136
has body: I get this error after a making trivial React example page: Uncaught Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element. Here's my code: /** @jsx React.DOM */ 'use strict'; var React = require('react'); var App = React.createClass({ render() { return Yo ; } }); React.renderComponent(<App />, document.body); HTML: What does this mean?
has comment: http://stackoverflow.com/comment/68390942
score: 413
has title: Invariant Violation: _registerComponent(...): Target container is not a DOM element
tagged with: reactjs
has comment: http://stackoverflow.com/comment/67136658
has answer: http://stackoverflow.com/a/61743564
has answer: http://stackoverflow.com/a/43122460
linked to: http://stackoverflow.com/q/36877015
has answer: http://stackoverflow.com/a/41324784
tagged with: javascript
answer count: 16
has answer: http://stackoverflow.com/a/40095650
favorite count: 0
has answer: http://stackoverflow.com/a/68618364
upvote count: 415
has answer: http://stackoverflow.com/a/71948281
accepted answer: http://stackoverflow.com/a/26566330
has answer: http://stackoverflow.com/a/28965157
has answer: http://stackoverflow.com/a/57524086
has answer: http://stackoverflow.com/a/50124101
has answer: http://stackoverflow.com/a/49173458
has answer: http://stackoverflow.com/a/71261957
downvote count: 2
linked to: http://stackoverflow.com/q/11523359
possible better answer: http://stackoverflow.com/a/28965157
has answer: http://stackoverflow.com/a/71989903
type: Question
has comment: http://stackoverflow.com/comment/41755929
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/55592268

http://stackoverflow.com/q/26601841
tagged with: tomcat
favorite count: 0
has body: My WebApp uses Java annotations to map the URL to the servlet (@WebServlet) and I don't have a web.xml file. I want to foward the request to another HTML file and I did it like so: request.getRequestDispatcher("/WEB-INF/test/testpage.html").forward(request, response); It works, but I can't get additional resources (javascript) from the server. &lt;script type="text/javascript" src="testsuite.js"&gt;&lt;/script&gt; testsuite.js is located in /WEB-INF/test/testsuite.js, the same folder as testpage.html. When requesting testsuite.js I get 404. How can I configure Tomcat to serve all the resources in my work tree without a web.xml? Worst case I will simply embed JS. Additionally I let eclipse install the web server on my local machine so I have no idea how they are deployed.
answer count: 1
accepted answer: http://stackoverflow.com/a/26601896
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: java
tagged with: eclipse
has answer: http://stackoverflow.com/a/26601896
type: Question
has title: Eclipse - How do I publish non-Java resources without a web.xml file?
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26612449
has body: It looks up for the Sys-Namespace, whether it exists (or not). This is a special namespace »[...]root namespace for ASP.NET AJAX«
accepted answer of: http://stackoverflow.com/q/26612268
has comment: http://stackoverflow.com/comment/41837083
score: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26612268
downvote count: 0
has comment: http://stackoverflow.com/comment/41837233
type: Answer
has comment: http://stackoverflow.com/comment/41836683
upvote count: 3
has comment: http://stackoverflow.com/comment/41836988
has comment: http://stackoverflow.com/comment/41836796
has comment: http://stackoverflow.com/comment/41837191

http://stackoverflow.com/q/26538579
has title: Preparing a page in Printer Version to be saved locally with browser "save page as..." (no server-side scripting)
type: Question
has body: I am working on an HTML page (no server-side scripting) web page with JavaScript. That has to be modified dynamically by the user. Then I want to let the user save this page locally as a .html file. To achieve this, I suggest the user to use the browser function "Save page as...". I do that because I want the user to have complete local access to this file when off-line. The question is that I would like the user to save the page in Printer Version after I have hidden all the stuff he does not need (menus, instructions, etc.). I have already linked the css stylesheet for printing (with "media=print") and I would like to use it to change the aspect of the page before the user save it. (It's not possible to use an iFrame because the browser function "Save page as..." saves always an entire page.) I ask if anybody know a way to link dynamically a new css-stylesheet to the page that will replace the css style hiding the unwanted css classes. The solution must work in recent versions of browsers, not old.
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41718043
has comment: http://stackoverflow.com/comment/41702796
has answer: http://stackoverflow.com/a/26547660
tagged with: css
has comment: http://stackoverflow.com/comment/41711849
type: AnsweredQuestion
tagged with: save
accepted answer: http://stackoverflow.com/a/26547660

http://stackoverflow.com/q/26593165
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41802716
has body: I'm trying to open a binary file './test' and send it's contents, one byte at a time, to an external device through the UART. The external device echos back each byte. The regular file './test' and the buffer 'dta' in this case are both 19860 bytes in length however the code will continue to send bytes from beyond the end of buffer 'dta' well after 'a' becomes greater than 'dta.length' and I can't figure out why. Any ideas? var fs = require('fs'); var SerialPort = require("serialport").SerialPort var serialPort = new SerialPort("/dev/ttyAMA0", {baudrate: 115200}, false); stats = fs.statSync(__dirname+"/test"); dta = new Buffer (stats.size); dta = fs.readFileSync(__dirname+"/test"); a=0; serialPort.open(function (error) { if ( error ) { console.log('failed to open: '+error); } else { serialPort.write(dta[a]); } }); serialPort.on('data', function(data) { a++; if (a &lt; dta.length) serialPort.write(dta[a]); });
type: Question
has comment: http://stackoverflow.com/comment/41805995
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/41801667
has comment: http://stackoverflow.com/comment/41802533
favorite count: 0
has title: Node.js : Stopping transfer at EOF while sending binary data through UART
tagged with: serial-port
tagged with: node.js

http://stackoverflow.com/comment/41730766
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26554520
has text: I think you're confused about a few things. But I don't know where to start to put you back on the right track. let me try to get a few links together.

http://stackoverflow.com/q/26652110
type: Question
type: AnsweredQuestion
has title: Scrapy like tool for Nodejs?
score: 12
tagged with: cheerio
has answer: http://stackoverflow.com/a/27896204
tagged with: javascript
has body: I would like to know if there is something like Scrapy for nodejs ?. if not what do you think of using the simple page download and parsing it using cheerio ? is there a better way.
favorite count: 0
has answer: http://stackoverflow.com/a/60648598
tagged with: node.js
has answer: http://stackoverflow.com/a/53712287
upvote count: 14
accepted answer: http://stackoverflow.com/a/27896204
answer count: 5
downvote count: 2
possible better answer: http://stackoverflow.com/a/56160623
tagged with: web-scraping
tagged with: scrapy
has answer: http://stackoverflow.com/a/56160623
has answer: http://stackoverflow.com/a/27116890

http://stackoverflow.com/comment/41807163
type: Comment
type: QuestionComment
has text: your service shouldn't be showing and hiding html, it should instead be handling some form of data. Your controller should be collecting data from the service that the template can then present. Showing and hiding the modal should be done through a modal module that then presents the result back to the controller, which then makes the data available to the template and/or sends it to the service. I don't think you need a directive for this.
comment on: http://stackoverflow.com/q/26595168
score: 0

http://stackoverflow.com/comment/41664345
score: 1
comment on: http://stackoverflow.com/q/26517126
type: QuestionComment
type: Comment
has text: You might want to make a start by looking at the Speech Synthesis API that's part of the HTML5 specification. But keep in mind that I don't know how well it's supported yet by the browsers. More information can be found here: http://updates.html5rocks.com/2014/01/Web-apps-that-talk---Introduction-to-the-Speech-Synthesis-API#disqus_thread

http://stackoverflow.com/q/26629506
accepted answer: http://stackoverflow.com/a/35936017
has comment: http://stackoverflow.com/comment/41871955
has body: Here is a fiddle CSS: div{ width:160px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; text-transform: uppercase; } I edited a fiddle created by someone else who meant to answer this question. This solution works well, BUT in one case does not work correctly. If the text should be 100% of the box ellipsis, it is hiding the last few letters and adding &quot;...&quot;. However, when you manipulate the CSS and remove the overflow statement, then the size fits. So this way is not 100% reliable, but I need a 100% working one. Does anyone have a proper solution?
has comment: http://stackoverflow.com/comment/41877162
has comment: http://stackoverflow.com/comment/41871883
possible better answer: http://stackoverflow.com/a/26629819
answer count: 2
has comment: http://stackoverflow.com/comment/41873906
has answer: http://stackoverflow.com/a/26629819
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41867768
favorite count: 0
has comment: http://stackoverflow.com/comment/41873511
has comment: http://stackoverflow.com/comment/41879255
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41876758
upvote count: 6
has comment: http://stackoverflow.com/comment/41901243
type: AnsweredQuestion
score: 6
has answer: http://stackoverflow.com/a/35936017
has comment: http://stackoverflow.com/comment/41867581
type: Question
has title: Detect CSS text-overflow ellipsis with jQuery
has comment: http://stackoverflow.com/comment/41884064
has comment: http://stackoverflow.com/comment/41869165

http://stackoverflow.com/comment/41836713
score: 0
comment on: http://stackoverflow.com/q/26610752
type: Comment
type: QuestionComment
has text: It seems to be a bug in Chrome, because it works for all other browsers

http://stackoverflow.com/q/26561292
has body: I'm using Java 8 Nashorn to render CommonMark to HTML server side. If I compile and cache and reuse a CompiledScript, a certain page takes 5 minutes to render. However, if I instead use eval, and cache and reuse the script engine, rendering the same page takes 3 seconds. Why is CompiledScript so slow? (sample code follows) What's a good approach for running Javascript code in Nashorn, over and over again as quickly as possible? And avoiding compiling the Javascript code more than once? This is the server side Scala code snippet that calls Nashorn in a way that takes 5 minutes: (when run 200 times; I'm compiling many comments from CommonMark to HTML.) (This code is based on this blog article.) if (engine == null) { val script = scala.io.Source.fromFile("public/res/remarkable.min.js").mkString engine = new js.ScriptEngineManager(null).getEngineByName("nashorn") compiledScript = engine.asInstanceOf[js.Compilable].compile(s""" var global = this; $script; remarkable = new Remarkable({}); remarkable.render(__source__);"""); } engine.put("__source__", "**bold**") val htmlText = compiledScript.eval() Edit Note that the $script above is reevaluated 200 times. I did test a version that evaluated it only once, but apparently then I wrote some bug, because the only-once version wasn't faster than 5 minutes, although it should have been one of the fastest ones, see Halfbit's answer. Here's the fast version: ... val newCompiledScript = newEngine.asInstanceOf[js.Compilable].compile(s""" var global; var remarkable; if (!remarkable) { global = this; $script; remarkable = new Remarkable({}); } remarkable.render(__source__);""") ... /Edit Whereas this takes 2.7 seconds: (when run 200 times) if (engine == null) { engine = new js.ScriptEngineManager(null).getEngineByName("nashorn") engine.eval("var global = this;") engine.eval(new jio.FileReader("public/res/remarkable.min.js")) engine.eval("remarkable = new Remarkable({});") } engine.put("source", "**bold**") val htmlText = engine.eval(…
favorite count: 0
has comment: http://stackoverflow.com/comment/41743804
type: AnsweredQuestion
downvote count: 0
tagged with: java
score: 19
type: Question
tagged with: nashorn
tagged with: performance
tagged with: javascript
upvote count: 19
has answer: http://stackoverflow.com/a/26574568
has answer: http://stackoverflow.com/a/26577661
accepted answer: http://stackoverflow.com/a/26577661
has title: How make Java 8 Nashorn fast?
answer count: 2
possible better answer: http://stackoverflow.com/a/26574568

http://stackoverflow.com/a/26649781
answers question: http://stackoverflow.com/q/26635746
type: Answer
has comment: http://stackoverflow.com/comment/92003105
has body: Is this (check this fiddle) what you are looking for?? All you need is idea on Javascript or Jquery. Code in above fiddle is just for sample or reference. For better usage please refer to Jquery Ajax. Code is : $('#cities').change(function(){ var data = $('#cities :selected').val(); document.getElementById("data").style.display = "block"; if(data === "Paris") document.getElementById("data").innerHTML = "You have selected Paris"; else if(data === "Rome") document.getElementById("data").innerHTML = "You have selected Rome"; else if(data === "NY") document.getElementById("data").innerHTML = "You have selected NY"; else if(data === "London") document.getElementById("data").innerHTML = "You have selected London"; else document.getElementById("data").style.display = "none"; });
has comment: http://stackoverflow.com/comment/92010320
score: 0

http://stackoverflow.com/q/26625739
has title: Jquery change() function
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26625768
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41860744
score: 0
tagged with: onchange
possible better answer: http://stackoverflow.com/a/26625762
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26625762
has answer: http://stackoverflow.com/a/26625835
has body: Why is this not alerting the var valueFirst content? My Jquery Code: My HTML: Option 1 Option 2
answer count: 5
has comment: http://stackoverflow.com/comment/41860733
has answer: http://stackoverflow.com/a/26625764
has answer: http://stackoverflow.com/a/26625771
accepted answer: http://stackoverflow.com/a/26625835

http://stackoverflow.com/comment/41902289
has text: This is really unfortunate. My Chrome is up to date, I already cleaned up the cache and everything, and still the result is `undefined`. @TrueBlueAussie they are part of my code which is not really complete yet, I build this gradually. I will not proceed further if this has not been solved. I took this from Internet, I don't know IIFE by the way.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26648118

http://stackoverflow.com/a/26604350
has comment: http://stackoverflow.com/comment/41823238
upvote count: 1
downvote count: 1
has body: The keyup event occurs when a keyboard key is released. The keyup() method triggers the keyup event, or attaches a function to run when a keyup event occurs. The blur event occurs when an element loses focus. The blur() method triggers the blur event, or attaches a function to run when a blur event occurs. $("#geocomplete").blur(function(){ var x = $('input[name="lat"]').val(); alert(x); }); Try this
has comment: http://stackoverflow.com/comment/41824939
score: 0
answers question: http://stackoverflow.com/q/26604032
type: Answer
has comment: http://stackoverflow.com/comment/41824257

http://stackoverflow.com/a/26682160
has comment: http://stackoverflow.com/comment/41963459
has comment: http://stackoverflow.com/comment/41964051
upvote count: 1
has body: EDITED How about: "This should fail".should.be.true;
answers question: http://stackoverflow.com/q/26591009
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41692943
type: Comment
type: QuestionComment
has text: @m3dev I tried that too.. -_- in vain.
comment on: http://stackoverflow.com/q/26532951
score: 0

http://stackoverflow.com/comment/41720989
type: AnswerComment
comment on: http://stackoverflow.com/a/26548430
type: Comment
has text: (from trans......select new{...}).ToDictionary() is also right , sorry for my mistakes
score: 0

http://stackoverflow.com/comment/41792583
has text: If the AJAX call is succesful, the only thing that matters is the way it is processed. You can leave out all the PHP, and just give us 1) The function that processed the response to add the row and 2) the *exact* input to that function (the result of the AJAX request). All this PHP code isn't helping and should be removed, unless the error is in there. A tip: most browsers contain developer tools (F12), that allow you to debug JavaScript or at least see error messages.
comment on: http://stackoverflow.com/q/26588853
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26645297
tagged with: php
answer count: 1
downvote count: 1
has body: I'm using php to fetch a db query that I want to make a table from. I want to put the query results into a json object and then use javascript from there to output the results into a table. I used json_encode to create the json object in php. I'm fairly new to javascript so I'm a little confused as to how I can send the json object I've created to javascript and then output the results using javascript? Should I include the javascript in the same file as the php page or a different one? If you can explain what you're doing that would be awesome because I really want to know what's going on at each step. Here's what I have so far: <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; $conn = mysqli_connect($servername, $username, $password, $dbname); if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $sql = "SELECT Name, Location, ID, Price From ProdTable where ID>=2000"; $encode=array(); $result = mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($result)) { $encode[] = $row; } echo json_encode($encode); ?> Update: So I went ahead and made xyz.php my backend page and made a main.php for displaying the results. I started off with this sample function to make sure my jquery was fetching the results from the xyz.php page. Now, I don't know how to display the results in a table using jquery. Here's what I did for my main.php page: <?php ?> Show JSON Results
has title: use json and javascript to populate a table
has answer: http://stackoverflow.com/a/26645353
has comment: http://stackoverflow.com/comment/41906412
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26645353
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41896414
favorite count: 0
type: Question
tagged with: mysqli
score: 1
upvote count: 2

http://stackoverflow.com/comment/41739902
has text: Keep in mind that it only uses the month format if the data range needs it to be. If your data is within a month it only uses the day and/or the hour format.
comment on: http://stackoverflow.com/q/26541011
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41913236
type: AnswerComment
has text: Thanks a lot! Thank you for the tips as well. I tried a different file, but that didn't work. I merged them into one script now.
comment on: http://stackoverflow.com/a/26654577
type: Comment
score: 0

http://stackoverflow.com/a/26639422
accepted answer of: http://stackoverflow.com/q/26639346
has comment: http://stackoverflow.com/comment/41886318
has body: You need to stop event from bubbling up the DOM tree: $('.dropdown-menu').click(function(e) { e.stopPropagation(); }); event.stopPropagation prevents event from reaching the node where it's eventually handled by Bootstrap hiding menu. Demo: http://jsfiddle.net/wkc5md23/3/
answers question: http://stackoverflow.com/q/26639346
type: Answer
score: 49
has comment: http://stackoverflow.com/comment/41886603
has comment: http://stackoverflow.com/comment/41887720
upvote count: 52
has comment: http://stackoverflow.com/comment/41886634
has comment: http://stackoverflow.com/comment/41886089
has comment: http://stackoverflow.com/comment/41886026
downvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/41720808
comment on: http://stackoverflow.com/q/26548689
type: Comment
type: QuestionComment
score: 0
has text: What middleware do you have set up *before* that router? Can you show that code too?

http://stackoverflow.com/comment/41799922
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26587906
has text: Test this script. With the value 53 it will return 100. This value is obtained on client side for the moment. I want a solution for this script to be executed on the server side and record the 100 in the database each time a user will use my form.
type: AnswerComment

http://stackoverflow.com/comment/41870294
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26631038
has text: call a function when the submit button is clicked like this ` `, and in that function do ur validation
score: 0

http://stackoverflow.com/comment/41855155
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26622141
has text: Can you please post your completed code? because of some other reason your Jquery may fail to download to your page.
score: 0

http://stackoverflow.com/comment/41876023
has text: i think you're meaning to add this a comment, not an answer
comment on: http://stackoverflow.com/a/26633846
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/41915707
comment on: http://stackoverflow.com/q/26653977
score: 0
has text: Oh I see, thanks! Since I am not really skilled (not at all actually) with that type of language, I have been looking around. Is Jquery a good option in this case? I was thinking of using some of resources from http://www.alpacajs.org/examples/components/dependency/conditional-field.html Or would you have better site to suggest? Is it something difficult to implement myself otherwise? And finally, what about the "1." of my question? Thanks so much
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26648950
downvote count: 1
answers question: http://stackoverflow.com/q/26648842
type: Answer
upvote count: 0
score: -1
has body: Your

http://stackoverflow.com/q/26587557
has answer: http://stackoverflow.com/a/26587770
has answer: http://stackoverflow.com/a/26587826
has comment: http://stackoverflow.com/comment/41790376
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26588254
has body: I am using the following c# to change content from the server side: this.StatusPreview.InnerHtml = "server side"; this.StatusPreview.Update(); I am using the following js to change content on the client side: document.getElementById('StatusPreview').innerHTML = "client side"; If I execute the js first, there is no problem. However, If I execute the c# first, then the js, I get a, Uncaught TypeError: Cannot set property 'innerHTML' of null on the js line. This is the element being affected: When I execute the c#, it changed the td to asd Is there a way that would allow me to update c# first, without turning my element null? Thank you!
tagged with: javascript
has comment: http://stackoverflow.com/comment/41790858
possible better answer: http://stackoverflow.com/a/26587770
has comment: http://stackoverflow.com/comment/41791244
has answer: http://stackoverflow.com/a/26588254
type: Question
has title: Calling c# then js on same element
tagged with: c#
type: AnsweredQuestion

http://stackoverflow.com/a/26631109
has body: You can create your own array this way: // create own Array object var _Array = function() {}; // inherit from Array _Array.prototype = Object.create(Array.prototype); // reset constructor _Array.prototype.constructor = _Array; // overwrite push method _Array.prototype.push = function(){ doSomething() Array.prototype.push.apply(this, arguments); }; You can use it like this: // create own array var newArr = new _Array(); // push to array newArr.push(1, 2, 3); // create copy var arr = newArr.slice();
downvote count: 0
has comment: http://stackoverflow.com/comment/41870398
accepted answer of: http://stackoverflow.com/q/26630676
score: 1
answers question: http://stackoverflow.com/q/26630676
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41872957
type: Answer

http://stackoverflow.com/q/26591559
possible better answer: http://stackoverflow.com/a/27794579
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26592044
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has body: I'm using the jquery DataTables plugin to display an array of objects. I would like to clear the table and redraw using the changed data. However, the only way I've been able to do that so far is to destroy the table and reinitialize. I'd like to know if there is a simple way to refresh from JS data source. This is what I'm doing, it works but feels wrong... if (NAMESPACE.table){ NAMESPACE.table.destroy(); } NAMESPACE.table = $('#assets-table').DataTable({ "data": filteredData, "columns": [ { "data": "id" }, { "data": "type" }, { "data": "city" }, { "data": "state"} ] });
has answer: http://stackoverflow.com/a/26592044
has answer: http://stackoverflow.com/a/27794579
tagged with: datatables
has title: How to refresh Datatable data from js array of objects
upvote count: 4
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/comment/41807973
comment on: http://stackoverflow.com/a/26596253
type: AnswerComment
score: 0
type: Comment
has text: That works, but what if you wanted `doSomething` to access a variable `y` outside itself? If your case, I guess you could do `somescope.y`. Using IIFE's like in the link I posted is just a different way.

http://stackoverflow.com/a/26671217
has comment: http://stackoverflow.com/comment/41943955
type: Answer
has body: Never call FB.login in the asynchronous (!) callback function of FB.getLoginStatus. Some browsers block the login popup if you do that, you always need to call FB.login on user interaction - and calling it on page load is a bad idea anyway. Don´t force the user to authorize your App right when they enter your App and before they know what your App is about. FB.getLoginStatus on page load to refresh the User Token and to check if the user is authorized FB.login on mouse click It is also easier that way to remove some redundant code and move your FB.api call to a function. It may or may not solve your problem, but it´s definitely important and a commong source of errors.
has comment: http://stackoverflow.com/comment/41944003
answers question: http://stackoverflow.com/q/26670860
score: 0

http://stackoverflow.com/q/26605569
has answer: http://stackoverflow.com/a/26607140
accepted answer: http://stackoverflow.com/a/26607140
tagged with: javascript
score: 0
answer count: 1
tagged with: database-connection
has body: I'm creating a website using asp mvc5 and i need to show some data on a view using a graph. i have implemented a graph using javascript. @* *@ Daily Booking @* *@ @* Show *@ @* *@ i have a database. <add name="DefaultConnection" connectionString="Data Source=ACER-PC\CAD;Initial Catalog=IT;Integrated Security=true;" providerName="System.Data.SqlClient" /> I want to get values from customer_age table and show that in graph. How am i supposed to do that?
type: AnsweredQuestion
type: Question
has title: How to attach sql database to a javascript graph
tagged with: asp.net-mvc

http://stackoverflow.com/comment/41660453
has text: @mikehomme: No I don't want to disable the link, thanks
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26515252
type: Comment

http://stackoverflow.com/q/26550333
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
has body: I use blogger as my blogging platform. In my blog homepage, I want to use slider as my post thumbnail when my post contain more than 1 image inside. So, I create a JSON request inside all post, and the results look like this: // API callback extract({ "version": "1.0", "encoding": "UTF-8", "entry": { "xmlns": "http://www.w3.org/2005/Atom", "xmlns$blogger": "http://schemas.google.com/blogger/2008", "xmlns$georss": "http://www.georss.org/georss", "xmlns$gd": "http://schemas.google.com/g/2005", "xmlns$thr": "http://purl.org/syndication/thread/1.0", "id": { "$t": "tag:blogger.com,1999:blog-8885963640212113245.post-2877822832429210498" }, "published": { "$t": "2014-10-23T21:36:00.004+07:00" }, "updated": { "$t": "2014-10-24T21:21:43.914+07:00" }, "category": [{ "scheme": "http://www.blogger.com/atom/ns#", "term": "Flat Design" }, { "scheme": "http://www.blogger.com/atom/ns#", "term": "Service" }], "title": { "type": "text", "$t": "Blloon" }, "content": { "type": "html", "$t": " <\/a><\/div> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab quae laboriosam quidem quod, adipisci omnis nostrum blanditiis porro quam quisquam veritatis accusantium qui cumque commodi sequi fugiat consectetur nulla, illum! <\/a><\/div> <\/a><\/div> " }, } }); It's my first post and there are three image tags inside it. Then this is my second post and there are two image tags inside it. // API callback extract({ "version": "1.0", "encoding": "UTF-8", "entry": { "xmlns": "http://www.w3.org/2005/Atom", "xmlns$blogger": "http://schemas.google.com/blogger/2008", "xmlns$georss": "http://www.georss.org/georss", "xmlns$gd": "http://schemas.google.com/g/2005", "xmlns$thr": "http://purl.org/syndication/thread/1.0", "id": { "$t": "tag:blogger.com,1999:blog-8885963640212113245.post-7814577047467078813" }, "published": { "$t": "2014-10-23T21:35:00.000+07:00" }, "updated": { "$t": "2014-10-24T21:31:22.546+07:00" }, "category": [{ "scheme": "http://www.blogger.com/atom/ns#", "term": "Charity" }, { …
has answer: http://stackoverflow.com/a/26550498
tagged with: javascript
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26550544
score: -1
has title: Extract img src from JSON request

http://stackoverflow.com/a/26664766
type: Answer
has comment: http://stackoverflow.com/comment/41931423
has body: You can make MySQL do the work: SELECT (UNIX_TIMESTAMP(date_field) * 1000) AS jsTimestamp FROM table; Alternatively, Moment is pretty much the gold standard for JavaScript date work and can read MySQL-style strings right out of the box.
has comment: http://stackoverflow.com/comment/41931327
has comment: http://stackoverflow.com/comment/41931362
has comment: http://stackoverflow.com/comment/41931342
upvote count: 4
has comment: http://stackoverflow.com/comment/41931429
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26664718
has comment: http://stackoverflow.com/comment/41931866
score: 4
answers question: http://stackoverflow.com/q/26664718

http://stackoverflow.com/comment/41841210
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26614877
score: 0
has text: Could you provide a fiddle?

http://stackoverflow.com/comment/41660019
type: Comment
comment on: http://stackoverflow.com/a/26514905
type: AnswerComment
has text: Could you help with this? http://jsfiddle.net/x3L8uq19/2/ Cheers, I'd like to make the arrow point down when clicked.
score: 0

http://stackoverflow.com/a/26651405
has comment: http://stackoverflow.com/comment/41906544
accepted answer of: http://stackoverflow.com/q/26651337
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41906639
answers question: http://stackoverflow.com/q/26651337
has body: While you can do this with jQuery alone, it would be an uphill struggle. You're better off using a client-side MVC framework. There are a number of client-side MVC frameworks available that should do this. I generally use Backbone.js, and using its routing you would easily be able to accomplish this kind of thing. It makes it very easy to define client-side routes with hashes and assign views to those routes. As long as you don't mind the URL being www.test.be/#work, that will be fine You might also want to check out AngularJS as an alternative, but I can't speak for how easy it would be to implement this in Angular.
score: 1
upvote count: 1

http://stackoverflow.com/comment/41930268
type: AnswerComment
has text: Okay. I'll do that then. Thanks for your help anyways :)
type: Comment
comment on: http://stackoverflow.com/a/26664122
score: 0

http://stackoverflow.com/q/26521945
favorite count: 0
tagged with: d3.js
tagged with: c3.js
accepted answer: http://stackoverflow.com/a/26532376
possible better answer: http://stackoverflow.com/a/26544344
has answer: http://stackoverflow.com/a/26544344
type: AnsweredQuestion
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/26532376
has body: I am creating a multiple series line graph with C3.JS by loading the data from a provided CSV file. I can plot the graph however I have not found yet if it is possible to only plot certain columns from the CSV, my graph is plotting all the CSV columns. My CSV look like this: Sex,Age,L,M,S,P3,P5,P10,P25,P50,P75,P90,P95,P97 2,0,-1.298749689,34.7115617,0.046905108,31.93019666,32.25089861,32.75948527,33.65186554,34.7115617,35.85124044,36.9534983,37.65137722,38.12110271 2,0.5,-1.440271514,36.03453876,0.042999604,33.38070525,33.68743507,34.17345861,35.02508397,36.03453876,37.11806755,38.16405088,38.82535049,39.27005698 2,1.5,-1.581016348,37.97671987,0.038067862,35.48627093,35.77560367,36.23325692,37.03281566,37.97671987,38.9853304,39.95458524,40.56517149,40.97482424 2,2.5,-1.593136386,39.3801263,0.035079612,36.98550023,37.26521982,37.70685493,38.47603153,39.3801263,40.34145495,41.2606303,41.83732218,42.22321458 And I which to only plot the lines for the percentiles (P* columns) columns with the Age as the X axis, and exclude the Sex, L, M and S columns from being plotted. currently my graphs looks like this: One solution is to remove the columns from the CSV file however this will not be possible as I will need the other values latter for other computations and I wish to keep all data in one file. My C3.js code looks like this: var chart = c3.generate({ data: { x: 'Age', url: '/data/cdc/cdc_female_hcageinf.csv', type: 'line' }, tooltip: { show: false }, point: { show: false } }); I am not sure if there is a c3.js configuration or method to do so, or a javascript method will be necessary.
has title: C3.js exclude columns from CSV
type: Question
tagged with: graph
has comment: http://stackoverflow.com/comment/41690341
answer count: 2
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/41673253

http://stackoverflow.com/q/26665447
has title: AngularJS: Data binding to array elements doesn't work with bulk update
score: 1
has answer: http://stackoverflow.com/a/26665583
upvote count: 1
type: Question
tagged with: 2-way-object-databinding
tagged with: arrays
has body: The desired behavior is that I want to dynamically generate some navigation entries(some s ) based on the data returned from backend. So I bind the herf and the text of each to the fields of an element of an array model. Once the backend call returns, I assign the return data data to model to update the html. model and data share the same structure but this doesn't work for me. The array looks like $scope.links = { 'cancelLink': 'http://cancelLink', 'Steps': [{ 'label': "Step1", 'link': "http://1" }, { 'label': "Step2", 'link': "http://2" }, { 'label': "Step3", 'link': "http://3", 'active': true }, { 'label': "Review", 'link': "http://review" }] }; The updating logic $scope.loadLinks = function () { $http({ method: 'GET', url: '/links' }).success(function(data) { $scope.links = data; }); }; HTML {{links.Steps[0].label}} {{links.Steps[1].label}} ... The above code just failed silently without any output from the console. I tried assigning field-wise from date to link (links.Steps[0].link == data.Steps[0].link) and that works. So I wonder is this kind of bulk update not supported or something? Also I wonder how should I troubleshoot this kind of ng-directive issue down the road?
downvote count: 0
tagged with: javascript
answer count: 2
favorite count: 0
tagged with: data-binding
has answer: http://stackoverflow.com/a/26665652
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/26669708
score: 2
answers question: http://stackoverflow.com/q/26669578
has body: SVG text is not coloured using color. Instead it uses fill and stroke so you can colour the outline separately. Change things to nameSpan.style.fill = "blue" and it should work for you.
accepted answer of: http://stackoverflow.com/q/26669578
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/a/26608930
has body: you can make it as Michel Tome wrote just more generic way. Banana Apple Orange And in the JS take the text from the event. $scope.isSimilar = function ($event) { var text = $event.target.textContent; var pattern = new Regexp(text, "gi") return pattern.test($scope.search); }
score: 0
answers question: http://stackoverflow.com/q/26608355
type: Answer

http://stackoverflow.com/comment/42001005
has text: Thanks :) What I suggest is use your one grid on top of that but your paths should be precise to the pixel level for this to work. I don't see why this is not a general approach for any grid that has these properties and doesn't distort the original grid ;). If you have to do it in a distorted grid we will be talking about problems found in Computational Geometry. Something that could involve academic paper reading etc. I believe your application is quite smaller to need something that is not a perfect grid :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26679161
type: Comment

http
tags question: http://stackoverflow.com/q/26556604
tags question: http://stackoverflow.com/q/26647511
tags question: http://stackoverflow.com/q/26629302
tag name: http
tags question: http://stackoverflow.com/q/26616399
tags question: http://stackoverflow.com/q/26614259
tags question: http://stackoverflow.com/q/26622343
tags question: http://stackoverflow.com/q/26660664
type: Tag
tags question: http://stackoverflow.com/q/26598790
tags question: http://stackoverflow.com/q/26672226
tags question: http://stackoverflow.com/q/26568004

http://stackoverflow.com/comment/41771987
score: 0
has text: Ok, so I'm stuck! Can you possibly tell me how I go about this using html form. I don't know what action to give my form. I have this
type: Comment
comment on: http://stackoverflow.com/a/26571558
type: AnswerComment

http://stackoverflow.com/q/26593123
has title: Waiting for a promise to be resolved in a different controller
score: 2
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26593187
type: Question
answer count: 2
has body: I'm struggling to AngularJS trying to get a piece of code delayed until a promised will be resolved. My promise is being called and executed in Controller A, but i need a piece of code from Controller B to delay its execution until the promise from Controller A will be totally resolved. I've been doing some kind of hacks with $scope.$watch but i'm sure there must be another different way to accomplish this. Am I wrong? Thanks in advance!
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26593194

http://stackoverflow.com/a/26557134
downvote count: 0
has comment: http://stackoverflow.com/comment/41737000
type: Answer
answers question: http://stackoverflow.com/q/26557050
accepted answer of: http://stackoverflow.com/q/26557050
upvote count: 2
has body: Web storage only support string values. Thus, you need to convert your object to a JSON string using JSON.stringify(obj) before saving it. When you retrieve it, you can parse it back to an object, using either JSON.parse(str) or $.parseJSON(str). Updated fiddle with example: http://jsfiddle.net/ab316mkr/5/ From MDN: Note: Keep in mind that everything you store in any of the storages described in this page is converted to string using its .toString method before being stored. So trying to store a common object will result in string "[object Object]" to be stored instead of the object or its JSON representation. Using native JSON parsing and serialization methods provided by the browser is a good and common way for storing objects in string format.
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41835762
comment on: http://stackoverflow.com/q/26611942
type: QuestionComment
has text: Is the condition hit?
score: 0
type: Comment

http://stackoverflow.com/comment/41871924
has text: Not what's being asked. OP asks to simulate the keypress, not to listen for it.
comment on: http://stackoverflow.com/a/26631851
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41935059
type: QuestionComment
comment on: http://stackoverflow.com/q/26666513
has text: @MatthewHerbst: As Ian showed, jQuery is using `for-in` to enumerate your Array. This is bad JS citizenship IMO, but it's probably too dug in for them to correct at this point. However, as long as you don't use `for-in` to enumerate an Array *(which you almost never should)*, you'll be fine.
score: 0
type: Comment

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/26551468
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/26656836

http://stackoverflow.com/q/26562430
upvote count: 0
score: -2
has body: This is the dictionary that I have given for the json.dumps in my views.py {1: {'status': u'up', 'count': 8}, 2: {'status': u'down', 'count': 12}} I have to use this in my javascript. I have tried the following way but not working for me. var mydata = json.loads({{indexdata}}); can anyone please help me with this?
possible better answer: http://stackoverflow.com/a/26562500
tagged with: javascript
has answer: http://stackoverflow.com/a/26562510
favorite count: 0
has title: How can I parse the json string in javascript
downvote count: 2
accepted answer: http://stackoverflow.com/a/26562510
tagged with: python
has comment: http://stackoverflow.com/comment/41744896
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41744912
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41745175
has comment: http://stackoverflow.com/comment/41744957
linked to: http://stackoverflow.com/q/15592811
has answer: http://stackoverflow.com/a/26562500
type: Question
has comment: http://stackoverflow.com/comment/41744905
answer count: 2
duplicate of: http://stackoverflow.com/q/15592811

http://stackoverflow.com/comment/41830561
score: 0
type: Comment
type: QuestionComment
has text: You use XSL, XLS and xslt here - What do you mean? Xslt? What does this question have to do with xslt, I don't see any connection. Also, XML can not call anything, it is markup language. Please clarify what you are actually doing.
comment on: http://stackoverflow.com/q/26609072

http://stackoverflow.com/comment/41943545
score: 0
type: Comment
has text: I don't even have a website. Not sure where you were looking. o_O
type: AnswerComment
comment on: http://stackoverflow.com/a/26664119

http://stackoverflow.com/a/26669904
accepted answer of: http://stackoverflow.com/q/26669807
has comment: http://stackoverflow.com/comment/41944050
has comment: http://stackoverflow.com/comment/41945748
type: Answer
has comment: http://stackoverflow.com/comment/41943381
has comment: http://stackoverflow.com/comment/41945932
has body: You forgot the '+' in your filter: var filter = /^[0-9]+$/; Else you expect only 1 digit. Also, you used an undefined variable: message.val().length I guess you wanted to use phone. $('#validate').click(function() { var phone = $("#phone"); var phoneInfo = $("#phoneInfo"); var a = $("#phone").val(); var filter = /^[0-9]+$/; //it's valid if (filter.test(a) && phone.val().length <= 10) { phone.removeClass("error"); phoneInfo.text("- thank you"); phoneInfo.removeClass("error"); return true; } //it's NOT valid else { phone.addClass("error"); phoneInfo.text("X"); phoneInfo.addClass("error"); return false; } }); Phone Number:
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26669807

http://stackoverflow.com/q/26664712
type: Question
has comment: http://stackoverflow.com/comment/41931295
has body: function valid(valid){ if (valid.value !== null &amp;&amp; valid.value !== ""){ valid.id = "success"; }} function validEmail(valid){ var atpos = valid.value.indexOf("@"); var dotpos = valid.value.lastIndexOf("."); if (atpos &gt; 0 &amp;&amp; dotpos &gt; atpos+1 &amp;&amp; dotpos+2 &lt; valid.length){ valid.id = "success"; }} When a user types a email address into a text box, I am using onkeyup to call the function validEmail(). Even when I type in a valid email address the id does not change to "success." (All that id="success" does is turn the input to a green background.) Does anyone know what I am doing wrong? I want the textbox to turn green when a valid email is entered. Also, I call the same function on onsubmit, and it works then. Any help would be greatly appreciated.
has answer: http://stackoverflow.com/a/26665084
score: -2
has comment: http://stackoverflow.com/comment/41931299
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26664960
answer count: 2
has answer: http://stackoverflow.com/a/26664960
upvote count: 0
has title: My input type="text" is not validating my email address correctly
tagged with: validation
linked to: http://stackoverflow.com/q/4964691
favorite count: 0
has comment: http://stackoverflow.com/comment/41931202
accepted answer: http://stackoverflow.com/a/26665084
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41931624
tagged with: forms

http://stackoverflow.com/q/26517974
has comment: http://stackoverflow.com/comment/41665829
type: Question
score: 9
has body: There are many same questions here. I tried all solutions - nothing helps. I want to open new page in some tab with javascript. Here is my HTML: Untitled Document ... ... Here is my functions.js: function testUrl() { window.location = "content.html"; } function loginClient() ...//more functions I tried other ways too: window.location.replace("content.html") top.location="content.html" window.location.assign("content.html") window.open("content.html", "_self") window.location.href="content.html" window.event.returnValue = false; window.location = "content.html"; setTimeout(function(){window.location.assign("content.html");return false;},500) nothing works, I tried it in Opera, Firefox (all in Windows) and Chrome (Debian). BUT it works if I set: window.open("content.html") but in new tab, isn't solution, I need it in same tab. BUT if I try to debug it with Firebug and click always "Step into" than all solution work. And if I set alert() before redirecting, it works too. Console shows no errors. I have no idea, help. RESOLVED: Thanks to @lonesomeday! this is the solution: $(document).ready(function(){ $("#loginClient").click(function(event){ event.preventDefault(); window.location = "content.html"; }); });
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41666364
has answer: http://stackoverflow.com/a/26518061
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26518061
has comment: http://stackoverflow.com/comment/41665787
has title: javascript redirect not working anyway
upvote count: 9

http://stackoverflow.com/comment/41722896
has text: Thanks a lot but still not what i need , has to show zero if month or day is a single number
comment on: http://stackoverflow.com/a/26549889
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26615153
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/26615537
has body: I want to add a button to share a picture. This is my code in tag body: &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/it_IT/sdk.js#xfbml=1&amp;version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));&lt;/script&gt; &lt;div class="fb-share-button" data-href="my_image"&gt;&lt;/div&gt; Don't work. When i run my page.html it show an error: GET file://connect.facebook.net/it_IT/sdk.js net::ERR_FILE_NOT_FOUND However I WANT TO SHARE WITHOUT ID_APP!
has title: Share button on my web application
has comment: http://stackoverflow.com/comment/41842093
has comment: http://stackoverflow.com/comment/41842301
type: Question
answer count: 1
tagged with: javascript

sharepoint
tags question: http://stackoverflow.com/q/26551198
tags question: http://stackoverflow.com/q/26632130
tag name: sharepoint
tags question: http://stackoverflow.com/q/26565852
tags question: http://stackoverflow.com/q/26556042
tags question: http://stackoverflow.com/q/26523764
tags question: http://stackoverflow.com/q/26537885
tags question: http://stackoverflow.com/q/26532367
tags question: http://stackoverflow.com/q/26543640
tags question: http://stackoverflow.com/q/26530597
tags question: http://stackoverflow.com/q/26607974
type: Tag
tags question: http://stackoverflow.com/q/26658902
tags question: http://stackoverflow.com/q/26628402

http://stackoverflow.com/q/26528728
tagged with: angularjs-ng-repeat
tagged with: angularjs
type: UnansweredQuestion
has title: $scope.$watch with a complex variable
has answer: http://stackoverflow.com/a/26529383
tagged with: angularjs-scope
type: Question
answer count: 2
has body: I need to $scope.$watch a variable like this: $scope.data.localization[$scope.locale].properties[0].value $scope.data.localization[$scope.locale].properties is an array of objects where each object has a code and a value, I use these couples to create dynamic forms: &lt;input type="text" ng-repeat="property in $scope.data.localization[$scope.locale].properties" ng-model="property.value" /&gt; Now, some textbox must be visible only if another textbox has a value, so basically I wanted to $scope.$watch one of those values but it doesn't work, the callback of the $watch is never fired: $scope.$watch("data.localization." + $scope.locale +".properties[0].value", function () { //show/hide another texbox if I have a value }); Any idea how to implement that? EDIT: I tried $scope.$watch("data.localization", function () { //show/hide another texbox if I have a value }); and it fires the callback, so it looks like the problem is the dynamic property $scope.locale but I don't know how to avoid that. The problem is that if I watch the whole array, I don't know what value changed.
has answer: http://stackoverflow.com/a/26529390
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41691968
has text: I do not want to reimplement String comparison :). This is just a hypothetical question...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26532550
score: 2

http://stackoverflow.com/a/26610715
type: Answer
answers question: http://stackoverflow.com/q/26609901
has body: @Now uses a java.util.Date, which includes time portions. .getDateOnly() is probably throwing an error because that returns a String. The underlying session.createDateTime() method accepts either text, a java.util.Date or a java.util.Calendar. I think all of them need to include a time element. If you're only storing the value for reference, I'd agree with brso05 to not worry. If you're ever likely to use @Adjust (or an equivalent), then not worrying about the time is a recipe for disaster, because every time you try to adjust, you need to remember to take into account Daylight Savings Time. One option is to set the time to 12:00 midday. That means DST will not be a problem. java.sql.Date is specifically designed to only include the Date portion, without a time element. Jesse Gallagher talks about java.sql.Date in the context of his frostillic.us framework https://frostillic.us/f.nsf/posts/32A63DD640D868D885257D18006659A9 and he was the one I found out about java.sql.Date from. I'm not sure how he stores those values though. I'm not sure if the OpenNTF Domino API will allow you to just pass a java.sql.Date to a field and so store just the date portion.
has comment: http://stackoverflow.com/comment/41834864
score: 0

http://stackoverflow.com/comment/41865896
type: Comment
type: QuestionComment
has text: thanks Algorythm for the reply. The above program I wrote can delete a column when there is not rowspan or colspan in the table. The approach remains the same. Just search the top row where the inner html has tag. If found, it will delete that whole column. The column can be any.
comment on: http://stackoverflow.com/q/26617975
score: 0

http://stackoverflow.com/q/26639967
type: Question
tagged with: javascript
tagged with: prototype
has comment: http://stackoverflow.com/comment/41887086
tagged with: this
answer count: 1
downvote count: 0
favorite count: 0
has title: Is there a way to get this/context out from method?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26640885
accepted answer: http://stackoverflow.com/a/26640885
score: 1
has comment: http://stackoverflow.com/comment/41926791
upvote count: 1
has body: I have done this function in JavaScript: var syncCall = function( cb, obj, fn ) { var params = []; for( var i=3; i&lt; arguments.length; i++ ) { params.push( arguments[i] ); } fn.apply( obj, params ) .onReject( function( result ){ console.error( result ); } ) .onFulfill( function( result ){ if( cb != undefined &amp;&amp; cb != null ) { cb( result ); } }); }; The problem is, that I have to passs obj param into syncCall function, to set proper context ofthisinsidefn` when it is called. In my case, fn is always a method/function, that is stored in one of obj properties. So normally when executing for example obj.myFunctionname(), the this operator inside myFunctionname refers to obj. I am wondering, if I can take an adventage of that fact. Meaning, when having fn as a parameter to syncCall, take somehow the context ( which is obj ) and pass it properly to apply() function as first parameter (thus, resign from having obj as second input parameter in syncCall() )

http://stackoverflow.com/q/26567859
has comment: http://stackoverflow.com/comment/41754865
score: 0
has comment: http://stackoverflow.com/comment/41754682
accepted answer: http://stackoverflow.com/a/26568119
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41754929
has comment: http://stackoverflow.com/comment/41755110
has comment: http://stackoverflow.com/comment/41754941
has body: I've got a site that has a custom select menu which uses jQuery to pass the selected value into the field. PHP then gets the value of the hidden input field and, should, insert the value into a database. However, this isn't happening and I'm not sure why. Can anyone explain why this is happening? FORM Center: <?php $query = "SELECT * FROM $centers"; $result = mysqli_query($connect, $query); while($row = mysqli_fetch_assoc($result)){ $center_name = "{$row['center']}"; echo " " .$center_name ." "; } ?> FORM PROCESSING ob_start(); if($_SERVER["REQUEST_METHOD"] == "POST"){ $center = $_POST["center"]; $query = "INSERT INTO `$scenarios`(`id`) VALUES('" .$center ."')"; mysqli_query($connect, $query); } ob_clean(); echo json_encode(array("success" => 1)); JQUERY SELECT MENU function select_menu(){ var select = $(".select"); var option_menu = $(".option-menu"); var option = $(".option"); select.on("click", function(){ $(this).find(option_menu).toggle(); select = $(this); $(this).find(option_menu).each(function(){ $(".current").hide(); if($(this).hasClass("current")){ $(this).removeClass("current"); } else{ $(this).show().addClass("current"); } }) }) option.on("click", function(){ select.children("p").remove(); var value = $(this).text(); select.prepend(" " +value +" "); console.log(value); }) $(document).on("click", function(ev){ if($(ev.target).closest(".select").length === 0){ $(".current").hide().removeClass("current"); } }) } select_menu(); JQUERY EVENT HANDLER $("input[id='save']").on("click", function(){ $.post("..php/processing.php", {}, function(response){ if(response.success == "1"){ console.log("Data entered."); } else{ console.log("Data not entered."); } }, "json"); })
has comment: http://stackoverflow.com/comment/41754808
has title: PHP not entering value of hidden input field into database
tagged with: php
has comment: http://stackoverflow.com/comment/41754780
has comment: http://stackoverflow.com/comment/41754838
has comment: http://stackoverflow.com/comment/41754822
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/41754987
has comment: http://stackoverflow.com/comment/41755333
has comment: http://stackoverflow.com/comment/41754879
has comment: http://stackoverflow.com/comment/41755255
has comment: http://stackoverflow.com/comment/41754766
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26568119
has comment: http://stackoverflow.com/comment/41754728

http://stackoverflow.com/q/26620513
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26677536
has comment: http://stackoverflow.com/comment/41955532
upvote count: 1
has title: How to create a row isolated heatmap with Highcharts
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26677536
type: Question
tagged with: highcharts
downvote count: 0
answer count: 1
tagged with: javascript
has body: I have a page that has a highcharts.com heat map on. That works well enough, but what I would like to is make each row independent an independent heat map, on the bottom row, that would be a heat map with a low value of 59 and high value of 621 spanning from yellow to red. Like wise, the second row would have a low value value 1 as yellow and 27 for the red value. In effect, it would be visually normalized through this sequences. Does that make sense?
favorite count: 0

http://stackoverflow.com/q/26641539
upvote count: 2
answer count: 2
has body: I use jquery animate for incremente random number 0001 to 1000 but if number is 0077 the final number is 77 what is the solution for have format like 0077 plz ? Thanks you var $date = $("#date"); $({someValue: 0000}).animate({someValue: 0077}, { duration: 1000, easing:'swing', step: function() { $date.text(Math.round(this.someValue)); } });
linked to: http://stackoverflow.com/q/1267283
accepted answer: http://stackoverflow.com/a/26641624
tagged with: javascript
duplicate of: http://stackoverflow.com/q/1267283
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41889994
favorite count: 0
has title: Increment number with jQuery
type: Question
has answer: http://stackoverflow.com/a/26641624
possible better answer: http://stackoverflow.com/a/26641668
has comment: http://stackoverflow.com/comment/41890413
has answer: http://stackoverflow.com/a/26641668

http://stackoverflow.com/comment/41941056
has text: That's what I am currently using, it also appears that using two video's makes the browser quite a bit slower.. this would've to be done for 15 video's, do you see anyway to get my idea with images working? I've tried coding it exactly the same as the example seen above edit: ah I didn't see your new post thank you
type: Comment
comment on: http://stackoverflow.com/q/26670048
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41913375
comment on: http://stackoverflow.com/q/26655282
type: Comment
type: QuestionComment
score: 1
has text: Use firebug to debug your code, so you will know what values you are getting for your fields

http://stackoverflow.com/q/26653537
has comment: http://stackoverflow.com/comment/41912297
has title: Group same values from data d3.js
score: 0
tagged with: javascript
type: UnansweredQuestion
has body: I have some data that I want to put into a select menu. Problem is, there are multiple instances of the same values in the data. For example there are multiple instances of "FirstName": "John". How do I group all of the same values into the select menu rather than having a select menu that has every value from the data?
has comment: http://stackoverflow.com/comment/41910776
answer count: 0
tagged with: d3.js
type: Question

http://stackoverflow.com/comment/41881681
has text: I had not seen this library, could I dynamically load my json from an external file with this language? I note there is a dynamic example but it does not look dynamic?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26636902

http://stackoverflow.com/q/26644222
type: Question
upvote count: 2
has body: I have a simple question. How do you bind a view after form submit in AngularJS? My controller has this function to test if the submission works: var spinnrApp = angular.module('spinnrApp', ['ngAnimate', 'ui.router', 'slick']); spinnrApp.config(function ($stateProvider, $urlRouterProvider) { // // Now set up the states $stateProvider .state('registration', { url: "/registration", templateUrl: "app/components/registration/registration.php", controller: "FormController" }) .state('registration.spinnrapp', { // nested state for the registration form url: "/spinnrapp", // url will be nested /registration/artist templateUrl: "app/components/registration/partials/registration-profile.php" }) .state('registration.artist', { // nested state for the registration form url: "/artist", // url will be nested /registration/artist templateUrl: "app/components/registration/partials/registration-artist.php" }) .state('registration.share', { // each nested state will have their own view url: "/share", // url will be nested /registration/share templateUrl: "app/components/registration/partials/registration-share.php" }); // // For any unmatched url, redirect to / $urlRouterProvider.otherwise("/registration/spinnrapp"); }); spinnrApp.controller('FormController', ['$scope', '$http', function (scope, http){ // get list of cities and store it to select http.get('cities.json').success(function(data){ scope.cities = data; }) // we will store all our form data in this object scope.formData = {}; // function to process the form scope.processForm = function() { $state.go('registration.share'); }; }]); How do you change alert("awesome!"); to a ui-view after ng-submit passes through? I have a ui-view called registration-share.php. UPDATE: I am calling the processForm in the submit button like this: Next Section where my formApp wrapper goes like this:
has title: How Do You Bind A View After Form Submit In AngularJS ng-submit?
has comment: http://stackoverflow.com/comment/41894716
accepted answer: http://stackoverflow.com/a/26644453
tagged with: forms
answer count: 1
has comment: http://stackoverflow.com/comment/41894956
tagged with: javascript
has comment: http://stackoverflow.com/comment/41895723
has comment: http://stackoverflow.com/comment/41895642
has comment: http://stackoverflow.com/comment/41910719
has answer: http://stackoverflow.com/a/26644453
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/26643970
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26643584
has body: With asynchronous programming, you can only use the response inside the callback or in a function you call from there and pass the data to. You can't stuff it into a global variable to try to work around the fact that the response is asynchronous. You also can't return a value form an asynchronous callback and expect that value to be returned from the host function. The host function has already finished executing and the callback is called some time later. Here's one way that would work: var ref = new Firebase('https://helloworldtest.firebaseIO.com/'); ref.on('value', function (snapshot) { var Variable = snapshot.child("text").val(); alert(Variable); }); To read a lot more about your options for handling an async response, you can read this answer which is about an ajax call, but the concept is the same: How do I return the response from an asynchronous call?.
accepted answer of: http://stackoverflow.com/q/26643584
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26660421
score: 0
accepted answer of: http://stackoverflow.com/q/26659993
answers question: http://stackoverflow.com/q/26659993
has body: Is this a math question? If so, you just have to apply: vel*2.64-132 . No need to transform to degrees because it's already in degrees (if you range -132&lt;> 132 was originally in degrees). Just remeber to specify it's degrees with deg. If you want more information about rotation units you can look at the specs here.
type: Answer
has comment: http://stackoverflow.com/comment/41923081
type: AcceptedAnswer

http://stackoverflow.com/comment/41783438
type: Comment
comment on: http://stackoverflow.com/a/26563483
has text: That is not working either. Maybe it's because I'm using AngularJS on these elements ? (I'm very new to AngularJS)
type: AnswerComment
score: 0

http://stackoverflow.com/q/26672264
has answer: http://stackoverflow.com/a/26672378
answer count: 3
accepted answer: http://stackoverflow.com/a/26672486
downvote count: 0
has comment: http://stackoverflow.com/comment/41945458
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I know there are a lot of similar questions but I still could not find one about my exact problem. I haven't got the selector of my &lt;select&gt;; I am iterating form fields and so i only got access to my select by using $(this). how can I iterate this select's options by using jQuery's '.each' function? i tried to chain it, but this doesn't work: $(this).$('option').each(function(){ if (this.value == val) { // do something } }); note: $(this) is my select not my form.
type: AnsweredQuestion
has title: jQuery: using ".each" for a select's options by $(this)
possible better answer: http://stackoverflow.com/a/26672286
has answer: http://stackoverflow.com/a/26672286
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26672486

http://stackoverflow.com/comment/41739891
comment on: http://stackoverflow.com/q/26559542
type: Comment
type: QuestionComment
has text: You may also check this http://stackoverflow.com/questions/23630140/fit-responsive-square-in-viewport-according-to-width-and-height/23631436#23631436 it is for a square though
score: 0

http://stackoverflow.com/a/26665876
answers question: http://stackoverflow.com/q/26665362
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41960397
has comment: http://stackoverflow.com/comment/41963880
upvote count: 1
has comment: http://stackoverflow.com/comment/41950946
accepted answer of: http://stackoverflow.com/q/26665362
type: AcceptedAnswer
downvote count: 0
has body: Here is a very basic way of doing it jquery: $(":input").change(function(){ $(this).parents("div").addClass("hideMe"); $(this).parents("div").next("div").removeClass("hideMe"); }); to make this work i made a new class called "hideMe" which all but the 1st question have to start with, but as it is selected/answered the function above then adds that class to the current select/inputs parent div and removes said class from the next div containing a question here is a JSFIDDLE showing how it works hope this helps and gets you on track

http://stackoverflow.com/comment/41926929
has text: What I am actually trying to do is submit the form using ajax. I just want to test the button action. Is your code above going to work along doing that? Isn't the e.preventdefault() stopping the default action of the button click and not the default action of the form submit?
comment on: http://stackoverflow.com/a/26661792
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26583274
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26583372
has body: I am using the following ajax code to get the result form another one php, now I need to append the result to the appropriate div(preview) id $("#imageform").ajaxForm({ target: '#preview' }).submit();
has title: How to append the ajax result to the target div id?
linked to: http://stackoverflow.com/q/14220321
score: 0
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26583372
has comment: http://stackoverflow.com/comment/41782801
tagged with: jquery-forms-plugin
answer count: 2
possible better answer: http://stackoverflow.com/a/26583426
has answer: http://stackoverflow.com/a/26583426

http://stackoverflow.com/comment/41889898
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26640697
has text: Thanks. The other problem I am also have is that the pictures arent centering in the thumbnail.
type: Comment

http://stackoverflow.com/a/26551213
accepted answer of: http://stackoverflow.com/q/26550996
upvote count: 29
has body: Quoting from the ECMA Script 5.1 Specification for References, For example, the left-hand operand of an assignment is expected to produce a reference. The behaviour of assignment could, instead, be explained entirely in terms of a case analysis on the syntactic form of the left-hand operand of an assignment operator, but for one difficulty: function calls are permitted to return references. This possibility is admitted purely for the sake of host objects. No built-in ECMAScript function defined by this specification returns a reference and there is no provision for a user-defined function to return a reference. (Another reason not to use a syntactic case analysis is that it would be lengthy and awkward, affecting many parts of the specification.) Is there any context where a function could return something that can be assigned to? So, no. No user-defined function could return a reference to which we can assign a value. Why doesn't this cause a syntax error, rather than different errors depending on whether the function is defined or not? As mentioned in the specification, the syntactic analysis would be lengthy, awkward and affecting many parts of the specification. So, the syntax check is not done.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26550996
type: Answer
score: 29
has comment: http://stackoverflow.com/comment/41724614

http://stackoverflow.com/comment/41870990
has text: @NORDLYCHT you should wrap the iframe with a div and apply `class="embed-responsive embed-responsive-16by9"`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26624265

http://stackoverflow.com/comment/41915008
type: Comment
comment on: http://stackoverflow.com/a/26656132
score: 1
has text: I don't think removing `document.ready()` is recommended. You *need* the function to run only when the DOM is ready. Just move the `showonlyone` function declaration outside of `document.ready()` or use the `window` solution in my answer.
type: AnswerComment

http://stackoverflow.com/comment/41909731
type: AnswerComment
comment on: http://stackoverflow.com/a/26595617
type: Comment
has text: The ClientIDMode property appears to be only a property of ASP.NET controls, not HTML controls. So that solution does not work. Furthermore, I inspected the page at runtime to get the generated IDs, used the existing javascript with the runtime IDs, and it still did not work. Perhaps you could provide an example of the jQuery solution as I am unfamiliar with it.
score: 0

http://stackoverflow.com/a/26560813
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26560603
answers question: http://stackoverflow.com/q/26560603
has comment: http://stackoverflow.com/comment/41742233
type: AcceptedAnswer
has body: You can't do this without form, you just do like this: Next $('#link').click(function(){ var val = $(this).attr('class'); $("#class").val(val); document.getElementById("formName").submit(); });
score: 4
type: Answer
upvote count: 4

http://stackoverflow.com/q/26638782
has answer: http://stackoverflow.com/a/26718573
favorite count: 0
tagged with: angularjs
score: 9
type: UnansweredQuestion
has body: My AngularJS application is composed by two urls: http://myapp/#/foo http://myapp/#/bar This is the simplified index.html file: In addition to containing the application logic, the script.js file also contains the html templates that are loaded via $templateCache service. With the http://myapp/#/foo url, the foo html template is inserted in the element. In the same way, with the http://myapp/#/bar url, the bar html template is inserted in . What I want to do is to use the grunt-uncss task to reduce the style.css size. My first attempt was: uncss: { dist: { files: { 'style.css': [ 'index.html' ] } } The style.css file was reduced, but it did not included the styles required by the foo and bar pages. My second attempt was using the deprecated urls parameter to be loaded with PhantomJS: uncss: { options: { urls; [ 'http://myapp/#/foo', 'http://myapp/#/bar' ] }, dist: { files: { 'style.css': [ 'index.html' ] } } Again, the style.css file was reduced, but it did not included the styles required by the foo and bar pages. Someone knows how to solve this problem? Does grunt-uncss only work with static content? Thanks in advance, Bernardo Pacheco
type: Question
has comment: http://stackoverflow.com/comment/41884734
upvote count: 9
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/41884910
has comment: http://stackoverflow.com/comment/41885431
has comment: http://stackoverflow.com/comment/41884807
answer count: 2
has title: How can I use grunt-uncss with an AngularJS application?
downvote count: 0
has answer: http://stackoverflow.com/a/29896042
has comment: http://stackoverflow.com/comment/41884839

http://stackoverflow.com/comment/41727934
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26548807
has text: @dfsq Thank you very much. You have just saved my day.

http://stackoverflow.com/q/26644903
type: AnsweredQuestion
tagged with: java
type: Question
score: 0
has body: I have built an embedded web server by extending NanoHTTPD (1.25). It is used for Firefox browser to show its content within the same machine. (SuSE 11) Since the Firefox needs to show changing content within a very short duration (0.2 sec refreshment), it keeps polling the JSON URLs very quickly. setInterval(function() { $.getJSON("content.json", function(d) { ... $('#content_div').html(d); }) .error(function() { $('#content_div').html(""); }); }, 200); As a result, it creates a lot of unused connections and sometimes cannot get any response from my web server. netstat -ap |grep "localhost:80" |wc -l (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) 2212 Why are there so many TIME_WAIT connections? How can I make my web server healthy and ensure response from my web server?
tagged with: firefox
answer count: 1
accepted answer: http://stackoverflow.com/a/26645007
tagged with: javascript
tagged with: jquery
tagged with: nanohttpd
has answer: http://stackoverflow.com/a/26645007
has title: Reduce unused firefox connection

http://stackoverflow.com/a/39965739
score: 0
answers question: http://stackoverflow.com/q/26645862
type: Answer
has body: Use console.trace(). You can use it with or without an argument and it will supply you with a complete stack trace in your browser console. You can use it with arguments too. console.trace( this ); You can also add a breakpoint in your code and see the call stack when it is called, and even see the arguments and variable values. I hope this answers your question.

http://stackoverflow.com/a/26545161
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26545058
score: 7
has body: Your javacript is fine. The span element is the inline level generic container. It also helps to inform the structure of document, but it is used to group or wrap other inline elements and/or text, rather than block level elements. So h2 is not valid child for span: html standard function unhighlight(x) { x.style.backgroundColor = "transparent" } function highlight(x) { x.style.backgroundColor = "red" } span { display: block; } What's New I suggest for containers to use block elements like div. And also i suggest to use css for this: div:hover { background: red; } What's New
upvote count: 7
has comment: http://stackoverflow.com/comment/41713810

http://stackoverflow.com/q/26532054
tagged with: javascript
has comment: http://stackoverflow.com/comment/41693200
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26534548
has comment: http://stackoverflow.com/comment/41694931
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41693222
has comment: http://stackoverflow.com/comment/41694911
tagged with: local-storage
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41693395
has body: I managed to save the text that is in the input field but the problem is that i do not know how to save the button. The buttons turn white when i click on them and the price of that seat will be visible in the input field. The price saves but the button does not stay white. &lt;script&gt; function changeBlue(element) { var backgroundColor = element.style.background; if (backgroundColor == "white") { element.style.background = "blue"; add(-7.5) } else { element.style.background = "white"; add(7.5) } } function add(val) { var counter = document.getElementById('testInput').value; var b = parseFloat(counter,10) + val; if (b &lt; 0) { b = 0; } document.getElementById('testInput').value = b; return b; } function save(){ var fieldValue = document.getElementById("testInput").value; localStorage.setItem("text", fieldValue) var buttonStorage = document.getElementsByClass("blauw").value; localStorage.setItem("button", buttonStorage) } function load(){ var storedValue = localStorage.getItem("text"); if(storedValue){ document.getElementById("testInput").value = storedValue; } var storedButton = localStorage.getItem("button"); if(storedButton){ document.getElementsByClass("blauw").value = storedButton; } } &lt;/script&gt; &lt;body onload="load()"&gt; &lt;input type="text" id="testInput"/&gt; &lt;input type="button" id="testButton" value="Save" onclick="save()"/&gt; &lt;input class="blauw" type="button" id="testButton2" value="click me to turn white" style="background-color:blue" onclick="changeBlue(this)"&gt; &lt;input class="blauw" type="button" id="testButton2" value="click me to turn white"style="background-color:blue" onclick="changeBlue(this)"&gt; &lt;/body&gt; i made a small sample of what i want to do. And i do not want to use the Id's of the buttons because i have like 500 of them in a table.
type: Question
has comment: http://stackoverflow.com/comment/41691399
has title: localstorage how to save a button

http://stackoverflow.com/a/26661513
score: 1
has body: This is no weird, as PSL said, ng-include creates new scope. If you want to create the behaviour that keeps those models attached, You should change &lt;input type="text" ng-model="myModel"&gt; To: &lt;input type="text" ng-model="$parent.myModel"&gt;
has comment: http://stackoverflow.com/comment/41927352
upvote count: 1
has comment: http://stackoverflow.com/comment/41925728
has comment: http://stackoverflow.com/comment/41925639
accepted answer of: http://stackoverflow.com/q/26661407
has comment: http://stackoverflow.com/comment/41925572
answers question: http://stackoverflow.com/q/26661407
has comment: http://stackoverflow.com/comment/41925510
has comment: http://stackoverflow.com/comment/41925891
has comment: http://stackoverflow.com/comment/41925449
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41925473
has comment: http://stackoverflow.com/comment/41927402
type: Answer
has comment: http://stackoverflow.com/comment/41925324
has comment: http://stackoverflow.com/comment/41925852
has comment: http://stackoverflow.com/comment/41925525

http://stackoverflow.com/comment/41766761
has text: Ok. I got it working. "Animation:'fade' doesn't seem to work. Instead, I put: $(function(){ $('#slides').superslides({ hashchange: false, play: 2000 }); });
type: AnswerComment
comment on: http://stackoverflow.com/a/26565720
type: Comment
score: 0

http://stackoverflow.com/a/26603750
has body: You try to use jQuery BlockUI Plugin Probably easier. jQuery BlockUI Plugi When you want to Block you can use $.blockUI(); When you want to UnBlock you can use $.unblockUI();
score: 0
answers question: http://stackoverflow.com/q/26603550
type: Answer

http://stackoverflow.com/comment/41687195
comment on: http://stackoverflow.com/a/26521451
type: AnswerComment
has text: :) Yes, "very highly" appreciated! I learnt something new too! Also, looking at the spec, Macintosh identifier is 7, so I guess node's zlib is slightly out of compliance (slightly cause Macs are ultimately descendant's of Unix!) :)
score: 0
type: Comment

http://stackoverflow.com/a/26572156
answers question: http://stackoverflow.com/q/26571277
downvote count: 0
score: 3
has body: The method triggerEvent() hides in the prototype of the Workflow object. _.extend() only copies object's own properties without properties from the prototype. Your example will work with: initialize: function () { _.extend(this, (new Backbone.Workflow(this, { attrName: 'status' })).__proto__, new Backbone.Workflow(this, { attrName: 'status' })); } As you can see, I explicitly added a prototype to the extend chain. Know that it's a very inelegant solution. Though I didn't find a better one yet, I hope it will explain your problem. This also works: var Workflow = new Backbone.Workflow(this, { attrName: 'status' }); _.extend(this, Workflow); $.extend(this, Workflow); Here Underscore copies Workflows own properties (model) and jQuery deep-copies the properties from the prototype.
upvote count: 3
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26571277

http://stackoverflow.com/comment/41861342
score: 0
type: AnswerComment
has text: hm... your fiddle does not work in FF and also the OP asked for `" to an element so that it's vertically centered?"`
type: Comment
comment on: http://stackoverflow.com/a/26625567

http://stackoverflow.com/q/26667562
accepted answer: http://stackoverflow.com/a/26670753
answer count: 2
favorite count: 0
score: 8
possible better answer: http://stackoverflow.com/a/66578515
tagged with: animation
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/66578515
downvote count: 1
type: Question
has body: How is an HTML element animated as soon as it appears on screen? I found an example on the stack overflow tour page, where info elements slide into the page as soon as you scroll down far enough. What is the trick behind that?
has title: How to start animations when element appears on screen?
upvote count: 9
tagged with: javascript
has answer: http://stackoverflow.com/a/26670753
tagged with: jquery

http://stackoverflow.com/a/26626066
has comment: http://stackoverflow.com/comment/41914671
has body: I see that your are setting the td style to 'red' or 'blue' but i don't see the declaration of those styles. You have syntax error as well - on the shift key implementation e.targetsetAttribute instead of e.target.setAttribute Update the to as DFord said. Remove the including of the draw.js file function createCanvas() { var side = 100; var tbody = document.getElementById("tablebody"); for (var i = 0; i < side; ++i) { var row = document.createElement("tr"); for (var j = 0; j < side; ++j) { var cell = document.createElement("td"); row.appendChild(cell); } tbody.appendChild(row); } document.getElementById("canvas").addEventListener( "mousemove", processMouseMove, false); } function processMouseMove(e) { if (e.target.tagName.toLowerCase() == "td") { if (e.ctrlKey) { e.target.setAttribute("class", "blue"); } if (e.shiftKey) { e.target.setAttribute("class", "red"); } } } window.addEventListener("load", createCanvas, false); function erase() { var tb = document.getElementsByTagName('table'); var tbc = tb[0].getElementsByTagName('td'); for (k = 0; k < tbc.length; k++) { tbc[k].style.backgroundColor = 'pink' } } table { width: 400px; border-collapse: collapse; } td { width: 4px; height: 4px; } .blue { background-color: blue; } .red { background-color: red; } Erase Drawing Window Hold Ctrl (or Control) to draw blue. Hold Shift to draw red. this should work now
answers question: http://stackoverflow.com/q/26624018
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26624018
type: Answer

http://stackoverflow.com/comment/41739557
comment on: http://stackoverflow.com/q/26559452
has text: Please explain what exactly you want to do
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41792302
type: AnswerComment
has text: yes give me a minute the code was more of a guidance than a solution :)
comment on: http://stackoverflow.com/a/26588477
score: 0
type: Comment

http://stackoverflow.com/q/26535990
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41698600
score: -8
tagged with: http://stackoverflow.com/tag/html
has title: Smooth scroll doesn't work
tagged with: css
has body: Okay, I've been using a nice template from Bechance.com http://baribal.be/showpage/ When I press on the "Discover more" or "Arrow down" buttons - it scrolls down nicely Yet when I download the template - those buttons are inactive. Their HREF tags contain a "goto" name in class, which if removed allows the anchoring to work - but without the smooth scroll. Discover more I've basically tried everything - using other scripts (like smooth scroll), copying the code from the web - nothing seems to work. Any help would be GREATLY appreciated.
has comment: http://stackoverflow.com/comment/41698255
has answer: http://stackoverflow.com/a/58847635
upvote count: 1
type: Question
downvote count: 9
has answer: http://stackoverflow.com/a/26536442
tagged with: javascript
answer count: 2
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41698319

http://stackoverflow.com/a/26620489
has comment: http://stackoverflow.com/comment/41888190
score: 0
has comment: http://stackoverflow.com/comment/41853724
accepted answer of: http://stackoverflow.com/q/26599673
answers question: http://stackoverflow.com/q/26599673
has body: Well, handling events for ChartWrappers are a bit different. You need to apply the event to the chart of the wrapper, not the wrapper itself. You can do this with wrapper.getChart() . Also, just in case its better to start listening for those events after dashboard is ready. Here is working code: var dashboard = new google.visualization.Dashboard(document.getElementById('dashboard_div')); dashboard.bind(writerFilter, rBubbleChart); google.visualization.events.addListener(dashboard, 'ready', function(){ google.visualization.events.addListener(rBubbleChart.getChart(), 'onmouseover', handler1); google.visualization.events.addListener(rBubbleChart.getChart(), 'onmouseout', handler2); }); dashboard.draw(data); And working fiddle: http://jsfiddle.net/mm3981xq/1/
has comment: http://stackoverflow.com/comment/41879345
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41879942

http://stackoverflow.com/q/26521088
has comment: http://stackoverflow.com/comment/41671803
answer count: 1
has body: I have an angularjs project, where I have a splash screen (home.html), a gallery page and an about page. I am trying to set an image to display on the splash page only. I have set up a pageClass in the controllers, but cant seem to set a separate css style to it by typing: .home.body { ... } but that doesn't work. I have tried absolutely every solution I could find on here and other tutorial pages, but I can't seem to get it working. I also am new to angularjs so I more than likely have done something wrong! Can anyone help me on adding a background image to just one page? Not sure what code you want to see.
tagged with: angularjs
type: UnansweredQuestion
has title: separate background image for one page angularjs
tagged with: css
has comment: http://stackoverflow.com/comment/41672254
type: Question
has answer: http://stackoverflow.com/a/26521447
has comment: http://stackoverflow.com/comment/41705438
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41686986
score: 0
comment on: http://stackoverflow.com/a/26529577
has text: Well, as I said, you cannot select multiple radio buttons from the same group. The only solution is to give each of them different names, such as fmscr_1, fmscr_2 and so on.
type: AnswerComment
type: Comment

cocoonjs
tags question: http://stackoverflow.com/q/26566610
type: Tag
tag name: cocoonjs

http://stackoverflow.com/comment/41668682
type: Comment
has text: @kennypu - He just says "somewhere else in code" and it's posted into his question. It's an anti-pattern no matter where it is so I think it is worth pointing that out in a comment for the benefit of the community. It's not like I said that was a solution to the problem.
type: QuestionComment
comment on: http://stackoverflow.com/q/26519006
score: 0

http://stackoverflow.com/a/26514394
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: The contains can be achieved with Array.prototype.indexOf, like this if (customerIds.indexOf(customerId) === -1) { indexOf function returns -1, if it couldn't find the parameter in the array, otherwise the first index of the match. So, if the result is -1, it means that customerIds doesn't contain customerId. The remove can be achieved with Array.prototype.indexOf and Array.prototype.splice, like this var index = customerIds.indexOf(customerId); if (index !== -1) { customerIds.splice(index, 1); } Similarly, indexOf function returns -1, if it couldn't find the parameter in the array, otherwise the first index of the match. So, if the result is -1, we skip deleteing, otherwise splice 1 element starting from the position index.
answers question: http://stackoverflow.com/q/26514331

http://stackoverflow.com/a/26525147
has comment: http://stackoverflow.com/comment/41678098
type: Answer
has body: Within the definition of serviceConstructor add following line, after definition of _getColor serviceConstructor.prototype._getColor = _getColor ;
answers question: http://stackoverflow.com/q/26525029
has comment: http://stackoverflow.com/comment/41678069
score: 0

http://stackoverflow.com/comment/41802839
has text: Unfortunately, if you are not able of manipulating the code of the target page, you won't be able to use this method either. I thought that will be the case considering the target page is a google page and that's why I wrote this as a comment instead of as an answer.
score: 0
comment on: http://stackoverflow.com/q/26576584
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41785367
has text: I updated it to: require_once dirname(__FILE__) . '\utilsController.php'; but nothing has changed. strtotime is a basic php function. Isn't it impossible to redeclare it anyway ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26584525
type: Comment

http://stackoverflow.com/comment/41937350
type: Comment
comment on: http://stackoverflow.com/q/26668036
score: 0
type: QuestionComment
has text: i can probably give a link to the website https://smartican.com/popular/. Then scroll down and click on the NGO button. Then press on city, enter "delhi" chose "New Delhi" from below and press enter

http://stackoverflow.com/comment/41848944
comment on: http://stackoverflow.com/q/26618997
type: Comment
type: QuestionComment
has text: Please provide code where you try to send the object
score: 1

http://stackoverflow.com/comment/41884520
type: AnswerComment
comment on: http://stackoverflow.com/a/26621827
score: 0
type: Comment
has text: Great call moving to the view. Helped me track down the root cause and learn.

http://stackoverflow.com/q/26586388
type: Question
tagged with: javascript
has body: I am trying to build a simple node.js based streaming API. All I want to do is as I hit the server url, the output should stream a set of test data(JSON) like twitter streaming API. var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); server.listen(8083); app.get('/', function (req, res) { res.write(io.on('connection', function (socket) { socket.emit('item', { hello: 'world' }); })); }); So, If i do curl http://localhost:8083/, I want output something like: $ curl http://localhost:8083/ {hello: 'world'} {hello: 'world'} {hello: 'world'} {hello: 'world'} ... I am new to node.js and web sockets. I might be horribly wrong on the basics of how node works, let me know the best solution.
upvote count: 2
answer count: 1
favorite count: 0
tagged with: streaming
has answer: http://stackoverflow.com/a/26595689
accepted answer: http://stackoverflow.com/a/26595689
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has title: Building simple nodejs API with streaming JSON output
has comment: http://stackoverflow.com/comment/41788014
tagged with: socket.io

http://stackoverflow.com/a/26670753
has comment: http://stackoverflow.com/comment/137531317
answers question: http://stackoverflow.com/q/26667562
score: 9
has body: You need to use JavaScript to detect the location of the viewport and activate it when it becomes visible. You can use JavaScript to detect and execute the transition and then CSS or JavaScript to do the animations. There are many jquery based scripts available to accomplish this. Here is one example: DEMO 1. Create a Html element you want to check if it's in the viewport. 2. Load the jQuery javascript library and jQuery Viewport Checker plugin at the end of your document. 3. Call the plugin on this element and do something in the javascript. DOWNLOAD THIS SCRIPT
upvote count: 9
accepted answer of: http://stackoverflow.com/q/26667562
downvote count: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/26514482
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26514433
answers question: http://stackoverflow.com/q/26514433
downvote count: 0
score: 4
has body: You can use closest() to get to specific parent element of a child element : alert($('.mammals').closest(".animals").attr('food')); alert($('.monkeys').closest(".animals").attr('food') See closest() in Jquery DOCS here
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41841435
type: AnswerComment
has text: Should you cache the array.length value as well in case this is a huge array?
type: Comment
comment on: http://stackoverflow.com/a/26614976
score: 0

http://stackoverflow.com/a/26661399
has comment: http://stackoverflow.com/comment/41925490
has comment: http://stackoverflow.com/comment/41925401
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41925242
accepted answer of: http://stackoverflow.com/q/26661082
has body: As Apul Gupta pointed out, you should be adding and removing classes. So, set up a couple classes: CSS: .FirstClass { top: 155px; margin-left -615px; left:50%; } .SecondClass { top:141px; margin-left:0; left:0; } Next, change your logic to this: if (!$('#comBrand').hasClass('FirstClass') &amp;&amp; (window.screen.width &gt; window.screen.availWidth)){ $('#comBrand').removeClass("FirstClass"); $("#comBrand").addClass("SecondClass"); } } else { $("#comBrand").removeClass("SecondClass"); $("comBrand").addClass("FirstClass"); } Your first nested if statement doesn't do anything...You were checking to see if the CSS was X - and if so, you were setting the CSS to X. So, I removed that code. I must admit your if/else logic is unoptimized(a bit redundant) and confusing, but this should give you an idea of what you need to do.
answers question: http://stackoverflow.com/q/26661082
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41925557
score: 1
has comment: http://stackoverflow.com/comment/41925172
has comment: http://stackoverflow.com/comment/41925326
has comment: http://stackoverflow.com/comment/41925269

http://stackoverflow.com/comment/41869330
comment on: http://stackoverflow.com/q/26630519
score: 0
type: Comment
type: QuestionComment
has text: Are you maybe running the script before the iframe is done loading? What do you get if you console.log the contentWindow?

http://stackoverflow.com/a/26670921
answers question: http://stackoverflow.com/q/26616300
upvote count: 1
score: 1
downvote count: 0
has body: The problem is with that part: series.data.push({ date: data.data_date, value: data.value }); It shouldn't be data/value but rather x/y: series.data.push({ x: data.data_date, y: data.value });
type: Answer

http://stackoverflow.com/a/26556685
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26555492
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41740116
answers question: http://stackoverflow.com/q/26555492
type: Answer
has body: moveCursorToPosition takes a position that is an object with row and column like editor.selection.moveCursorToPosition({row: row, column: 0}) ; to replace text use editor.session.replace(range, text) like this var range = editor.find('needle',{ wrap: true, caseSensitive: true, wholeWord: true, regExp: false, preventScroll: true // do not change selection }) range.start.column = 0 range.end.column = Number.MAX_VALUE editor.session.replace(range, "x" + editor.session.getLine(range.start.row) + "x") editor.selection.setRange(range) NOTE: in your example mine + 1 is a string, and you would easily see why editor.selection.moveCursorToPosition(rowOfD1SavePos); doesn't work if you looked into that functions source with browser devtools

http://stackoverflow.com/a/26584574
has comment: http://stackoverflow.com/comment/41785102
type: Answer
answers question: http://stackoverflow.com/q/26584555
has comment: http://stackoverflow.com/comment/41785157
accepted answer of: http://stackoverflow.com/q/26584555
has comment: http://stackoverflow.com/comment/41785137
score: 4
upvote count: 4
type: AcceptedAnswer
has body: after() is used to insert content. To move or add elements, use insertAfter(): $('#ID1').insertAfter('#ID2'); Example fiddle
downvote count: 0

http://stackoverflow.com/a/26572780
answers question: http://stackoverflow.com/q/26572460
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41766035
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26572460
type: Answer
has body: You should not use $scope.true property, it's really confusing because then in ng-hide="true" Angular's parser interprets it literally as true value which stays true always (however you can make it work even with this unfortunate name using square bracket notation). Instead call your flag something like hidden and in controller handle it this way: $scope.hidden = false; $scope.hideFields = function() { $scope.hidden = $scope.user.productCat.name == "ISLAMIC"; } Demo: http://plnkr.co/edit/N53NcCLtKP4qC1p9G1BK?p=preview

http://stackoverflow.com/comment/41719288
score: 0
comment on: http://stackoverflow.com/q/26548263
type: QuestionComment
type: Comment
has text: possible duplicate of [Min and max in multidimensional array](http://stackoverflow.com/questions/15042887/min-and-max-in-multidimensional-array)

http://stackoverflow.com/q/26544509
linked to: http://stackoverflow.com/q/11866910
has comment: http://stackoverflow.com/comment/41712755
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41712789
has answer: http://stackoverflow.com/a/26544899
has body: I have big trouble with a multi step form I did by myself using jquery (hide, and display divs) here is how it looks like the trouble I have is for the fields that have the attribute "required". In fact All the form works fine, but the trouble is that it does not display the required until I click to the sublit button. And when we are to the final page and we do submit, it recall that some inputs are missings, here is below the message error in the console of chrome An invalid form control with name='raison_sociale' is not focusable. index.php?p=demande-devis&amp;categorie=professionnel&amp;type=menuiserie:1 An invalid form control with name='nom' is not focusable. index.php?p=demande-devis&amp;categorie=professionnel&amp;type=menuiserie:1 An invalid form control with name='siret' is not focusable. index.php?p=demande-devis&amp;categorie=professionnel&amp;type=menuiserie:1 An invalid form control with name='prenom' is not focusable. index.php?p=demande-devis&amp;categorie=professionnel&amp;type=menuiserie:1 An invalid form control with name='no_tva' is not focusable. I don't know how to check the required attributes without validating the form, but just before changing the step of my form... anykind of help will be much appreciated.
tagged with: forms
type: Question
accepted answer: http://stackoverflow.com/a/26544899
has comment: http://stackoverflow.com/comment/41712736
tagged with: javascript
tagged with: jquery
has title: Trouble with required fields and multi step form
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/41680184
comment on: http://stackoverflow.com/a/26526417
type: Comment
has text: So you need to shuffle the list? Show all elements but in random order yes?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26661613
has body: Just learning angularjs right now with the book 'AngularJS Up and Running' from O'Reilly.. Got to the chapter on unit testing with Karma &amp; Jasmine, but having trouble making it work EDIT: Changing logLevel to config.LOG_DEBUG now matches file patterns correctly. But I still have the ultimate 'adapter' error at the end. running the 'karma start' command gives me the following: DEBUG [plugin]: Loading karma-* from /Work/[lab]/angularjs-up-and-running/chapter3/node_modules DEBUG [plugin]: Loading plugin /Work/[lab]/angularjs-up-and-running/chapter3/node_modules/karma-chrome-launcher. DEBUG [plugin]: Loading plugin /Work/[lab]/angularjs-up-and-running/chapter3/node_modules/karma-jasmine. INFO [karma]: Karma v0.12.16 server started at http://localhost:8080/ INFO [launcher]: Starting browser Chrome DEBUG [temp-dir]: Creating temp dir at /var/folders/dw/qt56vk_s4cz5h6hg8qddvmrm0000gn/T/karma-24748311 DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/dw/qt56vk_s4cz5h6hg8qddvmrm0000gn/T/karma-24748311 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:8080/?id=24748311 WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/node_modules/karma-jasmine/lib/jasmine.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/angular-mocks.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/node_modules/karma-jasmine/lib/adapter.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/angular.min.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/simpleSpec.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-running/chapter3/controller.js" does not match any file. WARN [watcher]: Pattern "/Work/[lab]/angularjs-up-and-runni…
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41959284
has title: warnings and errors with Karma/Chrome
linked to: http://stackoverflow.com/q/24220888
has comment: http://stackoverflow.com/comment/41956111
score: 2
tagged with: karma-runner
has comment: http://stackoverflow.com/comment/41956510
has answer: http://stackoverflow.com/a/27857617
type: Question
has comment: http://stackoverflow.com/comment/41956199
tagged with: javascript
tagged with: karma-jasmine
has comment: http://stackoverflow.com/comment/41941649
has comment: http://stackoverflow.com/comment/41941751

http://stackoverflow.com/q/26586027
tagged with: closures
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26587910
type: Question
answer count: 1
tagged with: node.js
score: 0
has body: I used the closures in this loop. But its only print the right data on the console log, and the sql query did not work. The inserted data on MySQL is the last variable of the loop. I thought this is because of writing speed of MySQL. But don't know how to fix it. Any idea? Thanks module.exports = function (callback) { queryGetForSend = "SELECT * FROM image WHERE send_request is NULL AND post_request is NOT NULL AND year(moderate_time) = year(curdate()) AND month(moderate_time) = month(curdate()) AND (time(moderate_time) &lt; (curtime() - 15));"; conn.query(queryGetForSend, function(err, rows, fields){ for (i in rows) { if (rows[i].post_request == 'approve') { resultSend = 1 } else { resultSend = 2 } var fileID = rows[i].img_md5; queryString = fileID + "=" + resultSend; // Request url: "http://im-api1.webpurify.com/image_queue/results/?key=" var d = new Date(); Date.masks.default = 'YYYY-MM-DD hh:mm:ss'; sendTime = d.format(); (function(queryString, sendTime) { querySent = "UPDATE image SET send_request=1,result_sent='"+queryString+"',send_time='"+sendTime+"' WHERE send_request is NULL AND post_request is NOT NULL AND year(moderate_time) = year(curdate()) AND month(moderate_time) = month(curdate()) AND (time(moderate_time) &lt; (curtime() - 15));"; conn.query(querySent, function (err, rows, fields) { if (err) throw err; console.log("http://google.com?key=" + key + "&amp;" + queryString); }); })(queryString, sendTime); (function(queryString){ request.get("http://google.com" + key + "&amp;" + queryString, function(err, res, body) { }); })(queryString); } // callback(rows); }); };
tagged with: loops
has title: MySQL query in loop Javascript not work

http://stackoverflow.com/a/26549894
has comment: http://stackoverflow.com/comment/41723073
has comment: http://stackoverflow.com/comment/41722868
has body: You may try the following: $(document).ready(function() { var userDate = '04.11.2014'; var from = userDate.split("."); var f = new Date(from[2], from[1], from[0]); var date_string = f.getFullYear() + " " + f.getMonth() + " " + f.getDate(); console.log(date_string); }); Alternatively I would look into Moment.js It would be way easier to deal with dates: $(document).ready(function() { var userDate = '04.11.2014'; var date_string = moment(userDate, "DD.MM.YYYY").format("YYYY-MM-DD"); $("#results").html(date_string); }); MOMENT.JS DEMO: FIDDLE
has comment: http://stackoverflow.com/comment/41722973
has comment: http://stackoverflow.com/comment/41722649
has comment: http://stackoverflow.com/comment/41722352
downvote count: 0
answers question: http://stackoverflow.com/q/26549773
has comment: http://stackoverflow.com/comment/41723097
score: 8
upvote count: 8
type: Answer

http://stackoverflow.com/a/26574853
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: if you want to do it with jquery try this function resize(){ if($(window).width &gt;768){ //do somthing here with css } } resize(); $(window).resize(function(){ resize(); });
answers question: http://stackoverflow.com/q/26574806

http://stackoverflow.com/a/26610032
answers question: http://stackoverflow.com/q/26609569
type: Answer
upvote count: 3
has body: If you have the css and the png in the correct paths, it looks like the proper use is:
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26609569

http://stackoverflow.com/a/26549941
has body: The problem is the data passed to post(), it should be var posting = $.post(url, $form.serialize()); You are passing a parameter called s with value as the serialized form
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26549888
accepted answer of: http://stackoverflow.com/q/26549888

http://stackoverflow.com/q/26621660
has body: I have an array var nums = [1,2,4]; And I have another array filled with people var people = [ { name: 'Adam', email: 'adam@email.com', age: 12, country: 'United States' }, { name: 'Amalie', email: 'amalie@email.com', age: 12, country: 'Argentina' }, { name: 'Estefanía', email: 'estefania@email.com', age: 21, country: 'Argentina' }, { name: 'Adrian', email: 'adrian@email.com', age: 21, country: 'Ecuador' }, { name: 'Wladimir', email: 'wladimir@email.com', age: 30, country: 'Ecuador' }, ]; I want to create a variable that based off using the nums variable acting as indexes to the people variable. // With the nums array I take each value and set it as the value of the new variable // This is my expected output. Although this is line of code is not possible since the nums variable will be unique each time the code run. var select_people = [people[1], people[2], people[4]]; I am unable to create an empty array and then push each element into the select_people array like so. // This will not do for me var select_people = []; for(var i = 0; i &lt; nums.length; i++) { select_people.push(people[nums[i]]) } My question is this. How can I write this code so that I can assign the select_people variable without having to push the values into the array?
has comment: http://stackoverflow.com/comment/41854122
has comment: http://stackoverflow.com/comment/41853884
has comment: http://stackoverflow.com/comment/41854044
upvote count: 1
has comment: http://stackoverflow.com/comment/41853755
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41853777
accepted answer: http://stackoverflow.com/a/26621715
score: 1
has comment: http://stackoverflow.com/comment/41853992
has comment: http://stackoverflow.com/comment/41853820
has answer: http://stackoverflow.com/a/26621935
tagged with: arrays
downvote count: 0
has title: Create Array through Index of Numbers Without Pushing into Array
has comment: http://stackoverflow.com/comment/41853810
has answer: http://stackoverflow.com/a/26621947
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26621692
favorite count: 0
has answer: http://stackoverflow.com/a/26621692
has comment: http://stackoverflow.com/comment/41853788
has comment: http://stackoverflow.com/comment/41853776
has comment: http://stackoverflow.com/comment/41853872
has answer: http://stackoverflow.com/a/26621715
answer count: 4

http://stackoverflow.com/a/26624027
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26623970
answers question: http://stackoverflow.com/q/26623970
score: 4
has body: There is string concatenation issues in your script $("#Button1").click(function() { var str = "12"; if ($('#additionalStyles').length) { $('#additionalStyles').remove(); } else { $('head').append(' '); } }); .noti_bubble:before { position: absolute; padding: 1px 2px 1px 2px; background-color: red; content: "5"; color: white; font-weight: bold; height: 11px; width: 15px; } Button1 But I would recommend using another class to change the style, if possible instead of adding a dynamic style definition(it is possible only if the content value is not dynamic) $("#Button1").click(function() { $('.noti_bubble').toggleClass('special'); }); .noti_bubble:before { position: absolute; padding: 1px 2px 1px 2px; background-color: red; content: "5"; color: white; font-weight: bold; height: 11px; width: 15px; } .noti_bubble.special:before { color: yellow; content: "12"; } Button1
upvote count: 4
has comment: http://stackoverflow.com/comment/41858951
type: AcceptedAnswer

http://stackoverflow.com/q/26652166
upvote count: 4
has answer: http://stackoverflow.com/a/26652561
has body: I have a number of tags on my page. I've tried: html.replace(/ .*<\/script>/ims, " ");
downvote count: 0
has comment: http://stackoverflow.com/comment/41907812
has comment: http://stackoverflow.com/comment/41907780
has title: How to remove specific on click
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41907823
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41907846
has answer: http://stackoverflow.com/a/26652295
has comment: http://stackoverflow.com/comment/41907903
favorite count: 0
has comment: http://stackoverflow.com/comment/41907882
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41907869
has comment: http://stackoverflow.com/comment/41907881
has comment: http://stackoverflow.com/comment/41908033

http://stackoverflow.com/comment/41707734
comment on: http://stackoverflow.com/q/26541550
score: 0
type: Comment
type: QuestionComment
has text: Why do you think it won't work in Java? Have you tried it? If so, what was the error message?

http://stackoverflow.com/a/26552771
has comment: http://stackoverflow.com/comment/41727743
type: Answer
downvote count: 0
has body: if you get data from client side you should parse that like this: var parsed = JSON.parse(recievedData); and then you have access them.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26552695

http://stackoverflow.com/q/26591335
has answer: http://stackoverflow.com/a/27472466
possible better answer: http://stackoverflow.com/a/26730547
has comment: http://stackoverflow.com/comment/41803750
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41798102
has title: Caching URL view/state with parameters
has comment: http://stackoverflow.com/comment/47236005
type: Question
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/42219522
tagged with: angular-routing
upvote count: 12
has answer: http://stackoverflow.com/a/26820013
has comment: http://stackoverflow.com/comment/42176067
tagged with: javascript
score: 12
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/41797857
has comment: http://stackoverflow.com/comment/42193440
has body: I'm making a mobile app using Cordova and AngularJS. Currently I have installed ui-router for routing but I'm open to any other alternative for routing. My desire: I want to cache certain views bound with parameters. In other words I want to cache paths (or pages). Example situation: let's say that we see some dashboard page, click on some book cover which redirects to the path book/2. This path is being loaded for the first time into app. Router redirects from HomeController to BooksController (whatever the name). Now the BooksController loads data for given $stateParams (book id = 2) and creates view filled with info about chosen book. What I want in this situation: I go back to the dashboard page - it is already loaded (cached?) I choose book #2 again Controller or router notices that data about this book is already loaded The view isn't being recreated, instead it's being fetched from cache Actually, it would be best to cache everything what I visit based on path. Preloading would be cool too. Reason: performance. When I open some list of books then I want it to show fast. When view is being created every time, then animation of page change looks awful (it's not smooth). Any help would be appreciated. EDIT: First of all, since I believe it's a common problem for many mobile HTML app programmers, I'd like to precise some information: I'm not looking for hacks but a clear solution if possible. Data in the views uses AngularJS, so YES, there are things like ng-bind, ng-repeat and so on. Caching is needed for both data and DOM elements. As far as I know, browser's layout operation is not as expensive as recreating whole DOM tree. And repaint is not what we can omit. Having separate controllers is a natural thing. Since I could leave without it I cannot imagine how it would work anyway. I've got some semi-solutions but I'm gonna be strict about my desire. Solution 1. Put all views into one file (I may do it using gulp builder) and use ng-show. That's the simplest sol…
favorite count: 0
has answer: http://stackoverflow.com/a/26730547
accepted answer: http://stackoverflow.com/a/26820013
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41798231

http://stackoverflow.com/q/26666371
possible better answer: http://stackoverflow.com/a/26666430
linked to: http://stackoverflow.com/q/8566090
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26666536
tagged with: css
has body: Is there a way through JavaScript to set the links on a timer before its closes out? I don't want it to seem so sensitive. Such as if a user accidentally mouses off the link it closes right away. Any video recommendation or links? Thanks, I am not using jQuery...... * { padding: 0; margin: 0; } body { padding: 5px; font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif; } ul { list-style: none; } ul li { float: left; padding-right: 1px; position: relative; } ul a { display: table-cell; vertical-align: middle; width: 100px; height: 50px; text-align: center; background-color: #2F2F2F; color: #AE0002; text-decoration: none; } ul a:hover { background-color: #828282; color: #FFFFFF; } li > ul { display: none; position: absolute; left: 0; top: 100%; } li:hover > ul { display: block; } li > ul li { padding: 0px; padding-top: 1px; } li > ul li > ul { left: 100%; top: 0; padding-left: 1px; } li > ul li > ul li { width: 100px; } Sports News Football NFL ESPN Football Baseball MLB ESPN Baseball Soccer FIFA ESPN Soccer Basketball NBA ESPN Basketball Auto Racing ESPN Racing Nascar
accepted answer: http://stackoverflow.com/a/26666536
score: 0
has title: JavaScript & Delay on Hovering Links?
type: AnsweredQuestion
tagged with: settimeout
tagged with: javascript
has answer: http://stackoverflow.com/a/26666430
has comment: http://stackoverflow.com/comment/41934433
type: Question
answer count: 2

http://stackoverflow.com/comment/41766014
type: Comment
has text: in the google analytics cpanel. Status: Tracking Not Installed Last checked: Oct 26, 2014 6:35:42 AM PDT The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26574043

http://stackoverflow.com/comment/41879323
score: 0
has text: Thx. All the time I thought it should be typed somewhere else. And I corrected all mistakes.
type: Comment
comment on: http://stackoverflow.com/a/26635669
type: AnswerComment

http://stackoverflow.com/q/26661528
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41925140
has comment: http://stackoverflow.com/comment/41925108
has comment: http://stackoverflow.com/comment/41925253
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41925726
has comment: http://stackoverflow.com/comment/41925166
has comment: http://stackoverflow.com/comment/41925316
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41925152
has comment: http://stackoverflow.com/comment/41925159
has title: Is it okay to use eval() when your data source is secure?
has body: A lot of people seem to freak out at the notion of using eval(). I completely understand the XSS attacks and security issues that come with this. However, is it bad to use eval() to parse a JSON document that is obtained from your own server over HTTPS, guaranteed valid by the server, and does not contain user-generated data?
type: Question
accepted answer: http://stackoverflow.com/a/26661690
tagged with: javascript
has comment: http://stackoverflow.com/comment/41925202
has comment: http://stackoverflow.com/comment/41925278
has comment: http://stackoverflow.com/comment/41925206
score: 0
linked to: http://stackoverflow.com/q/197769
has answer: http://stackoverflow.com/a/26661690

http://stackoverflow.com/comment/41870751
has text: Thank you everyone :-) as I did not resolve this specific issue I have found a work around: I added the $('.success').delay(5000).fadeOut('slow'); to the product page itself and it works.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26628612

multi-device-hybrid-apps
tag name: multi-device-hybrid-apps
type: Tag
tags question: http://stackoverflow.com/q/26642405

http://stackoverflow.com/a/26595496
answers question: http://stackoverflow.com/q/26595188
type: Answer
score: 0
has body: An alternate solution: for (var ai = 1; ai &lt;= (27) ; ai++ ) { // 27 was picked arbitrarily (3 * 9) // set to what ever upper limit you need // the ceiling of the current ai number divided by 3 will give you your qi var qi = Math.ceil((ai/3)); //setting your values var thisName = "k_" + qi + "_" + ai; var thisValue = ""; //reporting console.log(thisName, thisValue); }

http://stackoverflow.com/a/26630380
has comment: http://stackoverflow.com/comment/41869447
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26629537
type: Answer
has body: You should use another parameter instead of the altField because it overwrites the data and i didn`t see in the jquery ui documentation how to manipulate it, anyway i edited your script so that the date will be appended to the textarea val using the onSelect parameter. $( "#fieldA" ).datepicker({ showOn: "button", buttonText: "Day", inline: true, onSelect: function() { $('#updateTextField').append(' '+$(this).val()); } }); UPDATE: If you`ll want to return a strict value then i'd suggest you to change this line $('#updateTextField').append(' '+$(this).val()); to this $('#updateTextField').val('I would like my items to be delivered by '+$(this).val());
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41869288
answers question: http://stackoverflow.com/q/26629537

http://stackoverflow.com/comment/41772356
score: 0
type: AnswerComment
has text: hmmm... Have you tried using the html element to do this?
type: Comment
comment on: http://stackoverflow.com/a/26576954

http://stackoverflow.com/q/26584881
has body: I would like to use an opening time countdown for individual days on my website for a local shop. The shop has opening hours from monday to friday from 09:00 to 18:00 and is open on saturdays from 10:00 to 16:30. I would like to show the users how long the store is open for the day they visit the website. For example a user is on the site on tuesday at 16:30 I want to display something like "Dear customer, our shop is open for another 1,5 hrs.". If the shop is already closed, I would like to display something like "We are currently closed, but you are welcome to visit the store on Monday at 9 o'clock.". I did a lot of research here and elsewhere, but i just couldn't find a proper solution for this task, so I really hope you could help me.
has answer: http://stackoverflow.com/a/26585069
answer count: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26584969
tagged with: countdown
favorite count: 0
has answer: http://stackoverflow.com/a/26584969
score: 0
has answer: http://stackoverflow.com/a/26585286
has comment: http://stackoverflow.com/comment/41785427
has comment: http://stackoverflow.com/comment/41785685
upvote count: 1
downvote count: 1
has title: Javascript Opening hours countdown
accepted answer: http://stackoverflow.com/a/26585286
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/26618997
has comment: http://stackoverflow.com/comment/41849261
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26619199
tagged with: ajax
has comment: http://stackoverflow.com/comment/41849374
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41848944
has comment: http://stackoverflow.com/comment/41849287
has answer: http://stackoverflow.com/a/26619199
has title: jQuery: pushing values in .serializeArray();
has body: I'm working on an AJAX form submition in jQuery. I used the .serializeArray() function for serializing the form, but I need to add an element to the obtained object, so I used the push() function. So it may look like that: { name: "Test", surname: "Test", action: "register" } When I serialize the form, the name and surname field will be sent, but the action field will not. I send the informations to a PHP echo function but, like the console.log() result, it will show the name and the surname, but not the action. I tried the .serialize() function to, but I'll still not obtain what needed. Here is a fiddle. $(document).ready(function () { $("#register").on("submit", function (e) { e.preventDefault(); var data = $("#register").serializeArray(); data.push({name: "action", value: "register"}); console.log(data); jQuery.post("/echo/json/", data, function () { alert("Success"); }, "json"); }); });
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26619194
has answer: http://stackoverflow.com/a/26619194
has comment: http://stackoverflow.com/comment/41849212
type: Question
has comment: http://stackoverflow.com/comment/41849290

dictionary
tags question: http://stackoverflow.com/q/26637998
tags question: http://stackoverflow.com/q/26661301
tags question: http://stackoverflow.com/q/26581314
tags question: http://stackoverflow.com/q/26613078
tags question: http://stackoverflow.com/q/26630415
tags question: http://stackoverflow.com/q/26565908
tag name: dictionary
tags question: http://stackoverflow.com/q/26615199
tags question: http://stackoverflow.com/q/26668734
tags question: http://stackoverflow.com/q/26611836
tags question: http://stackoverflow.com/q/26549816
type: Tag
tags question: http://stackoverflow.com/q/26638273
tags question: http://stackoverflow.com/q/26601678

http://stackoverflow.com/comment/52141212
comment on: http://stackoverflow.com/a/26629422
type: AnswerComment
score: 0
type: Comment
has text: wow. this is crazy. this did not happen in older versions. thanks

http://stackoverflow.com/comment/42101061
comment on: http://stackoverflow.com/a/26759098
type: Comment
has text: I did that too but it is not working for me. Does it work for you ? EDIT : I tested again and it works now... !!
score: 0
type: AnswerComment

http://stackoverflow.com/a/26640791
type: Answer
has comment: http://stackoverflow.com/comment/41888490
answers question: http://stackoverflow.com/q/26640527
upvote count: 0
has comment: http://stackoverflow.com/comment/41888594
score: -1
has body: You can try this basic technique. Also try to get familiar with responsive web design. div{ border:1px solid black; text-align:center; } #container{ width:100%; position:relative; float:left; padding:10px; } #container .item{ width:16%; float:left; padding:50px; position:relative; } /* CSS3 - change divs width on window resize */ @media screen and (max-width: 468px){ #container .item{ width:100%; } } &lt;div id="container"&gt; &lt;div class="item"&gt; One &lt;/div&gt; &lt;div class="item"&gt; Two &lt;/div&gt; &lt;div class="item"&gt; Three &lt;/div&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/41888513
downvote count: 1
has comment: http://stackoverflow.com/comment/41888581

http://stackoverflow.com/comment/108102445
has text: This was nice answer. I have an extra question on another topic. Should I save every message in the database (for the purpose of keeping message history) first and then emit the message to respective user or use any broker to keep sending time lower ? In traditional messaging app I don't know which flow is used.
comment on: http://stackoverflow.com/a/58045864
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26616011
tagged with: nouislider
has comment: http://stackoverflow.com/comment/41843936
has answer: http://stackoverflow.com/a/26616365
has comment: http://stackoverflow.com/comment/41843752
has body: I know this may sound like a duplicate question but I have tried a zillion things form Stack Overflow already and it does not work. What I am trying to do involves noUiSlider and I am trying to basically get the 3 values of each slider and then use those values any way I wish - for example to turn on or off a next button if the total value of the sliders adds up to a given value. Here's the code in question: // On document ready, initialize noUiSlider. $(function(){ $('.guardsRanger').noUiSlider({ start: [0], step: 1, behaviour: 'tap-drag', range: { 'min': 0, 'max': 8 } }, true); $('.jacksRanger').noUiSlider({ start: [0], step: 1, behaviour: 'tap-drag', range: { 'min': 0, 'max': 8 } }, true); $('.strikersRanger').noUiSlider({ start: [0], step: 1, behaviour: 'tap-drag', range: { 'min': 0, 'max': 8 } }, true); $("#pips-values").noUiSlider_pips({ mode: 'values', values: [1,2,3,4,5,6,7,8], density: 8 }); $("#pips1-values").noUiSlider_pips({ mode: 'values', values: [1,2,3,4,5,6,7,8], density: 8 }); $("#pips2-values").noUiSlider_pips({ mode: 'values', values: [1,2,3,4,5,6,7,8], density: 8 }); var guardsval; $(".guardsRanger").on({ set: function(){ guardsval = $(".guardsRanger").val(); } }); $(".jacksRanger").on({ set: function(){ jacksval = $(".jacksRanger").val(); } }); $(".strikersRanger").on({ set: function(){ strikersval = $(".strikersRanger").val(); } }); alert(guardsval); });
type: Question
tagged with: javascript
downvote count: 6
has comment: http://stackoverflow.com/comment/41843970
upvote count: 2
has comment: http://stackoverflow.com/comment/41844050
has comment: http://stackoverflow.com/comment/41843859
answer count: 1
has comment: http://stackoverflow.com/comment/41843418
has comment: http://stackoverflow.com/comment/41843512
has comment: http://stackoverflow.com/comment/41845046
linked to: http://stackoverflow.com/q/21352486
has title: How to access a variable that is inside a function?
favorite count: 0
has comment: http://stackoverflow.com/comment/41866775
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/41843826
has comment: http://stackoverflow.com/comment/41843298

http://stackoverflow.com/a/26614857
has comment: http://stackoverflow.com/comment/41841787
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26614453
answers question: http://stackoverflow.com/q/26614453
type: Answer
has body: After thinking a little bit about your case, the problem probably lies in the jQuery selector, because you select all in your table and then apply the :eq(1), you probably only take the first row second column before applying the contains filter. Try rewriting your selector as follow $("#trans_log_table tr&gt;td:eq(1):contains('" + orderNum + "')")
upvote count: 1
has comment: http://stackoverflow.com/comment/41841896
has comment: http://stackoverflow.com/comment/41843176
score: 1

http://stackoverflow.com/comment/41674112
comment on: http://stackoverflow.com/q/26516870
type: Comment
type: QuestionComment
has text: I have minified the jsbin so it s possible to see clearer the issue http://emberjs.jsbin.com/qakado/edit?html,output
score: 0

http://stackoverflow.com/comment/41819456
has text: Yuan, Your question way too broad for this forum and you should expect some negitive feedback to this question. I think you need to understand a bit more about Client and Server(service) architecture. Specifically look into using Ajax... Look at these 2 links to get started. [Ajax](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAjax_(programming)&ei=QoZKVLfaEoqV8gHcjoHYCg&usg=AFQjCNFLYguVMMQmsHjrHHYvyAlxbhOnRQ&sig2=o3Bee9ZIHbE1t-Yqn3bLVw) [w3 schools](http://www.w3schools.com/ajax/)
comment on: http://stackoverflow.com/q/26552714
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/26668050
has comment: http://stackoverflow.com/comment/41937346
type: Question
tagged with: c#
tagged with: javascript
has title: The process cannot access the file because it is being used by another process (To delete a folder)
score: 0
has comment: http://stackoverflow.com/comment/41937456
has body: I have written a file to a specified folder. After writing it to the folder I attach that file to mail. After attaching that file to mail, I want to delete that folder.But folder is not geting deleted and it throws the exception as "The process cannot access the file because it is being used by another process" Here is my code. public HttpResponseMessage SendChannelPartenersMessage(string Name,string FirmName,string Address, string Email,string Mobile) { var httpRequest = HttpContext.Current.Request; ContactUs contactUs = new ContactUs(); contactUs.Address = Address; contactUs.Name = Name; contactUs.FirmName = FirmName; contactUs.Email = Email; contactUs.Mobile = Mobile; try { if (httpRequest.Files.Count &gt; 0) { contactUs.AttachFileName = WriteAttachedFile(httpRequest, contactUs.Email); if (ContactUsService.SendChannelPartenersMessage(contactUs)) { var fileToBeDeleted = contactUs.AttachFileName; var deleteFile = DeleteAttachedFile(contactUs.AttachFileName); } return Request.CreateResponse(HttpStatusCode.OK, contactUs); } else { return Request.CreateResponse(HttpStatusCode.BadRequest); } } catch (Exception e) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent("An error occurred, please try again or contact the administrator."), ReasonPhrase = "Critical Exception" }); } } private string WriteAttachedFile(HttpRequest httpRequest, string FileName) { var postedFile = httpRequest.Files[0]; var directoryPath = System.Configuration.ConfigurationManager.AppSettings["FolderPath"].ToString() + FileName + "\\\\"; var filePath = directoryPath + postedFile.FileName; Directory.CreateDirectory(directoryPath); postedFile.SaveAs(filePath); var Path = filePath.Replace("\\", "/"); return (Path); } private bool DeleteAttachedFile(string FileName) { if (System.IO.File.Exists(FileName)) { System.IO.File.Delete(FileName); } string[] words = FileName.Split('/'); string directoryPath = words[words.Length - 2]; if (Dir…
answer count: 1
has answer: http://stackoverflow.com/a/26668079
type: UnansweredQuestion

universal-analytics
tag name: universal-analytics
tags question: http://stackoverflow.com/q/26537420
type: Tag

http://stackoverflow.com/a/26591867
downvote count: 2
upvote count: 0
answers question: http://stackoverflow.com/q/26591789
type: Answer
score: -2
has comment: http://stackoverflow.com/comment/41798522
has body: try this: &lt;form action="create.php" method="post" onsubmit="openprompt"&gt;

http://stackoverflow.com/comment/41702048
type: Comment
has text: Good luck getting the `global_extractors/node.js` in. He keeps a pretty clean repo. That's an, "If that makes it in, I'll eat my hat," situation. More hopeful about the updated node array [to object]. ;^)
comment on: http://stackoverflow.com/a/26535138
type: AnswerComment
score: 0

http://stackoverflow.com/a/26557626
type: AcceptedAnswer
type: Answer
score: 30
has comment: http://stackoverflow.com/comment/41736493
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26557593
answers question: http://stackoverflow.com/q/26557593
upvote count: 30
has body: You need to set scrollTop each time you append text: var textarea = document.getElementById('textarea_id'); setInterval(function(){ textarea.value += Math.random()+'\n'; textarea.scrollTop = textarea.scrollHeight; }, 1000); http://jsfiddle.net/mya0u1zo/2/

http://stackoverflow.com/comment/41757985
score: 0
has text: Are you using modern browsers? Are css transitions an option?
comment on: http://stackoverflow.com/q/26569499
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26633738
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/26634923
has comment: http://stackoverflow.com/comment/41875159
has comment: http://stackoverflow.com/comment/41875208
has answer: http://stackoverflow.com/a/26634010
score: 0
accepted answer: http://stackoverflow.com/a/26633950
has comment: http://stackoverflow.com/comment/41875504
has answer: http://stackoverflow.com/a/26633936
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26633950
has body: Given the following HTML code : Lorem ipsum dolor sit amet... Blablabla consectetur adipiscing elit... What I want to do is to seperately extract Lorem ipsum dolor sit amet... And consectetur adipiscing elit... In other words, I would like to extract everything that is contained in the div before the element and everything that is contained in the div after the element How can I achieve this ?
possible better answer: http://stackoverflow.com/a/26634064
has answer: http://stackoverflow.com/a/26633930
has comment: http://stackoverflow.com/comment/41875432
has comment: http://stackoverflow.com/comment/41875392
has title: Select div content before and after a given element
type: Question
has answer: http://stackoverflow.com/a/26634064
has comment: http://stackoverflow.com/comment/41875402
tagged with: javascript

http://stackoverflow.com/q/26635880
tagged with: mapbox
accepted answer: http://stackoverflow.com/a/26636307
upvote count: 1
tagged with: geojson
has title: Remove Polylines on a map from mapbox
type: AnsweredQuestion
type: Question
has body: Does anybody know how I can remove Polylines that I have on a map. I hve tried many things to remove the lines taht is drawn up. But it will not dissapear. This is the code I used to draw the lines : var geojson = [ { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [10.39799, 63.43074], [10.3987, 63.431] ] }, "properties": { "stroke": "#fc4353", "stroke-width": 5 } },{ "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [10.397958755, 63.431], [10.39868, 63.43073] ] }, "properties": { "stroke": "#fc4353", "stroke-width": 5 } } ]; L.geoJson(geojson, { style: L.mapbox.simplestyle.style }).addTo(map);
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26636307
tagged with: javascript
favorite count: 0
score: 1

http://stackoverflow.com/comment/41857108
type: Comment
comment on: http://stackoverflow.com/q/26623567
type: QuestionComment
has text: You declared array as `fruit` and is applying sort on `fruits`.
score: 0

http://stackoverflow.com/a/26635446
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26635297
upvote count: 1
has body: You can do it like this var arr = arrayA.map(function(x){ return x + "" }); // convert the array to string arrayB.forEach(function(e) { var idx = (arr.indexOf(e + "")); // find the index arr.splice(idx, 1); // remove it }); arrayA = arr.map(function(x) { return x.split(","); });
type: Answer

http://stackoverflow.com/q/26531212
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/41689411
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/27271132
accepted answer: http://stackoverflow.com/a/27271132
linked to: http://stackoverflow.com/q/17545708
answer count: 1
linked to: http://stackoverflow.com/q/16873689
favorite count: 0
score: 8
tagged with: timezone
tagged with: datetime
has comment: http://stackoverflow.com/comment/43013272
has comment: http://stackoverflow.com/comment/43012162
type: AnsweredQuestion
downvote count: 0
has body: When comparing dates in Javascript using &lt;, >, =, >= and &lt;= is the timezone used in any way in the comparison? I am hoping that the timezone is ignored.
has title: Comparing dates in Javascript and timezones
linked to: http://stackoverflow.com/q/7606798

http://stackoverflow.com/comment/106318742
type: Comment
has text: That i can't answer
type: AnswerComment
comment on: http://stackoverflow.com/a/57998212
score: 0

http://stackoverflow.com/a/26603625
type: Answer
answers question: http://stackoverflow.com/q/26600705
score: 0
has body: It does not work because it is not an AJAX request. You must use AJAX. It is not very complicated and you can find instructions at http://www.w3schools.com/ajax/default.asp.

http://stackoverflow.com/comment/41941759
has text: I will try that, thank you give me a moment
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26670048
type: QuestionComment

http://stackoverflow.com/q/26542926
accepted answer: http://stackoverflow.com/a/29841288
has title: Size of the parameter in applet call is too big
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: applet
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/29841288
has comment: http://stackoverflow.com/comment/41781230
upvote count: 4
has comment: http://stackoverflow.com/comment/41738285
has body: I have problem in passing some data from JavaScript to an applet. I think size of data is too big (18M characters in string) to pass it through LiveConnect. I put code samples below: JavaScript: var bigData = generateSomeBigData(18000000); // string contaning 18 000 000 characters applet.Execute(bigData); // no error Applet: public void Execute(String data) { this.doSomethingWithData(data); // data is null } I didn't get any error or exceptions in java console or in javascript code. I've tried running applet with bigger heap, but it didn't help. ... &lt;param name="java_arguments" value="-Xmx128m" /&gt; ... The only problem is I get null instead of string contaning data, it doesn't depend on browser (FF, Chrome).
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41781596
tagged with: java
type: Question
tagged with: liveconnect

http://stackoverflow.com/q/26595631
has comment: http://stackoverflow.com/comment/41805893
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41834942
has answer: http://stackoverflow.com/a/26612413
has comment: http://stackoverflow.com/comment/41806336
tagged with: http://stackoverflow.com/tag/json
score: 0
has answer: http://stackoverflow.com/a/26595898
linked to: http://stackoverflow.com/q/450876
has comment: http://stackoverflow.com/comment/41835107
has comment: http://stackoverflow.com/comment/41806396
tagged with: javascript
type: UnansweredQuestion
has body: I am developing an application that use HTML and js for front-end and PHP for back-end. I have the following code which should have the functions that: 1, when click on the background image, user can choose photo from there phone as new background image, and use PHP to save the image on server and get the image path, store the path into database, then send new path back to front with JSON, and display the selected image as new background image. Thanks for any help. javascript for sending and retrieve data: function UploadImageDialog() { $("#newProfileImage").click(); } function profileImageSelected(fileInput) { var xhr = new XMLHttpRequest(); xhr.open("POST", "UploadProfileImage.php", true); var formData = new FormData(); formData.append("file", fileInput.files[0]); xhr.send(formData); xhr.onload = function() { alert(xhr.responseText); //test the returned info from PHP. if(xhr.responseText != ""){ $("#profileBackgroundImage").setAttribute("src", xhr.responseText); } else { alert("Your file failed to upload"); } } } HTML code to call the javascript: &lt;div style="width:91.5vw;height:78.5vh;margin-top:10.5vh;"&gt; &lt;img class="backgroundImage" id="pictureSrc" src="img/Jenny.jpg" onclick="UploadImageDialog()" /&gt; &lt;/div&gt; &lt;input type="file" id="newProfileImage" style="display:none;" onchange="profileImageSelected(this)"/&gt; PHP code to get the path: &lt;?php if(is_uploaded_file($_FILES['file']['tmp_name'])) // if user uploads file { if (!file_exists("./img/EventImages/" . $_FILES["file"]["name"])) { if (move_uploaded_file($_FILES["file"]["tmp_name"], "./img/EventImages/" . $_FILES["file"]["name"])) { echo "img/EventImages/" . $_FILES["file"]["name"]; } } else { echo "img/EventImages/" . $_FILES["file"]["name"]; } } ?&gt;
has title: How to store image to folder and store the path to database using Ajax?

http://stackoverflow.com/a/26615895
type: Answer
has comment: http://stackoverflow.com/comment/41843998
has comment: http://stackoverflow.com/comment/41843167
has comment: http://stackoverflow.com/comment/41843360
has comment: http://stackoverflow.com/comment/41844092
score: 0
has comment: http://stackoverflow.com/comment/41843669
has comment: http://stackoverflow.com/comment/41844066
has body: posting the answer here use the unique filter like this ng-repeat="event in events unique:'month'" if you dont want whole object to be omitted try something like {{event.month}} or to more that it isnt first element {{event.month}}
has comment: http://stackoverflow.com/comment/41844167
has comment: http://stackoverflow.com/comment/41843928
has comment: http://stackoverflow.com/comment/41846322
answers question: http://stackoverflow.com/q/26615706

http://stackoverflow.com/q/26663611
score: 0
answer count: 1
has body: Need some help over here. Been bashing my head against a piece of code for a while now, but I can't wrap my head around it. Slowly trying to learn JavaScript, and trying to handle a piece of JSON data. The JSON data is as follows. (simple example, more nesting going to happen at some point) { "div": { "attr-id": "josh", "div": { "attr-id": "greg" } } } (So far so good, right?) Well, now I'm trying to make this into HTML. First I did some for loops, I tried using "classes", nested functions, etcSo I figured a recursive function would be suitable. Oh, yes, let me get right on that! head explodes I've been trying various functions, trying to find something as lean and mean as possible. The theory is: Send parsed JSON to function. Function finds first property. If property value is an object then get property key to be used as value for a document.createElement(v). Else if property value is a string, that means there's an "attr" present. And we need to apply this to our element. However, what if the element isn't there yet? here's when my brain has starts to speed wobble). Anyway if the key value is an object, we would want to call the function again, this time supplying this data. And also, since we're handling elements. We'd want to append this outcome to our previous element. Eh.. I've discarded so much code, and I'm having a hard time wrapping my head around recursion, or simple the laws of javascript. I haven't gotten further than this I'm afraid and this code doesn't even work. function recurseYou(obj) { for(var key in obj) { //probably a safer way testing than typeof = string //but this'll have to do for now if(typeof obj[key] != 'string'){ //create a new element var el = document.createElement((key.split("."))[0]); //append the return of the function using the //current key value el.appendChild(recurseYou(obj[key])); } else { // do stuff to string } } return el; } Anyway, any pointers, tips or help very appreciated. But please keep it to JavaScript only, I'm not…
has comment: http://stackoverflow.com/comment/41929075
has comment: http://stackoverflow.com/comment/41930786
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41931459
type: Question
accepted answer: http://stackoverflow.com/a/26664156
has comment: http://stackoverflow.com/comment/41929015
has comment: http://stackoverflow.com/comment/41930757
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has title: Recursive function to output element from JSON data
has answer: http://stackoverflow.com/a/26664156

http://stackoverflow.com/comment/41814056
has text: You're going to have to provide details. What are the URL's that the script runs on? What are the URL's that you redirect (`location.replace(a)`) to? Edit the question to provide this information.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26599230
type: QuestionComment

http://stackoverflow.com/comment/41968283
comment on: http://stackoverflow.com/a/26679362
has text: @PI. For multiple checkboxes , could call `.each()` on `input.ad-check` elements , utilize `name` or other attribute for `id`'s of `a` elements ; pass attribute as element `id` parameter for `simulateClick`. Thanks
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41910964
has text: Did any error messages come up?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26653953
score: 0

http://stackoverflow.com/q/26595283
has answer: http://stackoverflow.com/a/26596400
accepted answer: http://stackoverflow.com/a/26596400
type: Question
tagged with: rotation
tagged with: math
tagged with: javascript
has answer: http://stackoverflow.com/a/26597182
score: 0
answer count: 2
tagged with: canvas
has title: issues in Y-axis when rotating a JS object in HTML5 canvas
has body: I'm trying to make the ball move on the line while rotating with easing.. My problem is that while rotating the line the Y-Axis of the ball is changed. Note Maybe in my code when rotating the line the whole canvas is rotated but I don't know how to fix it. Demo http://jsfiddle.net/mgazzar/o487tnb5/38/ here is how the line drawn ctx.save(); ctx.translate(canvas.width/2,canvas.height/2); ctx.rotate(angle * Math.PI / 180) ; ctx.beginPath(); ctx.moveTo(-lineLength/2,0); ctx.lineTo(lineLength/2,0); ctx.lineWidth=5; ctx.strokeStyle='white'; ctx.fillStlye = "white"; ctx.stroke(); ctx.restore();
tagged with: html5-canvas
possible better answer: http://stackoverflow.com/a/26597182
type: AnsweredQuestion

http://stackoverflow.com/a/26661641
accepted answer of: http://stackoverflow.com/q/26661474
answers question: http://stackoverflow.com/q/26661474
has body: Pass the event object to the submitEnter() function. HTML: &lt;input type="text" name="search-bar" id="search-bar" class="search-box" onkeypress="return submitEnter(event);" placeholder=" Start typing to search"/&gt; JS: function submitEnter(event) { var keycode = event.keyCode ? event.keyCode : event.which; if (keycode == 13) { redirect(); return false; } else return true; }
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41925430
type: Answer

http://stackoverflow.com/comment/41766231
comment on: http://stackoverflow.com/a/26572694
type: AnswerComment
score: 0
type: Comment
has text: Thank you very much for the pointer. I was able to match the date ([\d]+\.[\d]+\.[\d]+) and the endtime ([\d]+\:[\d]+)$ But I wasn't able to match the text part (without date and time) and the starttime (I need starttime and endtime in separate variables). Can you help me with this? Thank you very much. Best, Phil

http://stackoverflow.com/a/26613275
has body: It seems that you have an http site which itself uses https analytics. Recently the POODLE vulnerability forced website owners to disable SSLv3. Since PhantomJS &lt; v1.9.8 uses SSLv3 by default, the analytics and additional scripts could not be loaded due to handshake failure. Therefore the then following requests could not run, because the scripts didn't even reach the browser. Since PhantomJS 1.9.8 the default protocol is set to TLSv1, but it can set manually for earlier versions by passing --ssl-protocol=tlsv1 as command line option. See this answer for more. This can be checked by registering a onResourceError event handler. The error message will contain something like SSL handshake failed.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26609498
type: Answer
answers question: http://stackoverflow.com/q/26609498
score: 3
upvote count: 3

http://stackoverflow.com/comment/41791400
has text: UTF-8 characters??? Yes, we'd do a regular expression something on the input, but to do that, we need to know the valid and invalid ranges the op requires.
type: AnswerComment
comment on: http://stackoverflow.com/a/26588093
score: 0
type: Comment

http://stackoverflow.com/a/26649568
score: 31
has comment: http://stackoverflow.com/comment/41903725
has comment: http://stackoverflow.com/comment/41903393
has comment: http://stackoverflow.com/comment/41903883
upvote count: 34
has comment: http://stackoverflow.com/comment/41903311
downvote count: 3
has comment: http://stackoverflow.com/comment/50869217
answers question: http://stackoverflow.com/q/26649460
has comment: http://stackoverflow.com/comment/114197964
type: Answer
has body: You can refer to json file calling them with a GET method, like so: $http.get('phones/phones.json').success((data) =&gt; { $scope.phones = data; }); Check the official AngularJS tutorial to see what you are doing wrong. Update: For angular 1.6+ success method is not valid anymore instead use then: $http.get('phones/phones.json').then((data) =&gt; { $scope.phones = data; }); Refer to source here.

http://stackoverflow.com/comment/41802294
has text: try adding the prompt() function in order to prompt the user
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26593655

http://stackoverflow.com/comment/41701105
has text: What if you just do `/Articles/stuff.html`? I feel like your concatenating it weird.
type: AnswerComment
comment on: http://stackoverflow.com/a/26536773
score: 0
type: Comment

http://stackoverflow.com/comment/41742735
score: 0
type: Comment
type: QuestionComment
has text: I thought that was only the role of the signaling server ... It means that differente people really need to use the same STUN server to be put in relation? To be more precise about my project, it is a Chrome extension, and I was thinking about maybe remove STUN servers into the libs file or allow users to parameterize a list of STUN server they accept to use...
comment on: http://stackoverflow.com/q/26560648

http://stackoverflow.com/comment/41864288
has text: "Yes it's bad" is not an answer. Please also explain *why* is it a bad idea :)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26627570
score: 3

http://stackoverflow.com/a/40768222
has comment: http://stackoverflow.com/comment/69442640
has comment: http://stackoverflow.com/comment/76406075
upvote count: 24
has comment: http://stackoverflow.com/comment/72176268
answers question: http://stackoverflow.com/q/26556436
downvote count: 11
has comment: http://stackoverflow.com/comment/120193109
type: Answer
score: 13
has comment: http://stackoverflow.com/comment/69443055
has body: I feel that this solution is dirty, but here we go: componentDidMount() { this.componentDidUpdate() } componentDidUpdate() { // A whole lotta functions here, fired after every render. } Now I am just going to sit here and wait for the down votes.
has comment: http://stackoverflow.com/comment/86908232

http://stackoverflow.com/q/26552189
has comment: http://stackoverflow.com/comment/41726544
answer count: 1
has body: So I have this code: window.addEventListener("load", function() { var x = 2; }); console.log(x); // undefined Is there anyway to make this code working without affecting the code inside the callback at all?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41726609
has comment: http://stackoverflow.com/comment/41729431
has answer: http://stackoverflow.com/a/29755046
type: Question
tagged with: closures
tagged with: javascript
has comment: http://stackoverflow.com/comment/41726764
has comment: http://stackoverflow.com/comment/41726682
has comment: http://stackoverflow.com/comment/41727384
has title: Javascript - window.addEventListener
score: 0

http://stackoverflow.com/comment/41926872
score: 0
has text: @ColinDeClue added the explanation
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26662224

http://stackoverflow.com/comment/41699261
type: QuestionComment
has text: `event.preventDefault();`
type: Comment
comment on: http://stackoverflow.com/q/26536653
score: 0

http://stackoverflow.com/a/63576133
has body: I wanted a checkmark that looked like the material done icon, so I adjusted the original answer a little. Posting it here in case it saves someone a bit of time. .animated-check { height: 10em; width: 10em; } .animated-check path { fill: none; stroke: #7ac142; stroke-width: 4; stroke-dasharray: 23; stroke-dashoffset: 23; animation: draw 1s linear forwards; stroke-linecap: round; stroke-linejoin: round; } @keyframes draw { to { stroke-dashoffset: 0; } } &lt;svg class="animated-check" viewBox="0 0 24 24"&gt; &lt;path d="M4.1 12.7L9 17.6 20.3 6.3" fill="none"/&gt; &lt;/svg&gt;
upvote count: 8
answers question: http://stackoverflow.com/q/26558916
type: Answer
score: 8
downvote count: 0

http://stackoverflow.com/q/26672241
tagged with: http://stackoverflow.com/tag/html
upvote count: 15
has answer: http://stackoverflow.com/a/26672281
accepted answer: http://stackoverflow.com/a/26672281
downvote count: 0
has comment: http://stackoverflow.com/comment/41945106
has title: Remove class after click outside the div
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/75499247
score: 15
type: Question
answer count: 2
has body: I know this is a old question , but i've searched a lot . i want to remove class after clicked outside the like body . here is my code : Html Enter visible Jquery $(function () { $("#user-login-top").on("click", function () { $("#user-login-wrapper").addClass("wide"); }); $(document).on("click", function (e) { if ($(e.target).is("#user-login-wrapper") === false) { $("#user-login-wrapper").removeClass("wide"); } }); }); and here is the fiddle : Fiddle Appreciate your help !? Thx
possible better answer: http://stackoverflow.com/a/75499247
has comment: http://stackoverflow.com/comment/41945217
has comment: http://stackoverflow.com/comment/41944621
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26596715
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: When you recurse, you need to return the value returned by the recursive call as you unwind. So in your else clause, you need: return locate(arr[i], value); var locate = function(arr,value){ for (var i=0; i &lt;arr.length; i++) { if(typeof arr[i]=== "string") { console.log("string is string"); if(arr[i]=== value) { console.log("This should be true"); return true; } } else { return locate(arr[i], value); } } } alert(locate(['d', 'a',['e', 'g']], 'e'));
upvote count: 2
answers question: http://stackoverflow.com/q/26596658
accepted answer of: http://stackoverflow.com/q/26596658

http://stackoverflow.com/comment/41751467
comment on: http://stackoverflow.com/q/26566146
has text: How exactly are you running fileA?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41761309
score: 0
type: Comment
has text: edited your code so it does not get caught in the loop. http://jsfiddle.net/4n6mer0y/1/
type: AnswerComment
comment on: http://stackoverflow.com/a/26565269

http://stackoverflow.com/q/26620083
type: Question
accepted answer: http://stackoverflow.com/a/26620245
answer count: 2
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/56078462
favorite count: 0
has title: Javascript - Restructure array of objects
possible better answer: http://stackoverflow.com/a/56078462
has body: I currently have an array of objects that looks like this: [ { "key":"CES0000000001", "25568.95655":"29923", "25568.96078":"31603" }, { "key":"CES0000000001", "25568.96501":"34480", "25568.96924":"38347" } ] I'm trying to figure out the best way to restructure this data to look like this: [ { "key":"CES0000000002", "values": [ [ 25568.95655 , 29923 ] , [ 25568.96078 , 31603 ] ] }, { "key":"CES0000000002", "values": [ [ 25568.96501 , 34480 ] , [ 25568.96924 , 38347 ] ] } ] Can anyone provide some advice for this and any good resources for restructuring javascript objects? I'm getting more into visualization using d3.js and data formatting is key.
has comment: http://stackoverflow.com/comment/41850973
upvote count: 2
has comment: http://stackoverflow.com/comment/41851877
has answer: http://stackoverflow.com/a/26620245
tagged with: d3.js
downvote count: 1
type: AnsweredQuestion
tagged with: object
score: 1
has comment: http://stackoverflow.com/comment/41851010
tagged with: formatting

http://stackoverflow.com/q/26653400
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: button
has answer: http://stackoverflow.com/a/26655055
has title: Accordion open/close all content button and more
possible better answer: http://stackoverflow.com/a/26653589
type: Question
has answer: http://stackoverflow.com/a/26653589
has answer: http://stackoverflow.com/a/26653591
score: 0
accepted answer: http://stackoverflow.com/a/26655055
tagged with: toggle
has body: I have a responsive accordion function inside a website and i want to (open) and (close) all content with one button that also change his content name to (open) when all content is closed and (closed) when all content is open. Also now the content that already was opened closes again when using the (open) button and the plus and minus icons don't react the right way showing the (minus icon) when the content is closed and visa versa. Here is the fiddle Can someone help me with this? // Accordion // $('.header').click(function(){ $('.content',$(this).parent()).slideToggle(); $(this).toggleClass('active'); }) $('.toggle-btn').click(function(){ $('.content').slideToggle(); $(this).toggleClass('active'); })
tagged with: javascript
tagged with: accordion
answer count: 3

http://stackoverflow.com/q/26600183
accepted answer: http://stackoverflow.com/a/26600322
tagged with: google-maps
upvote count: 0
tagged with: javascript
tagged with: google-maps-api-3
type: Question
has body: I need help adding two things. var image = '1368298974442034922android-car-home-256-th.png'; I would like to remove the red default marker and add this item And i dont know how to change this from map to satellite view Info windows
type: AnsweredQuestion
has title: Google Maps JavaScript API v3 changing marker and add satellite view
favorite count: 0
has answer: http://stackoverflow.com/a/26600322
downvote count: 2
score: -2
answer count: 1

http://stackoverflow.com/comment/41838066
comment on: http://stackoverflow.com/a/26600624
score: 0
type: AnswerComment
type: Comment
has text: obligatory underscore/lowdash promotion: `_(temp).values()` http://jsfiddle.net/0nfgxns4/1/ (not that I don't love the plain version).

http://stackoverflow.com/comment/41889177
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26641068
has text: For starters, use '' inside "" as in `"$event.keyCode == 32 ? '/settings' : null"`

switch-statement
tags question: http://stackoverflow.com/q/26627485
tags question: http://stackoverflow.com/q/26579541
type: Tag
tags question: http://stackoverflow.com/q/26542756
tag name: switch-statement

identifier
tag name: identifier
type: Tag
tags question: http://stackoverflow.com/q/26565087

http://stackoverflow.com/comment/41882382
type: AnswerComment
comment on: http://stackoverflow.com/a/26636807
type: Comment
has text: so in my child scope, I have something like var desc = $scope.$parent.productDetail.product[0].desc. It gave me can't find property of desc error because there is nothing in the productDetail yet and I have multiple objects returned from the calls
score: 0

http://stackoverflow.com/a/26604759
has comment: http://stackoverflow.com/comment/41823886
has comment: http://stackoverflow.com/comment/41823135
has comment: http://stackoverflow.com/comment/41827737
has comment: http://stackoverflow.com/comment/41825690
has comment: http://stackoverflow.com/comment/41827787
has comment: http://stackoverflow.com/comment/41825160
downvote count: 0
answers question: http://stackoverflow.com/q/26604371
has comment: http://stackoverflow.com/comment/41823445
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/41824807
has comment: http://stackoverflow.com/comment/41824645
score: 2
has body: If Websockets is not an option for you, you could use one ajax request to the server. Than server side go into a infinite loop. Use the sleep function to not overload the memory. Than check each time if there is something changed. If so, break out the loop and return the data. On the client side send immediately the next request. After a bit of research it's called "Ajax long-polling requests". Here is a explanation. The PHP code would look something like this: $prevHash = $_GET['hash']; while(true){ $currHash = GetHashFromTable('myTable'); if ($prevHash != $currRowCount) break; sleep(3); } $response[0] = GetDataFromTable('myTable'); $response[1] = GetHashFromTable('myTable'); echo json_encode($response); Update Long polling is not the best option. Better to use web-sockets. If you want to compare the differences, see this answer: https://stackoverflow.com/a/10029326/3269816
has comment: http://stackoverflow.com/comment/41824359

http://stackoverflow.com/q/26670680
has body: I am customizing the alert box in Jquery with a function c_alert(). I am showing alert box while user logins with empty login details. The function which is called upon login is as shown below. function login() { var loginName = $("#US_UName").val(); var loginName = $.trim(loginName); if (loginName == "") { c_alert("Authentication Error","Please enter your username"); $("#US_UName").focus(); // not working return false; } } The c_alert() is as: function c_alert(Title,Msg) { $.confirm({ 'title' : Title, 'message' : Msg, 'buttons' : { 'OK' : { 'class' : 'blue', 'action': function(){ return; } } } }); }; Now, the problem is that after alert is shown, I want to point cursor to the corresponding field for entering details, which is not working. I tried with return; statement in the c_alert(), but didnt worked. The code for $.confirm() is as shown below: (function($){ $.confirm = function(params){ if($('#confirmOverlay').length){ // A confirm is already shown on the page: return false; } var buttonHTML = ''; $.each(params.buttons,function(name,obj){ // Generating the markup for the buttons: buttonHTML += ''+name+''; if(!obj.action){ obj.action = function(){}; } }); var markup = [ ' ', ' ', ' ',params.title,' ', ' ',params.message,' ', ' ', buttonHTML, ' ' ].join(''); $(markup).hide().appendTo('body').fadeIn(); var buttons = $('#confirmBox .button'), i = 0; $.each(params.buttons,function(name,obj){ buttons.eq(i++).click(function(){ // Calling the action attribute when a // click occurs, and hiding the confirm. obj.action(); $.confirm.hide(); return false; }); }); } $.confirm.hide = function(){ $('#confirmOverlay').fadeOut(function(){ $(this).remove(); }); } })(jQuery); Can anyone help me to find what I am doing wrong? Thanks in advance.
tagged with: return
has title: Control not returning back to function in jquery
has comment: http://stackoverflow.com/comment/41942000
type: AnsweredQuestion
tagged with: alert
has answer: http://stackoverflow.com/a/26673385
type: Question
tagged with: function
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26673385

http://stackoverflow.com/q/26621698
has body: I am attempting to write a program that can solve the pythagorean theorem for 'a', 'b', or 'c'. HTML: Pythagorean Theorem 2 + 2 = 2 Javascript: function pythagoreanTheorem(a, b, c) { a = document.getElementById("aPythagoreanTheorem").value; b = document.getElementById("bPythagoreanTheorem").value; c = document.getElementById("cPythagoreanTheorem").value; if ((a != 0) && !(isNan(a)) && (b != 0) && !(isNan(b))) { c = (a * a) + (b * b); document.getElementById("cPythagoreanTheorem").value = c; } } This if statement works : if ((a != 0) && (b != 0)) { c = (a * a) + (b * b); document.getElementById("cPythagoreanTheorem").value = c; } But when I attempt to also test if the user inputted value is a letter using isNan(), it stops working. Am I doing this incorrectly?
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: Pythagorean theorem code, isNaN() function
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26621714
tagged with: if-statement

http://stackoverflow.com/comment/41855284
comment on: http://stackoverflow.com/q/26622361
has text: @artm I posted the html at the beginning, it's just a regular dropdown that includes 2 divs and a button
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26571739
has comment: http://stackoverflow.com/comment/41792818
accepted answer: http://stackoverflow.com/a/26589299
has comment: http://stackoverflow.com/comment/41792497
downvote count: 0
answer count: 1
score: 8
favorite count: 0
tagged with: angularjs
upvote count: 8
has comment: http://stackoverflow.com/comment/41792725
has body: I successfully registered my own library into bower: bower register angular-ngkit https://github.com/daveoncode/angular-ngkit-bower.git and I'm able to install it using: bower install angular-ngkit But by using simply: bower install or bower info angular-ngkit I get "No versions available" exception and I don't understand why, since using git tag I can see my latest (and only) release named "0.2" I previously published the library under the name "angular-ngkit" using another git repo and then I unregistered it (using curl -X DELETE repo_url) and re-registered with the new repo url and I also executed the command: bower cache clean ...so why bower is not working as it should? UPDATE: if I define the dependency to my library in bower.json as "angular-ngkit": "*" I'm able to run bower install properly... but it's not acceptable :(
tagged with: bower
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26589299
tagged with: git
type: Question
has title: Bower install: No versions available
tagged with: bower-install
tagged with: javascript

http://stackoverflow.com/a/26601723
has body: You can find the updated code here. replace this with old one. Usage : var jFlip = new Flip("#g1",300,300,{background:"green",cornersTop:true,scale:"fit"}); // here #g1 is a jquery selector (make sure it returns only one). // The structure is Flip(JQselector,width,height,options) then use the jFlip object to flip slides/pages jFlip.flipMe() // for next slide jFlip.flipMe(true) // for prev slide for binding a function to slide change event you can use $("#g1").bind("flip.jflip",function(event,index,total){ $("#l1").html("Image "+(index+1)+" of "+total); }); // here the selector is same as the one passed inside jFlip function. Try this and let me know the feedback.
type: Answer
answers question: http://stackoverflow.com/q/26581159
score: 0

http://stackoverflow.com/a/26537056
answers question: http://stackoverflow.com/q/26537000
type: AcceptedAnswer
downvote count: 1
has body: The inner function is scoped to the IIFE. Of course you can't access it from the global scope. If you want to, you'll have to set window.Test = Test inside the IIFE. You should also remove javascript: from the inline event, as it's already running as JS.
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26537000
score: 3

tail-recursion
tags question: http://stackoverflow.com/q/26567046
tag name: tail-recursion
type: Tag

http://stackoverflow.com/a/26639094
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26639031
has body: Here, var my_string = "\"ololo1\", \"ololo2\"" var availableTags = [ my_string ]; availableTags is an array of one element "ololo1", "ololo2". It is not an array of the elements "ololo1" and "ololo2", that you might have thought. To use my_string as a source, split it to transform it into an array of tags. I'd also remove the double quotes. var my_string = "ololo1,ololo2"; var availableTags = my_string.split(',');
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26639031

http://stackoverflow.com/comment/41683027
score: 2
comment on: http://stackoverflow.com/a/26527907
has text: @CasimiretHippolyte: Great ideas. It's nice to see how much thought one can put into such a (at first glance) trivial problem.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26643859
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41894054
accepted answer of: http://stackoverflow.com/q/26643612
upvote count: 3
answers question: http://stackoverflow.com/q/26643612
type: Answer
downvote count: 0
has body: You can use a factory (or value) to provide an simple way to share an object among controllers. Here is an example: myApp.factory('DataHolder', function (){ return { myData: true, otherData: 'haha' }; }); // Or, with value myApp.value('DataHolder', { myData: true, otherData: 'haha' }); And then, in your controllers: myApp.controller('CtrlA', function ($scope, DataHolder){ $scope.sharedData = DataHolder; }); myApp.controller('CtrlB', function ($scope, DataHolder){ $scope.sharedAsWell = DataHolder; }); And, inside your views: &lt;div ng-controller="CtrlA"&gt; The other data is: {{sharedData.otherData}}, and mine is: {{sharedData.myData}} &lt;/div&gt; &lt;div ng-controller="CtrlB"&gt; &lt;input type="text" ng-model="sharedAsWell.otherData"/&gt; &lt;/div&gt; Thanks to @ippi, he implemented it: Plnkr implementation
score: 3
has comment: http://stackoverflow.com/comment/54971264
has comment: http://stackoverflow.com/comment/41894170
has comment: http://stackoverflow.com/comment/41896300

http://stackoverflow.com/q/26591083
downvote count: 0
accepted answer: http://stackoverflow.com/a/41799464
favorite count: 0
has body: Hy, i`m trying for quite a while now to animate a transition between scenes in THREE js, i have managed to clear the scene. and recreate the next one, however the transition towards each other is really painstacking, i have created 2 functions: function zoomInTransition() { var zInMin = 15; for (camera.fov; camera.fov &gt; zInMin; camera.fov-=3) { camera.updateProjectionMatrix(); } } function zoomOutTransition () { var zOutMax = 70; for (camera.fov; camera.fov &lt; zOutMax; camera.fov+=3) { camera.updateProjectionMatrix(); } } I run each function like so : function buttonReaction(){ for (var i in objects) { switch(objects[i].name) { case "door_1": zoomInTransition(); Start(room2); zoomOutTransition() break; case "door_2": zoomInTransition(); Start(room1); zoomOutTransition() break; default: console.log("default"); }; }; } However i never manage to make the zoom tranzition smooth, it iterates too fast for the projection matrix updates to display. I`m running out of ideas... Any suggestions would be appreciated. Thank you.
upvote count: 2
tagged with: three.js
score: 2
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: Smooth click zoom I/O for THREE JS on transitions
has answer: http://stackoverflow.com/a/41799464
answer count: 1

http://stackoverflow.com/comment/53742927
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28748160
has text: @DanielCoffman could you use bind? http://stackoverflow.com/questions/6065169/requestanimationframe-with-this-keyword
type: AnswerComment

http://stackoverflow.com/q/26646597
upvote count: 6
tagged with: datatable
score: 6
accepted answer: http://stackoverflow.com/a/26646936
type: AnsweredQuestion
has title: Get column and row name when click on cell in datatables
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26646936
has body: I use datatables (http://datatables.net/) for creating table with JSON and I have a code: DAN Aktivnost Vreme Rashodi Prihodi Beleske DAN Aktivnost Vreme Rashodi Prihodi Beleske How I can get name of row and name of column when I click on some cell ? ALso how to get ID of row and ID of column when click on some cell in table?

http://stackoverflow.com/a/26553817
type: AcceptedAnswer
downvote count: 0
has body: If you're returning an array of instances using res.json, it will run toJSON on each instance in the array. So: User.find().exec(function(err, users) { if (err) {return res.negotiate(err);} return res.json(users); }); will return an array of users with toJSON called on each one.
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26543967
score: 2
accepted answer of: http://stackoverflow.com/q/26543967
has comment: http://stackoverflow.com/comment/41754077

http://stackoverflow.com/comment/41945717
type: Comment
type: QuestionComment
has text: can you post the excepted result ?
comment on: http://stackoverflow.com/q/26672874
score: 0

http://stackoverflow.com/comment/41756816
comment on: http://stackoverflow.com/q/26568853
has text: It is not a good practice to have javascript added by PHP. What is the reason you want that? This way the client side code is not separated from server side as it should..I believe javascript is interpreted and then being run. After that asynchronously you call PHP that adds more javascript but I don't think you can invoke this javascript, as a promise - Either way a very bad practice.. Try preloading the scripts you want statically or using dependency injection or something like require.js. Use php for returning json's or minimal templates ..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26605396
type: Question
tagged with: javascript
tagged with: dojox.charting
accepted answer: http://stackoverflow.com/a/26693863
score: 0
answer count: 1
has body: I am creating a bar chart using dojocharts and version is 1.9 .Here i add a Indicator to a bar chart. I want the add text with html tag(like break tag) and also tooltip on the Indicator. I have added a labelFunc to return the HTML I want, but it only shows as plain text. here html tag and tooltip for that indicators not working.Any one suggest me is it possible for add tooltip and html tag on indicator of dojocharts. Below is my code Chart.addPlot("indicator", { type: "Indicator", vertical:false, values:30, offset: { y: -2, x: -50 }, lineStroke: { color: "green",style: "line" }, labels: true, htmlLabels: true, // start:true, // labelStyle:"inside", //maxBarSize: 35, fontColor:"red", // precision: 1, labelFunc: max, stroke: {color:"rgb(204, 204, 204)",height:40,width: 25}, outline: "purple", fill: "#666" });
has title: How to add tooltip for indicators plot using dojocharts
tagged with: dojo
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26693863

http://stackoverflow.com/q/26606117
has comment: http://stackoverflow.com/comment/41844545
has title: AngularJS Not able to pass model data to server model appears as empty string
type: Question
tagged with: angular-ngmodel
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41827354
answer count: 1
linked to: http://stackoverflow.com/q/11442632
tagged with: angularjs
type: UnansweredQuestion
has body: I'm trying to send some simple data to the server. I take the originally received server data used to create dynamic forms, quickly clean up unnecessary keys using delete formData['not_needed'], and then I wanted to add the model that has been created before posting to the server, but when I check the data objects model key that I'm trying to add it is always an empty string. I can either send one or the other, but can't seem to add one object to another as a key-value pair. // Abridged version var formData = $scope.responseData; // original server data to build forms delete formData['config_data']; // remove unnecessary keys formData.model = $scope.formModel; // add model key $http.post('/restful/api', formData).then(function(success) {...}, function(error) {...}); The output of passed data from the server looks like: { id: "1", type: "type_of_form", name: "name_of_package", model: "" } // model always empty Is this an issue using $scope? UPDATE Even when I hardcode the outgoing keys: var packageData = { "packageid": $scope.formData.id, // makes it to server "desc": $scope.formData.desc, // also makes it to server "data": $scope.formModel // is just an empty string } But formModel filled from some dumby form data when logged to console and printed out to the screen using a filter { formModel | json } looks like: formModel = { "document_date": "1234", "first_name0": "1", "first_name1": "2", "first_name2": "3", "first_name3": "4" }
has answer: http://stackoverflow.com/a/26617063

http://stackoverflow.com/q/26660964
has title: Populate rows with HTML
accepted answer: http://stackoverflow.com/a/26661017
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26661017
type: Question
tagged with: javascript
has body: I have a blank table on a screen: Date Account Third Party Amount In my controller, I build up some HTML rows for this table, using text: foreach(var i in transactions) { tblCode += " "; tblCode += string.Format( " View "); tblCode += string.Format(" {0} ", i.Date.ToString("dd.MMM.yyyy")); tblCode += string.Format(" {0} ", i.EntityEventTypeId == (int) Constants.EntityEventTypes.Payment ? i.DestinationEntityFull : i.SourceEntityFull); tblCode += string.Format(" {0} ", i.EntityEventTypeId == (int) Constants.EntityEventTypes.Payment ? i.SourceEntityFull : i.DestinationEntityFull); tblCode += string.Format(" {0} ", i.Amount.ToString("C2")); tblCode += " "; } I then pass this back to my javascript in a JSON Result, and using Chrome, I can see the HTML code in the returned object. I then attempt to add that HTML code to my table. if (result.Success == 'true') { $.unblockUI(); $('#TransactionTable').innerHTML = result.TableCode; $('#transactions').modal('show'); } else { $.unblockUI(); alert("error"); } But it doesn't seem to add the code at all. The table has nothing in it once displayed. What am I doing incorrectly?

http://stackoverflow.com/a/26652735
has comment: http://stackoverflow.com/comment/41908983
has comment: http://stackoverflow.com/comment/41909418
has comment: http://stackoverflow.com/comment/41909507
has comment: http://stackoverflow.com/comment/41911601
has comment: http://stackoverflow.com/comment/41908838
has comment: http://stackoverflow.com/comment/41914545
upvote count: 5
has comment: http://stackoverflow.com/comment/41913345
has comment: http://stackoverflow.com/comment/41912976
has body: A couple of points: The style object won't have values that are applied via stylesheets; to get those, on a standards-compliant browser you use getComputedStyle. (On older IE, you use the currentStyle property.) You need to parse the value you get, because it's a string. Any time you find yourself repeatedly writing the same thing over and over, consider whether to do it once and remember it in a variable. This does the trick on standards-compliant browsers and should work on older IE as well: function changeFontSize(target) { var demo = document.getElementById("demo"); var computedStyle = window.getComputedStyle ? getComputedStyle(demo) // Standards : demo.currentStyle; // Old IE var fontSize; if (computedStyle) { // This will be true on nearly all browsers fontSize = parseFloat(computedStyle && computedStyle.fontSize); if (target == document.getElementById("button1")) { fontSize += 5; } else if (target == document.getElementById("button2")) { fontSize -= 5; } demo.style.fontSize = fontSize + "px"; } } Change font size Larger Smaller HOW_BIG_OR_SMALL_AM_I
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41910190
accepted answer of: http://stackoverflow.com/q/26652595
answers question: http://stackoverflow.com/q/26652595
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/41908647

http://stackoverflow.com/comment/69809921
type: Comment
type: QuestionComment
has text: I am facing similar issue..did you got the solution for this..? can you help me with that
comment on: http://stackoverflow.com/q/26636960
score: 0

http://stackoverflow.com/q/26561539
tagged with: javascript
tagged with: jquery
has title: resume playing swf object after fade out and fade in
has answer: http://stackoverflow.com/a/26562838
type: UnansweredQuestion
tagged with: fadeout
type: Question
score: 0
has body: I've this swf object in my web page and jQuery functions $(document).ready(function(e) { $("#fadeout").click(function(e) { $('.video-now-playing-div').fadeOut(); }); $("#fadein").click(function(e) { $('.video-now-playing-div').fadeIn(); }); }); that works fine , but after fadeOut() then fadeIn() the video is played from the beginning . Any suggestion to resume ? NOTE I don't want to use opacity:0 or width:0;height:0 to hide the player.
tagged with: flash
answer count: 1

http://stackoverflow.com/q/26580397
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
answer count: 1
has title: Changing Image depending on Twitch channel is live or not
has body: Alright, so basically I want to change an image when a channel goes live. Here is the HTML I am using &lt;img src="img/portfolio/knarf.png" class="img-responsive" class="2twitch2" href="http://www.twitch.tv/NotKnarf" data-tnick="notknarf"&gt; And the JQuery that I made jQuery(document).ready(function ($) { $('.2twitch2').each(function () { var tnick = $(this).data('tnick'); var span = $(this).next(); $.getJSON("https://api.twitch.tv/kraken/streams/" + tnick + ".json?callback=?", function (c) { if (c.stream == null) { var src = $(this).attr("src").replace("live.png", ".png"); $(this).attr("src", src); } else { var src = $(this).attr("src").match(/[^\.]+/) + "live.png"; $(this).attr("src", src); } }); }); }); I am just trying to get it to add live.png on the end. I thought this would work, but I am just getting the same image, like it isn't changing anything when it goes live. Any ideas?
has answer: http://stackoverflow.com/a/26580655
score: 0
has comment: http://stackoverflow.com/comment/41777816
has comment: http://stackoverflow.com/comment/41778028
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26580655

http://stackoverflow.com/q/26538312
has title: Convert Excel file to JSON: design of JSON code check
type: Question
has body: I want to convert the data from an Excel file to a JSON file. However, I'm not sure about the design of my JSON code (i.e. is it organized in a proper way in order to process it easily?) I will use this JSON file with D3.js. This a small part of my Excel file: I'd like to convert this data into a JSON file in order to use it with D3.js. This is what I have so far: So my question is: is this a good design (way) for organizing the data in order to use it with D3.js? This is a sample output: Thanks in advance!
has comment: http://stackoverflow.com/comment/41704237
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26539050
accepted answer: http://stackoverflow.com/a/26539050
tagged with: sql
answer count: 1
favorite count: 0
tagged with: d3.js
tagged with: excel
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1

http://stackoverflow.com/a/26558641
accepted answer of: http://stackoverflow.com/q/26557324
type: Answer
answers question: http://stackoverflow.com/q/26557324
has body: The best practice is to pass the context to the callback function, like your second approach. This allows you to control how a function executes, particularly in asynchronous operations. From dojo documentation: on(something, "click", processEvent); In asynchronous callbacks such as above, the context that the code is executing in has changed. It will no longer refer to the object that originally provided it, but its context will now refer to the enclosing object, the callback. To get around this, you can use hitch() to force the function to retain its original context. The same code done properly will look like: on(something, "click", lang.hitch(this, processEvent)); http://dojotoolkit.org/reference-guide/1.10/dojo/_base/lang.html#dojo-base-lang-hitch
has comment: http://stackoverflow.com/comment/41775882
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41773202
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41841959
type: AnswerComment
has text: @DinuSorin could you elaborate `thisrect` variable in your code? Where are you declaring it?
type: Comment
comment on: http://stackoverflow.com/a/26604625
score: 0

http://stackoverflow.com/comment/41743102
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26558226
type: Comment
has text: Thanks for answering, tried loading the JS file using: $(document).ready(function() but it doesn’t seem to work However, when I tried this: window.onload = function() { } and put my var inside it, it loads and work (it was taken from the link Felix provided)

http://stackoverflow.com/comment/41896908
has text: i changed implementation. check again!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26644627
score: 0

http://stackoverflow.com/comment/41906376
comment on: http://stackoverflow.com/a/26650964
score: 0
type: AnswerComment
has text: the class is successfully added, but looking at the console of GoogleChrome I noticed that the property display: none/block is not accepted
type: Comment

http://stackoverflow.com/comment/41945920
has text: so you want to get the next element only if it has the image with data-name=test2?
score: 0
comment on: http://stackoverflow.com/q/26672874
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41871564
has text: DOM nodes contain circular references, so it's not possible to just convert it. You have build a new object with the information you want.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26631639

http://stackoverflow.com/q/26515247
has body: I have this Button click code that is responsible to add Dynamic data $("#AddSec").click(function() { $(" ", { "class": "wrapper" }) .append($('', { "class": "AddCol", id: "AddCol" + i }).html('(+)col')) .append($('', { "class": "RemCol", id: "RemCol" + i }).html('(-)col')) .appendTo("#data"); $(" ", { "class": "SecStyle", id: "Section" + i }) .append($(" ").attr('class', 'well droppedFields ui-sortable Resizable')) .appendTo("#data"); i++; }); Following is the Output for this code (+)col (-)col (+)col (-)col Following is the html layout for above output (+)col (-)col are (+)col (-)col respectively with different ids everytime Now i have to handle the click event for every (+)col , independently for each time the dynamic section added can any one help to keep me close to this
has comment: http://stackoverflow.com/comment/41660568
has answer: http://stackoverflow.com/a/26515482
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26515399
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26515405
tagged with: css
has answer: http://stackoverflow.com/a/26515405
has answer: http://stackoverflow.com/a/26515399
type: AnsweredQuestion
score: 1
has title: Bind independent events to the dynamic added elements
upvote count: 1
type: Question

http://stackoverflow.com/a/26587193
has comment: http://stackoverflow.com/comment/41790636
upvote count: 1
answers question: http://stackoverflow.com/q/26587008
type: AcceptedAnswer
has body: in your code store.loadData returning undefined before response come from backend. so use this code: var app = angular.module('TestApp', []); app.controller('TestController', TestController); app.service('DataService', DataService); function TestController(DataService) { var vm = this; DataService.loadData().then(function(data) { vm.personalInfo = data.data }) .catch(function(err) { console.log(err) }) } function DataService($http) { var store = this; store.personInfo = []; store.loadData = function() { return $http.get('data.json') }; }
has comment: http://stackoverflow.com/comment/41790399
accepted answer of: http://stackoverflow.com/q/26587008
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41918516
type: AnswerComment
comment on: http://stackoverflow.com/a/26655231
score: 0
type: Comment
has text: Well, this will work until the OP tries this in a situation where there are quotes in the string that should be passed to the JavaScript side. (Probably not a huge risk for a contract number but could be a problem, generally.) What the OP wants to do is quite doable by passing the string as an argument. I do it all the time.

http://stackoverflow.com/comment/41861503
score: 0
has text: Then add a line in the datalist for each heroes. If you have your list in Javascript, you can fill the datalist with a simple javascript code.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26626041

http://stackoverflow.com/q/26658053
answer count: 0
has title: Unable to transform JSON response using Script Mediator on server
type: Question
tagged with: wso2
has body: All, I'm working on converting a JSON response to my desired format using script mediator This script mediator works fine in the local with dummy data , but when I move the js to the server, its unable to parse the XML output as it did in the local PC. Please find the details below. XML output from end system : <xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <getMyClsScheduleResponse xmlns="http://<HostName>/schemas/getMyClsScheduleResponse.v1" xsi:schemaLocation="http://mais.he.umich.edu/schemas/getMyClsScheduleResponse.v1 http://<HostName>/PSIGW/PSCOnnection/getMyClsScheduleResponse.v1.xsd"> 10757 AAS 510 ..... .... ... Lyke-Whiting,Lynn Lyke-Whiting Lynn LYNNW Secondary Instructor </getMyClsScheduleResponse> </soapenv:Body> </soapenv:Envelope> Json Response : "getMyClsScheduleResponse": { "@schemaLocation": "http://<HostName>/schemas/getMyClsScheduleResponse.v1 http://<HostName>/PSIGW/PSConnection/getMyClsScheduleResponse.v1.xsd", "RegisteredClass": [ { "ClassNumber": "10757", "SubjectCode": "AAS", "CatalogNumber": "510", "SectionNumber": "001", "SectionType": "IND", "SectionTypeDescr": "Independent Study", "SessionDescr": "Regular", "CourseDescr": "Supervised Research", "ClassTopic": "", "CreditHours": "1 - 6", "LMSURL": "", "Meeting": { "MeetingNumber": "1", "Days": "", "Times": "", "StartDate": "09/02/2014", "EndDate": "12/10/2014", "Location": "TBA", "TopicDescr": "" } }, { "ClassNumber": "30573", "SubjectCode": "ASIANLAN", "CatalogNumber": "100", "SectionNumber": "001", "SectionType": "REC", "SectionTypeDescr": "Recitation", "SessionDescr": "Regular", "CourseDescr": "Acc Elem Chinese", "ClassTopic": "", "CreditHours": "3", "LMSURL": "", "Meeting": { "MeetingNumber": "1", "Days": "MoWeFr", "Times": "9:00AM - 10:00AM", "Start…
upvote count: 2
tagged with: arrays
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
score: 2
tagged with: wso2-esb
downvote count: 0

http://stackoverflow.com/q/26526045
tagged with: webview
has body: First off, let me tell you that I've used webviews in Cocoa like 100 times. However, I have no clue as to what goes wrong... Here's the JS part: window.objc.log_("Selected Element!"); And here's the Objective-C part: - (void)log:(NSString*)msg { NSLog(@"JS: %@",msg); } And here's the output: JS: (null) What's going on? P.S. The WebView's windowScriptObject has been correctly set and isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript: have been defined. (The function wouldn't be called at all anyway, if they weren't set...)
upvote count: 1
tagged with: xcode6
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: 1
has title: JavaScript not passing arguments το WindowScriptObject?
favorite count: 0
type: Question
tagged with: objective-c
tagged with: cocoa

http://stackoverflow.com/q/26574968
has comment: http://stackoverflow.com/comment/41767767
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41767684
has comment: http://stackoverflow.com/comment/41767865
has comment: http://stackoverflow.com/comment/41767596
has comment: http://stackoverflow.com/comment/41767620
has title: basic javascript getElementById clarification
has comment: http://stackoverflow.com/comment/41767937
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41767744
has body: I had to do a simple calculator using HTML and JS and since I've never programmed on JS I have a question in order to get the logic right. Here is the code: I have a function which has to write on the screen of my calculator; function writeToScreen(a) { var elem = document.getElementById('screen'); switch (a.value) { case '+': { if (firstOperation) { lastOperation = '+'; firstNumber = elem.value; elem.value = ""; firstOperation = 0; } else { lastOperation = '+'; firstNumber += elem.value; } } break; case '-': { if (firstOperation) { lastOperation = '-'; firstNumber = elem.value; elem.value = ""; firstOperation = 0; } else { lastOperation = '-'; firstNumber -= elem.value; } } break; case '*': { if (firstOperation) { lastOperation = '*'; firstNumber = elem.value; elem.value = ""; firstOperation = 0; } else { lastOperation = '*'; firstNumber *= elem.value; } } break; case '/': { if (firstOperation) { lastOperation = '/'; firstNumber = elem.value; elem.value = ""; firstOperation = 0; } else { lastOperation = '/'; firstNumber /= elem.value; } } break; case '=': { if (firstOperation) { } else { switch (lastOperation) { case '+': { elem.value = (firstNumber + elem.value); } break; case '-': { elem.value = firstNumber - elem.value; } break; case '/': { elem.value = firstNumber / elem.value; } break; case '*': { elem.value = firstNumber * elem.value; } break; default: { } break; } firstOperation = 1; lastOperation = ''; } } break; case 'C': { elem.value = ""; } break; case '1': { elem.value += a.value; } break; case '2': { elem.value += a.value; } break; case '3': { elem.value += a.value; } break; case '4': { elem.value += a.value; } break; case '5': { elem.value += a.value; } break; case '6': { elem.value += a.value; } break; case '7': { elem.value += a.value; } break; case '8': { elem.value += a.value; } break; case '9': { elem.value += a.value; } break; case '0': { elem.value += a.value; } break; default: { } break; } } Here is the screen of my calculator: and here is one…
has answer: http://stackoverflow.com/a/26575151
has comment: http://stackoverflow.com/comment/41767727
has comment: http://stackoverflow.com/comment/41767961
type: Question
has answer: http://stackoverflow.com/a/26575323
tagged with: javascript
has comment: http://stackoverflow.com/comment/41767609

http://stackoverflow.com/a/26619711
answers question: http://stackoverflow.com/q/26618913
downvote count: 0
has body: RegExp("^\/r\/\d+\/$").test('/r/124/') === false but if you use the regex literal writing: /^\/r\/\d+\/$/.test('/r/124/') === true While the forward slashes need to be escaped in the literal version, they don't need to be in the object version. However, backward slashes need to be escaped in the object version (not in the literal version). So you could also have written: RegExp("^/r/\\d+/$").test('/r/124/') === true The issue is that you have used a syntax that works only with the literal version.
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/a/26593897
score: 0
type: Answer
has body: By default S3 will set the mime type of binary/octet-stream. You can override that by setting your Content-Type of chose on upload. http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
answers question: http://stackoverflow.com/q/26581661

http://stackoverflow.com/q/26595867
has comment: http://stackoverflow.com/comment/41806451
has comment: http://stackoverflow.com/comment/41806374
accepted answer: http://stackoverflow.com/a/26596256
has comment: http://stackoverflow.com/comment/41806364
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41806601
has comment: http://stackoverflow.com/comment/41806731
upvote count: 1
type: Question
has title: Javascript - Detecting Refresh - onload AND onunload - Could you use them both to detect refresh?
has comment: http://stackoverflow.com/comment/41806544
has comment: http://stackoverflow.com/comment/41806309
tagged with: javascript
has answer: http://stackoverflow.com/a/26596256
answer count: 1
downvote count: 0
score: 1
tagged with: page-refresh
has body: Is there any way to detect a refresh in Javascript? I look some things up on internet. Very complicated things like session cookies ClientX/ClientY. Found nothing but a big complicated mess... Then I thought something, with onload, the code is always executed if the page loads. So it also will be executed on a reload But then, the code you want to be executed only when the page reloads, not when it just loads. When you use onunload then the code inside the onunload will execute when closing window, backspace and refresh. onload loading a page refresh other?? onunload closing browser refresh backspace As you can see, when I use onload, it will load the page etc. And with onunload it will do things when closing browser refresh etc. Is it possible, to only do things with the refresh when both of the events (onload and onunload) are triggered? PS: I might be totally wrong, but I just had this idea, does/could it work?
favorite count: 0

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/26592393
tags question: http://stackoverflow.com/q/26664848
tags question: http://stackoverflow.com/q/26593758
tags question: http://stackoverflow.com/q/26668165
tags question: http://stackoverflow.com/q/26599330
tags question: http://stackoverflow.com/q/26632191
tags question: http://stackoverflow.com/q/26641240
tags question: http://stackoverflow.com/q/26597817
tag name: ruby-on-rails-4

http://stackoverflow.com/comment/136730356
comment on: http://stackoverflow.com/a/26554761
score: 0
type: Comment
has text: I could only rethrow that error when replacing "oh nose" with "error" and then that only worked on Chrome... I wish we had any kind of error handling standard...
type: AnswerComment

http://stackoverflow.com/comment/41770040
comment on: http://stackoverflow.com/q/26539894
type: QuestionComment
has text: The reason I need an ID for all the image files is because they're checker-pieces on the board that I need to move around. I was thinking a draggable/drobbable function would do the trick and therefore I need to be able to select each image file (piece) separately
score: 0
type: Comment

http://stackoverflow.com/comment/41779624
type: QuestionComment
has text: Honestly, the plain JavaScript I took from another site. It works, that's all that matters I guess :3
comment on: http://stackoverflow.com/q/26581561
score: 0
type: Comment

http://stackoverflow.com/comment/41753109
comment on: http://stackoverflow.com/a/26566990
type: AnswerComment
has text: Can someone please explain why normalisation is done in angular in the first place. What is the need of it ?
score: 0
type: Comment

http://stackoverflow.com/q/26614457
answer count: 2
has title: Find what functionality is bound to a child through event delegation
has body: if I delegate an event to an ancestor with something like $("#container").on("click", ".distant_child", function(){ //... } when I look in the developer tools in Chrome to see what click events are bound, I only see #container's events. Is there any way to see what particular function is bound to a specific element?
tagged with: event-handling
tagged with: jquery
has answer: http://stackoverflow.com/a/26614614
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41840488
has answer: http://stackoverflow.com/a/26615010
tagged with: event-delegation
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/26540554
has comment: http://stackoverflow.com/comment/41706174
downvote count: 2
has title: Method expression is not of Function type
has comment: http://stackoverflow.com/comment/41705986
has comment: http://stackoverflow.com/comment/41706221
type: Question
has comment: http://stackoverflow.com/comment/41706468
possible better answer: http://stackoverflow.com/a/47711247
has comment: http://stackoverflow.com/comment/41706325
tagged with: jslint
has answer: http://stackoverflow.com/a/47711247
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26540822
has comment: http://stackoverflow.com/comment/41706283
upvote count: 27
answer count: 3
tagged with: phpstorm
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41706298
has comment: http://stackoverflow.com/comment/41706378
has answer: http://stackoverflow.com/a/26540822
score: 25
has answer: http://stackoverflow.com/a/64327621
has body: I have the following JavaScript file: /*global $ */ function foo() { 'use strict'; var $tr = $('table tr'), $td = $tr.children('td'); $td.html('Hello World'); } In PHPStorm, children gets underlined with a weak warning. Mousing over it reveals this message: Method expression is not of Function type This file is in the same directory as jquery.min.js (v. 1.11.0, if that matters). How can I fix this? Note that the above example is a minimalist example sufficient to reproduce the problem; it's not my actual code, but it will product the same result.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41706136

http://stackoverflow.com/comment/41743930
has text: @gaitat do you think issue can dipend by geometry0?
comment on: http://stackoverflow.com/q/26551366
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41895843
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26644739
type: Comment
has text: Very cool idea, but doesn't work right. It also affects the rest of the post data and throws it into the table. It also does not add , only a whole lot of 's after each key & value. Any suggestions?

http://stackoverflow.com/comment/41753839
has text: Good. Feel free to get back if there are other issues with progress bar.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26567267

http://stackoverflow.com/q/26596310
tagged with: pug
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: express
favorite count: 0
has answer: http://stackoverflow.com/a/26616764
has body: How do i deal with this issue? My jade file is: extends layout block content h1. User List ul each user, i in userlist li a(href="mailto:#{user.email}")= user.username i get the following error: TypeError: C:\node\nodetest1\views\userlist.jade:7 5| User List 6| ul &gt; 7| each user, i in userlist 8| li 9| a(href="mailto:#{user.email}")= user.username Cannot read property 'length' of undefined at eval (eval at &lt;anonymous&gt; (C:\node\nodetest1\node_modules\jade\lib\jade.js:174:8), &lt;anonymous&gt;:56:31) at eval (eval at &lt;anonymous&gt; (C:\node\nodetest1\node_modules\jade\lib\jade.js:174:8), &lt;anonymous&gt;:99:4) at eval (eval at &lt;anonymous&gt; (C:\node\nodetest1\node_modules\jade\lib\jade.js:174:8), &lt;anonymous&gt;:112:22) at res (C:\node\nodetest1\node_modules\jade\lib\jade.js:175:38) at Object.exports.render (C:\node\nodetest1\node_modules\jade\lib\jade.js:300:10) at Object.exports.renderFile (C:\node\nodetest1\node_modules\jade\lib\jade.js:336:18) at View.exports.renderFile [as engine] (C:\node\nodetest1\node_modules\jade\lib\jade.js:321:21) at View.render (C:\node\nodetest1\node_modules\express\lib\view.js:76:8) at Function.app.render (C:\node\nodetest1\node_modules\express\lib\application.js:527:10) at ServerResponse.res.render (C:\node\nodetest1\node_modules\express\lib\response.js:900:7)
tagged with: node.js
type: UnansweredQuestion
type: Question
score: 0
has title: Jade unexpected length error

http://stackoverflow.com/q/26616525
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41844408
has title: Javascript worker receive message is never being called
tagged with: devextreme
has comment: http://stackoverflow.com/comment/41844852
has comment: http://stackoverflow.com/comment/41845124
type: Question
has body: function receiveMessage(e) { alert("received message"); if (e.data.success === "log") { console.log(e.data.result); return; } if (e.data.finished) { workerCount--; if (workerCount) { if (resultArray.length == 0) { DecodeWorker.postMessage({ ImageData: ctx.getImageData(0, 0, Canvas.width, Canvas.height).data, Width: Canvas.width, Height: Canvas.height, cmd: "flip", Decode: "Code39"}); } else { workerCount--; } } } if (e.data.success) { var tempArray = e.data.result; for (var i = 0; i &lt; tempArray.length; i++) { if (resultArray.indexOf(tempArray[i]) == -1) { resultArray.push(tempArray[i]); } } alert(resultArray[0]); } else { if (resultArray.length === 0 &amp;&amp; workerCount === 0) { alert("Decoding failed."); } } } var DecodeWorker = new Worker("js/BarcodeScanner.js"); DecodeWorker.onmessage = receiveMessage; // Called when a photo is successfully retrieved // function onPhotoDataSuccess(imageData) { // Uncomment to view the base64 encoded image data // console.log(imageData); smallPicture = document.getElementById('smallImage'); // Get image handle // // Unhide image elements // smallPicture.style.display = 'block'; // Show the captured photo // The inline CSS rules are used to resize the image // smallPicture.onload = function () { ctx.drawImage(smallPicture, 0, 0, Canvas.width, Canvas.height); resultArray = []; workerCount = 2; alert("Prepost"); barcodeNum(""); alert("Post"); DecodeWorker.postMessage({ ImageData: ctx.getImageData(0, 0, Canvas.width, Canvas.height).data, Width: Canvas.width, Height: Canvas.height, cmd: "normal", Decode: "Code39" }); }; smallPicture.src = "data:image/jpeg;base64," + imageData; } When using the postMessage function on my decodeWorker the receiveMessage function is never being called, and I can't figure out what exactly it is that I'm doing wrong, It seems that worst case scenario I would atleast see teh 'received message' alert that I set up, but even that doesn't occur.
has comment: http://stackoverflow.com/comment/41844713
tagged with: javascript
tagged with: worker
score: 0
has comment: http://stackoverflow.com/comment/41845210
tagged with: cordova
answer count: 0

http://stackoverflow.com/q/26612628
has title: Two jQuery/JavaScript functions not being called
has comment: http://stackoverflow.com/comment/41837069
possible better answer: http://stackoverflow.com/a/26612806
has answer: http://stackoverflow.com/a/26612806
type: Question
type: AnsweredQuestion
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/26612994
answer count: 2
linked to: http://stackoverflow.com/q/4667979
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a working MVC application which consist of two listboxes and buttons to various things to the listbozes. All of my jQuery functions in the following script execute correctly except for MoveUp and MoveDown which are never called (set breakpoints). The F12 Console is clean and there are no JavaScript errors. The two buttons in question are: Up Down The jQuery code is as follows. Does the MoveUp and MoveDown functions need to be inside the "global" function? $(function () { $("#add").click(function () { $("#listBoxAvail > option:selected").each(function () { $(this).remove(); val = $(this).val(); temp = $(this); temp.val('L' + val) $(temp).appendTo("#listBoxSel"); }); }); $("#remove").click(function () { $("#listBoxSel > option:selected").each(function () { $(this).remove().appendTo("#listBoxAvail"); }); }); $("#remove-all").on("click", function(event) { $('#listBoxSel option').prop('selected', true); $("#remove").trigger("click"); }); $("#select-all").on("click", function(event) { $('#listBoxAvail option').prop('selected', true); $("#add").trigger("click"); }); }); function MoveDown() { var selectedOption = $('#listBoxSel > option[selected]'); var nextOption = $('#lstBoxSel > option[selected]').next("option"); if ($(nextOption).text() != "") { $(selectedOption).remove(); $(nextOption).after($(selectedOption)); } } function MoveUp() { var selectedOption = $('#lstBoxSel > option[selected]'); var prevOption = $('#lstBoxSel > option[selected]').prev("option"); if ($(prevOption).text() != "") { $(selectedOption).remove(); $(prevOption).before($(selectedOption)); }
favorite count: 0
has comment: http://stackoverflow.com/comment/41837012
score: 2
has answer: http://stackoverflow.com/a/26612994
upvote count: 2

http://stackoverflow.com/q/26628612
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41866038
has body: This script is executed here: jerusalempetshop.com The purpose of the script is to replace the Opencart conventional notification with a fadeIn and out notification popup. It has other parts functioning in a similar way with: $('.success').delay(5000).fadeOut('slow'); The code is: function addToCart(product_id, quantity) { quantity = typeof(quantity) != 'undefined' ? quantity : 1; $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: 'product_id=' + product_id + '&amp;quantity=' + quantity, dataType: 'json', success: function(json) { $('.success, .warning, .attention, .information, .error').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#notification').html('&lt;div class="success" style="display: none;"&gt;' + json['success'] + '&lt;img src="catalog/view/theme/default/image/close.png" alt="" class="close" /&gt;&lt;/div&gt;'); $('.success').fadeIn('slow'); setTimeout(function() { $('.success').slideDown(500); }, 5000); setTimeout(slideOut, 5000); $('#cart-total').html(json['total']); $('#minicart .heading').fadeTo(350, 0.1); $('#minicart .heading').fadeTo(350, 1); $('#minicart .heading').fadeTo(350, 0.1); $('#minicart .heading').fadeTo(350, 1); $('#minicart .heading').fadeTo(350, 0.1); $('#minicart .heading').fadeTo(350, 1); $('.success').delay(5000).fadeOut('slow'); } } }); } function slideOut() { $('.success').slideDown(500); } The fadeOut part referred by: $('.success').delay(5000).fadeOut('slow'); setTimeout(function() { $('.success').slideDown(500); }, 5000); setTimeout(slideOut, 5000); Is not executed by any of the lines. Any idea why? OR How to fixit. Thanx. The_Script
has comment: http://stackoverflow.com/comment/41868680
has comment: http://stackoverflow.com/comment/41868434
has comment: http://stackoverflow.com/comment/41870751
answer count: 0
has comment: http://stackoverflow.com/comment/41866128
type: UnansweredQuestion
tagged with: fadeout
has comment: http://stackoverflow.com/comment/41866184
type: Question
has title: fadeOut or setTimeout not executing
has comment: http://stackoverflow.com/comment/41868460
has comment: http://stackoverflow.com/comment/41869511
tagged with: settimeout
tagged with: delay

http://stackoverflow.com/comment/41924390
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26660937
has text: Many sites do it, sure, i still consider it awful as an end user. Just like squeeze pages. They're incredibly annoying, but they're also very effective. But, that of course is not the point of my comment at all. Point is, people will use their downvotes as they see fit, and there's little to nothing that the avg user can do about it.

http://stackoverflow.com/comment/41690191
score: 0
comment on: http://stackoverflow.com/q/26531143
type: Comment
type: QuestionComment
has text: That was going to be my next question. :) `console.log(req.session)` to see whether or not it has the value you set (within express-session).

http://stackoverflow.com/a/26595332
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: No need for two loops if you use a little ingenuity: for (var i = 0; i &lt;= 9; i++) { var thisName = "k_" + (Math.floor(i/3)+1) + "_" + (i+1); var thisValue = ""; localStorage.setItem(thisName, thisValue); }
accepted answer of: http://stackoverflow.com/q/26595188
type: Answer
answers question: http://stackoverflow.com/q/26595188

http://stackoverflow.com/comment/41861645
type: QuestionComment
comment on: http://stackoverflow.com/q/26625979
score: 1
has text: The problem is, that you use 1 variable I, and you call it 3 times, that's why you'll get 60, 61, and 62 as result.
type: Comment

http://stackoverflow.com/comment/41708616
type: QuestionComment
comment on: http://stackoverflow.com/q/26542207
score: 0
has text: please go through some js and jquery example..before you implement it
type: Comment

http://stackoverflow.com/comment/41862476
has text: is there any option(s)?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26626418
type: QuestionComment

http://stackoverflow.com/q/26611809
has comment: http://stackoverflow.com/comment/41859335
has comment: http://stackoverflow.com/comment/41845672
downvote count: 0
tagged with: google-custom-search
score: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41869641
tagged with: javascript
has body: I am trying to create a custom search for a website. I currently work as a web dev maintaining several sites. It was recently brought to my attention that there was a problem on the search page not generating results properly. I looked into it and found out that the person who originally created the site copied it from an existing site, so the google search string (they call it cx in the google docs) was pointing to the wrong one (the olde site). So I went to google and created a new Custom Search Engine and just replaced the old cx value. All the code Is the same except for this. I am using the JavaScript provide to you by google and not the API directly. The JavaScript generates an iframe in a predetermined div and embeds the search results in said Iframe. The problem is that google is sending a X-frame-options same origins response. I checked other sites and the only difference that these sites have is the CX stirng. All of their search functionality works just fine. How do I fix this so the response is different? The code as provided by Google: &lt;script&gt; (function() { var cx = '011369833985782852522:6v8rougwxxa'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();
has comment: http://stackoverflow.com/comment/41840052
has answer: http://stackoverflow.com/a/31326902
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41859144
favorite count: 0
has title: Google CSE X-frame-options
has answer: http://stackoverflow.com/a/28995345
type: UnansweredQuestion

http://stackoverflow.com/q/26647720
has answer: http://stackoverflow.com/a/26647812
has answer: http://stackoverflow.com/a/48897008
possible better answer: http://stackoverflow.com/a/26647802
has comment: http://stackoverflow.com/comment/41900323
favorite count: 0
has answer: http://stackoverflow.com/a/26647802
has body: How to return from the inner callback, in the below scenario, a json data is being return, when i try to do console.log it print the [Function] instead of json value exports.tests = function(tagName, out) { model.findbyTag(tagName, function(data) { var json = { "name" : 'java', "data" : "SomeData" } return json; }); } console.log(this.tests) it output [Function] What wrong i'm doing so that when this method execute it should return the json data
has comment: http://stackoverflow.com/comment/41900276
has title: How to return data from the callback nodejs
has comment: http://stackoverflow.com/comment/41900351
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/41900293
accepted answer: http://stackoverflow.com/a/26647812
tagged with: javascript
has comment: http://stackoverflow.com/comment/41900214
answer count: 3
upvote count: 1

http://stackoverflow.com/comment/41690897
score: 0
comment on: http://stackoverflow.com/a/26531829
type: Comment
type: AnswerComment
has text: the result is undefined, it'll be usefull if i post the complete function?

http://stackoverflow.com/comment/41876186
comment on: http://stackoverflow.com/a/26626841
type: AnswerComment
has text: Ok, I should rephrase: There is probably no existing solution for this. Your solution would probably work, but writing such a program could be really hard to implement correctly. Though, I agree, it is possible. When it comes to JSCheck, it is something like a sophisticated way to create random parameters for functions. It is not _that_ powerful.
score: 0
type: Comment

http://stackoverflow.com/comment/41762808
has text: @jacquesca: You can use any of dozens of server-side environments. PHP is a common option, as are JavaScript (via NodeJS, SilkJS, DecafJS), the various .Net languages (C#, VB, JScript -- that last being very JavaScript-like), Perl, Python, Java...
comment on: http://stackoverflow.com/a/26572334
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41846774
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26617653
has text: @Zack you are correct. That is what I was trying to convey (and failing miserably at apparently).
score: 0

http://stackoverflow.com/comment/41911139
comment on: http://stackoverflow.com/a/26654095
type: Comment
has text: although it copies the element, as I can see that is not a deep copy, its more reference.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26657719
tagged with: angularjs
type: Question
upvote count: 2
tagged with: angularjs-controller
answer count: 1
tagged with: angularjs-directive
has body: I am trying to call a Function in ng-init i my html file. That function makes a API call and gives the data. I assigned that data to a scope variable and pass that scope variable to directive. Controller is hitting first. But before APIi call completes directive got hitted. So the scope variable which i am passing to controller is as undefined. App.directive('foldertree', function () { return { restrict: 'A', scope: { 'inputfromapicall': '=', 'fileName': "=" }, link: function (scope, element, attrs, ngModelCtrl) { return $timeout(function() { $('#divid').fileTree({ root: scope.inputfromapicall, //undefined script: '/project/current/source/data/jqueryFileTree.jsp', expandSpeed: 1, collapseSpeed: 1, multiFolder: false }, function (file) { scope.fileName = file; scope.$apply(); }); }); } }; }); Above is my directive code Sorry for posting the vague question.Hope some one help me with the fix.
tagged with: javascript
has answer: http://stackoverflow.com/a/26731420
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Angularjs - Call Directive after ng-init function completes
has comment: http://stackoverflow.com/comment/41918004
favorite count: 0
accepted answer: http://stackoverflow.com/a/26731420

http://stackoverflow.com/comment/41761354
has text: Please show the expected result.
comment on: http://stackoverflow.com/q/26571566
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41803932
has text: Noodles, delegation is not needed for the approach I mentioned. http://jsfiddle.net/ab5yn7eL/1/
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26594106

http://stackoverflow.com/q/26555844
has title: Passing JSON string from jsp to js file
favorite count: 0
has comment: http://stackoverflow.com/comment/41733518
accepted answer: http://stackoverflow.com/a/26556134
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: So, I have a json string (used Gson) with information from my database in my jsp file and I need to pass that info to a js function. JSP (consulta.jsp): &lt;%@ page language="java" import="java.sql.*" %&gt; &lt;%@ page language="java" import="db.Conexao" %&gt; &lt;%@ page language="java" import="java.util.ArrayList" %&gt; &lt;%@ page language="java" import="com.google.gson.Gson" %&gt; &lt;% try { //instancia classe de conexao Conexao conexao = new Conexao("localhost", "app", "root", "diogo"); //conecta no banco Connection connection = conexao.connect(); //cria o statment e realiza a consulta Statement st = connection.createStatement(); String sql = "SELECT * FROM crimes"; ResultSet rs = st.executeQuery(sql); final ArrayList&lt;String&gt; id= new ArrayList&lt;String&gt;(); while(rs.next()) { id.add("id"); id.add(rs.getString("id")); id.add("latitude"); id.add(rs.getString("latitude")); id.add("longitude"); id.add(rs.getString("longitude")); } String[] array = new String[id.size()]; array = id.toArray(array); Gson gson = new Gson(); String json = gson.toJson(array); response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); response.getWriter().write(json); //fecha a conexao com o banco connection.close(); } catch(Exception e) { out.println(e.toString()); } %&gt; JS function: function carregarPontos() { $.getJSON('consulta.jsp', function(pontos) { $.each(pontos, function(index, ponto) { var marker = new google.maps.Marker({ position: new google.maps.LatLng(LATITUDE VALUE HERE, LONGITUDE VALUE HERE), title: value, map: map, icon: 'arma2.png' }); } } PS:. My json string is ["id","1","latitude","-23.4831104000","longitude","-46.6330227000","id","4","latitude","-23.5874328731","longitude","-46.6573598700"]. Is it right? Thank You
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41733275
downvote count: 0
tagged with: jsp
tagged with: javascript
linked to: http://stackoverflow.com/q/3832792
has answer: http://stackoverflow.com/a/26556134
duplicate of: http://stackoverflow.com/q/3832792
answer count: 1

http://stackoverflow.com/a/26633790
has comment: http://stackoverflow.com/comment/41875965
upvote count: 8
type: Answer
score: 8
answers question: http://stackoverflow.com/q/26633258
has comment: http://stackoverflow.com/comment/41876033
has body: Set a CSS style with CSS variables and proof with Javascript and getComputedStyle() if it is set... getComputedStyle() is supported in many browsers: http://caniuse.com/#feat=getcomputedstyle HTML &lt;div class="css-variable-test"&gt;&lt;/div&gt; CSS :root { --main-bg-color: rgb(1, 2, 3); /* or something else */ } .css-variable-test { display: none; background-color: var(--main-bg-color); } JavaScript var computedStyle = getComputedStyle(document.getElementsByClassName('css-variable-test')[0], null); if (computedStyle.backgroundColor == "rgb(1, 2, 3)") { // or something else alert('CSS variables support'); } FIDDLE: http://jsfiddle.net/g0naedLh/6/
downvote count: 0

http://stackoverflow.com/comment/41745036
comment on: http://stackoverflow.com/q/26562435
score: 0
type: Comment
type: QuestionComment
has text: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_transitions http://www.w3schools.com/css/css3_transitions.asp

http://stackoverflow.com/a/26614976
score: 2
upvote count: 2
has body: You forgot to return the array. If you just want to modify existing one, you only need to do: toPts(a); console.log(a) // [100,200,300] If you want a new array with original untouched: function toPts(array){ var arr = array.slice(0); // copy array to new reference for(var i=0; i&lt;arr.length; i++){ arr[i] *= 100; } return arr; } var newArray = toPts(a); console.log(newArray) // [100,200,300] console.log(a) // [1,2,3]
has comment: http://stackoverflow.com/comment/41842137
has comment: http://stackoverflow.com/comment/41841435
has comment: http://stackoverflow.com/comment/41841610
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26614889
answers question: http://stackoverflow.com/q/26614889
type: Answer

http://stackoverflow.com/q/26583491
accepted answer: http://stackoverflow.com/a/26583916
has comment: http://stackoverflow.com/comment/41783228
score: 4
has body: I want to get all neighboring combinations of words in string like string get all combinations and I want to get get all combinations all combinations get all all get combinations and I write next code var string = 'get all combinations'; var result = getKeywordsList(string); document.write(result); function getKeywordsList(text) { var wordList = text.split(' '); var keywordsList = []; while (wordList.length &gt; 0) { keywordsList = keywordsList.concat(genKeyWords(wordList)); wordList.shift(); } return keywordsList; } function genKeyWords(wordsList) { var res = [wordsList.join(' ')]; if (wordsList.length &gt; 1) { return res.concat(genKeyWords(wordsList.slice(0, -1))); } else { return res; } } can I improve or simplify this task (get all neighboring combinations of words ) p.s. sorry for my English
has comment: http://stackoverflow.com/comment/41783105
type: AnsweredQuestion
tagged with: javascript
has title: How to get all combinations of word in string
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41783259
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26583916
favorite count: 0
has comment: http://stackoverflow.com/comment/41783167

http://stackoverflow.com/comment/41928722
comment on: http://stackoverflow.com/a/26662967
score: 1
type: AnswerComment
type: Comment
has text: Thanks Jyrkim! I used the second one contacts.push(new Contact(.....)); and with the code you fixed and now it works as it should! Thanks for that! :)

http://stackoverflow.com/a/26590693
answers question: http://stackoverflow.com/q/26587754
has comment: http://stackoverflow.com/comment/41798818
score: 3
upvote count: 3
has body: Your rendered markup will not contain an onClick attribute. What you write in your JSX markup is not a direct HTML markup. What will happen instead is that React will give your markup a data-reactid attribute, and will make sure its own event handlers fire something when a specific data-reactid gets clicked.
downvote count: 0
type: Answer

http://stackoverflow.com/q/26534031
has answer: http://stackoverflow.com/a/26537130
has body: after adding a javascript file to my Wicket panel like so renderJsHeaderItem(response, "js/jquery/dist/jquery.min.js"); I get an error in the javascript console along the lines of GET http://localhost:9080/js/jquery/dist/jquery.min.map 404 (Not Found) How would I add the map file to my Panel code? (same question for css.map) Thanks!
tagged with: javascript
has title: adding .js.map files to page header in apache wicket-6.x
tagged with: wicket
score: 0
type: UnansweredQuestion
type: Question
tagged with: java
tagged with: wicket-6
answer count: 1

http://stackoverflow.com/comment/41721496
score: 0
has text: Tripple check your HTML, because it returns null only if there is NO element with ID `username`.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26548831

http://stackoverflow.com/comment/42347215
type: Comment
type: AnswerComment
has text: Thanks. The problem is not in the appending but somewhere else. I troubleshooted everything (and thanks by the way for your jsfiddle) and the problem is elsewhere.
score: 0
comment on: http://stackoverflow.com/a/26639634

http://stackoverflow.com/q/26657621
tagged with: dc.js
downvote count: 0
has comment: http://stackoverflow.com/comment/44736025
has body: I am formatting a dc.js DataTable, and I want to know if there is a better approach. I am currently trying to color rows in the output table based on data. To do this, I am outputting the data, then running a renderlet on the data, which is coloring the output. I am further hiding the column that had the data, because I don't want the column to display, I just needed it to determine the color for the row. The process seems like a hack, so I was curious if anyone was custom formatting a DataTable in a more elegant way. Any suggestions are welcome. var userChart = dc.dataTable('#company-chart') .dimension(company) .group(function (d) { return d.company; }) .columns([ function (d) { return d.job_service_datetime; }, function (d) { return d.company; }, function (d) { return d.first_name; }, function (d) { return d.last_name; } ]) .renderlet(function (table) { $("#company-chart tr").each(function (index, Element) { switch ($(Element).children("td").last().text()) { case "2": $(Element).css("background-color", "#FFFFCC"); break; case "6": $(Element).css("background-color", "#F5CCCC"); break; } if ($(Element).children("td").length > 1) { $(Element).children("td").last().css("display", "none"); } }); }); Link to the JSFiddle
favorite count: 0
type: UnansweredQuestion
has title: dc.js DataTable custom formatting
answer count: 0
has comment: http://stackoverflow.com/comment/42146457
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41799890
has text: I've placed a breakpoint inside the methods in addition to looking at the result my code should produce. For debugging purposes, I've also put a basic `alert` in the function.
comment on: http://stackoverflow.com/q/26592535
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26669457
has title: AngularJS - ui-grid - Column Moving - get new order of columns
type: Question
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/42843060
answer count: 2
has body: I am implementing http://ui-grid.info/ in my application. There is a feature of Column Moving, where Columns can be moved. http://ui-grid.info/docs/#/tutorial/217_column_moving DEMO This is how i add columns :- $scope.gridOptions.columnDefs.push({ field: 'Name', displayName: 'EMPLOYEE NAME'}); $scope.gridOptions.columnDefs.push({ field: 'Age', displayName: 'AGE'}); .... Here is the event which fires when column is moved. http://ui-grid.info/docs/#/api/ui.grid.moveColumns.api:PublicApi My problem is that i want to get the new order of the columns in $scope.gridOptions.columnDefs for saving it in db. On Column Moving $scope.gridOptions.columnDefs doesn't get updated. How to solve this?
has answer: http://stackoverflow.com/a/28977269
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 4
tagged with: angular-ui-grid
downvote count: 0
has comment: http://stackoverflow.com/comment/41945433

http://stackoverflow.com/comment/41682806
has text: @Meezy atleast upvote the answer for the effort put towards solving your problem!
score: 1
comment on: http://stackoverflow.com/a/26527779
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26573810
tagged with: ajax
has answer: http://stackoverflow.com/a/26574189
has comment: http://stackoverflow.com/comment/41765483
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26574189
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41765460
has body: I want to make ajax call to load some specific div to my webpage. But the content I wanna load is itself loaded via ajax, so I can't get the full html content as I want. function loadajax(){ $.ajax({ url: 'http://callcom-com-au.myshopify.com/products/repair', crossDomain: true, method:'post', dataType: 'html', success: function(response) { $('#customer_reviews').html(jQuery(response).find('.spr-header').html()); $('.spr-icon').css('color','#f3b41b'); } }); } $('document').ready(function(){ setTimeout(loadajax,10000); }); Is there any workaround. Any help would be appreciated.
answer count: 1
downvote count: 0
tagged with: jquery
has title: Load specific html content via AJAX from a page that is loaded via ajax
has comment: http://stackoverflow.com/comment/41765509
favorite count: 0

http://stackoverflow.com/comment/41920716
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26659109
score: 0
has text: I get HTML from via AJAX

http://stackoverflow.com/q/26628672
tagged with: javascript
has title: Ember - promise array
has answer: http://stackoverflow.com/a/26631009
tagged with: ember.js
type: AnsweredQuestion
type: Question
has body: I have my controller, records is a computed property. On orderBy or page change my app shuold perform a new call. This controller works perfectly: App.IndexController = Ember.ArrayController.extend({ ... records: function() { return this.store.find("record", { page: this.get("page"), page_size: this.get("pageSize"), order_by: this.get("orderBy") }) }.property("key", "orderBy", "page"), }) But if I want to show an hourglass during the request: App.IndexController = Ember.ArrayController.extend({ ... records: function() { this.showHourglass(); return this.store.find("record", { page: this.get("page"), page_size: this.get("pageSize"), order_by: this.get("orderBy") }).then(function(records) { this.hideHourglass(); return records; }) }.property("key", "orderBy", "page"), }) I got this error: Uncaught Error: Assertion Failed: The value that #each loops over must be an Array. You passed {_id: 59, _label: undefined, _state: undefined, _result: undefined, _subscribers: } How can I solve this? Thanks EDIT: In my template there is a loop over the property: {{#each records}} ... {{/each}
score: 0
accepted answer: http://stackoverflow.com/a/26631009
answer count: 1

http://stackoverflow.com/q/26649056
has comment: http://stackoverflow.com/comment/41903599
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41903660
has body: Working on the ColdFusion Code and Jquery Code, all is working good, but the calculations I am doing in ColdFusion and Jquery are not matching, is there something i am doing wrong. Here is the ColdFusion Code: quoteLineItemSubTotal = (('#Evaluate("form.quantity_#id#")#' * '#Evaluate("form.normalprice_#id#")#') - '#Evaluate("form.quoteLineItemDiscount_#id#")#' - '#Evaluate("form.itemTax_#id#")#') Here is the jquery Code $(document).on('keypress keyup keydown change','#quoteLineItemQuantity,#quoteLineItemDiscount,#itemTax,#quoteLineItemPriceUnit',function(e) { var qty = $("#quoteLineItemQuantity").val(); var price = parseFloat($("#quoteLineItemPriceUnit").val()); var qtyDiscount = parseFloat($("#quoteLineItemDiscount").val()/100); var qtyTax = parseFloat($("#itemTax").val()/100); var total = parseFloat(qty*price-qtyDiscount-qtyTax).toFixed(2); $("#quoteLineItemSubTotal").val(total); });
has comment: http://stackoverflow.com/comment/41902564
type: UnansweredQuestion
has title: calculation throuh jquery and coldfusion not matching
tagged with: coldfusion
downvote count: 1
has comment: http://stackoverflow.com/comment/41915654
has comment: http://stackoverflow.com/comment/41902789
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/41902912
has comment: http://stackoverflow.com/comment/41907782
has answer: http://stackoverflow.com/a/26656777

http://stackoverflow.com/comment/41797029
type: AnswerComment
has text: Adding any library to any project should be done with careful consideration. It isn't actually saving you any lines of code -- each library may be thousands of lines of code that *you didn't write*. That adds another variable to your project and your environment, and another code dependency. Well-established libraries like jQuery aren't, in balance, an exceptional risk, but you shouldn't add it just to accomplish one simple, basic goal. If this is the only thing javascript is doing, adding jQuery is a bad recommendation. That's why, without context, you shouldn't make that suggestion.
comment on: http://stackoverflow.com/a/26589883
type: Comment
score: 0

http://stackoverflow.com/q/26557039
has title: I want to hide a parent element if the image contained is empty
score: 1
has answer: http://stackoverflow.com/a/26557241
has answer: http://stackoverflow.com/a/26557167
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41735618
favorite count: 0
answer count: 4
has answer: http://stackoverflow.com/a/26583788
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26583685
has body: I have a table with a cell that contains a div to hold an image. What I want to do is if the image itself has an empty src value or if there is an error on loading the image, to then set the display of the parent cell to none. The table will actually list a series of images in the page and not all will be mepty or show an error. The code below shows the table cell... info within {} are in fact dynamic data values passed through as text literals. If the value for "img src" is in error or empty then I want to set the display for ID of the TD to "none. Would also like to handle situation where I have just the single table on my page with 2 iamges in the table each in a div and I want to set display=none for each DIV subject to image src being invalid URL or if src="" - see example below

http://stackoverflow.com/comment/41885499
type: AnswerComment
has text: The question was: "necessarily always the same as". Abstract other types which behave like Boolean objects seems out of scope to me.
comment on: http://stackoverflow.com/a/26639197
type: Comment
score: 0

http://stackoverflow.com/q/26529638
tagged with: wordpress
has answer: http://stackoverflow.com/a/26529945
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26529945
tagged with: jquery
has comment: http://stackoverflow.com/comment/41686327
has answer: http://stackoverflow.com/a/26530004
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: jQuery mouse hover animated effect
has body: I had to do on a WordPress website an mouse hover animated effect on the navigation menu elements. I've managed to finished the job using the following code: The result could be seen here. Even though everything is working like I was expecting I am not satisfied with the code. The positioning values are manually set like you can see above. This could creates problem if a new element is added to the menu. Also I have some duplicate code which I want to get rid of. The menu items have common classes being a WordPress website like menu-item , menu-item-type-post_type , menu-item-object-page. Which is the best approach to optimize my code? Any guidance or help is more than welcomed. I am sorry for my not so best practices code but I am still on the process of learning some of the basics. :)
accepted answer: http://stackoverflow.com/a/26530004
tagged with: css
has comment: http://stackoverflow.com/comment/41686231
type: AnsweredQuestion

http://stackoverflow.com/comment/41858142
type: QuestionComment
has text: This is impossible. Issue should be somewhere else
score: 1
comment on: http://stackoverflow.com/q/26624149
type: Comment

http://stackoverflow.com/comment/41876097
comment on: http://stackoverflow.com/a/26634251
score: 2
has text: Upvoted, this is the standard way of submitting multiple values.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26597708
tagged with: javascript
has comment: http://stackoverflow.com/comment/41962692
upvote count: 1
has comment: http://stackoverflow.com/comment/53219003
favorite count: 0
has title: Google Analytics implemented at JavaScript not tracking on Android Device
tagged with: angularjs
type: UnansweredQuestion
tagged with: android
downvote count: 0
answer count: 0
score: 1
type: Question
tagged with: google-analytics
has body: I am working on a Hybrid Model Application Development. My base code is in AngularJS and built the app with bootstrap and HTML5 for responsiveness and have Xamrin at the middle layer to provide me with platform dependent bridges for appropriate platforms(Android and iOS). I have implemented Google Analytics at Javascript level. As we have plans of supporting more platforms in the future, we don't want to implement GA at the native level. Instead, treat the application as webpage and add the tracking at the UI level. This way, regardless of the platform, we will be able to track the analytics. However, I've implemented this for iOS and Surface.Both of them are tracking analytics perfectly. But not Android. In my Index.html file, I have this. &lt;script type="text/javascript" src="ga.js"&gt;&lt;/script&gt; &lt;script&gt; var _gaq = _gaq || []; if(GA_Enabled_Flag === true){ _gaq.push(['_setAccount', GA_Tracking_ID]); _gaq.push(['_setDomainName', 'none']); } &lt;/script&gt; which is not working only on Android environment. Any thoughts on this would be greatly helpful. Thanks, Madhan
tagged with: ios

http://stackoverflow.com/comment/41824978
has text: @jfriend00 getNodeData just resolves with an object with the details of that leaf.
score: 0
comment on: http://stackoverflow.com/q/26592316
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41723054
has text: (Not of the Q. noted above, anyhow.)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26547821
score: 0

http://stackoverflow.com/a/26934589
answers question: http://stackoverflow.com/q/26618933
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42419384
has body: The likely problem is that you are trying to save an object in the beforeSave trigger; you don't need to save it, you just need to modify it and then call response.success() to let Parse.com know to continue with the save operation. The error you are getting is probably due to the fact that it's trying to create the same user twice - although that's just a guess. See https://parse.com/docs/cloud_code_guide?language=JavaScript#functions-onsave for more information. Remove the user.save() call and just call response.success().
accepted answer of: http://stackoverflow.com/q/26618933
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41912367
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26649753
has text: Well I was thinking about setting something like the timeout parameter on connect's request https://github.com/expressjs/timeout
score: 0

http://stackoverflow.com/q/26553788
score: 1
has title: How would you make the result print "computer wins" or "user wins"
favorite count: 0
has comment: http://stackoverflow.com/comment/41729429
has comment: http://stackoverflow.com/comment/41729721
has body: Obviously, this will print out rock/paper/scissors wins or it's a tie. What is the best way to achieve a result like "Rock beats scissors -- Computer wins!" and such? var userChoice = prompt("Do you choose rock, paper or scissors?"); var computerChoice = Math.random(); if (computerChoice &lt; 0.34) { computerChoice = "rock"; } else if(computerChoice &lt;= 0.67) { computerChoice = "paper"; } else { computerChoice = "scissors"; } console.log("Computer: " + computerChoice); var compare = function(choice1, choice2) { if (choice1 === choice2) { return "The result is a tie!"; } else if (choice1 === "rock") { if (choice2 === "scissors") { return "rock wins"; } else { return "paper wins"; } } else if (choice1 === "paper") { if (choice2 === "rock") { return "paper wins"; } else { return "scissors wins"; } } else if (choice1 === "scissors") { if (choice2 === "paper") { return "scissors wins"; } else { return "rock wins"; } } } compare(userChoice,computerChoice); I have some knowledge of functions and variables that I think is enough to solve this -- I just can't figure it out. I have less than 8 hours of javascript experience. Also, this is not my homework, I just finished a lesson in codecademy and wondered this.
has comment: http://stackoverflow.com/comment/41729478
has answer: http://stackoverflow.com/a/26554396
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41731147
has answer: http://stackoverflow.com/a/26554541
tagged with: javascript
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/q/26601737
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/32313847
has body: I want to edit the table rows, so for that on click, I want to make the columns as text boxes so that I can edit, and save. Also, how to add rows dynamically on click of add button. I know how to do using jQuery, but no idea in ember. Thanks! I want to emulate this kind of behaviour in Ember. http://jsbin.com/codeso/1/edit?html,js,output this jsbin has a table, and a button. On clicking of button a dynamic row gets added in table with columns as text-boxes so that the user can enter data, which on pressing another button can be saved.
favorite count: 0
has comment: http://stackoverflow.com/comment/41819788
has title: How to add a a dynamic row to table on click of a button, and make the existing rows editable on click using Ember
type: UnansweredQuestion
tagged with: ember.js
has answer: http://stackoverflow.com/a/26603323
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42032467
tagged with: javascript
has comment: http://stackoverflow.com/comment/41818945

http://stackoverflow.com/comment/41739204
comment on: http://stackoverflow.com/q/26558686
score: 0
type: Comment
type: QuestionComment
has text: You may want to check out the jQuery library, here: http://api.jquery.com/

http://stackoverflow.com/a/26601083
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26601038
has body: It seems that this should work for you: "1000000000".replace(/\d(?=(?:\d{2})*\d{3}(?!\d))/g, "$&amp;,") I dropped all the unnecessary capturing groups, and use $&amp; to refer to the main match instead of capturing \d.
accepted answer of: http://stackoverflow.com/q/26601038
type: AcceptedAnswer

http://stackoverflow.com/q/26611171
tagged with: null
accepted answer: http://stackoverflow.com/a/26650518
answer count: 1
tagged with: javascript
has title: Undefined colour profile
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26650518
type: Question
tagged with: photoshop-script
has body: I'm trying to remove colour profiles from a document. As far as I am aware, the colorProfileName should be either a string or null (if it's not assigned). However, if it's the latter I can't assign it to a variable (line 3). Without the try/catch is there a way around this? try { var cp = app.activeDocument.colorProfileName; } catch(eek) { alert("no colour profile associated with image"); cp = null; } if (cp != null) { cp = assignNoColourProfile(cp); if (cp == null) { alert("colour profile now removed"); } }

http://stackoverflow.com/a/26603032
accepted answer of: http://stackoverflow.com/q/26599699
score: 1
answers question: http://stackoverflow.com/q/26599699
downvote count: 0
has comment: http://stackoverflow.com/comment/41847562
type: AcceptedAnswer
has body: You need a service to inject each controller or the $rootScope for unified access. I am doing the same thing with an angular app. Here is my version to get you started. Authutils service you see used in he code is an implementation of Stanford Javascript Crypto Library at http://bitwiseshiftleft.github.io/sjcl/ to add a layer of security to the stored resources since they are easily visible with browser debugging tools: angular.module('myApp').service('Dataservice', [ 'Authutils', function Dataservice(Authutils) { var _test = [1, 2, 3]; var hasStorage = function() { if (Modernizr.localstorage) { return true; } else { return false; } }; var _get = function(key, make, init_data) { var out = []; var create = typeof make !== "undefined" ? make : false; var data = typeof init_data !== "undefined" ? init_data : false; if (hasStorage()) { var sval = localStorage.getItem(key); if (!!sval) { try { sval = Authutils.decrypt(sval); out = JSON.parse(sval); } catch (e) { } } else { if (create) { if (data) { data = Authutils.encrypt(data); _set(key, data); } else { _set(key, []); } } } } return out; }; var _set = function(key, value) { if (hasStorage()) { var subject = JSON.stringify(value); localStorage.setItem(key, Authutils.encrypt(subject)); return true; } return false; }; var _drop = function(key) { if (hasStorage()) { localStorage.removeItem(key); return true; } return false; }; var _nuke = function() { if (hasStorage()) { localStorage.clear(); return true; } return false; }; var _push = function(key, value) { var out = []; if (hasStorage()) { var current = JSON.parse(localStorage.getItem(key)); if (!!current) { current.push(value); _set(key, current); } } return out; }; return { get: function(key, make, init_data) { return _get(key, make, init_data); }, set: function(key, value) { _set(key, value); }, push: function(key, value) { _push(key, value); }, trash: function(key) { _cut(key); }, nuke: function() { _nuke(); }, test: function() { return _test; } }; } ]);
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41876406
has text: I'm not sure what you are asking about both setTimeout - I'll try to revise the answer with added explanation. If the answer works for you you can mark it as a solution (check mark below the vote buttons) so this question will be marked as 'solved'.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26630319

http://stackoverflow.com/q/26661642
score: 0
has comment: http://stackoverflow.com/comment/41925847
has body: Looking for a simple solution to deep clean primitive property values directly on an object, e.g.: var filled = { levelOneObj: { property: 'primitive' levelTwoObj: { property: 'primitive value' }, levelTwoArray: ['primitive', 123] } } cleanPrimitives(filled); var filled = { levelOneObj: { levelTwoObj: { }, levelTwoArray: [] } } I don't want to reinvent the wheel if there is already a solution in a library--, any solutions or help is appreciated
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41927578
type: Question
has title: JavaScript deep empty an object
tagged with: javascript
has comment: http://stackoverflow.com/comment/41927497
answer count: 1
has answer: http://stackoverflow.com/a/26661931
favorite count: 0
has comment: http://stackoverflow.com/comment/41925463
has comment: http://stackoverflow.com/comment/41926891
accepted answer: http://stackoverflow.com/a/26661931
has comment: http://stackoverflow.com/comment/41925663
type: AnsweredQuestion

http://stackoverflow.com/comment/41760360
type: QuestionComment
comment on: http://stackoverflow.com/q/26570687
has text: I am using ng-minlength angularjs directive to limit number of charachters.
type: Comment
score: 0

http://stackoverflow.com/q/26584682
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/32828071
has comment: http://stackoverflow.com/comment/41785152
possible better answer: http://stackoverflow.com/a/26587819
has title: Print page using html2canvas
has answer: http://stackoverflow.com/a/26585214
score: 2
type: AnsweredQuestion
has body: I'm building a print page function on my web using html2canvas. function printthispage() { html2canvas($("#mydiv"), { onrendered: function (canvas) { var myImage = canvas.toDataURL("image/png"); var printWindow = window.open(myImage); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close(); } }); } However the window opened and closed immediately. I've tried removing close(), the image showed on new window but no print function was triggered. Is there something wrong?
downvote count: 0
has comment: http://stackoverflow.com/comment/41789289
has answer: http://stackoverflow.com/a/26586961
accepted answer: http://stackoverflow.com/a/26586961
has comment: http://stackoverflow.com/comment/41789038
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26587819
tagged with: javascript
tagged with: html2canvas
answer count: 6
has answer: http://stackoverflow.com/a/65551620
has answer: http://stackoverflow.com/a/39098128

http://stackoverflow.com/a/26570706
has comment: http://stackoverflow.com/comment/41759948
has comment: http://stackoverflow.com/comment/41759923
type: Answer
has comment: http://stackoverflow.com/comment/41760052
has comment: http://stackoverflow.com/comment/41759872
has comment: http://stackoverflow.com/comment/41759852
score: 1
has comment: http://stackoverflow.com/comment/41759989
upvote count: 1
has body: you can define your user in pageController(that is parent controller to UsernameController) now whenever you change it in pageController it will also be updated in usernameController second solution is to have ng-view in parent, and in route use controller for UsernameController index file &lt;div ng-app="demo" ng-controller="PageController"&gt; {{ page.time }} &lt;ng-view&gt;&lt;/ng-view&gt; &lt;/div&gt; user.html &lt;div ng-controller="UsernameController"&gt; {{ user.name }} &lt;/div&gt; route codee .when("/user",{ controller:"usernameController", templateUrl : 'user.html' }) Third solution is to make a service .factory("userFactory",function(){ var user = {}; return{ setUser : function(usern){ user = usern; }, getUser : function(usern){ return user; }, } }) now you can get user from service and set to service .
downvote count: 0
answers question: http://stackoverflow.com/q/26570660

http://stackoverflow.com/comment/41779384
score: 1
type: AnswerComment
type: Comment
has text: Yeah, I think you're right. I don't think this would be too bad to just roll it. Thanks for the suggestion!
comment on: http://stackoverflow.com/a/26578287

http://stackoverflow.com/comment/41773152
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26576225
has text: Check [How send automatic reply on particular email id when an user registers?](http://stackoverflow.com/q/5431061/573032)

http://stackoverflow.com/q/26627304
tagged with: ajax
tagged with: clearinterval
has answer: http://stackoverflow.com/a/26627390
answer count: 4
has body: I have made a function that is controlling a row in a my database for a certain number with AJAX. Im calling the function with a click function and putting the function in a setInterval function to make the check 10 times a second. In the beginning it will return 0, but at some point (usually within 5 seconds) it will return something els than 0, when it does i want to clearInterval. But im not sure how to this? This is my function: function get_buzzer() { $.ajax({ url: 'ajax_buzzer.php', dataType: 'json', async: false, type: 'post', data: { job: 'get' }, success:function(s) { if(s['number'] == 0) { var player = false; } else { var player = true; } }, error:function(e) { } }); } $(document).ready(function() { $('#test').click(function() { var buzzer = setInterval("get_buzzer()",100); }); });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26627372
type: Question
has title: query clearInterval when variable is "x"
possible better answer: http://stackoverflow.com/a/26627379
tagged with: javascript
has answer: http://stackoverflow.com/a/26627379
has answer: http://stackoverflow.com/a/26627409
score: 0
tagged with: setinterval
has answer: http://stackoverflow.com/a/26627372
tagged with: jquery

http://stackoverflow.com/q/26595040
tagged with: http://stackoverflow.com/tag/html
answer count: 4
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/41804768
type: UnansweredQuestion
score: -4
type: Question
has answer: http://stackoverflow.com/a/26595115
has answer: http://stackoverflow.com/a/26595107
has body: What I am trying to get is: Make a &lt;div&gt; which shows a "You have selected seat 1." message, when I clicked the associated button inside the &lt;div&gt;. Additionaly it should be possible to click multiple buttons which should result in a proper displayed "You have selected 1,... and x." message. Question How can I archieve this? Side information I need this for a lot of buttons because it's a cinema reservation system. What I have so far &lt;script&gt; function text(id){ document.getElementById("bookingDiv").innerHTML = "seat 1"; } &lt;/script&gt; &lt;/head&gt; &lt;body onload="load()"&gt; &lt;input class="textbutton" type="button" id="Button1" value="seat1" onclick="text(Button1)"/&gt; &lt;input class="textButton"type="button" id="Button2" value="seat2" onclick="text(Button2)"/&gt; &lt;div id="bookingDiv" type="text"&gt; you have selected button: &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; Thanks for any advice!
has title: Writing in a with JavaScript
tagged with: javascript
has answer: http://stackoverflow.com/a/26595175
favorite count: 0
has answer: http://stackoverflow.com/a/26595103

http://stackoverflow.com/q/26560880
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26561294
has title: JQuery Creating Modal and Opening
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41742302
tagged with: javascript
tagged with: jquery
favorite count: 0
score: -1
has body: I want to create a modal and display it when user click on the image.There are some methods like making modal invisible and after clicking somewhere JQuery makes it visible but i do not want to use these methods ,only want to create and display modal with JQuery. How can i create it with JQuery dynamically?

http://stackoverflow.com/a/26646024
downvote count: 0
has comment: http://stackoverflow.com/comment/41897555
accepted answer of: http://stackoverflow.com/q/26645897
has comment: http://stackoverflow.com/comment/41897556
type: Answer
answers question: http://stackoverflow.com/q/26645897
upvote count: 2
has body: Since you select the same option TWICE so there is no change in selected object of Dropdown. Try like below Updated Answer var dd = document.getElementById('mySelect'); var storeLstSlct = document.getElementById('checkIndx'); var slctdValue = ''; if(dd.selectedIndex == 0) { return false; }else if(storeLstSlct.value == dd.options[dd.selectedIndex].value) { storeLstSlct.value = 'garbage'; return false; }else { slctdValue = dd.options[dd.selectedIndex].value; alert(slctdValue); storeLstSlct.value = slctdValue; } Fiddle is HERE
has comment: http://stackoverflow.com/comment/41898532
score: 2
has comment: http://stackoverflow.com/comment/41899919
has comment: http://stackoverflow.com/comment/41897971
has comment: http://stackoverflow.com/comment/41898203
type: AcceptedAnswer

http://stackoverflow.com/comment/41683468
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26528323
has text: Didn't know about siblings() method. Thanks)
score: 0

http://stackoverflow.com/a/50124101
answers question: http://stackoverflow.com/q/26566317
has body: I ran into the same error. It turned out to be caused by a simple typo after changing my code from: document.getElementById('root') to document.querySelector('root') Notice the missing '#' It should have been document.querySelector('#root') Just posting in case it helps anyone else solve this error.
downvote count: 0
has comment: http://stackoverflow.com/comment/126897747
type: Answer
score: 7
upvote count: 7

http://stackoverflow.com/q/26530293
tagged with: post
type: Question
tagged with: get
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41687006
tagged with: ajax
has answer: http://stackoverflow.com/a/26532586
has comment: http://stackoverflow.com/comment/41690217
has comment: http://stackoverflow.com/comment/41687002
has title: How to return the value of a dynamic javascript object from an Ajax response
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41691679
has body: I have the following code which generates a success response: Response: Where the value of dynVal is incremented/updated once the form has been posted. Within the response there is dynamic data stored within a custom data object that I am trying to reference without any success. Do I need to better define the callback scope? What am I doing wrong?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41691228

force-layout
tags question: http://stackoverflow.com/q/26599918
tag name: force-layout
tags question: http://stackoverflow.com/q/26536450
tags question: http://stackoverflow.com/q/26545670
type: Tag
tags question: http://stackoverflow.com/q/26638331

http://stackoverflow.com/comment/41812998
comment on: http://stackoverflow.com/a/26581185
score: 1
has text: Are the IDs correct? Is the timing correct (i.e. do the input boxes exist at the time you call `login()`)?
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26543193
upvote count: 1
has body: Owl carousel provides documentation on manipulating content within a slider be worth looking at. http://owlgraphic.com/owlcarousel/demos/manipulations.html You will have to rebuild the slider if the select is ticked and a new select box is added.
downvote count: 0
answers question: http://stackoverflow.com/q/26542622
type: Answer
score: 1

http://stackoverflow.com/a/26566502
answers question: http://stackoverflow.com/q/26566460
accepted answer of: http://stackoverflow.com/q/26566460
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: you're adding } in the end of the if and else statements but no { that opens them change to if(userAge &gt;= 16 &amp;&amp; userAge &lt;= 18) { document.getElementById('age').innerHTML = "Age entered " + userAge + "is in range. Can play in youth team.";} else { document.getElementById('age').innerHTML = "Age entered " + userAge + "is not in range. Can play not in youth team.";}
upvote count: 2
has comment: http://stackoverflow.com/comment/41752113

http://stackoverflow.com/comment/41843826
score: 0
type: Comment
type: QuestionComment
has text: You are not putting the alert in the right place for one thing. try defining var guardsval = 'foo'; and I bet the alert displays 'foo'
comment on: http://stackoverflow.com/q/26616011

http://stackoverflow.com/comment/41752770
score: 0
has text: TBH, jQuery/JS is not something I know very well. Wish I could help you out more, but I won't be able to.
comment on: http://stackoverflow.com/q/26566447
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26596614
has answer: http://stackoverflow.com/a/26596850
has body: I am using Google Maps Javascript API to display this on my website. I am setting the current location of visitor with a red mark and then marking my customers within 10 kms from current location. I am unable to display both the visitor and my customer in a single view. Meaning zoom it to that level. google.maps.LatLngBounds did not work for me. I am wondering why. Meanwhile, I zoomed out completely and I see 4 maps at one place. I don't know how this is happening. My code is below &lt;section id="wrapper" class="row main-section" style="height: 100%;"&gt; &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"&gt;&lt;/script&gt; &lt;script&gt; function success(position) { var mapcanvas = document.createElement('div'); mapcanvas.id = 'mapcontainer'; var myHeight = document.getElementById("scrHeight").value; var myWidth = document.getElementById("scrWidth").value; console.log(myHeight); myHeight = myHeight-155; console.log(myHeight); console.log(myWidth); mapcanvas.style.height = myHeight+'px'; mapcanvas.style.width = '100%'; document.querySelector('article').appendChild(mapcanvas); var coords = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var options = { zoom: 16, center: coords, mapTypeControl: false, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL }, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("mapcontainer"), options); var marker = new google.maps.Marker({ position: coords, map: map, title:"You are here!" }); var myTable = document.getElementById("markerTable"); var myLength = myTable.rows.length; var infowindow = new google.maps.InfoWindow({ maxWidth: 360 }); var markers = new Array(); var latlngbounds = new google.maps.LatLngBounds(); for (var i = 0; i &lt; myLength; i++) { var myRow = document.getElementById("markerTable").rows[i].cells; var myId = myRow[0].innerHTML; var myDisplayName = myRow[1].innerHTML; var myShor…
type: Question
linked to: http://stackoverflow.com/q/21912831
tagged with: google-maps
tagged with: google-maps-markers
tagged with: google-maps-api-2
answer count: 1
tagged with: javascript
tagged with: google-maps-api-3
score: 0
accepted answer: http://stackoverflow.com/a/26596850
has comment: http://stackoverflow.com/comment/41812524
has title: Google Maps multiple maps displayed instead of one
type: AnsweredQuestion

http://stackoverflow.com/comment/41818133
type: Comment
has text: I went through other answers but was not able to achieve the desired functionality. But above code worked like charm! :) Thanks for your help.
comment on: http://stackoverflow.com/a/26591472
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41659182
score: 0
has text: It's probably easy to miss the fact that every one of JQuery's values is actually a collection - often with a single element. When you're writing more basic JS yourself, you just need to recognize which values are going to come back as single elements (`byId`) or as a NodeList (`byClassName`)
comment on: http://stackoverflow.com/q/26514646
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41807771
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26596608
type: Comment
has text: Just curious, is this a question of purely academic value? Why would someone write code like that? Seriously, is there a good reason?

http://stackoverflow.com/comment/41916071
score: 0
type: AnswerComment
has text: Yes completely removed the second instance and added the code as instructed. I checked the console on load and there aren't any errors being thrown. Just not responding.
type: Comment
comment on: http://stackoverflow.com/a/26556995

http://stackoverflow.com/comment/41771938
has text: Eventually I will host it online but the site is far from done so
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26576954

http://stackoverflow.com/comment/41697450
comment on: http://stackoverflow.com/q/26535753
type: Comment
type: QuestionComment
score: 1
has text: you need to explain how they are not working. Are the scripts not getting included, are there errors on the javascript console, are the share buttons not opening a popup for the share?

http://stackoverflow.com/q/26536793
tagged with: ng-pattern
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26536936
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm using ng-pattern on a text field to validate a Canadian phone number: ^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$ But AngularJS throws this error: Syntax Error: Token '?' not a primary expression at column 3 of the expression [^(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$] starting at [?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$]. I tested it, and tried it in a couple different online regex editors like Rubular, and it seems perfectly valid. I am creating the fields dynamically so ng-pattern is being set like this in the directive within ngRepeat. ng-pattern="{{field.format}}" if I change it to hardcoded regex it doesn't throw any errors: ng-pattern="/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/" But then I changed it to something ridiculously simple: ^[0-9]{3}$ And this works, so can't be dynamically created fields and related to just the regex.
tagged with: angularjs
has title: AngularJS ng-pattern throws error on regex for phone number
tagged with: regex
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26536936

http://stackoverflow.com/q/26629965
has answer: http://stackoverflow.com/a/26631353
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41868335
has comment: http://stackoverflow.com/comment/41868369
score: 1
has comment: http://stackoverflow.com/comment/41868509
has comment: http://stackoverflow.com/comment/41869058
upvote count: 1
type: Question
has body: I am binding a div with the image list which returned from server side method. Like below: $("#GalleryPhotos").append(" "); I will get complete url < img src= "/UploadedFiles/Gallery/CricketAlbum/5335.jpg" /> It is showing correctly if there is no space in file name, But in case if there is a space in file name it is rendering as: < img src="/UploadedFiles/Gallery/Birdst" album="" sample_05.jpg="" /> I tried javascript built in function encode like this src="+ encodeURI(data.d[i])+" But still my img getting rendered as in second case..Please help me somebody
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41868526
has comment: http://stackoverflow.com/comment/41868413
has title: Url encoding in javascript
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/26653115
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26652970
has comment: http://stackoverflow.com/comment/41909400
has body: You need to be careful where and when you do your JS computation Python C++ PHP Will give you 0, because the Javascript is called before any parsing of the HTML body by your browser. You need either : - to wait the page load Python C++ PHP or write this javascript at the end of the page : Python C++ PHP Even better is to write it at the end of the page with the window.onload. It will be shorter to reach the HTML part of your page and rendering would be faster (this is significant for large amount of JS, but in this case, you should do file inclusion)

http://stackoverflow.com/comment/41716263
comment on: http://stackoverflow.com/q/26546342
score: 0
type: Comment
type: QuestionComment
has text: Please define what does "show this div again at a later stage" mean.

http://stackoverflow.com/comment/41666851
comment on: http://stackoverflow.com/a/26518667
score: 0
type: AnswerComment
type: Comment
has text: Well, because when you have 2 paragraph tags in a div that is contenteditable then whenever you hit enter, it creates another paragraph. If you make each paragraph contenteditable then you won't be able to select multiple paragraphs...

http://stackoverflow.com/comment/41750122
type: QuestionComment
comment on: http://stackoverflow.com/q/26565386
has text: @dfsq No he wants time for that menu to stay..
score: 0
type: Comment

http://stackoverflow.com/q/26602850
accepted answer: http://stackoverflow.com/a/26602965
has title: Do not show default value of the input field
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41819068
tagged with: input
type: AnsweredQuestion
score: 0
has body: I have an input field &lt;input id='spe_count' type="text" placeholder="number" class="form-control" data-original-title="" title=""&gt; and as I need it to be by default with value -1 I am assigning it with jQuery $("#spe_count").val('-1'); And I get this input field and see this value -1 inside it, but what I want is that this input is with value -1, but on the page it would be empty or with placeholder. And when I am changing values, I'd like to do so, that deleting value, emptying the box means that it is default value -1 (not typing minus one , but simply deleting all the values mean this is minus one) Is this possible?
type: Question
has answer: http://stackoverflow.com/a/26602965
has comment: http://stackoverflow.com/comment/41818989
has comment: http://stackoverflow.com/comment/41818922
tagged with: forms
has comment: http://stackoverflow.com/comment/41818899
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41764108
has text: That first one with `document.getElementById('message').style.display = 'none';` works.. Thnks! but now it always stops!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26573065
type: Comment

http://stackoverflow.com/comment/41926998
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26662493
type: Comment
has text: **Boom**! That's it. Thank you for your help, Paulie_D. I did not know about the transform method. How compatible is it compared to just minusing the edges or using `calc()` to minus half the width?

http://stackoverflow.com/comment/41929973
score: 0
has text: try adding li in the jquery `jQuery('.thumbs li a')`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26664068

http://stackoverflow.com/comment/41768594
type: AnswerComment
has text: You may comment out the .css file call in the .html file
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26575375

http://stackoverflow.com/a/26603448
has body: You are in Javascript, you do not need to declare the size of your arrays, there is no propblems by adding/removing anything from an Object/Array. You should create a variable make then get the values in. Finally, you will be able to get it back. var make; $.each($("#store-filter input").serializeArray(), function(i, field) { make[i] = field.name; }); Later in your code, you will use the array make. make[0]; EDIT: Here is an example i did for you: http://jsfiddle.net/kjkzm8qm/ NOTE: Your $.each($("#store-filter input").serializeArray() ... is useless, you should select all your inputs by adding a class AND, you should END your input tags by adding a / at the end. HTML &lt;input name="test" class="inputs" /&gt; JAVASCRIPT $.each($(".inputs"), function(){ });
has comment: http://stackoverflow.com/comment/41821111
has comment: http://stackoverflow.com/comment/41820186
score: 0
has comment: http://stackoverflow.com/comment/41820632
has comment: http://stackoverflow.com/comment/41820369
has comment: http://stackoverflow.com/comment/41820666
type: Answer
answers question: http://stackoverflow.com/q/26603310
has comment: http://stackoverflow.com/comment/41820407

http://stackoverflow.com/q/26549942
has body: I'm trying to implement an HTML controller in my webapp that will upload files from the client to my azure blob storage. I know how to do it in the server side with C# but this solution isn't right for me because i'm dealing with a large volume files(that the client uploads), so I don't want to upload them to my server side, I want that the client will upload them straight to the blob storage. but here is where I'm lost, maybe you could help me. Objective: I need to grant SAS for that user. Solution: I call(using AJAX) to a server side method that generate the string (string - URL + SAS token) Now all is left to do is split the files to chunks and upload them giving the URL with the token that I generate on the server side. I read a lot of article about it but every article says different things, half of them was in the period that azure was not supporting CORS, so a huge amount of them out of date. How can I do the last two things in the right way : 1.Chunk the file. 2.Upload the file. One last thing i read in some article that i need to split the file to chunks and then upload all the chunks and then to commit or something all the chunks so its become one file in the storage.(maybe i got it in the worng way) anyway if somebody could help me with guidelines or anything that will help me overcome this two last jobs needed to be done *Update: The errors I get(1.OPTION 2. headers): Open the image in a new tab to see it properly *Update 2: This is how i set the CORS:
has comment: http://stackoverflow.com/comment/42103944
has comment: http://stackoverflow.com/comment/42091451
downvote count: 0
tagged with: blobstorage
has comment: http://stackoverflow.com/comment/42104635
tagged with: javascript
has comment: http://stackoverflow.com/comment/42104267
tagged with: azure
has comment: http://stackoverflow.com/comment/42104452
tagged with: file-upload
has comment: http://stackoverflow.com/comment/74599080
has comment: http://stackoverflow.com/comment/74545519
favorite count: 0
has comment: http://stackoverflow.com/comment/74635994
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42099133
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42091642
score: 2
has comment: http://stackoverflow.com/comment/42105805
tagged with: blob
has comment: http://stackoverflow.com/comment/42099384
has comment: http://stackoverflow.com/comment/74595402
has comment: http://stackoverflow.com/comment/41723577
has title: Upload To Blob Storage With Javascript(Client Browser) With SAS
type: Question
has comment: http://stackoverflow.com/comment/74611777

es6-promise
tags question: http://stackoverflow.com/q/26634654
tag name: es6-promise
tags question: http://stackoverflow.com/q/26667598
type: Tag

http://stackoverflow.com/a/26603678
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26603228
answers question: http://stackoverflow.com/q/26603228
has body: I think I see your problem. You are calling the Manager constructor asynchronously within itself, causing a stack overflow: function Manager(firstName,project) { setTimeout(Manager.call(this,firstName),5); this.project = project; }; This is a common problem and I've seen several variations of it. The manager is supposed to be assigned something 5 milliseconds later. Could it be one of your other types - Employee or Developer? Hope that helps!

http://stackoverflow.com/a/26537835
accepted answer of: http://stackoverflow.com/q/26536941
type: Answer
has comment: http://stackoverflow.com/comment/41701789
has body: The fix $ul.children('li').each(function(){ var $pic = $(this).children('img'); var height = $pic.outerHeight(); $pic.css({ marginTop: (200 - height)/2 + 'px' });//remove this line }); Because you need to remove margin-top: -100px; in img tag also add vertical-align: middle; carousel li has padding: 5px; in your case you dont need padding top and bottom but it is a optional to give hover affect
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26536941

http://stackoverflow.com/comment/41922010
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26659418
has text: Then what is the problem? As long as you have two controls - one for one list, and one for the other, I don't see any issues arising from what you're describing...
type: Comment

http://stackoverflow.com/comment/41755247
type: Comment
type: QuestionComment
has text: I only need it to handle IE9 and upwards
score: 0
comment on: http://stackoverflow.com/q/26567729

http://stackoverflow.com/a/26585286
has comment: http://stackoverflow.com/comment/41787209
has comment: http://stackoverflow.com/comment/41787126
answers question: http://stackoverflow.com/q/26584881
type: Answer
score: 1
has body: Make an array mapping your Openning time, with 0 is Sunday var openTime = [ {open : -1, close : -1}, { open: 9, close : 18 }, { open: 9, close : 18 }, { open: 9, close : 18 }, { open: 9, close : 18 }, { open: 9, close : 18 }, { open: 10, close : 16.5 } ] then check it when user come to page. var current = new Date(); var day = current.getDay(); var currentTime = current.getHours() + (current.getMinutes()/60); var remainTime = 0; if (openTime[day].open &gt;= 0 &amp;&amp; openTime[day].open &lt; currentTime &amp;&amp; openTime[day].close &gt; currentTime) { remainTime= (openTime[day].close - currentTime).toFixed(2) } console.log("the shop will close in %s hours", remainTime);
accepted answer of: http://stackoverflow.com/q/26584881
upvote count: 1
has comment: http://stackoverflow.com/comment/41786231
has comment: http://stackoverflow.com/comment/41787069
has comment: http://stackoverflow.com/comment/41787624
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41844985
has text: Can you use PhantomJS? It could run the whole javascript and you could later use the full urls to download the images. If you are interested, I can provide an example.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26616826

http://stackoverflow.com/comment/41812409
has text: Yup! That'd certainly work! I was mostly looking for an in-regex answer, but thanks! :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26598973
type: Comment

http://stackoverflow.com/comment/41821205
type: Comment
comment on: http://stackoverflow.com/q/26604051
has text: Which version of jQuery are you using?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42022288
type: Comment
score: 0
type: AnswerComment
has text: .simulate() has shown inconsistent results in IE 9 and above. For this reason alone I can't rely on in completely for cross-platform design. Triggering the event on the node itself makes sure it will work.
comment on: http://stackoverflow.com/a/26714700

backbone.js
tags question: http://stackoverflow.com/q/26631959
tags question: http://stackoverflow.com/q/26560269
tags question: http://stackoverflow.com/q/26557551
tags question: http://stackoverflow.com/q/26553242
tags question: http://stackoverflow.com/q/26642318
tags question: http://stackoverflow.com/q/26531060
tags question: http://stackoverflow.com/q/26516690
tags question: http://stackoverflow.com/q/26534139
tags question: http://stackoverflow.com/q/26656150
tags question: http://stackoverflow.com/q/26634045
tags question: http://stackoverflow.com/q/26558409
tags question: http://stackoverflow.com/q/26632124
tags question: http://stackoverflow.com/q/26612673
tags question: http://stackoverflow.com/q/26591510
tags question: http://stackoverflow.com/q/26537634
tags question: http://stackoverflow.com/q/26532679
tags question: http://stackoverflow.com/q/26518030
tags question: http://stackoverflow.com/q/26591323
tags question: http://stackoverflow.com/q/26571277
tags question: http://stackoverflow.com/q/26637191
tags question: http://stackoverflow.com/q/26584561
tags question: http://stackoverflow.com/q/26571733
tags question: http://stackoverflow.com/q/26657823
tags question: http://stackoverflow.com/q/26537493
tags question: http://stackoverflow.com/q/26552080
tags question: http://stackoverflow.com/q/26514177
tags question: http://stackoverflow.com/q/26656623
tags question: http://stackoverflow.com/q/26567673
tags question: http://stackoverflow.com/q/26569601
tags question: http://stackoverflow.com/q/26626032
tags question: http://stackoverflow.com/q/26634932
tags question: http://stackoverflow.com/q/26620339
tags question: http://stackoverflow.com/q/26606146
tags question: http://stackoverflow.com/q/26517870
tags question: http://stackoverflow.com/q/26611730
tags question: http://stackoverflow.com/q/26649538
tags question: http://stackoverflow.com/q/26563847
tags question: http://stackoverflow.com/q/26548410
tags question: http://stackoverflow.com/q/26644571
tags question: http://stackoverflow.com/q/26615861
tags question: http://stackoverflow.com/q/26563644
tags question: http://stackoverflow.com/q/26606047
tags question: http://stackoverflow.com/q/26550963
tags question: http://stackoverflow.com/q/26655390
tags question: http://stackoverflow.com/q/26666534
tags question: http://stackoverflow.com/q/26572885
tags question: http://stackoverflow.com/q/26658217
tags question: http://stackoverflow.com/q/26528502
tags question: http://stackoverflow.com/q/26514982
type: Tag
tags question: http://stackoverflow.com/q/26590632
tags question: http://stackoverflow.com/q/26571989
tags question: http://stackoverflow.com/q/26534647
tags question: http://stackoverflow.com/q/26524589
tags question: http://stackoverflow.com/q/26517232
tags question: http://stackoverflow.com/q/26650501
tags question: http://stackoverflow.com/q/26660361
tags question: http://stackoverflow.com/q/26525652
tags question: http://stackoverflow.com/q/26565893
tags question: http://stackoverflow.com/q/26515863
tags question: http://stackoverflow.com/q/26623163
tag name: backbone.js

http://stackoverflow.com/comment/41669781
score: 1
type: AnswerComment
type: Comment
has text: Whoops, can't believe I missed that. Thanks to you good sir :)
comment on: http://stackoverflow.com/a/26520216

http://stackoverflow.com/comment/41963827
comment on: http://stackoverflow.com/a/26664791
score: 0
type: AnswerComment
type: Comment
has text: This helps alot only one problem the events that are already in the list stopped working any idea why?

http://stackoverflow.com/comment/41826591
score: 0
comment on: http://stackoverflow.com/q/26606916
has text: Have you tried in CSS border:0 for your element? Or in html attributes border="0"?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26531664
has answer: http://stackoverflow.com/a/26532362
type: AnsweredQuestion
has title: tab.url.indexOf to check if URL contains specific string in an Extension
type: Question
answer count: 1
tagged with: javascript
has body: I'm trying to inject a script into a webpage if the current url contains a specific string. The webpage I'm trying to do this on: http://s128-en.ogame.gameforge.com/game/index.php?page=galaxy The background.js chrome.tabs.onUpdated.addListener(function(id, info, tab){ if (tab.status !== "complete"){ return; } if(tab.url.indexOf("galaxy") != -1){ chrome.tabs.executeScript(tab.id, {"file": "findtarget.js"}); console.log("injected"); } }); For some reason it never injects the script. What am I missing here?
tagged with: get
score: 0
tagged with: google-chrome-extension
tagged with: url
accepted answer: http://stackoverflow.com/a/26532362

http://stackoverflow.com/q/26605466
tagged with: magento
score: 1
has body: I have been stuck on this problem for a while now. I have a developing environment, where I've added a lazy load script to a rather large file that was developed for the site by an external party. Everything works on all pages but one - on that site a lot of the functions suddenly aren't defined, and I am puzzled to say at the least. One of the working pages is: (Site removed due to local developing environment) The page where I get the error in the console is: (Site removed due to local developing environment) The file is jquery.main.js The only thing that has happened is that we've upgraded from 1.8.3 to 1.11.0 jquery - but since it works on all the other sites, I would be surprised if that was the problem. Any help would be greatly appreciated.
type: Question
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26605910
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Two pages, one jQuery script, error on one site
has answer: http://stackoverflow.com/a/26605910
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/41930929
has text: I performed the code update. I get this error when i click update. GET SITE_ROOTscripts%5Cjquery-ui-1.10.4.custom%5Cjsjquery-ui-1.10.4.custom.min.js [HTTP/1.1 404 Not Found 44ms]
type: Comment
comment on: http://stackoverflow.com/a/26664227
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41794851
type: QuestionComment
has text: Is it only the `º` character you are trying to decode? Or is it all encoded characters?
comment on: http://stackoverflow.com/q/26589931
score: 0
type: Comment

http://stackoverflow.com/comment/41901479
has text: haha, ok, cool tip. ;)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26647876
score: 0

http://stackoverflow.com/a/26553312
has comment: http://stackoverflow.com/comment/41736608
type: Answer
has body: When JavaScript is completely unhighlighted, the filetype probably isn't set right. Check with :setl ft?; it needs to be javascript. Also, with the default syntax script, conditionals should be linked to the Conditional highlight group. You need to find out which syntax group causes the highlighting. :syn list shows all active groups, but it's easier when you install the SyntaxAttr.vim - Show syntax highlighting attributes of character under cursor plugin. Lastly, you don't need the mentioned AfterColors plugin to just customize some syntax groups. The :hi commands in your ~/.vimrc should be fine (unless you switch colorschemes on the fly). As I understand the plugin, that is to customize some generic highlight groups (like Conditional or Statement). Syntaxes should just :syn link to those.
has comment: http://stackoverflow.com/comment/41736475
has comment: http://stackoverflow.com/comment/41789395
score: 0
accepted answer of: http://stackoverflow.com/q/26552598
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26552598

http://stackoverflow.com/a/26576791
score: 0
type: AcceptedAnswer
type: Answer
has body: The sequence ef bf bd is the UTF-8 sequence for the "Unicode replacement character", which Unicode encoders use to represent invalid encodings. It sounds like whatever method you're using to download the data is getting accidentally run through a UTF-8 decoder and corrupting the raw datastream. Be sure you're using blob instead of text, or whatever the equivalent is for the way you're downloading the bytecode. This got messed up only for negative values because positive values are within the normal mapping space of UTF-8 and thus get translated 1:1 from the original byte stream.
answers question: http://stackoverflow.com/q/26576491
has comment: http://stackoverflow.com/comment/41771686
accepted answer of: http://stackoverflow.com/q/26576491
has comment: http://stackoverflow.com/comment/41778439
has comment: http://stackoverflow.com/comment/41815393

http://stackoverflow.com/comment/41787256
type: QuestionComment
type: Comment
has text: It should retain the value. So it gets the content from stage2 into the scene and so on. Kinda like this http://jsfiddle.net/hKMFb/24/ But it should work on one button only.
comment on: http://stackoverflow.com/q/26585888
score: 0

http://stackoverflow.com/comment/41664524
score: 0
type: AnswerComment
has text: No, `var` would make just local scope variable which will not be available outside.
comment on: http://stackoverflow.com/a/26517258
type: Comment

http://stackoverflow.com/q/26515366
accepted answer: http://stackoverflow.com/a/26515772
tagged with: ajax4jsf
answer count: 1
tagged with: jsf
score: 0
has answer: http://stackoverflow.com/a/26515772
has title: How disable a <h:selectBooleanCheckbox> pressing a <a4j:commandButton> in jsf
has body: &lt;a4j:form id="formNC"&gt; &lt;rich:panel style="width: 100%"&gt; &lt;h:selectBooleanCheckbox value="#{crearCitaMB.booleanCheck"&gt; &lt;a4j:commandButton value="DisableCheck" action="#{testBean.methodCalculate}" /&gt; &lt;/rich:panel&gt; &lt;/a4j:form&gt; my question is simple: can I "disable" not "hide" selectBooleanCheckbox when I press commandButton ... I do not know how make this yet. Can this be done with aj4:support or javascript?
tagged with: javascript
type: Question
type: AnsweredQuestion
tagged with: richfaces

http://stackoverflow.com/a/26589569
has comment: http://stackoverflow.com/comment/68414181
has comment: http://stackoverflow.com/comment/68415336
answers question: http://stackoverflow.com/q/26587588
has comment: http://stackoverflow.com/comment/68444442
has comment: http://stackoverflow.com/comment/68448343
has body: Both loadComplete and gridComplete will be called event if the server returns empty results. If it's not happens in your grid then the results returned from the server are probably wrong. I recommend you to include loadError callback to the grid to verify this. See the answer for more details about loadError. After you will fix the problem I would recommend you to use loadComplete to show the message which you need. Look at the demo created for the answer. It demonstrate an option how such message can be displayed.
has comment: http://stackoverflow.com/comment/68448966
has comment: http://stackoverflow.com/comment/41800557
has comment: http://stackoverflow.com/comment/68444208
score: 0
has comment: http://stackoverflow.com/comment/68886955
has comment: http://stackoverflow.com/comment/41801395
type: Answer

http://stackoverflow.com/q/26642565
has answer: http://stackoverflow.com/a/26643167
has body: var barcodeNum = ko.observable(""); VelocityMeetings.scan = function (params) { var errorMessage = ko.observable(""); var viewModel = { errorMessage: errorMessage, scannumber: ko.observable(""), errorVisible: ko.computed(function () { return errorMessage().length != 0; }), scanBarcode: function () { //Capture image with device and process into barcode capturePhoto(); this.scannumber(barcodeNum()); //this.errorMessage(errMessage); }, }; return viewModel; }; I have the barcodeNum variable created outside of the view model, to try and pass data back into the scannumber variable. How do I access a variable defined inside of a view model? The goal is to use the javascript Worker I have, to update the scannumber which will update my app accordingly, but I can't get it to function properly. function receiveMessage(e) { barcodeNum("Test function"); } var DecodeWorker = new Worker("js/BarcodeScanner.js"); DecodeWorker.onmessage = receiveMessage; The goal is something along the lines of this VelocityMeetings.scan.viewModel.scannumber(barcodeNum()); but this isnt working properly
has answer: http://stackoverflow.com/a/26643857
tagged with: cordova
type: UnansweredQuestion
type: Question
tagged with: knockout.js
score: 0
answer count: 2
has title: knockout cross view model
tagged with: javascript

http://stackoverflow.com/comment/41895491
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26644661
score: 0
has text: If you want to to do this just using angular, `keyup` and `focus` will only be avaiable using angular `elm.bind()` if you include [angular ui](http://angular-ui.github.io/)

http://stackoverflow.com/q/26581156
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41798769
upvote count: 1
has title: Merge two bower.json files
has comment: http://stackoverflow.com/comment/41779310
has body: I need to merge my two projects into one folder and I have two bower files that have some conflict dependencies. Copy and pasting will not work then with these conflicts. Is there any automate way to merge two bower.json files?
favorite count: 0
type: UnansweredQuestion
tagged with: bower
has comment: http://stackoverflow.com/comment/41779245
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41779270

http://stackoverflow.com/comment/41719324
type: AnswerComment
comment on: http://stackoverflow.com/a/26547751
score: 0
has text: @DanielEarwicker, you are right, computed will notify changes only if they track observables. When using a plain js variable as backing field, nothing is tracked. Answer fixed.
type: Comment

http://stackoverflow.com/q/26672503
tagged with: javascript
has comment: http://stackoverflow.com/comment/41945090
score: 0
has comment: http://stackoverflow.com/comment/41945991
answer count: 2
has body: My code returns a list of JS objects as JSON through AJAX. This list is parsed using JSON.parse and saved in a variable. var myListOfObjects = [ {"id":1,"Name":"John","xcoord":23.7,"ycoord":37.2}, {"id":2,"Name":"Mary","xcoord":17.7,"ycoord":54.6}, .... ]; What is the best way to associate the same method to each of these objects, so that it can be called when I iterate over them: myListOfObjects.forEach( function(person){ console.log( person.getDistance() ); } ); I could define the parameter at each iteration but this doesn't seem efficient and is not easy to implement with d3js (it would require reiterating over the list a first time before binding it to a DOM selection). Thanks.
has title: Associate a method to each item in a list of JSON objects
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26674831
has answer: http://stackoverflow.com/a/26672573
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26674831
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41945570
accepted answer: http://stackoverflow.com/a/26672573

http://stackoverflow.com/q/26672191
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41944549
duplicate of: http://stackoverflow.com/q/14946091
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am designing a web application form .In that i am using HTML5 calender element.it working fine now.but my project requirement is ,i need to change the inner color of HTML5 calender like below images . what i am getting in output ![enter image description here][1] required output ![enter image description here][2] can you any one help me in that note: i need to use only HTML5 calender element(&lt;input type="date" name="date"&gt;)
has comment: http://stackoverflow.com/comment/41956384
has answer: http://stackoverflow.com/a/26673246
accepted answer: http://stackoverflow.com/a/26673246
has title: How to apply custom color for HTML5 calender?
tagged with: css
has comment: http://stackoverflow.com/comment/41944865
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14946091
type: Question
has comment: http://stackoverflow.com/comment/41944983

http://stackoverflow.com/q/26597865
favorite count: 0
type: UnansweredQuestion
score: -2
has answer: http://stackoverflow.com/a/26598192
downvote count: 2
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41810424
has title: Pulling an Array from API (Twitch)
tagged with: http://stackoverflow.com/tag/html
tagged with: twitch
answer count: 1
has body: I am in no way a coder, all I know how to do is manipulate a bit of code to work, I managed to pull a Live Follower and Views from Twitch's API, but I am having trouble with this code that pulls the Live Viewers... It doesn't seem to want to work. I don't know how to look in Googles' Inspect Element to see what's wrong, and I don't know how to fix it. Do you see anything wrong with this code? jQuery(document).ready(function ($) { $('.views').each(function () { var tnick = $(this).data('tnick'); var span = $(this).next(); $.getJSON('https://api.twitch.tv/kraken/streams/' + tnick + '.json?callback=?', function (data) { var views = data.viewers; span.html(views); }); }); }); And the HTML 0 I have multiple users on the site, so I need it to take the parameters from the HTML, but even without the Parameters from HTML and having it in the Code, it still won't call the data. JSFiddle

http://stackoverflow.com/a/26657550
has body: First of all, move the definitions out of the function, or they won't be accessible at all. Now that they're global, you can access them like: window[selectedList + 'array']
type: Answer
answers question: http://stackoverflow.com/q/26657481
has comment: http://stackoverflow.com/comment/41917373
score: 0

http://stackoverflow.com/q/26667572
answer count: 1
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/26670320
score: 0
has body: I am giving the customer an url. when he clicks in the url, a page is loaded, with the following iframe &lt;iframe id="downloadIFrame" style="display: none" src="file_url.csv"&gt;&lt;/iframe&gt; the file:"file_url" is downloaded. while downloading, many things can go wrong(pop-up blocker, customer clicks on cancel, url is corrupt etc). I want to check that if the download was successful or not I have tried onload() and document.getElementById('downloadIFrame').onreadystatechange = MyIframeReadyStateChanged; function MyIframeReadyStateChanged() { if(document.getElementById('downloadIFrame').readyState == 'complete') { alert('new'); } } these are not working does anyone have an idea how to do it ? Thanks.
type: UnansweredQuestion
tagged with: iframe
type: Question
has title: how to verify if download was succeessful in frame

http://stackoverflow.com/q/26540700
has comment: http://stackoverflow.com/comment/41707382
has comment: http://stackoverflow.com/comment/41706937
tagged with: node.js
answer count: 0
upvote count: 1
downvote count: 1
type: Question
has body: I'm new with nodejs,I have some issues and please help me before listing my issues, I've searched for some demo like dailyjs.com/2012/05/03/windows-and-node-1/ blueashes.com/2011/web-development/install-nodejs-on-windows/ nodejs.org/ .... etc.. With first demo "Hello world" I can run nodejs server by command line, browser print "Hello world" on the screen. With next project demo on github for example github.com/scotch-io/node-todo/tree/tut2-structure I use command: > node path/server.js but it responses error 340 So I have 3 questions want to ask: 1 - How can I run this demo project, I've searched for 2 days and I have no any idea how to run it 2 - How can I control server like press F5 in Visual Studio then build project and run 3 - Is there any tool to manage nodejs project (I've not searched for this question, just want to have a recommend but I'm prefer coding with notepad++ ) I'm very appreciate with your help Edit 1: After searching more solution, finally I can run this demo project by using command and this is answer for question 1 npm install express [path to project] but question 2 and 3 not yet
tagged with: javascript
has comment: http://stackoverflow.com/comment/41706471
score: 0
favorite count: 0
has title: How to run nodejs demo project on window 7
type: UnansweredQuestion

http://stackoverflow.com/q/26657057
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26661976
tagged with: pouchdb
tagged with: promise
tagged with: angularjs
linked to: http://stackoverflow.com/q/22519784
type: Question
has title: How to return an object to the controller from a factory that uses PouchDB
answer count: 1
tagged with: indexeddb
score: 0
has comment: http://stackoverflow.com/comment/41917230
has body: I have a angularJS factory created to insert and get some values from IndexedDB. I can successfully insert the values to the IndexedDB. But when i try to get the values out of the DB and pass it to the controller i face problems. factory.getAllProgressData = function() { var dbOptions = {}; dbOptions.include_docs = true; var output = {}; var result = {}; pouchDb.allDocs(dbOptions, function(err, res) { if (err) console.log(err); if(res) { output.weight = getWeightValues(res.rows); console.log(output); // &lt;== This console line prints the object } }); console.log(output); // &lt;== This console line does NOT print the object return output; }; var getWeightValues = function(rows) { var weightValues = []; for (var i = 0; i &lt; rows.length; i++) { weightValues.push(rows[i].doc.Weight); }; return weightValues; }; As you can see in the comments of the code, when i print the object to the console at the first place it prints. But when i try to do it bellow it doesn't print. And the return value is also empty. I'm very new to javascript and this behavior is not clear to me. I want the result object to be returned to the Controller. Please help. Thanks in advance.
tagged with: javascript

http://stackoverflow.com/comment/41833142
type: Comment
comment on: http://stackoverflow.com/a/26610463
score: 0
type: AnswerComment
has text: @KishorePaparthi There you go I edited it to display current date and time! Hope this helps!

http://stackoverflow.com/a/26604504
has comment: http://stackoverflow.com/comment/41822659
has comment: http://stackoverflow.com/comment/41823036
score: 0
has comment: http://stackoverflow.com/comment/41824638
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41822751
type: Answer
has body: The problem might be with your encoding: chunks.push(decipher.update(txt,'hex','binary')); hex looks strange, since your inputs are buffers, not strings. The following quick test works (also answers 2.): php: $key = 'secretsecretsecr'; $string = 'attack at dawn'; $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $blockSize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $padding = $blockSize - (strlen($string) % $blockSize); $string .= str_repeat(chr($padding), $padding); $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key,$string, MCRYPT_MODE_CBC, $iv); $packet = chr($iv_size) . $iv . $ciphertext; print base64_encode($packet); node: var crypto = require('crypto'); var key = 'secretsecretsecr'; var data = 'paste what the php code printed'; var txt = new Buffer(data,'base64'); var iv_size = txt[0]; var iv = txt.slice(1, iv_size + 1); var ct = txt.slice(iv_size + 1); var decipher = crypto.createDecipheriv('aes-128-cbc',key,iv); var chunks = []; chunks.push(decipher.update(ct)); chunks.push(decipher.final()); console.log(chunks.join('')); The passes the iv size along, you can also simply hardcode it on the node side. Regarding 3), I am by no means an expert, from what I've read the workaround is to sign your encrypted packets with HMAC to make sure they're coming from your application and not from the "oracle" (http://www.ietf.org/id/draft-mcgrew-aead-aes-cbc-hmac-sha2-05.txt).
answers question: http://stackoverflow.com/q/26603544
has comment: http://stackoverflow.com/comment/41822542
has comment: http://stackoverflow.com/comment/41824227
accepted answer of: http://stackoverflow.com/q/26603544
has comment: http://stackoverflow.com/comment/41824533

http://stackoverflow.com/a/26672573
answers question: http://stackoverflow.com/q/26672503
has comment: http://stackoverflow.com/comment/41949090
has comment: http://stackoverflow.com/comment/41949248
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Write a getDistance(person); so don't put it in the person objects, but somewhere centralised
accepted answer of: http://stackoverflow.com/q/26672503

http://stackoverflow.com/a/26672392
type: Answer
has body: First close your anchor Tags Test1 Test2 Test3 then use this javascript function function myJavascriptFunc(item) { alert(item.getAttribute("data")); return false } and let me know if it works
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26672104
accepted answer of: http://stackoverflow.com/q/26672104
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41945197

http://stackoverflow.com/comment/41816430
type: Comment
has text: So you didn't do what I asked. No need to comment your DIV. Just leave it there. And, don't add a new DIV with Style (I suggested this thinking that you didn't have a div). Then follow the steps in my updated answer (Update 2)
comment on: http://stackoverflow.com/a/26582215
score: 0
type: AnswerComment

http://stackoverflow.com/q/26558111
tagged with: video-streaming
tagged with: javascript
score: 0
tagged with: webrtc
has comment: http://stackoverflow.com/comment/41800895
type: UnansweredQuestion
has body: I am currently implementing a multiplex server for WebRTC audio/video connections. Every peer that wants to participate in a conference call sends its MediaStream via a PeerConnection to the server. The server puts those connections into a pool of all received connections and sends them out to the connected peers. So far, so good. Now it gets interesting. When I use a MediaStream from the pool as the streaming source for a new connection, I get an error that says: 'Failed to execute addStream on RTCPeerConnection: Unable to add the provided stream.' So I did the following approach: Instead of pooling the received MediaStream, I cloned it and pooled the clone. Still fails. Instead of sending a pooled MediaStream, I've sent the webcam stream of the server (runs locally atm) and it worked. Instead of sending a pooled MediaStream, I took the webcam stream, cloned it, removed the VideoTrack, added the VideoTrack of the pooled stream, sent this Frankenstein-Stream, worked. Also swapped the AudioTrack in the same way, fails. Instead of swapping the AudioTrack, I just added the track from the pooled stream without removing the original one, failed. What the hell? I know that there are projects like Licode, which implement MUC server for WebRTC. But when using it, I lose lots of freedom concerning the server side, which is not desired in this project. So does anyone of you have any idea what's going wrong? What is the problem with simply forwarding a MediaStream that I received? Best, Felix
has comment: http://stackoverflow.com/comment/41798138
answer count: 0
has title: Forwarding a Javascript MediaStream
type: Question

http://stackoverflow.com/q/26524150
has body: Basically I have to find out how old someone is in months, years and days. I have worked out the days and years but not the months as there're leap years and some months are different in length. Here is my code //Variables var now = new Date(); var totalDays = ''; var totalMonths = ''; var totalWeeks; var birthDate = new Date(document.getElementById('selYear').value, document.getElementById('selMonth').value, document.getElementById('selDay').value); var output = ''; //Total Days Old var totalDays = Math.floor((now - birthDate) / 86400000); //Total Weeks Old totalWeeks = totalDays / 7; totalWeeks = Math.round(totalWeeks); //Total Months Old totalMonths = totalDays / 30; //Total Years var totalYears = document.getElementById('selYear').value - now.getFullYear(); totalYears = Math.abs(totalYears); //Outputs output += 'You are ' + totalDays + ' days old'; output += '&lt;br /&gt;You are ' + totalWeeks + ' weeks old'; output += '&lt;br /&gt;You are ' + totalMonths + ' months old'; output += '&lt;br /&gt;You are ' + totalYears + ' Years old'; I've thought of using if statements or a for loop and i've searched all of google and I can't find a way! I have an application that asks the user for day, month and year. I have tested my current code (totalMonths = totalDays / 30) and it will get close to the totalMonths that it's suppose to be (I have checked an online site) and the date [1/1/1990] will fetch 302 while it should fetch 297 months
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26525015
has comment: http://stackoverflow.com/comment/41676739
tagged with: javascript
linked to: http://stackoverflow.com/q/17732897
score: 0
has answer: http://stackoverflow.com/a/26525139
possible better answer: http://stackoverflow.com/a/26525139
accepted answer: http://stackoverflow.com/a/26525015
has title: Find total number of months from a set amount of days
type: AnsweredQuestion
tagged with: formula

timer
tag name: timer
tags question: http://stackoverflow.com/q/26596842
tags question: http://stackoverflow.com/q/26586325
type: Tag
tags question: http://stackoverflow.com/q/26563315
tags question: http://stackoverflow.com/q/26532927
tags question: http://stackoverflow.com/q/26567808
tags question: http://stackoverflow.com/q/26664708
tags question: http://stackoverflow.com/q/26625273
tags question: http://stackoverflow.com/q/26580509

http://stackoverflow.com/q/26579592
tagged with: event-handling
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41776682
answer count: 0
has title: Call being fired twice the second time the view being loaded and three time the third time without clearing the cache
type: Question
tagged with: javascript
has body: I'm having issue with this code and function sendViewedUpdatesToAnalytics being fired twice the second time I land on the view and three time when I land the third time without clearing the cache. Can someone help me? initialize : function(){ this.app.events.on('page:ready', this.onPageReady, this); }, 'onPageReady': function(){ var sendViewedUpdatesToAnalytics = function(e){ iCount++; viewportTop = $(document).scrollTop(); e.preventDefault(); if( updateOffset >= viewportTop && updateOffset <= viewportTop + windowHeight ){ console.log('hello world'); } } window.addEventListener("scroll", sendViewedUpdatesToAnalytics, false); }
has comment: http://stackoverflow.com/comment/41776814
has comment: http://stackoverflow.com/comment/41776746
score: 0
tagged with: jquery-events
has comment: http://stackoverflow.com/comment/41776712
tagged with: events

http://stackoverflow.com/comment/41732655
comment on: http://stackoverflow.com/q/26555046
score: 0
type: Comment
type: QuestionComment
has text: Apologies for the confusion. When it comes in as 1 I want it to work as normal. When the showOptions != 1 I want it to sort of reverse, so it would start out with the opposite class and the click would start on the opposite click, so if when I land normally I have the class of saSubPromptOpen and !showNow, when showOptions != 1, the item would start with saSubPromptClosed and showNow (keep in mind this is in a repeat). Hopefully that clears things up, thanks! @AhsanAyaz

http://stackoverflow.com/a/26568749
type: Answer
has body: Your returned data is array. So HTML should look something similar to this: Email is {{ u.email }} password is {{ u.password }}
has comment: http://stackoverflow.com/comment/41756617
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26568723
answers question: http://stackoverflow.com/q/26568723
score: 0

http://stackoverflow.com/q/26584424
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41784544
accepted answer: http://stackoverflow.com/a/26584523
type: Question
has comment: http://stackoverflow.com/comment/41784635
has title: PHP function not getting called through ajax
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has body: I have ajax call to PHP function as : $.ajax({ url: 'Link', type: 'POST', dataType : 'json', data: {'txtFromOrderDate' : '2014-08-01','txtToOrderDate' : '2014-08-05'}, success: function() { window.location = 'Link'; } }); PHP function as: public function createZipAction($txtFromOrderDate,$txtToOrderDate) { date_default_timezone_set('Australia/Melbourne'); $date = date('m:d:Y H:i:s', time()); $exportBatch = $date; $order = $this-&gt;getTableGateway('order'); $select = new Select(); $select-&gt;from('order') -&gt;join('user', 'order.user_id = user.id', array('email')) -&gt;where ("order.created between ".$txtFromOrderDate." and '2014-08-03' "); //-&gt;where ('order.created between '.$txtFromOrderDate.' and '.$txtToOrderDate); $data = $order-&gt;selectWith($select)-&gt;toArray(); $batchDir = __DIR__ . '/../../../../../data/export/batch/' . $exportBatch; if(is_dir($batchDir) == false) mkdir($batchDir); $csvFile = fopen($batchDir . '/order.csv', 'w'); $i = 0; foreach($data as $record) { if($i==0) fputcsv($csvFile, $this-&gt;getCsvHeader($record)); fputcsv($csvFile, $this-&gt;updateCsvLine($record)); $pngTmpFile = $this-&gt;saveTmpImage($record['plate_id']); $this-&gt;savePlatePdf($pngTmpFile, $exportBatch, $record['id']); unlink($pngTmpFile); $i++; } fclose($csvFile); $filter = new \Zend\Filter\Compress(array( 'adapter' =&gt; 'Zip', 'options' =&gt; array( 'archive' =&gt; $batchDir . '.zip' ) )); $filter-&gt;filter($batchDir); $fileToDownload=$batchDir . '.zip'; $this-&gt;downloadOrderCSVAction($fileToDownload); echo "exported: $i records."; die(); } Here when i supply dates to this function, Its not getting dates. But when i write dates hard-code in php function as: $txtFromOrderDate='2014-08-01' $txtToOrderDate='2014-08-05' Then further function works as expected. what can be the issue??? Please help me.
has answer: http://stackoverflow.com/a/26584523
tagged with: php

http://stackoverflow.com/q/26648411
has comment: http://stackoverflow.com/comment/41901532
has title: offset.top value different in document ready and console.log() why?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26648504
score: 2
type: AnsweredQuestion
has body: in my case, my about page is parallax moving well every section when i'm click on about's sub menu (submenu for same page #link). but in my site home page has the same submenu if somebody click on the submenu first goto about page then the exact position. I make it almost done. but offset().top not giving me the exact value. so I stuck. I console to see offset.top value when document ready.. help me to understand why this happen??? thanks in advance. sorry for poor english my site is here http://doitte.com/delatest/
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
upvote count: 2
tagged with: offset
answer count: 1
has answer: http://stackoverflow.com/a/26648504

http://stackoverflow.com/q/26606568
has comment: http://stackoverflow.com/comment/41825612
has comment: http://stackoverflow.com/comment/41825756
tagged with: grails
tagged with: ajax
has comment: http://stackoverflow.com/comment/41826012
tagged with: http-post
upvote count: 1
has title: jQuery click handler not executing AJAX POST
has comment: http://stackoverflow.com/comment/41825660
has comment: http://stackoverflow.com/comment/41825605
favorite count: 0
has comment: http://stackoverflow.com/comment/41825702
has answer: http://stackoverflow.com/a/26606786
has body: Note: I personally prefer jQuery instead of $; it's more typing but I find it more readable. I have a simple form that lets the user enter their first/last names and email address. It has a "Save" button, that, when clicked, executes: jQuery('#saveButton').click(function() { alert('About to Save to server'); var validated = validateContact(); if(!validated) { alert('Did not validate!'); return; } else { alert('Validated!'); } jQuery().ajax({ url: "saveContact", type:"post", dataType: 'json', data: { contact: { firstName: jQuery('#firstName').val(), lastName: jQuery('#lastName').val(), emailAddress: jQuery('#emailAddress').val() } }, success: function(result) { jQuery('#firstName').val(""); jQuery('#lastName').val(""); jQuery('#emailAddress').val(""); }, error: function(xhr){ alert(xhr.responseText); } }); alert('Saved to server'); }); When I click the "Save" button, I get several alert popups, including the "Validated!" message, however the script seems to die shortly after that, and I never see the "Saved to server" alert. This tells me my jQuery/AJAX call is bad. Furthermore, when I open my browser's Developer Tools, I don't see the browser actually making a network POST to my backend. In the console I don't see any errors. Any ideas as to where I'm going wrong and why I'm not even seeing any network activity?
possible better answer: http://stackoverflow.com/a/26606786
linked to: http://stackoverflow.com/q/20209460
has comment: http://stackoverflow.com/comment/41825787
has comment: http://stackoverflow.com/comment/41826100
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41825894
has answer: http://stackoverflow.com/a/26606758
accepted answer: http://stackoverflow.com/a/26606758
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26666391
type: UnansweredQuestion
score: 2
tagged with: traceur
has body: Is it ready for using in production? Especially for large applications. As i understand - yes. But it would be great to get more details. Also there are two ways to use it: runtime pre-compilation How much more time will take runtime execution than pre-compilation? As I tested, it is near x10-15 times but may be somebody has other info?
type: Question
has title: Traceur compiler for production
upvote count: 2
tagged with: ecmascript-6
answer count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/26665210
favorite count: 0
has answer: http://stackoverflow.com/a/26667076

http://stackoverflow.com/a/26578287
accepted answer of: http://stackoverflow.com/q/26578159
has comment: http://stackoverflow.com/comment/41779384
type: AcceptedAnswer
score: 0
type: Answer
has body: If you don't need some advanced functionality (interactivity) for this visualization, maybe some library could be an overkill. If this case was my task, I would roll my own simple visualization in JavaScript or jQuery. For more advanced visualization, I would use the D3 library.
answers question: http://stackoverflow.com/q/26578159

http://stackoverflow.com/comment/41914764
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26645638
score: 0
has text: How are you planning to validate your form, in which action.

http://stackoverflow.com/comment/42578387
type: Comment
has text: I wanted to do asset substitution to avoid excessive commits of script files when working in SharePoint and was disappointed to learn Chrome doesn't have this feature. I ended up using Charles Web (http://www.charlesproxy.com/documentation/tools/map-local/) which works great.
comment on: http://stackoverflow.com/a/26516304
score: 5
type: AnswerComment

http://stackoverflow.com/q/26549071
downvote count: 0
has body: I attempt to combine sunburst with edges. Here is what I have done right now: http://www.csee.umbc.edu/~yongnan/untitled/ringLevel.html when you mouseover on the red dots it will highlight related links. In the program, dots has bind mouse over event. Also the arc of the sunburst also bind the mouseover enent, I want to mouse over the arc, then trigger the mouse over event on the node, how can I accomplish? Any suggestion is appreciated, thanks.
tagged with: sunburst-diagram
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
type: Question
has title: d3.js mouse over one node to trigger another node's mouse over event
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26552080
type: Question
downvote count: 0
tagged with: javascript
answer count: 2
tagged with: marionette
has answer: http://stackoverflow.com/a/26552665
favorite count: 0
has answer: http://stackoverflow.com/a/26552632
tagged with: backbone.js
possible better answer: http://stackoverflow.com/a/26552665
type: AnsweredQuestion
has title: MarionetteJS Example from Backbone.Marionette. A Gentle Introduction not working
score: 1
has body: I have been reading this book I tried the first example, but It doesn't render the templates, it only shows the text by default. When I open the console, the app ContactManager exits and it's initialiazed. Marionette Contact Manager Contact manager Here is static content in the web page. You'll notice that it gets replaced by our app as soon as we start it.
upvote count: 1
accepted answer: http://stackoverflow.com/a/26552632

http://stackoverflow.com/a/26531466
upvote count: 1
has body: If you indeed have multiple groups of radio buttons sharing the same class selector, the following code should help: $('.fmscr:checked').each(function() { if( this.value ) { $(this).closest('.form-group').removeClass('has-error'); $(this).closest('.form-group').addClass('has-success'); } else { $(this).closest('.form-group').addClass('has-error'); $(this).closest('.form-group').removeClass('has-success'); } });
score: 1
accepted answer of: http://stackoverflow.com/q/26529389
has comment: http://stackoverflow.com/comment/41689481
has comment: http://stackoverflow.com/comment/41689379
answers question: http://stackoverflow.com/q/26529389
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41689727
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41926323
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26662162
has text: Because you're calling it after the `return`?

textarea
tags question: http://stackoverflow.com/q/26659480
tags question: http://stackoverflow.com/q/26540864
tag name: textarea
tags question: http://stackoverflow.com/q/26636164
type: Tag

http://stackoverflow.com/q/26638984
upvote count: 2
tagged with: canvas
answer count: 1
favorite count: 0
score: 2
type: AnsweredQuestion
downvote count: 0
has body: I'm trying to add images to canvas strictly, but images are added randomly. What's the problem? Here is my simple code. var canvas = new fabric.Canvas("preview"); var imgs = ['bgBottom','bgTop', 'bgLevel', 'bgCircle']; for (var i=0; i&lt;imgs.length;i++){ var url = imgs[i]+'.png'; fabric.Image.fromURL(url, function (oImg) { canvas.add(oImg) }) }
accepted answer: http://stackoverflow.com/a/26669661
type: Question
has title: Fabric.js add images order
tagged with: javascript
has answer: http://stackoverflow.com/a/26669661
tagged with: fabricjs

http://stackoverflow.com/comment/41889536
score: 0
comment on: http://stackoverflow.com/a/26624265
has text: ah okay, now something is happening! The iframe is responsive and keeps its aspect ratio, so 'yay' BUT it's not vertically centered (yet) and still gets cropped at the bottom when the browser window gets wider than 16:9. That vertical centering isn't even THAT important I would just like to keep the iframe from getting cropped...
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26629703
type: Question
has comment: http://stackoverflow.com/comment/41867864
has comment: http://stackoverflow.com/comment/41869108
tagged with: javascript
score: 0
has title: Javascript RegExp failing on simple input
answer count: 1
accepted answer: http://stackoverflow.com/a/26630471
favorite count: 0
has comment: http://stackoverflow.com/comment/41868388
has answer: http://stackoverflow.com/a/26630471
tagged with: regex
has comment: http://stackoverflow.com/comment/41869212
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3561493
has body: On a website, a user enters some text in a search box, for example the letter "o". This creates the following regular expression in the site's javascript code: var filterSubstring = $("#FilterOnSubstringBox").val(); var regexp = new RegExp(filterSubstring,"gi"); Later on I loop over some strings, and test them against the regexp. I want to the testing to be case insenstive, so both "o" and "O" should match: for(var i = 0; i &lt; array.length; i++) { var textToSearch = array[i].name; if(!regexp.test(textToSearch)) { alert("NOT OK: " + textToSearch + " DID NOT CONTAIN: " + filterSubstring); } else { alert("OK! " + textToSearch + " CONTAINS: " + filterSubstring); } } Unfortunately, I get the following weird results. I made a jsfiddle (http://jsfiddle.net/grs9xpek/) to show this. When filtering on the letter 'o': OK!: ontwerpbesluitenbundel.dmt CONTAINS: o OK!: ontwerpbesluitenbundel_body.xta CONTAINS: o NOT OK: ScriptTemplate.docx DID NOT CONTAIN: o OK!: ShippingOrder.xta CONTAINS: o NOT OK: header.xta DID NOT CONTAIN: o -> scriptTemplate.docx is wrong. when filtering on the word 'ont' OK!: ontwerpbesluitenbundel.dmt CONTAINS: ont NOT OK: ontwerpbesluitenbundel_body.xta DID NOT CONTAIN: ont NOT OK: ScriptTemplate.docx DID NOT CONTAIN: ont NOT OK: ShippingOrder.xta CONTAINS: ont NOT OK: header.xta DID NOT CONTAIN: ont -> ontwerpbesluitenbundel_body.xta is wrong. Why are those names failing the regexp?
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/41750513
type: Comment
has text: @reenleedr the to_show includes the name of the account which is visible to everyone but the to_disp includes the name which unique to each account . for the simplification of the problem the two variables have the same value but in reality the two names are different. 2 to_show values may be same but never 2 to_disp values
comment on: http://stackoverflow.com/q/26565264
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41790673
score: 0
comment on: http://stackoverflow.com/q/26587720
has text: If you're expecting 11 (actually, 10) then you're counting from left to right, not right to left as you state. Therefore the answers featuring `lastIndexOf()` will work for you. If you *don't* mean that, then @Savv's answer will work.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/107476190
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26657135
has text: I figured it out. you would use e.currentTarget
type: Comment

http://stackoverflow.com/a/26604286
answers question: http://stackoverflow.com/q/26603982
has body: $() helps in DOM Selection Ie it would return the DOM objects that have the same identification provided as the argument to the call. ie $('.row') would return all the dom objects that have the class name row simmilarly we can use # for ids and we can also get the current object by passing 'this' as argument eg . $(this). however the answers can be more helpful if you specify that what does myobj refers to in your code.
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41821425
downvote count: 2
has comment: http://stackoverflow.com/comment/41821477
type: Answer

http://stackoverflow.com/q/26671054
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41944203
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has title: Vertical multilevel Menu slideToggle
has answer: http://stackoverflow.com/a/26672105
has body: I am newbie in jquery/js and I am trying to create a tabbed menu with jqueryui/jquery. I wanted inner tabs to be there so created it using slideToggle. I have to slideToggle in the tabs and I want one to close when another slideToggle is open, I did it for the tabs to slideUp the menu if it is open but I am not able to do it with one another slideToggles. Here is the code which I tried: $(function() { $( "#tabs" ).tabs(); }); $(document).ready(function() { $(".menu a").click(function(){ $(".video").each(function(){ $(this).get(0).pause(); }); }); //tabbing selection $(".menu li:eq(0)").addClass("active"); $(".menu li").click(function(){ $(this).addClass('active'); $(this).siblings().removeClass('active'); }); $(".subtabs").click(function(){ $(this).nextUntil("li.tabsclose").slideToggle(); $(this).removeClass('active'); $(this).next().addClass('active'); }); $(".tabs").click(function(){ $(".subtabsinner").slideUp(); }); }); and this is the link to codepen http://codepen.io/SurajVerma/pen/Fskmu. before posting the question, I tried Google and searched on stackoverflow, but not able to find anything similar. Thanks.
type: AnsweredQuestion
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26672105
has comment: http://stackoverflow.com/comment/41947197
type: Question

http://stackoverflow.com/q/26608201
has comment: http://stackoverflow.com/comment/41829942
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/41828589
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5751620
has title: ajax response does not use currently loaded resources (php + jquery)
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/26841052
has body: I'm using some css files and js libraries (bootstrap, packry, etc.) in my master page. There's a button on page that when you click on it, it sends an ajax request and prints the response on a div in current page: jQuery.post("index.php", "some_post_data", function (data) { jQuery('#mydiv').html(data); }); The page I'm calling needs those libraries I've already included on my master page, but when I print the response inside the div, it still shows js errors and style-less objects. If I add those resources to the second page, it will work but I don't want to do this. Do I have to do some kind of refreshing thing on the newly printed html codes, or something like that? What am I doing wrong in here?

http://stackoverflow.com/comment/41890996
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26642048
has text: How do you mean? Should I register my own helper method?
score: 0

selectors-api
tags question: http://stackoverflow.com/q/26568463
tag name: selectors-api
type: Tag

http://stackoverflow.com/comment/41797414
has text: By using Jquery you can add remove Classes
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26590975
type: Comment

http://stackoverflow.com/a/26636651
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41883104
type: Answer
answers question: http://stackoverflow.com/q/26635847
score: 2
accepted answer of: http://stackoverflow.com/q/26635847
upvote count: 2
has comment: http://stackoverflow.com/comment/41882860
has body: You could very well handle this through the BeginRequestHandler and EndRequestHandler events. When a partial or full postback occurs (upon button click in your case) you can show the loading image and when the data is served you can hide the loading image in the the EndRequestHandler. &lt;script type="text/javascript"&gt; function pageLoad(sender, args) { var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_beginRequest(BeginRequestHandler); prm.add_endRequest(EndRequestHandler); } function BeginRequestHandler(sender, args) { document.getElementById("mainDiv").style.visibility = 'hidden'; document.getElementById("loading").style.visibility = 'visible'; } function EndRequestHandler(sender, args) { document.getElementById("mainDiv").style.visibility = 'visible'; document.getElementById("loading").style.visibility = 'hidden'; } &lt;/script&gt; Your HTML markup will be like below &lt;div id="mainDiv"&gt; ... ... &lt;/div&gt; &lt;div id="loading" style="visibility: hidden;text-align: center;"&gt; &lt;img src="images1/loading.gif" id="Img5" data-transition="slide" /&gt; &lt;/div&gt; Or if you are open to using jquery plugin then refer my another post here on SO.
has comment: http://stackoverflow.com/comment/41882964

http://stackoverflow.com/comment/41680465
type: QuestionComment
comment on: http://stackoverflow.com/q/26523082
score: 0
has text: Did you try `rerenderEvents`?
type: Comment

http://stackoverflow.com/q/26663915
has comment: http://stackoverflow.com/comment/41929843
tagged with: jquery-ui-draggable
type: UnansweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26664684
has title: dragging all elements of class when one is being dragged ( jQuery UI draggable )
has comment: http://stackoverflow.com/comment/41929887
tagged with: jquery-ui
answer count: 1
has comment: http://stackoverflow.com/comment/41930095
tagged with: javascript
tagged with: jquery
tagged with: jquery-draggable
has body: I'm using jQuery UI to allow elements of a class. However i'd like the rest of the elements of a class to follow when one of them is being dragged. How can I do that? So when one is dragged the rest of the class are also being dragged. I attempted to trigger mousedown on start and mouseup on stop events on the elements so that the dragging would happen for the others when one of them is being dragged? $('.dismissAllButton').draggable({ axis:'x', containment:'parent', start:function(){ upEvent = false; $(this).mousedown(); }, drag: function(){ $(this).mousemove(); }, stop:function(){ $(this).mouseup(); setTimeout(function(){ upEvent = true; }, 1000); }}); I also tried making itself the parent so that the others would also be dragged / follow when one of them was being dragged, but that didn't work. $('.dismissAllButton').draggable({ axis:'x', containment:'parent', handle:'.dismissAllButton', start:function(){ upEvent = false; }, stop:function(){ setTimeout(function(){ upEvent = true; }, 1000); }}); Fiddles: No following, just one element dragging: http://jsfiddle.net/7ta68xyt/ attempt 1, code sample 1 above, : http://jsfiddle.net/7ta68xyt/1/ attempt 2, code sample 2 above, : http://jsfiddle.net/7ta68xyt/2/ Update: I found a script on github that allows for this, but the other elements all lag behind a bit. How can I get them to lag at intervals and the end up at the same place when dragging stops or have them all drag the same ( no lag ). Here is the fiddle: http://jsfiddle.net/7ta68xyt/3/ Here is the script: https://github.com/javadoug/jquery.drag-multiple

http://stackoverflow.com/comment/41763190
has text: for a start your operator in php `if` is invalid. `=` is an assignment
comment on: http://stackoverflow.com/q/26572615
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41694177
has text: the test fails either with `expect(plural(['я','меня'])).to.throw(Error.constructor);`
type: Comment
comment on: http://stackoverflow.com/a/26533858
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41679402
score: 0
type: Comment
has text: What do you mean by "not stable"? Also, a transcoder is something else, perhaps you are looking for the word transpiler.
comment on: http://stackoverflow.com/a/26525791
type: AnswerComment

http://stackoverflow.com/q/26567929
has comment: http://stackoverflow.com/comment/41754972
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26568362
has title: Load multiple D3 maps with similar source code
has body: I built a D3 map that highlights which counties voted for the new governor in my state. I want to build a similar map for another political race using the same code as my governor map. I copied the governor map code and modified it for the other race, changing the geojson file and where the svg will go. I put the other race's code into an external JS file and placed it below my governor JS file in my index.html. Now, depending which file is loaded first in my .html file, one map will appear while the other appears white. Is there anyway I can make both codes different enough to have the maps appear at the same time?
tagged with: d3.js
linked to: http://stackoverflow.com/q/8862665
type: UnansweredQuestion

http://stackoverflow.com/comment/41750841
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26559703
has text: Since Awesomium is based on Chromium (for all that I remember), I suggest to google for all ways to trigger click via JS, not using C# (for example, `link.fireEvent("onclick");`). And, by the way, `document` element exists, that's for sure.
score: 0

http://stackoverflow.com/q/26600336
has title: How to integrate jquery.fileupload-rails?
has answer: http://stackoverflow.com/a/26600641
has comment: http://stackoverflow.com/comment/41814889
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41814927
tagged with: ruby-on-rails
type: Question
accepted answer: http://stackoverflow.com/a/26600641
has body: I am trying to integrate the following gem: https://rubygems.org/gems/jquery.fileupload-rails but it became a mission impossible. I am trying for last two days and it simply doesn't want to load jquery.fileupload-rails javascript. I tried this tutorials: railscasts.com/episodes/381-jquery-file-upload?view=asciicast 5minutenpause.com/blog/2013/09/04/multiple-file-upload-with-jquery-rails-4-and-paperclip/ This is my application.js: //= require jquery //= require jquery-ui //= require jquery_ujs //= jquery.fileupload/basic //= require turbolinks //= require_tree . Gemfile.lock: jquery-rails (3.1.2) jquery-ui-rails (5.0.2) jquery.fileupload-rails (1.11.0) I have tried many combinations and it doesn't work. How to make it work?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: ruby
tagged with: jquery-file-upload

http://stackoverflow.com/q/26623797
type: Question
answer count: 2
downvote count: 4
upvote count: 0
tagged with: javascript
tagged with: variables
score: -4
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26624066
has answer: http://stackoverflow.com/a/26624054
has answer: http://stackoverflow.com/a/26624066
has body: issue : i am able to set and get run time variable value ? steps: onlick button random number, expected output :alert pop in broswer and number should be shows inside alert . Pass variable from PHP to JavaScript - Cyberster's Blog' <?php function RandomString($length) { $keys = array_merge(range(0,9), range('a', 'z')); for($i=0; $i < $length; $i++) { $key .= $keys[array_rand($keys)]; } return $key; } #$php_var = "Hello world from PHP"; #$length = 10; #$randomString = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); ?> ==
tagged with: php
has title: php to js variable not setting at run time
type: AnsweredQuestion
tagged with: alert
accepted answer: http://stackoverflow.com/a/26624054
has comment: http://stackoverflow.com/comment/41857682
has comment: http://stackoverflow.com/comment/41857636

http://stackoverflow.com/q/26573429
has answer: http://stackoverflow.com/a/26583653
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26583653
tagged with: ace-editor
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I want to highlight a single character (at a given position) in an ace editor. It seems that I can use addMarker for this, but documentation is pretty much non-existant and I can't make sense of what is going on in my attempts. Here is one quick demo attempt (fiddle): setInterval(function () { if (currentMarker) { editor.session.removeMarker(currentMarker); } currentMarker = editor.session.addMarker(new Range(1, x, 2, x+1), "marked", "text", false); x = ++x % 25; }, 250); I would expect a single character to be highlighted and every quarter second the marker should switch to the character next to it. But that's not what happens. My questions here would be * Why does it behave this way? * How do I make it behave the way I want to? * I read about "dynamic" markers, but can't find any information on what those are. So – what are they?
type: Question
has title: Highlighting a single character in ace

http://stackoverflow.com/a/26572941
downvote count: 0
type: Answer
score: 1
has body: Have you tried searching the forum for any previous posts with regards to parsing PHP variables to javascript? With a simple search I found a feed relating to parsing PHP variables to JavaScript here: Get variable from PHP to JavaScript Anyway, from my understanding of your problem does this serve as a suitable answer? &lt;?php if ($_SESSION['loggedin'] == true){ $userLevel = $_SESSION['userlevel']; $userLoggedIn = true; } else { $userLevel = null; $userLoggedIn = false; } ?&gt; &lt;script type="text/javascript"&gt; var userLoggedIn = "&lt;?php Print($userLoggedIn); ?&gt;"; var userLevel = "&lt;?php Print($userLevel); ?&gt;"; if (userLoggedIn == true) { if (userLevel == "levelOne") { //Your code here } else if (userLevel == "levelTwo") { //Your code here } else { //Your code here } } &lt;/script&gt;
upvote count: 1
answers question: http://stackoverflow.com/q/26572615

http://stackoverflow.com/comment/41900653
has text: Can I have an explanation for the downvote?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26647737

http://stackoverflow.com/q/26521919
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: cartography
has title: Set map pan limits in Cartodb
has body: How do I set no-world-wrap or pan limits to a CartoDB map? I have a world map displaying data and client is not keen on panning around the globe.
tagged with: gis
type: Question
has answer: http://stackoverflow.com/a/27252440

http://stackoverflow.com/q/26661238
score: 1
accepted answer: http://stackoverflow.com/a/26662917
favorite count: 0
tagged with: computed-properties
tagged with: ember.js
type: AnsweredQuestion
tagged with: coffeescript
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26662917
has title: Multiple properties or single observer in Ember.Object
tagged with: javascript
has comment: http://stackoverflow.com/comment/41925637
answer count: 1
downvote count: 0
has body: If I have a series of properties that rely on the same property, what is the best (maintainable, fastest, etc) way of defining them? I can think of a few: A. Property for each: isDraft: (-&gt; @get('status') is App.Status.DRAFT ).property('status') isPublished: (-&gt; @get('status') is App.Status.PUBLISHED ).property('status') isArchived: (-&gt; @get('status') is App.Status.ARCHIVED ).property('status') B. Observer that sets props all at once: isDraft: true isPublished: false isArchived: false statusDidChange: (-&gt; @setProperties( isDraft: @get('status') is App.Status.DRAFT isPublished: @get('status') is App.Status.PUBLISHED isArchived: @get('status') is App.Status.ARCHIVED ) ).observes('status') C. Straight-up computed props: isDraft: Ember.computed.equal('status', App.Status.DRAFT) isPublished: Ember.computed.equal('status', App.Status.PUBLISHED) isArchived: Ember.computed.equal('status', App.Status.ARCHIVED) (C) definitely seems the most elegant, but I'm wondering: are there are any penalties for using three computed properties versus one observer? And is (C) is basically shorthand for A? Any difference there?

http://stackoverflow.com/q/26606968
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: opengl-es
favorite count: 0
accepted answer: http://stackoverflow.com/a/26607396
type: Question
upvote count: 1
has title: First step to take learning matrices in WEBGL
answer count: 1
has answer: http://stackoverflow.com/a/26607396
tagged with: javascript
tagged with: webgl
has body: After drawing a simple triangle in webgl, I've decided to start to learn how to do transformations. So basically I'm thinking that the simplest thing I can do is to write an identity matrix and multiply it for the vertex positions. So I've added to the code the identity matrix as var identityMatrix = [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]; Then I've added to the shader the mat4 variable as 'uniform mat4 id_matrix;' And multiplied it for the position (so I'm expecting no changes in the transformations at all, since I multiply everything by 1) gl_Position = id_matrix * vec4 (a_position,1); Finally I retrieve the location of the matrix in the shader and fill it with my data var shaderIdentityMatrix = gl.getUniformLocation(program, "id_matrix"); gl.uniformMatrix4fv(shaderIdentityMatrix,false,new Float32Array(identityMatrix)); But after those changes, nothing appears on screen. Am I doing wrong assumptions? Here's the full code &lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;canvas id = "can" width="400" height="400"&gt; &lt;/canvas&gt; &lt;script&gt; var webgl_canvas = document.getElementById('can'); var gl = webgl_canvas.getContext('experimental-webgl'); var triangles = [-0.8,-0.8,0,0.8,-0.8,0,0,0.8,0]; var identityMatrix = [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]; var vertexBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(triangles), gl.STATIC_DRAW); vertexBuffer.itemSize = 3; vertexBuffer.numItems = 3; var vertexShader_source = 'attribute vec3 a_position;' + 'uniform mat4 id_matrix;' + 'void main() { gl_Position = id_matrix * vec4 (a_position,1); }'; var fragmentShader_source = 'precision mediump float;' + 'void main() { gl_FragColor = vec4 (0.9,0,0.1,1); }'; //Compile shaders var buildShader = function (shaderSource, typeOfShader) { var shader = gl.createShader(typeOfShader); gl.shaderSource(shader, shaderSource); gl.compileShader(shader); if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { alert (gl.getS…

http://stackoverflow.com/comment/69758522
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26650055
type: AnswerComment
has text: watch out that you don't have any tickvalues that are out of range or they'll appear to the left of the yaxis. you can also use `xDomain` to set the extent of the xAxis

http://stackoverflow.com/a/26640678
answers question: http://stackoverflow.com/q/26595986
type: Answer
has body: It is important to convert numbers into date objects, there was a typo in your code (data1[0].time instead of data1[0].date). Also you shouldn't multiply by 1000, since your data was already in milliseconds. In your drag code, it is also important to convert your date objects back to numbers, in order that += will work on them. Of course you also need to convert them back to date when setting the domain again. function draggedData1(d) { console.log("dragging of data1 going on!!") var mousePoint = d3.mouse(this); var x1 = x1Scale.domain()[0].valueOf(); //date to number var x2 = x1Scale.domain()[1].valueOf(); var xextent = x1 - x2; x1 += mousePoint[0]; x2 += mousePoint[0]; var newDomain = [new Date(x1), new Date(x2)]; //number back to date x1Scale.domain(newDomain); redraw(); zoomBottom.x(x1Scale); zoom.x(x2Scale); } I've created a fiddle with the full code and fixes here: http://jsfiddle.net/pb3cod6q/2/
upvote count: 1
score: 1
downvote count: 0

acrobat
type: Tag
tag name: acrobat
tags question: http://stackoverflow.com/q/26607079
tags question: http://stackoverflow.com/q/26637283

http://stackoverflow.com/a/26567844
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26566989
has body: I found an answer. I put one of that solutions inside the event shown of the popover. $('.form-group').on('shown.bs.popover', function (){ $('.skPopover a').on('click', function (e){ e.preventDefault; $('.skPopover').toggleClass('long-popover'); }); }); Hope this helps someone with the same issue.
upvote count: 1
answers question: http://stackoverflow.com/q/26566989

http://stackoverflow.com/a/26606278
has comment: http://stackoverflow.com/comment/41826452
has comment: http://stackoverflow.com/comment/41825656
has comment: http://stackoverflow.com/comment/41825468
has comment: http://stackoverflow.com/comment/41825062
score: 0
has body: Make width to be 99% of the width of the containing element In fiddle if you make width to be 98% it looks nice without any scrollbars. Use one of the answers provided here (I would go with the HTML5 canvas one), to get the width of the text currently entered inside the textarea (now the tinyMCE container). After that use this to resize your tinyMCE iframe.
type: Answer
answers question: http://stackoverflow.com/q/26606200

http://stackoverflow.com/q/26662254
has comment: http://stackoverflow.com/comment/41932759
linked to: http://stackoverflow.com/q/24026374
tagged with: html.dropdownlistfor
type: Question
tagged with: c#
tagged with: asp.net-mvc
has title: ASP.NET MVC 4 How to add rows to table containing dropdownlistfor
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26662520
score: 0
has body: I have a small table as part of a form. It displays a number alongside a dropdown that allows a user to select a value for to go along with that number. I want to allow the user use add rows to this table and be able to assign as many values as is required. I've been searching Google all day and trying many things but nothing seems to fit my situation. What is the best way to achieve this functionality? Here is the code from my view containing the table and my add actionlink: @Html.LabelFor(m=>m.Part.PartConnectionTypes, new {@class = "control-label col-md-5"}) Number Value @{ for(var i = 0; i < Model.Part.PartConnectionTypes.Count; i++) { var count = i + 1; @count @Html.DropDownListFor(m => m.Part.PartConnectionTypes[i].ConnectionType, new SelectList(Model.ConnectsTo, "CodeId", "ValChar"), "", new { @class = "form-control" }) } } @Html.ActionLink("Add Connection", "AddNewPartConnection", "Home", new { id = "addConnection"}) And here is my controller method from for the action link: public ActionResult AddNewPartConnection(IndexViewModel model) { var newPartConnectionType = new PartConnectionType(); model.Part.PartConnectionTypes.Add(newPartConnectionType); return View("Index", model); } and the index method: public ActionResult Index(string searchString) { var model = new IndexViewModel { Part = new Part() }; model.Part.PartConnectionTypes.Add(new PartConnectionType()); if (!String.IsNullOrEmpty(searchString)) { model.Part = CoreLogic.GetPartByPartCode(searchString); if (model.Part == null) { model.Part = new Part(); model.Part.PartConnectionTypes.Add(new PartConnectionType()); ViewBag.SearchMessage = "That is not a current part"; } } return View(model); } I appreciate any help anyone can provide.
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41927166

http://stackoverflow.com/comment/41858176
comment on: http://stackoverflow.com/q/26620497
score: 0
type: Comment
type: QuestionComment
has text: @guest271314 Please see http://jsfiddle.net/Schlaus/dpn5jeg8/4/ for a demonstration, I can't really put it into words better than I already have :/

http://stackoverflow.com/q/26623702
has comment: http://stackoverflow.com/comment/41860941
accepted answer: http://stackoverflow.com/a/26631895
upvote count: 2
has body: I have a Watir code that uses Phantomjs as headless browser. I'm trying to fill a form on website using this code (because Phantomjs doesn't show modal on simple click (browser.link(id: 'choise-sity').click)): require 'watir' browser = Watir::Browser.new :phantomjs browser.goto 'http://sales.ubrr.ru/open' browser.execute_script(" $('#modalCityChoise').show();$('#modalCityChoise').css({'opacity':'1', 'top':'0'})") browser.link(text: 'Архангельск').click browser.screenshot.save 'a.png' Current code does show modal, but I'm unable to click links there after. My question is: is there an easier way to deal with modals in PhantomJS - they said they added support to modals? Or how to deal with this particular example by javascript injection? edit: I managed to deal with this modal just by changing a value of hidden input browser.execute_script(" $('#OpenBkiForm_city_code').val('4600000100000') ") - but question still lingers.
answer count: 2
has comment: http://stackoverflow.com/comment/41859505
tagged with: phantomjs
possible better answer: http://stackoverflow.com/a/26626831
tagged with: forms
has answer: http://stackoverflow.com/a/26626831
score: 2
type: AnsweredQuestion
tagged with: modal-dialog
downvote count: 0
has answer: http://stackoverflow.com/a/26631895
tagged with: javascript
tagged with: watir
favorite count: 0
has title: How to deal with modals not opening in PhantomJS?
type: Question

http://stackoverflow.com/comment/41932447
type: Comment
comment on: http://stackoverflow.com/a/26665013
type: AnswerComment
has text: thanks!! can't really get it to work outside jsfiddle though.. prob is because I don't use TAFFY. Must I install it or could I just link to it in my document? What difference would it make if I had a program locally on my computer when it comes to making the site work for others... sorry for stupid q's!
score: 0

http://stackoverflow.com/a/26565725
has comment: http://stackoverflow.com/comment/41750599
has body: You're missing a closing } that should be on the second last line of your code — in other words, you forgot to close the else {... condition. It is fixed now: http://jsfiddle.net/teddyrised/0qaam2vh/8/ In addition, jQuery automatically adds vendor prefixes, so you can actually simplify your code into the following: var $MenuTriangle = $(".menu.triangle"); $MenuTriangle.click(function () { alert("click handler called"); if ($(this).css("transform") == 'none') { $(this).css("transform", "rotate(90deg) translate(1px,1.5px)"); } else { $(this).css("transform", ""); } }); In fact, I would recommend toggling a class instead of using the .css() function ;)
has comment: http://stackoverflow.com/comment/41750900
answers question: http://stackoverflow.com/q/26565688
upvote count: 2
type: Answer
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41751244

http://stackoverflow.com/q/26612065
has answer: http://stackoverflow.com/a/26617706
tagged with: javascript
type: Question
has body: I have a method inside my viewModel that gets calls an ajax get method to fetch all of the items. This all works perfect. I then have a ko.bindingHandler that is used to inline upload images via ajaxSubmit. This also works, but the issue is I have to duplicate code that fetches all of the items inside the bindingHandler that uploads the images or else the image wont update once uploaded. Refreshing the page fixes the issue but I want to have the view auto refresh with the new image. So the real question is it possible to call a function from the viewModel inside a bindingHandler? Any help would be greatly appreciated! BindingHandler: ko.bindingHandlers.imageInLineUpload = { update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var options = ko.utils.unwrapObservable(valueAccessor()), property = ko.utils.unwrapObservable(options.property); $(element).change(function () { if (element.files.length) { if ((element.files[0].type === "image/png") || (element.files[0].type === "image/jpeg")) { var $this = $(this); $(element.form).ajaxSubmit({ url: $.API.url + "XYZ", type: "POST", dataType: "text", success: function (data) { toastr.success('Upload Successful.'); var viewModel= new MyViewModel (); viewModel.GetObjects(); }, error: function (jqXHR, textStatus, errorThrown) { toastr.error('Upload Failed. Please Try again!'); } }); } else { toastr.error('Upload Failed. PNG and JPEG are the only supported formats.'); } } }); } }; ViewModel: var MyViewModel = function () { var self = this; self.xyz = ko.observable(""); self.xyz = ko.observable(""); self.xyz = ko.observable(""); self.GetObjects= function () { // Ajax call to fetch objects. } self.GetObjects(); }; ko.applyBindings(new MyViewModel ());
accepted answer: http://stackoverflow.com/a/26617706
score: 0
answer count: 2
has title: How Do I Call A Function from ViewModel inside bindingHandler
possible better answer: http://stackoverflow.com/a/26613648
has answer: http://stackoverflow.com/a/26613648
tagged with: knockout.js
type: AnsweredQuestion

http://stackoverflow.com/comment/41773002
comment on: http://stackoverflow.com/q/26577344
type: Comment
score: 0
has text: can you share a little of your html structure, specifically pertaining to how the image elements are placed and their css style attributes?
type: QuestionComment

http://stackoverflow.com/a/26535860
score: 0
type: Answer
has body: No need to use loop. Use class instead of id and in js: $(".check-all-parent").on("click", function() { $(".check-all-child").prop("checked", $(this).prop("checked")); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="checkbox" class="check-all-parent"&gt;hello &lt;br /&gt; &lt;input type="checkbox" class="check-all-child"&gt;hello2 &lt;br /&gt; &lt;input type="checkbox" class="check-all-child"&gt;hello2 &lt;br /&gt; &lt;input type="checkbox" class="check-all-child"&gt;hello2 &lt;br /&gt; &lt;input type="checkbox" class="check-all-child"&gt;hello2
answers question: http://stackoverflow.com/q/26535675

http://stackoverflow.com/q/26542663
accepted answer: http://stackoverflow.com/a/26542743
has title: jQuery add text (on entire table width) below row when it was clicked
type: Question
score: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26542775
answer count: 5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26542695
has answer: http://stackoverflow.com/a/26542695
has answer: http://stackoverflow.com/a/26542743
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26542729
has body: I want to add some very large text below the row when row was clicked, so that it's width would be entire row width. Now it is only below first column of the row. HTML: Jill Smith 50 Eve Jackson 94 Jill Smith 50 JavaScript:
has comment: http://stackoverflow.com/comment/41709374
has answer: http://stackoverflow.com/a/26542753

http://stackoverflow.com/q/26546901
tagged with: node.js
has answer: http://stackoverflow.com/a/26548608
has title: How to use Promises/Chaining with Azure Mobile Services Custom API in Javascript
downvote count: 0
score: 1
has body: I am trying to figure out how to use Promises with the AMS Javascript API. These are the two functions I have created that will be 'Promised' function checkUsername(username, table) { return table.where({username: username}).read({ success: function (results) { if (results.length === 0) { return true; } else { return false; } }, error: function(error) { return false; } }); } function checkEmail(email, table) { return table.where({email: email}).read({ success: function (results) { if (results.length === 0) { return true; } else { return false; } }, error: function(error) { return false; } }); } checkUsername(body.username, accountsTable).then(function (results) { if (results) { return checkEmail(body.email, accountsTable); } else { response.send(400, {message: 'This username is already in use.'}); } }).then(function(results) { if (results) { response.send(200, {message: 'Can proceed with sign up.'}); } else { response.send(400, {message: 'This email address is already in use.'}); } }); I am trying to use the promises as I would in Parse, but it's clearly not working. The console logs keep spitting out an Internal Server Error and that .then() is not a function of the object. I'm assuming I am missing a require or something in order to have the Promises functionality? Error in script '/api/register.js'. TypeError: Cannot call method 'done' of undefined at exports.post (D:\home\site\wwwroot\App_Data\config\scripts\api\register.js:30:59) [external code]
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: azure
type: UnansweredQuestion

http://stackoverflow.com/comment/41808531
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26597019
has text: What does "#product_filters_form_sizes_mediumnarrow" do? does it posts back the form? Perhaps, u can use `$('#product_filters_form_sizes_mediumnarrow').focus()` instead?

http://stackoverflow.com/comment/42020407
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26714571
has text: And the short answer is `data-ng-keyup="$event.keyCode == 32 ? $state.go('userLogin') : null"`
score: 0

http://stackoverflow.com/comment/41870000
type: QuestionComment
has text: No.. its not the requirement...
comment on: http://stackoverflow.com/q/26630096
score: 0
type: Comment

http://stackoverflow.com/q/26662951
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26665013
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
answer count: 1
has title: Adding elements from a JSON file into the HTML through Javascript
has body: I'm building a webpage where you'll be able to display random elements fetched from a JSON database. For example, we could have a "what should I cook" button where you're given a random dish every time you click it. So far, I've managed to create a button that, when clicked, writes out one (1) field from the several ones I have in my JSON file. I want to add more elements to the JSON. Also I'm trying to accomplish one of two alternatives: Get the fields from a random element in the JSON file. (this is preferred over the second alternative) OR Get the elements from the JSON file in a specific order. So you could get a field from the first element when you click the button the first time, then one field from the second element when you click it the second time and so on. Right now nothing works if I add another element. This is how my code looks like right now. JSON: { "visible": "1", "date": "2011-01-16 19:48:27", "submitterid": "2541", "rating": "3", "dubious": "1", "imdbid": "0268126", "id": "1919", "title": "Adaptation", "year": "2002" } HTML: hi give me a movie!
has answer: http://stackoverflow.com/a/26665013
tagged with: javascript
tagged with: api
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/8908192
score: 1

http://stackoverflow.com/q/26585139
tagged with: javascript
tagged with: jquery
tagged with: accordion
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: Update: I building a responsive accordion function inside a website, but i have a problem with the animation of the slideToggle function, because it isn't working smoothly and i found out that it is caused by my header(logo in header not showed here), because when i remove it the animation is smooth, but i need the header. Maybe the problem lies in more areas like my main.js script, but i'm not sure. Beside this problem i would like a close all button function, but the first problem is more important so if someone could help me? Here the example: Fiddle . Help would be must appreciated, thank you! Scroll voor meer Het verhaal Alles wat hier staat is slechts om een indruk te geven van het grafische effect van tekst op deze plek. Wat u hier leest is een voorbeeldtekst. Deze wordt later vervangen door de uiteindelijke tekst, die nu nog niet bekend is. De faketekst is dus een tekst die eigenlijk nergens over gaat. Het grappige is, dat mensen deze toch vaak lezen. Zelfs als men weet dat het om een faketekst gaat, lezen ze toch door. Kijk eens hoe een link test@google.nl eruit ziet. DJ/bands Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusan tium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore architecto veritatis et quasi beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Nulla viverra condimentum sem, a rhoncus lectus. Fusce pharetra non magna eu venenatis. Cras fringilla aliquam erat, vitae imperdiet nisl congue id. Ut pellentesque pellentesque lorem a aliquet. Ut imperdiet tortor in metus pretium, in aliquet nisl tempus. Old problem (this was the beginning of the thread): (I building a website with full width sections and the text centered, but i want it to function as a accordion and open its content (slide down animation) under the title when clicked and only! when opened have a topcorner close button and stay open when others are opened. Also when opened not …
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41902028
has answer: http://stackoverflow.com/a/26585414
type: Question
has title: Accordion full width sections open on click UPDATE: smooth slideToggly
tagged with: sections
answer count: 1
has comment: http://stackoverflow.com/comment/41901666

http://stackoverflow.com/a/26625529
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41871961
has body: No, there's no built-in way, you'd have to write that yourself: function center_element_vertically(elt) { var rect = elt.getBoundingClientRect(); window.scrollTo(0, rect.top + window.pageYOffset - (window.innerHeight - rect.height)/2); } Alternatives without writing your own code: you could scroll so that the element was at the bottom by passing false to scrollIntoView, or scroll only if the element is not already visible by calling scrollIntoViewIfNeeded, available only in Chrome AFAIK.
has comment: http://stackoverflow.com/comment/41878011
has comment: http://stackoverflow.com/comment/41884096
accepted answer of: http://stackoverflow.com/q/26625488
has comment: http://stackoverflow.com/comment/41884127
has comment: http://stackoverflow.com/comment/41860382
answers question: http://stackoverflow.com/q/26625488
has comment: http://stackoverflow.com/comment/41878459
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41877127
has comment: http://stackoverflow.com/comment/41860326
has comment: http://stackoverflow.com/comment/41883099

http://stackoverflow.com/q/26537858
possible better answer: http://stackoverflow.com/a/26538569
has answer: http://stackoverflow.com/a/26538569
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26538510
linked to: http://stackoverflow.com/q/3701311
has title: Make navbar return into focus if user stops scrolling for more than 1s
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26538510
type: AnsweredQuestion
tagged with: jquery
has body: Currently my code snippet hides the navbar as the user scrolls down and brings it back into view as the user scrolls up. How would I also bring it back into view once the user stops scrolling down (or pauses momentarily)? Code: var mywindow = $(window); var mypos = mywindow.scrollTop(); var up = false; var newscroll; mywindow.scroll(function () { newscroll = mywindow.scrollTop(); if (newscroll &gt; mypos &amp;&amp; !up) { $('.header').stop().slideToggle(); up = !up; console.log(up); } else if(newscroll &lt; mypos &amp;&amp; up) { $('.header').stop().slideToggle(); up = !up; } mypos = newscroll; }); Jsfiddle: http://jsfiddle.net/GM46N/2/

http://stackoverflow.com/q/26566994
type: Question
has body: I am working on a project and i am building it using the mvc pattern. On successful form submission i redirect user and display a flash message ( success message using session ) i have no issues with users using the back button or refreshing. But if a user encounters an error when submitting a form the form is not redirected so the error can be displayed while keeping old form data to populate the field so users do not have to re-enter information. The issue i am having is when users will spam the button for any reason. If i double click or spam the button an error is produced ( invalid form token error ) but the db interaction still takes place and inserts the form data. I am trying to find the best js alternative to maintain cross browser compatibility. Is js the way to go? Is their a php alternative?
has answer: http://stackoverflow.com/a/26567152
tagged with: forms
has title: Preventing Duplicate Form Submissions Without JS
has comment: http://stackoverflow.com/comment/41753126
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41753283
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/q/26575523
has body: Just stumbled upon this today and I couldn't find where this behavior is defined in the spec. Appending a string to an object in JavaScript (i.e. new Object() + "whatever") typically triggers a call to valueOf() on the object, but apparently, Date objects are an exception to this rule: new Date() + "..." calls toString() on the Date instead. function test(constructor) { var name = constructor.name || /^\s*function ([\w\$]+)/.exec(constructor.toString())[1]; var obj = new constructor(); obj.toString = function () { return name + ' : toString()'; } obj.valueOf = function () { return name + ' : valueOf()'; } document.body.appendChild(document.createElement('DIV')).textContent = obj + ''; } test(Array); test(Boolean); test(Date); test(Function); test(Number); test(Object); test(RegExp); test(String); Question: what is different about Date objects here?
has comment: http://stackoverflow.com/comment/41769086
type: AnsweredQuestion
has title: Why does appending a string to a Date invoke toString() rather than valueOf()?
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/41768936
score: 3
has comment: http://stackoverflow.com/comment/41769011
upvote count: 3
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26575666
accepted answer: http://stackoverflow.com/a/26575666
favorite count: 0

http://stackoverflow.com/a/26636517
has comment: http://stackoverflow.com/comment/41881268
type: Answer
has body: it can help you click me by using jquery $('a').click(function(){ $('iframe').css('height','600px'); });
score: 0
answers question: http://stackoverflow.com/q/26635778

http://stackoverflow.com/comment/41740915
type: Comment
has text: Thank you for this post Manivannan. After messing with the code I was able to get the image to load in the iframe, but what's happening now is I'm getting this"received: 10492146_683376518407247_2842178196320115123_n.jpg" in my iframe instead of the actual image itself.
comment on: http://stackoverflow.com/a/26521614
type: AnswerComment
score: 0

http://stackoverflow.com/q/26593185
answer count: 2
has answer: http://stackoverflow.com/a/26660195
has body: I am trying to get some data using ajax GET method, it works great in all the browsers except IE. In IE it is caching the data the first time the call is made and caching it I need to prevent it. I tried the following methods in my code but still unable to resolve the issue 1) Setting caching = false globally in the code $.ajaxSetup({ cache: false }); 2) putting this in the meta tags &lt;meta http-equiv='cache-control' content='no-cache'&gt; &lt;meta http-equiv='expires' content='0'&gt; &lt;meta http-equiv='pragma' content='no-cache'&gt; 3)Using POST instead of GET method $.ajax({ cache: false, type: "POST", url: '/XYZURL/' + Id, dataType: "json", async: false, success: function(Response) { $scope.data = Response; }, 4)Tried including this bit in my code but with no success if(url.replace("?") != url) url = url+"&amp;rand="+new Date().getTime(); else url = url+"?rand="+new Date().getTime(); Please help me with this issue, it has been bugging me for the past 2 days. Thank you in advance.
linked to: http://stackoverflow.com/q/4303829
tagged with: jquery
tagged with: ajax
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41802611
accepted answer: http://stackoverflow.com/a/26660195
has answer: http://stackoverflow.com/a/26594008
has comment: http://stackoverflow.com/comment/41801719
type: Question
possible better answer: http://stackoverflow.com/a/26594008
tagged with: internet-explorer
tagged with: javascript
tagged with: caching
has title: IE 8 caching ajax calls
score: 0

http://stackoverflow.com/q/26538729
has comment: http://stackoverflow.com/comment/41703152
has title: How to access private properties from an IFFE in javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26539087
has answer: http://stackoverflow.com/a/29724050
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41703261
has comment: http://stackoverflow.com/comment/41703600
answer count: 4
upvote count: 1
has answer: http://stackoverflow.com/a/26539016
downvote count: 1
type: Question
has body: I was playing with the idea of using an IFFE inside a object declaration instead of an init() method that I have to manually invoke at the end of the declaration. The only problem I seem to be having is that I don't know how to access private properties from within the IFFE. Take the following example: function Obj() { this.prop = 'Public property'; var _prop = 'Private property'; ( function( that ) { console.log( that.prop ); console.log( that._prop ); // Returns undefined } )( this ); } obj = new Obj(); by passing this into the IFFE I can access the this scope but the private properties do not seem to be assessable through this. I know I could manually pass individual properties in, but I would prefer a solution that allows me access to all private properties. What is the best way to solve this?
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/29725434

http://stackoverflow.com/a/26536432
upvote count: 1
downvote count: 0
has body: You're missing the quotes around the worksheet name: Workbooks("test").Worksheets(Sheet1).Range("a1") = AGR should be Workbooks("test").Worksheets("Sheet1").Range("a1") = AGR
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26534581

http://stackoverflow.com/q/26577904
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41773549
has comment: http://stackoverflow.com/comment/41774002
type: Question
has comment: http://stackoverflow.com/comment/41773459
score: 0
has body: How can I stop android phones changing double space tap to a period and prevent autocomplete/suggestions with javascript?
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has title: prevent autocomplete/suggestions on android phones and prevent double space becoming period

http://stackoverflow.com/comment/41697906
type: QuestionComment
comment on: http://stackoverflow.com/q/26535875
has text: Yeah that seems like a pretty reasonable idea. I'm probably going to give that a shot now.
score: 0
type: Comment

http://stackoverflow.com/comment/41825639
has text: Do you mean that you'll have a link like `David`?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26606588

http://stackoverflow.com/comment/41966505
has text: Perfect, Imagine i can also do vice versa for images only. Could i filter for location as well?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26683745
score: 0

http://stackoverflow.com/a/26527881
has comment: http://stackoverflow.com/comment/41737552
has comment: http://stackoverflow.com/comment/41737890
has comment: http://stackoverflow.com/comment/41737917
has comment: http://stackoverflow.com/comment/41737517
has comment: http://stackoverflow.com/comment/41737058
has body: It is possible to play a private track. The easiest is to use private HTML5 widget (as Jameal G. correctly noticed) – for that you just need to click "share" button on a track’s page, select "embed" tab and copy the iframe code to insert on your website. Otherwise, if you want to play it with your own code, then you have to use secret_token that you can get when sharing the track on the website (when authorised) or when querying the API, also authorised (so providing the HTTP header Authorization: Oauth 123…). Then the client application can use that secret token to query API and play your sound without authorising the users. Below is a simple example where I share my private track: HTML: &lt;audio controls&gt;&lt;/audio&gt; JS, assuming jQuery, but the idea should be clear: var clientId = 'client_id=YOUR_CLIENT_ID', sekretToken = 'secret_token=s-wwC6c', trackUri = 'https://api.soundcloud.com/tracks/128310939.json?' + secretToken + '&amp;' + clientId, audio = jQuery('audio'); jQuery .get(trackUri) .then(function (result) { // do not forget to supply client_id also when querying for stream url audio.attr('src', result.stream_url + clientId); }); http://jsbin.com/yerilu/edit?html,js,output UPD. How to find the secret token. On SoundCloud website, go to the page of the private track that you own, while authorised on the website, then press "share" button (second from the left under "write a comment" input). You will see a text input field titled "Private Share" – copy the link and the last part after the slash is the secret token. You can also query the API when authorised (so you must send Oauth HTTP header, like Authorization: Oauth 123…, of course you will have a longer number for your own token) for your tracks and the track representation will have secret_token property with the value of the token you could use.
upvote count: 2
has comment: http://stackoverflow.com/comment/41737445
has comment: http://stackoverflow.com/comment/41737297
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41737799
has comment: http://stackoverflow.com/comment/41737900
type: Answer
answers question: http://stackoverflow.com/q/26519796
score: 2
accepted answer of: http://stackoverflow.com/q/26519796
downvote count: 0

http://stackoverflow.com/a/43325463
downvote count: 0
answers question: http://stackoverflow.com/q/26572418
type: Answer
upvote count: 1
has body: I have been spending quite some time trying to figure out why the built version of my polymer code was violating my CSP in firefox and safari (works in chrome) and it turns out as polymer components contain inline scripts they can cause CSP issues that are not resolved using 'unsafe-inline' &amp; 'unsafe-eval' headers for firefox and safari, however if for your script CSP you include data: this will allow the inline scripts that are compiled during the polymer build to run on your web app without violating the CSP. Thought I would share here as this answer helped me resolve my issue.
score: 1

http://stackoverflow.com/q/26576275
has title: Click event not firing the first time a page loads
has comment: http://stackoverflow.com/comment/41770491
has comment: http://stackoverflow.com/comment/41885164
has comment: http://stackoverflow.com/comment/41770370
has comment: http://stackoverflow.com/comment/41770405
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41770395
has answer: http://stackoverflow.com/a/26576735
tagged with: click
has comment: http://stackoverflow.com/comment/41770204
has comment: http://stackoverflow.com/comment/41770440
linked to: http://stackoverflow.com/q/17881384
downvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41770354
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
has body: I'm setting up a page with javascript that should fire on a click event. It works most of the time except the first time a page loads. If I refresh it though, it works and the click events fire properly. $(document).ready(function() { $(".element").click(function() { alert("This should work"); } }); Anybody have an idea where the issue might be?
has comment: http://stackoverflow.com/comment/41770166

http://stackoverflow.com/a/26644027
has comment: http://stackoverflow.com/comment/41894460
has comment: http://stackoverflow.com/comment/41894506
has comment: http://stackoverflow.com/comment/41894397
score: 0
has comment: http://stackoverflow.com/comment/41894383
has comment: http://stackoverflow.com/comment/41894444
has body: Basically, you cannot do that. It's on Facebook Developer Policy Read 13 and 4.14
type: Answer
answers question: http://stackoverflow.com/q/26642824
has comment: http://stackoverflow.com/comment/41894420
has comment: http://stackoverflow.com/comment/41894498

http://stackoverflow.com/a/26553943
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: Here's a little fiddle. The ID of an HTML element can be used later as an anchor. Article 10 Here we scroll to an anchor within the same page/domain Scroll to article 10 This is how to access the anchor from an external page Scroll to article 10 Have a look at http://en.wikipedia.org/wiki/HTML_element#Anchor. It uses the same principle. The page is automatically scrolled down to the headline Anchor which has the ID Anchor. For example Firebug reveals the following markup: Anchor
answers question: http://stackoverflow.com/q/26549966

http://stackoverflow.com/comment/41716337
type: Comment
comment on: http://stackoverflow.com/q/26546294
type: QuestionComment
has text: The use of the TextField is irrelevant I think. What both those tutorials are giving you is essentially a hello world for JS - AS communication via ExternalInterface. I'd suggest following one of the tutorials and then adapting it to your purposes. Then when you run into a problem come back with a more specific question. I doubt there's a tutorial out there which addresses your particular requirements exactly and at the moment, your question is not a good fit for stackoverflow.
score: 0

http://stackoverflow.com/a/26555686
has comment: http://stackoverflow.com/comment/76700811
has comment: http://stackoverflow.com/comment/114687686
score: 3
has comment: http://stackoverflow.com/comment/41733621
upvote count: 3
has comment: http://stackoverflow.com/comment/41733710
has comment: http://stackoverflow.com/comment/41732994
answers question: http://stackoverflow.com/q/26555621
type: Answer
downvote count: 0
has body: Dont make life too hard on yourself going that route of detecting a browser and device type.. Go with Media Queries.. @media only screen and (max-device-width: 480px) All devices are now all well known but regardless the resolution will determine the css style you offer the client.. A Lot more can be found here : MediaQueries I would suggest MAYBE bootstrap3 framework // foundation etc there are a lot to choose from but these are the top two which come with built in definitions and a good framework to write css for each! What you want to focus on is the grid system.. such as Bootstrap They work of a col-size-n grid of 12 colums, responsive. A Lot more documentation can be found there and it opens a world of other questions! :)

http://stackoverflow.com/comment/41944249
comment on: http://stackoverflow.com/q/26672041
score: 2
has text: Post your `.product-detail-lightbox` element HTML.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26520229
upvote count: 2
answers question: http://stackoverflow.com/q/26519796
has body: You need to provide an authentication token if you wish to play sounds from an account that are not public. From SoundCloud's API Guide: "Note that as long as the sound is public, you'll only need to provide a client_id when creating a client. If you would like to access the stream URL for a private sound, you'll need to authenticate your app." For instructions on authentication, see: https://developers.soundcloud.com/docs/api/guide#authentication
has comment: http://stackoverflow.com/comment/41670101
has comment: http://stackoverflow.com/comment/41682597
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41670668
has comment: http://stackoverflow.com/comment/41670653
has comment: http://stackoverflow.com/comment/41670002
score: 2

http://stackoverflow.com/comment/41777921
has text: Thank you for the answer! Still going to disagree with you about SO forcing me to include code, though. It's incredibly coercive. Besides, what if I'd posted it on some other site? Or They wouldn't even know to try and do this. And really, if they're going to be heavy handed, then they need to provide a compelling explanation.
comment on: http://stackoverflow.com/q/26580382
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26669184
has answer: http://stackoverflow.com/a/62878565
has answer: http://stackoverflow.com/a/49670278
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41939312
has answer: http://stackoverflow.com/a/26669330
tagged with: integer
favorite count: 0
has title: How to recognize that integer value is thousands, hundreds, or tens?
type: Question
has answer: http://stackoverflow.com/a/26669343
has body: I have several numbers to proceed, let's assume that my numbers are : 14000,32100,510,2100, and 10000 So, how to make the numbers recognized as thousands or hundreds in javascript? Is there any function for this?
answer count: 6
score: 4
has comment: http://stackoverflow.com/comment/41939200
has comment: http://stackoverflow.com/comment/41939764
has answer: http://stackoverflow.com/a/26669402
upvote count: 4
has answer: http://stackoverflow.com/a/26669494
tagged with: function

http://stackoverflow.com/a/26538876
has body: I think a simple jQuery get with Ajax is easiest. I am on my phone but this is a few lines of code as long as you are using jQuery: $.get("url-of-content.htm", "", function(data){ $("#CONTENT").html(data); ); Sorry i didn't provide more logic for retrieving dynamically the html content but I hope this helps as I have used this approach a lot with sites that already load jQuery because it is so easy to pull external content this way.
score: 0
answers question: http://stackoverflow.com/q/26538473
type: Answer
has comment: http://stackoverflow.com/comment/41703125

d3.js
tags question: http://stackoverflow.com/q/26620083
tags question: http://stackoverflow.com/q/26549071
tags question: http://stackoverflow.com/q/26582181
tags question: http://stackoverflow.com/q/26635914
tags question: http://stackoverflow.com/q/26650561
tags question: http://stackoverflow.com/q/26581661
tags question: http://stackoverflow.com/q/26595986
tags question: http://stackoverflow.com/q/26661270
tags question: http://stackoverflow.com/q/26536450
tags question: http://stackoverflow.com/q/26538268
tags question: http://stackoverflow.com/q/26583955
tags question: http://stackoverflow.com/q/26583329
tags question: http://stackoverflow.com/q/26666334
tags question: http://stackoverflow.com/q/26615861
tags question: http://stackoverflow.com/q/26520866
tags question: http://stackoverflow.com/q/26657501
tags question: http://stackoverflow.com/q/26552184
tags question: http://stackoverflow.com/q/26553133
tags question: http://stackoverflow.com/q/26628757
tags question: http://stackoverflow.com/q/26619203
tags question: http://stackoverflow.com/q/26625775
tags question: http://stackoverflow.com/q/26612936
tags question: http://stackoverflow.com/q/26602001
tags question: http://stackoverflow.com/q/26545670
tags question: http://stackoverflow.com/q/26596586
tags question: http://stackoverflow.com/q/26652925
tags question: http://stackoverflow.com/q/26524826
tags question: http://stackoverflow.com/q/26634889
tags question: http://stackoverflow.com/q/26592463
type: Tag
tags question: http://stackoverflow.com/q/26584280
tags question: http://stackoverflow.com/q/26582766
tags question: http://stackoverflow.com/q/26594721
tags question: http://stackoverflow.com/q/26587808
tags question: http://stackoverflow.com/q/26596792
tags question: http://stackoverflow.com/q/26637785
tags question: http://stackoverflow.com/q/26624430
tags question: http://stackoverflow.com/q/26613778
tags question: http://stackoverflow.com/q/26524877
tags question: http://stackoverflow.com/q/26589298
tags question: http://stackoverflow.com/q/26567929
tags question: http://stackoverflow.com/q/26589957
tags question: http://stackoverflow.com/q/26588579
tags question: http://stackoverflow.com/q/26626125
tags question: http://stackoverflow.com/q/26653902
tags question: http://stackoverflow.com/q/26641114
tags question: http://stackoverflow.com/q/26627452
tags question: http://stackoverflow.com/q/26671932
tags question: http://stackoverflow.com/q/26609497
tags question: http://stackoverflow.com/q/26643038
tags question: http://stackoverflow.com/q/26666484
tags question: http://stackoverflow.com/q/26619698
tags question: http://stackoverflow.com/q/26564279
tags question: http://stackoverflow.com/q/26661391
tags question: http://stackoverflow.com/q/26521945
tags question: http://stackoverflow.com/q/26538312
tags question: http://stackoverflow.com/q/26650685
tags question: http://stackoverflow.com/q/26653537
tags question: http://stackoverflow.com/q/26521539
tags question: http://stackoverflow.com/q/26652777
tags question: http://stackoverflow.com/q/26548106
tag name: d3.js
tags question: http://stackoverflow.com/q/26587370
tags question: http://stackoverflow.com/q/26517909
tags question: http://stackoverflow.com/q/26671820
tags question: http://stackoverflow.com/q/26658232
tags question: http://stackoverflow.com/q/26612303
tags question: http://stackoverflow.com/q/26638331
tags question: http://stackoverflow.com/q/26636653
tags question: http://stackoverflow.com/q/26548978
tags question: http://stackoverflow.com/q/26562129
tags question: http://stackoverflow.com/q/26555825
tags question: http://stackoverflow.com/q/26530070
tags question: http://stackoverflow.com/q/26550349
tags question: http://stackoverflow.com/q/26611316
tags question: http://stackoverflow.com/q/26525362
tags question: http://stackoverflow.com/q/26576050
tags question: http://stackoverflow.com/q/26659225
tags question: http://stackoverflow.com/q/26593759
tags question: http://stackoverflow.com/q/26549761

http://stackoverflow.com/comment/41734230
has text: .pcss3t > label i { display: block; float: left; margin: 0 8px 0 -2px; padding: 0; border: 0; outline: none; font-family: FontAwesome; font-style: normal; font-size: 17px; } .pcss3t > input:checked + label { cursor: default; background:#E5E5E5; } .pcss3t > label:hover { background:#D6D6D6; } .pcss3t > ul { list-style: none; position: relative; display: block; margin: 0; padding: 0; border: 0; outline: none; font-size: 13px; background: #fff; text-align: left; }
comment on: http://stackoverflow.com/a/26555634
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41768081
type: Comment
type: QuestionComment
has text: @FrankvanPuffelen Hm, this is the problem though, how do I get a snapshot of the entire database without changing anything in it? Because in my head, I have to grab all keys in the database, count how many there are, then loop over these keys to find a match with the ID, then and only then remove the key that matched. Am I going about it all wrong?
comment on: http://stackoverflow.com/q/26572411
score: 0

http://stackoverflow.com/a/26516304
downvote count: 1
has comment: http://stackoverflow.com/comment/42578387
has comment: http://stackoverflow.com/comment/41666285
has comment: http://stackoverflow.com/comment/47455863
has comment: http://stackoverflow.com/comment/79119596
has comment: http://stackoverflow.com/comment/74839408
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/62097270
answers question: http://stackoverflow.com/q/26514025
has comment: http://stackoverflow.com/comment/79204463
type: Answer
accepted answer of: http://stackoverflow.com/q/26514025
upvote count: 16
score: 15
has comment: http://stackoverflow.com/comment/73317790
has body: Is my assumption wrong that this feature in chrome dev tools can allow loading a resource locally, as if it was loaded from the original location? I don't think this is accurate. When you map a file on a server to your local workingspace, Chrome acts as a sort of editor for your local files. You can edit the files through Chrome and Command+S to save your local files. But nothing has changed on the server. It doesn't update the files on the server, and it doesn't tell Chrome to "Use my local files instead of what's on the server". What many people do is automate the deployment process so that when a local file is updated (either through Chrome + Workspace Mapping or just simply by editing in your editor), your working copy gets deployed. That way, next time you reload the browser, you'll see your edits. Edit: From the workspace documentation: And you can map resources served from a local web server to files on disk, so when you change and save those files, you can view them as if they were being served. I think the key here is local web server. I did a bit more digging and found this dev tools docs issues, with a comment effectively saying that what you're trying to do isn't supported: The DevTools currently does not do resource substitution. It can simply map the remote files to your local copy so if things are kept in sync (like using a local server on-system) then when refreshing your modifications can persist. Looks like you'll need a way to deploy after making changes or have your devtools workspace point to the server docroot.

http://stackoverflow.com/a/26553819
has comment: http://stackoverflow.com/comment/41729576
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/41729739
type: Answer
has comment: http://stackoverflow.com/comment/41731422
accepted answer of: http://stackoverflow.com/q/26553384
answers question: http://stackoverflow.com/q/26553384
has body: function validateForm(){ var QnoText = ['lien']; // add IDs here for questions with optional text input var ids = ''; flag = true; for (i=0; i&lt;QnoText.length; i++) { CkStatus = document.getElementById(QnoText[i]).checked; ids = QnoText[i]+'lname'; var eD = ""; if (CkStatus &amp;&amp; document.getElementById(ids).value == '') { eD = eD+' lienholder name'; document.getElementById(ids).focus(); flag = false; } ids2 = QnoText[i]+'laddress'; if (CkStatus &amp;&amp; document.getElementById(ids2).value == '') { eD=eD+' lienholder address'; document.getElementById(ids2).focus(); flag = false; } ids3 = 'datepicker2'; if (CkStatus &amp;&amp; document.getElementById(ids3).value == '') { eD=eD+' lien date'; document.getElementById(ids3).focus(); flag = false; } if(eD!="") alert("Please enter "+eD); } return flag; } Their are two things: The id you are using to validate the third "date" input is wrong, it should be "datepicker2" as specified in html. In order to achieve the error in single alert box please follow the above code. jsfiddle.net/t4Lgm0n2/9

http://stackoverflow.com/comment/41923674
type: QuestionComment
has text: the `autocomplete` object seem to have a `change` property as it was used here: http://stackoverflow.com/questions/6431459/jquery-autocomplete-trigger-change-event
comment on: http://stackoverflow.com/q/26660748
score: 0
type: Comment

http://stackoverflow.com/a/26709979
has body: You could either use a background image (containing the blank boxes) or you'd have to use a GGrid and place each character in a distinct cell. Using JS, it should be easy to extract the n-th character of the string in the n-th column.
upvote count: 1
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/26672189

http://stackoverflow.com/q/26604164
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26605133
has body: My objective is to have the previous and subsequent slides (&lt;img&gt;) appearing before and after each current slide, within Cycle2. I can achieve this with the previous slide no problem, I just can't quite get the one after. My HTML is as follows: &lt;section&gt; &lt;div class="sliderPrev"&gt;&lt;/div&gt; // Previous slide (1.jpg) goes here &lt;div class="banner_images"&gt; &lt;img src="1.jpg"&gt; &lt;img src="2.jpg"&gt; // Hypothetical current slide ... &lt;img src="n.jpg"&gt; &lt;/div&gt; &lt;div class="sliderNext"&gt;&lt;/div&gt; // Next slide (3.jpg) should go here &lt;/section&gt; And my jQuery: var cycle = { before : function( e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) { // Works! $('.sliderPrev').html( $.clone( outgoingSlideEl ) ); // Doesn't work... $('.sliderNext').html( $( incomingSlideEl ).clone().next('img')[0] ); }, run : function() { $('.banner_images').cycle( this.attrs ) .on( 'cycle-before', function( e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) { cycle.before( e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) }) .on( 'cycle-after', function( e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) { cycle.after( e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) }); } } This is the closest I can get without getting undefined or behavioural errors, but the .sliderNext div is not populated. I realise I'll have to use a conditional once the penultimate slide is reached, but for now just having something work would be enough.
has comment: http://stackoverflow.com/comment/41821619
has comment: http://stackoverflow.com/comment/41822593
favorite count: 0
has title: Target the slide after next in jQuery Cycle2
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26605133
score: 1
has comment: http://stackoverflow.com/comment/41822692
tagged with: jquery-cycle2
type: Question
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/41658850
score: 0
type: QuestionComment
type: Comment
has text: localStorage is pretty straightforward to use. Did you debug it with dev tools and make sure each function is being called? I would also check that you're not trying to store too much data. Local storage has a data size limit that is different with each browser.
comment on: http://stackoverflow.com/q/26514396

http://stackoverflow.com/q/26546352
tagged with: foreach
has body: I've just been looking over some photos from this year's ng-europe conference and noticed a slide I think might show some code from the upcoming Angular 2. See here: (Source: https://plus.google.com/u/0/photos/+ThierryLAU/albums/6073085583895256529/6073092865671487010?pid=6073092865671487010&amp;oid=105910465983441810901) What I don't get is this: Why is the author of this code using Array.prototype.forEach.call(array, cb) in preference to the shorter and (in my opinion) equivalent version array.forEach(cb). The only reason I could imagine would be performance implications. Does anybody know of another difference? Or am I maybe right with my performance guess?
possible better answer: http://stackoverflow.com/a/26546501
has title: Why would one use Array.prototype.forEach.call(array, cb) over array.forEach(cb)?
accepted answer: http://stackoverflow.com/a/26546575
upvote count: 5
tagged with: javascript
linked to: http://stackoverflow.com/q/8433459
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41717420
has comment: http://stackoverflow.com/comment/41715763
has comment: http://stackoverflow.com/comment/41715972
downvote count: 0
favorite count: 0
tagged with: angularjs
type: Question
answer count: 2
score: 5
has answer: http://stackoverflow.com/a/26546575
has answer: http://stackoverflow.com/a/26546501
linked to: http://stackoverflow.com/q/1424710

http://stackoverflow.com/comment/41705242
comment on: http://stackoverflow.com/q/26524479
has text: You need show more code for someone to help you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41915514
score: 0
type: QuestionComment
has text: i didnt realise that lines was also an array
type: Comment
comment on: http://stackoverflow.com/q/26656260

http://stackoverflow.com/a/26548538
type: AcceptedAnswer
has body: you get the viewport dimensions of your page, and then wrap your resize function inside an if statement: $(window).resize(function() { var currentViewPortHeight = $( window ).height(); var currentViewPortWidth = $( window ).width(); var minimumViewPortHeight = 100 //your minimum height; var minimumViewPortWidth = 100 // your minimum width; if(currentViewPortHeight &gt; minimumViewPortHeight &amp;&amp; currentViewPortWidth &gt; minimumViewPortWidth ) { base.resizeNow(); } });
accepted answer of: http://stackoverflow.com/q/26548455
type: Answer
answers question: http://stackoverflow.com/q/26548455
score: 0

http://stackoverflow.com/q/26644990
score: 19
has comment: http://stackoverflow.com/comment/43135412
type: Question
type: AnsweredQuestion
upvote count: 19
has comment: http://stackoverflow.com/comment/41896396
has title: Socket.IO clients to receive offline messages when coming back
has answer: http://stackoverflow.com/a/27711807
possible better answer: http://stackoverflow.com/a/37470944
answer count: 3
has body: Environment: Nodejs+Socketio Problem: client A and client B both connect to server; client B is offline; client A sends a message to client B(client B still offline); client B connect to server again; [Problem] client B can't receive the message from A; Server Code var clients = {}; io.sockets.on('connection', function (socket) { socket.on('online', function (data) { if (!clients[data.username]) { clients[data.username] = socket; } io.sockets.emit('message', data.user + 'online now'); }); socket.on('say', function (data) { if (data.to == 'all') { io.sockets.emit('message', data.message); } else { //to specific client clients[data.to].emit('message', data.message); } }); }); Description client B connected to server at one place first.During the period of client B's offline, client A sent messages to client B. Then client B connect to server at another place again, and client B needs to receive those message from client A. How to make it work?
has comment: http://stackoverflow.com/comment/66881176
downvote count: 0
has comment: http://stackoverflow.com/comment/43278818
has comment: http://stackoverflow.com/comment/41898204
tagged with: javascript
favorite count: 0
tagged with: offline
tagged with: sockets
has answer: http://stackoverflow.com/a/58045864
has answer: http://stackoverflow.com/a/37470944
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27711807
has comment: http://stackoverflow.com/comment/41899472

http://stackoverflow.com/q/26653953
accepted answer: http://stackoverflow.com/a/26654102
answer count: 3
possible better answer: http://stackoverflow.com/a/26654058
has comment: http://stackoverflow.com/comment/41910964
downvote count: 0
has answer: http://stackoverflow.com/a/26654058
favorite count: 0
has body: I was working on my site at work, when I encountered something strange, I'm fetching data from a database via ajax, and then I uses some loops to update the data in a table. Here is my first attempt at the loop for(var id in data){ for(var key in data[id]) for(var e in document.getElementsByName(key+id)) e.innerHTML = data[id][key] !== null ? data[id][key] : ""; I expected that to work without a problem, but it doesn't. None of the fields in the table gets updated, and I have no idea why. Then I decided to test with something more traditional, and ended up with this. for(var id in data){ for(var key in data[id]){ var temp = document.getElementsByName(key+id); for(var i=0; i&lt;temp.length; i++) temp[i].innerHTML = data[id][key] !== null ? data[id][key] : ""; } That worked prefect, but I don't understand why, since from what I can see, the loops should do the same thing. So I wonder, why are they different, and how can I fix it. I like consistencies in my codes, and don't want to use the for(var i=0; i&lt;temp.length; i++) since I used the other types of loops earlier.
has title: Why are these loops different?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26654079
has answer: http://stackoverflow.com/a/26654102
type: Question
upvote count: 4
tagged with: javascript
score: 4

extjs
tags question: http://stackoverflow.com/q/26548041
tags question: http://stackoverflow.com/q/26635548
tags question: http://stackoverflow.com/q/26617511
tags question: http://stackoverflow.com/q/26626290
tags question: http://stackoverflow.com/q/26609169
tags question: http://stackoverflow.com/q/26597414
tags question: http://stackoverflow.com/q/26516060
tags question: http://stackoverflow.com/q/26578881
type: Tag
tags question: http://stackoverflow.com/q/26547793
tags question: http://stackoverflow.com/q/26640179
tags question: http://stackoverflow.com/q/26561456
tags question: http://stackoverflow.com/q/26548022
tags question: http://stackoverflow.com/q/26592422
tags question: http://stackoverflow.com/q/26624305
tags question: http://stackoverflow.com/q/26551275
tags question: http://stackoverflow.com/q/26638567
tags question: http://stackoverflow.com/q/26651762
tags question: http://stackoverflow.com/q/26616230
tags question: http://stackoverflow.com/q/26590761
tags question: http://stackoverflow.com/q/26535912
tags question: http://stackoverflow.com/q/26587012
tags question: http://stackoverflow.com/q/26546585
tags question: http://stackoverflow.com/q/26624737
tag name: extjs
tags question: http://stackoverflow.com/q/26628673
tags question: http://stackoverflow.com/q/26633777
tags question: http://stackoverflow.com/q/26567887
tags question: http://stackoverflow.com/q/26525639
tags question: http://stackoverflow.com/q/26559323
tags question: http://stackoverflow.com/q/26514591
tags question: http://stackoverflow.com/q/26611591
tags question: http://stackoverflow.com/q/26610959

http://stackoverflow.com/comment/41908305
has text: How do I achieve this. I need to create background window
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26652484

http://stackoverflow.com/comment/41806103
type: QuestionComment
score: 2
has text: Your code works as expected. The code within the click handler does not run until a click event actually occurs.
comment on: http://stackoverflow.com/q/26595704
type: Comment

http://stackoverflow.com/q/26640244
possible better answer: http://stackoverflow.com/a/26640588
accepted answer: http://stackoverflow.com/a/26640283
has title: calculate the value of an obj key while using different key/values of the same object?
has comment: http://stackoverflow.com/comment/41887458
has answer: http://stackoverflow.com/a/26640343
has comment: http://stackoverflow.com/comment/41887662
has body: How can I calculate pageSize.offset from the keyspageSizes.w/pageSize.h inside the same object? var pageSizes = { w: parseInt(scope.page.imagewidth), h: parseInt(scope.page.imageheight), offset: (pageSize.w/pageSize.h) } console.log('page.offset', pageSizes.offset); currently i'm getting a RefferenceError: pageSize is not defined. I'm assuming this isn't possible. therefore, what would be the best way to do this?
has comment: http://stackoverflow.com/comment/41887836
has answer: http://stackoverflow.com/a/26640283
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26640588
has comment: http://stackoverflow.com/comment/41887608
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41887490
answer count: 3

http://stackoverflow.com/a/28466941
upvote count: 4
score: 4
has body: I had the same problem. Turned out the authors of posts and pages where not adding Meta Descriptions. Make sure you have a proper Meta Description and the optional og:meta tag which is specifically for Facebook. You can use the Facebook debugger to see what they are grabbing from your page and what you are missing. https://developers.facebook.com/tools/debug/
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26645847

http://stackoverflow.com/a/26664119
has comment: http://stackoverflow.com/comment/41960259
score: 1
has comment: http://stackoverflow.com/comment/41954470
has comment: http://stackoverflow.com/comment/41946733
answers question: http://stackoverflow.com/q/26663072
has comment: http://stackoverflow.com/comment/41943394
has comment: http://stackoverflow.com/comment/41943472
has body: I have streamlined your approach: the binds to a computed list of options (visibleTextBatches) this computed list depends on the state of the checkbox (latestOnly), effectively toggling between the full and the filtered list the filtered list (latestTextBatches) is another computed that holds the latest version for each group the stores the actual selected TextBatch object in an observable (selectedTextBatch) there is a subscription to visibleTextBatches that causes the latest selectable TextBatch to become the current one when the list is filtered. When the list is unfiltered, it does nothing. function TextBatch(data) { this.textbatchId = data.textbatchId; this.parentId = data.parentId; this.version = data.version; this.title = ko.observable(data.title); } function ViewModel() { var self = this; // read up on the mapping plugin, too self.textBatches = ko.observableArray([ new TextBatch({textbatchId: 1, parentId: 1, version: 1, title: "TB1.1"}), new TextBatch({textbatchId: 2, parentId: 1, version: 2, title: "TB1.2"}), new TextBatch({textbatchId: 3, parentId: 3, version: 1, title: "TB2.1"}) ]); self.selectedTextBatch = ko.observable(); self.latestOnly = ko.observable(false); self.latestTextBatchGroups = ko.computed(function () { var latest = {}; ko.utils.arrayForEach(self.textBatches(), function (batch) { if (!latest.hasOwnProperty(batch.parentId) || batch.version > latest[batch.parentId].version ) latest[batch.parentId] = batch; }); return latest; }); self.latestTextBatches = ko.computed(function () { return ko.utils.arrayFilter(self.textBatches(), function (batch) { return batch === self.latestTextBatchGroups()[batch.parentId]; }); }); self.visibleTextBatches = ko.computed(function () { return self.latestOnly() ? self.latestTextBatches() : self.textBatches(); }); self.visibleTextBatches.subscribe(function () { var selectedBatch = self.selectedTextBatch(); if (selectedBatch && self.latestOnly()) { self.selectedTextBatch( self.latestTextBatchGroups()[selectedBatch.pa…
has comment: http://stackoverflow.com/comment/41943568
accepted answer of: http://stackoverflow.com/q/26663072
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41943349
has comment: http://stackoverflow.com/comment/41946929
has comment: http://stackoverflow.com/comment/41943605
has comment: http://stackoverflow.com/comment/41945057
has comment: http://stackoverflow.com/comment/41943545
has comment: http://stackoverflow.com/comment/41946803
has comment: http://stackoverflow.com/comment/41943431
has comment: http://stackoverflow.com/comment/41948858
downvote count: 0
has comment: http://stackoverflow.com/comment/41943519
has comment: http://stackoverflow.com/comment/41946685
has comment: http://stackoverflow.com/comment/41960448
type: AcceptedAnswer

http://stackoverflow.com/q/26577105
tagged with: javascript
score: 0
has title: Railcasts 340 - Datatables (not working for me)
type: UnansweredQuestion
tagged with: ruby-on-rails
has body: I just started watching the beginning of this tutorial about implementing datatables within the Ruby on Rails application. I've followed the first few steps which are to only add the gems in the Gemfile, add the necessary content in the javascript and css file, and then add the ID attribute to the table. That should at the very least get things working. Doesn't work for me though Here's the files that the Railcasts demo simply modified to get a very basic datatable working: #Gemfile ... gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails' gem 'jquery-ui-rails' gem 'will_paginate' . #application.css /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the bottom of the * compiled file so the styles you add here take precedence over styles defined in any styles * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * *= require_tree . *= require_self *= require dataTables/jquery.dataTables */ . #assets/javascript/products.js jQuery -> $('#products').dataTable() . #views/products.html.erb <%= check_box_tag "selectAll", "SelectAll" %> Product Actions <% @products.each do |product| %> <%= check_box_tag "product_ids[]", product.id %> <%= product.id %> <%= link_to "".html_safe, "#", class: "btn btn-xs btn-primary" %> <%= link_to "".html_safe, "#", method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-xs btn-danger" %> <% end %> <%= render 'edit_multiple' %> <% end %> I know the demo goes into much further than this, but this is what he did to get it working at the minimum. Any ideas?
has answer: http://stackoverflow.com/a/26597722
type: Question
has comment: http://stackoverflow.com/comment/41772300
answer count: 1

http://stackoverflow.com/comment/42042063
score: 0
type: AnswerComment
has text: jQuery is not a framework, it's a library, quite a different thing.
type: Comment
comment on: http://stackoverflow.com/a/26621788

http://stackoverflow.com/a/26567049
upvote count: 1
answers question: http://stackoverflow.com/q/26565770
score: 1
has body: This is most likely jshint failing, you need to add performLogin to tests/.jshintrc to the predef array: "predef": [ "document", "window", "performLogin", // like this ...
downvote count: 0
type: Answer

http://stackoverflow.com/a/26601575
accepted answer of: http://stackoverflow.com/q/26601022
has body: Both your select element and your text input element have the same ID. Make them unique and make one call for each element in your JS. Also, get rid of the onsubmit event handler attribute in your select element.
answers question: http://stackoverflow.com/q/26601022
has comment: http://stackoverflow.com/comment/41849443
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41849289
score: 0
type: Answer

getelementsbyclassname
tags question: http://stackoverflow.com/q/26515147
type: Tag
tag name: getelementsbyclassname

http://stackoverflow.com/comment/41887177
type: QuestionComment
has text: ID attributes must start with a letter (http://www.w3.org/TR/html401/types.html#type-name)
comment on: http://stackoverflow.com/q/26640035
score: 0
type: Comment

http://stackoverflow.com/comment/41778098
type: Comment
comment on: http://stackoverflow.com/a/26580114
score: 0
type: AnswerComment
has text: :'c now the trouble is getting elements I have manipulated to reset. I will make a new help topic I suppose.

http://stackoverflow.com/q/26554683
has title: How can I force this jquery to wait until click event has finished?
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/26556255
has comment: http://stackoverflow.com/comment/41731241
has body: I am using an Ajax File Upload, which has overloaded the onClientUploadCompleteAll event, in addition to others. I am performing navigation after clicking the Upload button in jquery, and I want to force the function to wait until onuploadcompleteall has executed before I perform the navigation. Right now it is navigating to the next page before the uploadcompleteall runs. Is there any way to either force it to wait, or get what the user clicked on within the onuploadcompleteall event? &lt;asp:AjaxFileUpload ID="AjaxFileUpload1" CssClass="0001.01" runat="server" AllowedFileTypes="jpg,jpeg,png,gif" OnUploadStart="AjaxFileUpload1_UploadStart" OnUploadComplete="AjaxFileUpload1_UploadComplete" OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll" OnClientUploadComplete="onClientUploadComplete" OnClientUploadCompleteAll="onClientUploadCompleteAll" OnClientUploadStart="onClientUploadStart"&gt;&lt;/asp:AjaxFileUpload&gt; The onClientUploadCompleteAll event: function onClientUploadCompleteAll(sender, e) { //stuff } The file upload event that performs the click: function handleFileUpload(form) { number_of_plugin_instances_having_photos = 0; $('.upload-photos').map(function(i, el){ if($('.uploaded-thumbnail', el).length &gt; 0 || $('.uploaded-thumbnail-title', el).length &gt; 0) { number_of_plugin_instances_having_photos++; } }); if(number_of_plugin_instances_having_photos == 0) { form.submit(); } else { //setTimeout(function(){ number_of_plugin_instances_callbacks_uploaded = 0; $('.upload-photos').map(function(i, el){ if($('.uploaded-thumbnail', el).length &gt; 0 || $('.uploaded-thumbnail-title', el).length &gt; 0) { $('.ajax__fileupload_uploadbutton', el).trigger('click'); } }); //}, 1000); } } Calls the file upload event $.ajax({ type: "POST", url: loc + "/SubmitSections", data: dataValue, contentType: 'application/json; charset=utf-8', dataType: 'json' }) .done(function (data, status) { if (data.d != "success") { $("#modal-submitting").modal('hide'); $(".error_message")…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41731210
type: Question
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/41731328
tagged with: jquery
has answer: http://stackoverflow.com/a/26556255
tagged with: ajax
has comment: http://stackoverflow.com/comment/41731429
score: 0
answer count: 1

http://stackoverflow.com/a/26551334
has body: Demo: http://jsfiddle.net/g23aqagv/ $(document).ready(function() { setInterval(function(){ $(".owl-carousel").each(function(){ $(this).data('owlCarousel').updateVars(); }); },1500); }); Shorten the time for the update, but not too short. This works in the stable version 1 release of Owl Carousel, I don't know about Owl2. In your situation, you can do the following (as per @YeahMKD): $('.websiteDeveloped').change(function(){ if ($(this).val() == 'no'){ $('.completitionDate').show(); $('.consultationSlider').data('owlCarousel').updateVars(); } else if ($(this).val() == 'yes'){ $('.completitionDate').hide(); $('.consultationSlider').data('owlCarousel').updateVars(); } });
type: Answer
accepted answer of: http://stackoverflow.com/q/26542622
score: 1
has comment: http://stackoverflow.com/comment/41771496
answers question: http://stackoverflow.com/q/26542622
has comment: http://stackoverflow.com/comment/41771649
upvote count: 2
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/comment/41754795
type: Comment
comment on: http://stackoverflow.com/a/26567928
has text: not sure, what would this change compared to what the OP tried...?
type: AnswerComment
score: 0

http://stackoverflow.com/a/26606290
has body: I think that you have to pass the data parameter of your ajax call as follows if you want to send all your &lt;form&gt; values and start value: data: $('#EventAdd').serialize() + "&amp;start=" + start
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26605927
accepted answer of: http://stackoverflow.com/q/26605927
type: Answer
has comment: http://stackoverflow.com/comment/41831993

http://stackoverflow.com/a/26515176
type: Answer
has comment: http://stackoverflow.com/comment/41660259
has comment: http://stackoverflow.com/comment/41660205
has comment: http://stackoverflow.com/comment/41660391
accepted answer of: http://stackoverflow.com/q/26515078
answers question: http://stackoverflow.com/q/26515078
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41660305
has body: function roundTo(x, d) { return x.toFixed(d); }
has comment: http://stackoverflow.com/comment/41660239

http://stackoverflow.com/q/26546592
has body: This is my external javaScript named myJs.js function search(){ var hint = document.getElementById("sChoice").value; var item = document.getElementById("sKey").value; document.getElementById("c").value=hint; document.getElementById("iK").value=item; } This is my home page in html Select your Method use to search By Book Name By Author Name By Subject Name Search Here this code is on another html doc named "sResult.html" And my problem is I'm not able to get the values passed to the param tag by JavaScript at runtime, inside the applet I user "getPrameter("choice")" and "getParameter("itemKey")" it receive NULL values.
has comment: http://stackoverflow.com/comment/41718973
tagged with: javascript
has comment: http://stackoverflow.com/comment/41718446
has comment: http://stackoverflow.com/comment/41716296
has answer: http://stackoverflow.com/a/26547196
downvote count: 0
answer count: 1
tagged with: applet
has title: How to set param tag value of applet using JavaScript variables?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: deployment
has comment: http://stackoverflow.com/comment/41718341
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41718286
has comment: http://stackoverflow.com/comment/41718761
accepted answer: http://stackoverflow.com/a/26547196
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/41748659
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26557531
has text: Thanks, but unfortunately I cannot do that. See my latest edit to get an understanding of why. :)
type: AnswerComment

http://stackoverflow.com/comment/41889116
comment on: http://stackoverflow.com/a/26636660
type: AnswerComment
score: 0
type: Comment
has text: @eugene1832 Yeah sorry, didn't notice the comment. What is the error message that you get?

http://stackoverflow.com/comment/41915265
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26655707
has text: @hoceyn sadly no... this is a little too heavy for CSS. You might be able to come up with something custom using CSS though – do your blocks have some sort of logical order or are they random? (I am thinking create three columns and add the sub elements into them)

http://stackoverflow.com/a/26550928
accepted answer of: http://stackoverflow.com/q/26550088
type: Answer
answers question: http://stackoverflow.com/q/26550088
has body: Could I load the sub.html first and then have a function change the css file? Yes, and in this case you should. The reason it was not working before is that you are trying to change the stylesheet right before you load a new page, and you will only see the change on the current page. You will not see the stylesheet on the next page unless you do some extra work. In this example each link specifies a theme so that when the page loads it will replace the second stylesheet dynamically. There are many ways that this could be improved, but I kept it pretty simple for demo purposes. Do this in your HTML files: add a load() function that fires onload add a theme parameter to each href a b c Do this in the .js file: define load() function that uses the theme parameter to change the css on load this expects there to be at least 2 link tags on the page, and will blindly replace the second stylesheet URL based on the specified theme. Assumption is that nr00 is your default stylesheet and is the second link function load() { var theme = getUrlParam("theme"); othercss("CSS/" + theme + ".css"); } function othercss(dat) { var link = document.getElementsByTagName('link')[1]; link.disabled = true; link.href = dat; link.disabled = false; } // getUrlParam // borrowed from: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript function getUrlParam(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }
downvote count: 0
has comment: http://stackoverflow.com/comment/41727104
score: 1
has comment: http://stackoverflow.com/comment/41724910
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41727388

http://stackoverflow.com/a/26583209
upvote count: 10
has comment: http://stackoverflow.com/comment/98984261
has comment: http://stackoverflow.com/comment/41783469
has body: In order to disable the right click menu you could use the following snippet: document.oncontextmenu = function() { return false; }; I made a JSFiddle that displays the effect.
type: Answer
has comment: http://stackoverflow.com/comment/111584816
score: 7
has comment: http://stackoverflow.com/comment/41782568
downvote count: 3
answers question: http://stackoverflow.com/q/26583033

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/26638636

http://stackoverflow.com/comment/41923429
type: Comment
has text: thank you! Can you give and example if statement? Because I put some code about if but not working.
comment on: http://stackoverflow.com/a/26660508
type: AnswerComment
score: 0

http://stackoverflow.com/q/26585313
has body: I want to run code in a Template.foo.rendered only once. I have a Leaflet map and a locate-control plugin integrated. It works quite good so far but it seems the rendered template is rerun frequently. So my marker for locating the user on the map is reset every few seconds. I just want to initialize it once. var map, mapInit; map = void 0; mapInit = function (element){ map = L.mapbox.map(element, 'examples.map-20v6611k').setView(new L.LatLng(52.02312,13.02627), 11); L.control.locate({drawCircle: true, position: 'topright'}).addTo(map); } Template.map.rendered = function () { $(window).resize(function () { var h = $(window).height(); $mc = $('#map'); $mc.css('height', h); }).resize(); if (!this.rendered) { mapInit('map'); this.rendered = true; } }
score: 0
answer count: 1
tagged with: javascript
tagged with: meteor
linked to: http://stackoverflow.com/q/19220582
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26585577
has title: Running meteor.js code only once
type: Question
tagged with: leaflet

http://stackoverflow.com/q/26536757
accepted answer: http://stackoverflow.com/a/26536847
answer count: 1
downvote count: 0
tagged with: jquery
has body: I want to make a small plugin for WordPress that checks if any title breaks out of its container and the font-size should be edited. My PHP goes trough all the titles of every page and every article. It then takes each word out of the titles and puts them into an array. It then checks the longest individual word on all the titles and echoes it out. I then want to use javascript to alert if the longest word in the website does not fit in its container so I can use responsive design and insert correct font-sizes for all window sizes. This is my PHP (It works but I'm a designer so this is probably garbage. You can suggest still suggest improvements of course): $all = array(); // posts $custom_query = new WP_Query('cat=-999999'); while($custom_query-&gt;have_posts()) : $custom_query-&gt;the_post(); $title = get_the_title(); $pieces = explode(&quot; &quot;, $title); $all = array_merge($pieces, $all); endwhile; wp_reset_postdata(); //pages query_posts( 'post_type=page&amp;posts_per_page=999999999' ); if (have_posts()) : while (have_posts()) : the_post(); $title = get_the_title(); $pieces = explode(&quot; &quot;, $title); $all = array_merge($pieces, $all); endwhile; endif; $lengths = array_map('strlen', $all); $maxLength = max($lengths); $index = array_search($maxLength, $lengths); $longestHeading = $all[$index]; echo &quot;&lt;h1&gt;&quot; . $longestHeading . &quot;&lt;/h1&gt;&quot;; The width of the heading is equal to its container although it breaks out. I'd like to know if it breaks out and is longer than the container and then alert the user. Thank you!
favorite count: 0
tagged with: php
tagged with: css
type: AnsweredQuestion
has title: How to get the width of an element that breaks out of its container with javascript?
has answer: http://stackoverflow.com/a/26536847
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/41917120
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26657288
has text: $(this).click() should do it -- are you certain your event listener for the IMG tag is working? What is supposed to happen?
score: 0

http://stackoverflow.com/a/26666750
has body: If you can't use jQuery try a while loop: var p = 'myURLParameter'; var i = 0, t; while(document.body.getElementsByTagName('a') [i++]) { t = this.getAttribute("href"); this.href = t + "?parameter=" + p; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26666616

http://stackoverflow.com/comment/41967822
comment on: http://stackoverflow.com/a/26634507
has text: As long as a request does NOT get routed through the session middleware, no session will be created. So if it's a request for a static file, for example, and the static middleware responds and does not call `next` (thus ending the middleware chain), no session will be created.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/26535912
accepted answer: http://stackoverflow.com/a/26536541
tagged with: javascript
has comment: http://stackoverflow.com/comment/41698532
score: 0
answer count: 1
has body: Is there any way to change the mouse over color of the header of an accordion item ? I was able to change the background color by theming it this way in /packages/myTheme/sass/var/container/Container.scss $accordion-header-background-color: #009FDF !default; $accordion-header-color: white !default; But I'm not seeing anything for the mouse over color (which is light blue in the Neptune theme that I'm extending) and also, for the color of the tool icon. Any ideas ? Solution: I've used the solution below to change the mouse over color, and this, done at the theme level $accordion-header-background-color: #009FDF !default; $accordion-header-color: white !default; $accordion-tool-background-image: 'tools/tool-sprites' !default; The last line puts back the bright set of tool icons instead of the dark ones.
tagged with: extjs
tagged with: extjs4
has title: Changing accordion mouseover color and tool icon color
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26536541

http://stackoverflow.com/comment/41895555
type: QuestionComment
has text: Probably the easiest way would be to wrap your content in an element that is hidden and have a message stating JS is required in another element. In the CSS hide the content and show the message so that is the default then in JS switch it. No JS means all they see is a message to enable JS.
score: 2
comment on: http://stackoverflow.com/q/26644743
type: Comment

http://stackoverflow.com/comment/41665687
has text: look into the `refresh` methods in jQuery mobile
comment on: http://stackoverflow.com/q/26517750
score: 0
type: Comment
type: QuestionComment

mongoose
tags question: http://stackoverflow.com/q/26624230
tags question: http://stackoverflow.com/q/26564864
tags question: http://stackoverflow.com/q/26536705
type: Tag
tags question: http://stackoverflow.com/q/26657207
tags question: http://stackoverflow.com/q/26670534
tags question: http://stackoverflow.com/q/26665256
tag name: mongoose
tags question: http://stackoverflow.com/q/26548204
tags question: http://stackoverflow.com/q/26627721
tags question: http://stackoverflow.com/q/26514961
tags question: http://stackoverflow.com/q/26588435
tags question: http://stackoverflow.com/q/26640919
tags question: http://stackoverflow.com/q/26557261
tags question: http://stackoverflow.com/q/26616942
tags question: http://stackoverflow.com/q/26657881
tags question: http://stackoverflow.com/q/26582970
tags question: http://stackoverflow.com/q/26654145
tags question: http://stackoverflow.com/q/26592128
tags question: http://stackoverflow.com/q/26591727

http://stackoverflow.com/q/26657311
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41916929
type: Question
has title: Listing rowindex as a letter?
tagged with: javascript
has body: I am currently working on a seat booking application for an assignment, and am having an issue. I want to display the seats that are booked in a section of the site, for example "Booked: C13,C15, D12." So far I have this section printing the row index and cell index. (for example, 0313, 0315, 0412) but want to set up some kind of translator or dictionary to change the row index to letters. I was looking at dictionarys but they didn't seem to be working. var row = { "A": 1, "B": 2, "C": 3, "D": 4, "E": 5 } I am somewhat of a novice at Javascript, and I'm aware this is probably something very simple, but Google isn't giving me anything.
score: 0
has comment: http://stackoverflow.com/comment/41917341
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26657391

http://stackoverflow.com/comment/42134070
comment on: http://stackoverflow.com/a/26665409
type: AnswerComment
type: Comment
has text: This works for converting text if i already have it in the proper formatting, but here my problem is opening it at all.
score: 0

http://stackoverflow.com/comment/41682494
has text: `split` breaks the string into an array of strings based on an input character or string. For example, `string.split('{');` What you are looking for is `substr`
comment on: http://stackoverflow.com/q/26527794
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26611928
answers question: http://stackoverflow.com/q/26611511
has comment: http://stackoverflow.com/comment/41838814
has comment: http://stackoverflow.com/comment/41840950
has body: I hope this is what you are looking for: http://jsfiddle.net/1qasuuap/ I would stay away from ID's when using multiple items, as you cannot have multiple ID's, it will break JavaScript: var buttons = document.querySelectorAll('button[data-price]'); var buttonClicked = function (event) { var element = event.target; var price = parseInt(element.data('price')); var totalElement = document.querySelector('[data-total]'); var total = parseInt(totalElement.data('total')); if (element.hasClass('active')) { element.removeClass('active'); total = total - price; } else { element.addClass('active'); total = total + price; } totalElement.data('total', total); totalElement.innerHTML = total; }; for (var b = 0; b &lt; buttons.length; b++) { var button = buttons[b]; button.addEventListener('click', buttonClicked); } Use data attributes instead.
has comment: http://stackoverflow.com/comment/41839108
has comment: http://stackoverflow.com/comment/41838684
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/41836006
has comment: http://stackoverflow.com/comment/41836215
type: Answer
accepted answer of: http://stackoverflow.com/q/26611511

http://stackoverflow.com/comment/41789624
has text: you may want to inspect the "data" returned from server. in iOS you can easily attach safari to iPhone simulator.. for android you may use console.log with eclipse
type: QuestionComment
comment on: http://stackoverflow.com/q/26586743
score: 0
type: Comment

http://stackoverflow.com/comment/41796025
score: 0
has text: @user3558118. Your current method will replace any & all the white pixels on the canvas--even white pixels inside an image.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26587964

http://stackoverflow.com/comment/41838272
type: QuestionComment
comment on: http://stackoverflow.com/q/26613270
has text: `echo(json_encode('hit'));` You're asking for a json return but you're echoing plain text. just make it json encoded and you're good to go
score: 0
type: Comment

http://stackoverflow.com/comment/41888259
type: AnswerComment
type: Comment
score: 2
has text: IE9 up, afaik; it cannot be polyfilled because it's a syntax error to the jscript engine.
comment on: http://stackoverflow.com/a/26640588

http://stackoverflow.com/comment/41737398
has text: Thanks for the help. Throws "Uncaught TypeError: Cannot read property '0' of undefined" error here: arrayOfObjects.push({data:rz, utcday:rz.data[0].createdOn, ltrDay:moment.utc(utcday).format('DD MM YY')});
comment on: http://stackoverflow.com/a/26558080
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26521451
has comment: http://stackoverflow.com/comment/41687436
has body: Some theoretical sources of differences in general gzip (RFC 1952), which uses deflate (RFC 1951) as its compression format, is technically only a file format specification. In particular, algorithms are given significant latitude in how they choose to compress the bytes they're given (this is actually a strength). There's two basic compression mechanisms that can be used with deflate: Length-limited Huffman coding: Characters that appear more frequently can be given a shorter bit-sequence, and less frequent characters can be given a longer bit-sequence, leading to less bits overall to represent the same information. The Huffman tree used for encoding can be calculated dynamically from the input (or part of it), or it can be fixed. As a result, different encoders may use different Huffman trees for the same input, leading to different representations of the tree itself and of the encoded characters. LZ77 compression: Substrings which have been previously output already need not be output again; instead, only a backreference with the length of the identical substring need be output. Since finding all common substrings in a given input is a Hard Problem™, it's often more efficient just to find as many as possible with a given heuristic (e.g. tracking the last 6 substrings that started with each two-character prefix). Again, different encoders can (validly) produce different output for the same input. Finally, all of this compressed data is spread out into one or more blocks, and it's at the encoder's discretion when to switch to a new block. In theory, this could even be done every byte (though that wouldn't really be compression!). When ending a block, because its contents are encoded using the Huffman bit codes, it's possible that the block doesn't end on a byte boundary; in such a case, arbitrary bits can be added as padding to round to the next byte if the subsequent item in the stream must start on a whole byte (uncompressed blocks, for example, have to start on …
has comment: http://stackoverflow.com/comment/41686863
has comment: http://stackoverflow.com/comment/41687195
type: AcceptedAnswer
downvote count: 0
upvote count: 16
accepted answer of: http://stackoverflow.com/q/26516369
answers question: http://stackoverflow.com/q/26516369
type: Answer
has comment: http://stackoverflow.com/comment/41686832
score: 16

http://stackoverflow.com/comment/41664640
has text: Thank you this works perfectly. The map idea is great, thanks a lot!!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26517293
type: Comment

http://stackoverflow.com/comment/41866027
score: 0
has text: ` ` (+ polyfill for non-html5 browsers)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26628571

http://stackoverflow.com/comment/41716163
type: Comment
has text: @VasyaShmarovoz I don't really understand what you mean by that but you could also give the span elements an id and insert the text with innerHtml inside the spans, if that's what you're asking for?
comment on: http://stackoverflow.com/a/26546569
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41916866
has text: I mean the minimum possible value for y remains 0, even as x grows. You are correct that more noise should be expected as x grows. But the noise should still trend up and to the right. I just linked to a jsfiddle in the question. I'll post here when I have your solution in the fiddle.
comment on: http://stackoverflow.com/a/26656856
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41699141
type: AnswerComment
comment on: http://stackoverflow.com/a/26515726
has text: I understand now. I don't think the data will change but i can store the version number and compare them to see if i need to change anything. thank you
type: Comment
score: 0

http://stackoverflow.com/comment/41840359
type: Comment
has text: Add this line `alert(data);` after `alert('this alert is invoked successfully');` See what you are getting.
type: AnswerComment
comment on: http://stackoverflow.com/a/26593861
score: 0

http://stackoverflow.com/q/26617520
score: 0
type: Question
has title: Creating hover-visible buttons
has comment: http://stackoverflow.com/comment/41846281
has comment: http://stackoverflow.com/comment/41846317
tagged with: javascript
has answer: http://stackoverflow.com/a/26617708
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/26617660
has answer: http://stackoverflow.com/a/26617604
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create some options that are hidden unless the user goes with the mouse in a specific area. Let's take an example: Google+ profile page: When you go with the mouse cursor on the picture, the button appears. Here is what I tried: var $button = $("#button"); $("#profile-picture").on("mouseover", function() { $button.show(); }).on("mouseout", function() { $button.hide(); }); #profile-picture { width: 150px; height: 100px; } #button { position: absolute; display: none; width: 30px; height: 30px; top: 45px; left: 70px; opacity: 0.75; cursor: pointer; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;img src="http://datastore01.rediff.com/h450-w670/thumb/69586A645B6D2A2E3131/ckez1n08svw8f3en.D.0.Sidharth-Malhotra-Student-of-the-Year-Photo.jpg" id="profile-picture"&gt; &lt;img src="http://img3.wikia.nocookie.net/__cb20090227194712/java/images/0/0e/Camera_icon.gif" id="button" /&gt; The problem is that when I go with the cursor over the #button, it flickers. What can I do?
has comment: http://stackoverflow.com/comment/41846284

http://stackoverflow.com/comment/41664237
comment on: http://stackoverflow.com/a/26516946
has text: In the above case, the oldest value will get shifted out (removed from the array) when the array is full and you push. What would be the desired behavior when you push a new value and the array is full? The push fails?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41722069
type: AnswerComment
has text: @CalvinScherle Oh yeah! I didn't get you. :P
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26549810

http://stackoverflow.com/a/42283006
has body: Try to modify your code as given below. It will redirect all the http:// request to https:// var router = require('express').Router(); app.set('sslPort', 443); //For redirecting to https app.use(function (req, res, next) { // Checking for secure connection or not // If not secure redirect to the secure connection if (!req.secure) { //This should work for local development as well var host = req.get('host'); // replace the port in the host host = host.replace(/:\d+$/, ":" + app.get('sslPort')); // determine the redirect destination var destination = ['https://', host, req.url].join(''); return res.redirect(destination); } next(); }); router.post('/signup', app.signup); app.use('/', router);
answers question: http://stackoverflow.com/q/26665395
score: 0
type: Answer

http://stackoverflow.com/comment/41886217
has text: your approaches to the question is not helpfull, *how do i use a clsss instead of an id* in the js, is what you really want to know
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26639549

http://stackoverflow.com/comment/41904915
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26650492
has text: And i think it doesn't work fine in Chrome. But VS has a link with VS that when there is a error it will trow a exception. Look in the chrome console. Is there the same error?

http://stackoverflow.com/comment/41881617
comment on: http://stackoverflow.com/q/26637139
score: 0
type: Comment
type: QuestionComment
has text: you really should try to understand what you're writing first before you post a question

http://stackoverflow.com/comment/41944666
type: Comment
comment on: http://stackoverflow.com/q/26672117
score: 0
type: QuestionComment
has text: Yes. its the same everywhere.

http://stackoverflow.com/q/26522904
has answer: http://stackoverflow.com/a/26523208
type: Question
has title: Disable a <p:menuitem> during page loading
tagged with: primefaces
score: 1
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26529555
type: UnansweredQuestion
tagged with: jsf
downvote count: 0
has body: I have a &lt;p:menuitem&gt; which directs the user to a new page, and it takes some time to load the page completely. Now I have this problem when the user clicks the menuitem again during page loading, the application gets broken (says it can't find some component to update). I haven't found the cause of the error yet but I think it would make sense to prevent the user from clicking on the same menuitem again before the page loading is completed, I have tried several ways but couldn't work it out. Where I'm currently going is as follows: &lt;h:form id="maninmenuform"&gt; &lt;script type="text/javascript" &gt; $(document).ready(function(){ $("#ssss").click(function(){ $(this).attr("disabled", true); }); }); &lt;/script&gt; .... &lt;p:menuitem id="ssss" value="#{msg['capacity.headline']}" icon="ui-icon-note" url="/page/workload/workloadOverview.xhtml" rendered="#{loginBean.projectAccess()}" /&gt; Could anyone have a look and see what's missing there? Many thanks!

http://stackoverflow.com/comment/41793456
comment on: http://stackoverflow.com/q/26589020
type: Comment
type: QuestionComment
has text: @ charlietfl but conversion into base64 require html 5 i guess which is again will not work in ie6,7 etc and will you pls elaborate that proxy thingy you mentioned
score: 0

http://stackoverflow.com/q/26625868
answer count: 4
tagged with: node.js
has answer: http://stackoverflow.com/a/28862514
has answer: http://stackoverflow.com/a/26669975
upvote count: 3
type: UnansweredQuestion
has body: Is it possible to create a single Meteor application having multiple domains and displaying different views/layouts depending on that domain? For example, i have a admin interface accessible on admin.myapp.com and the two domains storeX.com and storeY.com. Both domains should point to the data from admin.myapp.com but displaying the data (mostly) independently of each other.
linked to: http://stackoverflow.com/q/13115723
type: Question
linked to: http://stackoverflow.com/q/13788146
score: 3
tagged with: multiple-domains
has answer: http://stackoverflow.com/a/26626001
tagged with: javascript
has answer: http://stackoverflow.com/a/26655649
tagged with: sites
downvote count: 0
has title: Single Meteor application having multiple domains
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/41755479
type: AnswerComment
score: 0
type: Comment
has text: @user3088260: $.getScript() is an ajax shorthand, and this is a js-solution. If you ask for a serverside solution, it would look different. But both solutions save bandwidth for your 256kbps-users
comment on: http://stackoverflow.com/a/26568171

http://stackoverflow.com/q/26587008
has answer: http://stackoverflow.com/a/26587193
has body: I'm trying to move my controller logic to a service. I've added DataService and injected $http. Then loadData() method returns JSON. I've injected this service into a TestController and called mentioned function, but it doesn't work. The same simple logic worked correctly from a controller. What should I improve? :) var app = angular.module('TestApp', []); app.controller('TestController', TestController); app.service('DataService', DataService); function TestController(DataService) { var vm = this; vm.personalInfo = DataService.loadData(); } function DataService($http) { var store = this; store.personInfo = []; store.loadData = function(){ $http.get('data.json') .success(function(data){ store.personInfo = data; }) .error(function(){ store.personInfo = "Error occured"; }); return store.personInfo; }; } My view looks as easy as that: Hello Plunker!
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26587193
has title: How to properly use custom service in AngularJS
has comment: http://stackoverflow.com/comment/41789138
type: Question
has comment: http://stackoverflow.com/comment/41789072
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/26636339
answers question: http://stackoverflow.com/q/26635778
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41881318
has body: This should work. If you want to re size back to previous height, let me know. http://jsfiddle.net/ko3pyy8c Change Height

http://stackoverflow.com/q/26568048
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41755167
has answer: http://stackoverflow.com/a/26568125
type: Question
has body: I'm trying to have a Div fade in after the user clicks two other divs. This is what I have so far but I'm pretty sure I'm doing something wrong. I can't seem to get the div to fade in even if only one div is clicked let alone two. Any help would be appreciated! thank you so much. This is where text is answer 1 answer 2 the answer that I want to fade in once the other two div's are clicked
tagged with: javascript
has title: Div fade in after other a href Div's are clicked

http://stackoverflow.com/comment/41858961
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26624633
has text: backbutton is working fine..... there is no issue with backbutton..... problem is, when i am clicking the refresh button in the browser, the page redirects to bing

http://stackoverflow.com/comment/41952969
type: Comment
type: QuestionComment
score: 0
has text: thanks for your comment...after trying different things i figured it out.
comment on: http://stackoverflow.com/q/26671249

http://stackoverflow.com/q/26520055
answer count: 1
has comment: http://stackoverflow.com/comment/41669598
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26521180
upvote count: 1
tagged with: jssor
has title: jssor How to Increase Number of Images
score: 1
has body: I cannot add more than 6 images in the slider. How can I increase the number of images that are displayed? When I increase images to 7, the seventh one does not work into the rotation. Here is the code I am using: jQuery(document).ready(function ($) { //Define an array of slideshow transition code var _SlideshowTransitions = [ {$Duration:1800,$Delay:30,$Cols:10,$Rows:5,$Clip:15,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$FlyDirection:5,$Reverse:true,$Formation:$JssorSlideshowFormations$.$FormationStraightStairs,$Assembly:2050,$Easing:{$Left:$JssorEasing$.$EaseInOutSine,$Top:$JssorEasing$.$EaseOutWave,$Clip:$JssorEasing$.$EaseInOutQuad},$ScaleHorizontal:1,$ScaleVertical:0.2,$Outside:true,$Round:{$Top:1.3}}, {$Duration:600,$Delay:30,$Cols:8,$Rows:4,$SlideOut:true,$FlyDirection:6,$Formation:$JssorSlideshowFormations$.$FormationStraightStairs,$Easing:{$Left:$JssorEasing$.$EaseInQuart,$Top:$JssorEasing$.$EaseInQuart,$Opacity:$JssorEasing$.$EaseLinear},$Opacity:2}, {$Duration:1800,$Delay:30,$Cols:10,$Rows:5,$Clip:15,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$SlideOut:true,$FlyDirection:5,$Reverse:true,$Formation:$JssorSlideshowFormations$.$FormationStraightStairs,$Assembly:2050,$Easing:{$Left:$JssorEasing$.$EaseInOutSine,$Top:$JssorEasing$.$EaseOutWave,$Clip:$JssorEasing$.$EaseInOutQuad},$ScaleHorizontal:1,$ScaleVertical:0.2,$Outside:true,$Round:{$Top:1.3}}, {$Duration:1500,$Delay:20,$Cols:8,$Rows:4,$Clip:15,$During:{$Left:[0.1,0.9],$Top:[0.1,0.9]},$SlideOut:true,$FlyDirection:9,$Formation:$JssorSlideshowFormations$.$FormationZigZag,$Assembly:260,$Easing:{$Left:$JssorEasing$.$EaseInJump,$Top:$JssorEasing$.$EaseInJump,$Clip:$JssorEasing$.$EaseOutQuad},$ScaleHorizontal:0.3,$ScaleVertical:0.3,$Outside:true,$Round:{$Left:0.8,$Top:2.5}}, {$Duration:1200,$Cols:6,$Rows:6,$Clip:15,$During:{$Left:[0.2,0.8],$Top:[0.2,0.8],$Clip:[0,0.2]},$FlyDirection:10,$Formation:$JssorSlideshowFormations$.$FormationStraight,$ChessMode:{$Column:15,$Row:15},$Easing:{$Left:$JssorEasing$.$EaseInCubic,$T…
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/26568158
has comment: http://stackoverflow.com/comment/41755287
score: 0
has comment: http://stackoverflow.com/comment/41755658
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41755302
accepted answer of: http://stackoverflow.com/q/26568115
has body: Not sure what is going on over there, but the below code works for me: var imageLocations = [["grass", "grs.gif"], ["wood", "wd.gif"], ["sand", "snd.gif"]]; var tiles = {}; for (var i = 0; i &lt; imageLocations.length; i++) { tiles[imageLocations[i][0]] = new Image(); tiles[imageLocations[i][0]]['src'] = imageLocations[i][1]; }; console.log(tiles); Working example: http://jsfiddle.net/k6s01q1n/5/
type: Answer
answers question: http://stackoverflow.com/q/26568115
has comment: http://stackoverflow.com/comment/41755272
has comment: http://stackoverflow.com/comment/41755636
has comment: http://stackoverflow.com/comment/41755486
has comment: http://stackoverflow.com/comment/41755526
has comment: http://stackoverflow.com/comment/41755491

http://stackoverflow.com/q/26664815
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26665603
favorite count: 0
has comment: http://stackoverflow.com/comment/41931731
has comment: http://stackoverflow.com/comment/42042997
has comment: http://stackoverflow.com/comment/41931877
has answer: http://stackoverflow.com/a/26665315
has comment: http://stackoverflow.com/comment/41931409
tagged with: php
has comment: http://stackoverflow.com/comment/41931538
has answer: http://stackoverflow.com/a/26665560
answer count: 4
has body: I have a page where users do some stuff and on selecting next, I want to redirect them to a php file, called "Step2.php" along with some JSON information. I built my json string and it looks like this: [{"name":"IMG_20130726_182336.jpg","size":2280709,"type":"image/jpeg","width":null,"height":null,"lastModified":1374852216000,"fileExtension":"jpg","orientation":1,"displayed":true,"attributes":[{"title":"Name: ","value":"IMG_20130726_182336.jpg"},{"title":"Date: ","value":"no date"}]}] Now, I sent it trough jquery POST like this: jsonData = JSON.stringify(serializableAttributes); console.log(jsonData); $.ajax({ type: 'POST', url: 'Step2.php', data: {"jsonData" : jsonData}, success: function(msg) { console.log("Json Sent! " +msg); window.location("") }, error: function(request,msg){ console.log("Error : " + msg); } }); Question: Why I can`t receive anything in my Step2.php file? Am I wrongly redirect user to that page? Code in the Step2.php files looks like this: if(isset($_POST["jsonData"])) { $json = $_POST["jsonData"]; var_dump(json_decode($json, true)); } else { echo "NO"; } It always shows NO.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41932244
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26665314
accepted answer: http://stackoverflow.com/a/26665315
has answer: http://stackoverflow.com/a/26665314
has comment: http://stackoverflow.com/comment/41932130
has comment: http://stackoverflow.com/comment/41931529
tagged with: javascript
has comment: http://stackoverflow.com/comment/41931551
has comment: http://stackoverflow.com/comment/41931785
tagged with: post
has title: Send json from javascript to php

http://stackoverflow.com/a/26573782
score: 2
downvote count: 0
has body: Because Highcharts dynamically sets the range of DateTime. If the data is within Week limit you should add: week:'%b %e' and for day: day: '%b %e' Add these and you will have your day, week and month range with '%b %e' format.
accepted answer of: http://stackoverflow.com/q/26554952
answers question: http://stackoverflow.com/q/26554952
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41744935
comment on: http://stackoverflow.com/q/26562212
score: 0
has text: to display events in calender am going with javascript in jsp page.
type: Comment
type: QuestionComment

java
tags question: http://stackoverflow.com/q/26651638
tags question: http://stackoverflow.com/q/26623353
tags question: http://stackoverflow.com/q/26562212
tags question: http://stackoverflow.com/q/26612657
tags question: http://stackoverflow.com/q/26561292
tags question: http://stackoverflow.com/q/26670748
tags question: http://stackoverflow.com/q/26595872
tags question: http://stackoverflow.com/q/26614832
tags question: http://stackoverflow.com/q/26546565
tags question: http://stackoverflow.com/q/26601454
tags question: http://stackoverflow.com/q/26522739
tags question: http://stackoverflow.com/q/26671281
tags question: http://stackoverflow.com/q/26549313
tags question: http://stackoverflow.com/q/26578228
tags question: http://stackoverflow.com/q/26545383
tags question: http://stackoverflow.com/q/26614368
tags question: http://stackoverflow.com/q/26599763
tags question: http://stackoverflow.com/q/26601841
tags question: http://stackoverflow.com/q/26540897
tags question: http://stackoverflow.com/q/26654487
tags question: http://stackoverflow.com/q/26644903
tags question: http://stackoverflow.com/q/26630767
tags question: http://stackoverflow.com/q/26551489
tags question: http://stackoverflow.com/q/26634412
tags question: http://stackoverflow.com/q/26535609
tags question: http://stackoverflow.com/q/26584939
tags question: http://stackoverflow.com/q/26601372
tags question: http://stackoverflow.com/q/26637206
tags question: http://stackoverflow.com/q/26548041
tag name: java
tags question: http://stackoverflow.com/q/26576225
tags question: http://stackoverflow.com/q/26547184
tags question: http://stackoverflow.com/q/26599728
tags question: http://stackoverflow.com/q/26573468
tags question: http://stackoverflow.com/q/26525554
tags question: http://stackoverflow.com/q/26597232
tags question: http://stackoverflow.com/q/26606234
tags question: http://stackoverflow.com/q/26672189
tags question: http://stackoverflow.com/q/26534031
tags question: http://stackoverflow.com/q/26604179
tags question: http://stackoverflow.com/q/26549608
tags question: http://stackoverflow.com/q/26534578
tags question: http://stackoverflow.com/q/26540524
tags question: http://stackoverflow.com/q/26654803
tags question: http://stackoverflow.com/q/26631515
tags question: http://stackoverflow.com/q/26538976
tags question: http://stackoverflow.com/q/26542926
tags question: http://stackoverflow.com/q/26591359
tags question: http://stackoverflow.com/q/26623936
tags question: http://stackoverflow.com/q/26609207
tags question: http://stackoverflow.com/q/26536128
type: Tag
tags question: http://stackoverflow.com/q/26524067
tags question: http://stackoverflow.com/q/26546715
tags question: http://stackoverflow.com/q/26543014
tags question: http://stackoverflow.com/q/26520900
tags question: http://stackoverflow.com/q/26541550
tags question: http://stackoverflow.com/q/26580442
tags question: http://stackoverflow.com/q/26584836
tags question: http://stackoverflow.com/q/26658194
tags question: http://stackoverflow.com/q/26525180
tags question: http://stackoverflow.com/q/26531500
tags question: http://stackoverflow.com/q/26610350
tags question: http://stackoverflow.com/q/26525136

http://stackoverflow.com/q/26641584
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/26642008
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26641807
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has body: I have a code with button Click. When i click text appears in textbox. It woks. But i have a problem to write anoter type of code. I want to fill the textbox using radio buttons but without button Click. So when I click in a radio I want to show text in textbox. Here is my code. Our Universe Select Planet Earth Mars Jupiter Saturn
score: 0
has title: How to fill textbox using radio button

http://stackoverflow.com/comment/41942558
score: 0
comment on: http://stackoverflow.com/q/26670810
has text: who didn't work on canvas don't put downvote. the question is good?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26595785
has body: I want to have a strongloop example only using javascript without angular. There's no complete working example without angular for now. I want to simply include the browser.bundle.js in my index.html, then sync data from/to server side. In fact, I'm trying to replace pouchdb in my program since the couchdb seems not success in open source community. I can't follow up this document correctly: Running Loopback in the browser create browser-app.js with the content from Running Loopback in the browser copy past the content to browser-app.js npm install loopback loopback-boot browserify browser-app.js -o app.bundle.js Then I got error: Error: Cannot find module 'loopback-boot#instructions' from '/Users/simba/Projects/traveller-app/client/node_modules/loopback-boot'
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41806353
tagged with: offline
has answer: http://stackoverflow.com/a/26596686
upvote count: 1
tagged with: node.js
has comment: http://stackoverflow.com/comment/41806189
tagged with: strongloop
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26596686
downvote count: 1
has title: I need a strongloop example wrote in javascript without angular
type: Question

http://stackoverflow.com/comment/41920962
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26642557
has text: Fixed typo. `fnCheck` should have been just `check`.
type: AnswerComment

http://stackoverflow.com/comment/45133240
type: QuestionComment
has text: can u create plunkr , where have you reached with sample data it would be more helpfull
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26530667

http://stackoverflow.com/a/26628252
has comment: http://stackoverflow.com/comment/41867287
accepted answer of: http://stackoverflow.com/q/26627996
score: 5
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/41868327
has comment: http://stackoverflow.com/comment/41868323
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26627996
has body: The most idiomatic way to do this is to apply a semantic class - e.g. "liked" or "disliked" - then in the CSS, apply the background colour to elements with that class. {{#each likingUsers}} &lt;li class="name"&gt;&lt;a class="liked" href="{{pathFor 'viewItem'}}" &gt;{{name}}&lt;/a&gt;&lt;/li&gt; {{/each}} {{#each dislikingUsers}} &lt;li class="name"&gt;&lt;a class="disliked" href="{{pathFor 'viewItem'}}" &gt;{{name}}&lt;/a&gt;&lt;/li&gt; {{/each}} Here likingUsers is the same userNames helper you already wrote, and dislikingUsers is similar, but it gets the users who disliked it instead. /* css */ a.liked { background-color: #ccc; } a.disliked { background-color: #fff; } This way, if you later decide to style liked/disliked posts differently - e.g. make liked posts green, or put a strikethrough on the disliked posts - you only have to change CSS, not JS code or HTML templates.
type: Answer
has comment: http://stackoverflow.com/comment/41868221
has comment: http://stackoverflow.com/comment/41867630
has comment: http://stackoverflow.com/comment/41867126

http://stackoverflow.com/comment/41904085
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26602806
has text: Your script is incorrect and will not work once you change option values.
type: Comment

http://stackoverflow.com/comment/41866038
has text: Are you getting any errors?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26628612

http://stackoverflow.com/a/26631074
score: 0
has body: You have to configure your php.ini with SMTP data of your e-mail. See this tutorial at: http://planetghost.com/send-emails-localhost-xampp-wamp-php Don't forget to restart the server after changes.
type: Answer
answers question: http://stackoverflow.com/q/26630294
has comment: http://stackoverflow.com/comment/41870513

http://stackoverflow.com/a/26529404
upvote count: 2
has body: Would this work for your requirements: filler = filler.add($("&lt;ul&gt;&lt;/ul&gt;").append(column)); I assume column is an Array of LI's.
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41685606
accepted answer of: http://stackoverflow.com/q/26529306
answers question: http://stackoverflow.com/q/26529306
type: Answer

http://stackoverflow.com/comment/41694113
comment on: http://stackoverflow.com/a/26533928
type: AnswerComment
type: Comment
has text: Thanks, but prev.solution is a little better as for me.
score: 0

http://stackoverflow.com/comment/41685171
type: QuestionComment
type: Comment
has text: Yes,I use ajax alert too see the value. When I only echo $cid the value is right value and print json is Correct,too.The json's array is update(ajax success and the alert's value is right) but the pie isn't work.
comment on: http://stackoverflow.com/q/26528918
score: 0

http://stackoverflow.com/q/26641506
score: 1
has comment: http://stackoverflow.com/comment/41890250
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Updating DOM elements using jQuery
favorite count: 0
has body: I'm looking for a way to update the webpage I'm working on to act as a report for several different people to pass back and forth. I'm using forms to take in several pieces of data and am wondering how I can make it so that it just immediately adds the content to the divs under the right heading. I'm currently using jquery and append and it looks like it adds the desired input and then immediately removes it. I tried using .live as well and it did not show up at all. Is there a way to make form inputs post to the page without submitting to another page? Here is my code so far, testing just the element that will be the heading for the issue: Add a new important issue: Add Issue And the jquery: edit: I'm looking into using AJAX but I'm not sure how to make it so that all of the input data will persist. I am basically looking to make a webpage-style-report that will allow myself and my team to update the entries on the report and they will stay on the report until we are able to take them off by removing a div that encapsulates the individual issue. I would also like to be able to format the individual pieces here separately, so, for instance, I could add a check-box that says the issue is urgent and format the heading of those to be red. What is the easiest way to have data that persists, can be added into new (div/h/p) elements, and is shown on the main webpage, while also allowing me to update formatting?
has comment: http://stackoverflow.com/comment/41889942
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26641653
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41890682
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26641653

http://stackoverflow.com/a/26572891
type: Answer
has body: My suggestions are here are meant to express each of your requests in a programmatic way. Markup, styling, and script have been kept simple. It is not written for optimization nor speed, but as an alternative offering to your existing code. Please what you find helpful and applicable to your use case. By placing all of your images (including the plus image) in the markup, you can easily reference them as needed without repeating the needless .onload() invocations within LoadImage() and LoadPlus(). The onload trigger should not be loading more images, since it occurs... when all content (e.g. images) also has been loaded. First association: Second association: Third association:
answers question: http://stackoverflow.com/q/26572402
score: 0

http://stackoverflow.com/q/26605393
tagged with: keypress
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41823573
has answer: http://stackoverflow.com/a/26607155
has body: I want to simulate a scroll down with the "Page Down" button in a page. I have the call to a function every 2 seconds, but dont know how to connect it with the keyboard buttons (how to simulate a keyboard button press?). var interval = null; jQuery(function(){ interval = setInterval(callFunc, 2000); }); function callFunc(){ jQuery('.link1, .link2, .link3').trigger('click'); } This seems to work, meaning that when inserted in the console it call the callFunc function every 500ms, but I cant fix the part inside the function to simulate the button press. (keycode for "page down" button is 34) var interval = null; $(function(){ interval = setInterval(callFunc, 500); }); function callFunc(){ var event = $.Event('keypress'); event.which = 34; event.keyCode = 34; $(this).trigger(event); } Anyone?
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1468384
upvote count: 1
has title: How to simulate a "Page Down" button press every 2 seconds?
score: 1
type: Question

http://stackoverflow.com/comment/41779376
has text: Are you sure the `rightclick` event is handled properly? Try doing a `console.log` at appropriate places inside and outside your event handler to debug.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26581283
score: 0

http://stackoverflow.com/comment/41917069
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26657356
score: 0
has text: What are you trying to do? The yql call goes to the server, the server looks at your query and parameters and builds the returned data. If thats the only way to form that data then that's the way you are stuck with. Why is it even a problem??

http://stackoverflow.com/q/26540086
has answer: http://stackoverflow.com/a/26540306
has body: I have the following string: 01/12/2015-04/27/2015 Lecture Monday, Wednesday, Friday 12:00PM - 12:50PM, CoolGuy Hall, Room 006 01/12/2015-04/27/2015 Laboratory Thursday 10:50AM - 12:05PM, Epic Science, Room 121 I am trying to parse it so I can get objects like so { days: ["Monday", "Wednesday", "Friday"] start: "12:00PM" end: "12:50PM" location: "CoolGuy Hall, Room 006" } and { days: ["Thursday"] start: "10:50AM" end: "12:05PM" location: "Epic Science, Room 121" } Is there anyway to do this cleanly? I have tried using the split method using the dates: /((..\/..\/....)-(..\/..\/....) \w+)/ to no avail and as you can see above my regex skills are fairly limited. Thank you!
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26540306
type: Question
tagged with: javascript
has title: How do I split this string using REGEX in Javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/41741136
type: QuestionComment
score: 0
has text: Guys, I'm extremely sorry. I had mis-spelt the value as "1px soild white" @_@. It's working now. Thanks all.
comment on: http://stackoverflow.com/q/26556784
type: Comment

http://stackoverflow.com/q/26515252
score: 0
has body: I want to allow only one entry of a text in the textarea once the button is clicked. If the button is clicked 2 or more times only one entry should be entered in the textarea. JAVASCRIPT: function inyectarTexto(elemento,valor){ var elemento_dom=document.getElementsByName(elemento)[0]; if(document.selection){ elemento_dom.focus(); sel=document.selection.createRange(); sel.text=valor; return; }if(elemento_dom.selectionStart||elemento_dom.selectionStart=="0"){ var t_start=elemento_dom.selectionStart; var t_end=elemento_dom.selectionEnd; var val_start=elemento_dom.value.substring(0,t_start); var val_end=elemento_dom.value.substring(t_end,elemento_dom.value.length); elemento_dom.value=val_start+valor+val_end; }else{ elemento_dom.value+=valor; } } HTML: Say hello world to text Here the issue is that if I click the link Say hello world to text two times the text hello world entered two times, however I only want one set of hello world should be entered if the link is clicked how many times. Please help!
has comment: http://stackoverflow.com/comment/41660873
answer count: 1
has comment: http://stackoverflow.com/comment/41660454
has comment: http://stackoverflow.com/comment/41660453
has title: Limit Number of Inputs onClick
has answer: http://stackoverflow.com/a/26515538
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41660484
has comment: http://stackoverflow.com/comment/41660493
type: Question
has comment: http://stackoverflow.com/comment/41660508
has comment: http://stackoverflow.com/comment/41660429
tagged with: javascript

http://stackoverflow.com/comment/41812462
score: 0
type: AnswerComment
type: Comment
has text: ok that's work how do I add another the two other fields to copy (session payment) and (extra people) do I just copy what you have for the radio and place it under what you have?
comment on: http://stackoverflow.com/a/26598931

http://stackoverflow.com/comment/41822876
has text: The hidden field - hdFileId doesn't have Visible="false" set.
comment on: http://stackoverflow.com/a/26604378
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/28239022
answers question: http://stackoverflow.com/q/26591539
has comment: http://stackoverflow.com/comment/60751202
score: 0
has body: Use the HTML code from Foundation 5 - and just replace the class "sub-nav" with "side-nav": The code for my vertisidebar Magellan Tabs code
type: Answer

http://stackoverflow.com/a/26605621
upvote count: 2
answers question: http://stackoverflow.com/q/26605491
has body: You don't need to delegate the events as you are selecting the element after adding it in. Your problem is that the body of your loop isn't valid. var temp = ""; for (var i = 0; i < 2; i += 2) { temp += " + "Test" + "; } There is a syntax error in your string concatenation. You probably meant either: " " + Test + " " // Test is a variable or " Test " Here's a working version of your code: var temp = ""; for(var i=0; i<2; i+=2) { temp += " Test "; } $("#menu-left-left ul").html(temp); $(".test").click(function() { alert("Element test class"); });
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/26630075
answer count: 0
has comment: http://stackoverflow.com/comment/41869028
has comment: http://stackoverflow.com/comment/41869548
has comment: http://stackoverflow.com/comment/41869460
has title: Quick (pre-loading?) thumbnail slideshow with multiple image files per slide
type: Question
has comment: http://stackoverflow.com/comment/41868669
tagged with: slideshow
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41869278
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41868864
type: UnansweredQuestion
has body: How do I create a HTML-based slideshow which shows multiple images (thumbnails) per slide? How do I make sure the next slide (i.e., the next group of thumbnails) is shown as quickly as possible when I want to advance? (E.g. preloading of all the images or similar, maybe multiple slides in advance) How can I implement functionality so that clicking on a thumbnail shows a large picture on top of the slideshow, and have this large picture also switches back/forth when I browse the slides? Some background: I am performing a multi-instrument case study, which means I have a folder with LOTS of images showing data from a given instrument at a certain date/time (see the image). I would like to show all images from a single date/time in a grid as a single "slide" in an HTML slideshow, and furthermore be able to quickly scroll through the slides (the groups of images) using the arrow keys. I aim to do this locally on my computer (local image and html files). I have previously plotted everything at once and saved all the different plots as a single file (exemplified by the picture above), which unfortunately means that everything will have to be re-plotted (taking 10-20 hours to run when plotting 7 hours of data) every time I need to change anything in just one of the plots. This is not desirable in the long run (and it will indeed be a very long run if I don't do anything). That's why I want to save all the small plots separately and show them as described above.
tagged with: css
has comment: http://stackoverflow.com/comment/41868823

http://stackoverflow.com/comment/41873906
has text: i want to detect if the text in an element is cut by the css style text-overflow: ellipsis... that's what i asked for. the question is not answered, because the detection is not working on this specific situation. but i have exactly this case seen in the fiddle. as in words on js: if text in element has 3 dots on his end, make something. but as you can see in this fiddle, the ellipsed text is green and not red as expected
comment on: http://stackoverflow.com/q/26629506
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/a/26539884
has comment: http://stackoverflow.com/comment/41704997
answers question: http://stackoverflow.com/q/26539810
has comment: http://stackoverflow.com/comment/41704898
has body: According to MDN Array.prototype.map, the callback supplied to map has three parameters: currentValue, index, and array. In this case, when drawRow is supplied to rows.map, row is the currentValue, and rowNum is the index. Here's a simpler example: var arr = ['a', 'b', 'c']; function printArray(value, index) { console.log(index + ' ' + value); } arr.map(printArray); // prints // 0 a // 1 b // 2 c
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41705115
has comment: http://stackoverflow.com/comment/41705373
downvote count: 0

http://stackoverflow.com/comment/42014467
type: QuestionComment
has text: @ChrisLively tnx for your comment. We followed option 3. By using an .asmx service we give the user a time-window that they can cancel the process. We found out that, if postback is made there is no way to interrupt it than closing the browser. Should i publish an anser for the question her? And again thanks for your help.
score: 0
comment on: http://stackoverflow.com/q/26655356
type: Comment

http://stackoverflow.com/comment/41932696
comment on: http://stackoverflow.com/a/26665013
type: AnswerComment
score: 0
type: Comment
has text: since I'm a beginner I haven't really got a hold of frameworks at all and I'm trying to get by without them bc I'm a bit scared of them hehe. I'm also not creating my database myself, I have it in an API I'm using (bechdeltest.com/api/v1/doc). Don't know if it's possible to use a framwork that isn't used in that particular API... but I have no clue.

http://stackoverflow.com/comment/41866056
type: Comment
type: QuestionComment
score: 1
has text: I found the answer: http://stackoverflow.com/questions/21935099/how-to-check-if-a-method-argument-of-a-directive-is-specified-in-angularjs (I also voted to close as a duplicate)
comment on: http://stackoverflow.com/q/26628333

http://stackoverflow.com/comment/41788957
type: QuestionComment
has text: Can you share a plunker please?
score: 0
comment on: http://stackoverflow.com/q/26586807
type: Comment

http://stackoverflow.com/a/26596078
accepted answer of: http://stackoverflow.com/q/26596041
upvote count: 4
answers question: http://stackoverflow.com/q/26596041
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has body: doSomething isn't a function. It's undefined. doSomething = (function(x) { alert(x) })(); This declares an anonymous function, immediately executes it (that's what the () does), then sets doSomething to the return value - undefined. Your anonymous function takes one parameter (x), but nothing is passed to it, so x is undefined. You probably want this: doSomething = function(x) { alert(x) }; doSomething(123);

http://stackoverflow.com/a/26620269
score: 0
type: Answer
has body: I see a couple of things wrong here, as was already mentioned, your comparison in the if statement needs to reference the variable each time it is compared. But additionally, since you are in a loop based on the length of your sportsArray variable, it would be better to not reference strings at all in the if statement, and instead do something more like the following: if (arrayGuess === sportsArray[counter]) { // Do stuff here } else { // Do other stuff here } Additionally, your else clause isn't going to behave quite like you are expecting it to. You are going to have to assign a new value to it, probably by way of another call to prompt. As of now you are only referencing the variable, which will do nothing. If you need to take three guesses, I would add an 'else if' clause into the mix where you get a new value for the variable, an let the else clause display a score and break out of the loop. if (arrayGuess === sportsArray[counter]) { // Add to the score } else if (counter &lt; 2) { // We prompted for the first guess before the loop, // so take the second and third here arrayGuess = prompt("Guess a sport.", "Enter Here"); } else { // Display score then break to exit the loop break; }
answers question: http://stackoverflow.com/q/26620068

http://stackoverflow.com/comment/41785533
type: QuestionComment
has text: @Max - it's ok if you don't want to help
comment on: http://stackoverflow.com/q/26584781
score: 1
type: Comment

http://stackoverflow.com/q/26655814
has answer: http://stackoverflow.com/a/26660393
tagged with: javascript
has title: Change the label of the column dynamically in a DGrid
answer count: 1
accepted answer: http://stackoverflow.com/a/26660393
tagged with: dojo
type: AnsweredQuestion
score: 0
type: Question
has body: The idea is to change the label and the tooltip of the first column in the grid when the button is clicked. And when I clicked the button, the correct data is loaded, the new tooltip is set ("ChangedTooltip") but the label of the column is still the same ("principal" and not "ChangedLabel"). Do I miss something, or the approach is wrong? How can I set the new value in the label of the column? Two .js: Principal.js and PrincipalTable.js Principal.js ... /** * add events to select button */ var createEventForSelectButton = function(year, period) { on(selectButton, "click", function(event) { currentQueryMap = initQueryMap(year, period); grid.setFirstColumn(period.value); &lt;-- IMPORTANT!!!!! grid.set('query', currentQueryMap); }); }; ... return declare([], { ... grid = new PrincipalTable(...); PrincipalTable.js var grid = declare([ SortFormatterGrid, Selection ], { constructor : function(args) { ... this.columns = [ { label : "principal", field : "id", sortFormatter : function(object) { return object; }, tooltip : "principal" }, { ... }, setFirstColumn : function() { &lt;-- IMPORTANT!!!! this.columns[0].label= "ChangedLabel"; this.columns[0].tooltip= "ChangedTooltip"; } });

http://stackoverflow.com/q/26525695
has title: JavaScript `of` Keyword (for...of loops)
tagged with: javascript
has answer: http://stackoverflow.com/a/26525791
answer count: 2
tagged with: firefox-addon
has answer: http://stackoverflow.com/a/26532250
favorite count: 0
has comment: http://stackoverflow.com/comment/41678912
tagged with: firefox-addon-sdk
type: AnsweredQuestion
upvote count: 14
has comment: http://stackoverflow.com/comment/41678929
accepted answer: http://stackoverflow.com/a/26532250
score: 13
downvote count: 1
type: Question
has body: I just spotted, in Firefox SDK JavaScript (on MDN), the use of a keyword I have never seen before: var tabs = require('sdk/tabs'); for (let tab of tabs) console.log(tab.title); Is the of keyword made up by Mozilla or is it standardized?
possible better answer: http://stackoverflow.com/a/26525791

http://stackoverflow.com/a/69662580
score: 1
has comment: http://stackoverflow.com/comment/124209460
downvote count: 1
has body: In Google Chrome or Firefox you can open the DevTools (e.g. by right-clicking the page and selecting Inspect) and then paste the code in the Console tab and press Enter to run it. In Google Chrome DevTools you can also create a js snippet and run it on demand whenever you need it. You can also use Chrome DevTools Snippets: Right-click anywhere on the page and select Inspect. Select the Sources tab — you will see a number of subtabs: Page, Filesystem, Override, Content scripts and finally Snippets (you might need to click &gt;&gt; in order to see it). Click the plus button ➕ to add the js code, and use right-click &gt; Run to execute the code. NOTE: If the original script uses extra js libraries (jquery, etc) and the libs are not already preloaded on the page, then you'll need to load them yourself (see this). Unlike the code you run from the Console, you can set breakpoints in your JS snippets.
answers question: http://stackoverflow.com/q/26532795
upvote count: 2
type: Answer

http://stackoverflow.com/a/26657316
upvote count: 0
has comment: http://stackoverflow.com/comment/41918018
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26656914
has comment: http://stackoverflow.com/comment/41917066
type: Answer
has comment: http://stackoverflow.com/comment/41917911
has comment: http://stackoverflow.com/comment/41918158
has comment: http://stackoverflow.com/comment/41917878
has comment: http://stackoverflow.com/comment/41918305
downvote count: 1
has body: (I assume u use VB) You can use a code like this: function loadAnswers() { var answers = ['&lt;%= String.Join("','", CType(Session("answers"), String()))%&gt;']; } It actually joins your array into a string, that is formatted into JS array representation. So for example if you have an array like this Session("answers") = New String() {"aaa", "bbb", "ccc"} It will prodice a line like this var answers = ['aaa','bbb','ccc']; Which will be a real JS array. If you need a simple string instead, you can use var answers = '&lt;%= String.Join(",", CType(Session("answers"), String()))%&gt;'; which will produce var answers = 'aaa,bbb,ccc';
has comment: http://stackoverflow.com/comment/41916991
score: -1
answers question: http://stackoverflow.com/q/26656914

http://stackoverflow.com/q/26542622
type: Question
possible better answer: http://stackoverflow.com/a/33924341
type: AnsweredQuestion
has body: Im trying to create a form wizard using owl carousel. I have some conditional javascript running to see what form elements get certain inputs. For example, I have a number of select boxes that have yes or no answers and depending on which one you pick, it will show or hide other select boxes. Here is an example of what I am trying to do. http://jsfiddle.net/eju2uw20/1/ Here is the code I am using for the Owl Carousel. $('.consultationSlider').owlCarousel({ singleItem:true, mouseDrag: true, touchDrag: false, navigation : false, pagination : false, autoHeight: true, slideSpeed: 800 }); If you click on the next button, you will see the autoheight working. However, when you click on the "please choose" select box and click "no", you will see another select box appear. How can I make it so that owl carousel recalculates the height to make up for the added elements?
has title: Owl Carousel Auto Height Recalculation
tagged with: owl-carousel
upvote count: 4
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26543193
score: 4
has answer: http://stackoverflow.com/a/26551334
accepted answer: http://stackoverflow.com/a/26551334
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/33924341
has answer: http://stackoverflow.com/a/50201021

http://stackoverflow.com/comment/71158547
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26528207
type: Comment
has text: It's been a while, but changing the order of `['app', 'ng']` to `['ng', 'app']` should fix the problem.

http://stackoverflow.com/comment/41920887
comment on: http://stackoverflow.com/a/26656210
type: AnswerComment
score: 0
type: Comment
has text: So I just just add that under my array and not care about the function `showItem`?

http://stackoverflow.com/a/76718760
answers question: http://stackoverflow.com/q/26582381
score: 0
type: Answer
has body: Did not find any parser yet, but there is a library by using that you can dynamically create bpmn components
has comment: http://stackoverflow.com/comment/135256065

http://stackoverflow.com/q/26611304
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41835026
has title: Prevent angular return repeated string in array
duplicate of: http://stackoverflow.com/q/20222555
upvote count: 1
has answer: http://stackoverflow.com/a/26611384
type: AnsweredQuestion
score: 1
has body: I have this json: [ { "month": "Feb", "title": "Title 1", "status": "Closed" }, { "month": "Feb", "title": "Title 2", "status": "Delayed" }, { "month": "Feb", "title": "Title 3", "status": "Open" }, { "month": "Mar", "title": "Title 4", "status": "Closed" } ] I'm trying to fill a select box with months: MONTH I don't know if I'm doing it in the right way but obviously it returns me a list of all arrays' months: Feb, Feb, Feb, Mar. How can I make angular return me only Feb, Mar? Some help would be appreciated.
type: Question
has comment: http://stackoverflow.com/comment/41834537
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26611384
favorite count: 0
linked to: http://stackoverflow.com/q/20222555

http://stackoverflow.com/comment/41777546
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26574797
has text: Thanks for your answer..i 've still got some errors when implemented this. the error show me something like this ReferenceError: counter is not defined at Scope.$scope.loadMore .

http://stackoverflow.com/comment/41793350
score: 0
type: AnswerComment
has text: Yeah, I ended up using `combineAsArray`. I'll definitely check out your presentation. Thanks for your feedback!
type: Comment
comment on: http://stackoverflow.com/a/26584873

http://stackoverflow.com/comment/41862660
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26626249
score: 0
has text: yes thats what im trying to. but i cant get it right, i dont know how to send information to a div from node.js. any suggestions?

http://stackoverflow.com/q/26549091
has title: How to edit text input fields with Hammer.js Touch Emulator?
tagged with: javascript
tagged with: hammer.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26549487
has answer: http://stackoverflow.com/a/27255266
type: Question
has body: Using Hammer.js and the Touch Emulator found here: https://github.com/hammerjs/touchemulator Cannot seem to click into a text input at all let alone edit it.
tagged with: touch
score: 0
answer count: 2

http://stackoverflow.com/a/26631507
type: Answer
has comment: http://stackoverflow.com/comment/41892010
has body: In your plunker, changing your tabs to this: &lt;span data-subctrl=""&gt;{{ subctrl.sum('credito') }}&lt;/span&gt; Showed the sum. I looked at what subctrl was and you have it as a directive, that's why subctrl.sum is not working. Plunker with it working: http://plnkr.co/edit/qwEHMqfzJ6pC79hM8cDj?p=preview If that's not what's wrong with your application, then please describe it a little more.
has comment: http://stackoverflow.com/comment/42042683
has comment: http://stackoverflow.com/comment/41888536
score: 0
answers question: http://stackoverflow.com/q/26551375
has comment: http://stackoverflow.com/comment/41876978
has comment: http://stackoverflow.com/comment/41879894

http://stackoverflow.com/comment/41869230
comment on: http://stackoverflow.com/a/26606389
score: 0
type: AnswerComment
type: Comment
has text: Nope, same problem. Works fine in Chrome, but not in IE

http://stackoverflow.com/comment/41702945
comment on: http://stackoverflow.com/q/26538309
score: 0
type: Comment
has text: Two operations are happening here: (1) you load the file from the server, and (2) you display the contents in the `#chatbox` element. If you mean you don't want to run (2) unless there were changes, then you want a `var lastHtml;` ABOVE (outside) the `loadLog` function, then inside the success handler you can say `if (html === lastHtml) { ... }`. Followed by `lastHtml = html;` to set `lastHtml` for next time. If you mean you don't want to run (1) unless there are changes (you don't want to speak to the server every 3 secs unnecessarily) – that's a more difficult topic. Which are you after?
type: QuestionComment

http://stackoverflow.com/comment/41706937
has text: I don't have enough population to post img, but I've solve it with my edit, thanks bro xD
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26540700
score: 0

http://stackoverflow.com/q/26570687
score: 0
has body: I have the following html with angularJs : &lt;input id="subjectCode" name="subjectCode" class="form-control input-md" required type="text" ng-model="subjectCode" ng-minlength="3" ng-pattern="/^[A-Z0-9]+$/i"&gt; The above code validate the text input versus minimum 3 characters that should be either A-Z capital letters or digits 0-9. This is validated to show error and set css to highlight mismatch as following: &lt;div class="form-group" ng-class="{ 'has-error': myform.subjectCode.$invalid &amp;&amp; fahrasform.subjectCode.$dirty, 'has-success': !myform.subjectCode.$invalid &amp;&amp; fahrasform.subjectCode.$dirty }"&gt; The problem is that angularjs does not set $invalid to true if I use small letters while it sets it to false for other cases like entering international letters or special characters. So, any suggestions?
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26570730
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41760360
type: Question
has title: Angularjs ng-pattern missbehaviour with regex
tagged with: validation
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26570730

http://stackoverflow.com/a/26537527
accepted answer of: http://stackoverflow.com/q/26537445
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41701211
has comment: http://stackoverflow.com/comment/41702805
upvote count: 4
has body: You need to use request.QUERY_PARAMS.getlist('types') because request.QUERY_PARAMS AKA request.GET is a django QueryDict. See the docs here: https://docs.djangoproject.com/en/dev/ref/request-response/#querydict-objects
score: 4
answers question: http://stackoverflow.com/q/26537445
has comment: http://stackoverflow.com/comment/41701490
has comment: http://stackoverflow.com/comment/41702622

http://stackoverflow.com/comment/41702468
type: QuestionComment
has text: the parameter to `$scope.apply` is a function. Is this function being called? Did you check?
comment on: http://stackoverflow.com/q/26538318
score: 0
type: Comment

http://stackoverflow.com/a/26567411
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26567156
type: Answer
accepted answer of: http://stackoverflow.com/q/26567156
has body: I've just made a Fiddle with one adjustment of your javascript - if(!obj.hasOwnProperty(correo_val)){ arr = []; // &lt;-- move this to the first line where // you already have var obj = {}; arr.push(correo_val); ... Move the arr = []; that you use to store the valid emails from this if() clause to the first line of your code where you also declared var obj = {};. Otherwise arr = []; will be an empty array every time before you add another email and always have only one element (the last email that was added).
score: 0

http://stackoverflow.com/comment/41772942
has text: @Louis I've tested my answer with the iOS Simulator and Safari. I can't think of anything else to suggest without knowing more about your project.
comment on: http://stackoverflow.com/a/26559782
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26650459
answer count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/26646941
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41904720
type: Question
tagged with: visual-studio
has comment: http://stackoverflow.com/comment/41905786
has title: When I reference local angular lib I get error: Argument is not a function, got undefined and CDN works ok?
has comment: http://stackoverflow.com/comment/41904842
has comment: http://stackoverflow.com/comment/41905723
linked to: http://stackoverflow.com/q/25111831
tagged with: javascript
duplicate of: http://stackoverflow.com/q/25111831
has body: This doesn't work: {{sometext}} {{item}} and if I reference angular from CDN it is ok? I started with Empty Web project in VisualStudio and added angular using nuget This is error from angular Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined http://errors.angularjs.org/1.3.0/ng/areq?p0=MyCtrl&p1=not%20a%20function%2C%20got%20undefined at http://localhost:60732/scripts/angular.js:80:12 Edit1 Controller code: var MyCtrl = function($scope) { $scope.somelist = ['1', '2', '3']; return true; }; This Works {{sometext}} {{item}}
score: 0

http://stackoverflow.com/comment/41928247
score: 1
type: Comment
has text: Oh now I understand. It's really helps me to understand the problem very well. Thank you sir
comment on: http://stackoverflow.com/a/26663097
type: AnswerComment

http://stackoverflow.com/comment/41664664
has text: You are overwriting the prototype, not extending it.
type: QuestionComment
type: Comment
score: 3
comment on: http://stackoverflow.com/q/26517321

http://stackoverflow.com/comment/41819779
has text: I'm sure, I've tried it already, but I'll give it another shot next week, when I'll get the 4.0.1 phone. Meanwhile, on 4.2+ aosp browser and any webkit one, everything works perfectly with the "device-width".
type: Comment
comment on: http://stackoverflow.com/a/26591301
type: AnswerComment
score: 0

http://stackoverflow.com/comment/98566458
comment on: http://stackoverflow.com/a/26940135
score: 0
type: AnswerComment
has text: Does Modernizr actually provide the polyfills? The documentation just says it's for detecting whether a feature is available, you still have to work around the missing features.
type: Comment

http://stackoverflow.com/comment/41777987
has text: I can't really follow what you're saying. But if you know what they clicked, just do myDataRef.child('13no').remove(). Of course substituting the actual value of eventFay for '13no'.
comment on: http://stackoverflow.com/q/26572411
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26547219
accepted answer: http://stackoverflow.com/a/26548647
type: Question
score: -2
has body: In Javascript I have a function that add 1 each second to a variable and I want to add a function (called by click) that subtract 3. But I have (logically) problems because the variable is accessed by both functions. The recursive function that increment each second is this one : function incrementBD() { var BD = parseInt(document.getElementById('divBD').innerHTML); BD = BD+1; document.getElementById('divBD').innerHTML = BD; setTimeout('incrementBD()',1000); } And the function that subtract 3 is this one function less3() { var BD = parseInt(document.getElementById('divBD').innerHTML); BD = BD-3; document.getElementById('divBD').innerHTML = BD; } For now, my variable is stored in a I could work on it directly in Javascript. But what should I do about the multiple access problem ? Thank you for you help ! =) EDIT : I created (as suggested) a global variable. When I click it subtracts 3 as expected but the variable comes back to 1 at each try. var BD; function incrementBD() { BD = parseInt(document.getElementById('divBD').innerHTML); BD = BD+1; document.getElementById('divBD').innerHTML = BD; setTimeout('incrementBD()',1000); } function less3() { BD = parseInt(document.getElementById('divBD').innerHTML); BD = BD-3; document.getElementById('divBD').innerHTML = BD; } EDIT 2 Since this code seems to work for other people here is my html page Index Broken Dreams : 0 Minus 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26547280
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41717257
has comment: http://stackoverflow.com/comment/41718127
has comment: http://stackoverflow.com/comment/41719697
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26547280
downvote count: 2
has title: Multiple access to a variable in Javascript
has answer: http://stackoverflow.com/a/26548647

http://stackoverflow.com/comment/41708963
type: QuestionComment
score: 0
has text: @somethinghere I know this, but with code snippet given by Json he needs it, of course he could change his if to: if(..) alert(..); and it would work fine..
comment on: http://stackoverflow.com/q/26542301
type: Comment

http://stackoverflow.com/a/26554825
upvote count: 2
answers question: http://stackoverflow.com/q/26554694
type: Answer
score: 2
downvote count: 0
has body: You can disable the field, and it won't be included in the post vars. Disabled form fields are not submitting data

http://stackoverflow.com/comment/41891276
has text: no no no. I have rad about deffered a munute ago. It allow to execute function after another function termination. I want to freeze func1 execution while func2 is not terminated
type: AnswerComment
comment on: http://stackoverflow.com/a/26642261
score: 0
type: Comment

http://stackoverflow.com/q/26635984
has comment: http://stackoverflow.com/comment/41879791
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41879420
has comment: http://stackoverflow.com/comment/41879414
tagged with: css
tagged with: hover
has answer: http://stackoverflow.com/a/26636043
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26636068
downvote count: 2
has comment: http://stackoverflow.com/comment/41879425
upvote count: 1
has comment: http://stackoverflow.com/comment/41879625
type: Question
has answer: http://stackoverflow.com/a/26636813
has title: How to remove :hover state without using extra class?
has body: I am using &lt;button&gt; tag and giving red background on hovering of that button. But how can I remove that :hover state without using extra class.
tagged with: javascript
score: -1
answer count: 3
has comment: http://stackoverflow.com/comment/41879764

http://stackoverflow.com/comment/41819925
type: Comment
type: QuestionComment
has text: if you really want to go without a `type="number"` - input, you could present the number in a `span` or something alike and store the value in a hidden input-field
comment on: http://stackoverflow.com/q/26603423
score: 0

http://stackoverflow.com/comment/41743748
comment on: http://stackoverflow.com/q/26560743
score: 0
type: QuestionComment
type: Comment
has text: The ckeditor textarea is part of a form. When it gets submitted, the contents of the textarea are sent to my server where they are stored in the database as is. When displayed, the contents of the database are read and shown. If I manually enter SOURCE mode in the editor and delete those blank lines everything is ok. Whatever is happening during display from the database though, it would be helpful if I could just have the ckeditor not add those extra blank lines. I don't see why they are there. So I am wondering if there is a way of not having the ckeditor put them into the source. Thanks.

http://stackoverflow.com/a/26549158
type: Answer
has body: I have modified your javascript to: $('select').change(function() { var self = $(this); var myVal = self.val(); var selPractice = $('[data-select="practise"]'); var selLaw = $('[data-select="law"]'); var defaultSelect = $('[data-set="default"]'); var otherSelect = $('[data-select="other"]'); var mySelect = self.attr('data-select'); if(mySelect === 'practise' || mySelect === 'law') { var others = self.closest('fieldset').find(otherSelect); if (selPractice.val() == '' &amp;&amp; selLaw.val()=='' ) { others.prop('disabled',false); } else { others.prop('disabled',true); } } else if (mySelect === 'other') { var others = self.closest('fieldset').find(defaultSelect).not(self); compare(); } function compare() { if (myVal !=='') { others.prop('disabled',true); } else { others.prop('disabled',false); } } }); you can also find a working fiddle at: http://jsfiddle.net/qppa4qpe/16/
score: 1
has comment: http://stackoverflow.com/comment/41790783
upvote count: 1
has comment: http://stackoverflow.com/comment/41792536
answers question: http://stackoverflow.com/q/26547646
has comment: http://stackoverflow.com/comment/41787447
accepted answer of: http://stackoverflow.com/q/26547646
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42015518
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26642616
has text: By saying I couldn't do anything with settings/themes I mean: Try mouse clicking on Home then pressing tab key three times, then press Enter key to open dropdown, then hightlight (dont actually mouse click, just point at) either Settings or Themes and press either Enter or Spacebar and nothing really happens--Niether Settings Main Settings Aside or Themes Main Themes Aside will apear. Only way they show up is with mouse click. The Accesability Plugin (in GitHub project) makes it possible to navigate most of app with ketboard only, and Login will start working, but settings/themes will not.
type: AnswerComment

http://stackoverflow.com/a/26618131
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26618029
has body: Try this: _.reduce(pks, function(memo, val, key){ if (val) memo.push(key); return memo; }, []);
downvote count: 0

http://stackoverflow.com/comment/41834836
score: 0
has text: @Andi what I basically wanna do is, if the `scrollTop` is higher than value x, do animation. If not then do animation back.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26611380

http://stackoverflow.com/q/26594830
has answer: http://stackoverflow.com/a/26594978
has answer: http://stackoverflow.com/a/26595232
accepted answer: http://stackoverflow.com/a/26595165
tagged with: arrays
has comment: http://stackoverflow.com/comment/41804732
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41804295
has answer: http://stackoverflow.com/a/26594966
has title: Jquery- How to remove comma after a specific record in an array
has body: I am using the datatables mRender function to generate a list of items in a column separated by commas. I wanted to remove a specific record from the list and the record lies at the end of list of records in an array. Something like this: LESS,SAAS,REST,API I want to remove the last record (API, which i did), however, when i remove it the comma still sticks to it at the end, resulting into something like: LESS,SAAS,REST, LESS,SAAS, assuming that all time the record after the comma is the ALL. How can i remove the record and also the comma that sticks after it?? EDIT: This is how i have the code and im removing the API, by passing empty string. Please suggest of this could be done better. mRender: function (obj) { _.each(obj, function(item, index){ var prodVal = ""; else if (item === 'API'){ prodVal = ''; } returnVal.push("&lt;span class='product'&gt;" + prodVal + "&lt;/span&gt;"); }); return returnVal.join(', '); } Any ideas??? Thanks!
possible better answer: http://stackoverflow.com/a/26594965
has answer: http://stackoverflow.com/a/26594979
answer count: 7
has answer: http://stackoverflow.com/a/26594965
has comment: http://stackoverflow.com/comment/41804757
favorite count: 0
upvote count: 2
score: 0
has answer: http://stackoverflow.com/a/26595165
downvote count: 2
has answer: http://stackoverflow.com/a/26595000
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/41756844
comment on: http://stackoverflow.com/q/26568564
score: 0
has text: can you use beforeSave instead?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26545871
has body: I am trying to paste clipboard data into a variable that gets fed into and fired via XMLhttprequest POST message. I have created a firefox user.js with this code to increase access to clipboard based on this recommendation. user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "mydomain"); user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess"); user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess"); Do I need to change "mydomain" in line two? I do not want any sites to have access. Just my internal firefox extension. I have read several guides here and here as well as mozilla. Here is the code I have so far. The clipboard contents should get sent POST method via XMLHttpRequest. XMLHttpRequest works, as I have been using it for other variables. var pastetext = document.execCommand('paste'); var req = new XMLHttpRequest(); req.open('POST', pastetext, true); req.onreadystatechange = function(aEvt) { if (req.readyState == 4) { if (req.status == 200) dump(req.responseText); else dump("Error loading page\n"); } }; req.send(null); I am grateful for any help. Thank you
score: 2
type: AnsweredQuestion
has title: paste data from clipboard using document.execCommand("paste"); within firefox extension
tagged with: clipboard
upvote count: 2
tagged with: clipboarddata
type: Question
linked to: http://stackoverflow.com/q/23910353
linked to: http://stackoverflow.com/q/22702446
tagged with: javascript
has comment: http://stackoverflow.com/comment/41735180
accepted answer: http://stackoverflow.com/a/26554409
tagged with: firefox-addon
tagged with: firefox
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26554409
has comment: http://stackoverflow.com/comment/41736742

http://stackoverflow.com/comment/46160091
type: AnswerComment
comment on: http://stackoverflow.com/a/26718573
type: Comment
has text: Same here, I tried using both options.urls and passing in array of urls into files, but neither seem to actually be seeing a rendered version of the app because it is cutting out all nested/specific styles of directive templates that are added at runtime. I would love to see an example of this working on a large angular app that has alot of directives.
score: 0

http://stackoverflow.com/comment/41874203
has text: @N30: JavaScript has (the horror that is) Automatic Semicolon Insertion. That omission is in a place where ASI will fix it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26632998

oop
tags question: http://stackoverflow.com/q/26531691
tags question: http://stackoverflow.com/q/26605139
tags question: http://stackoverflow.com/q/26593104
tag name: oop
tags question: http://stackoverflow.com/q/26569778
tags question: http://stackoverflow.com/q/26579753
tags question: http://stackoverflow.com/q/26567808
tags question: http://stackoverflow.com/q/26560623
tags question: http://stackoverflow.com/q/26659603
tags question: http://stackoverflow.com/q/26623845
tags question: http://stackoverflow.com/q/26558567
tags question: http://stackoverflow.com/q/26606547
tags question: http://stackoverflow.com/q/26652788
tags question: http://stackoverflow.com/q/26554807
tags question: http://stackoverflow.com/q/26547806
tags question: http://stackoverflow.com/q/26545786
tags question: http://stackoverflow.com/q/26604081
type: Tag
tags question: http://stackoverflow.com/q/26534278

http://stackoverflow.com/a/26562923
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26562759
has comment: http://stackoverflow.com/comment/41749545
answers question: http://stackoverflow.com/q/26562759
has body: Use XMLHttpResponse as async. Because async responses may not be received in the order that they are requested and since you may be checking for multiple files it may be a good idea to check the responseURL property before acting on the case where the file does not "exist" (is not found or returns error, etc.) jsFiddle example: http://jsfiddle.net/5f42L6nz/4/ Source: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests function UrlExists(url) { var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); // true =&gt; async request xhr.onload = function (e) { if (xhr.readyState === 4) { if (xhr.status === 200) { // URL found, do stuff for "exists" alert("url exists:\r\n" + xhr.responseURL); } else { // URL not found, could check xhr.status === 404, etc. // do stuff when URL not found, but no exception/error thrown alert("not found or unexpected response:\r\n" + xhr.responseURL); } } }; xhr.onerror = function (e) { console.error(xhr.statusText); }; xhr.send(null); } var url = '/'; // just an example, get web app root UrlExists(url); UrlExists("/badurl");
type: Answer
has comment: http://stackoverflow.com/comment/41749490

http://stackoverflow.com/comment/41738483
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26556720
has text: Ractive tries to be a library agnostic, but helpful, to any particular web m-v-x-whatever denomination :). There was some discussion about whether the function calls should be model-based (attractive in its symmetry IMO) but controller methods won out thus far. Probably because ractive has data manipulation methods. Please feel free to jump in on [google group](groups.google.com/forum/#!forum/ractive-js) or [github](https://github.com/ractivejs/ractive/issues) for discussion directions and visions.
type: AnswerComment

http://stackoverflow.com/q/26581248
has comment: http://stackoverflow.com/comment/41779107
has answer: http://stackoverflow.com/a/78961002
has comment: http://stackoverflow.com/comment/41782156
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41779049
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/19529036
has title: onclick ="return confirm(' ' )"not working in google chrome
has comment: http://stackoverflow.com/comment/41779922
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26716833
has body: Below is the coding in my HTML page: &lt;input onclick="return confirm('Delete Record?')" type="submit" value="Delete" name="Delete"&gt; Delete function is working but without pop out "Delete Record? " in Google Chrome ver38. Delete function is working and with pop out "Delete Record?" in Internet Explorer. Any solution for this problem?
tagged with: javascript

http://stackoverflow.com/comment/41961310
comment on: http://stackoverflow.com/a/26659893
has text: Ha ! Thanks ... didn't realize that check was clickable until just now. Cheers
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41846327
type: AnswerComment
has text: I you have checked the link I have added in previous comment, and went through that section...you will come to know about what I want to do
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26617109

http://stackoverflow.com/q/26592535
has comment: http://stackoverflow.com/comment/41799890
answer count: 1
tagged with: javascript
tagged with: jquery
has title: window.load will not fire
has comment: http://stackoverflow.com/comment/41799910
has answer: http://stackoverflow.com/a/26592617
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: I need to run a function after the HTML on my page has been rendered (because I need to get the height of a particular dynamic div). I have tried several methods, but I cannot get window.load to fire (I am using Chrome). I've placed all of the following code below in the constructor of my TypeScript ViewModel. This doesn't work: $(window).on('load', function () { ...code... }); And neither does this: $(window).load(function(){ ...code... }); Or this: window.addEventListener('load', function () { ...code... }); Any ideas why none of these work? If there's another method to go about doing this, I'm open to suggestions.
has comment: http://stackoverflow.com/comment/41799930
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41799801
tagged with: typescript
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41800154
upvote count: 0
has comment: http://stackoverflow.com/comment/41800101
has comment: http://stackoverflow.com/comment/41799870

http://stackoverflow.com/q/26665571
has title: JSCOMPILER_PRESERVE after compiling javascript with KJSCompiler
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
answer count: 2
tagged with: google-closure-compiler
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/38242714
possible better answer: http://stackoverflow.com/a/52366277
has answer: http://stackoverflow.com/a/52366277
favorite count: 0
has body: After compiling my JavaScript source with KJSCompiler (https://github.com/knyga/kjscompiler) I get this weird function wrapped around my code. If I try to include it in my live source code I get this error in the console "Uncaught ReferenceError: JSCOMPILER_PRESERVE is not defined ". I thought that this problem occurred because I didn't add the "wrapper" in the JSON file of kjscompiler. After trying that it still occurs. Does anyone have an idea how to fix this?
accepted answer: http://stackoverflow.com/a/38242714

http://stackoverflow.com/q/26617928
upvote count: 0
answer count: 1
tagged with: jquery
tagged with: iteration
favorite count: 0
has comment: http://stackoverflow.com/comment/41846995
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/26617978
has title: Dynamically Declare Function in jQuery
score: -1
type: AnsweredQuestion
tagged with: dynamic
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26617978
has body: How can I dynamically create multiple functions of calendar() in my code? function calendar(){ new JsDatePick({ useMode:2, target:'datepicker', dateFormat:'%m-%d-%Y', weekStartDay: 0 }); Here's my attempt and I'm so close I can almost taste it: $(function() { $("[id^='datepicker']").each(function() { var id = parseInt(this.id.replace("datepicker", "")); function calendar+id(){ new JsDatePick({ useMode:2, target:'datepicker'+id, dateFormat:'%m-%d-%Y', weekStartDay: 0 }); } }); });

http://stackoverflow.com/comment/41755557
comment on: http://stackoverflow.com/q/26567808
has text: @dandavis Good catch, but the issue is with `run`. And I know that is defined. Just set a break-point at `else me.run.call(me);` in `TimerTask.execute()`; the function is not part of the prototype of that object...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41766286
has text: Here someone had a similar problem http://stackoverflow.com/questions/6938248/insert-a-div-element-as-parent
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26574307

http://stackoverflow.com/comment/41814074
has text: possible duplicate of [Why in JavaScript both "Object instanceof Function" and "Function instanceof Object" return true?](http://stackoverflow.com/questions/23622695/why-in-javascript-both-object-instanceof-function-and-function-instanceof-obj) and [Object and Function are quite confusing](http://stackoverflow.com/questions/2003183/object-and-function-are-quite-confusing)
comment on: http://stackoverflow.com/q/26599510
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26633206
type: Question
has body: I want to write an Angular service which keeps track of the visited URLs within a single page Angular application that uses the ngRoute module. Therefore, I subscribe to the $routeChangeStart event and query the $location.url() function within the callback: angular .module("myApplication") .factory("visitedUrls", visitedUrls); visitedUrls.$inject = ["$rootScope", "$location"]; function visitedUrls($rootScope, $location) { return { registerListener: function() { $rootScope.$on("$routeChangeStart", function() { var url = $location.url(); // ... }); } }; } However, the above approach won't register the event listener until the service has been resolved by the dependency injector for the first time — which is too late. I also want track all URLs visited before that. My current workaround gets hold of the Angular injector and calls the registerListener method immediately after the application has been bootstrapped: $angular.element(document).ready(function() { angular.bootstrap(document, ["myApplication"]); var visitedUrls = angular.element(document).injector().get("visitedUrls"); visitedUrls.registerListener(); }); I'm sure there is a better way to attach an event listener (from within a service) to $rootScope right after initializing an application, right?
accepted answer: http://stackoverflow.com/a/26633406
downvote count: 0
tagged with: javascript
answer count: 1
has title: Immediately registering an event listener after initializing an Angular application
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26633406
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/26618363
has comment: http://stackoverflow.com/comment/41848040
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26618585
score: -1
has comment: http://stackoverflow.com/comment/41848873
type: Question
has title: Regex - check for character but not select it
upvote count: 0
tagged with: javascript
has body: I'm doing swear words filter, and I want to replace words with * for each character. But I want to replace only words and not substrings of words and also comas, dots, ... must stay on their original place. Pleas take a look at this (working) example. In this case I'm filtering word f***. First and second line are correctly selected, but other two aren't. In last case shout be selected all except space's and similar in third case.
has answer: http://stackoverflow.com/a/26618585
answer count: 1
has comment: http://stackoverflow.com/comment/41848214
tagged with: regex
favorite count: 0

http://stackoverflow.com/comment/41894460
has text: It is my job http://placenetipy.cz/2014-11-13 , but when I restore the page so it disappears and you must click on the like again.
comment on: http://stackoverflow.com/a/26644027
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41890152
comment on: http://stackoverflow.com/a/26641501
type: Comment
has text: It's better, but when i begin to create a new item, i can edit other when I click to "edit".
score: 0
type: AnswerComment

http://stackoverflow.com/q/26526022
tagged with: javascript
has title: JavaScript form returns undefined
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has comment: http://stackoverflow.com/comment/41679766
type: AnsweredQuestion
tagged with: twitter-bootstrap
type: Question
has answer: http://stackoverflow.com/a/26526084
accepted answer: http://stackoverflow.com/a/26526084
has body: I have this big piece of code, that should calculate some numbers and make them green, if right answer, and red, if wrong answer. I'm using bootstrap, and want to change class of some forms, so that they'll change color. I've got a submit function, which calculates the input of some forms. But they keeps being red when clicking the button, cause the forms returns undefined. I'll appreciate every kind of help! (I'm desperate) Sorry about code being long. &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&quot;&gt;&lt;/script&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css&quot; /&gt; &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js&quot;&gt;&lt;/script&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css&quot;&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css&quot;&gt; &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js&quot;&gt;&lt;/script&gt; &lt;script src=&quot;js-src/signup.js&quot;&gt;&lt;/script&gt; &lt;title&gt;X Book&lt;/title&gt; &lt;style type=&quot;text/css&quot;&gt; body { text-align: center; overflow: hidden; margin: 0; } input { width: 25% !important; } #forms1 { margin-left: 35% !important; } &lt;/style&gt; &lt;script type=&quot;text/javascript&quot;&gt; var label1, label2, label3, label4, label5; var res1, res2, res3, res4, res5; var op1, op2, op3, op4, op5; var dig1, dig2, dig3, dig4, dig5, dig6, dig7, dig8, dig9, dig10; var fail1, fail2, fail3, fail4, fail5; var input1, input2, input3, input4, input5; var rightCount; var startDate, endDate; var nameForm, mailForm; function genNumb() { label1 = document.getElementById('1'); label2 = document.…
score: 0
answer count: 1

http://stackoverflow.com/comment/95488461
has text: Warning note: if you set your react to load asynchronously, it creates a race condition- if the browser finishes parsing the page before the JS is executed, you're fine. If the JS is loaded before the page is parsed, you will end up with the same issue the question is about. `defer` may be a better option
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28965157

http://stackoverflow.com/q/26558058
has title: javascript blank page showing up
upvote count: 0
answer count: 1
tagged with: button
favorite count: 0
accepted answer: http://stackoverflow.com/a/26558324
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41737431
type: AnsweredQuestion
has body: When I load this page on the internet, the screen appears blank and I've been having this problem with other java script pages I've written out, so Im wondering, is there a code I'm missing or something?
downvote count: 1
type: Question
tagged with: charts
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26558324
has comment: http://stackoverflow.com/comment/41737232

http://stackoverflow.com/q/26527703
has body: Just trying to understand why in this case I would need to use $scope.$apply ? According to all the info I've read about the subject, I shouldn't have to, since everything is happening inside Angular? What am I missing? In my controller: $scope.savePreset = function(columns, $event){ $event.preventDefault(); preset.name = prompt("Please enter preset name", "My Preset"); if (preset.name != null) { preset.columns = $scope.columns; $scope.presets[preset.name] = preset; // (Object) // Without $scope.$apply() here, view isn't updated. Why? alert('Your preset "' + preset.name + '" has been saved.'); $scope.loadPreset(preset.name); } else { alert('Please enter a valid name.'); } } (the savePreset function is called in an ng-click directive, and there's an ng-repeat for preset in presets, which isn't updating). Thanks, Pim
favorite count: 0
has answer: http://stackoverflow.com/a/26528152
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/16351184
accepted answer: http://stackoverflow.com/a/26528152
score: 4
has title: Why is the view not updating in this particular case? ($scope.$apply)
has comment: http://stackoverflow.com/comment/41682413
answer count: 2
possible better answer: http://stackoverflow.com/a/26527921
has answer: http://stackoverflow.com/a/26527921
tagged with: javascript
has comment: http://stackoverflow.com/comment/41682500
upvote count: 4
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/41864459
comment on: http://stackoverflow.com/a/26627690
type: Comment
has text: Hello George, in my original code i didn't use "object" but an other variable name but whn posting the question I replaced it with that. Thanks for your answer :-)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41806392
has text: a:focus, a:active { outline: none; }
comment on: http://stackoverflow.com/q/26595481
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26544820
type: Question
has body: Do you know how I can use a link that calls a js function or sth to create an html file defined by the link. I want to display a plain text, whenever the user clicks on my link. I figured alert won't suit me and I don't want to have it as an external document. Do you know if this is possible? Thanks ;)
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26544951
answer count: 1
has title: Create a temporary html-file in a link/js-funcion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26544951
type: AnsweredQuestion

http://stackoverflow.com/q/26556616
linked to: http://stackoverflow.com/q/10166839
type: UnansweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/559112
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41734738
answer count: 1
downvote count: 0
tagged with: javascript
has title: Modal when text value greater than $40 - jQuery
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41736149
has answer: http://stackoverflow.com/a/26558361
has body: I'm trying to work off of a question that Stefano Zanella answered in the link here. text input value greater than.. jQuery I need a model to pop up when the shopping cart subtotal is greater than $40. The code works as long as there is no dollar sign in the subtotal. however, The cart outputs the subtotal with a dollar sign and I don't know how to remove it before calling the alert. $55.00 $("input[type='text'][name='subtotal-alert']").change(function() { if ($(this).val() >= 41) { alert("To order quantity greater than 40 please use the contact form."); $(this).val(''); $(this).focus(); } });

http://stackoverflow.com/comment/41877812
type: Comment
has text: @Amit Joki, I accidentally add ; after the function definition, if I remove the ; it doesn't work again...
comment on: http://stackoverflow.com/q/26635109
score: 0
type: QuestionComment

http://stackoverflow.com/q/26584649
score: 11
type: AnsweredQuestion
has title: How to set default time on Bootstrap timepicker
has answer: http://stackoverflow.com/a/26584732
has answer: http://stackoverflow.com/a/43424315
type: Question
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/56234616
has answer: http://stackoverflow.com/a/56234616
has answer: http://stackoverflow.com/a/66096214
accepted answer: http://stackoverflow.com/a/26584732
has body: How can I set default time instead of current time for this datetimepicker http://tarruda.github.io/bootstrap-datetimepicker/ ?
downvote count: 0
upvote count: 11
favorite count: 0
tagged with: timepicker
has answer: http://stackoverflow.com/a/58890295
tagged with: twitter-bootstrap
answer count: 5

http://stackoverflow.com/comment/41789769
type: QuestionComment
score: 0
has text: If by "blocking" you mean that the modal, while it's displayed, prevents the user from interacting with the rest of the page - then jQuery's modal might help you. You just set 'modal: true'. I'm not sure what you mean by 'checks are ignored'. Can you be more specific? Can you post some of your code?
comment on: http://stackoverflow.com/q/26587121
type: Comment

http://stackoverflow.com/q/26598946
answer count: 1
has comment: http://stackoverflow.com/comment/41812404
has comment: http://stackoverflow.com/comment/41838990
tagged with: css
has body: I have a bunch of list items. I want each to vertically expand when I click on it, like an accordion. To do so nicely, I'm using keyframes, like so: @keyframe expand { 0% { height: 100px; } 100% { height: 200px; } } The only problem is, these list items are dynamic in height, as they contain other elements. Is there any way to set a dynamic starting height for the keyframe? The way it works is, if it's bigger than 100px to begin with, it shrinks and then grows.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26599165
accepted answer: http://stackoverflow.com/a/26599165
type: Question
linked to: http://stackoverflow.com/q/18481550
has title: CSS keyframe -- start from dynamic height
tagged with: javascript
has comment: http://stackoverflow.com/comment/41812606
has comment: http://stackoverflow.com/comment/41814279
tagged with: css-animations
score: 0
has comment: http://stackoverflow.com/comment/41812369

http://stackoverflow.com/comment/41778156
type: AnswerComment
comment on: http://stackoverflow.com/a/26580710
type: Comment
has text: That is what Iam trying to edit @SterlingArcher.Before only You posted the comment..I have explained
score: 0

http://stackoverflow.com/comment/41712438
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26544451
type: AnswerComment
has text: Then you can omit the `transition` from `:hover` state.

http://stackoverflow.com/comment/41664724
comment on: http://stackoverflow.com/a/26517234
type: AnswerComment
score: 0
has text: I've also seen some libraries use naming convention as a method of restricting visibility, though, it depends on the knowledge and restraint of the developer to enforce. For example, they'd do `this._ctx` where the `_` denotes that `ctx` is meant to be private scope. This kind of programming is generally a code smell in my opinion. I'd highly recommend that you DON'T follow that practice.
type: Comment

http://stackoverflow.com/a/26524506
type: Answer
answers question: http://stackoverflow.com/q/26524096
has comment: http://stackoverflow.com/comment/41677203
has body: Just call resize function on pageLoad $(document).ready(function($) { $(window).resize(YourFunctionName); $(window).resize(); }); function YourFunctionName() { // Here is your code which you want to run automatically on page resize. }
score: 0
has comment: http://stackoverflow.com/comment/41677331

http://stackoverflow.com/comment/41927657
type: Comment
type: QuestionComment
score: 3
has text: No, just write it yourself using basic mathematical operations.
comment on: http://stackoverflow.com/q/26662827

http://stackoverflow.com/q/26610868
has answer: http://stackoverflow.com/a/26612475
type: AnsweredQuestion
score: 0
linked to: http://stackoverflow.com/q/16508582
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26612475
tagged with: function
has body: Thank you in advance. I am still learning JavaScript and as a project approached, really need some help/insight. The logic that I am working on is this: 1. HTML structure: a b c many 2. JS structure: $(function(){ var one = {title:"titletext", description:"descrtext", keyword:"text", subject:"533,567,457", provider:"c9drlt-sdgtrzz", training:"true"}; var two = {title:"titletext", description:"descrtext", keyword:"textthis", subject:"537", provider:"c9drlt-sdgtrjt", training:"false"}; }); 3. JS logic structure: function search_class() { if (training == true) {training = "&tr=0";} else {training = "";} return training; } function search_custom() { // NOT SURE HOW TO PULL IT UP // if subject has more than 1 variable like subject:"533,567,457" // then construct the logic to separate them: // &s=533&s=2&567&s=3&457 return subject; } var url = "www.website.com"; var text_area = $('.search'); var btn_click = $('.content-btn-1'); btn_click.click (function () { var value = text_area.val(); var ty = "#s="; if ($.trim($(text_area).val())) { window.location.href = url+ty+search_class()+search_custom(); } }); 4. The outcome: www.website.com#s=titletext&d=descrtext&t=text&p=c9drlt-sdgtrzz&tr=0&s=533&s=2&567&s=3&457 5. The hard part: How can we do the logic so it takes that array in #2, attaches to the option id one, two ... etc in #1 and then constructs the link in #3 on click? In nutshell: This is a search function with options that has unique variables. Appreciate any help!
tagged with: arrays
answer count: 1
tagged with: url
tagged with: jquery
has title: Build URL link from Custom Options using JS logic

http://stackoverflow.com/comment/41881212
type: Comment
comment on: http://stackoverflow.com/a/26636683
has text: Thanks so much for your effort!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41743780
type: QuestionComment
comment on: http://stackoverflow.com/q/26561751
score: 0
has text: It's because `$(this)` in that context doesn't occur within the `$('.myclassname')` context, it's within it's outer (calling) context that it's being called from. It doesn't gain scope that way from that selector, in other words because that expression is immediately evaluated.
type: Comment

http://stackoverflow.com/comment/41860526
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26625520
score: 1
has text: this generally solves problem in other libraries, but not in your case. check my answer below.

http://stackoverflow.com/a/26671846
has body: The class parameter is just the name of the Parse Data class you want to access. In your Parse.com Dashboard your app's classes are listed on the left (see image below)
score: 0
answers question: http://stackoverflow.com/q/26657843
type: Answer

http://stackoverflow.com/comment/41717257
type: QuestionComment
score: 2
has text: There is no concurrency problem - JavaScript is single threaded. Once a function/event handler begins running, it will run to completion before anything else happens. Storing a variable in a bit of HTML is a bit odd though...
comment on: http://stackoverflow.com/q/26547219
type: Comment

http://stackoverflow.com/a/26590588
type: Answer
score: 0
has body: SOLVED. I just need to add a delay, because the code was runnning faster than the http could refresh. setTimeout(function(){ if($(window).attr('location')=='http:1'){ $(window).attr('location', 'http:2'); }}, 5000); $('#solicitar').trigger('click');
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26586652
answers question: http://stackoverflow.com/q/26586652

http://stackoverflow.com/comment/41763864
comment on: http://stackoverflow.com/a/26572653
score: 0
type: Comment
has text: thnks for reply but what do u mean with "success callback", is there any need to code in that block?
type: AnswerComment

http://stackoverflow.com/a/26606613
has comment: http://stackoverflow.com/comment/41868129
has body: Here's one way to create any kind of triangles using DIVs and transform rotate(): function drawLine (p1, p2, stroke, color) { var dx = p2[0] - p1[0], // Horizontal distance dy = p2[1] - p1[1], // Vertical distance angle = Math.atan2(dy, dx) * (180 / Math.PI), // Angle related to X-axis length = Math.sqrt(dx * dx + dy * dy), // Line length div = document.createElement('div'); div.style.position = "absolute"; div.style.left = p1[0] + 'px'; // Set position to p1 using div.style.top = p1[1] - stroke / 2 + 'px'; // line weight correction div.style.width = length + 'px'; // width as line length div.style.height = stroke + 'px'; // height as line weight div.style.background = color; div.style.transformOrigin = '0% 50%'; // Set origin to 50% of line weight div.style.transform = 'rotate(' + angle + 'deg)'; document.body.appendChild(div); } function drawTriangle (P1, P2, P3, stroke, color) { drawLine(P1, P2, stroke, color); drawLine(P2, P3, stroke, color); drawLine(P3, P1, stroke, color); } drawTriangle([10, 100], [60, 10], [110, 100], 10, 'rgba(255,0,0,0.5)'); drawTriangle([120, 10], [220, 10], [170, 100], 10, 'rgba(255,0,0,0.5)'); drawTriangle([100, 150], [200, 200], [150, 300], 1, '#000000'); A correct answer to the question "Where to set the transform-origin" is 0% 50%. This is easy to find out, when creating triangles with a line weight and semi-transparent color. You can use drawLine to draw for example rectangles or circles too.
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26594456
upvote count: 2

http://stackoverflow.com/comment/41876033
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26633790
has text: @JamesDonnelly Thx, actually your solution is absolutely correct, because only firefox supports this and also supports `CSS.supports`... Nice solution.

http://stackoverflow.com/q/26546357
has comment: http://stackoverflow.com/comment/41715720
tagged with: parameter-passing
has body: I am studying a jQuery plugin that is called jQuery TE. In the constructor method there is an argument 'options' that is passed : $.fn.jqte = function(options) Normally then when calling this method, we must pass it 'options' argument like this: $(".editor").jqte({ "css":"example", "source":false, "titletext":false }); I do not understand that we are not obliged to pass it this argument 'options' like this: $(".editor").jqte(); Indeed it does not cause any errors. I do not see anywhere in the source code control something that the argument 'options' is present. Who can explain this to me, I can not find resources on this problem goes anywhere. Maybe I misread the source code? Here is the link to the documentation : http://jqueryte.com/documentation Thanks !
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26546525
has title: optional arguments in the constructor of an object (or method) javascript
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26546525
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/41738109
has text: @squint: I disagree. And if you don't like my question, then stop posting on it and go get bent.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26554424
score: 0

http://stackoverflow.com/comment/41773883
type: QuestionComment
has text: @coma, see the `blarg` value of scope (line 21) it is not changing the view (search for `{{blarg}}` in the template).
comment on: http://stackoverflow.com/q/26578056
score: 0
type: Comment

http://stackoverflow.com/a/26665705
has body: Set tooltip.shared = true See http://api.highcharts.com/highcharts#tooltip.shared and http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/tooltip/shared-true-mixed-types/
has comment: http://stackoverflow.com/comment/41935775
downvote count: 0
answers question: http://stackoverflow.com/q/26660586
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26566703
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26566772
has answer: http://stackoverflow.com/a/26566772
tagged with: node.js
type: AnsweredQuestion
has title: Cache resource on startup of express
has answer: http://stackoverflow.com/a/26566780
upvote count: 1
tagged with: caching
type: Question
accepted answer: http://stackoverflow.com/a/26566780
downvote count: 0
has body: I am wondering if someone could help me point out how to cache a resource in express/node on startup of the web server. The myCol.find is very expensive, so I would like to just run it once on startup, and cache the result for all subsequent requests. Is there a startup step I can tie into? Can this be done synchronously before the server starts accepting requests? I have the code below, but would like to reference a cached variable instead of the mongo db var express = require('express'); var app = express(); var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost:27017/test'); var myCol = require('./customModule'); var port = process.env.PORT || 8080; var router = express.Router(); router.get('/test/:testId', function(req, res) { myCol.find(function(err, allResults) { res.json(allResults); }); }); app.use('/api', router); app.listen(port);
tagged with: javascript
tagged with: express
answer count: 2

http://stackoverflow.com/comment/41772415
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26575018
has text: http://stackoverflow.com/questions/7848004/get-column-from-a-two-dimensional-array
score: 0

http://stackoverflow.com/a/26546136
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26546071
has body: this.className is a string with all of the classes for the element (space delimited), so if it's not just "jsn-bootstrap3" you know it has more than one class: $('.jsn-bootstrap3').each(function(){ if( $.trim(this.className) !== "jsn-bootstrap3") { // Just jsn-bootstrap3 $(this).contents().unwrap(); } else { // More than just jsn-bootstarp3 $(this).removeClass('jsn-bootstrap3'); } });
accepted answer of: http://stackoverflow.com/q/26546071

kendo-ui
tags question: http://stackoverflow.com/q/26612828
type: Tag
tags question: http://stackoverflow.com/q/26633673
tag name: kendo-ui
tags question: http://stackoverflow.com/q/26608253
tags question: http://stackoverflow.com/q/26573573
tags question: http://stackoverflow.com/q/26597882
tags question: http://stackoverflow.com/q/26592908
tags question: http://stackoverflow.com/q/26550477
tags question: http://stackoverflow.com/q/26634883
tags question: http://stackoverflow.com/q/26516457
tags question: http://stackoverflow.com/q/26583186
tags question: http://stackoverflow.com/q/26586752

http://stackoverflow.com/comment/41814106
has text: @DatzMe hmm you are right. It depends on the purpose and scenario and here I might be over thinking from a Developer Perspective.
comment on: http://stackoverflow.com/q/26599699
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/121017797
type: Comment
comment on: http://stackoverflow.com/a/26547029
score: 1
has text: Super great! Why there is no such explanation in docs??
type: AnswerComment

http://stackoverflow.com/a/26553614
type: AcceptedAnswer
type: Answer
has body: Since I'm using ionic (cordova and angular), I'm using this cordova plugin instead.
accepted answer of: http://stackoverflow.com/q/26540319
answers question: http://stackoverflow.com/q/26540319
score: 0

http://stackoverflow.com/comment/41803272
score: 0
comment on: http://stackoverflow.com/q/26594174
type: QuestionComment
type: Comment
has text: Please show the html for the pop-up box.

http://stackoverflow.com/comment/41882930
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26635930
type: Comment
has text: @JuanMendes, will try/catch swallow an error only if it is not rethrown or returned.

http://stackoverflow.com/q/26575839
type: Question
score: 2
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26575889
tagged with: regex
favorite count: 0
accepted answer: http://stackoverflow.com/a/26575889
downvote count: 1
type: AnsweredQuestion
upvote count: 3
has title: Javascript regex ends with pattern
has body: I'm trying to write a regex in javascript to identify string representations of arbitrary javascript functions found in json, ie. something like { "key": "function() { return 'I am a function'; }" } It's easy enough to identify the start, but I can't figure out how to identify the ending double quotes since the function might also contain escaped double quotes. My best try so far is /"\s*function\(.*\)[^"]*/g which works nicely if there are no double quotes in the function string. The end of a json key value will end with a double quote and a subsequent comma or closing bracket. Is there some way to retrieve all characters (including newline?) until a negated pattern such as not "/s*, and not "/s*} ... or do I need to take a completely different approach without regex? Here's is the current test data I'm working with: http://regexr.com/39pvi

http://stackoverflow.com/comment/41811247
has text: If that's the case. then wouldn't it be coming back as truth anyway, since Sheis+present, which let's say we set to 1, would be She is1, ohhhhh. so then I assume that comes up as nothing. but what about the + " here. ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26598451

http://stackoverflow.com/comment/41863559
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26626960
has text: output in browser when i call with '2'. Date Number of hours worked this day 2014-10-08 4 2014-10-25 5
score: 0

http://stackoverflow.com/q/26535498
has answer: http://stackoverflow.com/a/26542200
has comment: http://stackoverflow.com/comment/41701455
type: Question
has comment: http://stackoverflow.com/comment/41701273
has comment: http://stackoverflow.com/comment/41697211
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41697754
has comment: http://stackoverflow.com/comment/41700974
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41723301
favorite count: 0
has comment: http://stackoverflow.com/comment/41698864
upvote count: 2
type: UnansweredQuestion
has body: I have the following button which opens a popup: &lt;button type="button" id="btnBuscarCuenta" onClick="javascript:AbrirPopUpBusqueda('id_AyudaCuentas', 'pop_cuentas_contables.cfm','', '900px', '600px');AsignaCuentas();"&gt; &lt;img src="../images/buscar.png" alt="Clic para buscar Cuenta Bancaria"/&gt; &lt;/button&gt; As you can see, the method which is calling the popup is called AbrirPopUpBusqueda. One of the parameters is id_AyudaCuentas is the hidden input that will receive the value after popup is closed. &lt;input type="hidden" name="id_AyudaCuentas" id="id_AyudaCuentas"/&gt; After the input 'id_AyudaCuentas' gets the value, it should trigger a function AsignaCuentas() which only separates the value and separate them into other text inputs: &lt;cfinput id="id_Cuenta" name="id_Cuenta" type="text" value="#id_Cuenta#" &gt; &lt;cfinput id="id_SCuenta" name="id_SCuenta" type="text" value="#id_SCuenta#"&gt; &lt;cfinput id="id_SSCuenta" name="id_SSCuenta" type="text" value="#id_SSCuenta#"&gt; &lt;cfinput id="id_SSSCuenta" name="id_SSSCuenta" type="text" value="#id_SSSCuenta#"&gt; The problem is that event is not triggered, or just trigger when you click the button again (which is undesirable behaviour). I've tried setting an onBlur or onChange attributes in the hidden input id_AyudaCuentas but it also doesn't work. Any suggestions? EDIT: I included the AsignaCuentas() function: function AsignaCuentas() { if ($x('id_AyudaCuentas').value != '') { ArregloCuentas= $x('id_AyudaCuentas').value.split('|'); $x('id_Cuenta').value= ArregloCuentas[0]; $x('id_SCuenta').value= ArregloCuentas[1]; $x('id_SSCuenta').value= ArregloCuentas[2]; $x('id_SSSCuenta').value= ArregloCuentas[3]; } ponerFocus('id_SSSCuenta'); }
tagged with: coldfusion
score: 2
has title: How to trigger properly an action after popup
has answer: http://stackoverflow.com/a/26549469

http://stackoverflow.com/comment/41915053
type: Comment
type: QuestionComment
score: 0
has text: Try to do an "inspect element" after the page loads for the first time and see if there's any warning/error showing up.
comment on: http://stackoverflow.com/q/26655409

http://stackoverflow.com/comment/41759742
comment on: http://stackoverflow.com/q/26570626
type: Comment
type: QuestionComment
score: 1
has text: What really amazes me is that a well-known shim (`Math.log2 = function(x) { return Math.log(x) / Math.LN2 };)` actually returns correct results for the precise powers in Chrome.

http://stackoverflow.com/comment/41754108
score: 0
has text: `onclick="sendForm(this)"` not `event`
type: AnswerComment
comment on: http://stackoverflow.com/a/26567502
type: Comment

http://stackoverflow.com/comment/41829133
type: AnswerComment
comment on: http://stackoverflow.com/a/26546101
score: 0
type: Comment
has text: When 'Home' Button is clicked, selectCategory() is triggered. Because no argument is passed, 'newCategory' is null so that 'selectedCategory' is also null, and this makes categoryFilterFn unable to filter anything so that products of all the categories will be listed at 'Home'. But if 'item', which refers to one of the categories, is passed in the call, the variable 'selectedCategory' is not null anymore so that 'categoryFilterFn' can filter all the products of that category out.

http://stackoverflow.com/a/26571676
accepted answer of: http://stackoverflow.com/q/26571625
has body: You probably want a $ at the end of your regular expression. A dollar sign indicates that it's the end of the string, so if you add that to your regex then it will only match strings with a length of 0 to 35: /^[A-Za-z \-]{0,35}$/
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26571625
score: 1

http://stackoverflow.com/a/26533180
answers question: http://stackoverflow.com/q/26533013
score: 0
type: Answer
has body: You have to make sure that the resulting JavaScript code is valid, as you yourself noted: var tagIds = "${userId}"; Now that's not necessarily the safest thing to do if you're not 100% sure of the contents of the stuff making up the id string. The best thing to do would be to use a JSON encoder; as far as I know there isn't one built into the standard JSTL/EL set of functions, but there are many available on the web.

http://stackoverflow.com/a/26594476
type: Answer
answers question: http://stackoverflow.com/q/26591639
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41820626
has body: It's pretty simple to do this using plain Javascript, or jQuery: /* Input Files Count */ $("body").on("change", function () { var numFiles = $("input", this)[0].files.length; $('.browseFiles').addClass('active'); // optional css for active }); The code above creates a function that simply counts anything you select from the form button. Using jQuery allows a bit more creativity with styling elements (css/mouseover effects), but not required. /* Input Files Count */ $("body").on("change", function() { var numFiles = $("input", this)[0].files.length; $('.browseFiles').addClass('active'); }); /* MouseOver Effects */ $('.browseFiles').mouseover(function() { $(this).addClass('over'); }).mouseout(function() { $(this).removeClass('over'); }); / #wrapper { width: 600px; margin-left: auto; margin-right: auto; } .browseTitle { font-family: Helvetica Neue; font-size: 14px; color: black; padding: 8px 6px 8px 6px; width: 610px; float: left; _float: none; background: #eee; border-radius: 5px; border: 2px solid #FFFFFF; cursor: pointer; } .browseFiles { font-family: menlo; font-size: 11px; padding: 2px 2px 2px 2px; width: 620px; float: left; _float: none; background: #ddd; border-radius: 5px; cursor: pointer; } .on { background: #77a509; } .over { background: #eee; } .active { background: #9ad60c; } .button, input, select { font-family : inherit; font-size : 100%; } .button { position : inline; padding : 5px; font : bold 1.2em sans-serif; background : none; cursor : pointer; } .button:hover, .button:focus { outline : none; background: #9ad60c; color : #000; border-radius: 5px; border: 1px; } Immagini Allegate

http://stackoverflow.com/q/26651525
has title: Passing a common variable to a module in Node.js
tagged with: module
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26651957
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26651647
has answer: http://stackoverflow.com/a/26651647
type: Question
has answer: http://stackoverflow.com/a/26651710
tagged with: javascript
has answer: http://stackoverflow.com/a/26651957
score: 0
has body: I'd like to create a module in node.js, that includes a couple of functions. I'd also need a common object for all of the functions to use. I tried the following syntax, but it doesn't seem to work: module.exports = function(obj) { func1: function(...) { }, func2: function(...) { } } Where obj is the common object I want the functions to use.
answer count: 3

http://stackoverflow.com/comment/41929869
has text: ALMOST. WE'RE SO CLOSE. I just need to have it unstick when you scroll back up to bottom of #header, not when you scroll up to the very top of page.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26663702

http://stackoverflow.com/a/26636299
has body: Your load order is incorrect: jQuery UI should come before the iris.min.js file. Fiddle. jquery-ui.min.js iris.min.js iris.css
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26635205
answers question: http://stackoverflow.com/q/26635205
upvote count: 1
type: AcceptedAnswer
type: Answer

validation
tags question: http://stackoverflow.com/q/26561918
tags question: http://stackoverflow.com/q/26559220
tags question: http://stackoverflow.com/q/26613589
tags question: http://stackoverflow.com/q/26528637
tags question: http://stackoverflow.com/q/26525472
tags question: http://stackoverflow.com/q/26572885
tags question: http://stackoverflow.com/q/26550069
tags question: http://stackoverflow.com/q/26660759
tags question: http://stackoverflow.com/q/26594677
tags question: http://stackoverflow.com/q/26571563
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/26661455
tags question: http://stackoverflow.com/q/26579541
tags question: http://stackoverflow.com/q/26617270
tags question: http://stackoverflow.com/q/26575279
tags question: http://stackoverflow.com/q/26553195
tags question: http://stackoverflow.com/q/26547619
tags question: http://stackoverflow.com/q/26589082
tags question: http://stackoverflow.com/q/26596532
tags question: http://stackoverflow.com/q/26661536
tags question: http://stackoverflow.com/q/26664712
tags question: http://stackoverflow.com/q/26546964
tags question: http://stackoverflow.com/q/26570687
tags question: http://stackoverflow.com/q/26627491
tags question: http://stackoverflow.com/q/26600560
tags question: http://stackoverflow.com/q/26518509
tags question: http://stackoverflow.com/q/26547862
tags question: http://stackoverflow.com/q/26567159
tags question: http://stackoverflow.com/q/26596653
tags question: http://stackoverflow.com/q/26598846
tags question: http://stackoverflow.com/q/26557454
tags question: http://stackoverflow.com/q/26572646
tags question: http://stackoverflow.com/q/26628571

http://stackoverflow.com/comment/41700168
score: 0
type: Comment
has text: it didn't work this way, but thanks to you I tried "onclick="javascript:document.getElementById('form').submit();"" and it worked! thank you so much
comment on: http://stackoverflow.com/a/26536952
type: AnswerComment

http://stackoverflow.com/comment/41720816
score: 0
comment on: http://stackoverflow.com/q/26548689
type: Comment
type: QuestionComment
has text: @Hless there aren't error messages. The route works fine, I can print a `Hello World`, for example. But `req.body.user` returns an undefined value.

http://stackoverflow.com/q/26524858
has title: How to deal with multiple concurrent REST calls in AngularJS?
tagged with: angularjs
downvote count: 2
accepted answer: http://stackoverflow.com/a/26525044
has body: Background: I'm building a web application (Mongo, Express, Angular and Node) to retrieve some data from a DB and display some charts on the client. The charts are dynamic (thanks to D3 and Crossfilter) and the user can interact with the charts to filter the data and display only a subset of it. For every interaction (clicks) with the charts, I'm making a REST call to the server (Using angular $http.get) to retrieve the relevant data and update asynchronously a table. Problem: It is possible for the user to click several times and very quickly. Because the REST calls are asynchronous, there is no guarantee that the last piece of data received is the correct one, right? So, my question is: how can I handle multiple and "concurrent" asynchronous REST calls in Angular? Is there a mechanism (correlation ID or so on) to be sure that the data I will display are the latest one? Thanks!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41677841
type: Question
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41677728
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26525044

http://stackoverflow.com/comment/41775190
type: Comment
score: 0
has text: @dandavis I did try that before and it worked but caused a problem elsehwere (can't recall exactly what). Anyway, will try that route again including a test of the getJSON against the file with the x = treatment.
comment on: http://stackoverflow.com/q/26577723
type: QuestionComment

http://stackoverflow.com/q/26522088
type: AnsweredQuestion
has title: Contentful.com API order / sort query
type: Question
score: 5
tagged with: contentful
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26536470
answer count: 1
downvote count: 0
has body: For anyone who has experience using the contentful.com API, I'm trying to query and sort by field name and currently getting a "ServerError". An example of the query that's being generated against their example API (with "fields.name" as the parameter): https://cdn.contentful.com/spaces/cfexampleapi/entries?order=fields.name&amp;access_token=b4c0n73n7fu1 Note that if "sys.createdAt" is used it works fine... https://cdn.contentful.com/spaces/cfexampleapi/entries?order=sys.createdAt&amp;access_token=b4c0n73n7fu1 The documentation is pretty vague (https://www.contentful.com/developers/documentation/content-delivery-api/javascript/#search-order) and I've searched long and hard for examples / samples but to no avail. Thanks in advance for any thoughts / ideas!
favorite count: 0
accepted answer: http://stackoverflow.com/a/26536470

http://stackoverflow.com/a/26634117
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41877453
accepted answer of: http://stackoverflow.com/q/26632803
answers question: http://stackoverflow.com/q/26632803
upvote count: 2
type: Answer
has body: The other computer might have different regional settings and so .ToString() produces a value without '.' which you rely upon. You should use .ToString(CultureInfo.InvariantCulture) and Parse(s, CultureInfo.InvariantCulture) instead.
has comment: http://stackoverflow.com/comment/41877058
score: 2
has comment: http://stackoverflow.com/comment/41875821

http://stackoverflow.com/comment/41738595
type: QuestionComment
comment on: http://stackoverflow.com/q/26558693
score: 0
has text: The usual javascript way to do this would be to just copy the properties of `human` to `sam` so `sam` becomes a combined object with the union of properties. Perhaps you should describe what problem you have that makes the usual way of doing this not applicable. `.__proto__` is deprecated. There is an experimental `.setPrototypeOf()`, but it seems you need to explain why the usual copying of properties (which is 100% supported and safe) wouldn't work for you.
type: Comment

http://stackoverflow.com/q/26587409
answer count: 1
downvote count: 0
tagged with: javascript
has title: AngularJS $stateParams when using reloadOnSearch:false
has body: I have a page in my application which uses a search so i have added the "realoadOnSearch:false" which works perfectly The problem I have is when navigating to the same state with a different stateParam: when I navigate to #/category/20/ from any other page it works fine... i then have a link on that page to #/category/3 (the parent category for 20) and the URL updates, however the content does not (no console errors) app.js (main application) .state('category', { url: '/category/:categoryId/', templateUrl: '/Home/Category', controller: 'categoryCtrl', reloadOnSearch: false }) I have tried adding target="_self" to force page reload and it does not work I have also tried to watch $stateParams for changes and there is nothing Clicking the link to #/category/3 from #/category/20 (and vice versa) should navigate to the new page and reload the data, where search should NOT reload the page (latter works but not the former) The URL is prefered to be a ng-href rather than ng-click as it is managed by the root controller EDIT: I did not find a direct solution, however i just disabled the reloadOnSearch and my sorting buttons still work so this works for me for now as a solution.
has answer: http://stackoverflow.com/a/26588738
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41791869
score: 3
tagged with: angular-ui-router
upvote count: 3
tagged with: search
type: Question
has comment: http://stackoverflow.com/comment/41791773

http://stackoverflow.com/a/26652850
upvote count: 3
answers question: http://stackoverflow.com/q/26652788
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26652788
has comment: http://stackoverflow.com/comment/41909539
score: 3
type: AcceptedAnswer
has body: By passing the function reference of changeHeading to setInterval, you will lose context on each call. You either prevent that by adding an additional function like setInterval(function() { marquee.changeHeading(); }, 700); or invoke Function.prototype.bind like var marqueeInterval = setInterval( marquee.changeHeading.bind( marquee ), 700 );
type: Answer

http://stackoverflow.com/comment/41883528
type: AnswerComment
comment on: http://stackoverflow.com/a/26637548
has text: Hey, thank you for the reply! Do you know what the syntax for Universal Analytics would be?
type: Comment
score: 0

http://stackoverflow.com/q/26538427
type: UnansweredQuestion
tagged with: ember.js
has answer: http://stackoverflow.com/a/26539815
has body: I'm trying to make a search inside a nested route particularly that shares model. Here's my code example Products and Search returns a json Router Market.Router.map -&gt; @resource 'products' @resource 'search', { path: "products/search" } @resource 'product', { path: "products/:product_id" } The rest adapter api url I'm trying to achieve is the following: http://api.url:3000/v1/products/search?search_terms="rope" I have an action inside a header menu controller for the search How do I find records inside a nested route? Market.HeaderMenuController = Ember.ArrayController.extend({ searchText: null, actions: { searchResults: function(){ this.store.find('product', 'search?search_terms='+this.searchText); this.store.find('search', { "search_terms":this.searchText }); } } }); I get the following errors - Error: Assertion Failed: You must include an id for Market.Product in an object passed to push Uncaught Error: Assertion Failed: Error: Assertion Failed: You must include an id for Market.Product in an object passed to push
has answer: http://stackoverflow.com/a/26550707
has title: Ember js search nested routes
type: Question
tagged with: javascript
tagged with: nested-routes
tagged with: search
score: 0
answer count: 2

http://stackoverflow.com/a/26625371
score: 33
upvote count: 33
type: AcceptedAnswer
downvote count: 0
has body: you can use querySelectorAll to hit partial attribs, including ID: document.querySelectorAll("[id^='this_div_id']") the ^ next to the equal sign indicates "starts with", you can use * instead, but it's prone to false-positives. you also want to make sure to use quotes (or apos) around the comapare value in attrib selectors for maximum compatibility on querySelectorAll; in jQuery and evergreen browsers it doesn't matter, but in vanilla for old browsers it does matter. EDIT: late breaking requirement needs a more specific selector: document.querySelectorAll("[id^='this_div_id']:not([id$='_test_field'])"); the not() segment prevents anything ending with "_test_field" from matching. proof of concept / demo: http://pagedemos.com/partialmatch/
type: Answer
answers question: http://stackoverflow.com/q/26625336
accepted answer of: http://stackoverflow.com/q/26625336

http://stackoverflow.com/a/26628275
accepted answer of: http://stackoverflow.com/q/26628039
upvote count: 2
answers question: http://stackoverflow.com/q/26628039
type: AcceptedAnswer
has body: There is a 3DES provider in the .NET Library and here is a good example of how to use it: How to implement Triple DES in C# (complete example) In principle, if you use 3DES on the client you just use another 3DES implementation on the server, you don't need to use the same implementation -- and since cryptoJS is JavaScript, it is mostly restricted to client-side use anyway. That being said, your string is not sent securely over the network, because your source code clearly identifies the method + password used to encrypt. So anyone who can sniff the data going to your server can decrypt. To really encrypt the traffic securely, you'd need to use SSL (= HTTPS).
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41804877
has text: So this is the issue I am facing. The function has 2 arguements - element,p where p is an optional parameter. If I use it the second way, it works fine in chrome and IE, but in firefox it gives me an error saying event is undefined, any suggestions? Or how can i pass the event reference to the function itself?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26594905

http://stackoverflow.com/comment/41847962
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26596109
type: QuestionComment
has text: do the prorates change for different cars? also something to think about... what happens if the user picks a month but no car/weight has been entered? those values are undefined. So you may want to think about just updating as the form as a whole is changed

http://stackoverflow.com/comment/133057865
type: Comment
comment on: http://stackoverflow.com/a/26669330
score: 0
type: AnswerComment
has text: This creates absolutely unnecessary computation. You can just use `String(num).length - 1` to get the number of zeroes

http://stackoverflow.com/comment/41856948
comment on: http://stackoverflow.com/q/26622831
has text: @Josep Ur conclusion is correct. That is what i want.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26625673
has comment: http://stackoverflow.com/comment/57956946
has body: I need to play video file in local Kiosk. Which has Windows 8.1 64-bit, with Google canary/chrome latest version. I have same problem with latest Google Chrome/canary versions its not playing files from local storage. If i play from cloud i have bandwidth issue+ there is no internet access for the kiosk. Step 1 : allow everything zero restrictions "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --incognito --allow-file-access-from-files --disable-web-security Step 2: Now i open a remote url https://stackoverflow.com/test.html, which is trying to play a video file which is located in the users PC, C:\loop.webm example: test.html &lt;video id="mediaplayer" autoplay="autoplay" poster="/images/vlc.jpg" type="video/webm" loop="" src="file:///C:/loop.webm" style="display: inline;"&gt;&lt;/video&gt; Result: The page at 'https://....mysite.com/test.html' was loaded over HTTPS, but displayed insecure content from 'file:///C:/loop.mp4': this content should also be loaded over HTTPS. Gives no error, but does not read a file, play the file at all. How can i play the file in this case?
type: UnansweredQuestion
tagged with: windows
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41860823
has comment: http://stackoverflow.com/comment/41861102
has answer: http://stackoverflow.com/a/26626398
has title: Google chrome - playing a file from local storage is not working
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/26682800
tagged with: javascript
has comment: http://stackoverflow.com/comment/41861074
tagged with: html5-video
score: 0
answer count: 2

http://stackoverflow.com/a/26630284
type: Answer
has comment: http://stackoverflow.com/comment/41872752
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/41871875
has body: OK, one problem in your code is, that you delete cells which you are currently iterating with for. I change your first loop to do everything reverse: for (var i = (rows[0].cells.length -1); i &gt;= 0; i--), from back to front... So no indices are changing on deletion. Second problem is your inner for loop. With first for loop you iterate over 3 columns and in inner loop you assume that every row has the same number of cols, but it isn't. I change the code so, that if the cell has a colspan greater then 1 then decrease the colspan otherwise delete the cell. The complete updated code is this: var countColumns = function(table) { if (!table || !table.tagName || table.tagName != 'TABLE') { throw new Error("The parameter 'table' must be a &lt;table&gt; DOM element."); } var maxColumnsCount = 0; for (var i = 0; i &lt; table.rows.length; i++) { maxColumnsCount = Math.max(table.rows[i].cells.length, maxColumnsCount); } return maxColumnsCount; }; var table = document.getElementById('Just_for_california'); var rows = table.rows; for (var i = (countColumns(table) -1); i &gt;= 0; i--) { var str = ''; var cellToDelete = []; if (rows[0].cells[i] != undefined) { str = rows[0].cells[i].innerHTML; cellToDelete.push(i); } else if (rows[0].cells[i -1].colSpan &gt; 1) { str = rows[0].cells[i -1].innerHTML; cellToDelete.push(i -1); cellToDelete.push(i); } if (str.search("&lt;span&gt;&lt;/span&gt;") != -1) { for (var j = 0; j &lt; rows.length; j++) { for (var k = 0; k &lt; cellToDelete.length; k++) { if (rows[j].cells[cellToDelete[k]] != undefined) { if (rows[j].cells[cellToDelete[k]].colSpan &gt; 1) { rows[j].cells[cellToDelete[k]].colSpan -= 1; } else { rows[j].deleteCell(cellToDelete[k]); } } } } } } And a demo FIDDLE Updated demo FIDDLE
has comment: http://stackoverflow.com/comment/41870945
downvote count: 0
answers question: http://stackoverflow.com/q/26617975

http://stackoverflow.com/comment/43103748
score: 0
type: AnswerComment
has text: are you using the touchemulator?
type: Comment
comment on: http://stackoverflow.com/a/27255266

http://stackoverflow.com/comment/42280170
type: QuestionComment
comment on: http://stackoverflow.com/q/26623936
has text: suppose if the json object having multiple employee objects so, how can i parse by javascript
score: 0
type: Comment

http://stackoverflow.com/comment/41830911
type: Comment
comment on: http://stackoverflow.com/a/26546101
has text: if no selectedCategory selectedCategory == null --> true and the function return true for all products; otherwise (selectedCategory != null) if product.category == selectedCategory --> function returns true & if product.category =! selectedCategory --> function returns false
score: 0
type: AnswerComment

http://stackoverflow.com/q/26583278
has body: I use the following construction to iterate through my object in a sorted order. I want to keep the keys in my object, since I want to be able to directly access properties. var object = { "1111": "value1111", "300": "value300", "2": "value2", "4": "value4" } $.each(Object.keys(object).sort(function(a, b) {return a - b;}), function(index, key) { value = object[key]; console.log(key + ': ' + value); }); http://jsfiddle.net/qpjdv6hs/2/ Without jQuery: var keys = Object.keys(object).sort(function(a, b) {return a - b;}); for (var index = 0; index &lt; keys.length; index++) { var key = keys[index]; var value = object[key]; console.log(key + ': ' + value); } http://jsfiddle.net/L69bsevb/1/ Is this a good way to do this or does jQuery provide something better? How would I create my own "$.eachSorted" function to use it as comfortable as $.each? EDIT: I think I made it: function eachSorted(object, sortCallback, callback) { var keys = Object.keys(object).sort(sortCallback); for (var i = 0; i &lt; keys.length; i++) { if (callback.call(object[keys[i]], keys[i], object[keys[i]]) === false) break; } return object; } function mySort(a, b) { return a - b; } var object = { "1111": "value1111", "300": "value300", "2": "value2", "4": "value4" } eachSorted(object, mySort, function(key, value) { console.log(key + ': ' + value); }); http://jsfiddle.net/y62Lqwhz/2/ Any objections?
answer count: 0
has comment: http://stackoverflow.com/comment/41782559
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/41782500
tagged with: javascript
has comment: http://stackoverflow.com/comment/41782606
tagged with: jquery
tagged with: sorting
score: 0
linked to: http://stackoverflow.com/q/890807
has title: jQuery $.each with sorted object keys
duplicate of: http://stackoverflow.com/q/890807
type: UnansweredQuestion
tagged with: each
has comment: http://stackoverflow.com/comment/41782659

http://stackoverflow.com/comment/41861557
has text: @lolmaus-AndreyMikhaylov thanks -- it'll definitely be on the same domain. The issue you raised is valid; if i have your `_session` then I would be able to get your test keys. Sounds bad .. you think a nonce should be used too? (doesn't Rails do that automatically?)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26601877
type: QuestionComment

http://stackoverflow.com/q/26613533
upvote count: 3
has title: Fill t-shirt with color and change text color accordingly on HTML canvas
has comment: http://stackoverflow.com/comment/41841865
has comment: http://stackoverflow.com/comment/41839295
has comment: http://stackoverflow.com/comment/41839353
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I've drawn out a t-shirt on canvas and I am currently trying to fill it when the user selects a colour on the menu above. In addition, I'd like the text on the t-shirt to change accordingly (for instance if the color black is selected then the t-shirt text color should be white). Is this possible? Snippet of the code so far: T-shirt color It would be easier to demonstrate what I'm speaking it, jsFiddle here: http://jsfiddle.net/rtnq8mjL/
accepted answer: http://stackoverflow.com/a/26614328
has comment: http://stackoverflow.com/comment/41855697
has comment: http://stackoverflow.com/comment/41840936
type: Question
has comment: http://stackoverflow.com/comment/41839381
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41840119
score: 3
favorite count: 0
has comment: http://stackoverflow.com/comment/41840178
tagged with: css
answer count: 1
has answer: http://stackoverflow.com/a/26614328
has comment: http://stackoverflow.com/comment/41840734

http://stackoverflow.com/a/26669815
upvote count: 4
has comment: http://stackoverflow.com/comment/42002453
has comment: http://stackoverflow.com/comment/41940697
downvote count: 0
has comment: http://stackoverflow.com/comment/41940810
accepted answer of: http://stackoverflow.com/q/26669699
answers question: http://stackoverflow.com/q/26669699
type: AcceptedAnswer
score: 4
has body: i remember, that safari has a problem with jquerys window height. try window.innerHeight instead. So your code would look like this if($(window).scrollTop() + window.innerHeight == $(document).height()) { alert('bottom') }
type: Answer

http://stackoverflow.com/comment/41850202
type: Comment
comment on: http://stackoverflow.com/a/26619041
type: AnswerComment
has text: I'll be sure to do that. Thanks for the tip!
score: 0

http://stackoverflow.com/comment/41890534
type: QuestionComment
has text: `tom tom` have you looked at this site [MSDN Control.ClientIdMode Property](http://msdn.microsoft.com/en-us/library/system.web.ui.control.clientidmode(v=vs.110).aspx)
comment on: http://stackoverflow.com/q/26641722
score: 0
type: Comment

http://stackoverflow.com/comment/41889304
has text: the buttons that has other nav animations
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26640695

http://stackoverflow.com/comment/41801924
type: QuestionComment
has text: You might be able to just use some old fashioned javascript. Here's a related post.. http://stackoverflow.com/questions/413439/how-to-dynamically-change-a-web-pages-title
score: 3
comment on: http://stackoverflow.com/q/26593481
type: Comment

http://stackoverflow.com/q/26562759
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26562923
has body: How to return to the calling function (the function above). I would like to return true if the file exists when doing UrlExists('file.png') : function UrlExists(url) { var http = new XMLHttpRequest(); http.open('HEAD', url, true); http.onerror = function(e){ //console.log('......onerror: ' + JSON.stringify(e)); if (typeof e !== 'undefined'){ return false } }; http.send(); return http.onerror(); }
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/41745633
has comment: http://stackoverflow.com/comment/41745704
has comment: http://stackoverflow.com/comment/41745616
has title: How to return to the function calling the current function
has comment: http://stackoverflow.com/comment/41745568
has comment: http://stackoverflow.com/comment/41745647
has comment: http://stackoverflow.com/comment/41745994
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26562923
has comment: http://stackoverflow.com/comment/41745481
has comment: http://stackoverflow.com/comment/41746118
has comment: http://stackoverflow.com/comment/41745586
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/14220321
upvote count: 0

http://stackoverflow.com/comment/41720165
score: 0
type: Comment
type: QuestionComment
has text: Or more specifically [this one](https://code.google.com/p/chromium/issues/detail?id=422000)
comment on: http://stackoverflow.com/q/26548658

http://stackoverflow.com/comment/41856653
type: Comment
has text: I will implement this onto ma project,and will accept you ans.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26612196

http://stackoverflow.com/comment/41775898
type: QuestionComment
has text: See [here](http://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode) for an iptable workaround that allows ports below 1024 to operate when not running root. Also see [here](http://serverfault.com/questions/602240/how-to-run-node-js-app-on-port-80-are-processes-blocking-my-port) for a near duplicate question with answers.
score: 1
type: Comment
comment on: http://stackoverflow.com/q/26579028

http://stackoverflow.com/q/26582701
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: google-chrome-extension
answer count: 1
has answer: http://stackoverflow.com/a/26586275
favorite count: 0
has title: close popup window from chrome extension
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/44351782
downvote count: 2
accepted answer: http://stackoverflow.com/a/26586275
has body: Java script function tom open popup window from extension var trackchildwindow; $('#done').submit(function(){ trackchildwindow=chrome.windows.create({url: 'chrome-extension://'+&lt;extensionid&gt;+'/src/browser_action/ChildPage.html', type: 'popup' , focused: true, 'width': 900 ,'height': 700, 'left': 600, 'top': 800 }); }); In the same javascript file function to close the popup window window.onbeforeunload = function () { Chrome.windows.remove(trackchildwindow.id, function(){}); }; However it fails to close the popup window. I have tried using trackchildwindow.close(); too. Not working . Any help will be appreciated ............................edited .................... I have found my answer Buttonclose= function close(){ open(location, '_self').close(); } That is it . For record keeping from my main window I am using chrome.extension.sendMessage
tagged with: google-chrome

http://stackoverflow.com/a/26583063
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26581544
upvote count: 1
answers question: http://stackoverflow.com/q/26581544
downvote count: 0
has body: Use offset() instead of position() Try this and check it in your console console.log($('#formholder').offset().left);
type: AcceptedAnswer

dc.js
tag name: dc.js
type: Tag
tags question: http://stackoverflow.com/q/26657621
tags question: http://stackoverflow.com/q/26666484

http://stackoverflow.com/q/26668188
type: UnansweredQuestion
upvote count: 1
tagged with: pcm
tagged with: audio
score: 1
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to play a pcm audio with web audio api?
tagged with: http://stackoverflow.com/tag/html
has body: Tody I just try play a pcm audio witch chrome browser, so I look for some API with WEB Audio, That was which I find it : https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.decodeAudioData. Then I write an eg with it. The java script file code is : function BufferLoader(context, urlList, callback) { this.context = context; this.urlList = urlList; this.onload = callback; this.bufferList = new Array(); this.loadCount = 0; } BufferLoader.prototype.loadBuffer = function(url, index) { // Load buffer asynchronously var request = new XMLHttpRequest(); request.open("GET", url, true); request.responseType = "arraybuffer"; var loader = this; request.onload = function() { // Asynchronously decode the audio file data in request.response loader.context.decodeAudioData( request.response, function(buffer) { if (!buffer) { alert('error decoding file data: ' + url); return; } loader.bufferList[index] = buffer; if (++loader.loadCount == loader.urlList.length) loader.onload(loader.bufferList); } ); } request.onerror = function() { alert('BufferLoader: XHR error'); } request.send(); } BufferLoader.prototype.load = function() { for (var i = 0; i &lt; this.urlList.length; ++i) this.loadBuffer(this.urlList[i], i); } window.onload = init; var context; var bufferLoader; function init() { try { window.AudioContext = window.AudioContext || window.webkitAudioContext; context = new AudioContext(); } catch(e) { alert('Web Audio API is not supported in this browser'); } bufferLoader = new BufferLoader( context, [ 'http://localhost:91/learn/audio' ], finishedLoading ); bufferLoader.load(); } function finishedLoading(bufferList) { var source = context.createBufferSource(); source.buffer = bufferList[0]; source.loop = true; source.connect(context.destination); source.start(0); } Here is server core width servlet download: @WebServlet(name = "audioServlet", urlPatterns = "/audio") public class AudioServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServ…
has comment: http://stackoverflow.com/comment/41937669
has comment: http://stackoverflow.com/comment/41938649
answer count: 0

http://stackoverflow.com/comment/41900999
has text: Try logging the result of `form` in the `add();` function and see what you get
comment on: http://stackoverflow.com/q/26648118
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/41780941
has text: what is the need of '\n' there?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26582354
score: 0

http://stackoverflow.com/a/26532039
has comment: http://stackoverflow.com/comment/41692280
answers question: http://stackoverflow.com/q/26531924
score: 4
has body: When you use document.write after the page load, it is like using a whiteboard, it erases the board so you start fresh. So all of the code that was there was removed. You want to use DOM methods to add new content. So you want to use either innerHTML or appendChild() xhr.onload = function() { result = JSON.parse(xhr.responseText); var content = []; for (var i = 0; i &lt; result[0].length; i++) { var title = result[0][i]; var startDate = result[1][i]; content.push("&lt;div class=\"rsvpEvent\"&gt;"); content.push("&lt;p style=\"text-align:center;\"&gt;&lt;b&gt;" + title + "&lt;/b&gt;&lt;/p&gt;&lt;p class=\"cancel\"&gt;cancel&lt;/p&gt;"); content.push("&lt;div style=\"width:30%;height:68%;float:left;margin-left:2%;margin-right:2%;\"&gt;"); content.push("&lt;img class=\"backgroundImage\" src=\"img/surf2.jpg\"&gt;"); content.push("&lt;/div&gt;"); content.push("&lt;b style=\"color:#3ad7ff\"&gt;3 friends &lt;font face=\"ico\" color=\"#ffffff\"&gt;&amp;#xe60a;&lt;/font&gt; 9 others&lt;/b&gt;&lt;br /&gt;"); content.push(startDate + "&lt;b style=\"color:#3ad7ff;\"&gt;15km&lt;/b&gt;"); content.push("&lt;div class=\"facebookBox\"&gt;&lt;font face=\"ico\" style=\"position:relative;top:-6vh;left:1vw;\"&gt;&amp;#xe608;&lt;/font&gt;&lt;/div&gt;"); content.push("&lt;div class=\"twitterBox\"&gt;&lt;font face=\"ico\" style=\"position:relative;top:-1vh;left:1vw;\"&gt;&amp;#xe609;&lt;/font&gt;&lt;/div&gt;"); content.push("&lt;img src=\"img/Tulips.jpg\" class=\"profileBox\" onclick=\"showProfilefromRSVP()\"&gt;"); content.push("&lt;div class=\"viewBox\" onclick=\"showFeed()\"&gt;view&lt;/div&gt;"); content.push("&lt;/div&gt;"); } document.getElementById("outputElem").innerHTML = content.join(""); }
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41692678
has comment: http://stackoverflow.com/comment/41691828
has comment: http://stackoverflow.com/comment/41691871
has comment: http://stackoverflow.com/comment/41692354
accepted answer of: http://stackoverflow.com/q/26531924
type: Answer

http://stackoverflow.com/comment/41715336
has text: @tomasb It came up by using the observer pattern. The function I attached was the result of a bind call, and in the "observable" notify method I was using "call" to execute that function. I just wanted to make sure the first value was preserved and then this question came to my mind.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26545549

http://stackoverflow.com/a/26532420
has body: Try var canvasTracking; $.post('loadSave.php', {saveName : xml_name} , function(xml) { if (xml.firstChild.nodeName === "canvastracking") { canvasTracking = $(xml.firstChild); } else { canvasTracking = "" } console.log(canvasTracking) }) jsfiddle http://jsfiddle.net/guest271314/mm6yc1vh/
accepted answer of: http://stackoverflow.com/q/26530545
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41696660
answers question: http://stackoverflow.com/q/26530545
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26564131
has answer: http://stackoverflow.com/a/26564362
answer count: 1
favorite count: 0
has body: I used this snippet so I could see a "$touched" property on an input after it was blurred so I could do some validation, and it works great, but now I'm trying to make it work without overloading input and I've changed it to this: .directive('blur', function () { return { restrict: 'E', require: '?ngModel', replace: true, template: "&lt;input /&gt;", link: function postLinkFn($scope, $element, $attrs, ctrl) { if (!ctrl) { return; } ctrl.untouched = true; ctrl.touched = false; $element.on('blur', function (){ $scope.$apply(function () { ctrl.untouched = false; ctrl.touched = true; }); }); } }; }); Hoping to be able to use "myForm.email.touched", but that doesn't work. Is there something I'm doing wrong?
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26564362
type: AnsweredQuestion
downvote count: 1
linked to: http://stackoverflow.com/q/3558119
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41748237
has title: Custom directive to assign property on element
has comment: http://stackoverflow.com/comment/41747969
has comment: http://stackoverflow.com/comment/41748005
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41748078

http://stackoverflow.com/comment/41831874
has text: Your variable naming advice is good, but just for the record the constructor is `RegExp`.
comment on: http://stackoverflow.com/a/26610022
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41789129
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26586983
type: AnswerComment
has text: Thank you for your answer, and sorry, but I don't know exactly how should I add this line of code. I found this line in other so answer, but they where just for whose who were coding using only android.

datatables
tags question: http://stackoverflow.com/q/26611924
tags question: http://stackoverflow.com/q/26611601
tags question: http://stackoverflow.com/q/26557215
tags question: http://stackoverflow.com/q/26634722
tags question: http://stackoverflow.com/q/26531937
tags question: http://stackoverflow.com/q/26661803
tags question: http://stackoverflow.com/q/26520289
tags question: http://stackoverflow.com/q/26638659
tags question: http://stackoverflow.com/q/26550084
type: Tag
tags question: http://stackoverflow.com/q/26516638
tags question: http://stackoverflow.com/q/26593642
tags question: http://stackoverflow.com/q/26599031
tag name: datatables
tags question: http://stackoverflow.com/q/26654560
tags question: http://stackoverflow.com/q/26591559
tags question: http://stackoverflow.com/q/26551607

http://stackoverflow.com/q/26667492
answer count: 1
linked to: http://stackoverflow.com/q/26701197
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26683745
tagged with: instafeedjs
type: AnsweredQuestion
score: 2
has title: Filter results for instagram videos only- instafeed.js
has body: I am using the great and dead simple instafeed.js to pull a couple of my instagram videos into my personal webpage. It is working but I have not found an option for filtering results for just videos. Currently it shows a combination of images and videos. All I want for the return result is videos.
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26683745
tagged with: javascript
has comment: http://stackoverflow.com/comment/41936391

http://stackoverflow.com/a/26659482
has comment: http://stackoverflow.com/comment/41934589
answers question: http://stackoverflow.com/q/26659334
type: Answer
has body: Have you tried setting a cookie with the start time, and state? Maybe, when you start the interval, write a cookie that looks like this: {"start":reference_date, "isRunning":1} Then, on each interval, check the current state. When you stop, update the state.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26659334
has comment: http://stackoverflow.com/comment/42043962
score: 0

http://stackoverflow.com/q/26584280
has title: Convert given range values to domain values in D3
type: Question
has comment: http://stackoverflow.com/comment/41790209
tagged with: javascript
score: 2
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26587976
favorite count: 0
has comment: http://stackoverflow.com/comment/41788541
upvote count: 2
tagged with: d3.js
has body: I have a linear scale: var xRange.range([0, parentWidth]).domain([0, 100]); Now on mouseover I get xy coords of the mouse cursor using d3.mouse(container). Then I show a floating tooltip. I need to put xy values calculated from mouse position according to the xRange scale. How do I do it? Or do I have to create another scale with swapped range and domain values?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26587976

http://stackoverflow.com/comment/41770450
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26576211
has text: You can make y settable if you want. Check my answer.
score: 0

http://stackoverflow.com/q/26608625
has comment: http://stackoverflow.com/comment/41830221
tagged with: internationalization
possible better answer: http://stackoverflow.com/a/36453953
upvote count: 3
has answer: http://stackoverflow.com/a/36453953
has answer: http://stackoverflow.com/a/26630681
tagged with: i18next
has comment: http://stackoverflow.com/comment/41831637
tagged with: javascript
type: AnsweredQuestion
score: 3
downvote count: 0
has title: How to wait for Angular module to load?
accepted answer: http://stackoverflow.com/a/26630681
favorite count: 0
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/41837349
answer count: 2
has body: I'm trying to use i18next (https://github.com/archer96/ng-i18next) in my Angular project, but it seems to be loading too slow. This is my setup: angular.module('jm.i18next').config(['$i18nextProvider', function ($i18nextProvider) { $i18nextProvider.options = { lng: 'en', fallbackLng: 'en', preload: ['en'], supportedLngs: ['en'], resGetPath: '../locales/__lng__.json', useCookie: false, useLocalStorage: false, defaultLoadingValue: '' }; }]); angular.module('myApp', ['jm.i18next']).controller('MainCtrl', ['$scope', '$i18next', function ($scope, $i18next) { console.log($i18next("key")); setTimeout(function() { console.log($i18next("key")); }, 1000); }]); I have to add a timeout to have a value. Is there a way to make sure i18next is ready when the controller is loaded? UPDATE I'm trying to group workouts by type, which is translated using $i18next. But this doesnt work, since the view is "ready" before the controller has done the translation. &lt;select ng-model="workout" ng-options="workout as workout.name group by workout.type for workout in workouts | orderBy: ['type', 'name']"&gt;&lt;/select&gt; $scope.workouts = [ {id: 1, name: 'Workout 1', type: $i18next("type1")}, {id: 25, name: 'Workout 2', type: $i18next("type2")}, ];

http://stackoverflow.com/comment/41728731
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26552521
has text: @Taha, updated code, try this!, i think you are definitely missing `jquery` and `jquery.ui` library after checking updated code, please add those to `aspx` , then it will work, there is no issue with the code now.
score: 0

http://stackoverflow.com/q/26561679
has comment: http://stackoverflow.com/comment/41749271
has title: tracking outgoing anchor click to separate account
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41810738
has comment: http://stackoverflow.com/comment/41751317
has body: I have a site that has implemented Google Analytics. However I need to track an outgoing anchor link to another domain url and that tracking to be submitted to another Google Analytics account.
type: Question
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/41806066
has answer: http://stackoverflow.com/a/26566611
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26574889

http://stackoverflow.com/a/26571597
has body: This is an alternative to @benhowdle89's answer. Use Array.prototype.every The .every method is used to iterate over an array and check whether each and every element passes a test or not. If the callback returns false for any single element, the loop breaks. Take the following example: var odds = [3, 5, 7, 9, 11, 12, 17, 19]; //an array with all odd numbers except one var checkEven = function (n, i, arr) { console.log ("Checking number ", n); if (n%2===0) { arr.splice(i, 1); return false; } return true; } console.log(odds.every(checkEven), odds); If you run the above and look at the console, the loop executed till number 12 only, where it spliced, and stopped. You can employ similar logic in your code very easily :)
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26571410
score: 2
downvote count: 0

http://stackoverflow.com/a/26628152
accepted answer of: http://stackoverflow.com/q/26626096
score: 4
type: AcceptedAnswer
has body: You build a driver twice. Once here: var driver = new webdriver.Builder(); driver.forBrowser("chrome"); driver.usingServer('http://localhost:4444/wd/hub'); driver.withCapabilities(webdriver.Capabilities.chrome()); driver.build(); The second time here, on the 2nd line: test.it('should work', function() { var driver = new webdriver.Builder().build(); This second occurrence is incorrect. In fact, it seems to look like some code that was left over from an earlier version of your code.
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26626096
downvote count: 0

http://stackoverflow.com/comment/41870946
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26631337
has text: Ok. Great, can you provide any resource about ready handler.It will be more helpfull.Thanks

http://stackoverflow.com/comment/41689231
type: QuestionComment
has text: why would you be promoting use of `document.write`?
comment on: http://stackoverflow.com/q/26531220
score: 3
type: Comment

http://stackoverflow.com/comment/41727070
comment on: http://stackoverflow.com/a/26551397
score: 0
type: Comment
has text: @physicsRiot check my if statement, it only clears inputs with `id === '2ndBankFields'`
type: AnswerComment

http://stackoverflow.com/comment/41686770
has text: suggest you use `eventRender` callback to add your `X`. Then you have access to the calendar event which you can use in click handler. http://fullcalendar.io/docs/event_rendering/eventRender/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26530076
score: 0

http://stackoverflow.com/q/26583696
answer count: 6
has comment: http://stackoverflow.com/comment/41799294
has answer: http://stackoverflow.com/a/26583770
has comment: http://stackoverflow.com/comment/41816886
favorite count: 0
possible better answer: http://stackoverflow.com/a/26584728
has answer: http://stackoverflow.com/a/26584728
has title: Object copied to second property via reference persists even after original property deleted?
tagged with: pass-by-reference
has answer: http://stackoverflow.com/a/26583783
accepted answer: http://stackoverflow.com/a/26583770
type: AnsweredQuestion
has body: I thought objects are passed as reference. But when I delete b, it still exists in c. Please see this example: This first part makes sense to me as its passed by reference: var a = {b: {val:true}}; a.c = a.b; a.b.val = 'rawr'; console.log(uneval(a)); // outputs: "({b:{val:"rawr"}, c:{val:"rawr"}})" Now this part does not make sense to me: var a = {b: {val:true}}; a.c = a.b; a.b.val = 'rawr'; delete a.b; console.log(uneval(a)); // outputs: "({c:{val:"rawr"}})" so b property is deleted, but c property is holding the properties to what the referenced before delete. is this a bug in javascript? edit: thanks all to the replies! so its not a bug, and this behavior is actually very good, it allows people to change "key"/"property" names while retaining the object! :)
has answer: http://stackoverflow.com/a/26583871
has comment: http://stackoverflow.com/comment/41813566
has answer: http://stackoverflow.com/a/26583834
score: 23
downvote count: 1
upvote count: 24
type: Question
has comment: http://stackoverflow.com/comment/41811899
has answer: http://stackoverflow.com/a/26583990
tagged with: javascript

http://stackoverflow.com/q/26623493
has answer: http://stackoverflow.com/a/26623800
type: Question
has comment: http://stackoverflow.com/comment/41857168
has answer: http://stackoverflow.com/a/26623830
tagged with: modal-dialog
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26623836
has comment: http://stackoverflow.com/comment/41857116
tagged with: twitter-bootstrap
has body: I am trying to force a user to first fill a form which will be in a un-closable modal and once the user enters the data he can get access to the website. I am refering to this example. -Example 5: the un-closable window The modal is working exactly the way I want it but I am unable to make it load with the page. I dont understand Javascript much thus I am stuck here. I tried using this - &lt;script type="text/javascript"&gt; $(document).ready(function() { $("#ex5").dialog({modal: true}); }); &lt;/script&gt; But this didn't work. Any help would really be appreciated. Also please suggest any other un-closable popup modal which I can use instead of the one I have mentioned.
has title: Load Un-clossable Jquery Modal on Page load
type: AnsweredQuestion
tagged with: popup
possible better answer: http://stackoverflow.com/a/26623800
has answer: http://stackoverflow.com/a/26623836

http://stackoverflow.com/q/26530970
tagged with: jquery
has body: I have a function in jquery that allows me to get the name of a file that was uploaded in ie7. I am able to get the name of the file, but I am also trying to get the base64 string of the file. Is there any way to alter this function below to do that? var thumbnail_title_preview = { update: function(value, event_target) { var parent_upload_fields = $(event_target).parents('.upload-photos'); var photos_list = $('.upload-photos-list-inner', parent_upload_fields); var thumbnail = document.createElement("div"); $(thumbnail).addClass('uploaded-thumbnail-title'); var file_name = value; if(ie7) { file_name_array = file_name.split('\\'); file_name = file_name_array[file_name_array.length - 1]; } else { file_name = file_name.replace('C:', ''); file_name = file_name.replace('D:', ''); file_name = file_name.replace('\\fakepath\\', ''); } if(file_name.length > 12) { file_name = file_name.substring(0, 12) + '...'; } $(thumbnail).append(' ' + file_name + ' '); $(thumbnail).append(''); $(photos_list).append(thumbnail); var number_of_thumbnails = $('.uploaded-thumbnail-title', parent_upload_fields).length; $(photos_list).css({ 'width': number_of_thumbnails * (117 + 20) }); if(number_of_thumbnails == 5) { $('.upload-photos-add', parent_upload_fields).css({ 'display': 'none' }); $(parent_upload_fields).addClass('has-five-photos'); } else { $(parent_upload_fields).removeClass('has-five-photos'); } if(ie7) { updateTinyScrollbar(); } else { $('.upload-photos-list').perfectScrollbar('update'); var scrollbar_style = $('.ps-scrollbar-x-rail', parent_upload_fields).css('display'); if(scrollbar_style == 'block') { $(parent_upload_fields).addClass('has-perfect-scrollbar'); } else { $(parent_upload_fields).removeClass('has-perfect-scrollbar'); } } } } This is the html: <asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" AllowedFileTypes="jpg,jpeg,png,gif" OnClientUploadComplete="onClientUploadComplete" OnClientUploadCompleteAll="onClientUploadCompleteAll" OnClientUploadStart="onClientUpload…
score: 0
linked to: http://stackoverflow.com/q/20424279
has answer: http://stackoverflow.com/a/26615971
accepted answer: http://stackoverflow.com/a/26615971
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41688969
tagged with: css
has comment: http://stackoverflow.com/comment/41691793
type: AnsweredQuestion
has title: Get base64 of image from input in ie7?
has comment: http://stackoverflow.com/comment/41691402
has comment: http://stackoverflow.com/comment/41697701
type: Question
has comment: http://stackoverflow.com/comment/41690384
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41809048
score: 0
type: Comment
type: QuestionComment
has text: If I place a `console.log()` in the `.text()` function I see that the `.append()` call only fires when the page loads. Chrome's debugger shows the block of code evaluated when the values change, however the `console.log()` never works.
comment on: http://stackoverflow.com/q/26594721

http://stackoverflow.com/comment/41863556
has text: possible duplicate of [Check checkbox checked property using jQuery](http://stackoverflow.com/questions/901712/check-checkbox-checked-property-using-jquery)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26627075
score: 1

http://stackoverflow.com/comment/41817982
comment on: http://stackoverflow.com/a/26602290
score: 0
type: AnswerComment
has text: you included cordova js ?
type: Comment

http://stackoverflow.com/a/26565002
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26564921
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26564921
has body: You can use an IIFE to return a function with the current value of keyValue, something like removeButton.onclick = (function (value) { return function(){ remove(value); }; })(keyValue);

http://stackoverflow.com/comment/41773138
type: Comment
has text: I see $this.data('voting') in you jQuery code but I do not see 'voting' as data attribute anywhere in yout HTML code.
type: QuestionComment
comment on: http://stackoverflow.com/q/26577750
score: 0

http://stackoverflow.com/comment/41843970
type: QuestionComment
comment on: http://stackoverflow.com/q/26616011
has text: well then your question was already answered.... put the alert inside the callback
score: 0
type: Comment

http://stackoverflow.com/q/26539662
has answer: http://stackoverflow.com/a/26539888
type: Question
has comment: http://stackoverflow.com/comment/41705827
has answer: http://stackoverflow.com/a/26539853
has comment: http://stackoverflow.com/comment/41705578
tagged with: javascript
tagged with: dom
score: 0
has comment: http://stackoverflow.com/comment/41704362
answer count: 2
accepted answer: http://stackoverflow.com/a/26539853
has title: Why isn't JavaScript running when I refernce the external file in between the head tags in my html file?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26539888
has body: When I put the link to my JS file in between my html header tags the js file will not run. However if I put the external js link after my body tag or somewhere after the bulk of my html code the file runs. Is there any way to make the external js file run when I link the external file in between the head tags. I also should mention that I'm doing HTML DOM in the external js file. HTML Portion: HTMLDOM Practice Hello World! Javascript/HTML DOM portion: var x = document.getElementById('txt'); var b = document.getElementById('box'); x.addEventListener('click',irt,false); b.addEventListener('click',irt,false); function irt(){ x.innerHTML="Goodbye world!"; b.style.padding="20px"; }

http://stackoverflow.com/a/26926685
type: AcceptedAnswer
upvote count: 2
has body: Seems like a bug in chrome please see: https://code.google.com/p/chromium/issues/detail?id=108012#c162 chrome canary doesn't suffer from it
type: Answer
has comment: http://stackoverflow.com/comment/42422439
accepted answer of: http://stackoverflow.com/q/26580844
downvote count: 0
answers question: http://stackoverflow.com/q/26580844
score: 2

http://stackoverflow.com/q/26589646
has answer: http://stackoverflow.com/a/26591141
has comment: http://stackoverflow.com/comment/41797677
has answer: http://stackoverflow.com/a/26590630
has body: I am currently working with a c# asp.net usercontrol in which I need a functional autocomplete. The script looks like it wants to run, as you can see; the progress bar spins, but it ALWAYS comes back 'Error'. I'm not sure what to do from here. I followed at least 5 different tutorials to get this working; the code mimics the code found here; but it doesn't seem to work when all is said and done. What am I missing? Any suggestions to get me where I need to be would be much appreciated. If any more information is needed let me know, but the entire code can be found below. HTML/Javascript <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search Textbox.ascx.cs" Inherits="StagingApplication.Search.Search_Textbox" %> Enter UserName: C# Code Behind using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Web.Services; using System.Web.Script.Services; namespace StagingApplication.Search { public partial class Search_Textbox : System.Web.UI.UserControl { #region Declarations static string dbSearch = "db string"; #endregion protected void Page_Load(object sender, EventArgs e) { } #region Methods and Functions [WebMethod, ScriptMethod] public static List<string> GetAutoCompleteData(string searchText) { List<string> result = new List<string>(); using (SqlConnection con = new SqlConnection(dbSearch)) { using (SqlCommand cmd = new SqlCommand("SELECT TOP 1000 [SearchTerm] FROM [Search].[dbo].[Cache] where AutoCompleteTerm = 0 and SearchTerm LIKE @SearchText + '%';", con)) { con.Open(); cmd.Parameters.AddWithValue("@SearchText", searchText); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { result.Add(dr["SearchTerm"].ToString()); } return result; } } } } }
has comment: http://stackoverflow.com/comment/41796777
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/14950578
upvote count: 1
has comment: http://stackoverflow.com/comment/41797729
has comment: http://stackoverflow.com/comment/41797600
downvote count: 1
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41801243
has comment: http://stackoverflow.com/comment/41796821
has comment: http://stackoverflow.com/comment/41796812
tagged with: javascript
has comment: http://stackoverflow.com/comment/41798021
has comment: http://stackoverflow.com/comment/41798606
has answer: http://stackoverflow.com/a/26604203
has title: C# ASP.Net autocomplete with Javascript/Json post not working
score: 0
has comment: http://stackoverflow.com/comment/41796616
has comment: http://stackoverflow.com/comment/41796710
answer count: 3
has comment: http://stackoverflow.com/comment/41796447
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/41796790
has comment: http://stackoverflow.com/comment/41796522
has comment: http://stackoverflow.com/comment/41797001
type: UnansweredQuestion

http://stackoverflow.com/comment/41785505
comment on: http://stackoverflow.com/a/26584876
score: 0
type: AnswerComment
has text: /^[\w!#$'*+=?^\/~-]+(\.[\w!#$'*+=?^\/~-]+)*@([a-zA-Z0-9-]+\.)+[A-Z]{2,4}$/.test("raju.rathi@gmail.com") - still i'm getting false when i ran this in java script console
type: Comment

http://stackoverflow.com/comment/41791346
comment on: http://stackoverflow.com/q/26587837
type: Comment
type: QuestionComment
has text: That's pretty vague.. UTF-8 is an *encoding* (variable byte-length) of Unicode *charset* (of which you want to exclude 'special characters').. Please, specify your needs further: what character(s/range(s)) are allowed, which character(s/range(s)) are dis-allowed?
score: 0

http://stackoverflow.com/a/26639246
has body: You can echo the data as json: echo json_encode($myArray); Then add dataType:'json' and access the properties by name in javascript: dataType: 'json', success: function(data) { var userAgent = data.userAgent; var name = data.name; var version = data.version; }
downvote count: 0
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/41885663
answers question: http://stackoverflow.com/q/26639117
upvote count: 3

http://stackoverflow.com/comment/41910588
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26653178
has text: I think only with JS/jquery

http://stackoverflow.com/q/26639709
has comment: http://stackoverflow.com/comment/41886631
has comment: http://stackoverflow.com/comment/41887275
has answer: http://stackoverflow.com/a/26640655
has comment: http://stackoverflow.com/comment/41886608
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26640584
score: 0
has body: I'm trying to add an image over some text that I have. This is similar to retailmenot.com's reveal coupon code. When a user clicks on the image the image is removed and reveals the text underneath while simultaneously linking the user to an external url. The base layer can be as follows: Some text I want to load an image with the following over it when the text is clicked: The height of the base layer with class "base" is variable, so the image has to be resized to fit it. I have a working example where I place the image and then resize it, but this creates issues when javascript may not be enabled as the image fails to be resized and looks messy. I want the script to fall back to just showing the underlying text if javascript is disabled. How can I add and automatically resize such an overlay on page load using jquery or javascript?
type: Question
has comment: http://stackoverflow.com/comment/41886663
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41886604
has title: Add image over text using jquery
has answer: http://stackoverflow.com/a/26640157
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41903470
type: Comment
comment on: http://stackoverflow.com/a/26649214
has text: Then you are stuck with option 1 (or at least trying to figure out what extra CSS to add in your own file to overcome that)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26623567
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41857042
has title: Sorting an array in Javascript starting with a specific string
score: 1
upvote count: 1
type: Question
has body: I would like to sort an array alphabetically starting with an option in a select. Here's my code: HTML Apples Oranges Peaches Pears Apples Peaches Pears Oranges Javascript document.getElementById('select').addEventListener('click', function() { var index; var fruit = ["Apples", "Oranges", "Pears", "Peaches"]; var listOutput = document.getElementById('fruits'); var text = " "; fruit.sort(); for (index = 0; index < fruit.length; index++) { text += " " + fruit[index] + " "; } text += " "; listOutput.innerHTML = text; }); I've been able to sort the fruit alphabetically, but I'd like to be able to sort alphabetically based on what is selected. For example, if I picked Oranges in the select I'd like the fruits to be output as so: Oranges Peaches Pears Apples I'd like to loop the array starting at the selected option alphabetically and once all the strings have been looped, start at the top of the alphabet and continue until all the strings have been output
has comment: http://stackoverflow.com/comment/41857115
tagged with: arrays
has comment: http://stackoverflow.com/comment/41857108
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/26634670
has answer: http://stackoverflow.com/a/26623605
answer count: 2
has comment: http://stackoverflow.com/comment/41857153
downvote count: 0
tagged with: string

titanium
tags question: http://stackoverflow.com/q/26563772
type: Tag
tags question: http://stackoverflow.com/q/26632124
tags question: http://stackoverflow.com/q/26541791
tag name: titanium
tags question: http://stackoverflow.com/q/26569451
tags question: http://stackoverflow.com/q/26548220
tags question: http://stackoverflow.com/q/26589127
tags question: http://stackoverflow.com/q/26519358
tags question: http://stackoverflow.com/q/26644612
tags question: http://stackoverflow.com/q/26550043
tags question: http://stackoverflow.com/q/26569121
tags question: http://stackoverflow.com/q/26570414
tags question: http://stackoverflow.com/q/26672326

http://stackoverflow.com/q/26556221
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41733962
has body: thanks to this script I can create as many input fields (in pair) as i want by clicking an add button. It works correctly. How you can see, for my convenience, all the input fields have the same ID, under the form of []. &lt;script&gt; $(document).ready(function() { $("#add").click(function() { var intId = $("#buildyourform div").length + 1; var fieldWrapper = $("&lt;div class=\"fieldwrapper\" id=\"field" + intId + "\"/&gt;"); var fName = $("&lt;input type=\"text\" name=\"quantita[]\" id=\"quantita[]\" placeholder=\"Dose\" tabindex=\"7\" class=\"field text small\" required&gt;"); var fType = $("&lt;input type=\"text\" name=\"ingrediente[]\" id=\"ingrediente[]\" placeholder=\"Ingrediente\" tabindex=\"7\" class=\"field text medium\" required&gt;"); var removeButton = $("&lt;input type=\"button\" class=\"remove\" value=\"-\" /&gt;"); removeButton.click(function() { $(this).parent().remove(); }); fieldWrapper.append(fName); fieldWrapper.append(fType); fieldWrapper.append(removeButton); $("#buildyourform").append(fieldWrapper); }); }); &lt;/script&gt; Now i would like to activate autocomplete on each of my input texts with family id=ingrediente[]. The values for autocomplete come from a mysql DB and a php file I have prepared works correctly. Here there's the activation script. &lt;script&gt; $(document).ready(function($){ $('#ingredienti[]').autocomplete({ source:'cerca.php', minLength:2 }); }); &lt;/script&gt; If i try 'cerca.php' on a simple input text in my form it works correctly but, as in the example, i try to use it with ingredienti[] it simply doesn't work. How could i fix the problem? Thank you! EDIT (AND SOLVED!) I added the following code to the script (at the bottom of course). var x = document.getElementsByClassName("medium"); $(x).autocomplete({ source:'cerca.php', minLength:2 });
has comment: http://stackoverflow.com/comment/41800580
answer count: 0
type: UnansweredQuestion
has title: jQuery autocomplete with dynamically added input field with the same ID
tagged with: php
has comment: http://stackoverflow.com/comment/41734192
has comment: http://stackoverflow.com/comment/41734323
tagged with: autocomplete
tagged with: mysql
type: Question

http://stackoverflow.com/q/26526121
has answer: http://stackoverflow.com/a/26534361
type: Question
tagged with: canvas
tagged with: javascript
score: 0
tagged with: image-size
accepted answer: http://stackoverflow.com/a/26534361
tagged with: html5-canvas
answer count: 1
has body: Can I scaling images in js/canvas using custom algorithm, like binary subdivison or another?
type: AnsweredQuestion
has title: Scaling images with js using binary subdivison algorithm

http://stackoverflow.com/a/79424837
has body: The JSON spec does not allow for undefined as a value, only null. However, if you really do desire a difference between null and undefined, and don't want to resort to a flaky hack (e.g. using a string literal to represent undefined), there is a really easy way to modify your JSON structure to achieve this almost for free: const hash = { "name": {"v": "boda"}, "email": {}, // <-- this is the value we want to be undefined "phone": {"v": null}, "country": {"v": "africa"} }; By simply wrapping every value with another JSON object with just one key (in this case v for "value"), we can introduce a difference between null and undefined, while still generating valid JSON. If now, we access each value, this already works exactly as expected! console.log(hash.name.v); // logs "boba" console.log(hash.email.v); // logs undefined console.log(hash.phone.v); // logs null console.log(hash.country.v); // logs "africa" This is because in the email case, there is no field named v, so JS returns undefined (as it does if you try to look up any named field that doesn't exist). Whereas in the null case, the field does exist and its value is null, so it returns null.
score: 0
answers question: http://stackoverflow.com/q/26540706
type: Answer

http://stackoverflow.com/comment/139197207
has text: Perfect for what I needed.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/57979882
score: 0

http://stackoverflow.com/comment/41777975
score: 0
type: Comment
type: QuestionComment
has text: only json_encode the final array after the loop. WHat part isn't working or what specific problems are you having?
comment on: http://stackoverflow.com/q/26580448

privacy
tags question: http://stackoverflow.com/q/26577513
tag name: privacy
type: Tag

http://stackoverflow.com/comment/41886378
has text: Altogether it may be more efficient to filter the array, but you won't notice unless you're dealing with many many nodes and links. It's kind of hard to tell because it's obviously related to what the force layout does internally as well when you modify vs reassign. I certainly wouldn't worry about it.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26635719

http://stackoverflow.com/comment/41716316
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26546525
has text: Thanks, if I understand correctly, in this case it is because of the method extend () no error is returned. If this method was not in the code then there would be an error. We should therefore have to add something like : `if(!options) return;` . As you say it is because the second argument to extend () false accept that there is no error and you do not have to pass an argument when calling to jqte () . So no need to add something like `if(!options) return;`
type: AnswerComment

http://stackoverflow.com/q/26630650
tagged with: javascript
has comment: http://stackoverflow.com/comment/41870045
has title: detect 404 error on page load
answer count: 2
has comment: http://stackoverflow.com/comment/43932780
downvote count: 0
has comment: http://stackoverflow.com/comment/85866248
has comment: http://stackoverflow.com/comment/43963849
favorite count: 0
has body: I am embedding a google map in my website and sometimes google responds with a 404 error. I know I should know this, but I can't remember and I cannot find it quickly. None of the other 404 iframe related questions on this site were ever answered. How do I check if there is a 404 response in javascript? I plan to call location.reload() when the response is 404. &lt;iframe src="https://mapsengine.google.com/map/embed?mid=zGLD-nMIJQAg.k0gTyNlOPz_Q" width="640" height="480"&gt;&lt;/iframe&gt; The error code is: GET https://khms0.googleapis.com/kh?v=159&amp;hl=en&amp;x=784456&amp;y=1636828&amp;z=22&amp;token=122715 404 (Not Found) I tried this: It didn't help. var url = 'https://mapsengine.google.com/map/embed?mid=zGLD-nMIJQAg.k0gTyNlOPz_Q'; if (url.statusCode === '404'){ window.location.reload(); }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/85919111
has comment: http://stackoverflow.com/comment/41870974
has comment: http://stackoverflow.com/comment/41869671
tagged with: http-status-code-404
score: 14
upvote count: 14
has answer: http://stackoverflow.com/a/43027069
has comment: http://stackoverflow.com/comment/41869877
linked to: http://stackoverflow.com/q/23713982
type: Question
has answer: http://stackoverflow.com/a/26631181
has comment: http://stackoverflow.com/comment/41870926

http://stackoverflow.com/comment/42128831
score: 0
has text: Welcome to StackOverflow. This is not an answer to your original question. You should **edit** your original question to provide the additional information, and then delete this
type: Comment
comment on: http://stackoverflow.com/a/26682046
type: AnswerComment

http://stackoverflow.com/comment/41916040
type: AnswerComment
has text: OK thanks, it works. CSS and jQuery together do the trick and solve my problem. Anyway the purpose of my question was to look for a "native" Highcharts solution...
comment on: http://stackoverflow.com/a/26651860
type: Comment
score: 0

http://stackoverflow.com/comment/42029309
type: Comment
comment on: http://stackoverflow.com/a/26719462
has text: You're redefining the $scope.getSourceValue in every ajax call. Move it to the outside scope and prefer using the 'this' aproach, put in $scope only if the function is shared with the child controllers. Other tip, the controller is the resposible for controlling the model<->view interation. Put the logic and data resources gathering into a service. :)
type: AnswerComment
score: 1

http://stackoverflow.com/a/26667252
downvote count: 0
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26640727
has body: I got the answer. window.cordova is exposed in Phonegap Build. So I check for the existence of this, with in the jQuery $(document).ready like this: if ( !!window.cordova ) { // phonegap script has loaded so have our // initializeApplication called when the device is ready document.addEventListener("deviceready", initializeApplication, false); } else { // running in browser without phonegap so // manually call initializeApplication initializeApplication(); } function initializeApplication() { // do everything here to initialize the // application and its UI }
answers question: http://stackoverflow.com/q/26640727
type: AcceptedAnswer

http://stackoverflow.com/comment/41773766
type: Comment
has text: @Heather Well no. You shouldn't make a new topic for it as because one of the rules here is that we're not here to do your job for you. If you make a question, make sure you did your own research first and are able to show what you've tried yourself. Anyway. I'll edit my answer so it does what you need.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26552401

http://stackoverflow.com/comment/55404704
score: 0
type: Comment
has text: I added this , but still the problem is there. I am trying to call a self signed url.
comment on: http://stackoverflow.com/a/27238298
type: AnswerComment

http://stackoverflow.com/comment/41790209
type: QuestionComment
comment on: http://stackoverflow.com/q/26584280
has text: Exactly, how could I miss it? If you put it as an answer, I will mark it, thanks!
score: 0
type: Comment

http://stackoverflow.com/comment/41834673
type: Comment
has text: I couldn't catch any errors with the methods, however I checked in a browser console and there are some errors for third party libs but not for google-analytics for example.
score: 0
comment on: http://stackoverflow.com/q/26609498
type: QuestionComment

http://stackoverflow.com/comment/41717460
has text: Yes Manji, i see it duplicate now. Thank you. I got the answer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26547025
score: 0

http://stackoverflow.com/comment/41875797
type: Comment
comment on: http://stackoverflow.com/a/26632806
score: 0
type: AnswerComment
has text: Thanks. I think it's working, sort of. I added a localstorage to the wordCollection, but when I add a word to a listModel and I run this.words.fetch({reset:true}); all listModels get the same wordCollection from storage.

http://stackoverflow.com/q/26599923
downvote count: 0
has comment: http://stackoverflow.com/comment/41814176
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41814701
type: Question
has comment: http://stackoverflow.com/comment/41814362
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/41814066
has comment: http://stackoverflow.com/comment/41814348
tagged with: javascript
has comment: http://stackoverflow.com/comment/41814838
upvote count: 14
has title: .change() vs .on( "change", handler ) in jQuery
has body: I have an issue when I use jQuery to handle the trigger of change on my drop-down. I use 2 pieces of code: //---------- Case 1 $(document).on("change", "#drop-down-id", function () { alert(this.value); }); //----------Case 2 $("#drop-down-id").change(function () { alert(this.value); }); The first one running smoothly, but the second one is not triggered when I start the browser, but after I refresh my site, it works. Do you have any idea? My jQuery version: 1.11.1, and I've tested on Chrome 38, Firefox 32 and IE 11. -- Edit: @JanR &amp; Cheery: It seems like this: &lt;select id="drop-down-id"&gt; &lt;% arr.each do |option| %&gt; &lt;option value="&lt;%= option %&gt;"&gt;&lt;%= option %&gt;&lt;/option&gt; &lt;% end %&gt; &lt;/select&gt; I've used Rails 4.1 and arr is an array contains numbers. -- Edit: I found out that the issue came from the Asset Pipeline of Rails, not the jQuery. I put the JS code inside a script tag and it works in both case, but when I put it in the assets folder, the issue happens. Thank you for your quick replies!
has comment: http://stackoverflow.com/comment/41814186
answer count: 3
linked to: http://stackoverflow.com/q/9122078
has comment: http://stackoverflow.com/comment/41814693
has answer: http://stackoverflow.com/a/26599999
has comment: http://stackoverflow.com/comment/41814199
tagged with: jquery
has comment: http://stackoverflow.com/comment/41814095
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/54047420
has comment: http://stackoverflow.com/comment/41814167
has answer: http://stackoverflow.com/a/26600047
score: 14
has comment: http://stackoverflow.com/comment/41814510

http://stackoverflow.com/comment/41876801
comment on: http://stackoverflow.com/q/26634403
score: 0
has text: I really don't understand your example. You want to but `` tags around `lt`, so you end up with `&LT;`? Why would you want that? There's probably a better way than a regex or that function, but your intent is unclear.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26607111
has comment: http://stackoverflow.com/comment/41831309
has title: HTML5 can't create video element on Chromium 38
type: Question
has comment: http://stackoverflow.com/comment/41829138
has comment: http://stackoverflow.com/comment/41830603
has comment: http://stackoverflow.com/comment/41828356
tagged with: javascript
has comment: http://stackoverflow.com/comment/41829276
upvote count: 2
has comment: http://stackoverflow.com/comment/41826492
has comment: http://stackoverflow.com/comment/41826715
has comment: http://stackoverflow.com/comment/41827931
has comment: http://stackoverflow.com/comment/41828207
has comment: http://stackoverflow.com/comment/41905572
has comment: http://stackoverflow.com/comment/41827198
has comment: http://stackoverflow.com/comment/41826734
has body: Until Chromium 37, var videoElement = document.createElement('video') would create a video element, but with Chromium 38 it's not the case anymore. EDIT If you want to check this, open a console and type : var videoElement = document.createElement('video') videoElement.toString() This should return "[object HTMLVideoElement]" proving videoElement is a video element. In Chromium 38 I get : "[object HTMLUnknownElement]" Is there any way to fix this ? PS: I created an issue on chromium issues : https://code.google.com/p/chromium/issues/detail?id=427856
favorite count: 0
has comment: http://stackoverflow.com/comment/41832378
tagged with: html5-audio
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41826866
tagged with: chromium
has comment: http://stackoverflow.com/comment/41826609
score: 2
tagged with: video
has comment: http://stackoverflow.com/comment/41827433
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/41836855
type: QuestionComment
has text: Could you elaborate a bit more, I'm not sure where to start with that?
comment on: http://stackoverflow.com/q/26612517
score: 0
type: Comment

http://stackoverflow.com/a/26630159
type: Answer
upvote count: 2
score: 2
has body: The problem is that you are storing value as "true" in localStorage which is a string format, Now at time of loading the page value is retrieved as string and you are comparing that String "true" with boolean true. This will return false. One small change as if (checked == "true") now this should work.
downvote count: 0
answers question: http://stackoverflow.com/q/26628812

http://stackoverflow.com/a/26557101
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26556969
type: Answer
has body: How about this regular expression: /^([01]?\d|2[0-3])(:[0-5]\d){1,2}$/ The sub-expression [01]?\d|2[0-3] will accept 0, 1, ... 9, 10, ..., 22, 23 and 00, 01, ... is that what you want or do you not want leading zeros for the hour? In that case use: /^(1?\d|2[0-3])(:[0-5]\d){1,2}$/
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26556969
has comment: http://stackoverflow.com/comment/41735513

http://stackoverflow.com/comment/41731043
type: AnswerComment
has text: @caeth oh! yeah this works great. Sorry, I saw what I wanted to see apparently.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26551397

http://stackoverflow.com/q/26607013
type: UnansweredQuestion
score: 0
tagged with: wordpress
tagged with: php
has comment: http://stackoverflow.com/comment/41826669
type: Question
has comment: http://stackoverflow.com/comment/41826583
has comment: http://stackoverflow.com/comment/41826356
tagged with: javascript
tagged with: jquery
has title: PHP Multi-Level Menu for Wordpress
tagged with: css
has body: I am trying to style a multi-level menu for a Wordpress site. I have the HTML and CSS code, also a JS onclick toggle for the lower level menus. I've tried following guides on the internet but it doesn't work as I'd like since I want my second/lower level menus to appear on click and not on hover. Here is the HTML code: Home Fast Checks Link Number One Link Number Two Link Number One Link Number Two Link Number Three Link Number Three Link Number Four Recover Profile ProfileHub Try It Free Login
answer count: 0

http://stackoverflow.com/q/26571582
tagged with: arrays
accepted answer: http://stackoverflow.com/a/26571648
tagged with: compare
has body: i have two array. And i want update second array with first array data if found same data. Here is my first array : var namaFile = [ { billingID: "90009388", customerID: "C20121121221327_249", name: "201409011141106_082895250262" }, { billingID: "90009400", customerID: "7885000000007804", name: "201410201141125_08287045931" }, { billingID: "90009388", customerID: "C20121121221327_249", name: "201410011171208_082895250262" } ]; Here second array : var emailAddr = [ { customerID: "C20121121221327_249", email: "fanjavaid@gmail.com" }, { customerID: "7885000000007804", email: "arrosyad.fikri@sampoernatelekom.com" } ]; Here is my code, but won't work. for (var i = 0; i &lt; namaFile.length; i++) { var files = []; for (var j = 0; j &lt; emailAddr.length; j++) { if (namaFile[i].customerID == emailAddr[j].customerID) { files.push(namaFile[i].name); emailAddr[j]['files'] = files; } } } console.log(emailAddr); My expected result is like this : var emailAddr = [ { customerID: "C20121121221327_249", email: "fanjavaid@gmail.com", files : [ "201409011141106_082895250262","201410011171208_082895250262" ] }, { customerID: "7885000000007804", email: "arrosyad.fikri@sampoernatelekom.com", files : [ "201410201141125_08287045931" ] } ]; How to create that result? Thank you.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26571723
type: Question
has title: Update array when found same value in Javascript
has answer: http://stackoverflow.com/a/26571648
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26571651
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26571651

http://stackoverflow.com/q/26611685
has answer: http://stackoverflow.com/a/26611894
has title: How to trigger a modal view with Highcharts, when zoom is also enabled?
score: 0
answer count: 1
tagged with: javascript
has body: I have a webpage that displays a Highcharts chart that has zoom type 'x' enabled. The chart div is wrapped in a container div, like: &lt;div class='chart-container'&gt; &lt;div id='chart_0' class='chart'&gt;&lt;/div&gt; &lt;/div&gt; There is also an event handler attached to the "mouseup" event on the chart-container that switches the chart to a modal view by toggling the modalChart css class defined as: .modalChart { position: fixed; width: 100%; height: 100%; top: 0; left: 0; background: rgba(0, 0, 0, 0.7); z-index: 999999; } .chart { height: 300px; } .modalChart .chart { height: 90%; width: 90%; max-width: none; margin: 1em auto; } The event handler is defined as: $("body").on("mouseup", ".chart-container", function(){ $(this).toggleClass "modalChart" $(".chart", this).highcharts().reflow() }); The problem I'm having is that the mouseup event on the "chart-container" fires before the setExtremes event fires on the x-axis when zoom is occurring. So, the modal view is toggled every time the user uses the zoom functionality. How do I stop this from happening? I want the user to be able to zoom, without toggling the modal view, and be able to click on the chart to toggle the modal view.
accepted answer: http://stackoverflow.com/a/26611894
type: AnsweredQuestion
tagged with: highcharts
tagged with: jquery
type: Question
tagged with: css

http://stackoverflow.com/comment/41876727
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26634107
has text: Read the docs. Missing the X-UA-Compatible tag in head. Lots of redundant usage of the bootstrap grid. col-lg-3 col-md-3 col-sm-3 not necessary, only use col-sm-X will work from that breakpoint and up. Read up on the grid docs.
type: Comment

http://stackoverflow.com/a/26661841
has comment: http://stackoverflow.com/comment/42019889
has comment: http://stackoverflow.com/comment/41999349
type: Answer
answers question: http://stackoverflow.com/q/26659716
score: 2
has body: I would suggest using an inline function: public inline function set(key : String, value : Dynamic) Reflect.setField(this, key, value);
downvote count: 0
has comment: http://stackoverflow.com/comment/41945735
upvote count: 2
has comment: http://stackoverflow.com/comment/42049971

http://stackoverflow.com/comment/41933749
type: QuestionComment
has text: I think you're looking for something like this http://stackoverflow.com/questions/19012495/smooth-scroll-to-div-id-jquery Please post your code and we would be able to help you more
comment on: http://stackoverflow.com/q/26665763
score: 0
type: Comment

http://stackoverflow.com/comment/41694410
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26532032
has text: Use jQuery to bind an `onLoad` event listener rather than overwriting the entire `onLoad` function for the `window`.

http://stackoverflow.com/a/26662794
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26563329
has body: If you know locations where the NaNs propagate to, you could try to use program slicing to narrow down the other program statements that influence that value (through control and data dependences). These tools are usually non-trivial to set up, however, so I would try the Object.observe-style answers others are giving first. You might try WALA from IBM. It's written in Java, but has a Javascript frontend. You can find information on slicer on the wiki. Basically, if the tool is working you will give it a program point (statement) and it will give you a set of statements that the starting point is (transitively) control- and/or data-dependent on. If you know multiple "infected" points and suspect a single source, you could use the intersection of their slices to narrow down the list (the slice of a program point can often be a very large set of statements).

http://stackoverflow.com/comment/42032891
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26703266
has text: @MichailMichailidis In regards to optimality, I am claiming that your algorithm does not always return a minimal path with the least number of turns. For example, in case 3 of your post, you can find a minimal path with only two turn.

http://stackoverflow.com/q/26618893
accepted answer: http://stackoverflow.com/a/26618996
has answer: http://stackoverflow.com/a/27207100
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/58593900
type: Question
has body: Is there a way to include all the meta tag, link rel and script src includes in one file, and then require that file? The reason I ask is because I have like 10-15 lines that i am copying into every file and figured there might be another way. I put everything in one file and tried the Jquery load function, but to no avail. Thanks
has comment: http://stackoverflow.com/comment/41848777
has title: Put HTML head in another file
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/26618993
has answer: http://stackoverflow.com/a/26619074
has answer: http://stackoverflow.com/a/70250374
has answer: http://stackoverflow.com/a/26618996
linked to: http://stackoverflow.com/q/18712338
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/26619074
tagged with: header
favorite count: 0
score: 8
tagged with: include
upvote count: 8

http://stackoverflow.com/comment/42016966
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26606102
type: Comment
has text: How can I use the returned id value to write a mysql query using the code above? Something like... SELECT * FROM os WHERE scope='id' 'id' is the returned value from the radio button.. Any help will be greatly appreciated.

http://stackoverflow.com/a/26637548
has comment: http://stackoverflow.com/comment/41886466
has body: If you are tracking the form submission as an event, you would find that in your reports under Behaviour > Events. Just confirming though, your syntax is for classic Google Analytics. If you are using Universal Analytics, then the syntax would be this: onsubmit="ga('send', 'event', 'form', 'submitted', 'free first exam');" You may also want to read this post: Analytics.js Form onsubmit Event Tracking which gives you more information about form submissions in GA, as you may need to ensure that the event is sent before going to the conversion page. This is done using a hitCallback.
has comment: http://stackoverflow.com/comment/41883528
type: Answer
accepted answer of: http://stackoverflow.com/q/26636823
answers question: http://stackoverflow.com/q/26636823
has comment: http://stackoverflow.com/comment/41886311
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/41766676
score: 0
has text: When you say it doesn't work when 'combining the files manually' , does that include minifying ? Normally you need to use angular's inline annotations or use a minifier that is angular aware for dependency injection to work.
comment on: http://stackoverflow.com/q/26574462
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26660545
answers question: http://stackoverflow.com/q/26657511
type: Answer
has body: You can read from external storage in a webview if you point the baseUrl to the file system with file://path_to_folder. String localPath = "file://" + kmlmo.path; // full path to some folder in file system. wv.loadDataWithBaseURL(localPath, myHtml, "text/html","UTF-8", ""); Watch out now the relative urls in your html and javascript will also point to the file system so anything you have to get from the web has to have the complete http path. &lt;img src="http://www.example.com/images/fish.jpg" /&gt; where on the interweb you would code the image as &lt;img src="images/fish.jpg" /&gt;
has comment: http://stackoverflow.com/comment/41923083
score: 0

http://stackoverflow.com/q/26550963
tagged with: javascript
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26551801
has title: Triggering custom events in backbone.js
score: 2
type: AnsweredQuestion
tagged with: backbone-events
upvote count: 2
has answer: http://stackoverflow.com/a/26551677
accepted answer: http://stackoverflow.com/a/26551801
has body: I am trying to better structure my events in backbone. Currently I have one view communicating with another by triggering events within a function, and listening for events in another function, like: //childView triggerFilterChange: function(e){ Backbone.trigger('filterChange',activeFilters); } //parentView initialize: function(){ Backbone.on('filterChange', this.onFilterChange, this); }, onFilterChange:function(filters){ //DO STUFF } This works, however, I would like to make it more clear in my child view what events should be expected, rather than just triggering something from a random function somewhere buried within the view. For example, all of my click events for the child view are clearly delineated at the top of the page: define([ 'jquery', 'underscore', 'backbone', ], function($, _, Backbone){ var ProductsFiltersView = Backbone.View.extend({ events : { "click .filter-options-container" : "filterOptionContainerClick", "click .filter-option" : "filterOptionClick", }, So my question is, is there a way to put custom events into this events object? Or some structure similar to this, so you know at the top of the view what events might be triggered? Like: events : { "click .filter-options-container" : "filterOptionContainerClick", "click .filter-option" : "filterOptionClick", "filterChange" : "doFilterChange" }, doFilterChange: function(){ Backbone.trigger('parentFilterChange',activeFilters); }
type: Question
possible better answer: http://stackoverflow.com/a/26551677
tagged with: backbone-views
has comment: http://stackoverflow.com/comment/41724312
answer count: 2
downvote count: 0

http://stackoverflow.com/q/26554911
has answer: http://stackoverflow.com/a/26595451
accepted answer: http://stackoverflow.com/a/26563618
type: AnsweredQuestion
has body: I'm used to simulating mouse clicks in Javascript like so: var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, document.view, 1, 1492, 398, 1308, 274, false, false, false, false, 0, null); var element = document.getElementById("x:1430424820.87:chkState:0"); element.dispatchEvent(evt); While this does dispatch the click event, initMouseEvent() doesn't set the 'buttons' attribute of the MouseEvent interface described in DOM 3: [Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] interface MouseEvent : UIEvent { readonly attribute long screenX; readonly attribute long screenY; readonly attribute long clientX; readonly attribute long clientY; readonly attribute boolean ctrlKey; readonly attribute boolean shiftKey; readonly attribute boolean altKey; readonly attribute boolean metaKey; readonly attribute short button; readonly attribute EventTarget? relatedTarget; // Introduced in DOM Level 3 readonly attribute unsigned short buttons; boolean getModifierState (DOMString keyArg); }; Adding "evt.buttons = 1"... var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, document.view, 1, 1492, 398, 1308, 274, false, false, false, false, 0, null); evt.buttons = 1; var element = document.getElementById("x:1430424820.87:chkState:0"); element.dispatchEvent(evt); ...has no effect. Does anyone know how to do it?
has answer: http://stackoverflow.com/a/26563618
type: Question
tagged with: dom3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26595451
tagged with: mouseevent
has title: Is there any way of setting the buttons attribute of MouseEvent in Mozilla?
score: 0
answer count: 2

http://stackoverflow.com/a/26664698
has body: Hmm how about a shared controller then? A wrapper controller which has this function: $scope.showTooltip= function($index) { $scope.hoveredIndex = $index; } And in your tooltip directive do: &lt;wa-tooltip ng-repeat="page in pages" ng-class="{on: $index === hoveredIndex}"&gt; Will that work for you?
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26664588
has comment: http://stackoverflow.com/comment/41931356
answers question: http://stackoverflow.com/q/26664588
has comment: http://stackoverflow.com/comment/41931338
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41931127

http://stackoverflow.com/comment/74567725
comment on: http://stackoverflow.com/q/26646096
score: 0
type: Comment
type: QuestionComment
has text: Possible duplicate of [Storing Objects in HTML5 localStorage](http://stackoverflow.com/questions/2010892/storing-objects-in-html5-localstorage)

http://stackoverflow.com/a/26669361
upvote count: 4
downvote count: 0
has body: The closest equivalent in Javascript is an 'object'. There are two ways you can create and use them, demonstrated below. Simple example, using an object literal var xyz = { age: 42, name: 'fred' }; More complex example, using a Javascript 'class' (really function) function xyz(age, name) { this.age = age; this.name = name; this.getAge = function() { return age; } } var myXyz = new xyz(42, 'fred'); myXyz.getAge(); // Returns 42
has comment: http://stackoverflow.com/comment/116827848
score: 4
answers question: http://stackoverflow.com/q/26669226
type: Answer

http://stackoverflow.com/comment/41846398
comment on: http://stackoverflow.com/q/26617254
score: 0
has text: Well, this option is not available, sadly :( Updated first post
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41662272
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26516033
has text: Also I've found this solution, which i belive should do the trick: http://www.javascriptcookbook.com/article/Preserving-variables-inside-async-calls-called-in-a-loop
score: 0

http://stackoverflow.com/comment/42127702
has text: A hug Thanks to @Lars Kotthoff, here's where Ive got to in the end [fiddle](http://jsfiddle.net/yeQS2/288/)
score: 0
comment on: http://stackoverflow.com/q/26582766
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26561063
has answer: http://stackoverflow.com/a/26561143
accepted answer: http://stackoverflow.com/a/26561143
tagged with: eval
has body: I am trying to accomplish something like in : eval() with variables from an object in the scope The correct answers suggests using the "with" keyword, but I can't find any examples of someone actually using "with". Can someone explain how to pass multiple variables using "with" into an "eval" expression like in the link above ?
linked to: http://stackoverflow.com/q/4359639
has title: How to pass multiple variables into an "eval" expression using "with"?
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/50933904
type: AnswerComment
comment on: http://stackoverflow.com/a/27693136
type: Comment
score: 2
has text: I'm using react-rails so moving script tag to bottom of body tag was not an option. `$(document).ready` solved the problem. Oh and yes use `render` instead of `renderComponent`.

http://stackoverflow.com/q/26618627
tagged with: css
tagged with: namespaces
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27336744
accepted answer: http://stackoverflow.com/a/27336744
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26619028
answer count: 2
has title: Namespacing the Bootstrap and Foundation CSS frameworks
tagged with: javascript
has body: I'm injecting the Foundation CSS framework into an existing project. Many of Foundation's class names conflict with classes in the underlying code. How can I encapsulate the Foundation JavaScript and CSS files in their own namespace? These are the specific files that cause the conflicts: foundation.css foundation.js foundation.reveal.js I'm using Foundation v5. I've added the twitter-bootstrap tag to this question because I've also tried to put the Bootstrap CSS and JavaScript files in their own namespace (e.g., with these instructions), but with no success. I suspect that the right namespacing approach would work for both Foundation and Bootstrap.
tagged with: zurb-foundation
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26619028
tagged with: twitter-bootstrap

http://stackoverflow.com/a/26619194
has comment: http://stackoverflow.com/comment/41849496
score: 0
has comment: http://stackoverflow.com/comment/41849334
type: Answer
has comment: http://stackoverflow.com/comment/41849422
has comment: http://stackoverflow.com/comment/41849641
answers question: http://stackoverflow.com/q/26618997
has body: The issue is that you are binding an event handler, but you are not preventing the form from submitting like the default behavior. You can fix this by adding return false; at the end of the event handler, but there are better ways (search google for jQuery prevent form submit). You also need to bind $('#register').submit instead of $("#registerSubmit").click (this makes the enter button work as well)
has comment: http://stackoverflow.com/comment/41849654
has comment: http://stackoverflow.com/comment/41849817

http://stackoverflow.com/comment/41935423
comment on: http://stackoverflow.com/a/26666679
score: 0
type: AnswerComment
has text: This works well as a standalone, but if I place inside my 'if' statement, as above it doesn't. Am I missing something on syntax on inserting into the 'if' ? Tx
type: Comment

http://stackoverflow.com/comment/41797138
score: 0
has text: Thanks for the feedback/answers! I think I get it now. Looks like the gist of it is that the element simply isn't in the DOM when I'm trying to access the height.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26557551

http://stackoverflow.com/q/26591789
has title: js not working with onsubmit
tagged with: onsubmit
type: Question
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41800859
tagged with: javascript
has body: Seen a lot of posts about this subject but nothing seems to work for me: Test Impromptu States Survey some code..... If I click on the link the js script runs fine and opens the prompt window, however when I click the submit button that's attached to the form the script doesn't run. I checked the database and see that the php script is running fine. Can anyone please explain why the js script is not running and a way to fix it. Thanks
has comment: http://stackoverflow.com/comment/41798482
has answer: http://stackoverflow.com/a/26591880
has answer: http://stackoverflow.com/a/26591867
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26612661

http://stackoverflow.com/q/26569986
favorite count: 0
has answer: http://stackoverflow.com/a/26570142
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/26570142
type: AnsweredQuestion
score: 2
has body: I am attempting to set a property to the value of a model's async, hasMany relationship. But I'm not able to return any value within the then function. App.Athlete = DS.Model.extend({ name: DS.attr('string'), age: DS.attr('number'), splits: DS.hasMany('split', {async: true}), times: DS.hasMany('time', {async: true}), }); App.Time = DS.Model.extend({ athlete: DS.belongsTo('athlete', {async:true}), race: DS.belongsTo('race', {async: true}), time: DS.attr('string'), }); App.Split = DS.Model.extend({ distance: DS.attr('string'), time: DS.attr('string'), athlete: DS.belongsTo('athlete', {async:true}), race: DS.belongsTo('race', {async: true}), }); My issue lies in an ObjectController for an Athlete where I am attempting to set the Time hasMany array as a property. Outside of the then callback function I am able to return values normally. However, within the then callback, all values return undefined/not at all. In addition, using console.log I am consistently able to see that the code is being executed. Here is that method: time: function() { var raceid= '1'; this.get('times').then(function(times) { // returns undefined in this scope console.log(times.get('length')); // consistently displays times.forEach(function(time) { time.get('race').then(function(timerace) { if(timerace.get('id')===raceid) { console.log('match'); // consistently diplays console.log(time.get('time')); // consistently displays return time.get('time'); // returns undefined/not at all } }); }); }); }.property('time.@each.time'), While the above function always returns undefined, the function below (a part of the same controller) works consistently without error. sortedSplits: function(){ var self = this, raceid = '1', splits = this.get('splits'); // filter each split by race this.get('splits').filter(function(split) { // retrieve race split belongsTo split.get('race').then(function(race) { // compare race return race.get('id') === thisrace; }); }); splits = splits.sortBy('m'); return splits; // returns…
downvote count: 0
has title: Ember async computed property returns undefined
type: Question
tagged with: indexeddb
tagged with: ember-data
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/22088746
answer count: 1

http://stackoverflow.com/comment/41780496
comment on: http://stackoverflow.com/q/26582107
score: 0
type: QuestionComment
has text: You should set the `dataType` to json.
type: Comment

http://stackoverflow.com/q/26658856
type: UnansweredQuestion
tagged with: handlebars.js
has title: Handlebars: objects with functions and the each helper
has comment: http://stackoverflow.com/comment/41920534
has body: I have an object like this, with a private array and public method to get it. var obj = function(){ var fooArray = ["b","a","r"]; var fooVar = "bar"; this.getFooVar = function(){ return fooVar; } this.getFooArray = function(){ return foo; } } And I will pass a new instance of that function as context to a handlebars template. In order to read the public getFooVar I had to write a handlebars helper: Handlebars.registerHelper('getParam', function(model,param){ if(typeof model == "undefined"){ return ''; } return model['get'+ucfirst(param)](); }); So now I can {{getParam fooObject 'fooVar'}} // outputs "bar" But what if I wanted to iterate over the fooArray? I've explored setting variables inside of handlebar templates, which seems like a no go. I've reviewed the source each helper function, but it is too complex for me. I've done some research, now I need some help. How to iterate over a object's function result in handlebars.js?
has comment: http://stackoverflow.com/comment/41919984
type: Question
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41920058
has answer: http://stackoverflow.com/a/75675033
has comment: http://stackoverflow.com/comment/41920129

cookies
tags question: http://stackoverflow.com/q/26647547
tags question: http://stackoverflow.com/q/26533079
tags question: http://stackoverflow.com/q/26579066
tags question: http://stackoverflow.com/q/26553728
tags question: http://stackoverflow.com/q/26633397
tags question: http://stackoverflow.com/q/26597979
tags question: http://stackoverflow.com/q/26561048
type: Tag
tags question: http://stackoverflow.com/q/26549189
tags question: http://stackoverflow.com/q/26573894
tags question: http://stackoverflow.com/q/26645271
tags question: http://stackoverflow.com/q/26647050
tags question: http://stackoverflow.com/q/26568496
tags question: http://stackoverflow.com/q/26630373
tags question: http://stackoverflow.com/q/26613617
tag name: cookies
tags question: http://stackoverflow.com/q/26537249
tags question: http://stackoverflow.com/q/26533541

http://stackoverflow.com/a/26522994
answers question: http://stackoverflow.com/q/26517452
upvote count: 2
has comment: http://stackoverflow.com/comment/87666587
downvote count: 0
has body: You need to use the endpoint /{video_id} instead of /video/{video_id} This is clearly stated in the docs at https://developers.facebook.com/docs/graph-api/reference/v2.1/video/ You code needs to be function getVideo(id) { FB.api("/"+id, function (response) { if (response &amp;&amp; !response.error) { alert(response); } }); }
type: Answer
score: 2

http://stackoverflow.com/q/26644661
has comment: http://stackoverflow.com/comment/41895392
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41895384
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/26644771
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26644771
tagged with: jquery
has answer: http://stackoverflow.com/a/26645123
has comment: http://stackoverflow.com/comment/41895491
answer count: 3
has comment: http://stackoverflow.com/comment/41895457
has comment: http://stackoverflow.com/comment/41895513
has title: Element or $(element) in a directive
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26645123
has body: In a lecture Deep dive into custom directives Dave Smith gives an example: .directive('selectAll', function () { return { restrict: 'A', link: function( scope, element ) { element.mouseup( function ( event ) { event.preventDefault(); } ); element.focus( function () { element.select(); } ); } }; }) but as a result I have an error: TypeError: undefined is not a function at link (http://localhost:8080/modules.html:108:21) at invokeLinkFn (http://localhost:8080/lib/angular.js:8111:9) at nodeLinkFn (http://localhost:8080/lib/angular.js:7623:11) at compositeLinkFn (http://localhost:8080/lib/angular.js:6991:13) at compositeLinkFn (http://localhost:8080/lib/angular.js:6994:13) at publicLinkFn (http://localhost:8080/lib/angular.js:6870:30) at http://localhost:8080/lib/angular.js:1489:27 at Scope.$eval (http://localhost:8080/lib/angular.js:14123:28) at Scope.$apply (http://localhost:8080/lib/angular.js:14221:23) at bootstrapApply (http://localhost:8080/lib/angular.js:1487:15) When I put $(element) instead of element everything is fine: .directive('selectAll', function () { return { restrict: 'A', link: function( scope, element ) { $(element).mouseup( function ( event ) { event.preventDefault(); } ); $(element).focus( function () { $(element).select(); } ); } }; }) 2 questions: why? and how to make the first behavior a default?
has answer: http://stackoverflow.com/a/26645410
type: AnsweredQuestion

http://stackoverflow.com/a/31438898
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26538945
type: Answer
has body: I ran into the same dilemma, whether to use a controller or a service. It feels to me that a service is a slightly better solution, since the controller for the popup is already wrapped within ionicPopup function. (I.e. i'm not writing the controller, i just delegate to ionicPopup) So I fixed it for now by injecting rootScope into the service and create the scope myself: return { showPopup: function () { var $scope = $rootScope.$new(); $scope.data = {}; Still it feels awkward to have UI stuff within a service, so i'm open for alternatives. Stephan
score: 1

http://stackoverflow.com/a/26654449
has comment: http://stackoverflow.com/comment/41912251
type: Answer
upvote count: 4
has body: This is because black colors will produce black result as black is 0 and as you know anything multiplied with 0 will remain 0 (dark greys will produce close to black values and so forth). To solve this you will have to add a brightness effect to the gray-scale image before setting its color (and potentially a slight contrast adjustment as well) to force the values up from 0. You could also push the pixels through a RGB-HSL/HSV conversion, adjust brightness (L/V) and then convert back to RGB. This is in principle the same as a linear brightness but with typically better result/quality in the end.
downvote count: 0
has comment: http://stackoverflow.com/comment/41919115
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26653584
score: 4
answers question: http://stackoverflow.com/q/26653584

http://stackoverflow.com/q/26657420
favorite count: 0
accepted answer: http://stackoverflow.com/a/26657556
has comment: http://stackoverflow.com/comment/41917042
has comment: http://stackoverflow.com/comment/41917232
tagged with: css
has comment: http://stackoverflow.com/comment/41917191
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26657556
has title: Generate multiple div in jquery loop
has body: I need to ask for help. Having this code: $(".apprezzamenti").click(function() { var id = $(this).attr('id'); $.get("http://localhost/laravel/public/index.php/apprezzamenti_modal/"+id, function(data) { data_parsed = JSON.parse(data); // BELOW is the loop that I would like to generate multiple div using .append() for(var i=0; i&lt;data_parsed.length; i++) { var html = '&lt;img src="images/provvisorie/immagine-profilo.png" width="30px" and height="30x" /&gt;'; html += ' '; html += "&lt;a href='http://localhost/laravel/public/index.php/utente/" + data_parsed[i].id_user + "' style='font-weight: bold;'&gt;" + data_parsed[i].username + "&lt;/a&gt;"; $(".modal-body-apprezzamenti&gt;p").append(html).append('.modal-body-apprezzamenti&gt;p').append($('&lt;br/&gt;')); } $(".chiudi-popup").click(function() { $(".modal-body-apprezzamenti&gt;p").html(''); }); $('#main').click(function() { $(".modal-body-apprezzamenti&gt;p").html(''); }); }); }); I'd like to create a div for each looping. How could I do? Thanks for your help.
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/41917084
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41917267
has comment: http://stackoverflow.com/comment/41917177

http://stackoverflow.com/comment/41778706
type: QuestionComment
comment on: http://stackoverflow.com/q/26580448
has text: console wont display anyting even console.log("test"); wont work
score: 0
type: Comment

http://stackoverflow.com/comment/41684384
type: AnswerComment
score: 0
type: Comment
has text: In addition I think that's a good question, because it shows DOM has a bug. It must not deliver a wrong HTML-Code as a result of because after "p" follows "ol".
comment on: http://stackoverflow.com/a/26527982

http://stackoverflow.com/q/26601069
tagged with: css
has title: Node server is returning rotated images when I use background-image
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/41816952
type: Question
tagged with: javascript
tagged with: image
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41817096
has body: I have an application with node.js, and some images are stored in the server, but for some reason, when I search the image in my browser, looks good like: http://myurl.com/uploads/40884269-6854-9480-1a38-dc5744ad5d62.jpg but when I use the same image but with a css rule like: the image is rotate. How I can fix it?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41816908
has comment: http://stackoverflow.com/comment/41817173

http://stackoverflow.com/comment/41835507
type: AnswerComment
has text: Nonononono, don't *ever* use `sort` with `Math.random()` to shuffle an array. The result [**is not random**](http://sroucheray.org/blog/2009/11/array-sort-should-not-be-used-to-shuffle-an-array/). Use the [Fisher-Yates shuffle](http://stackoverflow.com/a/962829/477563) instead.
type: Comment
comment on: http://stackoverflow.com/a/26611742
score: 1

http://stackoverflow.com/comment/41891759
has text: See the "Opt-in functionality" warning box on http://getbootstrap.com/javascript/#tooltips : "For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning **you must initialize them yourself**."
comment on: http://stackoverflow.com/a/26632019
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26588426
has answer: http://stackoverflow.com/a/26590599
type: Question
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has body: in the link on bottom I put my google map, i have problem because when i'm clicking on marker, that take me only last data from localization string. http://bit.ly/1tYVIdZ can you help me ?
has title: google map api with street view in infowindow not working

http://stackoverflow.com/comment/41815483
has text: @inktoofay: The _googleWcmGet is working and the second function which is calling a google map. The google map isn't showing on any page.
type: Comment
comment on: http://stackoverflow.com/q/26600633
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41961282
comment on: http://stackoverflow.com/a/26664304
has text: Look at what my select2 is doing, then go to the github page, type in an option, and see what it does. Select2 is supposed to highlight the most relevant option when you type (aka the keyup/keypress events). I'm not looking for default highlighting. Please read my question again
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26595866
has comment: http://stackoverflow.com/comment/41813177
type: Question
answer count: 2
has body: Let's say I'm shooting for some basic inheritance in my application, I could achieve this by setting the prototype of my child to the parent. // Parent "class" var Car = function(year) { this.year = year; }; Car.prototype.drive = function() { console.log('Vrooom'); }; // Child "class" var Toyota = function() { Car.apply(this, arguments); }; Toyota.prototype = Car.prototype; var myCar = new Car(2010), myToyota = new Toyota(2010); myCar.drive(); // Vrooom myToyota.drive(); // Vrooom Seems to work, but is obviously bad because if I set a new method on my Toyota.prototype, it will be set on Car's prototype. Toyota.prototype.stop = function() { console.log('stooop'); }; myCar.stop(); // stooop &lt;--- bad myToyota.stop(); // stooop &lt;--- good To solve this, instead of Toyota.prototype = Car.prototype; I can add an intermediary: var ctor = function() { }; ctor.prototype = Car.prototype; Toyota.prototype = new ctor(); Toyota.prototype.stop = function() { console.log('stooop'); }; myCar.stop(); // throws undefined error &lt;--- good myToyota.stop(); // stooop &lt;--- good But I don't understand why this works. ctor creates a new instance with its prototype set to Car's prototype, and then Toyota sets its prototype to that new instance. But why create an empty object with a prototype that gets referenced by Toyota's prototype? Why doesn't setting a new method on Toyota set it on Car like it does in the first example? What if I want several layers of inheritance, it seems like I need to glue them together with a new ctor every time?
downvote count: 0
possible better answer: http://stackoverflow.com/a/26597263
tagged with: javascript
tagged with: inheritance
tagged with: prototype
has answer: http://stackoverflow.com/a/26597766
accepted answer: http://stackoverflow.com/a/26597766
has comment: http://stackoverflow.com/comment/41812330
duplicate of: http://stackoverflow.com/q/17392857
favorite count: 0
has comment: http://stackoverflow.com/comment/41811938
has answer: http://stackoverflow.com/a/26597263
has title: Safely inheriting prototypes in JavaScript
linked to: http://stackoverflow.com/q/16063394
type: AnsweredQuestion
tagged with: prototypal-inheritance
score: 1
linked to: http://stackoverflow.com/q/17392857
has comment: http://stackoverflow.com/comment/42260433
has comment: http://stackoverflow.com/comment/41811921
upvote count: 1

http://stackoverflow.com/a/26655962
score: 1
answers question: http://stackoverflow.com/q/26653851
upvote count: 1
type: Answer
has body: You can do that easily in javascript. Follow the attached example. After getting that value from javascript post that time to serverside, and get that in serverside if you need there. function gettime() { var vid = document.getElementById("vid"); alert(vid.duration); } &lt;video width="320" height="240" controls id="vid"&gt; &lt;source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4"&gt; &lt;source src="http://www.w3schools.com/html/mov_bbb.ogg" type="video/ogg"&gt; Your browser does not support the video tag. &lt;/video&gt; &lt;br/&gt; &lt;input type="button" value="Get Total Time" onclick="gettime();" /&gt;
downvote count: 0

http://stackoverflow.com/comment/41922618
comment on: http://stackoverflow.com/q/26660101
has text: Do you mean it shouldn't append anything on click of "1" if hide was already clicked (and append 1 on click of "1" if show was already clicked)? Or hide text field completely?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41738717
type: AnswerComment
has text: I've added a simpler version.
comment on: http://stackoverflow.com/a/26558842
score: 0
type: Comment

http://stackoverflow.com/comment/41760235
score: 0
type: AnswerComment
type: Comment
has text: When you call `function(j) { console.log(j); }(i) <--` here you have executed the function. Immediately running it. What you really want, is to have `setTimeout` execute it *for you*. In order to do that, you need to pass it a function as a parameter. Returning a function from your closure, tells `setTimeout` to execute that function once the delay has been hit
comment on: http://stackoverflow.com/a/26570842

http://stackoverflow.com/q/26552105
has title: Is it possible to add a key attribute after a React component is instantiated?
upvote count: 2
has body: This example is contrived, but it gets at what I need to do. Say I have an existing component like this: var c1 = React.DOM.p( {} ); And later I need to use this component in the context of an array, like this: var container = React.DOM.div( {}, [ c1, c2 ] ); This will create a div with child components of c1 and c2, but React complains about the lack of a key attribute on the items in the array passed to the div function. Is it possible to first add a key to the already-existing c1 component prior to passing it to the container? I do realize it could be set when c1 is first created, but I need to do it afterwards. I'm looking through the React methods and addons and not seeing anything that addresses this case.
answer count: 2
has answer: http://stackoverflow.com/a/26552446
type: UnansweredQuestion
tagged with: reactjs
score: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26552636
favorite count: 0
type: Question

http://stackoverflow.com/q/26521750
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41672364
answer count: 1
downvote count: 1
has body: In my JSP page, I set select option 'selected' by value using JS like: e is:sele ruby saab nrro The result is: option saab is selected, but the browser show ruby (default selected).
favorite count: 0
has title: How to select option by index
upvote count: 0
has comment: http://stackoverflow.com/comment/41672348
has answer: http://stackoverflow.com/a/26521804
type: UnansweredQuestion
score: -1

http://stackoverflow.com/comment/50250239
type: Comment
has text: This is in my opinion a fully legitimate question. Using Angular result in the creation of extraneous dom node that serve no semantic purpose (ng-include, etc). This breaks separation of concerns, and makes it impossible in css to rely on parent-child relationship, and siblings relationship.
type: QuestionComment
comment on: http://stackoverflow.com/q/26626905
score: 0

http://stackoverflow.com/comment/41927067
has text: This works great for my needs, however - at the risk of sounding ungrateful - I notice it doesn't work for values less that 1. I'm not complaining though, I don't need that behaviour.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26662224
type: Comment

http://stackoverflow.com/a/26529450
has body: Just a note: you should not use duplicate IDs (see #drivesize). IDs should be unique while classes can be reused. If you change your IDs, it can be easier to check. Here's a bit of jQuery that should allow you to check for if the box is checked. We will assume that you changed the 500GB ID to largeDrive, the Done button is hidden from view, and you have an event handler on the radio buttons. if ($('input#largeDrive').is(':checked')) { $('input#mappings').show(); //assuming it was hidden }
type: Answer
answers question: http://stackoverflow.com/q/26529220
accepted answer of: http://stackoverflow.com/q/26529220
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26641024
upvote count: 16
has answer: http://stackoverflow.com/a/47568862
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/78529513
has answer: http://stackoverflow.com/a/57662538
score: 16
possible better answer: http://stackoverflow.com/a/34604050
type: Question
has answer: http://stackoverflow.com/a/34604050
has answer: http://stackoverflow.com/a/29105005
tagged with: javascript
has title: How to get values from JQuery - IonRangeSlider?
has answer: http://stackoverflow.com/a/33345244
has answer: http://stackoverflow.com/a/35361163
has answer: http://stackoverflow.com/a/26654490
downvote count: 0
has answer: http://stackoverflow.com/a/66501420
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26654490
favorite count: 0
answer count: 9
tagged with: slider
has body: how can I get low and high values from ion.rangeSlider component by clicking a button? This is my jQuery code: &lt;script&gt; $(document).ready(function(){ $("#range_1").ionRangeSlider({ min: 10, max: 50, from: 10, to: 20, type: 'double', step: 1, prettify: true, hasGrid: false }); }); &lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $('#get_values').click(function(){ var low = $('#range_1').... ???; var high = $('#range_1').... ???; alert(low); }); }); &lt;/script&gt;

http://stackoverflow.com/comment/41797548
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26591268
type: Comment
has text: why when i try to serialize this Sun Apr 26 2015 00:00:00 GMT+0300 (Eastern Europe Daylight Time), it returns "2015-04-25T21:00:00.000Z" ? i wan't "2015-04-26T00:00:00.000Z"

http://stackoverflow.com/comment/41751877
score: 0
type: Comment
type: QuestionComment
has text: are you able to access table at all?
comment on: http://stackoverflow.com/q/26566226

http://stackoverflow.com/comment/41672536
comment on: http://stackoverflow.com/q/26521826
has text: have you tried...
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41759537
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26570525
has text: Can we use load similar way load function 'code' $( document ).ready(function() { $("#tab2").click(function(){ $('#mydiv').load('l.html'); }); });

http://stackoverflow.com/a/26607722
has comment: http://stackoverflow.com/comment/41858723
accepted answer of: http://stackoverflow.com/q/26605832
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26605832
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41860219
has body: If I do understand your aim properly, you are almost there. The only adjustment should be: .state('index.sub',{ views: { // instead of this // "viewB@index": { // we need thsi "viewB@": { template: "index.viewB" } } }) The reason is, that I expect that your ViewA and ViewB are both defined on the root level (index.html). And that's why the first state 'index' is correctly working, because it definition is: .state('index', { url: "", views: { // this is working "viewA": { // and this would be as well "viewA@": { template: "index.viewA" } } }) Other words, I expect both views are inside of root view, which name is empty string. That's why we can target both of them like: "viewA@": { "viewB@": { See: View Names - Relative vs. Absolute Names small cite: Behind the scenes, every view gets assigned an absolute name that follows a scheme of viewname@statename, where viewname is the name used in the view directive and state name is the state's absolute name, e.g. contact.item. You can also choose to write your view names in the absolute syntax. For example, the previous example could also be written as: .state('report',{ views: { 'filters@': { }, 'tabledata@': { }, 'graph@': { } } }) Notice that the view names are now specified as absolute names, as opposed to the relative name. It is targeting the 'filters', 'tabledata', and 'graph' views located in the root unnamed template. Since it's unnamed, there is nothing following the '@'. The root unnamed template is your index.html. There is updated plunker, with this state def: $urlRouterProvider.otherwise("/index/sub") $stateProvider .state('index', { url: "/index", views: { "viewA": { template: "index.viewA" } } }) .state('index.sub', { url : "/sub", views: { /* "viewB@index": { template: "index.viewB" }, */ "viewB@": { template: "index.viewB" } } }) The key is to define url or at least properly navigate to sub state index.sub
has comment: http://stackoverflow.com/comment/41857859

http://stackoverflow.com/comment/137121438
type: Comment
has text: related: to access the shadow DOM of a custom element, you would use `elem.shadowRoot` instead of `iframe.contentWindow.document`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/42907951

http://stackoverflow.com/a/26642557
has comment: http://stackoverflow.com/comment/41902196
has comment: http://stackoverflow.com/comment/41962997
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41920962
has body: If I understand correctly, you want to wait for some condition to become true, before running something. If so, this can be accomplished with a setTimeout loop. function waitFor(fnReady, fnCallback) { var check = function() { if (fnReady()) { fnCallback(); } else { setTimeout(check, 100); // wait another 100ms, and try again } }; check(); } var result = 0; function ajaxRequest1() { $.ajax(...).done( function() { result++; } ); } function ajaxRequest2() { $.ajax(...).done( function() { result++; } ); } waitFor(function() { return result === 1; }, ajaxRequest2); waitFor(function() { return result === 2; }, ajaxRequest3);
accepted answer of: http://stackoverflow.com/q/26642013
score: 1
has comment: http://stackoverflow.com/comment/41902340
answers question: http://stackoverflow.com/q/26642013

http://stackoverflow.com/comment/41823769
comment on: http://stackoverflow.com/a/26583577
type: Comment
has text: And the index.jade should be modified:block append content
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41742303
type: QuestionComment
has text: Try wrapping the script for the second page in a `$(document).ready();` function
comment on: http://stackoverflow.com/q/26560872
score: 0
type: Comment

http://stackoverflow.com/a/26665715
has comment: http://stackoverflow.com/comment/41933453
upvote count: 1
has comment: http://stackoverflow.com/comment/41933980
has body: You don't need tag there as you are already in php block.Try it without and use showHide(\''.$row['ingredient_id'].'\') and change &lt;?php include_once(....); to include_once(........); Hopefully that would work
has comment: http://stackoverflow.com/comment/41933644
answers question: http://stackoverflow.com/q/26665639
score: 1
has comment: http://stackoverflow.com/comment/41933668
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41821582
has text: Okay, but how can I do this?
comment on: http://stackoverflow.com/a/26604362
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41792484
has text: Ajax request is executed asynchronously. `.then()` will be executed on ajax success/fail. `console.log()` will be execute **before** ajax is completed. So there is no wonder `msg` is "doesnt work". Read in the Internet about asynchronous programming in JavaScript.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26588702
score: 0

http://stackoverflow.com/comment/41908970
comment on: http://stackoverflow.com/q/26652812
has text: Sounds like you may already be doing so, but using a [breakpoint](https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints) is going to be the most effective way to do this in Chrome. If you cannot check the values of other variables, that may be an indication that there is a deeper problem.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/33841999
type: Answer
answers question: http://stackoverflow.com/q/26575018
score: 0
upvote count: 1
downvote count: 1
has body: At the bottom of this post is my JavaScript implementation of PHP's array_column(). No jQuery needed. Example usage: var records = [ {id: 2135, first_name: 'John', last_name: 'Doe'}, {id: 3245, first_name: 'Sally', last_name: 'Smith'}, {id: 5342, first_name: 'Jane', last_name: 'Jones'}, {id: 5623, first_name: 'Peter', last_name: 'Doe'} ]; var first_names = arrayColumn(records, 'first_name'); // => ["John", "Sally", "Jane", "Peter"] var last_names = arrayColumn(records, 'last_name', 'id'); // => {2135: "Doe", 3245: "Smith", 5342: "Jones", 5623: "Doe"} var persons = arrayColumn(records, null, 'id'); // => { // 2135: {id: 2135, first_name: 'John', last_name: 'Doe'}, // 3245: {id: 3245, first_name: 'Sally', last_name: 'Smith'}, // 5342: {id: 5342, first_name: 'Jane', last_name: 'Jones'}, // 5623: {id: 5623, first_name: 'Peter', last_name: 'Doe'} // } Implementation: /** * Source: http://stackoverflow.com/a/33841999/1402846 * * This function is (almost) equivalent to array_column() in PHP (http://php.net/manual/function.array-column.php). * * Differences between this function and PHP's array_column(): * * If indexKey is not found in an element of the input array, the behaviour of this function is undefined. * In PHP's array_column(), the element will be put into the end of the array. It is possible in PHP because PHP does not * distinguish between arrays and dictionaries, but it is not possible in JavaScript because Arrays and Objects are different. * * Associative arrays (dictionaries) in PHP are ordered, JavaScript objects are not (http://stackoverflow.com/a/5525820/14028460. * Do not make assumptions on the ordering of the keys in JavaScript objects. * * If the value of an element at inputKey is not a string, the result of this function and the PHP function * doesn't make much sense. For example, in PHP, * * $records = array( * array('id' => true, 'last_name' => 'Doe') * ); * array_column($records, 'last_name', 'id'); * * gives Array([1] => Doe), or maybe Array([0] =>…
has comment: http://stackoverflow.com/comment/102443965
has comment: http://stackoverflow.com/comment/102416091

http://stackoverflow.com/comment/41725406
has text: Also, note that a 404 isn't technically an 'error' until you call `new Error()`, whereas a 500 error is a more immediate error, and would stop other parts of your code from executing
type: Comment
comment on: http://stackoverflow.com/a/26528370
score: 0
type: AnswerComment

for-loop
tags question: http://stackoverflow.com/q/26623037
tags question: http://stackoverflow.com/q/26614642
tags question: http://stackoverflow.com/q/26533662
tags question: http://stackoverflow.com/q/26618132
tags question: http://stackoverflow.com/q/26569605
tag name: for-loop
tags question: http://stackoverflow.com/q/26579700
tags question: http://stackoverflow.com/q/26599082
tags question: http://stackoverflow.com/q/26541112
tags question: http://stackoverflow.com/q/26635976
tags question: http://stackoverflow.com/q/26665618
tags question: http://stackoverflow.com/q/26591945
tags question: http://stackoverflow.com/q/26659166
tags question: http://stackoverflow.com/q/26558574
tags question: http://stackoverflow.com/q/26579045
tags question: http://stackoverflow.com/q/26528444
type: Tag
tags question: http://stackoverflow.com/q/26565106
tags question: http://stackoverflow.com/q/26553154
tags question: http://stackoverflow.com/q/26639683
tags question: http://stackoverflow.com/q/26522098

datetime
tags question: http://stackoverflow.com/q/26572564
tags question: http://stackoverflow.com/q/26514956
tags question: http://stackoverflow.com/q/26585899
tags question: http://stackoverflow.com/q/26600457
tags question: http://stackoverflow.com/q/26520624
tags question: http://stackoverflow.com/q/26580509
tags question: http://stackoverflow.com/q/26613002
tag name: datetime
tags question: http://stackoverflow.com/q/26615364
tags question: http://stackoverflow.com/q/26531212
tags question: http://stackoverflow.com/q/26523209
tags question: http://stackoverflow.com/q/26657353
tags question: http://stackoverflow.com/q/26584233
tags question: http://stackoverflow.com/q/26664718
type: Tag

http://stackoverflow.com/comment/41885398
comment on: http://stackoverflow.com/a/26635719
has text: Thanks for Your response and time taken. A very good read I must say. So the result Im aiming for is something like this: Have a slider that would filter out and delete nodes and its connections and reconnect left over nodes based on one of the node paramters - say its radius. Like a have in the following [fiddle](http://jsfiddle.net/vlandham/yeQS2/191/) ; Ive tried to addopt your logic here but I cant seemt o recconect the 'left overs'. Would You mind taking a look at this ? Any suggestions Much appreciated
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26660377
has title: Why does .NET match my regex but Javascript does not?
accepted answer: http://stackoverflow.com/a/26661042
type: AnsweredQuestion
has body: I needed a regular expression to match fractions and mixed numbers, but not allow zero for any of the distinct values (whole number, numerator, denominator). I found a solution that was close to what I needed and modified it a little. I then tested it on RegexHero which uses the .NET regex engine. The regular expression matched "1 1/2" as I would expect, but when I tried the same regular expression in Javascript with the .test() function, it did not match it. My suspicion is that it has something to do with how each engine handles the whitespace, but I'm not sure. Any idea why it matched on one but not the other? The regular expression was: ^([1-9][0-9]*/[1-9][0-9]*|[1-9][0-9]*(\s[1-9][0-9]*/[1-9][0-9]*)?)$ EDIT: I tried Jasen's suggestion, but my test is still failing. var ingredientRegex = /^([1-9][0-9]*\/[1-9][0-9]*|[1-9][0-9]*(\\s[1-9][0-9]*\/[1-9][0-9]*)?)$/; function isValidFraction(value) { return ingredientRegex.test(value); } It is being tested with Jasmine. it("should match a mixed number", function() { expect(isValidFraction("2 1/2")).toBe(true); }); SOLUTION: It is working now. I needed to escape the "/" characters, but I did not need to escape the "\s" as Jasen suggested.
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41922922
has comment: http://stackoverflow.com/comment/41922905
has comment: http://stackoverflow.com/comment/41922999
has comment: http://stackoverflow.com/comment/41922794
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26661042
tagged with: regex

http://stackoverflow.com/comment/41901167
score: 0
has text: @Nunners I got values for `console.log(form)` @Scimonster I got `[object Object]` when I log `form.find('input[name="qty"]')`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26648118

http://stackoverflow.com/comment/41668831
has text: You need to tell us what the problem is so we can provide more info. Does it throw an error? Never calls the callback? Can't find the element? responseText is empty?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26519742

http://stackoverflow.com/q/26651556
has comment: http://stackoverflow.com/comment/41907837
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26654921
has comment: http://stackoverflow.com/comment/41908620
has comment: http://stackoverflow.com/comment/41907203
has title: Javascript click() don't work on Mobile devices
has comment: http://stackoverflow.com/comment/41906997
tagged with: mobile
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41908129
type: Question
has comment: http://stackoverflow.com/comment/41907695
has answer: http://stackoverflow.com/a/26654921
tagged with: http://stackoverflow.com/tag/html
has body: I must use a proprietary software for the project. In this software there is part that generates mobile surveys. In the mobile survey mode i have access only to the css... no html, no javascript. However i find out that i can run javascript from &lt;a href="javascript:CODE"&gt;, executes on click on that element. I need to create custom button that acts like the forward button, but do some other stuff as well. The code that i'm using is: &lt;a id="theNavButtons" href="javascript:document.getElementById('q1_1_content').parentNode.getElementsByTagName('a')[4].click()" &gt; &gt;&gt;&gt; &lt;/a&gt; If I test this using alert and changing .click() with .innerHTML I see that I get the correct element (the forward button on the page). I also tested .click() on some other elements and it is working, but for this element it is not. Here is a demo link, it is in mobile mode, click forward once to see the second page: http://author.euro.confirmit.com/extwix/extquicktest_p1839573894.aspx?__qtkey=c2c45e09c13b427b925611227091e3cd&amp;l=29&amp;__rm=2 I tried exploring the events connected to the forwadbutton, but there is too much custom code there... Please give me some ideas...

http://stackoverflow.com/q/26551112
accepted answer: http://stackoverflow.com/a/26551301
has body: Description: I have a modal where users can view their profile picture &amp; upload a new one. This profile picture is shown in the navigation as well (next to their name). The current process goes like this: User goes to modal User doesn't have photo, shows default stock avatar. User does, shows theirs User uploads new photo, HTTP response returns the src attribute Controller updates scope and sets $scope.photo equal to the response Right now this works perfectly fine as it should. However, I have the profile photo in the layout view in the side navigation as well which is under command of another controller. The scope variable is the same name and the HTML is the same, and they are set by the same service. But, the scope is set from different controllers. Here is the code for the modal controller: Files.profile_photo() .success(function(data) { $scope.photo = data; }) $scope.onFileSelect = function($files) { var path = $scope.file_name; console.log(path); for(var i = 0; i &lt; $files.length; i++) { var file = $files[i]; $scope.upload = $upload.upload({ url: '/smart2/api/files/profile', file: file }).success(function(data) { $scope.photo = data; }); } } And then in my controller for my side navigation where the photo also needs to be updated, I call the service Files and the function profile_photo and do the exact same thing to set the photo when the pages loads. How can I also update it when it's changed from the modal? I can't do $scope.onFileSelect because that's in the modal inside of another controller. I need to somehow notify Angular that the photo has been changed and update it in another controller. What are my options?
has title: AngularJS scope change in one place should change in another, how can this be achieved?
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26551301
upvote count: 1
answer count: 1

http://stackoverflow.com/a/26587635
answers question: http://stackoverflow.com/q/26587536
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
type: Answer
has body: It is best to not have to do specific browser detection, but an easy way to see if you are using Chrome or not is the following: var isChrome = navigator.userAgent.toLowerCase().indexOf("chrome") &gt;= 0 ? true : false; This will populate isChrome with either true of false.
has comment: http://stackoverflow.com/comment/41790371
has comment: http://stackoverflow.com/comment/41790340
accepted answer of: http://stackoverflow.com/q/26587536
has comment: http://stackoverflow.com/comment/41799746

http://stackoverflow.com/q/26562750
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26562815
has title: Using jQuery-ajax response with an IF statement
score: 1
upvote count: 1
type: Question
has body: I'm using jquery-ajax to send data to a php. Upon success or failure the php sends back a response. so far everything works fine. Now my questions is how do I use an if statement in jquery to do some action using the response? See example: $.post("php/send.php", { email:$( '#email' ).val(), name:$( '#name' ).val() }, function(response) { alert(response) // shows "Error!" if (response != "" || response != "Error!") { //do A... } else { //do B... } )}; My if statement does not work. Even the response from the php is "Error!" it will //do A.How do I fix this?
has answer: http://stackoverflow.com/a/26563804
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/26563625

http://stackoverflow.com/a/26549640
has comment: http://stackoverflow.com/comment/41723958
type: Answer
accepted answer of: http://stackoverflow.com/q/26537575
has comment: http://stackoverflow.com/comment/41722378
answers question: http://stackoverflow.com/q/26537575
has comment: http://stackoverflow.com/comment/41722828
upvote count: 2
has body: Based on the 'full jquery' code you have above I'm guessing you have this in a coffeescript file, which does not have access to the render method. You're going to have to set up a route that hits a controller action that renders the JS, like this: routes.rb: get 'controller_name/toggle_partial' =&gt; "controller_name#toggle_partial" In that controller: def toggle_partial respond_to do |format| format.js end And in views/controller_name add a file called toggle_partial.js with these contents: $(".payment").append("&lt;%= escape_javascript(render(:partial =&gt; payment)) %&gt;"); Then in your coffeescript file do something like this: $('.plans').change -&gt; $.ajax( type: 'GET' url: '/controller_name/toggle_partial' success: ( data, status, xhr ) -&gt; ) Sorry if the indentation is off on the coffeescript example. The bottom line is that you don't have access to render in the coffeescript file so you have to make a work-around. Hope this helps.
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41723533

http://stackoverflow.com/comment/41665367
has text: Wich way are you using with css?
comment on: http://stackoverflow.com/q/26517754
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26606730
accepted answer of: http://stackoverflow.com/q/26606657
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/41826125
has body: You can achieve this in CSS alone. You just need to make the :hover rule more specific than the td.highlight. Try this: #infotable tr:hover td, #infotable tr:hover td.highlight { background:yellow; } Example fiddle
type: Answer
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/41825796
answers question: http://stackoverflow.com/q/26606657

http://stackoverflow.com/a/41476361
upvote count: 1
downvote count: 0
has body: ENOENT is short for "Error, no entry." Node is telling you that the program expected a directory at /Users/Max/github/project/mweb/sites but could not find it. It is hard to say for certain why the program is expecting that to be a directory, but since you are trying to build a project, most likely it wanted to write some files to the disk under that location. Files cannot be written inside of a non-existent directory and unless the programmer actively handles this condition, it will crash. You could make a directory there yourself: mkdir /Users/Max/github/project/mweb/sites However, other errors will likely appear after this one is fixed, because something about your environment is different than what the project expects. Have a look at the README of the project. Maybe there are some prerequisites that you missed. One possibility is that your current working directory is wrong according to the project's instructions. This can cause paths to be computed incorrectly. Typically you want to be at the root of a project when building it. You can determine your current working directory by running pwd.
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26522451

http://stackoverflow.com/q/26671292
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26671342
has title: how to put output php on a specic place
tagged with: php
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26671342
type: Question
has answer: http://stackoverflow.com/a/26671437
has body: I have made two divs besides each other, the left div contains a list of names and in the right one is empty. The names in the left div are generated from a database, also it's wrapped into a a tag so I can click on it. echo "&lt;a href='Overview.php?id=" .$row['ID'] . "'&gt;" .$row['COMPANY']."&amp;nbsp;&lt;/td&gt; &lt;br&gt;"; When somebody clicks on the a tag it will generate a new variable: id in the browser link. Now my main goal is to get this $row['ID'] variable into the right div. What I tried (php function): If the ID is set (= somebody clicked on the a tag) it will echo the id. But I have no clue how to place this into the right div (#rightcolumn) function runMyFunction() { echo $_GET['id']; } if (isset($_GET['id'])) { runMyFunction(); } Thank you for reading!
tagged with: javascript
has comment: http://stackoverflow.com/comment/41943089
possible better answer: http://stackoverflow.com/a/26671429
has answer: http://stackoverflow.com/a/26671429
score: 0
answer count: 3

http://stackoverflow.com/q/26635354
has comment: http://stackoverflow.com/comment/41878825
type: UnansweredQuestion
has body: How can I check all Meteor helpers have run? When I use this code, I get a new, empty div. When I remove the code from the rendered function and run it from my console, everything works fine. Template.CasesShow.helpers({ value: function (n) { if (this.data) { var result = this.data.filter(function (obj) { return obj.name == n; }); if (result &amp;&amp; result[0]) return result[0].value; } } }); Template.CasesShow.rendered = function () { $(document).ready(function () { $textarea = $('[name=1]'); var content = $textarea.val().replace(/\n/g, '&lt;br /&gt;'); $textarea.replaceWith($('&lt;div class="box"&gt;' + content + '&lt;/div&gt;')); }); }; &lt;template name="CasesShow"&gt; &lt;textarea class="w-input box" placeholder="{{_ 'laborauftrag.praxis'}}" name="1" data-name="1"&gt;{{value 1}}&lt;/textarea&gt; &lt;/template&gt; So I think, Meteor hasn't inserted the value yet, which is strange because it shouldn't run the rendered function then, right? How can I make sure Meteor has run the helpers?
has comment: http://stackoverflow.com/comment/41917145
has answer: http://stackoverflow.com/a/26644517
tagged with: javascript
tagged with: jquery
tagged with: meteor-blaze
type: Question
tagged with: meteor
has title: Meteor helper has run
has comment: http://stackoverflow.com/comment/41884289
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41878684
has answer: http://stackoverflow.com/a/26655474

http://stackoverflow.com/q/26615861
has comment: http://stackoverflow.com/comment/41844028
favorite count: 0
tagged with: backbone.js
has title: Creating unbalanced d3 tree diagram
has comment: http://stackoverflow.com/comment/41845041
tagged with: d3.js
type: UnansweredQuestion
tagged with: tree
has body: So I'm trying to create a d3 tree diagram, around these two examples - http://blog.pixelingene.com/2011/07/building-a-tree-diagram-in-d3-js/ http://bl.ocks.org/d3noob/8324872 It's within a backbone view and my code is this - render: function() { this.margin = {top: 20, right: 120, bottom: 20, left: 120}; this.width = 960 - this.margin.right - this.margin.left; this.height = 500 - this.margin.top - this.margin.bottom; var i = 0; var width = this.width; var height = this.height; var margin = this.margin; this.tree = d3.layout.tree() .size([this.height, this.width]) .children(function(d) { return (!d.children || d.children.length === 0) ? null: d.children; }); this.diagonal = d3.svg.diagonal() .projection(function(d) { return [d.y, d.x];}); this.svg = d3.select('body').append("svg") .attr("width" , width + margin.right + margin.left) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); root = this.getFunctionData(); this.update(root); return this; }, update: function(source) { var tree = this.tree; var nodes = tree.nodes(root).reverse(), links = tree.links(nodes); var diagonal = this.diagonal; //debugger nodes.forEach(function(d) { d.y = d.depth * 180;}); var node = this.svg.selectAll("g.node").data(nodes, function(d,i) { return d.id || (d.id = ++i); }); var nodeEnter = node.enter().append("g") .attr("class", "node") .attr("transform" , function(d) { return "translate(" + d.y + "," + d.x + ")"; }); nodeEnter.append('circle') .attr('r', 10) .style('stroke', function(d) { return d.type;}) .style("fill", function(d) { return d.children ? "lightsteelblue" : "#fff";}); // var nodeUpdate = node.transition() // .duration(duration) // .attr('transform', function(d) { return "translate(" + d.y + "," + d.x + ")";}); // nodeUpdate.select("circle") // .attr('r', 4.5) // .style('fill', function(d) { return d.children ? "lightsteelblue" : "#fff";}); this.svg.selectAll("path.link") .data(links) .ent…
answer count: 0
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41844635
linked to: http://stackoverflow.com/q/16812875
tagged with: javascript
duplicate of: http://stackoverflow.com/q/16812875
score: 0

http://stackoverflow.com/q/26550888
has comment: http://stackoverflow.com/comment/41724339
favorite count: 0
has answer: http://stackoverflow.com/a/26651492
has answer: http://stackoverflow.com/a/37469431
has comment: http://stackoverflow.com/comment/41724031
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41724186
score: 1
tagged with: iframe
has title: IE11 security certificate issue when using iFrame
upvote count: 1
has comment: http://stackoverflow.com/comment/41724262
has body: I am getting the below error when I am trying to open one new window using iFrame and IE11, the new window is having a pdf content. IE7-IE10 looks good. I am using https here. Error message: Content was blocked because it was not signed by a valid security certificate. For more information, see “About Certificate Errors” in Internet Explorer Help. My Code goes here: if (navigator.userAgent.indexOf('MSIE') !== -1){ var html = " "; html += " "; html += " "; html += " "; // open new pop up window YUIwinObj= window.open("", 'document', 'width=825,height=600,directories=no,status=yes,location=no,scrollbars=yes,resizable=yes'); YUIwinObj.document.write(html); } Thank you.
type: Question
tagged with: ssl
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/41754987
type: QuestionComment
has text: The input field is removed if the user changes their selection and re added whenever they make a decision. So at all times, there's only one input field
comment on: http://stackoverflow.com/q/26567859
score: 0
type: Comment

http://stackoverflow.com/q/26539810
upvote count: 1
type: Question
score: 1
has body: As others have mentioned this code comes from chapter 6 of eloquent javascript. I do not understand where the arguments to the function 'drawRow' are supplied from. If the outer function drawTable were some sort of method it would make sense that it could pass an array as well as the current index, but it's not. It's just an ordinary function so where does it grab 'row' and 'rowNum' from? function drawTable(rows) { var heights = rowHeights(rows); var widths = colWidths(rows); function drawLine(blocks, lineNo) { return blocks.map(function(block) { return block[lineNo]; }).join(" "); } function drawRow(row, rowNum) { var blocks = row.map(function(cell, colNum) { return cell.draw(widths[colNum], heights[rowNum]); }); return blocks[0].map(function(_, lineNo) { return drawLine(blocks, lineNo); }).join("\n"); } return rows.map(drawRow).join("\n"); } Thank you in advance to anyone taking the time to answer this.
has answer: http://stackoverflow.com/a/26539878
tagged with: function
has answer: http://stackoverflow.com/a/26539884
downvote count: 0
tagged with: javascript
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/26541152
type: UnansweredQuestion
has title: eloquent javascript table drawing function - drawRow arguments

http://stackoverflow.com/comment/41807461
score: 1
comment on: http://stackoverflow.com/a/26596335
type: AnswerComment
type: Comment
has text: +1 for creating such a superior answer i felt the urge to remove my own ;) About point 4 I assumed the `deck = new cards();` was intentionally global so OP could inspect it in the console. Why do you `return this` from the `shuffle` method by the way? Is it there to allow jQuery-style chaining?

http://stackoverflow.com/comment/41962164
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26572697
has text: Aray, it's just a line to tell you that the output from the request that youa re taking is under xmlhttp.responseText
score: 0

http://stackoverflow.com/comment/41889506
score: 0
has text: the problem is that I cant add a new overlay Thats the main goal.If I can replace the Overlay with a new one inside the if, Im happy.The if statement is actually inside an function, so maybe thats the problem..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26638273

http://stackoverflow.com/q/26661999
has answer: http://stackoverflow.com/a/26662408
has comment: http://stackoverflow.com/comment/41931676
has answer: http://stackoverflow.com/a/47372674
has comment: http://stackoverflow.com/comment/41931189
has comment: http://stackoverflow.com/comment/41926169
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26662224
has comment: http://stackoverflow.com/comment/42088588
has body: You'll have to forgive the phrasing of this question, I'm sure there's a better, more succinct way to ask it, but I don't know it. Let's say I have a graph, and all the y-axis values are [0,4,5,3,2,5,6] The maximum value is six. So I would like the Y-Scale to be labeled from 0 to 10. Given the following values [33,26,54,23,86,23] The maximum value is 86, so I would like the Y-Scale to go from 0 to 90. Now let's say I have the following values [98,253,87, 876,263] The max is 876,so the Y-scale should go from 0 to 900 Now I have created the following function that should give me all the max y-scale values I need so far. function padMaxValue(value){ for(var i = 1; i &lt; 1000000000000000000; i = i * 10){ var decimalValue = value / i; if(value === i){ return i; } if(decimalValue &lt; 1 &amp;&amp; decimalValue &gt; 0.09){ return i; } } } However, given the following values [99,123,82,189,45] My function would set the y-scale max to 1000. But the max should really be 200. I realise that what I really need is a smarter way to increase the value of i instead of just multiplying it by 10. I need to be able to increase the value of i by 10, all the way up to 100. Then increase it by 100, all the way up to 1000. Then increase it by 1000, all the way up to 10,000 and so on. I feel like there should be some neat and tidy mathematical way to do this. And I also feel that the 1000000000000000000 number I have in the for loop betrays my ignorance of mathematics. Anyhoot, that's the problem. Any ideas?
has answer: http://stackoverflow.com/a/26662625
tagged with: math
downvote count: 1
has answer: http://stackoverflow.com/a/26662242
upvote count: 44
type: Question
has answer: http://stackoverflow.com/a/26752159
tagged with: max
has comment: http://stackoverflow.com/comment/41960304
tagged with: javascript
has comment: http://stackoverflow.com/comment/41976587
score: 43
has title: How to increase the value of a number to the next multiple of 10, 100, 1000, 10,000 and so on
answer count: 7
has answer: http://stackoverflow.com/a/26750952
possible better answer: http://stackoverflow.com/a/26662242
favorite count: 0
has comment: http://stackoverflow.com/comment/41931339
accepted answer: http://stackoverflow.com/a/26662625

http://stackoverflow.com/q/26629000
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: My code is this heat = L.heatLayer([], { maxZoom: 12 }).addTo(map); $.getJSON("js/example-single.geojson", function(data) { var geojsosn = L.geoJson(data, { onEachFeature: function (feature, layer) { console.log(feature.geometry.coordinates[0] ,feature.geometry.coordinates[1]); heat.addLatLng(feature.geometry.coordinates[0], feature.geometry.coordinates[1]); } }); but am getting an error "Uncaught TypeError: Cannot read property 'lat' of undefined" please tell how to fix this, if my code is wrong somebody show me how to parse json data for heat map in mapbox my json data is { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [13.353323936462402, 38.11200434622822]}, "properties": {"marker-color": "#000"} } ] }
type: Question
has answer: http://stackoverflow.com/a/26636879
accepted answer: http://stackoverflow.com/a/26636879
has title: Mapbox issue with parsing json data for heatmap
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1
favorite count: 0
tagged with: ajax
tagged with: mapbox
type: AnsweredQuestion

http://stackoverflow.com/comment/59319314
has text: @epeleg To be more specific, vinyl files, but yeah you got the idea ;)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26545000
type: AnswerComment

http://stackoverflow.com/q/26591186
favorite count: 0
tagged with: karma-runner
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26592256
has title: Could not load the template HTML file in Karma tests for a Angular directive
type: AnsweredQuestion
upvote count: 5
type: Question
tagged with: angularjs-directive
score: 5
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26592256
tagged with: karma-jasmine
has body: Despite some people having the same issues (like [here][1] or [there][2]), I do not succeed to test my directive in my Angular (1.2.25) application. Here is my project structure: myapp +- src/main/java/resources/META-INF/resources/workflow/directives | +- directives.js | +- *.html (all templates) +- src/test/javascript +- karma.conf.js +- spec/directives +- text-input.spec.js (yes, not a good structure, but my Angular application is stuck in a Java project) My karma configuration: // Karma configuration module.exports = function (config) { config.set({ ... // base path, that will be used to resolve files and exclude basePath: '', // testing framework to use (jasmine/mocha/qunit/...) frameworks: ['jasmine'], // list of files / patterns to load in the browser files: [ // Third parties dependencies: jQuery, Angular, Angular modules, Angular mocks '../../main/resources/META-INF/resources/workflow/bower_components/...', // My directives '../../main/resources/META-INF/resources/workflow/directives/*.html', '../../main/resources/META-INF/resources/workflow/directives/*.js', // My application '../../main/resources/META-INF/resources/workflow/scripts/*.js', '../../main/resources/META-INF/resources/workflow/app/**/*.js', // My Test files 'spec/directives/*.js' ], // list of files / patterns to exclude exclude: [], // web server port port: 8888, browsers: [ 'Chrome' ], // Which plugins to enable plugins: [ 'karma-ng-html2js-preprocessor', 'karma-chrome-launcher', 'karma-jasmine' ], preprocessors: { '../../main/resources/META-INF/resources/workflow/directives/*.html': [ 'ng-html2js' ] }, ngHtml2JsPreprocessor: { // Not sure what to put here... }, ... }); }; My test: describe('directive: text-input', function() { var element, scope; beforeEach(module('myApp')); beforeEach(inject(function($rootScope, $compile) { scope = $rootScope.$new(); element = '&lt;div my-input-text data-label="Foo" data-model="bar"&gt;&lt;/div&gt;'; element = $compile(element)(scope); scope.$digest(); })); …

http://stackoverflow.com/comment/41889915
comment on: http://stackoverflow.com/q/26641440
has text: Math.floor(153/35)*35 equals 140 in my console.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/41671566
comment on: http://stackoverflow.com/q/26521234
has text: How would you expect to get the checkbox values if they don't exist on the page. You would need to store the values somewhere before moving to another page
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41900380
comment on: http://stackoverflow.com/q/26647772
type: Comment
type: QuestionComment
score: 0
has text: What does your code currently do? It sounds like you need to run a method every second? Have you tried `setInterval` or `setTimeout`?

http://stackoverflow.com/comment/41733887
has text: This worked but only the last input box value is being passed to the php
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26556080

http://stackoverflow.com/comment/41692893
type: Comment
has text: @Alex Di Vito, is the code you posted actually working, only slowly? There are a number of questionable things that suggest it's not. 1, the preloading `for` loop doesn't register the `tImg` variable anywhere, and doesn't appear to be used elsewhere. 2, the `loopBg` function calls itself without good recursive style. It does so infinitely. Either of those could be your real problem.
type: AnswerComment
comment on: http://stackoverflow.com/a/26533168
score: 0

http://stackoverflow.com/q/26626031
upvote count: 3
type: Question
downvote count: 0
tagged with: javascript
has body: I have just started to learn how to create forms with angularjs and while deploying it to camunda I faced with some problem. I am trying to create a form with tabs. And to include aditional html pages I use ng-include: But when I am deploying this form to camunda, there is an error: "404 Not Found - http: //localhost:8080/camunda/app/tasklist/default/tabs/persons.html". That's why I wonder how I should write directories to make comunda upload html pages from my application's directory: "myapp/forms/tabs/persons.html"? Thanks in advance
tagged with: http://stackoverflow.com/tag/html
has title: Camunda default directories to additional resources
favorite count: 0
tagged with: camunda
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
score: 3

http://stackoverflow.com/comment/41916886
score: 0
type: AnswerComment
has text: nice, closer to what he is asking for than mine
type: Comment
comment on: http://stackoverflow.com/a/26657346

http://stackoverflow.com/q/26522508
tagged with: jquery
has answer: http://stackoverflow.com/a/26522572
type: Question
score: 0
answer count: 1
has title: Turning off Slider load based on device width
type: UnansweredQuestion
has body: I'm working on a site for a client who bought a template and the issue is that now client wants the slider remove from hand held devices. I know that we can use &lt;picture&gt; tag to assign different images based on screens size but what I'm trying to do here is to disable(by disable i mean canceling image load on mobile devices, not {display:none;} the slider loading all together from a certain screen size. We'll probably have to create a script to call event assigned to that &lt;div&gt; to cancel its loading on for instance any screen size bellow 768px. How can I do this? (BTW I'm still learning JS .. any help is muchappreciated) Many thanks in advance.
tagged with: javascript

http://stackoverflow.com/q/26649460
answer count: 2
accepted answer: http://stackoverflow.com/a/26650181
downvote count: 0
has body: I am new to angularjs and I've been searching on the web the whole day just to find a solution in getting data from a local json file without having to use a localhost for my webapp. Unfortunately, I haven't found any. I tried using $http.get but I get Cross Origin * error. Is there no other way that I could get the data from my local json file without having to locally host my webapp? Does angularjs have any other function to get data from local json files without having to use its $http.get?
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41937092
has answer: http://stackoverflow.com/a/26649568
has comment: http://stackoverflow.com/comment/41934493
has comment: http://stackoverflow.com/comment/42007812
has comment: http://stackoverflow.com/comment/49823776
has comment: http://stackoverflow.com/comment/41945881
score: 31
type: AnsweredQuestion
upvote count: 31
possible better answer: http://stackoverflow.com/a/26649568
has comment: http://stackoverflow.com/comment/42009067
has comment: http://stackoverflow.com/comment/41947215
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41946037
has answer: http://stackoverflow.com/a/26650181
type: Question
has title: Angularjs access local json files
has comment: http://stackoverflow.com/comment/77109963
has comment: http://stackoverflow.com/comment/41934845
tagged with: javascript
has comment: http://stackoverflow.com/comment/42008879
has comment: http://stackoverflow.com/comment/49473174
has comment: http://stackoverflow.com/comment/42009095
duplicate of: http://stackoverflow.com/q/371875

http://stackoverflow.com/q/26647969
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26648351
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26648661
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26650477
tagged with: php
linked to: http://stackoverflow.com/q/20149059
type: Question
has body: i am using flexslider and I am having problem with its animation:slide effect. It only works if I leave the page and come again or if the page lose and gain the focus. The navigations arrow are showing fine they actually detect the click event. The small dots in the bottom also clickable and they actually get active once I click on them but no image transition happens. UPDATE: It do not works on the dynamic content, i-e when the slide html comes via ajax Any help please. Here is my code; var options = { animation: "slide" }; $('.team-pages-slider').flexslider(options); $.ajax({ url: href, dataType: "html", cache: false, beforeSend:function(data){ $('.global-loader').show(); }, success: function(data){ $content.html(data); loadFlexJS(); )};
has title: Flexslider: animation:slide not working properly

http://stackoverflow.com/comment/41806731
type: QuestionComment
has text: Are you able to use session variables? you can have a session variable that increment everytime the page is loaded and display content according with that.
comment on: http://stackoverflow.com/q/26595867
type: Comment
score: 0

http://stackoverflow.com/q/26583978
has answer: http://stackoverflow.com/a/26584260
downvote count: 0
has answer: http://stackoverflow.com/a/26584013
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
tagged with: css
type: AnsweredQuestion
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/26584013
tagged with: wordpress
has body: I converted bootstrap theme to wordpress. Now, I have a problem in loading the bootstrap scripts and style. This is my code in functions.php function wpbootstrap_scripts_with_jquery() { // Register the script like this for a theme: wp_register_script( 'custom-script', get_template_directory_uri() . '/js/bootstrap.js', array( 'jquery' ) ); wp_enqueue_script( 'samplejs', get_template_directory_uri() . '/js/jquery.min.js', array( '' ) ); wp_enqueue_script( 'samplejs', get_template_directory_uri() . '/js/clean-blog.min.js', array( '' ) ); // For either a plugin or a theme, you can then enqueue the script: wp_enqueue_script( 'custom-script' ); } add_action( 'wp_enqueue_scripts', 'wpbootstrap_scripts_with_jquery' ); and i add this in my header &lt;?php wp_enqueue_script("jquery"); ?&gt; Additional question: What is the difference between wp_register and wp_enqueue? Please help me. Im beginner in using bootstrap.
type: Question
tagged with: javascript
has title: How to load bootstrap script and style in functions.php (wordpress)?
answer count: 2
possible better answer: http://stackoverflow.com/a/26584260

http://stackoverflow.com/comment/41722050
type: QuestionComment
comment on: http://stackoverflow.com/q/26549782
has text: Can you post an example of the code giving the issue in your post?
score: 0
type: Comment

http://stackoverflow.com/comment/41708935
has text: You have a typo: `window.location.ref` should be `window.location.href`
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26541126
type: QuestionComment

http://stackoverflow.com/q/26626893
has comment: http://stackoverflow.com/comment/41863039
favorite count: 0
has title: issue with css important, when used with two class
possible better answer: http://stackoverflow.com/a/26626986
tagged with: css
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/41863096
accepted answer: http://stackoverflow.com/a/26627053
type: Question
has body: I have a condition where we have below code. i want to overwrite tr:hover when class greyLock is used. how to implement it. i cannot remove background-color: #EEE !important; from tr:hover class. tr:hover { background-color: #EEE !important; cursor: pointer; } .greyLock { background-color: #7A7A7A !important; cursor:default !important; }
has answer: http://stackoverflow.com/a/26627053
has answer: http://stackoverflow.com/a/26626986
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41863107
answer count: 2
downvote count: 1

http://stackoverflow.com/comment/41708634
has text: This still doesnt really help me...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26517845
score: 0

http://stackoverflow.com/q/26550220
has body: maybe i'm missing something here but i am trying to parse this JSON script: JSON_DATA: { "Frontpage":[{"Id":"1","C_Page":"Frontpage","C_Code":"Title","C_Output":"A12-VEG"}, {"Id":"2","C_Page":"Frontpage","C_Code":"Welkom","C_Output":"Welkom A12-VEG"}, {"Id":"3","C_Page":"Frontpage","C_Code":"intro","C_Output":"hiiii"}], "About":[{"Id":"5","C_Page":"About","C_Code":"Title","C_Output":"About"}], } array 1: Frontpage array 2: About i a'm trying to parse it like this: $.each(JSON.parse(JSON_DATA).Frontpage,function(i,post){ var id = "#" + post.C_Page + "_" + post.C_Code; $(id).append(post.C_Output); console.log('Added: ' + id) }); if i remove About from the JSON data this script works. but i need more arrays... i am going to try this: { "Frontpage":[{"Id":"1","C_Page":"Frontpage","C_Code":"Title","C_Output":"A12-VEG"}, {"Id":"2","C_Page":"Frontpage","C_Code":"Welkom","C_Output":"Welkom A12-VEG"}, {"Id":"3","C_Page":"Frontpage","C_Code":"intro","C_Output":"hiiii"}] }, { "About":[{"Id":"5","C_Page":"About","C_Code":"Title","C_Output":"About"}] } &lt;&lt; NOT WORKING
type: AnsweredQuestion
downvote count: 2
has title: How can i parse JSON with multiple arrays?
has answer: http://stackoverflow.com/a/26550311
type: Question
score: -2
tagged with: http://stackoverflow.com/tag/json
upvote count: 0
answer count: 1
tagged with: arrays
accepted answer: http://stackoverflow.com/a/26550311
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26588881
accepted answer of: http://stackoverflow.com/q/26588706
answers question: http://stackoverflow.com/q/26588706
has comment: http://stackoverflow.com/comment/41796868
downvote count: 0
has comment: http://stackoverflow.com/comment/41796543
type: AcceptedAnswer
upvote count: 2
has comment: http://stackoverflow.com/comment/41796770
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41797647
has comment: http://stackoverflow.com/comment/41797111
has body: $(function() { var c = 0; $("#button1").click(function() { if( !$('#inputs')[0].checkValidity() ) { alert( $('#inputs')[0].title ); return false; } c = +$("#inputs").val(); $("#mydiv").html(""); for (i = 1; i &lt;= c; i++) { $("#mydiv").append('&lt;input type="text" id="name' + i + '" name="name' + i + '" placeholder="name' + i + '"&gt;'); $("#mydiv").append('&lt;input type="number" id="rating' + i + '" name="rating' + i + '" min="1" max="10" placeholder="rating' + i + '"&gt;&lt;br/&gt;'); } $('#button2').prop('disabled',false); }); $("#button2").click(function() { if (c === 0) { alert('must click on "continue" button'); } else { alert('Now let us move ahead'); } }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="number" id="inputs" name="inputs" min="3" max="48" pattern=".{1,2}" required title="please enter a value between 3 to 48"&gt; &lt;input type="button" id="button1" value="continue"&gt; &lt;div id="mydiv"&gt;&lt;/div&gt; &lt;input type="submit" id="button2" value="next" disabled&gt;

http://stackoverflow.com/comment/41904842
comment on: http://stackoverflow.com/q/26650459
score: 0
has text: Added controller code.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41690188
score: 0
comment on: http://stackoverflow.com/a/26531598
type: Comment
has text: No, it will give you {"val1":52,"val_wrapper":{"val1":1}}
type: AnswerComment

spdy
tag name: spdy
tags question: http://stackoverflow.com/q/26549782
type: Tag

http://stackoverflow.com/q/26646603
score: 5
has comment: http://stackoverflow.com/comment/41911596
upvote count: 6
tagged with: javascript
tagged with: reactjs
has title: How to load a react component written in JSX code from my Javascript code
downvote count: 1
answer count: 1
favorite count: 0
has body: i'm new to reactjs so please excuse me if I can't phrase this question properly. So I have this jsx script file which renders my react components into my view as soon as it is loaded. Initially in this script file I don't have any data to show in my component, so I don't render any of my sub components. However at some later point, when I receive data from, say a web service, I would very much like to render the components again with that data. The components in my JSX script file has no state, it simply is supposed to show the data i pass into it. The JSX script loads fine and renders the components with initially no data specified in the JSX file itself. However when I try to render that component again in another Javascript file, it gives me a reference error, component undefined. Does the JSX nation, /*** @jsx React.DOM */ create a totally different namespace? If so how can I access it? And what is the best way to re-render components with new data from outside your JSX script file. Thanks in advance! :) /**Edited*/ guys, sorry for not adding code.. instead let me make the question simple.. how to can i access a react component in my jsx script from my javascript file? /**Edited*/ Alright guys, here is a code example: var Avatar = React.createClass({ render: function() { return ( &lt;div&gt; &lt;ProfilePic username={this.props.username} /&gt; &lt;ProfileLink username={this.props.username} /&gt; &lt;/div&gt; ); } }); var ProfilePic = React.createClass({ render: function() { return ( &lt;img src={'http://graph.facebook.com/' + this.props.username + '/picture'} /&gt; ); } }); var ProfileLink = React.createClass({ render: function() { return ( &lt;a href={'http://www.facebook.com/' + this.props.username}&gt; {this.props.username} &lt;/a&gt; ); } }); React.render( &lt;Avatar username="pwh" /&gt;, document.getElementById('example') ); So, the above code can be embedded in your html tags specifed as jsx script or loaded externally. Notice the username prop in the Avata…
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26663597
has comment: http://stackoverflow.com/comment/41906009
type: Question

http://stackoverflow.com/q/26523764
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26527999
has body: We have a SharePoint 2013 document library a custom content type added to the library, based on standard "Folder" content type; a new "DisplayName" text field added to the content type a few folders of that custom content type were created in the document library I try to make a JavaScript control to visualize folder structure from the library. But I can't get the custom "DisplayName" field value this.clientContext = SP.ClientContext.get_current(); var web = this.clientContext.get_web(); this.clientContext.load(web); this.clientContext.executeQueryAsync(function(sender, args) { for (var i = 0; i &lt; this.topLevelFoldersUrl.length; i++) { var contextParams = {}; contextParams.folderUrl = web.get_serverRelativeUrl() + "/" + this.topLevelFoldersUrl[i]; // folder contextParams.topLevelFolder = web.getFolderByServerRelativeUrl(contextParams.folderUrl); this.clientContext.load(contextParams.topLevelFolder, 'Include(DisplayName)'); // folder list item contextParams.folderListItem = contextParams.topLevelFolder.get_listItemAllFields(); this.clientContext.load(contextParams.folderListItem); // subfolders contextParams.folderCollection = contextParams.topLevelFolder.get_folders(); this.clientContext.load(contextParams.folderCollection); this.clientContext.executeQueryAsync( function (sender, args) { var folderName = contextParams.topLevelFolder.get_name(); // EXCEPTION goes here: "property has not been initialized" var folderDisplayName = contextParams.folderListItem.get_item("DisplayName"); // visualization code... }, this.onQueryFailed ); } }, this.onQueryFailed); Is there a special technique to get folder custom fields? I've googled all the code samples to get list items and their custom fields, but the samples don't work in my case.
tagged with: sharepoint-clientobject
type: Question
accepted answer: http://stackoverflow.com/a/26527999
score: 0
answer count: 1
tagged with: sharepoint-2013
has title: SharePoint JSOM: get SPFolder custom field value
tagged with: javascript
tagged with: sharepoint

http://stackoverflow.com/comment/41794438
score: 0
type: AnswerComment
has text: you can put `return false;` inside onclick to prevent form post
type: Comment
comment on: http://stackoverflow.com/a/26585312

http://stackoverflow.com/a/26601854
score: 1
has body: Assignment such as var b = a for a object creates an object 'b' which references(just like pointer) the same location pointed by 'a', in general. You may find this link helpful. However you can create/clone a new array with slice method. var b = a.slice()
has comment: http://stackoverflow.com/comment/41817379
downvote count: 0
has comment: http://stackoverflow.com/comment/41817339
type: Answer
has comment: http://stackoverflow.com/comment/41817383
upvote count: 1
answers question: http://stackoverflow.com/q/26601753

http://stackoverflow.com/comment/41701962
type: Comment
type: QuestionComment
has text: Thanx Captain Obvious. I was asking how.
comment on: http://stackoverflow.com/q/26536394
score: 0

http://stackoverflow.com/q/26589322
has comment: http://stackoverflow.com/comment/41793907
answer count: 2
has body: I'm working on a function that works like so: Click Link After page loads based on the link clicked a specific modal window will be displayed Proceed with modal End of functions My problem I have been running into is that either the modal won't load, or it will load but then close immediately after the page loads. Here is the function I'm working with $(function(){ $('#new-po').click(function(){ window.location.href= $(this).attr('href'); bootbox.dialog({ title: "Create New Purchase Order", message: ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' Invoice Number '+ ' '+ ' '+ ' '+ ' Vendor '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' Invoice Number '+ ' '+ ' '+ ' '+ ' Vendor '+ ' '+ ' -Status- '+ ' Open '+ ' Closed '+ ' Void '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' '+ ' ', buttons:{ success:{ label: "Create PO", className: 'btn-success', callback:function(){ } } }, onEscape: function(){ } }); }); }); It uses the bootbox extension, and so far I've found no conflict with it, so I'm going to continue using it until otherwise stated. I've tried using $(document).ready(), $(window).load(), $(function(){}, and several other things and nothing has worked. Thoughts? Also for references my page structure on every page looks like this: <? include "/inc/header/overall_header.php"; ?> <? include "/inc/header/overall_header.php"; ?>
has comment: http://stackoverflow.com/comment/41793655
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41793612
has title: Load page then launch bootbox
has comment: http://stackoverflow.com/comment/41793835
has comment: http://stackoverflow.com/comment/41793678
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26589415
tagged with: bootbox
has answer: http://stackoverflow.com/a/26589460
type: Question

http://stackoverflow.com/comment/41939833
has text: You'd do it for each field. That is, you'd have a separate placeholder for each field. That said jammykams answer is probably the better way of doing it.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26664351

http://stackoverflow.com/q/26526279
has comment: http://stackoverflow.com/comment/41680020
favorite count: 0
accepted answer: http://stackoverflow.com/a/26526417
has comment: http://stackoverflow.com/comment/41679960
has answer: http://stackoverflow.com/a/26526380
type: AnsweredQuestion
tagged with: list
has title: Unsorted ArraysList in JavaScript
has answer: http://stackoverflow.com/a/26526417
downvote count: 3
has answer: http://stackoverflow.com/a/26526377
upvote count: 1
has body: I am trying to generate a list with random objects at refresh. Now when I use this, it is shown "object Object" on the list below, but it doesn't generate a new list. var products = [{ name: 'Apple', price: 1.00 }, { name: 'Orange', price: 1.20 }, { name: 'Lemon', price: 1.10 }]; document.write(products[Math.floor(Math.random() * 3)]); Apple: $1.00 Orange: $1.20 Lemon: $1.10
type: Question
has comment: http://stackoverflow.com/comment/41679901
score: -2
tagged with: arrays
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/26526377

media-queries
tags question: http://stackoverflow.com/q/26649090
tag name: media-queries
type: Tag
tags question: http://stackoverflow.com/q/26624926

http://stackoverflow.com/q/26658353
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26658520
score: 3
upvote count: 3
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26658520
has body: What I need: user insert a movie title in the textbox and as soon as he/she click the button "move to selectedlist", the movie title should be moved into dropdown list (which shows the movie titles that user has selected) and the textbox should be cleared. I searched a lot, but whatever I found was the opposite (insert selected dropdown in the textbox! which is the opposite of what I need). This is what I have tried but not work (It works for moving selected options of a dropdown into another dropdown, however it does not work for textbox: &lt;input class="autofill4" type="textbox" name= "q27[]" id="q" placeholder="Enter movie titles here" /&gt; &lt;input type="button" value="Add to selected list" id="btnMove"/&gt; &lt;select id="selectedItems" name="selectedItems[]" multiple="multiple" width="200px" size="10px"&gt; &lt;/select&gt; $('#btnMove').on('click', function (d) { var selected = $("#q").val(); if (selected.length == 0) { alert("Nothing to move."); e.preventDefault(); } $('#selectedItems').append($(selected)); $(selected).remove(); d.preventDefault(); }); Any help would be highly appreciated:)
has title: move selected values form textbox to dropdpwn
has comment: http://stackoverflow.com/comment/41919099

http://stackoverflow.com/q/26658428
tagged with: image
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26658572
has answer: http://stackoverflow.com/a/51197754
score: 3
favorite count: 0
has body: I feel like this should be simple enough, but I am having trouble making this work. I have a URL that the front-end hits. This triggers node to fetch an image from another server. Next I want node to send the image as the response. This part is not working for me. render: function(img,response){ request.get(URL, function (error, res, body) { if (!error &amp;&amp; res.statusCode == 200) { response.setHeader('Content-Type', 'image/png'); response.writeHead(200); response.write(body); response.end(); } }); } Should I be buffering the image instead? FYI I am trying to do this this way because the image i need to retrieve as authentication credentials in the src path, and I don't want those exposed to the user. So if you think that there is a better solution than what I am trying, please feel free to suggest. :) Thanks!
possible better answer: http://stackoverflow.com/a/51197754
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26658572
has title: Serve image in node.js fetched from another server
upvote count: 3
tagged with: rendering

http://stackoverflow.com/q/26599079
tagged with: getelementbyid
has answer: http://stackoverflow.com/a/26599095
type: UnansweredQuestion
downvote count: 2
score: -2
has title: if statement with getElementById not working
tagged with: javascript
type: Question
upvote count: 0
answer count: 1
has body: If i try to use if statement with docoument.getElementById(id).src== something it doesnt work but when just use document.getElementById().src=Something it works...I get no error or anything when I click on on the image. // dice function function keepDice(id){ //document.getElementById(id).src="diceX1.gif"; &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; works... if(document.getElementById(id).src=="dice1.gif") document.getElementById(id).src="diceX1.gif"; else if(document.getElementById(id).src=="dice2.gif") document.getElementById(id).src="diceX2.gif"; else if(document.getElementById(id).src=="dice2.gif") document.getElementById(id).src="diceX3.gif"; else if(document.getElementById(id).src=="dice3.gif") document.getElementById(id).src="diceX4.gif"; else if(document.getElementById(id).src=="dice4.gif") document.getElementById(id).src="diceX5.gif"; else if(document.getElementById(id).src=="dice5.gif") document.getElementById(id).src="diceX6.gif"; } functionfunction roll() { var diceSum=0; if (countClicks()==true){ for(i=0; i&lt;5; i++) { d[i] = Math.floor(Math.random()*6)+1; document.getElementById("d"+i).src="dice"+d[i]+".gif"; diceSum+=d[i]; } if (/1234|2345|3456/.test(d.join("").replace(/(.)\1/,"$1"))) alert("small straight"); else if (/12345|23456/.test(d.join("").replace(/(.)\1/,"$1"))) alert("large straight"); else if (/(.)\1{2}(.)\2|(.)\3(.)\4{2}/.test(d.join("").replace(/(.)\1/,"$1"))) alert("full house"); ofAKindScore=diceSum; document.getElementById("rolls").value=ClickCount; diceSum=0; } for (i = 1; i &lt; 15; i++){ document.getElementById("s"+i).value=''; taken[i]= false; } } &lt;div style="border: solid 3px #0000ff"&gt; &lt;img id='d0' onClick="keepDice('d0')" src="dice0.gif"&gt; &lt;img id='d1' onClick="keepDice('d1')" src="dice0.gif"&gt; &lt;img id='d2' onClick="keepDice('d2')" src="dice0.gif"&gt; &lt;img id='d3' onclick="keepDice('d3')" src="dice0.gif"&gt; &lt;img id='d4' onClick="keepDice('d4')" src="dice0.gif"&gt; &lt;p&gt; Rolls Left: &lt;input id='rolls'…
favorite count: 0
has comment: http://stackoverflow.com/comment/41812587

http://stackoverflow.com/comment/42134389
type: Comment
has text: [Here](http://www.mechon-mamre.org/i/t/k/k02.htm) is one of them. (That's not my site - they provide a download of the entire site, and i'm running it on that.) I've written both to the console, and a file (UTF8 encoded, after running your decoder), and just get the question marks.
comment on: http://stackoverflow.com/a/26665409
score: 0
type: AnswerComment

django
tags question: http://stackoverflow.com/q/26586148
tags question: http://stackoverflow.com/q/26572351
tags question: http://stackoverflow.com/q/26613681
type: Tag
tags question: http://stackoverflow.com/q/26589481
tags question: http://stackoverflow.com/q/26640872
tag name: django
tags question: http://stackoverflow.com/q/26615742
tags question: http://stackoverflow.com/q/26560977
tags question: http://stackoverflow.com/q/26653721
tags question: http://stackoverflow.com/q/26646788
tags question: http://stackoverflow.com/q/26537445
tags question: http://stackoverflow.com/q/26585013
tags question: http://stackoverflow.com/q/26584984
tags question: http://stackoverflow.com/q/26536554
tags question: http://stackoverflow.com/q/26638179
tags question: http://stackoverflow.com/q/26664247
tags question: http://stackoverflow.com/q/26624945
tags question: http://stackoverflow.com/q/26558903
tags question: http://stackoverflow.com/q/26597414
tags question: http://stackoverflow.com/q/26661054

http://stackoverflow.com/a/26553837
has comment: http://stackoverflow.com/comment/41730034
type: Answer
has comment: http://stackoverflow.com/comment/41729757
answers question: http://stackoverflow.com/q/26553794
has comment: http://stackoverflow.com/comment/41729852
has comment: http://stackoverflow.com/comment/41730141
has comment: http://stackoverflow.com/comment/41729636
has body: Put var a outside EndRequestHandler(). What you're doing in your code is a closure, but it's a pointless closure at that. The function for treeImages.click is "closing around" the a variable, but given your code it doesn't really act any different than if var a were inside the treeImages.click function.
downvote count: 2
has comment: http://stackoverflow.com/comment/41729947
has comment: http://stackoverflow.com/comment/41729492
has comment: http://stackoverflow.com/comment/41729561
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/41729811
has comment: http://stackoverflow.com/comment/41730334
has comment: http://stackoverflow.com/comment/41729841

http://stackoverflow.com/a/26577227
score: 4
has comment: http://stackoverflow.com/comment/41784069
has comment: http://stackoverflow.com/comment/41775457
answers question: http://stackoverflow.com/q/26576327
has body: You're on the right track with using $compile; however, you need to pass $compile the .contents() not the .html(): // grab popover content from the next element content: $compile( $(element).siblings(".pop-content").contents() )(scope) JSFiddle
upvote count: 4
has comment: http://stackoverflow.com/comment/41775591
downvote count: 0
type: Answer

http://stackoverflow.com/a/26625139
answers question: http://stackoverflow.com/q/26624985
score: 0
has body: How i understand you do not need any JS here, pure Bootstrap is enough. I made a small sample on codepen - http://codepen.io/tanotify/pen/BsxHA I added to header .container to add width &lt;!-- Fixed navbar --&gt; &lt;div class="navbar container navbar-default navbar-fixed-top" role="navigation"&gt;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41859746
type: Answer
accepted answer of: http://stackoverflow.com/q/26624985

http://stackoverflow.com/q/26662315
has title: Resize all divs to the size of the tallest div
has answer: http://stackoverflow.com/a/26662371
accepted answer: http://stackoverflow.com/a/26662371
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6781031
type: Question
linked to: http://stackoverflow.com/q/19437476
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a div container class with a width of 15%. Inside these containers I have image, the image has a a width of 100%. The problem is that not every image has the same ratio, so some container divs are longer then others which cause my layout to "crack". Is there a way to resize all the divs to the size of the tallest div?

http://stackoverflow.com/a/26572601
has body: demo - http://jsfiddle.net/victor_007/rtgmr68L/ $('#val').on('focus', function () { val = $(this).attr('placeholder') $(this).attr('value', val) })
type: Answer
has comment: http://stackoverflow.com/comment/41763195
answers question: http://stackoverflow.com/q/26572400
score: 0

computed-properties
type: Tag
tags question: http://stackoverflow.com/q/26661238
tag name: computed-properties

http://stackoverflow.com/comment/41804294
comment on: http://stackoverflow.com/q/26594721
type: Comment
type: QuestionComment
has text: It looks like you're never adding the class `eoyValue`, so `barDemo.selectAll("text.eoyValue")` will always be empty.
score: 1

http://stackoverflow.com/a/26530722
answers question: http://stackoverflow.com/q/26530070
has body: d3.hexbin is a D3.js plugin available on GitHub. Mike has a demo of the plugin on bl.ocks.org
score: 0
type: Answer

http://stackoverflow.com/q/26636941
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30040617
has body: Using Google Charts Transition Animation, I have created a chart that can be redrawn upon clicking on the button below the chart (the full functioning code can be found below). Once the button is clicked, the chart displays new values and a new title. I change the title in the function drawChart using the following piece of code: options['title'] = 'Monthly ' + (current ? 'Test A' : 'Test B') + ' Production by Country'; Now to my problem: I would also like to change the title of the horizontal axis upon clicking on the button. Without a button (in a static version), this can be achieved by adding the following code to the options: hAxis: {title: 'Axis Title'} When I add the following piece of code to my function (behind the title adjustment shown above), however, nothing changes: options['hAxis.title'] = 'Title ' + (current ? 'Test A' : 'Test B'); Does anyone know how I need to change the code above to get the axis title to change? Here is my complete code: Thanks a lot!!
has title: Google Charts Transition Animation: How to change axis labels upon redrawing the chart?
type: Question
tagged with: google-visualization
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41882563
answer count: 1

http://stackoverflow.com/a/26752159
type: Answer
has body: In my opinion the given answers are overly complicated. Here is an anonymous function that can be used in MATLAB: next = @(x,n) ceil(x/n)*n; &gt;&gt; next(11,10) ans = 20 %# 20 is the next "10" after "11") &gt;&gt; next(110,100) ans = 200 %# 200 is the next "100" after "110" &gt;&gt; next([98,253,87, 876,263],100) ans = 100 300 100 900 300 x is the number that should be processed and n is the requested step size. edit Automation of determining the next order of magnitude is also possible &gt;&gt; nextOrder = @(x) ceil(x/10.^ceil(log10(x))) * 10.^ceil(log10(x)); &gt;&gt; nextOrder([98,253,87,876,263]) ans = 100 1000 100 1000 1000
upvote count: 0
answers question: http://stackoverflow.com/q/26661999
has comment: http://stackoverflow.com/comment/42242801
has comment: http://stackoverflow.com/comment/42214360
score: -1
downvote count: 1

http://stackoverflow.com/a/26669494
answers question: http://stackoverflow.com/q/26669184
upvote count: 7
type: Answer
downvote count: 0
has body: Try this one: var number = 5300; function NumberName(number) { switch (number.toString().length) { case 3: return "hundreds"; case 4: return "thousands"; } }
score: 7

http://stackoverflow.com/comment/41795624
type: Comment
has text: See the update above ! I still need the tabs rendering to update the code
comment on: http://stackoverflow.com/a/26589859
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41790721
type: Comment
type: QuestionComment
has text: But how will you supply the values in a click handler? You could set some data- attributes on the button beforehand I guess - or source the text from javascript global variables / or another control.
comment on: http://stackoverflow.com/q/26587809
score: 1

http://stackoverflow.com/q/26665322
type: Question
tagged with: browser
has body: Is it possible to read the m3u8 file(or any other text file for example) from an external source via http request of ajax? And not using server side(such as node.js or c#) to request the file. The file is sitting in http : // ... / file.m3u8 Thank you:)
answer count: 2
tagged with: javascript
has title: Reading external file using javascript ajax
score: 0
has answer: http://stackoverflow.com/a/26665493
type: UnansweredQuestion
tagged with: request
has comment: http://stackoverflow.com/comment/41932717
has answer: http://stackoverflow.com/a/26665491
has comment: http://stackoverflow.com/comment/41932534

http://stackoverflow.com/q/26659603
tagged with: oop
has comment: http://stackoverflow.com/comment/41921820
score: 1
has comment: http://stackoverflow.com/comment/41922158
type: Question
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26659952
tagged with: javascript
has comment: http://stackoverflow.com/comment/41922290
tagged with: slider
has comment: http://stackoverflow.com/comment/41922563
has body: Im in the process of creating my own slider library with pure JavaScript. Have a look here: http://jsfiddle.net/bingo14/bhymxrqr/1/ Im trying to return the latest 'currentValue' from the getValue() function, but its returning 0 as you can see from the initial alert. this.getValue = function getValue() { //how do I return the latest current value? return currentValue; }; How can I make this get updated every time the user moves the slider? I think I need some help with OOP principles here! Thanks.
favorite count: 0
has comment: http://stackoverflow.com/comment/41921648
accepted answer: http://stackoverflow.com/a/26659952
upvote count: 1
has title: Simple JavaScript Slider - Need some OOP help to make it work
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41922127

http://stackoverflow.com/q/26577068
has comment: http://stackoverflow.com/comment/41772324
favorite count: 0
has comment: http://stackoverflow.com/comment/41771906
has comment: http://stackoverflow.com/comment/41772004
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41772652
has title: Separating an html document by paragraphs
answer count: 0
downvote count: 0
score: 1
type: Question
has body: To my knowledge, there are many ways of formatting text into separate paragraphs in html. For example, one could have a &lt;br&gt; between two pieces of text. Or a &lt;p&gt;&lt;/p&gt; tag that breaks at the end. Or maybe even a &lt;pre&gt;&lt;/pre&gt; tag with newline characters somewhere. My question is how do I account for all these different ways if I want to isolate each paragraph in any given webpage. We need this functionality because we are creating a chrome extension that has to work on all websites. So we have to account for all ways that new paragraphs could happen.
tagged with: javascript
tagged with: google-chrome-extension
upvote count: 1
has comment: http://stackoverflow.com/comment/41775869

http://stackoverflow.com/q/26539218
type: UnansweredQuestion
tagged with: css
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/43284394
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43307726
tagged with: ios
tagged with: javascript
has body: I am testing a responsive site on some iOS devices (iPad, iPhone), and am noticing the following issue. I have a left sidebar that is styled as follows: position: fixed; top: 0; left: 0; width: 60px; height: 100% When I first load the page, the Safari or generally any browser address bar is ~ 100px, and then when the user scrolls down the address bar collapses to something closer to ~40px. However, in between the time when the user starts scrolling and when the page stops scrolling there is the 60px of gap that I can't fill with the same color as the element and thus the background-color of body shows through. Here is a screenshot to demonstrate: When page loads - looks good: http://f.cl.ly/items/2C3W1N3e1k1w0P2v051A/load.png When scrolling: http://f.cl.ly/items/2S3v3Y3b3y3e3l251J0v/scrolling.jpg I've tried to make the height of the element ~60px extra in height to make up for this or add padding, but nothing seems to fix this. On page load... if ($('html').hasClass('touch')) { var winHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; $('.sidebar').find('.strip').height(winHeight + 60); } Any suggestions or people experience similar?
tagged with: http://stackoverflow.com/tag/html
has title: Fixed position 100% height element on touch device (iOS) and resize of height
downvote count: 0
tagged with: web
has comment: http://stackoverflow.com/comment/41707497
favorite count: 0

http://stackoverflow.com/a/27693136
answers question: http://stackoverflow.com/q/26566317
has comment: http://stackoverflow.com/comment/106422334
has comment: http://stackoverflow.com/comment/50933904
has comment: http://stackoverflow.com/comment/43824050
downvote count: 2
has comment: http://stackoverflow.com/comment/46451408
upvote count: 20
score: 18
has body: the ready function can be used like this: $(document).ready(function () { React.render(&lt;App /&gt;, document.body); }); If you don't want to use jQuery, you can use the onload function: &lt;body onload="initReact()"&gt;...&lt;/body&gt;
type: Answer

http://stackoverflow.com/comment/41882857
type: QuestionComment
comment on: http://stackoverflow.com/q/26637748
has text: I am not loooking for people to validate the json, I'm asking how can I set this variable to the static json string
score: 0
type: Comment

http://stackoverflow.com/comment/41785361
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26583388
has text: see I have updated my whole source code here in my question nothing more than I have.

http://stackoverflow.com/comment/41931282
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26664721
has text: Thanks this was easier than I thought ... long day!

http://stackoverflow.com/q/26633129
favorite count: 0
type: UnansweredQuestion
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/41916297
downvote count: 1
type: Question
tagged with: ios
tagged with: javascript
tagged with: mobile-safari
has answer: http://stackoverflow.com/a/34774280
tagged with: jquery
has title: Mobile Safari - Javascript open tab without losing focus on current page
has body: I'm currently working on a webpage that, when visited, opens up two more webpages in mobile safari. The only issue is that when the new tabs are loaded, the browser is focusing on the final one to load. I've tried setting the Safari setting 'Open Links -> In Background' but this only seems to give you the option of holding down on a link then manually selecting to open the link in background (thus remaining focused on the current page). Is there anyway to automatically open a weblink in Mobile Safari using javascript without losing focus on the current webpage? Here is an example of the code I am currently using. Open Tabs
answer count: 1
has comment: http://stackoverflow.com/comment/41886274

http://stackoverflow.com/comment/41777674
comment on: http://stackoverflow.com/q/26579782
has text: Would a templating library like Handlebars be of use? http://handlebarsjs.com/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41738768
type: QuestionComment
comment on: http://stackoverflow.com/q/26558903
has text: if you're not getting the initial console.log("yeah, no"), then jQuery is not being loaded. Are you able to console.log() anything right after $(document).ready() ? I would also check your Web Developer Tools to see that all your linked scripts or external files are being loaded. Some firewalls can block certain connections
score: 0
type: Comment

http://stackoverflow.com/a/26585375
has body: @artm is right, placeholder is an attribute within input tag, Django allows you to add placeholder attribute using widget, for example: from django import forms class ExampleForm(forms.Form): name = forms.CharField(label='name', widget=forms.TextInput(attrs={'placeholder': 'Please enter your name'})) That will insert placeholder attribute that will give you exactly what you described.
answers question: http://stackoverflow.com/q/26584984
score: 1
accepted answer of: http://stackoverflow.com/q/26584984
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41786322
has comment: http://stackoverflow.com/comment/41786868
type: Answer
has comment: http://stackoverflow.com/comment/41786821
downvote count: 0
has comment: http://stackoverflow.com/comment/41786624

http://stackoverflow.com/comment/41671921
has text: @misaq Don't know?? Wasn't me.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26521446

http://stackoverflow.com/comment/41833180
type: Comment
comment on: http://stackoverflow.com/a/26609679
has text: I have one more thing to add to this. If i have select option with value "Select" in each combobox, then we have four values 'Select','1','2','3','4','5'. Now, in the above code if the user select value "Select" from combobox3, then this combobox disables this "Select" value in each combobx, which is not valid.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26992184
has body: You must register the event in app.js not in controllers. Something like this: document.addEventListener("offline", onOffline, false); function onOffline() { //Show the popup }
type: Answer
answers question: http://stackoverflow.com/q/26551516
upvote count: 2
score: 2
downvote count: 0

http://stackoverflow.com/q/26530171
type: UnansweredQuestion
has body: I am working on a HTML client, generated with LightSwitch. In Microsoft Visual Studio 2013, latest JavaScript Runtime. In the ApplicationData I defined a table "tableA", with an attribute "savingsPercent" of the type "Percent". The configuration parameter "Percent Decimal Places" is set to 2 (by default). When I use this attribute ("tableA.savingsPercent") in a screen, the showed value by the HTML client is 46.666666%. I expected 46.66%. I could solve this by using "decimal" as an attribute type and then executing a postRender method containing this code: $(element).text(parseFloat(value).toFixed(2) + "%"); but first I wanted to know if I am doing something wrong before I drop the percent-type as buggy.
has title: The percent decimal places attribute has no effect
tagged with: visual-studio-lightswitch
type: Question
tagged with: javascript
tagged with: number-formatting
tagged with: lightswitch-2013
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26531152

http://stackoverflow.com/q/26637639
has body: I have been battling this issue for a while now. In my Ember app (using ember-cli) I have a model that I would like to attach some class methods for. I would like to be able to call from my controllers Model.allWithIssues to find all of the model instances that have registered issues. To achive that, I have added a method using the following code: Model.reopenClass({ allWithIssues: function () { ... } }) My problem is, I don't have access to the data store from inside the model. I have tried in many different ways inject store:main to the model but with no luck. One answer here even claimed there is no way to inject to a model, while others suggested ways to achieve DI into models that simply didn't work. Is my approach completely wrong? Should I keep this logic in a separated class? EDIT: The solutions I had in mind are: Make a generic controller that includes this methods and have all of the controllers that need this method extend it. Some sort of mixin Make a "repository" class, working as an abstraction layer between the controllers and the store. I'm still not sure which route is the best to go in, but all of those seem too robust for something as simple as this.
score: 0
answer count: 1
tagged with: ember-cli
has answer: http://stackoverflow.com/a/26638999
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41885180
tagged with: ember.js
has comment: http://stackoverflow.com/comment/41884779
has comment: http://stackoverflow.com/comment/41885024
has title: Class methods for models with access to store
type: Question
has comment: http://stackoverflow.com/comment/41884163
has comment: http://stackoverflow.com/comment/41886377
tagged with: javascript

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/26592714

http://stackoverflow.com/a/26629819
has body: There can be a difference between how the page looks in the browser and the calculations used to determine if the text will overflow. The box model doesn't always behave as we want. That said, you can compare the innerwidth with the scrollwidth. Here is a simple example that should correspond to the ellipse showing if true: if ($('#div')[0].scrollWidth &gt; $('#div').innerWidth()) { //ellipse should be showing because the text is in overflow } I updated your fiddle and it works as I expect. Your syntax for scrollwidth wasn't correct. e.scrollWidth vs. $(e)[0].scrollWidth Updated link to the new fiddle: http://jsfiddle.net/whipdancer/67upsqq8/1/
upvote count: 6
answers question: http://stackoverflow.com/q/26629506
has comment: http://stackoverflow.com/comment/69396323
has comment: http://stackoverflow.com/comment/41869443
has comment: http://stackoverflow.com/comment/41868885
has comment: http://stackoverflow.com/comment/41868088
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41868796
score: 6
has comment: http://stackoverflow.com/comment/41869513
has comment: http://stackoverflow.com/comment/41868311

http://stackoverflow.com/comment/41819385
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26599540
has text: i agree with @HarishR. ng-if and ng-hide/ng-show would be better alternatives

http://stackoverflow.com/a/26601796
answers question: http://stackoverflow.com/q/26601753
score: 0
has body: Both are pointing to the same values in the memory when you say: var b = a; So if you change a, b will be affected and vice versa, you need to copy using a loop. EDIT use this line of code which I get from this post var b= a.slice(0);
type: Answer
has comment: http://stackoverflow.com/comment/41817353

http://stackoverflow.com/comment/64768104
has text: React treats variables as custom elements if they're capitalized or have a dot notation, else HTML elements. I.e. works too
score: 5
type: AnswerComment
comment on: http://stackoverflow.com/a/26522328
type: Comment

http://stackoverflow.com/q/26573419
score: 0
answer count: 1
has title: filter result to top 5 highest mark if checkbox is checked
has body: I am new to angularjs. My objective is to filter records of students limitto:5 if the checkbox Top 5 Mark is checked. If checkbox Top 5 Mark is unchecked, return all records that satisfy the other filters. I also have other search box to filter the records. But that is out of the scope right now. My filter code is like this for now Top 5 Marks {{item.name}} {{item.mark}} {{item.grade}}
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26573676
tagged with: javascript
has comment: http://stackoverflow.com/comment/41782447
type: Question
tagged with: angular-filters
tagged with: checkbox
tagged with: angularjs

http://stackoverflow.com/q/26607255
type: AnsweredQuestion
has title: full page js slide next section over current
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26608212
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
tagged with: fullpage.js
favorite count: 0
has answer: http://stackoverflow.com/a/26608212
has body: I'm working on a website with the FullPage.JS script. What I want is that the next section slides over the previous one. See this example I tried to make the position fixed in css and changed animation values in the jquery.fullpage.js It should be something simple but i can't find it.
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/41691273
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26522369
has text: @Wilts C, Its all done properly. am not so new to programming

http://stackoverflow.com/a/26670731
has body: "54505ced1fa5b1b519bdfc" - is only 22 characters long. It's incomplete.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26670534
answers question: http://stackoverflow.com/q/26670534
upvote count: 3
score: 3

http://stackoverflow.com/comment/41710269
has text: actually i am having 100s of other mongodb operations to perform over approx 10 databases, so i thought using a mongo shell script is better approach.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26543067
type: Comment

http://stackoverflow.com/q/26576687
favorite count: 0
has title: Why does my css/js dropdown menu hide before reaching the end of it?
tagged with: css
has answer: http://stackoverflow.com/a/26576688
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
has body: I have a simple dropdown submenu that I show when you hover a list element of a horizontal menu. I position the dropdown submenu by setting relative position to LI parent and absolute position to the container of the submenu. Then I show the submenu by listening to mouseenter with jquery and I hide it by listening to mouseleave. At first looks like everything is working fine, but after adding some content to the submenu so that it now has like 100px height I'm starting to have a problem: The mouseenter runs fine but the mouseleave gets fired a lot before reaching the end of the submenu, it gets fired when I'm half a way to reach the end. Why is this happening?
tagged with: jquery

http://stackoverflow.com/q/26606588
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41825775
score: 0
has body: I have the following javascript $(document).ready(function() { $('a[href*="profile"]:contains("David")') .closest('td').find('.fightMobster').click(); }); This searches the page content for the word 'David' and clicks the link. I'm wanting to progress this. Instead of searching the page contents, I want to search for the LINK text. For example, the link to 'David' might be http://www.example.com/164522 So I'd like to search the page for 164522 instead. Also, I'd like to implement a form where you can specify the text you are searching for. Sort of a text box where you can type 164522 and a button which starts and stops to search process.
type: Question
tagged with: javascript
has title: Use javascript to search page for link text
has comment: http://stackoverflow.com/comment/41825730
answer count: 1
has comment: http://stackoverflow.com/comment/41825639
has answer: http://stackoverflow.com/a/26606795

http://stackoverflow.com/comment/41720368
type: Comment
comment on: http://stackoverflow.com/a/26544232
has text: Ya may be someone from the space :).Iam also trying different payloads but at last i have closely encoutered...
score: 0
type: AnswerComment

http://stackoverflow.com/a/26572642
answers question: http://stackoverflow.com/q/26572615
has body: You can set a javascript variable with a php value by: &lt;script&gt; var jsVar='&lt;?php echo $phpVar ?&gt;'; &lt;/script&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/46150021
comment on: http://stackoverflow.com/q/26587304
type: Comment
has text: What do you mean by "Now I would like to force a specific database name and location."
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41797466
comment on: http://stackoverflow.com/q/26591252
type: Comment
type: QuestionComment
has text: Just add a left margin to the `img` tag?
score: 1

http://stackoverflow.com/q/26621479
score: 0
tagged with: jsp
has comment: http://stackoverflow.com/comment/41853614
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41853708
has body: How to Verify my text boxes? This is a JSP page created to take in information. First name should no have Numbers in there, I can enter the name as "103249" and the text box takes it. Also, How do I fix the last name as well? var btn = ""; function validate(myform) { if (btn == "submit") { //Validate Form only on 'submit' button (not for 'clear' button) var num = 0; var message = ""; if(myform.firstname.value == "") { message += "- First Name must be completed \n"; num = 1; } if(myform.lastname.value == "") { message += "- Last Name must be completed \n"; num = 1; } if(myform.dateofbirth.value == "") { message += "- Date of Birth must be completed \n"; num = 1; } //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.gender.length; i++) { if (myform.gender[i].checked) { //Changes value of "g" if a value is selected g = myform.gender[i].value; } } //If no radio button selected, "g" will still = "" if (g == "") { message += "- Gender must be completed \n"; num = 1; } if(myform.gpa.value == "") { message += "- GPA must be completed \n"; num = 1; } //Dropdown if(myform.education.value == "") { message += "- Education must be completed \n"; num = 1; } //Dropdown if(myform.job.value == "") { message += "- Occupation must be completed \n"; num = 1; } //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.married.length; i++) { if (myform.married[i].checked) { //Changes value of "g" if a value is selected g = myform.married[i].value; } } //If no radio button selected, "g" will still = "" if (g == "") { message += "- Married must be completed \n"; num = 1; } //if(myform.spouse.value == "") { //message += "- Spouse must be completed \n"; //num = 1; //} //RADIO BUTTON VALIDATION var g = ""; //Loop thru each radio button, verify if "checked" for (var i=0; i<myform.children.length; i++) { if (myform.children[i].checked) { //Changes value of "g" if a value is selected…
type: Question
tagged with: javascript
has title: Verify Alphabet Textbox only

http://stackoverflow.com/comment/41698011
type: Comment
type: QuestionComment
has text: You could just use a while loop `while(drop.options.length > 0){ drop.remove(0); }` It should not make a difference if it is in a form or not. Is there any JS Errors?
score: 0
comment on: http://stackoverflow.com/q/26536059

http://stackoverflow.com/comment/41774142
type: Comment
has text: Nifty! It seems like setting the defaults on the destructuring side (the way you're doing it) would always be preferred to doing it on the default parameter side (like I was). Would you agree with that? Can you think of anything to watch out for?
score: 4
type: AnswerComment
comment on: http://stackoverflow.com/a/26578323

http://stackoverflow.com/q/26591494
has body: I'm implementing bootstrap typeahead.js and trying to utilize a simple AJAX GET request like so: $("#find-company-search").typeahead({ source: function (query, process) { var companies = []; map = {}; // This is going to make an HTTP post request to the controller return $.post('/Companies/GetCompanies', { query: query }, function (data) { //console.log(data); // Loop through and push to the array $.each(data, function (i, company) { console.log(company); console.log(company.CompanyID); // Use the Name field on the display and for the map key. map[company.Name] = company; companies.push(company.Name); }); // Process the details process(companies); }); }, updater: function (item) { console.log(item); console.log(map[item]); console.log(map[item].CompanyID); var selected = map[item].CompanyID; // Put ajax code to load the company here. $.ajax({ url: "/companies/?companyID=" + selected, success: function() { alert("Success!"); } }); return item; } }); When I make the request, it hits the following controller action method: public ActionResult Index() { if (CurrentUser.IsCompany(User)) { // We need to cast to a Company list return View(new List&lt;Company&gt; { db.Companies.Find(CurrentUser.CompanyID(User)) }); } var filters = new Dictionary&lt;string, int&gt;(); var companyID = 0; Int32.TryParse(Request.Params["companyID"], out companyID); filters["companyID"] = companyID; filters["hasTickets"] = Convert.ToInt32(Request.Params["has-tickets"] == "on"); filters["hasDevices"] = Convert.ToInt32(Request.Params["has-devices"] == "on"); filters["isCustomer"] = Convert.ToInt32(Request.Params["type"] == "customer"); filters["isVendor"] = Convert.ToInt32(Request.Params["type"] == "vendor"); filters["isLead"] = Convert.ToInt32(Request.Params["type"] == "lead"); ViewBag.Filters = filters; var companies = db.Companies.Where(c =&gt; c.Hidden != true); ViewBag.CompaniesForDropdown = companies.ToList(); if (filters.Count(filter =&gt; filter.Value &lt;= 0) == filters.Count()) { // Retu…
has comment: http://stackoverflow.com/comment/41799541
has title: AJAX GET request hits Controller but doesn't go to URL in browser
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26594397
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/26593666
has comment: http://stackoverflow.com/comment/41799669
has comment: http://stackoverflow.com/comment/41799333
has comment: http://stackoverflow.com/comment/41800647
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41799334
score: 0
has comment: http://stackoverflow.com/comment/41799067
answer count: 2
has comment: http://stackoverflow.com/comment/41800682
has comment: http://stackoverflow.com/comment/41800549
tagged with: asp.net-mvc

http://stackoverflow.com/q/26638034
has title: making iris's color selector dissappear when it's not in focus
has body: My HTML: &lt;input type="text" id='color-picker' value="#bada55" /&gt;&lt;br /&gt; My Javascript: jQuery(document).ready(function($){ $('#color-picker').iris(); $('#color-picker').blur(function() { $('#color-picker').iris('hide'); }); $('#color-picker').focus(function() { $('#color-picker').iris('show'); }); }); My JSFiddle: http://jsfiddle.net/vdmw1knL/3/ Without the blur / focus stuff if you click on the text input the color picker will appear and never go away. With the blur / focus stuff if you click on the color picker it'll appear but then it'll go away if you actually select a color. I want the color picker to go away if either the text input that it's attached to or the html composing itself go out of focus. Clicking on a color within the color picker ought not make it go away. Unfortunately, I don't know how to make it do this. Any ideas?
type: Question
possible better answer: http://stackoverflow.com/a/26638602
has answer: http://stackoverflow.com/a/26638625
accepted answer: http://stackoverflow.com/a/26638625
tagged with: javascript
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/41883459
favorite count: 0
has answer: http://stackoverflow.com/a/26638602
upvote count: 5
has comment: http://stackoverflow.com/comment/41883579
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 4
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/26514396
has comment: http://stackoverflow.com/comment/41659065
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/41658706
type: Question
has comment: http://stackoverflow.com/comment/41658850
has comment: http://stackoverflow.com/comment/41658928
tagged with: javascript
has body: This app is a Contact Manager. And I want when user is filling the form and click save the contacts which appears to be stored in local storage so I could remove some of them etc. Adding and removing are working but it's not storing. Here is the app: http://jsfiddle.net/vpbj32Lh/ The problem in this lines: self.load = function(){ self.contacts = localStorage.getItem("stored_contacts"); } self.save = function(){ localStorage.setItem("stored_contacts", self.contacts); self.contacts=localStorage.getItem("stored_contacts"); console.log(self.contacts.length); } If you delete this lines and "data-bind="click: save" in html file. It willbe adding and removing but not saving and loading
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41658639
answer count: 1
accepted answer: http://stackoverflow.com/a/26516286
has comment: http://stackoverflow.com/comment/41659128
has title: LocalStorage in Contact Manager (knockoutjs)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26516286
has comment: http://stackoverflow.com/comment/41658964

http://stackoverflow.com/comment/41880425
score: 0
type: Comment
has text: that is great an all but I need to use an onchange in my drop down line
type: AnswerComment
comment on: http://stackoverflow.com/a/26636381

http://stackoverflow.com/q/26537486
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26537574
has answer: http://stackoverflow.com/a/26537550
accepted answer: http://stackoverflow.com/a/26537550
downvote count: 0
type: Question
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/26537574
has title: Radio button clears text boxes
answer count: 2
has body: I have two radio buttons: Click the first radio button and a three textboxes appear if they start entering information and then change their mind and select the second radio button it does not clear the text they have entered. So what I am trying to figure out is if there is a way make it clear the text from those textboxes when a new radio button (of the same group) is chosen. Any help is greatly appreciated! http://jsfiddle.net/k0paz2pj/ Lien No Lien Lienholder Name: Lienholder Address: Date of Lien:
tagged with: javascript
tagged with: jquery
favorite count: 0
upvote count: 3

http://stackoverflow.com/q/26663802
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I am loading my navbar into each page with $("#navbar-partial").load("navbar.html) at the bottom of the page in script tags. The navbar list code is below: Ive tried this and some variations of this but cant get it to work: $(document).ready(function () { $('.nav li').on('click', function (e) { $(this).addClass('active').siblings().removeClass('active'); }); }); This is in the same script tag at the bottom of the html page, after the load call. Any ideas? Thanks
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 1
has answer: http://stackoverflow.com/a/26663857
has answer: http://stackoverflow.com/a/26663896
upvote count: 1
type: Question
tagged with: javascript
has title: Changing HTML list item to active in navbar
answer count: 2

http://stackoverflow.com/comment/41773985
has text: That's what happens when you bind event handlers inside other event handlers.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26578359

http://stackoverflow.com/a/50990385
type: Answer
has comment: http://stackoverflow.com/comment/88976000
answers question: http://stackoverflow.com/q/26644885
score: 0
has body: You can try this one, var infowindow; google.maps.event.addListener(map, 'click', function( event ){ if(isInfoWindowOpen(infowindow)) infowindow.close(); infowindow = new google.maps.InfoWindow({ content:"Latitude: "+String(event.latLng.lat()).substring(0,7)+" "+"&lt;br/&gt;Longitude: "+String(event.latLng.lng()).substring(0,7), position: event.latLng }); infowindow.open(map); }); function isInfoWindowOpen(infoWindow){ if(infoWindow == null) return false; var map = infoWindow.getMap(); return (map !== null &amp;&amp; typeof map !== "undefined"); }

http://stackoverflow.com/comment/41891293
comment on: http://stackoverflow.com/a/26642261
score: 1
type: AnswerComment
has text: What do you mean by freeze? JavaScript is single-threaded, so only one function is running at any one time.
type: Comment

http://stackoverflow.com/comment/41686332
type: Comment
score: 0
has text: Doesn't work in Chrome, but it's a good solution overall. However I'm still curious about the whole canvas vs not canvas thing.
type: AnswerComment
comment on: http://stackoverflow.com/a/26516871

http://stackoverflow.com/comment/41916387
type: Comment
comment on: http://stackoverflow.com/q/26655972
has text: @Sly But I'm using external .js I have to nest everything in the Submit button. If I create another function won't it not work? I have got other codes all nested in the function confirmSubmit() .
score: 0
type: QuestionComment

http://stackoverflow.com/a/26655542
has body: CSS: #horizontalmenu { z-index: 10; } z-index represents the "altitude", the bigger the number the higher it is. The default being 0.
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26655482
downvote count: 0

http://stackoverflow.com/q/26583480
accepted answer: http://stackoverflow.com/a/26583549
has title: JavaScript pluck and process values in an array
upvote count: 0
has body: I have a JavaScript array containing objects with few attributes. I want to create a new array from this array containing the value of "name" attribute of the objects. Also, I want to process the "name" by using jQuery's _.escape method. I can see that "pluck" of underscore can be quite handy in getting an array of "name" attribute values. However I could not find if there is any way to process the value while plucking so that I do not need to iterate over the array and call _.escape on each. Any help?
answer count: 1
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
tagged with: underscore.js
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26583549
tagged with: javascript
score: -1

http://stackoverflow.com/comment/54999488
comment on: http://stackoverflow.com/a/27238298
type: AnswerComment
score: 1
type: Comment
has text: Yes. In fact I added it below the "onReveivedError" function.

http://stackoverflow.com/a/26672634
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26672549
type: Answer
has comment: http://stackoverflow.com/comment/41945319
upvote count: 3
has body: jQuery .fadeToggle() method will take a bit of time to execute and is executed in parallel [look for promises in jQuery]. In your code you are checking the visibility of the table as soon the fadeToggle is called, so it did not have time to complete yet. Probably you want to check the visible after the function is completed. You would have to use a callback if you want to check when that toggle function is completed $(function() { $( "#tabla" ).hide(); // We start hiding it. $("#boton").click(function() { var tabla = $("#tabla"); tabla.fadeToggle( "fast", "linear" , function(){ // This function will be called when the fade function completes // An tell us if it is visible or not if (tabla.is(":visible")) { alert("It's visible"); // TODO Change button text. } else { alert("It isn't visible"); // TODO Change button text. } }); }); }); You can have a look on the logic behind deferred and promises in this page or a video that is explaining them.
score: 3
accepted answer of: http://stackoverflow.com/q/26672549

http://stackoverflow.com/comment/41716309
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26527141
has text: Thanks Dmitry, There was an animation flick when scrolling top (when inside the `p`). I have updated your answer.
type: Comment

http://stackoverflow.com/a/26649068
has body: so you need to add class "active" when menu-item is clicked and the element (#main and other) is visible on the screen. to add "active" class on clicked, do this: jQuery('.menu-item').click(function(){ jQuery('#menu-main-menu li').removeClass('active'); jQuery(this).removeClass('menu-item').addClass('menu-item active'); }); to check element visibility please read this post Check if element is visible after scrolling
score: 0
has comment: http://stackoverflow.com/comment/41903210
type: Answer
has comment: http://stackoverflow.com/comment/41918254
has comment: http://stackoverflow.com/comment/41902807
has comment: http://stackoverflow.com/comment/41918647
answers question: http://stackoverflow.com/q/26648008

http://stackoverflow.com/a/26556137
accepted answer of: http://stackoverflow.com/q/26555843
type: AcceptedAnswer
has body: Try the following code var session = require('express-session'); var MongoStore = require('connect-mongo')(session); var store = new MongoStore({ url : 'localhost', db : 'session_db', collection : 'session' }); app.use(session({store: store ,secret: 'dfjhsksdfdhfr879487',saveUninitialized: true,resave: true, cookie:{httpOnly: true, maxAge:1000*60*60*7 }}));
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26555843

http://stackoverflow.com/comment/41664483
type: AnswerComment
score: 0
has text: With the above class, suppose that there are 4 points. User click on point 1: [Point1] User click on point 2: [Point1, Point2], line from point 1 to point 2 User click on point 3: [Point2, Point3], line from point 2 to point 3 User click on point 4: [Point3, Point4], line from point 3 to point 4
comment on: http://stackoverflow.com/a/26516946
type: Comment

http://stackoverflow.com/comment/41917734
type: AnswerComment
has text: Yes, this is applying mixing pattern on object prototype. Cool thing, because you don't have to mess with library source code to make some tweaks. Basically you don't change anything about original library code, just wrap it with your own function.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26654805

http://stackoverflow.com/comment/41918814
score: 0
type: QuestionComment
type: Comment
has text: @Mathletics yeah you're probably right, but his syntax would never produce the expected result so I was confused.
comment on: http://stackoverflow.com/q/26657960

http://stackoverflow.com/comment/41703438
has text: Note sure if casper's `then` works differently than the standard promise `.then`, so, would `casper.then(function(){ return someValue; }).then(function(a) { });` work as well?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26538659
type: AnswerComment

http://stackoverflow.com/comment/41894506
type: AnswerComment
comment on: http://stackoverflow.com/a/26644027
type: Comment
has text: Yes, I know, but just as I need it to do. You do not know how to solve that problem?
score: 0

http://stackoverflow.com/q/26567153
tagged with: javascript
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/26579726
has answer: http://stackoverflow.com/a/26887943
accepted answer: http://stackoverflow.com/a/26887943
tagged with: spring-security
favorite count: 0
has body: I am using Spring-Boot 1.1.7, with spring security, html (no thyme-leaf) and javascript. I am unable to get my login to work correctly when I use javascript to submit my login. When I use html with a form, spring-security picks up the requests, authenticates and proceeds happily. But with Javascript, I get a 302 redirect and no authentication. Here is my configuration: @ComponentScan @EnableAutoConfiguration @EnableGlobalMethodSecurity(securedEnabled = true) public class MyApplication { public static void main(String[] args) { ApplicationContext edm = SpringApplication.run( MyApplication.class, args ); } } @Configuration @EnableWebMvcSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private CustomUserDetailsService customUserDetailsService; @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/").permitAll() .antMatchers("/menu").permitAll() .antMatchers("/error").permitAll() .antMatchers("/resources/**").permitAll() .antMatchers("/css/**").permitAll() .antMatchers("/js/**").permitAll() .antMatchers("/fonts/**").permitAll() .antMatchers("/libs/**").permitAll(); http .formLogin().failureUrl("/login?error") .defaultSuccessUrl("/") .permitAll() .and() .logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")).logoutSuccessUrl("/") .permitAll(); http .sessionManagement() .maximumSessions(1) .expiredUrl("/login?expired") .maxSessionsPreventsLogin(true) .and() .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED) .invalidSessionUrl("/"); http .authorizeRequests().anyRequest().authenticated(); } @Override public void configure(AuthenticationManagerBuilder auth) throws Exception { PasswordEncoder encoder = new BCryptPasswordEncoder(); auth.userDetailsService( customUserDetailsService ).passwordEncoder( encoder ); } @Override public void configure(WebSecurity security){ security.ignoring().antMatchers("/css/**","/fonts/**","/libs/**"); } } And I have my own UserD…
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26579726
has title: spring boot / spring security is ignoring /login call from javascript
type: Question
tagged with: spring-boot

http://stackoverflow.com/q/26524561
tagged with: post
answer count: 1
tagged with: javascript
has body: I have php webpage with js function: function send_answer(){ $.ajax({ type: 'POST', url: '../path2file/file_mine.php', data: {dbf1:1, us:1, re:1}, success: reload (), }); return false; } I have created php with code inside $dbf1=$_POST['dbf1']; $us=$_POST['us']; $re=$_POST['re']; "UPDATE `table` SET `app` = '$dbf1' WHERE `user_id` = '$us' AND reqn= '$re'" DB connection and file-mine.php generally are ok. If I run php with values ($dbf1=1;..) instead of $_POST everything is ok and mysql is updated. WHEN I activate function send_answer () it just reloading page, not UPDATE mySQL. :(
accepted answer: http://stackoverflow.com/a/26524629
score: 0
has title: GET_POST doesn't work
tagged with: php
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26524629

http://stackoverflow.com/comment/41778281
type: Comment
has text: Thought as much. The `addEventListner` ones are trivial, since they disappear with the initial text replacement.
comment on: http://stackoverflow.com/a/26580406
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41822692
has text: You're welcome. Since it is correct one, I'll post it as an answer soon.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26604164

http://stackoverflow.com/q/26631959
has title: backbone fetch url data formatting error
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
tagged with: url
tagged with: javascript
has body: I am using a backbone collection to fetch some data. in my options passed into fetch I have a string parameter that is added to the url: options = {data: {sterm: "hello world"}} when backbone runs the fetch on this the url contains sterm=hello+world which isn't accepted by the backend it needs to be of the format: sterm=hello%20world so I changed the options to: options = {data: {sterm: encodeURIComponent("hello world")}} then when the fetch is executed it contains the correctly formatted query parameter, however if I pass in a string with a % in it, then encodeURIComponent seems to change % for %25 which I understand is correct, but then inside backbone fetch it gets changed to %2525 which is wrong. Is there any way to configure backbones fetch so it doesnt chagne %25 to %2525?
has answer: http://stackoverflow.com/a/26632148
answer count: 1
favorite count: 0
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/26632148

http://stackoverflow.com/q/26546100
has comment: http://stackoverflow.com/comment/41715186
has answer: http://stackoverflow.com/a/26547387
has comment: http://stackoverflow.com/comment/41715161
has body: Hi guys I am struggling to add/remove active class of twitter bootstrap indicator when user clicks on indicator or slider arrow. Can anyone help me with this one: here is code: $('.carousel-indicators li, .carousel-control').on("click",function(){ $('.carousel-indicators li.active').removeClass("active"); $(this).addClass("active"); Here is jsFiddle Here is working jsFiddle without swipe feature. Curently it works with numbers but when user clicks on any arrows or swipes it removes class only without adding to indicator new active class. Searching for example!!
possible better answer: http://stackoverflow.com/a/26547387
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41715145
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26547181
has comment: http://stackoverflow.com/comment/41715172
has title: On click add remove class
has comment: http://stackoverflow.com/comment/41716128
has comment: http://stackoverflow.com/comment/41715480
type: Question
has comment: http://stackoverflow.com/comment/41716063
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41715377
accepted answer: http://stackoverflow.com/a/26547181
has comment: http://stackoverflow.com/comment/41715599
score: 0
answer count: 2

file-upload
tags question: http://stackoverflow.com/q/26540032
tags question: http://stackoverflow.com/q/26657489
type: Tag
tags question: http://stackoverflow.com/q/26625649
tags question: http://stackoverflow.com/q/26667832
tags question: http://stackoverflow.com/q/26619092
tags question: http://stackoverflow.com/q/26628931
tags question: http://stackoverflow.com/q/26549942
tags question: http://stackoverflow.com/q/26662881
tag name: file-upload
tags question: http://stackoverflow.com/q/26569521
tags question: http://stackoverflow.com/q/26628976
tags question: http://stackoverflow.com/q/26666867

http://stackoverflow.com/q/26565688
type: UnansweredQuestion
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/41750563
type: Question
answer count: 2
has body: I'm testing out some layout coding in jsfiddle before implementing it on the site I'm working on. Not sure if this is a jsfiddle specific question, but the click event on the triangle doesn't seem to be working. Jsfiddle var $MenuTriangle = $(".menu.triangle"); $MenuTriangle.click(function () { alert("click handler called"); if ($(this).css("transform") == 'none') { $(this).css("transform", "rotate(90deg) translate(1px,1.5px)"); $(this).css("-webkit-transform", "rotate(90deg) translate(1px,1.5px)"); $(this).css("-moz-transform", "rotate(90deg) translate(1px,1.5px)"); $(this).css("-ms-transform", "rotate(90deg) translate(1px,1.5px)"); $(this).css("-o-transform", "rotate(90deg) translate(1px,1.5px)"); } else { $(this).css("transform", ""); $(this).css("-webkit-transform", ""); $(this).css("-moz-transform", ""); $(this).css("-ms-transform", ""); $(this).css("-o-transform", ""); }); It seems like pretty typical stuff, so I'm not sure what the issue is. I'm pretty sure jsfiddle adds the $(document).ready(....) for you, but in either case, the code doesn't even work when I add it myself, so I don't think that's the issue. Can anyone spot what I'm missing? Thanks!
upvote count: 0
has title: jQuery click event not working?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41750562
favorite count: 0
has comment: http://stackoverflow.com/comment/41750922
has answer: http://stackoverflow.com/a/26565731
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26565725

http://stackoverflow.com/a/26587655
score: 0
answers question: http://stackoverflow.com/q/26587571
type: Answer
has body: Try jQuery Autocomplete one two three

http://stackoverflow.com/q/26554950
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
answer count: 0
has title: iOS8 Mobile Safari Canvas issue
type: Question
has comment: http://stackoverflow.com/comment/64264967
has comment: http://stackoverflow.com/comment/48852281
tagged with: ios
tagged with: javascript
has body: I have the following code: function resizeBase64Img(base64, coeficient) { var sizeGetter = new Image(); sizeGetter.src = base64; var height = sizeGetter.height*coeficient; var width = sizeGetter.width*coeficient; var canvas = document.createElement("canvas"); canvas.width = width; canvas.height = height; var context = canvas.getContext("2d"); var deferred = $.Deferred(); $("&lt;img/&gt;").attr("src", base64).load(function() { context.scale(width/this.width, height/this.height); context.drawImage(this, 0, 0); deferred.resolve($("&lt;img/&gt;").attr("src", canvas.toDataURL())); }); return deferred.promise(); } See complete in: http://jsfiddle.net/mz38qh8x/ Basically what it does is it grabs an image from an input[type=file] and then uses canvas to resize the image before appending it to the body. This works fine on Chrome in OSX. In Mobile Safari (iOS 8.1) the appended image has an empty src * sometimes *, some images so work, but most fail. I tried also using the desktop safari to troubleshoot, and it simply stops working when it gets to the canvas related instructions. I've looked around for known bugs, but the only thing I could find was this, although I don't seem to breaking the rules stated there. Is this just simply poor canvas support on iOS8? Have I missed something? EDIT #1: Apparently there's also another issue, which I'll be looking at. (Stackoverflow won't let me post the link) EDIT #2: The error seems to be this: var canvas = document.createElement("canvas"); canvas.width = width; canvas.height = height; Canvas is not setting its width and height properly. They remain as undefined as per the inspector in Mobile Safari.
tagged with: canvas
downvote count: 0
favorite count: 0
upvote count: 2

http://stackoverflow.com/a/26640993
answers question: http://stackoverflow.com/q/26639683
type: Answer
has body: This will output all contacts with their properties as nested unordered lists. I have given classnames to the elements for easy styling. Start just below your var contacts. function theContacts() { var body = document.getElementsByTagName('body')[0], outerUL = document.createElement('ul'), length = contacts.length; outerUL.className = 'contactlist'; for (var i = 0; i &lt; length; i++) { var cont = contacts[i], li = document.createElement('li'), ul = document.createElement('ul'); li.className = 'contact'; li.innerHTML = cont.fname + ' ' + cont.lname; ul.className = 'infos'; for (var key in cont) { var info = document.createElement('li'); info.className = key; info.innerHTML = cont[key]; ul.appendChild(info); } li.appendChild(ul); outerUL.appendChild(li); } body.appendChild(outerUL); } The problem you had results from confusion with var li inside theContacts().
has comment: http://stackoverflow.com/comment/41889728
accepted answer of: http://stackoverflow.com/q/26639683
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26533996
answers question: http://stackoverflow.com/q/26529941
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26529941
has body: Here is an package called xmldom that provides an implementation of the DOM Api for node.js npm install xmldom If you want support for XPath with document.evaluate(), check out xpath package. npm install xpath
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26533794
has comment: http://stackoverflow.com/comment/41695320
answers question: http://stackoverflow.com/q/26533489
has body: I'd suggest having a single element instead of 3. Also, use a recursive function to swap the image every 2 seconds. Lastly note the javascript has been moved inside the element where it should be. Update: This has been tested and works great - had to fix a few bugs - here's the updated code:
score: 0
has comment: http://stackoverflow.com/comment/41694526
type: Answer
has comment: http://stackoverflow.com/comment/41694792

http://stackoverflow.com/q/26661084
has comment: http://stackoverflow.com/comment/41932490
tagged with: phpexcel
has comment: http://stackoverflow.com/comment/41925375
answer count: 0
has comment: http://stackoverflow.com/comment/41932520
type: Question
tagged with: javascript
tagged with: export
score: 0
has title: Export excel file using PHPExcel
has body: I am working on a application and trying to export Excel file using PHPExcel, data was manipulated/generated by some javascript methods so it's not on server.I have methods to export CSV and PDF files but i am trying to get that data in Excel file in some custom format. Here is gist of few files: https://gist.github.com/gupta2205/959be9a10dbe1857609f I am curious what can i write in here public function export($Sets, $disp_filter) { $excel_out = new PHPExcel(); $excel_out-&gt;setActiveSheetIndex(0); var_dump($excel_out); $csv_out = $this-&gt;outputHumanReadableFilter($disp_filter); $csv_out []= array(); $csv_out = array_merge($csv_out, $this-&gt;outputSampleDetails($Sets)); $csv_out []= array(); $csv_out = array_merge($csv_out, $this-&gt;outputQuestions($Sets)); $fp = fopen('php://output', 'w'); ob_start(); $rowCount = 1; foreach ($csv_out as $line) { $colCount = 'A'; $col_values = explode(',', $line); foreach($col_values as $col_value){ $excel_out-&gt;getActiveSheet()-&gt;setCellValue($colCount.$rowCount, $col_value); $colCount++; } $rowCount++; } return $excel_out; } How can i get the data in excel sheet ? Sorry it might be lil silly question but i'm new to PHP and PHPExcel.
type: UnansweredQuestion

http://stackoverflow.com/comment/41907782
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26649056
has text: I didn't say application, I said applicable. One such variable would be the price.
score: 0

http://stackoverflow.com/q/26527665
upvote count: 0
score: -2
has title: Array becomes undefined after pushing an object
tagged with: arrays
tagged with: javascript
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26527719
type: AnsweredQuestion
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/26527719
has body: I have a JavaScript array I define in the following way: var img_files = {}; This works fine, and when I say console.log(img_files), I get a fine response. However, when i do the following: console.log(data.key); console.log(img_files); img_files.push({ path: data.key }); console.log(img_files); I get: 811ab0b1-24c3-4274-b59c-5feb80e10130.jpg Object {} Uncaught TypeError: undefined is not a function So after I push my object, I get an undefined of my array. What am I missing here?

http://stackoverflow.com/a/26659893
has body: You haven't included the bootstrap.js in your document. It has the code to make it work.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41927702
accepted answer of: http://stackoverflow.com/q/26659791
has comment: http://stackoverflow.com/comment/41923468
has comment: http://stackoverflow.com/comment/41922771
score: 2
answers question: http://stackoverflow.com/q/26659791
upvote count: 2
has comment: http://stackoverflow.com/comment/41961310
has comment: http://stackoverflow.com/comment/41925810
type: AcceptedAnswer

http://stackoverflow.com/a/26673984
score: 0
answers question: http://stackoverflow.com/q/26625042
type: Answer
has body: You can control position for each of dataLabels using point.dataLabel.x/y values: http://jsfiddle.net/z2jyz7Ln/1/ Code: data: [ [-0.25, 29.5], { x:3.25, y:29.5, dataLabels: { y: 20, x: -20 } } ], Unfortunately you need to detect dataLabels collision on your own, Highcharts doesn't provide such method.

http://stackoverflow.com/comment/41869184
has text: Yes i know. Thats what am trying to fix now. But i cant get a correct path if i dont put it manually. If i put this ~/ in front of the href="~/<% =strLinkPath %>" i get this path PRODUCTPDF/5.pdf which is a bit better i think. But still i cant fix this %3C%25#%20Eval(strLinkPath)%20%25%3E
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26628383

http://stackoverflow.com/comment/41911754
comment on: http://stackoverflow.com/a/26640883
has text: @Yuriy Galanter, based on what people are saying (and the fact that it was working properly before) it seems like the issue is probably not with my javascript, but something in my local environment. Does that seem likely to you as well, and do you have any idea what might cause something like that?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41672163
type: QuestionComment
comment on: http://stackoverflow.com/q/26521258
has text: @JanR Yep your right. It works in FF, but no one else!
score: 0
type: Comment

http://stackoverflow.com/q/26598194
has comment: http://stackoverflow.com/comment/41810956
has comment: http://stackoverflow.com/comment/41810845
has comment: http://stackoverflow.com/comment/41810889
tagged with: sql
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41810859
has comment: http://stackoverflow.com/comment/41811112
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/41810977
has answer: http://stackoverflow.com/a/26598331
accepted answer: http://stackoverflow.com/a/26598331
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
tagged with: php
downvote count: 1
has title: Gather data from user, pass though PHP and use in SQL query
type: Question
has body: When the user clicks Submit button, I need to UPDATE the data in database with SQL in my PHP code but the SQL code also needs the value from form inputs in the HTML. I tried combining Javascript with the SQL code but with no luck (I knew this code probably wouldn't work but I wrote it to get the point across). $sql = "UPDATE postsTable SET ApplicationName=\"" . . "\" WHERE PostID=3;"; $result = $conn->query($sql); How do I get data from an HTML form into PHP?
type: AnsweredQuestion

http://stackoverflow.com/comment/41735847
type: AnswerComment
score: 0
type: Comment
has text: I think there are no solutions for what I've ask. It's not scope on javascript anymore. I guess I have to defined all of my constructor like 'function Name1() {}, function Name2() {}, ect...' to achieve what I want.
comment on: http://stackoverflow.com/a/26556973

http://stackoverflow.com/comment/41888185
type: Comment
comment on: http://stackoverflow.com/a/26600281
has text: Thanks BigBadaboom. Your suggestions made me a happy man. See http://www.drdelmath.com/sketch_parabola/index.html in FF at high resolution (I still have some work to make it behave at lower resolution). HOWEVER, it only seems to work in FF and I think it is because most of the other browsers (especially IE) do not support SVG animate. For lines I can acc
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41832385
type: Comment
has text: Crowder got it now. Thanks
type: AnswerComment
comment on: http://stackoverflow.com/a/26605269
score: 0

http://stackoverflow.com/comment/41756128
has text: @Robert Uh! You won, ahah... it expected a `HTMLElement` object. It was so simple, thank you
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26568463

http://stackoverflow.com/a/26651818
type: Answer
has comment: http://stackoverflow.com/comment/41908009
answers question: http://stackoverflow.com/q/26651632
score: 0
has body: on is a function, not a DOM event. The event is still called 'change': $('#fileCtrl').on('change', function (event) { alert(1); });

http://stackoverflow.com/q/26653754
type: Question
has comment: http://stackoverflow.com/comment/41911144
has comment: http://stackoverflow.com/comment/41911986
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41927800
tagged with: iphone
tagged with: jquery
type: UnansweredQuestion
tagged with: android
tagged with: twitter-bootstrap-2
has comment: http://stackoverflow.com/comment/41913888
has title: Why the bootstrap button which is working on browsers on PC and laptop is not working on devices like smartphones and tablets?
has comment: http://stackoverflow.com/comment/41911053
answer count: 0
has comment: http://stackoverflow.com/comment/41911239
has body: I'm using bootstrap framework v2.0.1 for my website. There is one button on my page which is working fine on browsers when the site is viewed on a PC or laptop. The issue is on devices like smart phones and tablets. I tried to detect the issue with the help of firebug console but there is no such error or warning come. That means the jQuery code is working absolutely fine. So I'm not getting what is the issue in the button to work on devices. Can someone please help me in this regard? The code is as follows: My Profile Change Password

http://stackoverflow.com/comment/41925375
comment on: http://stackoverflow.com/q/26661084
type: Comment
type: QuestionComment
score: 0
has text: Give me the initial idea how can i start with getting data into cells

http://stackoverflow.com/a/26568265
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41755911
has comment: http://stackoverflow.com/comment/41756527
has comment: http://stackoverflow.com/comment/42083376
answers question: http://stackoverflow.com/q/26568156
has body: setTimeout calls the function after a specified delay, it doesn't set an interval, you could use the setInterval function, but it's a terrible idea in this case. You should select the target generated elements whenever you generate them and then call the method on those specific elements. There is no solid/nice way for handling this issue.
has comment: http://stackoverflow.com/comment/41756016
type: Answer
accepted answer of: http://stackoverflow.com/q/26568156
has comment: http://stackoverflow.com/comment/41755759
has comment: http://stackoverflow.com/comment/41757393
has comment: http://stackoverflow.com/comment/41755748
has comment: http://stackoverflow.com/comment/41756210
downvote count: 0
has comment: http://stackoverflow.com/comment/41756631
has comment: http://stackoverflow.com/comment/41756638
has comment: http://stackoverflow.com/comment/41755888
score: 2
has comment: http://stackoverflow.com/comment/41756235
upvote count: 2

http://stackoverflow.com/q/26632636
type: UnansweredQuestion
has title: Saving dynamically added rows in PHP and JavaScript
tagged with: php
score: 3
upvote count: 3
has body: I have a form with dynamically added rows. It works. After filling form fields and click on submit button "check correctness", validation is preformed. If the data are wrong it needs a correct. If data are correct we get a new submit button "generate pdf" for generated PDF files. After data validating the data entering by user should be still visible. It works too in my form. The problem is when I add some rows. After filling its and click on submit "check correctness" the new added rows are disappearing with its data. Do anybody knows how can I save this rows after validate? This is my HTML code for dynamically added fields: $oForm->formHTML(' title '); $oForm->formHTML(addRows2()); function addRows(){ $personsArray = $_POST['persons']; $html = ' '; return $html; } And this is JavaScript code for that. This is some PHP: if($_POST["ACT"] == NULL){ $oForm->formInput(array( 'type'=>'hidden', 'name'=>'ACT', )); $oForm->formInput(array( 'id' =>'counter', 'type'=>'hidden', 'name'=>'counter', 'value'=>0)); $oForm->formSubmit(array( 'name' => 'sprawdzPoprawnosc', 'value' => 'check correctness' )); } There is some screens: Its single row: 1 2.It's after adding two rows. I want after page refreshing still have form like this(3 rows and data into its): 3.It's how it look like now, after page refreshing: Can you help me?
tagged with: forms
tagged with: rows
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41873334
has comment: http://stackoverflow.com/comment/41873555
has comment: http://stackoverflow.com/comment/41873362
has answer: http://stackoverflow.com/a/26635252
favorite count: 0

http://stackoverflow.com/q/26613363
favorite count: 0
score: 0
has title: Global delaration of variables in JavaScript
has comment: http://stackoverflow.com/comment/41838286
has body: Here are two code examples of global delarations: var globalVariable = 'something'; and globalVariable = 'something'; Whats the difference between those solutions or does it even have one? Which one is the better solution? Should I avoid one of those solutions? And if yes, why? EDIT: both of them are defined in a global level.
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26613511
upvote count: 2
has answer: http://stackoverflow.com/a/26613445
answer count: 2
downvote count: 2
tagged with: javascript

http://stackoverflow.com/q/26620415
has title: Trying to add javascript using itext for displaying leading zeros. Affecting other fields
tagged with: javascript
score: 0
has body: I am trying to add javascript using iText to display leading zeros in PDF fields, which are otherwise not getting displayed. I mean, if I am adding '0044' into a field, its getting displayed as '44'. So I added following Javascript using itext. stamper.add("this.getField('TEST_FIELD').value = util.printf(\"%04d\",this.getField('TEST_FIELD').value)"); While that is working fine, it is affecting other fields in the PDF in a weird way. If any other numeric fields have values like $1.00, they are getting displayed as 1. I am unable to figure it out in what way its affecting other fields.
has comment: http://stackoverflow.com/comment/41873968
has comment: http://stackoverflow.com/comment/41874017
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf
tagged with: adobe
answer count: 0
tagged with: itext
type: Question
has comment: http://stackoverflow.com/comment/41885968
has comment: http://stackoverflow.com/comment/41864976

http://stackoverflow.com/comment/41775152
score: 0
has text: Quick clarification, you want to get something like this? `Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36 `
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26578140

http://stackoverflow.com/comment/41805198
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26595135
has text: So could you guys suggest something to watch whether the element gets a class?

http://stackoverflow.com/comment/41833708
score: 0
type: Comment
has text: What is `#container` referring to?
comment on: http://stackoverflow.com/a/26610978
type: AnswerComment

http://stackoverflow.com/q/26567156
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/26567411
has title: Add new elements to a javascript object dynamically
has body: I'm trying to do a page with HTML and JQuery. What I want to do with this is typing an e-mail in a textbox and when a button is pressed, add him to an object, and show the new e-mail added and the ones already sent. My problem is that the new e-mail replace the one I had, It's not added after it. How can I solve it? Here's my code enter code here Ingresar correo electr&oacutenico Correos electr&oacutenicos
tagged with: object
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26567411
type: Question
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/41856206
type: AnswerComment
has text: Thanks so much for this - I actually implemented an earlier answer already, but I've upvoted and really appreciate your efforts.
comment on: http://stackoverflow.com/a/26618532
type: Comment
score: 0

http://stackoverflow.com/comment/41880204
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26636378
type: AnswerComment
has text: Can you expand on this and show me how I can compare both returned values. I can see how it works in the console, but don't know how I would use it just yet.

http://stackoverflow.com/q/26629864
has title: Failed to setup marker on google maps
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26630120
accepted answer: http://stackoverflow.com/a/26630246
has answer: http://stackoverflow.com/a/26630120
has comment: http://stackoverflow.com/comment/41868843
score: 0
tagged with: google-maps
tagged with: javascript
has body: Hi i am trying to implement marker on Google maps but it is not working , I am pasting my script mere Please tell me where i am doing it wrong. thank you &lt;script&gt; var map; function initialize() { var Longitude = document.getElementById('Longitude').value; var Lattitude = document.getElementById('Lattitude').value; console.log(Longitude + '' + Lattitude); var map_canvas = document.getElementById('map_canvas'); var isDraggable = $(document).width() &lt; 1000 == false; var map_options = { center: new google.maps.LatLng(Lattitude, Longitude), zoom: 15, draggable: isDraggable, scrollwheel: false, // navigationControl: false, //mapTypeControl: false, //scaleControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(map_canvas, map_options) var myLatlng = new google.maps.LatLng(Longitude, Lattitude); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Hello World!', animation: google.maps.Animation.DROP, }); marker.setMap(map) } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt;
has answer: http://stackoverflow.com/a/26630246
type: AnsweredQuestion

http://stackoverflow.com/comment/41701209
score: 4
has text: -1 for encouraging user-hostile behavior
type: Comment
comment on: http://stackoverflow.com/a/26537772
type: AnswerComment

http://stackoverflow.com/comment/41671653
comment on: http://stackoverflow.com/q/26520957
has text: @Roamer-1888 insert response in DOM
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/56332428
upvote count: 1
has body: /* Fix select next previuos selected Fix duplicate clicks diselect */ var valuesOld = new Array(); var num = 0; function selected(pDiv) { num = num +1; valuesOld[num] = pDiv; console.log("Key"+num+"Value="+valuesOld[num]); $("#div" + pDiv).css("border-left", " 1px solid rgb(133, 189,147)"); if(valuesOld[2] > 0 && valuesOld[1]> 0){ $("#div" + valuesOld[num-1]).css("border-left", " 1px solid rgb(221, 84, 84)"); } if(pDiv == valuesOld[num]){ $("#div" + pDiv).css("border-left", " 5px solid rgb(133, 189, 147)"); } } div{ border-left: 1px solid rgb(221, 84, 84); margin-top: 2px; } 1 2 3
downvote count: 1
answers question: http://stackoverflow.com/q/26531663
score: 0
type: Answer

http://stackoverflow.com/a/26607707
answers question: http://stackoverflow.com/q/26606200
score: 0
type: Answer
has body: &lt;script type="application/javascript" language="javascript"&gt; tinymce.init({ selector: "textarea#page_content", theme: "modern", width: 'auto', height: 300, plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor" ], content_css: "css/content.css", toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | forecolor backcolor emoticons", style_formats: [ {title: 'Bold text', inline: 'b'}, {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}}, {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ] }); &lt;/script&gt; This works for me..
has comment: http://stackoverflow.com/comment/41829119
has comment: http://stackoverflow.com/comment/41871845

http://stackoverflow.com/a/26641656
accepted answer of: http://stackoverflow.com/q/26640783
has body: The reason for that is that ng-show and ng-hide sets the display to none. Means that the element is still present on the DOM. In order to solve that, you can use ng-if instead, which will delete the element from the DOM or will recreate it. https://docs.angularjs.org/api/ng/directive/ngIf
answers question: http://stackoverflow.com/q/26640783
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/26605280
has body: I have created a very simple jQuery sliding function that works, but requires improvements. The basic timeline of the function needs to: SlideDown on mouseenter Stay visible until mouseleave When mouseleaves, delay the SlideUp by 2 seconds ^^This works, but if you slide up and down several times, the function stops working for a few seconds. Can anyone please suggest a solution? JS FIDDLE attached JSFIDDLE: http://jsfiddle.net/lord_dev/b1g50eqk/4/ $(document).ready(function(){ $hover = true; $( "#slide" ).mouseenter(function() { if($hover) { $( ".slide--hidden" ).slideDown('fast'); } }); $( "#slide" ).mouseleave(function() { $hover = false; $( ".slide--hidden" ).delay(2000).slideUp('fast').queue(function(){ enableHover(); $(this).dequeue(); }); }); function enableHover() { $hover = true; } });
score: 1
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: delay
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26605933
favorite count: 0
has title: jQuery - slideDown on mouseenter > delay > SlideUp on mouseleave
has answer: http://stackoverflow.com/a/26605933
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41823593
upvote count: 1
type: Question
tagged with: slidedown
tagged with: slideup

http://stackoverflow.com/comment/41773903
has text: You can't call functions directly in other iframes. If you want to communicate between iframes, see http://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26578180

http://stackoverflow.com/a/26599577
has comment: http://stackoverflow.com/comment/41813462
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26599498
type: Answer
answers question: http://stackoverflow.com/q/26599498
upvote count: 1
has body: $(window).load(function () { // AJAX Save and Continue editing $('#content').on('click', '.save-tasks-ajax', function () { console.log('AJAX Save and Continue Editing Button Clicked!'); ajaxSaveTasks(); return false; // avoid to execute the actual submit of the form. }); // AJAX Save and redirect $('#content').on('click', '.save-tasks-ajax-redirect', function () { console.log('AJAX Save and Redirect Button Clicked!'); ajaxSaveTasks(function(){ window.location.assign("project.php"); }); return false; // avoid to execute the actual submit of the form. }); }); function ajaxSaveTasks(callback){ ... your code ... $.ajax({ ... success: function(data) { // Hide Header Un-Saved Changes Div hideTaskUnSavedChangesHeaderBar() // Hide Loading/Saving Spinner jQuery('#project_tasks').hideLoading(); if (callback) callback(); } }); };
score: 1

http://stackoverflow.com/comment/41853282
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26621434
has text: I'm just going to add a "?" to the end of all src attributes (empty ones included). Problem solved!

http://stackoverflow.com/q/26515510
tagged with: string
favorite count: 0
has comment: http://stackoverflow.com/comment/41661358
has title: wanting a javascript regex notation for replacing cases
tagged with: regex
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26515655
accepted answer: http://stackoverflow.com/a/26515655
type: Question
has body: e.g. I want to write a camelToSnake() camelToSnake = (phrase) -&gt; return phrase.replace(/([A-Z])/g, /-\L$1/) is there such options
tagged with: lowercase
tagged with: replace
upvote count: 2
linked to: http://stackoverflow.com/q/154862
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41716215
has text: You want ALL spans with name = YOUR_NAME to show at a time , And now in ur code only 1 is showing correct?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26546548
type: QuestionComment

http://stackoverflow.com/comment/131023174
type: Comment
comment on: http://stackoverflow.com/a/26591182
has text: Just in case someone was wondering what an "IIFE" is: https://developer.mozilla.org/en-US/docs/Glossary/IIFE#:~:text=An%20IIFE%20(Immediately%20Invoked%20Function,Ben%20Alman%20in%20his%20blog.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26653551
downvote count: 0
has comment: http://stackoverflow.com/comment/41910443
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26652957
has body: Assuming your delimiter to separate the age and name is - and first value is age and second value is name this will do the trick. in your function(data){ $("#display_name").val(data.split("-")[0]); $("#age").val(data.split("-")[1]);
has comment: http://stackoverflow.com/comment/41910733

http://stackoverflow.com/a/26575757
answers question: http://stackoverflow.com/q/26575590
type: Answer
has body: Thanks to one of the comments, I figured it out, I just had to have the var inside of the document.ready function :D
score: 0

http://stackoverflow.com/comment/41835954
comment on: http://stackoverflow.com/q/26610752
has text: I found this example http://www.raymondcamden.com/2012/6/14/Example-of-a-dynamic-HTML5-datalist-control but I don't know if it can help you.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26529949
downvote count: 1
has comment: http://stackoverflow.com/comment/41733875
type: Answer
has body: Check this similar one: event.preventDefault doesn't seem to work TLDR Answer: You have to just return false; to prevent PHP form submission in the callback for the onSubmit event: For Code Improvement: Please use correct indentation for better clarity and feel free to follow the comments for some suggestions of improvement ;). Let me know if you need any more clarifications :) JQuery: $(document).ready(function() { $(".loginform").submit(function (event) { // the proper way would be //var username = $('input#username').val(); //var password = $('input#password').val(); var username = $('input[id=username]').val(); var password = $('input[id=password]').val(); $.ajax({ type: "POST", url: "login.php", //based on michael's post it should be //data: {username: username, password: password}, data : "username="+username+"&password="+password, //type: "POST", <-- not needed based on michael's post success: function (data) { var success = data['success']; //probably needs to be success==="false" and I suggest //not to use success name again in there.. if(success == false){ var error = data['message']; alert(error); } // probably should be just else{ or else if(success==="true") // I would check it first in the if because usually you will // have a success more often than a failure if(success == true) { //based on Styphon's answer there is no write so it should be //one of: append(element), prepend(element), text("content") or html("content") $('#result').write('Login success! Loading dashboard...'); } } }); // return false is like calling event.preventDefault(); and event.stopPropagation(). //As such prevents redirection to PHP/Server code */ or in other words it WON'T //submit the form to PHP using the name=" " input attributes //and method=" "/action=" " attributes in your form tag return false; }); }); HTML If you are submitting the form only through AJAX and not the old way then you only need whatever I have below. Some suggestions: don't use use css positioning altern…
answers question: http://stackoverflow.com/q/26529882
has comment: http://stackoverflow.com/comment/41733941
has comment: http://stackoverflow.com/comment/41734104
score: 1
upvote count: 2

http://stackoverflow.com/q/26536818
has title: JavaScript start file/URL download and close current window when download has completed?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16799483
has body: I have a scenario where I open a popup window behind which some server side code generates an encrypted url for accessing a file on amazon web services. On completing the server side code I require to start downloading the file via the URL and also to close the popup window. An issue I have with this is determining when the download has completed. I'm not sure if this can be done. If I do the following window.location.href = myUrl; javascript: setTimeout(window.close, 1000); I can start the download and if it completes ok before 1 second then great, however I'd like to know when the download has completed and only close the window at that point. Does anyone know if I can determine when the download has completed? Thanks in advance for any help!
type: Question
has comment: http://stackoverflow.com/comment/41699865
linked to: http://stackoverflow.com/q/12020168
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41699583
answer count: 0

http://stackoverflow.com/comment/41892375
type: Comment
has text: You advise me what to write, so when a person presses the button like and leaving the site, so that he then turned out?
comment on: http://stackoverflow.com/q/26642824
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41849197
has text: how about `<form ng-model="myForm" ...`? That should add it to the scope
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26619112

http://stackoverflow.com/comment/42360600
type: AnswerComment
has text: I ran into the same issue, this fixed it. This answer should be accepted.
type: Comment
comment on: http://stackoverflow.com/a/26763658
score: 1

http://stackoverflow.com/q/26548725
score: 0
answer count: 1
tagged with: jsfiddle
has body: I have an Input field type number where the result of the multiplication of two values is displayed. I have set the total function which is my valueBinding in the html Here my Ember.View.extend with the total calculation App.TotalView = Ember.View.extend({ templateName: 'total', tagName: 'input', attributeBindings: ['total:value', 'placeholder', 'type'], placeholder: null, type: 'number', total: (function() { var res= parseInt(this.get('controller.newThread.selectContentTariffa')) * parseInt(this.get('controller.newThread.primary')); return isNaN(res)?"":res; }).property('controller.newThread.selectContentTariffa', 'controller.newThread.primary') }); I have defined the calls to my NewThread newThread:function(){ return {selectContentTariffa:null,primary:null,total:null,weight:null}; }.property(), This is my html when i select the values for the calculation: valueBinding=newThread.selectContentTariffa, valueBinding=newThread.primary and valueBinding=newThread.total for the total result {{view Ember.Select prompt="Tariffa" valueBinding=newThread.selectContentTariffa content=selectContentTariffa optionValuePath="content.value" optionLabelPath="content.label"}} {{view Em.TextField type="number" valueBinding=newThread.primary class="form-control"}} {{view "total" valueBinding=newThread.total}} Add This my html where there are the values displayed after i have added them {{#each item in model}} {{item.selectContentTariffa}} {{item.primary}} {{item.total}} {{/each}} i dont't know what i am missing, i have reproduced the issue here : http://emberjs.jsbin.com/qakado/13/edit?html as you can see the value of the result in the last column under is not bound
tagged with: javascript
has title: ValueBinding not working on adding new Object in my Ember view
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26551792
tagged with: jsbin
type: Question
tagged with: ember.js
tagged with: model-view-controller
accepted answer: http://stackoverflow.com/a/26551792

http://stackoverflow.com/q/26617792
has comment: http://stackoverflow.com/comment/41846710
score: 0
has title: Add php while in javascript var
favorite count: 0
accepted answer: http://stackoverflow.com/a/26618148
has comment: http://stackoverflow.com/comment/41848330
linked to: http://stackoverflow.com/q/26517605
upvote count: 1
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/41846705
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26618713
tagged with: mysql
has comment: http://stackoverflow.com/comment/41846844
has answer: http://stackoverflow.com/a/26618713
type: Question
has body: I want to make some charts with dxcharts. Now i have the following situation: My SQL query is: $sql = "SELECT av.art_title, SUM(CASE c.cont_status WHEN 'cold' THEN av.art_views ELSE 0 END) cold, SUM(CASE c.cont_status WHEN 'lead' THEN av.art_views ELSE 0 END) lead, SUM(CASE c.cont_status WHEN 'prospect' THEN av.art_views ELSE 0 END) prospect, SUM(CASE c.cont_status WHEN 'lost' THEN av.art_views ELSE 0 END) lost FROM article_views av JOIN contacts c ON av.user_id = c.id GROUP BY av.art_title"; $res = mysql_query($sql) or die (mysql_error()); I have a while loop on the query like: while($row = mysql_fetch_assoc($res)) { } And below i will post my javascript var: var dataSource = [{ country: "&lt;?php echo $row['art_title']; ?&gt;", lead: &lt;?php echo $row['lead']; ?&gt;, lost: &lt;?php echo $row['lost']; ?&gt;}, ]; So if i use the while in the datasource var it's not working at all. Can anyone help me out here?
has comment: http://stackoverflow.com/comment/41846667
answer count: 2
has answer: http://stackoverflow.com/a/26618148
has comment: http://stackoverflow.com/comment/41847019
tagged with: javascript
has comment: http://stackoverflow.com/comment/41846831

http://stackoverflow.com/comment/41718284
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26547751
type: Comment
has text: +1 but recommend that _prop is itself an observable, not just a plain value.

http://stackoverflow.com/q/26662440
tagged with: jquery-ui
type: Question
tagged with: javascript
score: 0
tagged with: drag-and-drop
has body: I'm using jQuery UI for drop and drag. When the draggable item is dropped I use the drop function that appends a new HTML element and makes it draggable and droppable. It works in the first instance ( see http://jsfiddle.net/ze5zgfsq/1/ ) but the draggable + droppale features (including the drop functio) don't extend deeper than that. I want it to work recursively, though, so that if another draggable element is dropped inside the created element (the dropped one) then a new draggable, droppable element is created within that and so on. Here's the sample code: $("#draggableObject").disableSelection(); $("#draggableObject").draggable({ revert: "invalid", helper: "clone", opacity: 0.7 }); $(".container").droppable({ accept: "#draggableObject, .droppedObject", activeClass: "stateHighlight", hoverClass: "stateHover", greedy: true, drop: function (event, ui) { $(this).append(' Dropped Object '); $(".droppedObject").draggable({ revert: "invalid", helper: "clone", opacity: 0.7 }).droppable({ accept: "#draggableObject, .droppedObject", activeClass: "stateHighlight", hoverClass: "stateHover", greedy: true, drop: function (event, ui) { $(this).append(' Dropped Object '); $(".droppedObject").draggable({ revert: "invalid", helper: "clone", opacity: 0.7 }); } }); } }); And here's the HTML/CSS: Draggable Object Drop Items Here ul { height: 300pt; width: 200pt; border: 1pt solid blue; border-radius: 2pt; } li { display: block; min-height: 100pt; min-width: 100pt; border: 1pt solid black; border-radius: 2pt; margin: 2pt; cursor: move; text-align: center; }
has answer: http://stackoverflow.com/a/29313681
answer count: 1
has title: How can I create jQuery UI droppables recursively?
type: UnansweredQuestion

http://stackoverflow.com/q/26524869
answer count: 3
has comment: http://stackoverflow.com/comment/41677646
has comment: http://stackoverflow.com/comment/41677618
linked to: http://stackoverflow.com/q/1566595
has answer: http://stackoverflow.com/a/26525065
accepted answer: http://stackoverflow.com/a/26525065
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26525075
has answer: http://stackoverflow.com/a/26524998
has comment: http://stackoverflow.com/comment/41677715
type: Question
has title: Jquery conflict between two versions
possible better answer: http://stackoverflow.com/a/26524998
tagged with: javascript
tagged with: jquery
has body: Ok i have site with old version of jquery, then i imported modul, where i have newer version of jquery, in my modul page i have this line of jquery &lt;script src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"&gt;&lt;/script&gt; Somehow i have conflict. I cant remove old version from header cuz some function dont work, in the other side in my module page if i remove newer version spinner function dont work. I cant use both jquery versions in same time. is there some way how to resolve this conflict. Code where i have error is: In this script i need older version not before loaded new version jquery-1.10.2.js var notice = new Array(); $(document).ready( function() { /*setTimeout(function(){ $(".notice").fadeTo('slow',1), 500; }); setTimeout(function(){ $(".notice").fadeTo('slow',0.4); }, 1500);*/ /*setTimeout(function(){ $(".notice").animate( { backgroundColor: '#B8B8B8' }, 1000) });*/ setTimeout(function(){ $(".notice").animate( { backgroundColor: '#e0e0e0' }, 1000) }); $.safetynet({ message : isDirtyWarning }); }); /** * Funkcija ce Sve vrednosti Combo Boksa upisati u hidden polje razdvojeno * zarezom * * @param hidden_field_id * @return */ function ComboFieldsToValue(combo_selector, hidden_field_id) { var vrednosti = ""; $(combo_selector + ' option').each( function() { vrednosti += $(this).val() + ','; }); $(hidden_field_id).attr( { value :vrednosti.substring(0, vrednosti.length - 1) }); // alert($(hidden_field_id).attr("value")); } /** * Proverava da li Combo ima item sa zadatom vrednoscu * Vraca true ako ima, false ako nema * @param combo_selector * @param key * @return */ function IsItemInCombo(combo_selector, key) { var is_in_combo = false; $(combo_selector + ' option').each( function() { if ($(this).val() == key) { is_in_combo = true; } }); return is_in_combo; } /** * Potrda brisanja * @param link * @return */ function PotvrdiBrisanje(link, str) { if(str == "") str = "Potvrdi brisanj…
score: 0

http://stackoverflow.com/comment/41916575
has text: Console is giving me this error The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
type: Comment
comment on: http://stackoverflow.com/q/26657048
score: 0
type: QuestionComment

http://stackoverflow.com/q/26613794
has title: Why is this property defined on the prototype--not on the constructor?
score: 0
linked to: http://stackoverflow.com/q/11904203
answer count: 2
has answer: http://stackoverflow.com/a/26613848
possible better answer: http://stackoverflow.com/a/26640701
tagged with: javascript
has answer: http://stackoverflow.com/a/26640701
tagged with: prototype
linked to: http://stackoverflow.com/q/21373165
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26613848
tagged with: constructor
has body: In the chapter on Bugs and Error Handling in Eloquent Javascript, I found the following piece of code. I would like to know why the writer set the name property on the prototype--not in the constructor. function InputError(message) { this.message = message; this.stack = (new Error()).stack; } InputError.prototype = Object.create(Error.prototype); InputError.prototype.name = "InputError"; Throughout the book, he has been defining properties in the constructor and methods on the prototype. Nicholas Zakas recommends doing the same in Ch6 of Professional Javascript for Web Developers, because, he says, if you define methods in the constructor, then each call to the constructor creates a new instance of the method. This is of course the opposite situation--a property being defined on the prototype. To reiterate: What I want to know is, why might the author have defined 'name' property on the prototype? So far, I've read these two SO posts two no avail. What is the difference between assigning a function directly to a constructor versus to it&#39;s prototype, and why? -This told me what I've already read in the books mentioned above. Why defining properties in the prototype is considered an antipattern -I didn't really understand this post, but I think it was irrelevant, because it was talking about patterns in other languages. I am concerned with javascript.
type: Question

http://stackoverflow.com/q/26514452
accepted answer: http://stackoverflow.com/a/26514540
upvote count: 2
has answer: http://stackoverflow.com/a/26514819
has title: A tiny "Guess the number" game doesn't work as intended
has body: I tried to make a silly little game in JavaScript where you're prompted to guess a number between 1-10. The computer then randomly picks a number and if it's the same as you guessed it says "You guessed right!", else "Try again!". However, the computer input and the user input is NEVER the same! What am I doing wrong? var userChoice = prompt("Make a guess from 1 to 10"); var computerChoice = Math.random(); if (computerChoice &lt; 0.1) { computerChoice = 1; } else if (computerChoice &lt; 0.2){ computerChoice = 2; } else if (computerChoice &lt; 0.3){ computerChoice = 3; } else if (computerChoice &lt; 0.4){ computerChoice = 4; } else if (computerChoice &lt; 0.5){ computerChoice = 5; } else if (computerChoice &lt; 0.6){ computerChoice = 6; } else if (computerChoice &lt; 0.7){ computerChoice = 7; } else if (computerChoice &lt; 0.8){ computerChoice = 8; } else if (computerChoice &lt; 0.9){ computerChoice = 9; } else { computerChoice = 10; } var compare = function(choice1, choice2){ if (choice1 === choice2){ console.log("You guessed right!"); } else{ console.log("Try again!"); } }; compare(userChoice, computerChoice);
type: Question
has comment: http://stackoverflow.com/comment/41658845
has answer: http://stackoverflow.com/a/26514540
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26514929
linked to: http://stackoverflow.com/q/359494
has comment: http://stackoverflow.com/comment/41659019
possible better answer: http://stackoverflow.com/a/26514672
answer count: 4
has answer: http://stackoverflow.com/a/26514672
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26561519
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26561619
tagged with: asp.net
type: UnansweredQuestion
has title: Check email availability while typing
has body: I'm trying to basically check whether a typed email is already registered or not, on the spot. Trying to make that(An example to what I wish to do in the link, can't upload images): http://2.bp.blogspot.com/-2gcqeLxtuOs/UTxEge1d9XI/AAAAAAAAAz8/79M9RyYRHZs/s1600/UserAvailability.gif And I don't seem to understand what's wrong with my code, probably lack od knowledge or overlooking something. My code: Register.aspx: function UserChecker(username) { lbl = document.getElementById('&lt;%=Label2.ClientID %&gt;'); if (username == '') { lbl.innerHTML = 'Please Enter a User Name'; lbl.style.color = "black"; } else { PageMethods.UserNameChecker(username, OnSucceeded); } } function OnSucceeded(result, userContext, methodName) { lbl = document.getElementById('&lt;%=Label2.ClientID %&gt;'); if (methodName == "UserNameChecker") { if (result == true) { lbl.innerHTML = 'User name not available'; lbl.style.color = "red"; } else { lbl.innerHTML = 'User name available'; lbl.style.color = "green"; } } } &lt;asp:Label ID="Label1" runat="server" Text="User Name"&gt;&lt;/asp:Label&gt; &lt;br /&gt; &lt;asp:TextBox ID="email" runat="server" AutoPostBack="true" onkeyup="UserChecker(this.value)" style="font-size: 20px; text-align:center; border-radius: 20px;" class="RegisterButton" ValidationGroup="registergroup" placeholder="What's your Email?"&gt;&lt;/asp:TextBox&gt; &lt;br /&gt; &lt;asp:Label ID="Label2" runat="server"&gt;&lt;/asp:Label&gt; Register.aspx.cs: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Web.Services; public partial class CheckUserAvailability : System.Web.UI.Page { [WebMethod] public static bool UserNameChecker(string UserName) { if (WebUser.IsUserNameExist(UserName) == true) { return true; } else { return false; } } } WebUser.cs(A class I created): using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data…
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41743986

http://stackoverflow.com/comment/41881478
type: QuestionComment
has text: I used them and also used the click events, but they worked very weirdly and also slowed down everything. And, as I mentioned I just wanna do that with simple JavaScript, HTML, etc. I don't wanna use any other libraries, as they slow down the speed.
score: 0
comment on: http://stackoverflow.com/q/26574475
type: Comment

http://stackoverflow.com/a/26582240
upvote count: 1
has comment: http://stackoverflow.com/comment/41782928
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41783932
score: 1
has comment: http://stackoverflow.com/comment/41813701
has body: You can try to hook the click event of the size element $(".sizes").click(function(e) { var psize = $(this).attr('psize'); $('.prices').each(function() { var priceParam = $(this).attr('href'); $(this).attr('href', priceParam.indexOf('size=') === -1 ? (priceParam + '&size=' + psize) : priceParam.replace(/size=\d/, 'size='+ psize)); }); }); $('.prices').click(function() { var priceParam = $(this).attr('href'); console.log(priceParam); $('.sizes').each(function() { var psize = $(this).attr('psize'); $(this).attr('href', priceParam.indexOf('size=') === -1 ? (priceParam + '&size=' + psize) : priceParam.replace(/size=\d/, 'size=' + psize)); }); }); add this code in document ready and i also modified the divContainer i added a psize attribute this way i can still determine what size is the a element corresponds to. Sizes 4 5 6 hope this help.
type: Answer
has comment: http://stackoverflow.com/comment/41790904
answers question: http://stackoverflow.com/q/26581791
has comment: http://stackoverflow.com/comment/41782716
has comment: http://stackoverflow.com/comment/41781815
accepted answer of: http://stackoverflow.com/q/26581791

http://stackoverflow.com/q/26580874
accepted answer: http://stackoverflow.com/a/26580992
type: Question
has title: Making a table based of user input
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26580896
answer count: 2
has answer: http://stackoverflow.com/a/26580896
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26580992
has body: Submit var tableData = [" "]; function myFunction(){ var tableRow; tableData.length = document.getElementById("arrayLength").value; for(i=0; i<tableData.length; i++){ tableData[i] = "This is your table"; tableRow = " " + tableData[i] + " "; } return tableRow; } document.getElementById("myButton").onclick = function(){ document.getElementById("finalTable").innerHTML = myFunction(); } Here what I want, when a user input some number in field, it should create a table with same rows & with data "this is your table" in it. I mean if I input 5, it should make 5 rows & 5 columns with "this is your table" in each cell. Currently it's making only one cell. I know it's far away from desired output, but please help me. Thanks in advance.
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/41785358
type: Comment
comment on: http://stackoverflow.com/q/26584836
type: QuestionComment
score: 0
has text: Why don't you use a dedicated API for this (mailapi)?

http://stackoverflow.com/q/26624101
score: 0
answer count: 1
has body: I have this code below: heart.html("&lt;i class='glyphicon glyphicon-remove-sign'&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;"+count); i want the count element outside the heart.html(). something like: heart.html("&lt;i class='glyphicon glyphicon-remove-sign'&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;")+count; heart is a click able div and I don't want the count to be clickable. whole code: jQuery(document).ready(function() { jQuery('body').on('click','.jm-post-like',function(event) { event.preventDefault(); heart = jQuery(this); post_id = heart.data("post_id"); heart.html("&lt;i class='glyphicon glyphicon-cog'&gt;&lt;/i&gt;"); jQuery.ajax ({ type: "post", url: ajax_var.url, data: "action=jm-post-like&amp;nonce="+ajax_var.nonce+"&amp;jm_post_like=&amp;post_id="+post_id, success: function(count) { if( count.indexOf( "already" ) !== -1 ) { var lecount = count.replace("already",""); if (lecount === "0") { lecount = "0"; } heart.prop('title', 'Like'); heart.removeClass("liked"); heart.html("&lt;i class='glyphicon glyphicon-heart'&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;"+lecount); } else { heart.prop('title', 'Unlike'); heart.addClass("liked"); heart.html("&lt;i class='glyphicon glyphicon-remove-sign'&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;"+count); } } }); }); }); function getPostLikeLink( $post_id ) { $like_count = get_post_meta( $post_id, "_post_like_count", true ); // Get post likes. $count = ( empty( $like_count ) || $like_count == "0" ) ? '0' : esc_attr( $like_count ); if ( AlreadyLiked( $post_id ) ) { $class = esc_attr( ' liked' ); $title = esc_attr( 'Unlike' ); $heart = '&lt;i class="glyphicon glyphicon-remove-sign"&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;'; } else { $class = esc_attr( '' ); $title = esc_attr( 'Like' ); $heart = '&lt;i class="glyphicon glyphicon-heart"&gt;&lt;/i&gt;&amp;nbsp&amp;nbsp&amp;nbsp;'; } $output = '&lt;a href="#" class="jm-post-like'.$class.'" data-post_id="'.$post_id.'" title="'.$title.'"&gt;'.$heart.'&amp;nbsp;&lt;/a&gt;'.$count; re…
accepted answer: http://stackoverflow.com/a/26624136
has title: Append count var after html (heart var) - jQuery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26624136
type: Question
tagged with: javascript
tagged with: jquery

forms
tags question: http://stackoverflow.com/q/26516718
tags question: http://stackoverflow.com/q/26568574
tags question: http://stackoverflow.com/q/26632636
tags question: http://stackoverflow.com/q/26661663
tags question: http://stackoverflow.com/q/26522474
tags question: http://stackoverflow.com/q/26661762
tags question: http://stackoverflow.com/q/26525136
type: Tag
tags question: http://stackoverflow.com/q/26529389
tags question: http://stackoverflow.com/q/26547112
tags question: http://stackoverflow.com/q/26638405
tags question: http://stackoverflow.com/q/26664712
tags question: http://stackoverflow.com/q/26546964
tags question: http://stackoverflow.com/q/26627491
tags question: http://stackoverflow.com/q/26667031
tags question: http://stackoverflow.com/q/26613997
tags question: http://stackoverflow.com/q/26626454
tags question: http://stackoverflow.com/q/26617503
tags question: http://stackoverflow.com/q/26578744
tags question: http://stackoverflow.com/q/26581004
tags question: http://stackoverflow.com/q/26616024
tags question: http://stackoverflow.com/q/26536510
tags question: http://stackoverflow.com/q/26544509
tags question: http://stackoverflow.com/q/26558596
tags question: http://stackoverflow.com/q/26590479
tags question: http://stackoverflow.com/q/26614832
tags question: http://stackoverflow.com/q/26622141
tags question: http://stackoverflow.com/q/26666054
tags question: http://stackoverflow.com/q/26514935
tags question: http://stackoverflow.com/q/26566994
tags question: http://stackoverflow.com/q/26610820
tags question: http://stackoverflow.com/q/26535074
tags question: http://stackoverflow.com/q/26661696
tags question: http://stackoverflow.com/q/26514524
tags question: http://stackoverflow.com/q/26653333
tags question: http://stackoverflow.com/q/26536653
tags question: http://stackoverflow.com/q/26542329
tags question: http://stackoverflow.com/q/26607859
tags question: http://stackoverflow.com/q/26636354
tags question: http://stackoverflow.com/q/26559106
tags question: http://stackoverflow.com/q/26652717
tags question: http://stackoverflow.com/q/26561918
tags question: http://stackoverflow.com/q/26528703
tags question: http://stackoverflow.com/q/26574928
tags question: http://stackoverflow.com/q/26658402
tags question: http://stackoverflow.com/q/26541265
tags question: http://stackoverflow.com/q/26573749
tags question: http://stackoverflow.com/q/26604179
tags question: http://stackoverflow.com/q/26528637
tags question: http://stackoverflow.com/q/26525472
tags question: http://stackoverflow.com/q/26623702
tags question: http://stackoverflow.com/q/26525383
tags question: http://stackoverflow.com/q/26619112
tags question: http://stackoverflow.com/q/26626418
tags question: http://stackoverflow.com/q/26636823
tags question: http://stackoverflow.com/q/26612998
tags question: http://stackoverflow.com/q/26637283
tags question: http://stackoverflow.com/q/26538976
tags question: http://stackoverflow.com/q/26598823
tags question: http://stackoverflow.com/q/26541625
tags question: http://stackoverflow.com/q/26652403
tags question: http://stackoverflow.com/q/26589492
tags question: http://stackoverflow.com/q/26603371
tags question: http://stackoverflow.com/q/26565795
tags question: http://stackoverflow.com/q/26612209
tags question: http://stackoverflow.com/q/26531435
tags question: http://stackoverflow.com/q/26549888
tags question: http://stackoverflow.com/q/26554694
tags question: http://stackoverflow.com/q/26602850
tags question: http://stackoverflow.com/q/26601022
tags question: http://stackoverflow.com/q/26671942
tags question: http://stackoverflow.com/q/26633426
tag name: forms
tags question: http://stackoverflow.com/q/26662551
tags question: http://stackoverflow.com/q/26601331
tags question: http://stackoverflow.com/q/26559532
tags question: http://stackoverflow.com/q/26617270
tags question: http://stackoverflow.com/q/26643061
tags question: http://stackoverflow.com/q/26631038
tags question: http://stackoverflow.com/q/26629043

http://stackoverflow.com/comment/89843449
type: AnswerComment
comment on: http://stackoverflow.com/a/27747880
type: Comment
score: 1
has text: Wish I could give you more than 1 upvote - Thanks @Andrew

http://stackoverflow.com/comment/65842072
score: 0
type: Comment
has text: @radhoo I know this is old but I stumbled on the same problem and I solved it by replacing `feature.get('name')` with `feature.get('features').get('name')` in else. hope it helps
type: AnswerComment
comment on: http://stackoverflow.com/a/26919954

http://stackoverflow.com/comment/41937793
has text: Hi thanks for well explained codes and elaboration. Your code works well but I found a problem that is, my pages are separated so everything will reload again including the vertical menu. This CSS line ul li > ul {display: none;} keep reloading
comment on: http://stackoverflow.com/a/26667691
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26661294
type: Question
has body: I'm implementing a video player using VideoJS. Two key functions of this video player are: a) If the user leaves the page, resume the video at that point when they come back or on refresh b) Include HLS (h.264/mp4) support to provide better video quality depending on the connection. The API for saving and retrieving a user's timestamp is already in place, and using the excellent HLS plugin, the video player works almost fine in all browsers as expected. The following code is used to initialize the player and jump to the saved time: videojs.options.flash.swf = '../video-js/video-js.swf'; var player = videojs(videoId); supportHLS = videojs.Hls.isSupported(); player.ready(function() { event listeners for media controls this.on('seeked', function() { console.log('seeked');}); this.on('seeking',function() { console.log('seeking');}); var PLAYER_LOADED = 'loadedmetadata'; if(!supportHLS) { PLAYER_LOADED = 'canplay';} this.one(PLAYER_LOADED, function() { this.one('canplay', function() { this.play(); }); this.currentTime(savedPosition); lastViewed = savedPosition; }); }); (Reason for the roundabout logic: Chrome had issues with playing the video before the new data (after the seek) had loaded, which caused a number of problems with the data in the buffer. Also, Safari 7.1 would break if you tried this during the 'loadedmetadata' event) However, there's still one problem, specific to Safari. The loading spinner doesn't always go away when you refresh the page. Examining the logs and listeners seems to indicate that the 'seeking' and 'seeked' events fire at about the same time, but in different orders; the problem always arises whenever 'seeked' fires first, and never occurs when 'seeking' is first. Furthermore, any seeking after the video is playing removes the spinner, so it has to be caused by the initial seek. It's interesting that Safari supports HLS streaming natively, yet consistently causes the most problems with this player implementation. This is the last Safari…
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/43982879
tagged with: video.js
answer count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: http-live-streaming
tagged with: safari
tagged with: video
has title: VideoJS - Safari 7.1, loading spinner does not go away on initial page load
score: 1

http://stackoverflow.com/a/30484880
score: 4
accepted answer of: http://stackoverflow.com/q/26658869
type: Answer
upvote count: 4
has body: Looks like some functions you are using (player.playVideo()) are disabled in Mobile devices. In my case after using player.playVideo() in some Android devices, the video isn´t played even after tapping the player https://developers.google.com/youtube/iframe_api_reference?hl=zh-TW#Mobile_considerations Autoplay and Scripted Playback The HTML5 element, in certain mobile browsers (such as Chrome and Safari), only allows playback to take place if it's initiated by a user interaction (such as tapping on the player). Due to this restriction, functions and parameters such as autoplay, playVideo(), loadVideoById() won't work in all mobile environments**
downvote count: 0
answers question: http://stackoverflow.com/q/26658869
type: AcceptedAnswer

http://stackoverflow.com/comment/41949881
comment on: http://stackoverflow.com/a/26672833
type: AnswerComment
has text: Thank you, I edited my answer according to (I hope) your remarks.
score: 0
type: Comment

http://stackoverflow.com/a/26666679
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41935423
downvote count: 0
has body: Select all your links and then loop through them like this (uses jQuery): $('a').each(function() { $(this).attr('href', this.href + myVar); }); If you want to check for only your domain: var comp = new RegExp(location.host); $('a').each(function() { if(comp.test($(this).attr('href'))){ $(this).attr('href', this.href + myVar); } });
answers question: http://stackoverflow.com/q/26666616
type: Answer
has comment: http://stackoverflow.com/comment/41935974

http://stackoverflow.com/comment/41807801
score: 0
type: Comment
has text: JavaScript doesn't have block scope, it has function scope. So, IIFE's are used to create new scopes. (See: http://stage.learn.jquery.com/javascript-101/functions/#immediately-invoked-function-expression-iife) They are used a lot in creating jQuery plugins, here's an example: http://learn.jquery.com/plugins/basic-plugin-creation/#protecting-the-alias-and-adding-scope If you don't know jQuery, this might be confusing, but the point is to make a new scope, so that you can have variables only your function can use.
comment on: http://stackoverflow.com/a/26596253
type: AnswerComment

http://stackoverflow.com/comment/41866807
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26629077
type: Comment
has text: Why can't you `...on('click',function(){console.log('Test'); form1.ACTION.value='Edit'...});`

http://stackoverflow.com/a/31045079
type: Answer
has body: $('#main_div').on('click',".sortName", function() { $('#sos').html(' clicked '); });
score: 0
answers question: http://stackoverflow.com/q/26517860

http://stackoverflow.com/comment/41832795
type: Comment
type: QuestionComment
has text: ok i updated my answer. Please check it out.
comment on: http://stackoverflow.com/q/26609637
score: 0

http://stackoverflow.com/q/26624533
has title: Value isn't passed to next page
has body: I am trying to pass a variable userId to my second page. Here is the code piece I use to pass value to next page: $.each($.parseJSON(data), function(key, value) { var userId = value.id_user; var stText = value.status_text; if (stText == "OK") { //if provide a valid username change the location //to the specified page. window.location = "http://myurl.com/profile.php"; window.location.href = "http://myurl.com/profile.php?userId=" + userId; } }); But url looks like: http://myurl.com/profile.php?userId=undefined
has answer: http://stackoverflow.com/a/26624841
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41860045
has comment: http://stackoverflow.com/comment/41859080
tagged with: javascript
has comment: http://stackoverflow.com/comment/41859512
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41858765
tagged with: url
tagged with: jquery
has comment: http://stackoverflow.com/comment/41859841
favorite count: 0
has comment: http://stackoverflow.com/comment/41859858
has answer: http://stackoverflow.com/a/26625998
type: UnansweredQuestion

http://stackoverflow.com/comment/41889195
type: Comment
type: QuestionComment
has text: `.toFixed(2)` to the rescue.
comment on: http://stackoverflow.com/q/26641114
score: 0

http://stackoverflow.com/q/26664870
upvote count: 1
answer count: 1
favorite count: 0
has title: Can't seem to horizontally center text that has been translated 270 deg?
has answer: http://stackoverflow.com/a/26664962
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has body: So we have these HTML tables with "vertical headers". We are using the css3 translate property to rotate the text. All of this is working great, except, I cannot find a way to correctly center the text horizontally. I can of course manually center the text using padding, margin, or several other properties, but this only works if all of the vertical header cells are the same width, which is not the case. I have created a test case in JS fiddle with a handy slider for dynamically adjusting the width of one of the columns: http://jsfiddle.net/c7ft8nzc/ Just in case, here is the code sample I am using. HTML: A header Some Other header A Vert. Header Another Vert. Header Here Content here Here is some longer content that will likely break into multiple lines X Y More Content here Here is some other content A B One more row here Other stuff A B Adjust slider to change the width of the first vertical header CSS: JS:
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26664962

http://stackoverflow.com/comment/41755609
has text: @dandavis the idea is that the script shouldn't require configuring the server.
comment on: http://stackoverflow.com/a/26568171
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26550923
downvote count: 0
has comment: http://stackoverflow.com/comment/41723995
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26550875
has comment: http://stackoverflow.com/comment/41781161
has comment: http://stackoverflow.com/comment/41726810
has body: You're trying to misuse the feature. Cancel means cancel, not "OK but do something else". That's why you can't do this. You'll have to find another way, such as rendering your own &lt;form&gt; to obtain the comments.

http://stackoverflow.com/comment/41869028
has text: For your problem: if you want to use a plugin, you will find one on google (I'm pretty sure) and if you want to write your own solution, create a 3-dimensional div hirarchie: a top-level-container with a fixed size and overflow hidden and a scroll child, with the width of 100% * the count of slide pages (do this in javascript) and then a container for each page (width 100%, float left, display inline-block) containing your images inside (or other content as you want)
score: 0
comment on: http://stackoverflow.com/q/26630075
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41680628
type: Comment
type: QuestionComment
has text: @Niko ah I misunderstood the problem (just thought check the input as number).
comment on: http://stackoverflow.com/q/26526511
score: 0

http://stackoverflow.com/q/26653160
tagged with: sql-server
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I want to bind/show data from sql server into a .html page by using javascript,AJAX,jquery but without using c#,php,vb.net etc.... can anyone plz help by posting some reference links or by posting the code itself..
has answer: http://stackoverflow.com/a/26653311
has title: How do I bind data from SQL Server to an HTML page.?
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41909559
tagged with: ajax

http://stackoverflow.com/q/26529225
has comment: http://stackoverflow.com/comment/41692229
has title: jquery autocomplete does not respond to dynamically inserted element
has comment: http://stackoverflow.com/comment/41695240
has answer: http://stackoverflow.com/a/26559809
has comment: http://stackoverflow.com/comment/41685403
accepted answer: http://stackoverflow.com/a/26559607
has comment: http://stackoverflow.com/comment/41686112
possible better answer: http://stackoverflow.com/a/26559809
has comment: http://stackoverflow.com/comment/41687629
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41685245
has body: We are working on autocomplete with dynamically inserted elements with jquery (did autocomplete on static elements before). Here is the html source code for one autocomplete added element inserted (there may be more than one element inserted on the same page). The id of inserted element is unknown until it has been inserted. The ids vary from element to element: &lt;input type="text" size="50" placeholder="Enter keyword" name="requisition[material_items_attributes][1414037215952][item_name_autocomplete]" id="requisition_material_items_attributes_1414037215952_item_name_autocomplete" data-autocomplete-source="/whs/items/autocomplete" class="string required span5"&gt; Here is the js code for autocomplete: $(function() { $("[id^='requisition_material_items_attributes_'][id$='_item_name_autocomplete']").each(function (){ return $(this).autocomplete({ minLength: 1, source: $(this).data('autocomplete-source'), select: function(event, ui) { $(this).val(ui.item.value); } }); }); }); When keyword entered in text box of item_name_autocomplete, nothing happens. We found that the js code for autocomplete was not executed and there is no match of the id. What could cause the no match? Is it because the dynamic element needs reloading before match (not sure how to use .on here. or there is some other ways to do the reloading)?
has comment: http://stackoverflow.com/comment/41690983
type: Question
has comment: http://stackoverflow.com/comment/41685122
tagged with: jquery-ui
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/41686139
tagged with: javascript
has answer: http://stackoverflow.com/a/26559607
tagged with: jquery
score: 0
answer count: 2

http://stackoverflow.com/a/26639032
type: Answer
answers question: http://stackoverflow.com/q/26638826
score: 0
has body: Ty using this code to access: var rows= $('#element_ID &gt; tbody &gt; tr').length var columns=$('#element_ID').find('tr')[0].cells.length; var text = $($('#element_ID').find('tbody &gt; tr')[rows-1]).children('td')[counter].innerHTML;

http://stackoverflow.com/q/26617849
tagged with: css
score: 4
type: AnsweredQuestion
tagged with: internet-explorer-11
has body: jsfiddle here This is a bug specific to IE and I'm looking for a work around. When I apply a CSS transform: translate to a text input, that has the focus, with transition set to something valid, the cursor stays in the old location while the element moves. Once you start typing it moves to the correct location, but before that the cursor stubbornly blinks at the old location. This code illustrates the problem... again, it's an IE specific bug. var toggleTop = function(){ $('.input-container').toggleClass('top'); $('#the-input').focus(); } $('#the-button').click(toggleTop); .input-container { top: 100px; left: 100px; position: fixed; transition: all 1s; } .input-container.top { transform: translateY(-100px); } Click Me!
type: Question
upvote count: 4
tagged with: transform
accepted answer: http://stackoverflow.com/a/26619926
answer count: 2
has answer: http://stackoverflow.com/a/36451442
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/36451442
tagged with: translate-animation
favorite count: 0
has title: Cursor in wrong position in IE11 after CSS transform w/ transition
has answer: http://stackoverflow.com/a/26619926

http://stackoverflow.com/comment/41791528
has text: Yes, exactly. When someone navigate to image it is invisible and table will appear instead of it.
comment on: http://stackoverflow.com/q/26588229
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/51105622
type: QuestionComment
has text: It's clearly bug in their implementation. You can create bug in blink bugzilla.
comment on: http://stackoverflow.com/q/26655513
score: 1
type: Comment

http://stackoverflow.com/comment/47812605
has text: could you recollect it..if you can ??
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26602017

http://stackoverflow.com/a/26645709
answers question: http://stackoverflow.com/q/26645220
upvote count: 5
has body: I will start you with an example and see if you can figure out the HTML generation yourself. You can also find this on Github: https://github.com/vasilionjea/treepath The paths: var paths = [ "d1/d2/d3/file1.txt", "d1/d2/d3/file2.txt", "d2/d3/file3.txt", "d3/file4.txt", "d1/d2/first.png", "d2/second.png", "d1/photo1.jpg", "d1/photo2.jpg", "animate.gif" ]; Code to build a tree: var tree = { // Represents the "root" directory, like in a filesystem. root: { absolute_path: '', files: [] } }; function buildTree(parts) { var lastDir = 'root'; var abs_path = ''; parts.forEach(function(name) { // It's a directory if (name.indexOf('.') === -1) { lastDir = name; abs_path += lastDir + '/'; if (!tree[name]) { tree[name] = { absolute_path: abs_path, files: [] }; } } else { tree[lastDir].files.push(name); } }); } paths.forEach(function(path, index, array) { buildTree(path.split('/')); }); Now log the constructed tree: console.log(tree); // Output: { "root": { "absolute_path": "", "files": [ "animate.gif" ] }, "d1": { "absolute_path": "d1/", "files": [ "photo1.jpg", "photo2.jpg" ] }, "d2": { "absolute_path": "d1/d2/", "files": [ "first.png", "second.png" ] }, "d3": { "absolute_path": "d1/d2/d3/", "files": [ "file1.txt", "file2.txt", "file3.txt", "file4.txt" ] } }
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41897968
accepted answer of: http://stackoverflow.com/q/26645220

http://stackoverflow.com/a/26626039
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: A couple of issues there: clearInterval(varname); will call clearInterval with the argument varname, which is the value of the variable you pass in as of when you pass it, not later when you're looking at it (because the value of, say, p1, is read and then passed into the function). Although you could fix that by using properties of an object and passing the property name, there's a better way. All of your counters share the same i variable, so at the very least you can't stop at i == precent because only one of the three will ever see that. It also makes the counters increment oddly. It's "percent," not "precent". :-) I would use separate i variables, have counter manage things itself, and probably use a chain of setTimeout rather than setInterval: function counter(tag_name, percent) { var i = 0; run(); function run() { i++; $(tag_name).html(i + "%"); if (i < percent) { setTimeout(run, 50); } } } counter("#p1", 60); counter("#p2", 60); counter("#p3", 60); But if you want them to share i, you could use properties as I mentioned earlier: var i = 0; var handles = {}; function counter(tag_name, percent, propname) { i++; if (i >= percent) clearInterval(handles[propname]); if (i <= percent) $(tag_name).html(i + "%"); } handles.p1 = setInterval(function () { counter("#p1", 60, "p1"); }, 50); handles.p2 = setInterval(function () { counter("#p2", 60, "p2"); }, 50); handles.p3 = setInterval(function () { counter("#p3", 60, "p3"); }, 50); That works because in JavaScript, you can refer to a property using either dot notation and a literal property name (obj.foo), or brackets notation and a string property name (obj["foo"]). I would tend to go with the first example, though.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26625979
answers question: http://stackoverflow.com/q/26625979

http://stackoverflow.com/a/26665963
upvote count: 5
has comment: http://stackoverflow.com/comment/41957581
has comment: http://stackoverflow.com/comment/41934207
has comment: http://stackoverflow.com/comment/41933895
score: 5
has comment: http://stackoverflow.com/comment/41955235
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41960703
has comment: http://stackoverflow.com/comment/41933797
has body: Some of these functions return a live NodeList, which means that when you change the DOM, the collection changes immediately to reflect this. That's why a normal for loop doesn't work: when you remove elem[0], all the other entries in the collection move down. Then when you increment the index, you skip over the new elem[0]. The easiest way to work around this is to loop from the high end down, instead of from 0 up. for (var j = elem.length-1; j &gt;= 0; j--) { if (elem[j].parentNode) { elem[j].parentNode.removeChild(elem[j]); } }
has comment: http://stackoverflow.com/comment/41933869
type: Answer
has comment: http://stackoverflow.com/comment/41933691
has comment: http://stackoverflow.com/comment/41933845
accepted answer of: http://stackoverflow.com/q/26665916
has comment: http://stackoverflow.com/comment/41933778
answers question: http://stackoverflow.com/q/26665916

http://stackoverflow.com/q/26627075
has answer: http://stackoverflow.com/a/26627132
downvote count: 5
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26627172
has answer: http://stackoverflow.com/a/26627322
has comment: http://stackoverflow.com/comment/41863703
has title: how to check checkbox state in jQuery?
favorite count: 0
has body: I upgrade my jQuery library to 1.9.1 and have this code: if ( !($("#Days_Sat").attr("checked")) &amp;&amp; !($("#Days_Sun").attr("checked")) &amp;&amp; !($("#Days_Mon").attr("checked")) &amp;&amp; !($("#Days_Tu").attr("checked")) &amp;&amp; !($("#Days_We").attr("checked")) &amp;&amp; !($("#Days_Tr").attr("checked")) &amp;&amp; !($("#Days_Fr").attr("checked"))) { alert("pleas select day"); } but even i select day checkbox the alert shown!
answer count: 9
has comment: http://stackoverflow.com/comment/41865975
has answer: http://stackoverflow.com/a/26627219
has answer: http://stackoverflow.com/a/26627184
has answer: http://stackoverflow.com/a/26627127
has answer: http://stackoverflow.com/a/26627120
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41863556
score: -4
has answer: http://stackoverflow.com/a/26627214
upvote count: 1
possible better answer: http://stackoverflow.com/a/26627120
has answer: http://stackoverflow.com/a/26627164
type: Question
linked to: http://stackoverflow.com/q/901712
accepted answer: http://stackoverflow.com/a/26627219

http://stackoverflow.com/comment/58740349
score: 0
type: AnswerComment
type: Comment
has text: Yeah my initial attempt was a bit sloppy, check out my edited version. Depending on exactly how you want to use it, you might want to extend it a bit more
comment on: http://stackoverflow.com/a/35501063

http://stackoverflow.com/comment/41925319
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26661590
has text: This doesn't work for matching the *end* of the words. "Happy" returns true, since it contains "ha", for example. Maybe it needs the $ at the end of uu and ha also?

http://stackoverflow.com/a/26645278
downvote count: 0
has body: Change your regex like below to match both integer and floating point numbers. var decimalValidation = /^\d+(?:\.\d+)?$/; DEMO
type: Answer
accepted answer of: http://stackoverflow.com/q/26645250
answers question: http://stackoverflow.com/q/26645250
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/q/26593758
upvote count: 1
has comment: http://stackoverflow.com/comment/41803356
tagged with: ruby-on-rails
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41803212
has comment: http://stackoverflow.com/comment/41803021
tagged with: ruby-on-rails-4
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/41826654
tagged with: javascript
score: 1
favorite count: 0
type: Question
has body: I have to load JS files in order in a rails view. In the rails view I have: &lt;%= javascript_include_tag "diagrams" %&gt; The diagrams.js manifest file have the required JS files in the order that is needed: //= require diagramtool/kinetic //= require diagramtool/diagramtool0 //= require diagramtool/diagramtool1 //= require diagramtool/diagramtool2 But they are not load in the order specified in the diagrams.js file. I already have removed the require_tree . in the application.js file. What do I have to do to load the JS files in a specific order? Edit1: Every time I click in the view I get different results (it seems random): I don't really understand what is going on here!! Is that difficult in Rails to load JS files in order? I have read some things about the asset pipeline and I don't understand this random behaviour. If I refresh the page always works, the files are always loaded in order. Any help? Edit2: The view source is like this:
tagged with: asset-pipeline
linked to: http://stackoverflow.com/q/6149961
has title: Load JS files in specific order

http://stackoverflow.com/q/26646451
has title: An event to know when the HTML5 video is ready to played without black background
type: Question
has comment: http://stackoverflow.com/comment/41898149
tagged with: javascript
tagged with: html5-video
has comment: http://stackoverflow.com/comment/41898858
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26646781
favorite count: 0
has comment: http://stackoverflow.com/comment/41899156
has body: I have videos, sounds and images in an application I am creating. To display videos , I am suing the "video for all" format. But the problem is , it takes time for the video to load. I have added all kinds of event handlers, loadeddata , readystatechange, canplay , canplaythrough, loadedmetadata everything I could possibly could have tried. But all events occur before I actually see the poster of the video(untll which the background is black) and when It actually is loaded practically. How do I get to know when the video is actually ready to be played ?( I mean ACTUALLY ) The below function is called like this $video = getVideoObj({ //'controls' : 'controls', 'width': '100%', 'height': '100%', 'mediaUrl': appSettings.is_dev ? devMediaUrl + 'video/' + videoname : appSettings.site_url + 'resolve_path/' + mediaFilesUuid + '/media/video/' + videoname }), getVideoObj = function (videoProperties) { var controlsText = (videoProperties.controls &amp;&amp; videoProperties.controls == "controls") ? "controls='" + videoProperties.controls + "'" : "", $video = $('&lt;video/&gt;', { 'width': videoProperties.width, 'height': videoProperties.height }), mp4Src = (videoProperties.mediaUrl).replace('mov', 'mp4'), $sourceMp4 = $('&lt;source/&gt;', {'src': mp4Src, 'type': 'video/mp4' }), webmSrc = (videoProperties.mediaUrl).replace('mov', 'webm'), $sourcewebm = $('&lt;source/&gt;', { 'src': webmSrc, 'type': 'video/webm'}), oggSrc = (videoProperties.mediaUrl).replace('mov', 'theora.ogv'), $sourceOgg = $('&lt;source/&gt;', {'src': oggSrc,'type': 'video/ogg' }), $object = $('&lt;object/&gt;', { 'type': 'application/x-shockwave-flash', 'data': 'http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf', 'width': videoProperties.width, 'height': videoProperties.height }), $param1 = $('&lt;param/&gt;', { 'name': 'movie', 'value': 'http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf' }), $param2 = $('&lt;param/&gt;', { 'name': 'allowFullScreen', 'value': 'true' }), $param3 = $('&lt;param/&g…
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41900183
has comment: http://stackoverflow.com/comment/41899214
has comment: http://stackoverflow.com/comment/41898740
tagged with: video
has comment: http://stackoverflow.com/comment/41898337
score: 1
upvote count: 1

http://stackoverflow.com/a/48856243
score: 0
answers question: http://stackoverflow.com/q/26545549
type: Answer
has body: I think the way to think about it is: When you call bind() the first time the value of 'this' inside the function returned by the call to bind() is FIXED, to the given value. That is possible BECAUSE it wasn't fixed before, it was unbound. But once it is fixed it can not be fixed to anything else because it is no longer unfixed, it is no longer a "variable". In theory there could be an opposite operation to bind called "unbind" which you could call like: myFunk.bind(something) .unbind(); // -&gt; has same behavior as original myFunk The name "bind" indicates that the (pseudo-) variable 'this' is BOUND to something, it is not simply ASSIGNED a value, which could then be assigned again and again. When something is "bound" it has a value and that value can not be replaced --because it is "bound". So you would need an unbind() operation to make that possible. But since you assumably have the original function around somewhere there is no need for "unbind" really. I agree this behavior is perhaps surprising and unexpected and thus possibly error-prone because if you get a function as argument there seems to be no way to tell whether your bind() on it has any effect or not. HOWEVER if you don't know much about such function-argument it would also be impossible to know what kind of value you CAN bind to it without breaking the calls it makes to 'this' inside it. SO the bind() operation itself is rather hazardous. Re-binding would be doubly hazardous. So you are best off trying to avoid doing that if possible.

http://stackoverflow.com/a/26595675
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26557944
score: 0
answers question: http://stackoverflow.com/q/26557944
type: Answer
has body: Instead of location.reload(true); I used loaction.assign('address_I_wanted_to_go_to')

http://stackoverflow.com/a/26658770
score: 0
has body: ONDOWNLOAD FOLDER=* FILE=+_image.png WAIT=YES Does this help?
type: Answer
answers question: http://stackoverflow.com/q/26584645

http://stackoverflow.com/comment/41892460
type: QuestionComment
comment on: http://stackoverflow.com/q/26642910
score: 0
has text: What do you mean with "more efficient"?
type: Comment

http://stackoverflow.com/q/26528725
has comment: http://stackoverflow.com/comment/41687015
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41685848
has body: When I attach a click handler inside the procedure of another click handler, the same event immediately triggers the newly defined handler. How to prevent this? &lt;input onclick="document.body.addEventListener('click',function(){ document.body.removeEventListener('click',this);alert('test');})"&gt;
accepted answer: http://stackoverflow.com/a/26528837
has comment: http://stackoverflow.com/comment/41689875
type: Question
tagged with: javascript
has title: Prevent firing an event when it's registered within a handler of the same event type
linked to: http://stackoverflow.com/q/779379
score: 0
has comment: http://stackoverflow.com/comment/41695856
answer count: 1
has answer: http://stackoverflow.com/a/26528837
tagged with: dom-events

http://stackoverflow.com/comment/41801392
comment on: http://stackoverflow.com/a/26590097
has text: If I do it like this `new String('RUA CALLOUSTE GULBENKIAN N.\xBA\ 42 3\xBA ESQ')` it works but if I use a variable like this `new String(variable)` that contains the same it stops working. Do you know what may be issue?
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26624206
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26624096
answers question: http://stackoverflow.com/q/26624096
has body: try this, var jsonString = '{"status":{"message":"success","code":200},"data":[{"sent":"test","category":"Appo","experience_time":"2014-10-07","sent_id":4501922,"categoryId":4011,"score":"Negative","feature":"emp","op":"challenges"}]}'; var result = jQuery.parseJSON(jsonString); $.each(result.data, function(index, value) { alert(value.score); });
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41899501
type: Comment
comment on: http://stackoverflow.com/q/26641671
has text: @LanderVanBreda I did the changes as you said and it worked, thanks :) you can mention this as answer rather comment, I will mark it as accepted answer. Just for your information - **$(this)** was working in earlier version of zeroClipboard, you can see that working in Bootstrap's current website. It's some how not working in latest version of zeroClipboard but now it's working with **$(event.target)**
score: 0
type: QuestionComment

http://stackoverflow.com/q/26659316
favorite count: 0
score: 1
has answer: http://stackoverflow.com/a/26659437
has answer: http://stackoverflow.com/a/26691129
upvote count: 1
has comment: http://stackoverflow.com/comment/41921047
linked to: http://stackoverflow.com/q/14663602
possible better answer: http://stackoverflow.com/a/26659437
has title: How to retain old values for HTML controls when jQuery UI dialog box is closed ("cancelled")?
type: AnsweredQuestion
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/41921009
accepted answer: http://stackoverflow.com/a/26691129
has comment: http://stackoverflow.com/comment/41978478
type: Question
answer count: 2
has body: I have a JQuery UI modal dialog box in the form of an HTML (well ...) form with select and input (checkbox) controls. The dialog box and the controls work as one would expect, except that the controls retain their new states (e.g. checkbox selected) even if I close the dialog boxes window (or press a button "Cancel"). Is there any mechanism whereby I can make a jQuery UI dialog box retain the old control states when a certain exit button (e.g. "Cancel") is pressed, or do I have do roll my own state management in JavaScript (I hope not). Here's an example of what currently happens and should not: Enter dialog box. Checkbox is off. Change checkbox from off to on. Close dialog box window. Open it again. Checkbox is on (I want it to be off, because the dialog box was previously "cancelled"). UPDATE Here is a relevant portion of my HTML, including a call to clone(). &lt;script&gt; $(function() { var dialog = $("form.dialog").clone().dialog({ autoOpen: false, height: 300, width: 300, modal: true, buttons: [ { text: "Ok", click: function() { $(this).submit(); $(this).dialog("close"); } }, { text: "Cancel", click: function() { $(this).dialog("close"); } } ] }); $(“#dialog-button”).on("click", function() { dialog.dialog("open"); return false; }); }); &lt;/script&gt; &lt;form hidden method="post" action="" class="dialog" class="ui-dialog-titlebar ui-widget-header" title=“Test”&gt; &lt;select name="name"&gt; &lt;/option&gt; &lt;option value="value"&gt; Test &lt;/option&gt;
downvote count: 0
linked to: http://stackoverflow.com/q/6364289
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26641440
has comment: http://stackoverflow.com/comment/41889924
favorite count: 0
score: -3
possible better answer: http://stackoverflow.com/a/26641545
has comment: http://stackoverflow.com/comment/41889913
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26641545
upvote count: 0
has title: Rounding number to lowest 35
has comment: http://stackoverflow.com/comment/41889915
has body: I'm trying to achieve the following, round any number to the lowest 35. For example: 5 = 0 34 = 0 90 = 70 105 = 105 110 = 105 I'm using the following code right now, $top = (event.pageY-50); $top = Math.floor(($top/35))*35; However, when it's 153, it should round it to 140, however it rounds it to 105? Any help would be appreciated.
has answer: http://stackoverflow.com/a/26641552
type: Question
has answer: http://stackoverflow.com/a/26641523
accepted answer: http://stackoverflow.com/a/26641523
tagged with: javascript
has comment: http://stackoverflow.com/comment/41889905
downvote count: 3
answer count: 3

http://stackoverflow.com/a/26541548
has comment: http://stackoverflow.com/comment/42444528
has comment: http://stackoverflow.com/comment/41931262
type: Answer
has body: Here's a forked codepen: http://codepen.io/anon/pen/CotJv It looks like you have a few issues with your codepen. 1) Your codepen is incomplete. Unlike the jsfiddle you linked to, the codepen does not have all the resources. If you add animOnScroll and the animate CSS (I copied just one from the working fiddle, you may desire another animation), etc. you don't have an error thrown immediately. 2) The animOnScroll.js file referenced on the jsfiddle page handles the imagesLoaded and masonry init internally. If you're going to use that file, I'd recommend allowing animOnScroll.js to continue handling those. 3) The animOnScroll.js file expects a certain DOM tree. Specifically, it wants to see unordered lists (ul and li). If you don't mind hosting the file, you can make the change directly to the file and change those requirements. All that together, here's a forked codepen that illustrates those changes: Again, codepen: http://codepen.io/anon/pen/CotJv I keep your markup, but update the JS to work with it. The specific changes are: Line 89 (what elements to apply the CSS animate class) : this.items = Array.prototype.slice.call( document.querySelectorAll( '.grid_4' ) ); Previously: this.items = Array.prototype.slice.call( document.querySelectorAll( '#' + this.el.id + ' &gt; li' ) ); Line: 100 (initializing Masonry) - Here we hardcode the class name (.grid_4): itemSelector: '.grid_4', Previously: itemSelector: 'li' Hopefully this helps!
score: 2
has comment: http://stackoverflow.com/comment/42444545
answers question: http://stackoverflow.com/q/26540266
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26540266
has comment: http://stackoverflow.com/comment/41735925
upvote count: 2
has comment: http://stackoverflow.com/comment/41759417
has comment: http://stackoverflow.com/comment/41776995
has comment: http://stackoverflow.com/comment/42006851
type: AcceptedAnswer

http://stackoverflow.com/comment/103393813
type: Comment
type: QuestionComment
has text: AFAIK on every setInterval run the observableArray changes and the view will be redrawed, so this might even be less performant to initialy wait to draw all rows, also you will have all rows in two observableArrays which doubles the payload, you might be better of with limiting and paging your results or just show some loading-indicator while "browser hangs"
comment on: http://stackoverflow.com/q/26608810
score: 0

http://stackoverflow.com/comment/41905837
comment on: http://stackoverflow.com/a/26650792
score: 0
type: AnswerComment
has text: @Regent: There are actually about 6 different problems with this question. Getting bored now :)
type: Comment

http://stackoverflow.com/a/26588908
has comment: http://stackoverflow.com/comment/41792780
has body: try to add &lt;span ng-bind-html="resulKeywords | highlight:rechercheKeywords"&gt;&lt;/span&gt; &amp;nbsp;
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26588826
score: 4
answers question: http://stackoverflow.com/q/26588826
type: Answer

http://stackoverflow.com/comment/41771856
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26577155
score: 0
has text: I guess you need to check stats4 element exists in document

http://stackoverflow.com/q/26557360
has body: I'm working on a JS Facebook app that searches the most recent status post from each of my friends, but I've run into a significant development obstacle: As of v2.0 of the Graph API, /me/friends only lists friends who have installed the app. Here's the code I was using: function testAPI() { console.log('Welcome! Fetching your information.... '); FB.api('/me/friends', function(response) { var statusElement=document.getElementById('output'); statusElement.innerHTML=JSON.stringify(response.data); }); } This returned no results, which I assume is because I am the only user who has installed this app. I understand that this is a good change for protecting users' privacy, and I'm not complaining about that. Some other SO answers suggested using taggable_friends as a workaround, but that requires app review; how can I build and test the app to make it reviewable if I don't have a way to retrieve a sample data set of friends? I could ask some of my friends to install it so that their statuses will be available, but I would rather wait to ask that favor until I'm sure that the app is working properly and won't cause them any problems. So, how do developers who are starting work on a new app that uses taggable_friends do their initial work to prepare the app for review? Or do I not need to have a working app to pass review?
tagged with: facebook
has comment: http://stackoverflow.com/comment/41736033
has comment: http://stackoverflow.com/comment/44489481
accepted answer: http://stackoverflow.com/a/28060815
has comment: http://stackoverflow.com/comment/41736400
has comment: http://stackoverflow.com/comment/44462745
has comment: http://stackoverflow.com/comment/44489845
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41736231
downvote count: 0
has comment: http://stackoverflow.com/comment/44481930
has answer: http://stackoverflow.com/a/28060815
type: Question
linked to: http://stackoverflow.com/q/28051190
has title: How to get list of Facebook friends for testing an app, given the new Graph API limitations?
has comment: http://stackoverflow.com/comment/44468753
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/41736155
has comment: http://stackoverflow.com/comment/41736166
answer count: 1
tagged with: facebook-graph-api
favorite count: 0
has comment: http://stackoverflow.com/comment/41736262
has comment: http://stackoverflow.com/comment/41736032

http://stackoverflow.com/a/26570563
upvote count: 3
has comment: http://stackoverflow.com/comment/41759712
type: Answer
downvote count: 0
has body: json.sort(function(a, b) { return a.price - b.price; });//sort ascending
answers question: http://stackoverflow.com/q/26570519
score: 3

http://stackoverflow.com/a/26514647
answers question: http://stackoverflow.com/q/26514481
has comment: http://stackoverflow.com/comment/115187596
type: Answer
has body: Yes, sort of, although its not terribly simple. You will have to use code in the event handler for each div that triggers the event the other is listening for. See Juan's answer to this question, the code he wrote can be generalized to other events.
has comment: http://stackoverflow.com/comment/41673887
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/41937706
has text: I can add a " " in html. I want to do it using Javascript.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26668232

http://stackoverflow.com/comment/41672946
type: QuestionComment
has text: How are you posting back (AJAX or normal submit)? And what is the signature of the controller method?
comment on: http://stackoverflow.com/q/26521234
score: 0
type: Comment

http://stackoverflow.com/comment/51221697
comment on: http://stackoverflow.com/q/26650152
score: 0
type: QuestionComment
type: Comment
has text: a related question is this one: http://stackoverflow.com/questions/17927476/can-i-make-the-transcluded-scope-of-a-directive-be-the-same-as-the-parents. But the poster asks for a way to make the transclude directive scope be the parent scope. I am asking a slightly different question, why did the Angular team decide, and what is the benefit, of having the directive scope be a _child_ of the parent scope (which, granted, inherits from the parent scope, but is not the same).

http://stackoverflow.com/q/26603004
tagged with: jquery
has comment: http://stackoverflow.com/comment/41819426
has answer: http://stackoverflow.com/a/26604772
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26604904
has comment: http://stackoverflow.com/comment/41819497
has comment: http://stackoverflow.com/comment/41819615
has title: how to send object one controller to another controller in angular?
has comment: http://stackoverflow.com/comment/41819567
type: Question
has comment: http://stackoverflow.com/comment/41819277
tagged with: javascript
has body: can you please tell me how to send object one controller to another controller in angular ?I am able to do by sending in parameter .is there any other way to send object in another controller ? I do like this on button click I do like this .data is object.user id is string. $location.path('/navigation/'+JSON.stringify(data)+"/"+$scope.userId); in configuration when('/navigation/:userDetail/:voterID',{ templateUrl: 'partial/userdetail.html', controller: 'userdetail' }) I retrieve like that console.log(JSON.parse($routeParams.userDetail)); is there any another way to send object in another view with out using local storage $scope.checkPerson=function(){ $scope.loading=true; $http.post('http://192.168.11.218:8082/onlinevote/rss/checkUserDetail', { "voterID":$scope.userId, "name":$scope.userName, "fatherName":$scope.fatherName, "territory":$scope.territory, "dOB":$scope.dOB }). success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available console.log(data); console.log(status); console.log(headers); console.log(config); $scope.loading=false; $scope.loading=false; if(data.msg!="Already Vote with this id!") $location.path('/navigation/'+JSON.stringify(data)+"/"+$scope.userId) alert(data.msg) }). error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. alert('error') $scope.loading=false; }); } how to share with service ? is there any one idea ?
score: 0
answer count: 2

http://stackoverflow.com/comment/41712032
has text: WOW, Thanks, I don't thought about it)
type: Comment
comment on: http://stackoverflow.com/a/26544135
score: 0
type: AnswerComment

http://stackoverflow.com/comment/110377204
comment on: http://stackoverflow.com/a/45603880
has text: @camelBack, sorry no, I've moved on, not working on this at all any more. Good luck!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41925967
type: Comment
comment on: http://stackoverflow.com/q/26661479
has text: Not directly relevant to your problem, but there's no need to construct a regexp from a string using `new RegExp`. Just us a regexp literal `/.../`.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42152283
type: AnswerComment
comment on: http://stackoverflow.com/a/26662777
type: Comment
has text: do I give the "if" inside the for loop ?
score: 0

http://stackoverflow.com/q/26659840
has title: How to prevent regular expression test toggling when using a variable?
duplicate of: http://stackoverflow.com/q/15559897
answer count: 1
downvote count: 0
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/26659902
tagged with: node.js
type: AnsweredQuestion
has body: I just noticed the following strange behavior (both in browsers and nodejs: &gt; a = /^\/foo/g /^\/foo/g &gt; a.test("/foo") true &gt; a.test("/foo") false &gt; a.test("/foo") true &gt; a.test("/foo") false &gt; a.test("/foo") true What kind of mad science we have here? How can I prevent this behavior? I just want to have a regex variable that checks if a string matches the pattern globally. Documentation pages don't seem to bring some light there... I'd really appreciate a link to documentation references.
score: 1
upvote count: 1
linked to: http://stackoverflow.com/q/15559897
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26659902

http://stackoverflow.com/comment/49252367
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26551198
has text: any update? me too facing same issue like 'setting the ParentItemID and the ParentFolderId against the article, but sharepoint still creates it as a new thread instead of a reply.'?

http://stackoverflow.com/q/26615491
has body: I have a program that I am working on but need some help. I have the user entering a minimum number and a maximum number. I have a for loop that will loop through the range of numbers and display on the screen. I also need to find the factors for each number. I have a while loop within the for loop but I am getting an "allocation size overflow" error. Here is what I have so far: function getFactors(lowNum, highNum){ var result = "Finding all factors of numbers between " + lowNum + " and " + highNum + "&lt;br /&gt;&lt;br /&gt;"; for (var x=lowNum; x &lt;= highNum; x++) { result += "&lt;b&gt;" + x + ":&lt;/b&gt;"; //for loop to loop through the terms var factor=2; while(factor &lt;= lowNum){ if (lowNum % factor == 0){ result += factor + ", &lt;br /&gt;"; } lowNum++; } } return result; } getFactors(2, 10);
upvote count: 1
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26615676
accepted answer: http://stackoverflow.com/a/26615571
has answer: http://stackoverflow.com/a/26615676
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26615571
favorite count: 0
has title: Javascript - factor 2 numbers

http://stackoverflow.com/q/26577344
type: Question
tagged with: javascript
score: 0
has body: Hey I'm trying to get the 2 divs move out of each other by moving them 10% left and 10% right. They will move out of each other after the 1000 but won't move back after I scroll back before 1000 $(document).ready(function(){ var jq = $("#jqimg") var kevin = $("#kevinimg") $(window).scroll(function () { if ($(this).scrollTop() &gt; 1000) { kevin.animate({ marginLeft: "10%", },600); jq.animate({ marginRight:"10%", },600); } }); }); I tried to add this but that just breaks it else { kevin.animate({ marginLeft: "0%", },600); jq.animate({ marginRight:"0%", },600); } anyone have a solution?
has comment: http://stackoverflow.com/comment/41773002
answer count: 1
tagged with: web
has title: Scrolltop() (can't reverse the animation)
has answer: http://stackoverflow.com/a/26577671
type: UnansweredQuestion

http://stackoverflow.com/q/26579753
has comment: http://stackoverflow.com/comment/41776650
answer count: 0
type: UnansweredQuestion
has title: using inheritance inside a namespace
has comment: http://stackoverflow.com/comment/41794454
tagged with: oop
linked to: http://stackoverflow.com/q/9248655
tagged with: javascript
type: Question
duplicate of: http://stackoverflow.com/q/9248655
score: 0
has body: Inside a namespace, i have two object definitions (AKA: "classes"). ¿How can I make one class inherit from another inside the namespace? First, I tried with this: var ns = { // the namespace OneClass : function() { console.log("Instance of OneClass has been constructed"); this.foo = ":)"; }, Inherited : function() { this.anotherFoo = "):"; }, Inherited.prototype : new this.OneClass, Inherited.prototype.constructor = this.Inherited }; but this gives an error on the 11th line: SyntaxError: missing : after property id So I changed the code to this, and it worked: var ns = { // the namespace OneClass : function() { console.log("Instance of OneClass has been constructed"); this.foo = ":)"; } Inherited : function() { this.anotherFoo = "):"; } }; ns.Inherited.prototype = new ns.OneClass(); ns.Inherited.prototype.constructor = ns.Inherited; anyway, I don't like this solution, because the inheritance declaration must be declared at the end of the namespace, this makes the code "messy". So I'd rather to have the inheritance declaration as close as possible from the Inherited object definition.

http://stackoverflow.com/comment/41825199
score: 0
type: Comment
type: QuestionComment
has text: @Paulie_D Thanks. That was the problem as well.
comment on: http://stackoverflow.com/q/26602854

http://stackoverflow.com/comment/41756380
score: 0
type: Comment
has text: r=[1,2,2,2,3,3]; r.length - r.filter(function(a,b,c){return c.indexOf(a)==b;}).length;
type: QuestionComment
comment on: http://stackoverflow.com/q/26568529

http://stackoverflow.com/q/26618986
score: 0
has body: When this function is run, the request.status = 0. This usually means that the network is down but since the webpage loaded, this cannot be possible. I think it may be because I am using XAMPP and running on a localhost but I am not sure how to fix the problem. Here is the javascript function: &lt;script type="text/javascript"&gt; function submitForm() { var userKey; var username = login_form.elements["username"].value; function getKey() { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if(request.readyState == 4 &amp;&amp; request.status == 200){ userKey = request.responseText; } } request.open("POST", "key.php", true); request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); request.send("username="+username); } getKey(); } &lt;/script&gt; Here is the php function called "key.php". It is in the same folder as the html file: &lt;?php if (array_key_exists('username', $_POST)) { $username = $_POST['username']; echo '&lt;script language="javascript"&gt;'; echo 'alert("message successfully sent")'; echo '&lt;/script&gt;'; } else { echo 'Invalid parameters!'; } ?&gt;
tagged with: http://stackoverflow.com/tag/html
tagged with: xmlhttprequest
answer count: 0
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/41849248
has comment: http://stackoverflow.com/comment/41849213
tagged with: xampp
has comment: http://stackoverflow.com/comment/41850349
type: Question
tagged with: javascript
has title: XMLHttpRequest returning a status of 0

http://stackoverflow.com/a/26565765
has comment: http://stackoverflow.com/comment/41750808
score: 1
has comment: http://stackoverflow.com/comment/41751130
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41750968
accepted answer of: http://stackoverflow.com/q/26563847
has comment: http://stackoverflow.com/comment/41750749
type: Answer
answers question: http://stackoverflow.com/q/26563847
has body: you can try this: @collection.on('change', @renderEntries, this) renderEntries: (entry) -&gt; $('#entries').html(render('entries', { entries: yourEntriesCollection.toJSON() })) //some common.js file function render(template_name, data) { //here create logic to render specified template by name with data. // see example here: http://stackoverflow.com/questions/8366733/external-template-in-underscore return html; } you should create template for entries which you can render separately.
upvote count: 1

http://stackoverflow.com/q/26554744
type: Question
has body: This is a design portfolio page. On load, the JSON data is retrieved via ajax, and one of the keys is used to generate a list of '.project-links' (no project is displayed on load, and the project images are loaded only when a project is selected (see showProj function)). My question regards the fadein/fadeout: the images are still painting onto the screen after the fade in completes, despite the project content being defined/loaded within the fadeOut callback; can someone please enlighten me as to how I can tweak this so that the fadeIn won't run until the projImages are loaded? Thank you, svs. function ajaxReq() { var request = new XMLHttpRequest(); return request; } function makeLinks(projects) { // result = getJsonData &gt; request.responseText var projectList = document.getElementById("project-list"); for (var project in projects) { if (projects[project].status !== "DNU") { var projectId = projects[project].id; var listItem = "&lt;li&gt;&lt;a class=\"project-link\" id=\""+projects[project].project+"\" href=\"#\"&gt;" + projects[project].project + "&lt;/a&gt;&lt;/li&gt;"; projectList.innerHTML += listItem; } // if !DNU } // ADD EVENT LISTENERS var projLink = document.getElementsByClassName("project-link"); for (var i = 0; i &lt; projLink.length; i++) { var projId = projLink[i].id; //projLink[i].dataset.projIx = [i]; projLink[i].addEventListener("click", showProject, false); } var showNext = document.getElementById("show-next"); var showPrev = document.getElementById("show-previous"); showNext.addEventListener("click", showProject, false); showPrev.addEventListener("click", showProject, false); // ARROW KEYS [not invoking the showProject function] $(document).keydown(function(e) { if(e.which==37) { // LEFT arrow $(showPrev).click(showProject); console.log("previous"); } else if(e.which==39) { // RIGHT arrow $(showNext).click(showProject); console.log("next"); } }) function showProject(projId) { var intro = document.getElementById("intro"); if (intro) { intro.paren…
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1
tagged with: fadein
type: UnansweredQuestion
tagged with: fadeout
has title: Fadein callback not working properly with ajax-loaded json data
has answer: http://stackoverflow.com/a/26555173
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/26515671
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/41665873
has answer: http://stackoverflow.com/a/57973187
has answer: http://stackoverflow.com/a/26515807
favorite count: 0
has answer: http://stackoverflow.com/a/33358471
has comment: http://stackoverflow.com/comment/41667921
upvote count: 8
has answer: http://stackoverflow.com/a/26515923
has answer: http://stackoverflow.com/a/26515815
has comment: http://stackoverflow.com/comment/41667061
has comment: http://stackoverflow.com/comment/41666307
tagged with: node.js
score: 8
has comment: http://stackoverflow.com/comment/41666304
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26515815
has comment: http://stackoverflow.com/comment/41666446
has comment: http://stackoverflow.com/comment/41666074
has comment: http://stackoverflow.com/comment/41667735
has comment: http://stackoverflow.com/comment/41665961
has comment: http://stackoverflow.com/comment/41667643
has title: Asynchronous Calls and Recursion with Node.js
has comment: http://stackoverflow.com/comment/41666367
has comment: http://stackoverflow.com/comment/41666150
has answer: http://stackoverflow.com/a/26515903
has comment: http://stackoverflow.com/comment/41666053
type: Question
tagged with: recursion
accepted answer: http://stackoverflow.com/a/26515923
tagged with: javascript
has comment: http://stackoverflow.com/comment/41661633
answer count: 6
has comment: http://stackoverflow.com/comment/41665900
has body: I'm looking to execute a callback upon the full completion of a recursive function that can go on for an undetermined amount of time. I'm struggling with async issues and was hoping to get some help here. The code, using the request module, is as follows: var start = function(callback) { request.get({ url: 'aaa.com' }, function (error, response, body) { var startingPlace = JSON.parse(body).id; recurse(startingPlace, callback); }); }; var recurse = function(startingPlace, callback) { request.get({ url: 'bbb' }, function(error, response, body) { // store body somewhere outside these funtions // make second request request.get({ url: 'ccc' }, function(error, response, body) { var anArray = JSON.parse(body).stuff; if (anArray) { anArray.forEach(function(thing) { request.get({ url: 'ddd' }, function(error, response, body) { var nextPlace = JSON.parse(body).place; recurse(nextPlace); }); }) } }); }); callback(); }; start(function() { // calls final function to print out results from storage that gets updated each recursive call finalFunction(); }); It seems that once my code goes past the for loop in the nested requests, it continues out of the request and ends the initial function call while the recursive calls are still going on. I want it to not finish the highest-level iteration until all the nested recursive calls have completed (which I have no way of knowing how many there are). Any help is GREATLY appreciated!
linked to: http://stackoverflow.com/q/26431257
downvote count: 0

http://stackoverflow.com/comment/138316106
type: AnswerComment
comment on: http://stackoverflow.com/a/34708416
score: 0
type: Comment
has text: @Davy Your comment should actually be the accepted answer!

http://stackoverflow.com/a/26597880
type: Answer
answers question: http://stackoverflow.com/q/26597209
score: 0
has body: Using code provide by you: document.write(' an advertisemen '); if (document.getElementById("tester") == undefined) { document.write('HTML banner code here'); } else { docuement.write('Ad Server code here') } Both of your HTML banner and Ad Server codes will be in JavaScript which write a div to the core HTML file at a specific DOM point. Example: Add HTML elements dynamically with JavaScript inside DIV with specific ID

http://stackoverflow.com/q/26553178
type: Question
linked to: http://stackoverflow.com/q/2901102
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
type: UnansweredQuestion
has body: Currently output 1844.6304 desired output - comma thousands trim after dot ( no rounding ) 1,844 I was looking some time on forums and can't find a solution to solve both cases.
has title: Number formatting remove numbers after dot add comma at thousands
has answer: http://stackoverflow.com/a/26553351
has answer: http://stackoverflow.com/a/26553385
has comment: http://stackoverflow.com/comment/41728397
has answer: http://stackoverflow.com/a/26553665

http://stackoverflow.com/q/26668543
has comment: http://stackoverflow.com/comment/41949452
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26668708
type: UnansweredQuestion
has body: I am new with JS and jQuery and I am trying to show the selected value from a Select filed in two different place, I did this by using Javascript function. Which was using #ID. But I need to use Class name instead of #ID. I found jQuery Live for easy solution. Please help me anybody. Here is my jsFiddle link. Here I use two Select Options one is to select and view Selected Comment, another is to select and display Quantity. The comment option is okay in JS using #ID. I tried to get same result in Quantity Option by jQuery Livequery and by taking help from CLASS. Plaese Help and Thanks in advance. http://jsfiddle.net/kb3gN/7013/ I actually Need Help for this part: ######################### function selectQty(){ $(".qtyClass").change(function(){ var quantity= $(this[this.selectedIndex]).val(); $('.pakQuantity1').html(quantity); $('.pakQuantity2').html(quantity); }); } ########################## function getOption(){ var obj = document.getElementById("commentList"); document.getElementById('display2').innerHTML = obj.options[obj.selectedIndex].text ; document.getElementById('display1').innerHTML = obj.options[obj.selectedIndex].value ; } function selectQty(){ $(".qtyClass").change(function(){ var quantity= $(this[this.selectedIndex]).val(); $('.pakQuantity1').html(quantity); $('.pakQuantity2').html(quantity); }); } Add a comment: Choose a Comment Extra Spicy Extra Sugar Alabama Add Quantity: Quantity 1 2 3 4 5 Package: Samsang 4GS Price: 1000 VAT: 15% Quantity: 1 Comment: No Comments Samsang 4GS Name:1000 vat:15 Quantity:1 Commment No:
has title: jQuery and Livequery Help for onchange()
type: Question
has comment: http://stackoverflow.com/comment/41938343
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26587964
has comment: http://stackoverflow.com/comment/41796025
has comment: http://stackoverflow.com/comment/41791318
answer count: 0
tagged with: pixel
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41790986
has comment: http://stackoverflow.com/comment/41790865
has body: Currently using JavaScript and canvas to get rid of white background of image and make it transparent. The method below should do this but g.putImageData(imgd,0,0); (Last Line) gives me an error: TypeError: g.putImageData is not a function. Why is this or is there an easier way to make all images on my canvas with white background transparent? var imgd = g.getImageData(leftX,leftY,Weight,Height), pix = imgd.data, newColor = {r:0,g:0,b:0,a:0}; for (var i = 0, n = pix.length; i&lt;n; i +=4) { var r = pix[i], g = pix[i+1], b = pix[i+2]; if (r == 225 &amp;&amp; g == 225 &amp;&amp; b == 225 ) { pix[i] = newColor.r; pix[i+1] = newColor.g; pix[i+2] = newColor.b; pix[i+3] = newColor.a; } } g.putImageData(imgd,0,0);
has comment: http://stackoverflow.com/comment/41790995
type: Question
tagged with: canvas
has title: Making white backgrounds transparent in canvas
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26639925
has comment: http://stackoverflow.com/comment/41887495
tagged with: css
has title: jitter when using jquery to alter background-position
score: 0
answer count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26640490
tagged with: javascript
tagged with: jquery
has body: Here's the jsfiddle. It's the interface to cropping an image. As you can see the selection div takes the same background image and positions it to the negative of the top and left attributes of the selection div. In theory this should give a perfect overlap, but there's a jitter as you move the selection div around, and I can't seem to figure out what is causing it. html &lt;div id="main"&gt; &lt;div id="selection"&gt;&lt;/div&gt; &lt;/div&gt; css #main { width: 600px; height: 450px; position: relative; background: url("http://cdn-2.historyguy.com/celebrity_history/Scarlett_Johansson.jpg"); background-size: contain; } #selection { width: 100px; height: 100px; position: absolute; background: url("http://cdn-2.historyguy.com/celebrity_history/Scarlett_Johansson.jpg"); border: 1px dotted white; background-size: 600px 450px; } jquery $(document).ready(function () { var move = false; var offset = []; var selection = null; $("#selection").mousedown(function (e) { move = true; selection = $(this); offset = [e.pageX - selection.offset().left, e.pageY - selection.offset().top]; }); $("#selection").mousemove(function (e) { if (move == true) { selection.css("left", e.pageX - offset[0]); selection.css("top", e.pageY - offset[1]); selection.css("background-position", (((-selection.position().left) - 1) + "px " + ((-selection.position().top ) - 1) + "px")); } }); $("#selection").mouseup(function (e) { move = false; }); })
has answer: http://stackoverflow.com/a/26643217
type: Question
has comment: http://stackoverflow.com/comment/41887667

http://stackoverflow.com/q/26636624
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41892156
type: Question
tagged with: object
has body: I wanted to be able to create an object that had it's own intrinsic value. That way I could use it in an expression as if it was a regular variable. It turned out to be quite easy - so easy I am wondering if I am missing something. All it seems to take is to make sure the object contains a method "valueOf". Like so: var p = { a: 12; valueOf: function(){return this.a+12} } alert(p/3); // =8 It's probably a good idea to include a "toString" method too. What seems to be happening is that without the valueOf method, a reference to the object goes up the prototype chain until it finds the method on Object, which just returns "object Object". By providing a local one, the method can return anything. It seems to work in all browsers that I tried. It is really another way to provide a getter-like functionality. But a little better because getters can only be applied to properties of objects. This way you can use the object itself. What do you think? Is this safe? Any pitfalls?
tagged with: javascript
has title: Objects with their own intrinsic value. Another way to do getters
tagged with: getter
has answer: http://stackoverflow.com/a/26656871
score: 0
has comment: http://stackoverflow.com/comment/41880650

http://stackoverflow.com/q/26529192
tagged with: http://stackoverflow.com/tag/json
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/41685055
has body: I am going to create a single page application which will be a dictionary of 32,000 terms. This needs to be single page as it will be used by a very non-tech public and there can be no installation procedure. I currently have the data in xml format. The xml format is The word Prononciation Adjective / verb etc. html content containing the definition of the word 32,000 of these, the total xml size is 16Mb. Only one word will be shown at a time, i.e. there will be a search box with auto-complete that will lead you to a word, you hit enter and the word information is displayed. My question is : from a browser performance perspective, am I better off converting the data to json, html (i.e. etc, ) or xml ? The size of the individual json/html/xml files that I have created are all pretty similar. Are references to explained the proposed data format would be appreciated also ? Best regards, Colm
tagged with: javascript
has comment: http://stackoverflow.com/comment/100707367
score: 0
has title: For a single page application including data, is it better to have data in json,html or xml?
has comment: http://stackoverflow.com/comment/41692569
has comment: http://stackoverflow.com/comment/41685619
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/41685072
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41685300
has comment: http://stackoverflow.com/comment/41685102

http://stackoverflow.com/comment/41793830
type: QuestionComment
has text: Also consider how this will work on touch devices (potentially half your users, or more).
comment on: http://stackoverflow.com/q/26588229
score: 0
type: Comment

http://stackoverflow.com/q/26605549
answer count: 3
has comment: http://stackoverflow.com/comment/41824117
has comment: http://stackoverflow.com/comment/41824243
has answer: http://stackoverflow.com/a/26605736
has comment: http://stackoverflow.com/comment/41824036
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26642087
score: 0
has comment: http://stackoverflow.com/comment/41823836
type: Question
has comment: http://stackoverflow.com/comment/41824801
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/41824633
has title: MVC AJAX call url format
tagged with: javascript
tagged with: jquery
has body: I am working on a small MVC 5 application which has a handful of views and javascript files. The project structure is pretty standard, i.e. the normal layout for Controllers, Views, Scripts etc but I'm having problems the the AJAX calls within the scripts when I deploy to the client system - where the application is deployed within a Virtual Directory, e.g. http://host/application/. The issue is caused by the url parameter of the jquery ajax call not resolving consistently. For example, one script is happy with: $.ajax({ url: 'controller/action' ....}); while another requires $.ajax({url: '../controller/action' ....}); and most recently another requires $.ajax({url: '../action' ....}); I can't see that I've done anything differently for these scripts (or controllers or views) so why are the urls being generated differently? I can work around this for now but want to understand the cause of the problem so i don't get in a mess later.
tagged with: ajax
has answer: http://stackoverflow.com/a/26658488

http://stackoverflow.com/a/26635719
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42169697
has comment: http://stackoverflow.com/comment/42305948
has comment: http://stackoverflow.com/comment/42054182
has comment: http://stackoverflow.com/comment/42173047
has comment: http://stackoverflow.com/comment/41902881
has comment: http://stackoverflow.com/comment/42047604
has comment: http://stackoverflow.com/comment/42100198
has comment: http://stackoverflow.com/comment/41885939
upvote count: 1
has body: The problem is the way you're removing the nodes and links. The following lines create new nodes and links arrays, shadowing the previous definitions: nodes = nodes.filter(function(n) { return n.id !== 'bbb'; }); links = links.filter(function(l) { return (l.source.id !== 'bbb' &amp;&amp; l.target.id !== 'bbb'); }); The old, now shadowed definitions are still used by the force layout internally. That is, positions for the (removed) node bbb are still being updated. You just can't see that because the overwritten definitions are used in the tick handler function. Now when you add a new node and new links, the data structures used internally by the force layout (the old nodes and links) aren't updated, only the new ones, used by the tick handler function are. This means that while the new node is drawn, the force layout doesn't know about it and hence doesn't compute coordinates for it. There are two ways of fixing this. As pointed out in the other answer, you can simply reassign nodes (and also links!) to the force layout when they change: force.nodes(nodes); force.links(links); The disadvantage of this approach is that you lose the internal state of the force layout. This matters less in your particular case where the layout is fairly settled when you make the changes, but if you do this just after starting when the forces are still quite strong, you may experience some "jumpiness". The alternative is to modify the data structures that are used by the force layout directly instead of reassigning: function step2() { links.splice(0, 1); links.splice(1, 1); nodes.splice(1, 1); recalc(); } Complete example here. I've hardcoded the indices of nodes and links to remove here to simplify, but you can obviously also compute them dynamically, as I've done in this demo.
has comment: http://stackoverflow.com/comment/42102428
has comment: http://stackoverflow.com/comment/42175343
has comment: http://stackoverflow.com/comment/42103463
has comment: http://stackoverflow.com/comment/42017596
has comment: http://stackoverflow.com/comment/42056684
has comment: http://stackoverflow.com/comment/42173306
has comment: http://stackoverflow.com/comment/42012239
has comment: http://stackoverflow.com/comment/42056385
has comment: http://stackoverflow.com/comment/42087071
has comment: http://stackoverflow.com/comment/42019932
has comment: http://stackoverflow.com/comment/41886378
has comment: http://stackoverflow.com/comment/41886774
has comment: http://stackoverflow.com/comment/41885398
has comment: http://stackoverflow.com/comment/42049965
type: Answer
has comment: http://stackoverflow.com/comment/42308464
has comment: http://stackoverflow.com/comment/42090689
has comment: http://stackoverflow.com/comment/42167891
has comment: http://stackoverflow.com/comment/42050689
downvote count: 0
has comment: http://stackoverflow.com/comment/42013699
score: 1
has comment: http://stackoverflow.com/comment/41886264
has comment: http://stackoverflow.com/comment/42307699
has comment: http://stackoverflow.com/comment/42307142
answers question: http://stackoverflow.com/q/26625775
has comment: http://stackoverflow.com/comment/42175105
accepted answer of: http://stackoverflow.com/q/26625775

http://stackoverflow.com/q/26625916
favorite count: 0
answer count: 3
has body: $ (function() { var heroes = [ "Abaddon", "Alchemist", "Ancient Apparition", "Anti-Mage", "Axe", "Bane", ]; document.getElementById('searchBar').onkeyup = searchDropDown; function searchDropDown(){ var search = heroes[i]; for (var i = 0; i &lt; search.length; i++) { if (search.indexOf(document.getElementById("searchBar"))&gt; - 1) { alert("Sucess") } } } }); So this is my javascript code and I can't get it to work. Trying to understand how to make a search bar with a dropdown list, same as the one as facebook has. Anyone that can help me or kindly put me in the right path? :)
downvote count: 1
has answer: http://stackoverflow.com/a/26626567
has answer: http://stackoverflow.com/a/26626041
has title: Search bar with dropdown results
type: UnansweredQuestion
type: Question
score: 1
upvote count: 2
has answer: http://stackoverflow.com/a/51000525
tagged with: javascript

parameters
tags question: http://stackoverflow.com/q/26606994
tags question: http://stackoverflow.com/q/26578762
type: Tag
tags question: http://stackoverflow.com/q/26571874
tags question: http://stackoverflow.com/q/26605232
tag name: parameters
tags question: http://stackoverflow.com/q/26630144

http://stackoverflow.com/comment/41960448
score: 0
type: AnswerComment
has text: **A)** *"I need to find the maxValue of "version" for each parentId"* — my code does that in `latestTextBatchGroups`, have a look. **B)** *"However I need to listen to a change in the parentId"* — No problem. Make `parentId` observable (it isn't in my example) and use `parentId()` in every place where I used `parentId`. Knockout's dependency tracking should do the rest, no further changes necessary. When you change the `parentId` of any text batch, all the other dependencies throughout your viewmodel are re-calculated automatically.
type: Comment
comment on: http://stackoverflow.com/a/26664119

http://stackoverflow.com/comment/41980107
type: QuestionComment
has text: Where before the call ajax define one booleab variable whith true and during the call this value of the variable can change, in the end of the execution return the variable value. But during the executin I need block the user screen
type: Comment
comment on: http://stackoverflow.com/q/26672259
score: 0

http://stackoverflow.com/q/26651310
accepted answer: http://stackoverflow.com/a/26651745
type: Question
tagged with: javascript
tagged with: ionic-framework
score: 0
answer count: 1
has title: Adding a service to a controller in angular
has comment: http://stackoverflow.com/comment/41906487
has answer: http://stackoverflow.com/a/26651745
tagged with: angularjs
has body: i've tried to build a service that returns a formatted date, this works when i put it in a controller but i need it in a lot of places so i thought i'd build a service. Now when I try to inject the service in my controller it gives me an unknown provider issue.. Unknown provider: dateProvider &lt;- date &lt;- displaydate Current Code: services.js angular.module('starter.services', []) .factory('displaydate',['date','$filter', function(date, $filter) { var actiondate = new Date(date); var today = new Date(); if(today.getDate() == actiondate.getDate()){ var hourssince = today.getHours() - actiondate.getHours() var minutessince = today.getMinutes() - actiondate.getMinutes() var secondssince = today.getSeconds() - actiondate.getSeconds() if(hourssince &gt; 0){ date = hourssince+'u'; }else if(minutessince &gt; 0){ date = minutessince+'m'; }else{ date = secondssince+'s'; } }else{ var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var diffDays = Math.round(Math.abs((today.getTime() - actiondate.getTime())/(oneDay))); if(diffDays &gt; 28){ var identifier = actiondate.getMonth(); date = $filter('date')(actiondate,"d "+ maandarray[identifier] + " yy " + " HH:" + "mm"); }else{ date = diffDays+'d'; } } return date; }]); Controller.js angular.module('starter.controllers', ['google-maps'.ns(),'starter.services']) .controller('VolgendCtrl', function($scope, displaydate) { var date = displaydate(value[4]); }) App.js var starter = angular.module('starter', ['ionic','starter.services', 'starter.controllers' ,'ngCordova']) starter.config(function($stateProvider, $urlRouterProvider,$httpProvider, $ionicConfigProvider) { $ionicConfigProvider.prefetchTemplates(true); $urlRouterProvider.otherwise('/tab/volgend'); $stateProvider // setup an abstract state for the tabs directive .state('tab', { url: "/tab", abstract: true, templateUrl: "templates/tabs.html" }) .state('tab.volgend', { url: '/volgend', views: { 'volgend': { templateUrl: 'templates/volgend.html', controller: 'Vo…
tagged with: service
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41906734

http://stackoverflow.com/q/26577073
has answer: http://stackoverflow.com/a/26577159
has comment: http://stackoverflow.com/comment/41771813
has answer: http://stackoverflow.com/a/26577165
has answer: http://stackoverflow.com/a/26577256
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26577208
favorite count: 0
answer count: 5
has comment: http://stackoverflow.com/comment/41771818
has answer: http://stackoverflow.com/a/26577540
score: -3
has body: How can I extract text from the href attribute of a tag when I have а inside h4? I have something like this: Search Search2 And I want to have something like this: http://google.com http://yahoo.com What is the easiest way of achieving this?
accepted answer: http://stackoverflow.com/a/26577165
type: AnsweredQuestion
downvote count: 3
has title: Extract text from href attribute of element
type: Question
upvote count: 0
possible better answer: http://stackoverflow.com/a/26577159
tagged with: javascript
has comment: http://stackoverflow.com/comment/41771814
tagged with: jquery

http://stackoverflow.com/comment/41782725
comment on: http://stackoverflow.com/a/26583128
type: Comment
has text: I'm not sure what you mean by zoom in and out. Did [this](http://codepen.io/stefanjudis/pen/nrzHI) example help you, it is a vertical scroll
score: 0
type: AnswerComment

http://stackoverflow.com/q/26598358
tagged with: css
has title: Showing an image on mouse over of text using jquery and css
has comment: http://stackoverflow.com/comment/41811432
answer count: 0
has comment: http://stackoverflow.com/comment/41811003
type: Question
has comment: http://stackoverflow.com/comment/41811190
has body: I have a script that will show an image when you mouse over certain words. In a not visible part of the script, I query my database for all of those names and give them a span around the word. Like so: Word from my database. However, the issue I run into is that the text takes on all of these css properties as well, so the words shift to the right/left. I would like the text to not move, but still show the image when you mouse over those words. If there was a jquery class to allow me to edit individual css classes, I think it would be an easy fix -- but I am all out of ideas. I have also tried using the hover function in jquery, but I ran into similar issues. My jquery code that simply looks for the span containing the names from my database, then applies those css styles on mouseover to the span and removes the styles on mouseout. $( "span:contains('" + names + "')" ).mouseover( function() { $(this).css("display", "inline"); $(this).css("background-image", "url('" + link2 + "')"); $(this).css("position", "absolute"); $(this).css("width", "307"); $(this).css("height", "465"); $(this).css("z-index", "100"); }) $( "span:contains('" + names + "')" ).mouseout( function() { $(this).css("display", ""); $(this).css("background-image", ""); $(this).css("position", ""); $(this).css("width", ""); $(this).css("height", ""); $(this).css("z-index", ""); })
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41811171
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41811074
has comment: http://stackoverflow.com/comment/41811306

http://stackoverflow.com/comment/41860909
comment on: http://stackoverflow.com/a/26624841
has text: use like that '{"header":{"status":200,"status_text":"OK"}',"data":{"id_user":38}}';
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/92855477
type: AnswerComment
has text: It does not support a callback?
type: Comment
comment on: http://stackoverflow.com/a/26539682
score: 1

http://stackoverflow.com/comment/41768564
has text: That is neat, but I would like to do it in JavaScript.
comment on: http://stackoverflow.com/a/26575424
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26598312
accepted answer of: http://stackoverflow.com/q/26595985
upvote count: 1
has body: There are two cases here: I assume you are referring to this question: Uint8Array to string in Javascript Note that the fromCharCode answer there explicitly says that it does not decode UTF8 properly. Your best bet would be to decode the ArrayBuffer using a FileReader. You are also incorrectly processing this content in the data handler, not you should be aggregating it first. client.on('stream', function(stream, meta){ var parts = []; stream.on('data', function(data){ parts.push(data); }); stream.on('end', function(){ var blob = new Blob(parts); var reader = new FileReader(); reader.onload = function(){ $( ".inner" ).append(reader.result + "&lt;br /&gt;"); }; reader.readAsText(blob); }); }); Now that said, my actual suggestion is that you not use Binary.js for this case. The whole point of it is to transfer binary data. If you are planning to transfer mostly text, you should look into using more text-oriented libraries like Socket.IO.
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26595985
type: Answer

http://stackoverflow.com/comment/41770160
type: AnswerComment
comment on: http://stackoverflow.com/a/26576211
type: Comment
has text: yes I'v posted that in the example usage. But regardless, I think a getter is a better solution.
score: 1

http://stackoverflow.com/a/26599994
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26599530
upvote count: 1
has body: What you need is some assertions (only lookahead is supported in Javascript) like this: var alNumeric = /^(?=.*?\d)(?=.*?[a-zA-Z])[\da-zA-Z]+$/ The assertion (?=.*?\d) first checks if there is any digit in the string, if it's satisfied, go on to the next assertion (?=.*?[a-zA-Z]) which checks for existence of any alphabetic char. If yes, go on to the next expression [\da-zA-Z]+ that will match only alphanumeric chars.
type: Answer

http://stackoverflow.com/q/26589957
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/26646328
tagged with: twitter-bootstrap
score: 0
answer count: 1
has body: I am new to bootstrap and working in D3.js, crossfilter.js to generate the table contents. I like to get the dataTable as in the following URL with some pagination and searching with in the datatable using bootstrap. In that example the table is statically defined with id and class. I am able to run the html page with the desired output as in the example page source code. But in my case I am generating a table from function and not able to get the pagination and searchBox on top of the table. I added all the supported files such as js and css files. Here is my code and I just reduced the code to avoid more spaces in this portal. May I know where I am doing mistake. DataTables example - Bootstrap
tagged with: javascript
has comment: http://stackoverflow.com/comment/41864316
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26646328
tagged with: jquery
has title: Bootstrap table pagination and searching is not working
type: Question

http://stackoverflow.com/q/26633457
has title: Chrome Extension -> ExecuteScript: function call doesn' work
tagged with: google-chrome
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26633683
score: 0
tagged with: google-chrome-extension
tagged with: chromium
has answer: http://stackoverflow.com/a/26633683
has body: He is my manifest.json: { "name": "Page Redder", "description": "Make the current page red", "version": "2.0", "permissions": [ "activeTab","*://*/*" ], "background": { "scripts": ["background.js"], "persistent": false }, "browser_action": { "default_icon" : "icon.png", "default_title": "Make this page red" }, "manifest_version": 2 } Here is background.js that works (the page becomes red): chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.executeScript(null, {code:'document.body.style.backgroundColor="red";'} ); }); If I change background.js in the following way, it fails to work: function changeColor() { document.body.style.backgroundColor="red"; } chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.executeScript(null, {code:';'}, function() { changeColor(); }); }); Chrome build: 38.0.2125.111 The question: what am I doing wrong here? Why calling a function in executeScript doesn't work? Thanks, Racoon

http://stackoverflow.com/q/26638432
type: AnsweredQuestion
tagged with: leaflet
has answer: http://stackoverflow.com/a/46275010
has answer: http://stackoverflow.com/a/26655709
has body: I want a popup that doesn't show itself when I click on the Leaflet marker. I cannot use clickable : false because it will make the markers "act as a part of the underlying map" and this is unacceptable for me. I tried the following code: marker.on('click', function(event) { event.originalEvent.preventDefault(); }); without any results. What is the right way to prevent a popup from showing without using the clickable : false property of the marker object? All I need is to open all the popups on the map by clicking on one custom button, but I don't want the popups to show themselves after I click on a particular marker.
has answer: http://stackoverflow.com/a/26639637
type: Question
upvote count: 12
has answer: http://stackoverflow.com/a/77087211
accepted answer: http://stackoverflow.com/a/26639637
tagged with: javascript
score: 12
has title: How can I prevent a popup to show when clicking on a marker in Leaflet?
has answer: http://stackoverflow.com/a/74353486
downvote count: 0
answer count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/33379980
has answer: http://stackoverflow.com/a/26638596
possible better answer: http://stackoverflow.com/a/26655709

http://stackoverflow.com/q/26547890
tagged with: asp.net
upvote count: 2
has title: System.Collections.Generic.List from CS to Js variable
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26547962
has body: on MyPage.aspx.cs I have List of object protected List&lt;MyObj&gt; myObjList =null; protected void Page_Load(object sender, EventArgs e) { myObjList = GetObjByUserId("23423"); } on aspx page I want to assign this list of objects to JS variable &lt;script type="text/javascript"&gt; $(document).ready(function () { var BookingsList = &lt;%=myObjList %&gt;; &lt;/script&gt; but is assign type like string=> System.Collections.Generic.List`1[myObj] how I can to assign my collection of object from CS to JS variable?
type: Question
tagged with: c#
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26549074
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26549074
favorite count: 0
possible better answer: http://stackoverflow.com/a/26547962

http://stackoverflow.com/comment/41853872
has text: How about `var selected = nums.map(function(v) { return people[v]; });`
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26621660

http://stackoverflow.com/comment/41734578
type: Comment
score: 0
type: QuestionComment
has text: @KevinB can you please advise with the fail handler, calling defer.reject calls the fail method as well as done method, it has to be either fail or done, please advise
comment on: http://stackoverflow.com/q/26553098

http://stackoverflow.com/comment/42426925
has text: Ronnie, you are a lifesaver! This was not at all clear in any of the documentation I went through. Thank you!
comment on: http://stackoverflow.com/a/26937691
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41700885
has text: Thank you but I don't understand how to bind that function to the specific td I click. Since my table is dynamically created, I need to associate a single function that uses the td ID as parameter.
type: Comment
comment on: http://stackoverflow.com/a/26535244
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41838126
comment on: http://stackoverflow.com/q/26613088
type: Comment
type: QuestionComment
has text: Tried it, no difference.
score: 0

flux
tag name: flux
tags question: http://stackoverflow.com/q/26563933
tags question: http://stackoverflow.com/q/26668301
type: Tag

http://stackoverflow.com/comment/41658928
has text: @jlafay I know about data size limit. Yeah, I've tried to solve this but as you can see I couldn't
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26514396
score: 0

http://stackoverflow.com/q/26581987
type: AnsweredQuestion
has title: jQuery syntax juaxtoposing two elements
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26582003
tagged with: javascript
tagged with: jquery
has body: I have a line of jQuery code which I don't understand. var layerid = $('ul.layerstack li.selected').data('layerid'); I understand that $(ul.layerstack) is to select ul elements with layerstack class, and similarly for li.selected. But I don't understand the syntax for juxtaposing the two with a space in between. Can someone please help explain this syntax and give a reference for this? (The DOM structure is listed below for reference). Thanks,
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26582156
accepted answer: http://stackoverflow.com/a/26582003
has comment: http://stackoverflow.com/comment/41780283
possible better answer: http://stackoverflow.com/a/26582156

http://stackoverflow.com/q/26638773
score: 1
has comment: http://stackoverflow.com/comment/41884905
tagged with: javascript
has body: I don't know what is wrong with my code. I am very new to javascript. Sometimes createjs will work and other times it doesn't. It doesn't make sense because I am copying exact code from other people's tutorials.
has comment: http://stackoverflow.com/comment/41884718
tagged with: easeljs
has comment: http://stackoverflow.com/comment/41884710
answer count: 2
has title: CreateJS Will Not Load
favorite count: 0
has answer: http://stackoverflow.com/a/33530067
tagged with: createjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26652537
upvote count: 2
downvote count: 1
type: Question

http://stackoverflow.com/comment/41856549
has text: Thanks but the hovered area has same width as the li. It doesn't cover the whole secondary menu. It also doesn't remove the secondary menu once the mouseleave.
comment on: http://stackoverflow.com/a/26622729
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41664559
type: AnswerComment
comment on: http://stackoverflow.com/a/26517258
score: 0
has text: Static property would be `MyClass.ctx` which is not what you want, because you probably want to have different canvases and ctx's per MyClass instances.
type: Comment

http://stackoverflow.com/q/26586652
accepted answer: http://stackoverflow.com/a/26590588
tagged with: function
has body: i've started recently to use jquery for a Tampermonkey script, and it's not doing the logical sequence in the functions. This is the code: $(document).ready(function(){ if ($(window).attr('location') == 'http:1') { $(window).attr('location', 'http:2'); } }); $(document).ready(function(){ for(var i=2; i&lt;7; i++){ $elem = $('div#ing-' + i).find('span').css('color'); if ($elem == 'rgb(255, 0, 0)'){ $(window).attr('location', 'http:3...&amp;r=' + i); } } if($(window).attr('location')=='http:2'){ $(window).attr('location', 'http:4'); } $('#solicitar').trigger('click'); }); I have two problems, First: The last function if($(window).attr('location')=='http:2'){ $(window).attr('location', 'http:4'); } $('#solicitar').trigger('click'); is the one that's always running, it doesn't run the FOR function, it just jump to that part and do that. Second: If i just run the loop FOR (ignoring the other function), the first instruction to be ejecuted it's when i=6 and i=2 is the last one, that doesn't makes sense at all for me.7 EDIT: if my html(2) = 'http://www.aaa.com' and html(3 and 4) = http://www.aaa.com/index.php?p=bbb The location attribute treats them like the same?
downvote count: 0
answer count: 1
tagged with: jquery
tagged with: sequence
favorite count: 0
has title: Sequence of functions in jquery
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26590588
has comment: http://stackoverflow.com/comment/41789900
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/26567369
tagged with: javascript
has title: Script to convert text inside lines into search links
has comment: http://stackoverflow.com/comment/41753773
type: AnsweredQuestion
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26567394
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
linked to: http://stackoverflow.com/q/37684
has comment: http://stackoverflow.com/comment/41753801
tagged with: anchor
linked to: http://stackoverflow.com/q/75980
score: 0
has body: I have several DIVs with LIs inside, but I want to convert the text inside of LIs that belongs to a specific DIV id, example: HP DesignJet 100 Printer series HP DesignJet 100 Printer - C7796A HP DesignJet 100 Printer - C7796AR HP DesignJet 100 Plus Printer series HP DesignJet 100 Plus Printer - C7796C HP DesignJet 100 Plus Printer - C7796CR So I pretend to convert this: HP DesignJet 100 Printer - C7796A Into this: HP DesignJet 100 Printer - C7796A However in some lines there is a STRONG inside an LI with others LIs. Example: HP DesignJet 100 Printer series HP DesignJet 100 Printer - C7796A HP DesignJet 100 Printer - C7796AR I think this is possible like a script to convert plain urls text into links like this: How to replace plain URLs with links?
answer count: 1
has answer: http://stackoverflow.com/a/26567394

http://stackoverflow.com/comment/41668622
type: AnswerComment
score: 0
type: Comment
has text: +1 I prefer this approach over the accepted answer as it doesn't affect string.length
comment on: http://stackoverflow.com/a/26519260

http://stackoverflow.com/comment/41667976
type: QuestionComment
has text: can you just edit the audio file before inserting it in your page ? javascript has the .currentTime method which will set it to 10s
comment on: http://stackoverflow.com/q/26519163
score: 0
type: Comment

http://stackoverflow.com/comment/41717689
type: AnswerComment
comment on: http://stackoverflow.com/a/26516286
score: 0
has text: Well, then you must run it when your ViewModel (`ContactManager`) is instatiated. Like before `ko.applyBindings(self.templateName);` you could call `self.load()`
type: Comment

http://stackoverflow.com/a/26534751
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26533489
has body: There are definitely more than one way to do this. I answered a similar question here: >> Adding fade to simple slideshow with Javascript &lt;&lt; However, to answer YOUR question directly, consider the following: >> WORKING JS FIDDLE &lt;&lt; // create arbitrary namespace window.slideshow = { slides: null, currentSlide: null, nextSlide: null, interval: 3000, timer: null, init: function() { console.log('init slideshow'); this.slides = $('#slideshow img'); this.planNextSlide(1); }, planNextSlide: function(timeoutInterval) { console.log('next slide (' + timeoutInterval + ')'); this.timer = setTimeout(this.transitionSlide, timeoutInterval); }, transitionSlide: function() { console.log('transition slide (' + (slideshow.currentSlide != null) + ')'); if (slideshow.currentSlide != null) { // fade out old slide first slideshow.slides.eq(slideshow.currentSlide).fadeOut('fast', function() { slideshow.nextSlide = slideshow.currentSlide + 1; if (slideshow.nextSlide == slideshow.slides.size()) { slideshow.nextSlide = 0; } slideshow.currentSlide = null; slideshow.transitionSlide(); }); } else { // fade in new slide slideshow.nextSlide = slideshow.nextSlide == null ? 0 : slideshow.nextSlide; slideshow.slides.eq(slideshow.nextSlide).fadeIn('fast', function() { slideshow.currentSlide = slideshow.nextSlide; slideshow.planNextSlide(slideshow.interval); }); } } }; // initial state initializer slideshow.init();

http://stackoverflow.com/a/26574976
has comment: http://stackoverflow.com/comment/41768355
type: Answer
accepted answer of: http://stackoverflow.com/q/26574938
has comment: http://stackoverflow.com/comment/41767896
has comment: http://stackoverflow.com/comment/41767615
has comment: http://stackoverflow.com/comment/41767843
answers question: http://stackoverflow.com/q/26574938
downvote count: 0
has comment: http://stackoverflow.com/comment/41768152
has comment: http://stackoverflow.com/comment/41767834
has body: You haven't declared the pranav and k variables you used. Also when you are assigning a value to an input field you should use the .value property instead of .innerText. Also you might consider splitting your code in 2 functions: Please Enter Your Full Name = Please Enter Your Current Organization
score: 1
has comment: http://stackoverflow.com/comment/41767641
has comment: http://stackoverflow.com/comment/41768404
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26630718
tagged with: node.js
has body: I am using Node.js to minify javascript files and I would like to only minify the files that are obviously not minified already. I was wondering whether there is a way to find out if the file is minified through its content. I am using Node.js and filejs but I am up to any method as long as it is JavaScript.
score: 2
has answer: http://stackoverflow.com/a/26635921
has comment: http://stackoverflow.com/comment/41881534
has comment: http://stackoverflow.com/comment/41869660
tagged with: file
type: Question
answer count: 2
has title: How to detect if a js file is minified at run time (Node.js)
tagged with: javascript
downvote count: 0
tagged with: minify
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26631487

http://stackoverflow.com/q/26637688
favorite count: 0
has answer: http://stackoverflow.com/a/26637719
accepted answer: http://stackoverflow.com/a/26637719
has title: Table Row Traversing with JavaScript jQuery
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a table formatted like that following: blah sblah sblah sblah blah sblah sblah I also have a function that toggles the display of the .subnode classes based on the TD of the .node above it. The function looks like this: function toggleDesc(item) { var descRow = item.nextElementSibling; $(descRow).toggleClass("descDisplay"); } However, the function above only toggles the display of the first .subnode it encounters. Does anyone know how to .toggleClass for each .subnode after .node until the next .node is hit?

http://stackoverflow.com/q/26520289
answer count: 0
tagged with: twitter-bootstrap
score: 0
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41722219
has body: I am using dataTables.js for converting normal html table into grid. $(document).ready(function () { $('#example').dataTable(); $(".dataTables_filter input").css({ "background": "blue" }); }); The jQuery dataTables plugin generates its own pagination and search box inputs around custom table. We can style these auto generated elements like i tried changing style of search input. But my problem is that i am using a bootstrap template. my template suggest that to style a drop down or a text boxes should be wrapped by some other divs to make it responsive and all. Is it possible to use my own html for drop down and search boxes and pagination and DataTable use it for all of its magic?
tagged with: datatables
type: UnansweredQuestion
has title: datatable.js grid with custom html
has comment: http://stackoverflow.com/comment/41719919

http://stackoverflow.com/q/26547112
has answer: http://stackoverflow.com/a/26547609
has body: I'm making my first steps in js and jquery and I'm trying to make simple calculation form, which takes numeric variable form form in html (sum) multiplies it by constat multiplier multiplies result by a number choosen from dropdown list (total) and does that on the fly, so to say updates result whenever any variable changes. code below works, but total result does not update when sum updates. what am I missing here? $('.pow').keyup(function () { var sum = 0; var multip = 4; sum1 = sum; $('.pow').each(function() { sum += Number($(this).val())*parseInt(multip); sum1 = sum; }); $("#sum").html(sum.toFixed(2)); }); $('.per').click(function () { var total = 0; var period = $("#period").val(); $(".per").each(function() { total = parseInt(sum1)*parseInt(period); }); $("#sum1").html(total.toFixed(2)); });
tagged with: forms
has title: Automatic updating of calculation result in jQuery
has comment: http://stackoverflow.com/comment/41717310
type: Question
has comment: http://stackoverflow.com/comment/41717477
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41717186
has comment: http://stackoverflow.com/comment/41717405
has comment: http://stackoverflow.com/comment/41717820
has comment: http://stackoverflow.com/comment/41717753
answer count: 1
has comment: http://stackoverflow.com/comment/41717885
has comment: http://stackoverflow.com/comment/41717687
has comment: http://stackoverflow.com/comment/41717691
type: UnansweredQuestion
score: 0

http://stackoverflow.com/q/26599883
downvote count: 2
accepted answer: http://stackoverflow.com/a/26600846
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41813991
has comment: http://stackoverflow.com/comment/41814008
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/26600846
type: Question
has comment: http://stackoverflow.com/comment/41815319
tagged with: arrays
tagged with: javascript
score: -1
has title: How to use json array length in angular?
has body: my pages uses lots of ng-repeat to generate table rows. If there is no data in an json array, there would be an empty table. I'm trying to skip generating table rather than an generate an empty one. To do that, I need to check if the array length is 0. In js I can get array length using its length property: $scope.data.errors.length === 0 But I can't use it in angular watcher, the following has no output {{data.errors.length}} And data.errors.length === 0gives false. So is there a way to get json array length in angular?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41815056
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41814112

http://stackoverflow.com/q/26552494
score: 0
has comment: http://stackoverflow.com/comment/41727545
answer count: 0
has body: I am studying asynchronism in different programming languages / implementations. (I might be wrong on the assumption I am about to draw) For example Java is synchronous. But a caller object can use Thread to asynchronously run a callee object (in parallel). At some point, the caller and callee might synchronize. This synchronization assure that : the execution order is correct the memory isn't accessed concurrently On the other hand, node.js runs Javascript inside an event-loop, and provides asynchronous I/O functions. If the caller calls an asynchronous function, it provides a callback to execute after, which assures 1. And because Javascript execution is single-threaded, there is non concurrency, and no need for memory synchronization, which assures 2. I am wondering, is there an alternative implementation than an event-loop to provide asynchronism with callback ? I would like to know of even the most atypical implementations.
tagged with: javascript
type: UnansweredQuestion
has title: Asynchronous callback : always an event-loop?
tagged with: asynchronous
tagged with: callback
type: Question
tagged with: multithreading
has comment: http://stackoverflow.com/comment/41727173
has comment: http://stackoverflow.com/comment/41732598
tagged with: node.js

http://stackoverflow.com/q/26535963
has body: I have a problem. I am trying to get the source of an audio element as soon as it changes and without making it connect to the server. Let me elaborate: The server allows only one request (randomly generated url for content), which I am trying to get and obviously I don't want the audio element to reload using a new source. I am currently using a mutation observer, but with no luck of beating the onclick's speed (yes, there's complicated js involved in order to not allow anybody to get the source directly). Here's the code: document.getElementsByTagName('audio')[0].setAttribute("autoplay", false); //not sure if ^^ makes a difference audioObserver = new MutationObserver(function (mutations) { window.open(mutations[0].target.src); //I only listen for one mutation and want to open the url in a new window audioObserver.disconnect(); //don't listen in order to not cause infinite loop document.getElementsByTagName('audio')[0].parentNode.removeChild(document.getElementsByTagName('audio')[0]); //remove the element in order to avoid reloading }); observerConfig = { attributes: true, childList: false, characterData: false }; audioObserver.observe(document.getElementsByTagName('audio')[0], observerConfig); I would be happy with any implementation i.e. not necessarily MutationObserver. Is there anyway to literally hijack the attribute change?
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/26556614
has comment: http://stackoverflow.com/comment/41699206
type: AnsweredQuestion
upvote count: 2
has title: Hijacking DOM manipulations
has comment: http://stackoverflow.com/comment/41734878
type: Question
tagged with: audio
has comment: http://stackoverflow.com/comment/41699393
has answer: http://stackoverflow.com/a/26556614
tagged with: dom
has comment: http://stackoverflow.com/comment/41700038
score: 2
downvote count: 0
answer count: 1

http://stackoverflow.com/a/38940984
type: Answer
has body: This was working for me: // Routes config app.config(function($routeProvider) { $routeProvider .when("/", { templateUrl : "main.htm" controller : "MyController" reloadOnSearch : true }) }); You could also use this in router-ui
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26615713
accepted answer of: http://stackoverflow.com/q/26615713

http://stackoverflow.com/q/26554237
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41730386
downvote count: 4
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: How can I change the background color of table cell (td) using two buttons for different colors?
favorite count: 0
accepted answer: http://stackoverflow.com/a/26554538
score: -4
tagged with: css
has body: My HTML file: Wolf and Rabbit Game My CSS file: table{ text-align: center; margin: auto; } td{ border: 1px black solid; width: 25px; height: 25px; } #button1,#button2{ text-align: center; margin-top: 20px; font-size: 1em; font-family: Myriad Pro; font-weight: semibold; color: white; border-radius: 15px; padding: 1%; } #button1{ background: red; } #button2{ background: green; } body{ text-align: center; } img{ width: 25px; height: auto; } My JavaScript file: function setColor(){ if ("#button1").click { document.getElementById("#tableCell").style.backgroundColor="red"; }; if ("#button2").click { document.getElementById("#tableCell").style.backgroundColor="green"; }; };
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26554538
type: Question

http://stackoverflow.com/q/26573076
favorite count: 0
has answer: http://stackoverflow.com/a/26573288
type: Question
has title: How to inject jquery to any webpage
has answer: http://stackoverflow.com/a/26573281
score: 35
answer count: 3
downvote count: 1
has body: Is there any way to inject jQuery into any page as we do with javascript(from url). with javascript we do this javascript:alert("b"); I tried this but I don't know why it dosen't work javascript:var x = document.getElementsByTagName("head")[0]; var y = document.createElement("script"); y.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"; x.appendChild(y); var a = document.getElementsByTagName("body")[0]; var b = document.createElement("script"); b.innerHTML = "$('p').css('border','3px solid red')" a.appendChild(b);
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/950087
has answer: http://stackoverflow.com/a/26573284
tagged with: code-injection
upvote count: 36
duplicate of: http://stackoverflow.com/q/950087
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26680937
has body: You could also use the "using" keyword. class SocketExtender { public static inline function set(socket:Socket, key:String, value:Dynamic):Void { Reflect.setField(socket, key, value); } public static inline function get(socket:Socket, key:String):Dynamic { Reflect.field(socket, key); } } Then add "using com.my.package.SocketExtender;" by your imports, and your code should start working again.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26659716
type: Answer
has comment: http://stackoverflow.com/comment/42019851
upvote count: 1
has comment: http://stackoverflow.com/comment/41999263
has comment: http://stackoverflow.com/comment/41974519

http://stackoverflow.com/a/26572489
type: AcceptedAnswer
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/26572453
has body: lets say that you have a div to which you want to attach on load function &lt;div ng-controller="MainCtrl"&gt; &lt;div ng-view&gt;&lt;/div&gt; &lt;/div&gt; From MainCtrl you can listen the event $scope.$on('$viewContentLoaded', function(){ }); You can listen in your controllers defined in routes like myController and myRouteController for $viewContentLoaded event, $viewContentLoaded is emitted every time the ngView content is reloaded and should provide similar functionality as the document.ready when routing in angularjs
answers question: http://stackoverflow.com/q/26572453
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41762940

http://stackoverflow.com/comment/41801605
type: QuestionComment
has text: You would still need to have some criterion for distinguishing the `a` elements that should have the `target` attribute added from those that shouldn’t.
score: 1
comment on: http://stackoverflow.com/q/26592863
type: Comment

http://stackoverflow.com/comment/41908983
has text: @IsmaelMiguel: Yes, I decided not to touch that bit.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26652735

http://stackoverflow.com/comment/51428820
type: Comment
comment on: http://stackoverflow.com/a/29274923
has text: Great to hear that you found a solution
type: AnswerComment
score: 0

http://stackoverflow.com/a/26582802
answers question: http://stackoverflow.com/q/26582354
has comment: http://stackoverflow.com/comment/41781998
has comment: http://stackoverflow.com/comment/41787225
has comment: http://stackoverflow.com/comment/41815719
has comment: http://stackoverflow.com/comment/41815702
score: 0
has comment: http://stackoverflow.com/comment/41790006
type: Answer
has body: First, some browsers don't respond well to having a select node populated with .html(...). It's far safer to append option nodes. Second, to respond to user selections of the populated select element, you need to attach an 'onchange' handler. The attachment can be made before or after the options have been added. function popuList() { var $select = $("#activeList").on('change', function() { var val = this.value; //do real kewl stuff with the value here }); // Populates the SELECT element with options from the JSON file. var url = "/calls/sessions.php"; $.getJSON(url, '', function(jdata, oSucc, jqXHR){ $.each(jdata,function(i, session) { $.each(session, function(n, data) { $('&lt;option value="' + data.name + '"&gt;' + data.name + '&lt;/option&gt;').appendTo($select); }); }); }); }

http://stackoverflow.com/q/26636022
has comment: http://stackoverflow.com/comment/41880752
has body: I've written this function that takes an unformatted postcode and formats it with the correct spacing and formatting: function formatPostcode(dirtyPostcode) { var up = dirtyPostcode.toUpperCase(); var remove_spacing = up.split(" "); var add_space = remove_spacing.join(""); var postcode = [add_space.slice(0, -3), " ", add_space.slice(-3)].join(''); return postcode; } I've also got a form that lets users enter a postcode and pushes it to a Firebase object that I've got set up. I'd like to run the submitted postcode through my formatPostcode() function before pushing it to Firebase. My HTML looks like this: Submit And my JS like this: var rootRef = new Firebase('URL'); var placesRef = rootRef.child('places'); function createHospital(hospital) { placesRef.push(newHospital); } $scope.createHospital = createHospital; How can I intergrate my formatPostcode() function into my createHospital() function so the postcode is formatted before it's pushed. I'm racking my brain here. Any help is appreciated. Thanks in advance!
has comment: http://stackoverflow.com/comment/41882707
tagged with: angularjs
answer count: 0
has comment: http://stackoverflow.com/comment/41881881
type: UnansweredQuestion
tagged with: firebase
has title: Run Postcode Through Function
has comment: http://stackoverflow.com/comment/41879554
type: Question
has comment: http://stackoverflow.com/comment/41881369
tagged with: javascript
has comment: http://stackoverflow.com/comment/41880679
score: 0

http://stackoverflow.com/a/26536758
type: Answer
accepted answer of: http://stackoverflow.com/q/26536698
answers question: http://stackoverflow.com/q/26536698
score: 0
type: AcceptedAnswer
has body: You can use a $watch on $scope.tpRequests to do your data manipulation, however I would recommend just doing it in the success promise if there are no other ways to trigger the watch and simply check for null/undefined before operating. A great primer on use cases for $watch and $watchCollection: http://www.bennadel.com/blog/2566-scope-watch-vs-watchcollection-in-angularjs.htm

http://stackoverflow.com/comment/41699344
has text: There's a lot of bad info in w3schools. They seem to just be really good at SEO. Please use a more reputable source such as MDN.
comment on: http://stackoverflow.com/a/26536718
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41694861
comment on: http://stackoverflow.com/q/26534139
type: Comment
type: QuestionComment
has text: Where does `.filters.product` come from? Is that generated by the parent's template perhaps?
score: 0

http://stackoverflow.com/comment/41815043
score: 0
type: Comment
has text: i got {CN302434403A,EP2425305A3,EP2425305A4,EP2425305B3,JP05508520B2,RU2496033C2,US20320048232A3,US8853048B2,WO2030326479A3} array of length 9 got in my php preg match all
type: QuestionComment
comment on: http://stackoverflow.com/q/26600303

http://stackoverflow.com/q/26626853
has body: I have defined a button in HTML which calls a function to create an object in my JS. In addition, i would like this button to "spawn" the creation of a new checkbox (with name and value depending on the former created object) in HTML, lets say in div id XY. Though i suppose it's not important, here is my current stuff. html &lt;input id="button" value="pick Brakiri" onclick="initiate('Brakiri')"&gt; js function initiate(faction){ calc = new Calc(faction) } I would like to avoid jQuery if possible. thank you.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41862983
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26626976
accepted answer: http://stackoverflow.com/a/26626976
has title: How to create a new HTML checkbox via JavaScript?
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26627377
has answer: http://stackoverflow.com/a/26626959
tagged with: checkbox
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41862978
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41862992
possible better answer: http://stackoverflow.com/a/26626959
tagged with: button

http://stackoverflow.com/a/57181126
has body: You can do it in chrome browser download extension from this link https://github.com/zach-adams/downloads-overwrite-already-existing-files "A chrome extension that sets all downloads to overwrite existing files instead of adding ' (1)', ' (2)', etc." then add extension to chrome this will solve your problem.
has comment: http://stackoverflow.com/comment/105516347
has comment: http://stackoverflow.com/comment/115413365
score: 1
type: Answer
upvote count: 3
downvote count: 2
answers question: http://stackoverflow.com/q/26606415

http://stackoverflow.com/q/26551883
has comment: http://stackoverflow.com/comment/41725976
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26551995
has body: I am trying to open a new window, which contains html code from a file, and then print the document The following code works, ie the layout shows within the new window, however the printed document is always blank var FPrint = window.open('layout.php','','left=100,top=10,width=700,height=900'); FPrint.document.close(); FPrint.focus(); FPrint.print(); FPrint.close(); What am i doing wrong ? Is anyone able to provide a suggested fix Thanks
has title: Printing a from a new window in Javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26552003

http://stackoverflow.com/q/26641088
score: 5
has body: Can someone tell me what I'm doing wrong here? The test sees the 'compute' function as undefined, and I'm completely out of ideas why. Here is the error I'm getting: Failures: 1) Hamming no difference between identical strands Message: TypeError: undefined is not a function Stacktrace: TypeError: undefined is not a function at null.&lt;anonymous&gt; (C:\Users\Schann\exercism\javascript\hamming\hamming_test.spec.js:6:12) 2) Hamming complete hamming distance for single nucleotide strand Message: TypeError: undefined is not a function Stacktrace: TypeError: undefined is not a function at null.&lt;anonymous&gt; (C:\Users\Schann\exercism\javascript\hamming\hamming_test.spec.js:10:12) Finished in 0.041 seconds 2 tests, 2 assertions, 2 failures, 0 skipped //------------------- // Hamming.js //------------------- var Hamming = function() { var compute = function(input1, input2) { var diff = 0; for (i = 0; i &lt; input1.length; i++) { if (input1[i] != input2[i]) { diff = diff + 1; }; }; return diff; }; }; module.exports = Hamming; //------------------- // hamming_test.spec.js //------------------- var compute = require('./hamming').compute; describe('Hamming', function () { it('no difference between identical strands', function () { expect(compute('A', 'A')).toEqual(0); }); it('complete hamming distance for single nucleotide strand', function () { expect(compute('A','G')).toEqual(1); }); [rest truncated] });
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/26641136
accepted answer: http://stackoverflow.com/a/26641136
answer count: 1
downvote count: 0
tagged with: jasmine
favorite count: 0
has title: Exercism > Javascript > Hamming exercise: Getting 'undefined is not a function' error
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/26568690
has body: With help from Graham T above and a bit of playing around I come up with the following: var fired = false; var keycode = null; var key = null; $("#loginEmail").on("keypress", function(e) { keycode = e.which; key = String.fromCharCode(keycode); }); $("#loginEmail").on("keydown", function(e) { var s = this.value; var str = this.value; if (e.keyCode == 65) { var timer = setTimeout(function() { if (!fired) console.log('its held'); fired = true; if(fired){ s = $("#loginEmail").val(); str = s.substring(0, s.length - 1); replacewith = 'á'; str = str+replacewith; $("#loginEmail").val(str); } }, 500); $(document).on("keyup", function() { clearTimeout(timer); fired = false; }); } }); It is not cleaned up as yet. I had to use keypress to get the true character (capitalised or not) and then used keydown to detect key being held down.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26566790

colors
tags question: http://stackoverflow.com/q/26552829
tags question: http://stackoverflow.com/q/26615580
tags question: http://stackoverflow.com/q/26582787
tags question: http://stackoverflow.com/q/26603715
tag name: colors
type: Tag

http://stackoverflow.com/comment/41763032
type: QuestionComment
comment on: http://stackoverflow.com/q/26572282
has text: the main reason i'm confused though is because the chart works if i manually input the data (in json format) but when i echo $test it does'nt....
score: 0
type: Comment

http://stackoverflow.com/comment/41673495
has text: You cannot refresh only js content in a page
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26522336

http://stackoverflow.com/q/26614642
has comment: http://stackoverflow.com/comment/41840840
has comment: http://stackoverflow.com/comment/41840716
has comment: http://stackoverflow.com/comment/41840760
has comment: http://stackoverflow.com/comment/41840881
has comment: http://stackoverflow.com/comment/41840717
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/41840750
tagged with: javascript
score: -1
has body: So I have something like this, but it just outputs the link with 1 at the end of it. var pagelink = "http://www.roblox.com/catalog/browse.aspx?CatalogContext=1&amp;Subcategory=2&amp;Keyword=&amp;CurrencyType=0&amp;pxMin=0&amp;pxMax=0&amp;SortType=4&amp;SortAggregation=3&amp;SortCurrency=0&amp;PageNumber="; var num = 1; var maxnum = 32; for(var i = num; i &lt;= maxnum; i++){ pagelink + num } So the output just returns: http://www.roblox.com/catalog/browse.aspx?CatalogContext=1&amp;Subcategory=2&amp;Keyword=&amp;CurrencyType=0&amp;pxMin=0&amp;pxMax=0&amp;SortType=4&amp;SortAggregation=3&amp;SortCurrency=0&amp;PageNumber=1
has comment: http://stackoverflow.com/comment/41840869
type: Question
has title: Make a link count from 1 to 32 and reset back to 1?
has answer: http://stackoverflow.com/a/26614705
answer count: 2
has answer: http://stackoverflow.com/a/26614725
tagged with: for-loop
upvote count: 0
has comment: http://stackoverflow.com/comment/41840821
favorite count: 0

http://stackoverflow.com/a/26639268
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41889848
downvote count: 0
answers question: http://stackoverflow.com/q/26639117
accepted answer of: http://stackoverflow.com/q/26639117
has body: You have to encode the array as a json object echo json_encode($array); and then the ajax call will look like this: $.ajax({ url: 'analyze.php', data: "active=active", dataType: "json", success: function(data) { var userAgent = data.userAgent; var name = data.name; var version= data.version; .... }
upvote count: 2
has comment: http://stackoverflow.com/comment/41888476
type: AcceptedAnswer

http://stackoverflow.com/comment/109981727
comment on: http://stackoverflow.com/a/42907951
has text: Just sharing an working example with typescript: document.getElementById("...")['contentWindow'].document.querySelectorAll("..."). Ty!
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41876261
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26633731
has text: exactly. Any thoughts?
score: 0

http://stackoverflow.com/q/26638847
has answer: http://stackoverflow.com/a/26639253
tagged with: php
has body: I am having problems viewing text in my contact form 7 text fields using WordPress. The only browser I am having trouble viewing them in is Chrome. If I click into the text field and start typing nothing shows until I click out of the text field. If I click into a text field and start typing then click into the next field and start typing nothing shows until clicking out of the text and somewhere else on the page? I have one other thread where someone had this issue but it has not helped me solve this problem. The link is here text box not working proper in contact form7 wordpress in chrome I have looked into trying to modify the css of this contact form but can't figure out how to edit it. Any help would be greatly appreciated.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41884902
has title: WordPress contact form 7 text box not displaying in Chrome
tagged with: wordpress
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41884995
answer count: 1
accepted answer: http://stackoverflow.com/a/26639253
linked to: http://stackoverflow.com/q/22216911
tagged with: jquery

http://stackoverflow.com/q/26640527
has comment: http://stackoverflow.com/comment/41888334
upvote count: 2
has answer: http://stackoverflow.com/a/26640809
tagged with: http://stackoverflow.com/tag/html
has title: Responsive design, stacking divs out of order
has body: I'm wondering if there's a pure CSS way to stack 3 (or more) divs out of order when they get small enough to stack one on top of the other. What I mean is, I have 3 divs in this order | | |[1] [2] [3]| | | I'd like to stack them so they are : | | |[3]| |[1]| |[2]| | | Is there any way in CSS to do this type of stacking? or will I have to use javascript for this?
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/41888291
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26641214
has answer: http://stackoverflow.com/a/26640754
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41888193
has comment: http://stackoverflow.com/comment/41887957
tagged with: javascript
has comment: http://stackoverflow.com/comment/41888159
has comment: http://stackoverflow.com/comment/41888129
has comment: http://stackoverflow.com/comment/41888223
has comment: http://stackoverflow.com/comment/41888132
has comment: http://stackoverflow.com/comment/41888029
accepted answer: http://stackoverflow.com/a/26640809
possible better answer: http://stackoverflow.com/a/26641214
tagged with: jquery
has answer: http://stackoverflow.com/a/26640791
favorite count: 0

http://stackoverflow.com/comment/41825037
comment on: http://stackoverflow.com/a/26589667
type: AnswerComment
has text: I have the link, but there is no javascript in there.
type: Comment
score: 0

express
tags question: http://stackoverflow.com/q/26626186
tags question: http://stackoverflow.com/q/26547431
tags question: http://stackoverflow.com/q/26572943
tags question: http://stackoverflow.com/q/26563310
tags question: http://stackoverflow.com/q/26656827
tags question: http://stackoverflow.com/q/26581086
tags question: http://stackoverflow.com/q/26536252
tags question: http://stackoverflow.com/q/26536890
tags question: http://stackoverflow.com/q/26632854
tags question: http://stackoverflow.com/q/26665256
tags question: http://stackoverflow.com/q/26596793
tags question: http://stackoverflow.com/q/26636960
tags question: http://stackoverflow.com/q/26535325
tags question: http://stackoverflow.com/q/26533995
tags question: http://stackoverflow.com/q/26665395
tags question: http://stackoverflow.com/q/26567861
tags question: http://stackoverflow.com/q/26531143
tags question: http://stackoverflow.com/q/26671245
tags question: http://stackoverflow.com/q/26628445
tags question: http://stackoverflow.com/q/26524020
tags question: http://stackoverflow.com/q/26566703
tags question: http://stackoverflow.com/q/26526785
tags question: http://stackoverflow.com/q/26583355
tags question: http://stackoverflow.com/q/26663297
tags question: http://stackoverflow.com/q/26570625
tags question: http://stackoverflow.com/q/26623774
tags question: http://stackoverflow.com/q/26527514
tags question: http://stackoverflow.com/q/26592128
tags question: http://stackoverflow.com/q/26632918
tags question: http://stackoverflow.com/q/26521310
tags question: http://stackoverflow.com/q/26633397
tag name: express
type: Tag
tags question: http://stackoverflow.com/q/26596310
tags question: http://stackoverflow.com/q/26548689
tags question: http://stackoverflow.com/q/26517746

http://stackoverflow.com/comment/41791185
comment on: http://stackoverflow.com/a/26588114
score: 0
type: Comment
has text: Yes, it does. Because now he knows that he'll get an answer, regardless of how crappy or under researched his question was, even if it gets closed.
type: AnswerComment

http://stackoverflow.com/comment/41753597
type: Comment
score: 1
has text: @thar Yes, I know, I'm telling you to ignore console.log and actually inspect the AJAX request and response. If you did that you'd probably see the problem right away.
comment on: http://stackoverflow.com/q/26567159
type: QuestionComment

http://stackoverflow.com/comment/41823794
has text: Because, in this case, inside the listeners `this` is not the `widget` but the `widget.element`. Declaring it on top is more readable
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26605468

http://stackoverflow.com/q/26621286
has answer: http://stackoverflow.com/a/26622876
has body: I'm trying to load an Accuweather widget which can change in location using a dropdown list. It works when there's no loaded location at first. But when i try to change the location, it doesn't work anymore. My guess is I should recall the Accuweather script or function (but I don't know how). Here's the link of the image of what I've done. And here's a part of my JS code: $('#awcc1414464209059').attr('data-locationkey',selected); //change the div's data-location-key to the selected location's key $('#awcc1414464209059').attr('class',"aw-widget-current"); $('#awcc1414464209059').attr('data-unit', "c"); $('#awcc1414464209059').attr('data-language',"en-us"); $('#awcc1414464209059').attr('data-useip', "false"); $('#awcc1414464209059').attr('data-uid',"awcc1414464209059"); getweather(); function getweather(){ var script = document.createElement("script"); script.type = "text/javascript"; script.src = "assets/js/accuweather.js"; document.getElementsByTagName("head")[0].appendChild(script); return false; } PS: It would be better if I can load multiple widgets at once, so that I can display all the locations for users' convenience. (I tried it already but I can't make it work)
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: How to change Accuweather widget location in HTML
tagged with: weather-api
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26548794
has body: Backbone has a simple implementation of what you are asking. Collection.where() &amp;&amp; Collection.findWhere() can take an object and will find the model based on your object. But it doesn't more complex matchings like, greater than, less than, etc. MarionetteCollection.find( { type: 'product', qty: 55, active: true });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26517870

http://stackoverflow.com/comment/41942921
type: QuestionComment
has text: You have JavaScript available *on the server*? As in Node.js or equivalent? Anyway, https://www.google.com/search?q=update+database+with+php
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26671141

http://stackoverflow.com/comment/41767029
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26574260
score: 0
has text: The line you call `setTimout` does not block execution; it completes near instantly. This means that your promise will resolve near instantly if you call `resolve` after the loop completes. `setTimout` will call the function you passed to it once the the timeout completes. You will have to structure your code so that `resolve` is called at the desired time. (which is fairly difficult if you want to keep the loop)

http://stackoverflow.com/comment/41731494
comment on: http://stackoverflow.com/q/26554720
score: 0
type: Comment
type: QuestionComment
has text: You can get an idea here (with your future customization): http://stackoverflow.com/questions/4285042/can-jquery-ajax-load-image

http://stackoverflow.com/comment/41742784
type: Comment
comment on: http://stackoverflow.com/a/26556614
has text: I even tried to delete it and then create another audio tag in the same div, still doesn't work :(
type: AnswerComment
score: 0

http://stackoverflow.com/a/26599156
accepted answer of: http://stackoverflow.com/q/26598972
answers question: http://stackoverflow.com/q/26598972
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41812748
type: Answer
has body: Let's take a look at the source code, shall we? UnderscoreJS: _.map() _.map = _.collect = function (obj, iteratee, context) { if (obj == null) return []; iteratee = _.iteratee(iteratee, context); var keys = obj.length !== +obj.length &amp;&amp; _.keys(obj), // Get the Object keys length = (keys || obj).length, // Get the keys' length results = Array(length), // Array to store results currentKey; // Keep ref to current key for (var index = 0; index &lt; length; index++) { // Loop from 0 -&gt; key.length currentKey = keys ? keys[index] : index; // Objects use keys[index] results[index] = iteratee( obj[currentKey], // Value of object key currentKey, // The current key obj); // Object argument } return results; // Return the arr of results };
has comment: http://stackoverflow.com/comment/41812775

http://stackoverflow.com/q/26521492
tagged with: dotnetnuke
has answer: http://stackoverflow.com/a/26522009
has comment: http://stackoverflow.com/comment/41690277
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41690385
has body: How can the "go back to the root path" function in C#: "~/", be expressed in Javascript if at all. (e.g. "~/myfolder/anotherfolder/file.html"). The problem that I encountered is actually related to DNN, AngularJS and the use of routes. I have a DNN page on which I defined an angular module (call it app). The module's js files are located inside the DNN skin which I named 'mySkin' and defined a variable like so: var skin path = "/Portals/​_default/​Skins/​mySkin/" and the template's path is: var template = "/Portals/​_default/​Skins/​mySkin/templates/template.html" The route as: var routes = { main: { templateUrl: template, controller: 'mainController' }, } With this configuration ng-view is not being populated with anything and i suspect that it is because the DNN page is executed at a route: mydomain.com/services#/ Any ideas?
has title: Relative path with javascript, angularJs, and DNN
type: Question
tagged with: angular-routing
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/11305797
answer count: 1

http://stackoverflow.com/a/26574369
has comment: http://stackoverflow.com/comment/41771024
has comment: http://stackoverflow.com/comment/41768920
has comment: http://stackoverflow.com/comment/41769653
type: Answer
has comment: http://stackoverflow.com/comment/41769137
score: 1
has comment: http://stackoverflow.com/comment/41784787
upvote count: 1
has comment: http://stackoverflow.com/comment/41770593
has comment: http://stackoverflow.com/comment/41773154
answers question: http://stackoverflow.com/q/26574307
has body: var yourVar; // some DOM instance var newFirstElem; //element which should be first in yourVar yourVar.insertBefore(newFirstElem, yourVar.firstChild); THis will add as the first child. To add after just use normal append. Edit: Consider you have this in the beginning: And you want to add to div with class ABCD $(".ABCD").append(' ') You want to add to div with class blabla $(".blabla").append(' ') Consider you have already have this this and now you want to add before the ul inside the div with class abcd $(".abcd").prepend(" "); jQuery makes it simpler. You can just use prepend function. This function allows you to insert whatever you like at the beginning. There are also the option of inserting at specific positions. You should take a look at: insertAt insertBefore after before
has comment: http://stackoverflow.com/comment/41767078
downvote count: 0
has comment: http://stackoverflow.com/comment/41769158

http://stackoverflow.com/a/78612903
score: 0
answers question: http://stackoverflow.com/q/26580509
type: Answer
has body: If you want to calculate the time difference of more than 24 hours (for example, to calculate the time difference between the first and last time of a movie that is longer than 24 hours) and you don't want to use JavaScript time, use the following code: export const hmsToSeconds = (t: string) => { const [hours, minutes, seconds] = t.split(":"); return Number(hours) * 60 * 60 + Number(minutes) * 60 + Number(seconds); }; export const secondsToHMS = (totalSeconds: number) => { const hours = String(Math.floor(totalSeconds / 3600)).padStart(2, "0"); const hoursLeft = totalSeconds %= 3600; const minutes = String(Math.floor(hoursLeft / 60)).padStart(2, "0"); const seconds = String(hoursLeft % 60).padStart(2, "0"); return `${hours}:${minutes}:${seconds}`; }; const startTime = "03:23:14"; const endTime = "99:38:15"; console.log(secondsToHMS(hmsToSeconds(endTime) - hmsToSeconds(startTime)));

http://stackoverflow.com/q/26574354
downvote count: 1
has title: Why does this return undefined?
tagged with: javascript
type: AnsweredQuestion
upvote count: 0
has body: var TTT = { canvas : document.getElementById('canvas'), ctx : canvas.getContext('2d'), cH : 600, cW : 600, // tile dimensions tH : this.cH / 3, tW : this.cW / 3 }; // returns undefined... why? console.log(TTT.tH); This got to be something very simple, but I can't seem to grasp why this is undefined...
has answer: http://stackoverflow.com/a/26574382
possible better answer: http://stackoverflow.com/a/26574415
favorite count: 0
has answer: http://stackoverflow.com/a/26574415
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/26574382
score: -1

http://stackoverflow.com/comment/41767917
has text: Yup, that's the one that really started it all :)
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26575020

http://stackoverflow.com/comment/41688236
type: Comment
has text: First off thanks for taking the time to see if we can fix this problem. Secondly, If I use `<%= @movie.original_title %>` I still get the undifined error. `Uncaught TypeError: Cannot read property 'original_title' of undefined (anonymous function) (anonymous function) JST.movieseats/movie Movieseat.Views.Movie.Movie.render Movieseat.Views.Moviesearch.Moviesearch.doSearch jQuery.event.dispatch elemData.handle`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26530084

http://stackoverflow.com/q/26558574
tagged with: for-loop
has answer: http://stackoverflow.com/a/26558851
accepted answer: http://stackoverflow.com/a/26558863
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26559074
tagged with: jquery
score: 0
answer count: 3
has body: What I am trying to do is to set the same function to different elements with similar id, for example "icon-1","icon-2","icon-3". The function opens up a window that corresponds to those ids -- "window-1", "window-2","window-3". I was trying to use this code block: for (var i=1; i&lt;=3; i++) { $("#icon"+i.toString()).click(function(){ $("#window"+i.toString()).show(); )}; )}; Ideally, when "icon-1" is clicked, it opens "window-1", etc. But it's not working. And I checked console.log(i), every time when a click event occurs, it prints out the final count of i, which is 4. Is there any way to fix or walk around this? Thanks a lot!
has answer: http://stackoverflow.com/a/26558863
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has title: Trouble executing functions in javascript loops
duplicate of: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/26559074
type: Question

http://stackoverflow.com/a/26648688
upvote count: 1
answers question: http://stackoverflow.com/q/26648463
score: 1
downvote count: 0
type: Answer
has body: Use javascript random generator to generate number between 0 - 10 (for example x). After that use jquery to hide the element with id="TrX" Store the number that have been generated. Loop until we get 5 different number. Random Generator Code: Math.floor((Math.random() * 10)

http://stackoverflow.com/q/26561454
type: Question
has body: Is it possible to make the Error object's message property enumerable so that when you stringify it: var errstr = JSON.stringify(new Error('my error')); so that it gives you {"message":"my error"} instead of {} I know you could do that for each individual object var err = new Error('my error'); Object.defineProperty(err, 'message', { enumerable: true, }); var errstr = JSON.stringify(err); //=> {"message":"my error"} But is it possible to do it to the Error object itself so you don't have to do it to each of its instances?
tagged with: javascript
has title: How to make error's message property enumerable
has comment: http://stackoverflow.com/comment/139456394
answer count: 2
score: 5
favorite count: 0
upvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41743280
has answer: http://stackoverflow.com/a/65397437
has answer: http://stackoverflow.com/a/26561682
downvote count: 0

http://stackoverflow.com/q/26550776
has title: Starting with forward slashes link href does not work
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26550806
has body: i use Admin LTE template for my project. In this template js and css files download with follow codes: &lt;link href="//code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet" type="text/css" /&gt; But browser can't download this link. How i can configure the option so its automaticly download the URLs ? Not: i can't refactor template's codes.
answer count: 2
has answer: http://stackoverflow.com/a/26550995
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 0
downvote count: 1

http://stackoverflow.com/comment/41774102
comment on: http://stackoverflow.com/q/26578246
type: Comment
has text: They don't... Facebook is aware that there's a huge number of fake users on the site.
type: QuestionComment
score: 1

http://stackoverflow.com/q/26556525
has comment: http://stackoverflow.com/comment/41734912
has comment: http://stackoverflow.com/comment/41734630
has comment: http://stackoverflow.com/comment/41734815
accepted answer: http://stackoverflow.com/a/26556783
type: Question
type: AnsweredQuestion
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26556783
has body: I have searched for this answer and implemented a few things I found on SO and other places to no avail. I have several javascript functions that work perfectly until I wrap the whole thing in a form. Then some functions work and others do not. My jQuery is still working. I have tried renaming functions and ensuring I have ; at the end of all of my functions. I have used the console, and each function that doeas not work is throwing the "Uncaught TypeError: object is not a function" error. Here is one of the not working HTML: &lt;td class="tableData"&gt;&lt;input type="text" id="teamContact" class="readonly" onfocus="teamContact();" readonly /&gt;&lt;/td&gt; And the JS to go with it: function teamContact() { var singleContact = (document.getElementById('contactTotalSingle').value); var numberLO = (document.getElementById('numberOfLO').value); var teamTotal = (singleContact * numberLO); document.getElementById('teamContact').value = (teamTotal).toFixed(2); } And a bit of the WORKING HTML: &lt;td class="tableData"&gt;&lt;input type="text" id="contactRate" class="contactRate" onchange="calculateSingleContactRate();"/&gt;&lt;/td&gt; &lt;td class="tableData"&gt;&lt;input type="text" id="contactTotalSingle" class="readonly" readonly/&gt;&lt;/td&gt; And It's working JS: function calculateSingleContactRate() { var contactRate = (document.getElementById('contactRate').value); var contactPercent = (contactRate / 100); var leads = (document.getElementById('setSingle').innerHTML); var contactTotalSingle = (contactPercent * leads); document.getElementById('contactTotalSingle').value = (contactTotalSingle).toFixed(2); } It all works when it is not between form tags, and stops working when it is in the form tags. I know it is probably something stupid, but I cannot find it. Let me know if you need more info or code...
has title: Javascript stops working with form tag
score: 2
upvote count: 2

http://stackoverflow.com/comment/41861309
has text: Yes, jQuery *is* javascript, not an independent language, so you can't write jQuery without writing js - and some js expressions simply don't have a jQuery equivalent.
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/26625799
type: Comment

http://stackoverflow.com/comment/41695095
comment on: http://stackoverflow.com/q/26534284
score: 0
type: Comment
type: QuestionComment
has text: Omg, It's so confusing. The shortcode I'm using is: [countdown date="2014-10-23 23:00:00"]

http://stackoverflow.com/comment/41917532
has text: this is it `loadContacts: function() { if(VM.module('contactView').beforeLoadContacts()) { xhr.simpleCall({ query: { callback: '?' }, func: 'contacts' }, function (response) { if (response.err_code === 0) { VM.module('contactView').render({ contacts: response.data }); } }); } }`
comment on: http://stackoverflow.com/q/26649986
score: 0
type: QuestionComment
type: Comment

toggle
tags question: http://stackoverflow.com/q/26653400
tags question: http://stackoverflow.com/q/26619781
tags question: http://stackoverflow.com/q/26517205
tags question: http://stackoverflow.com/q/26545709
tags question: http://stackoverflow.com/q/26518706
type: Tag
tag name: toggle
tags question: http://stackoverflow.com/q/26548184
tags question: http://stackoverflow.com/q/26521334

http://stackoverflow.com/comment/41913606
has text: you can use z-index property
comment on: http://stackoverflow.com/q/26655482
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26549049
has comment: http://stackoverflow.com/comment/41720846
has body: I have a short survey that gives a final value based on the selections you make. The problem is, only the first radio group, "people" is being added at the end... the other four (org + focal + location + carry) are being ignored. Would someone please help me figure out what is wrong with my code? Thanks! var score = 0; var people = 0; var org = 0; var focal = 0; var location = 0; var carry = 0; //PEOPLE if ($('input:radio:checked').val() === "Obama") { people = -25; }else if ($('input:radio:checked').val() === "Clinton"){ people = -15; }else if($('input:radio:checked').val() === "Bush"){ people = 25; }else if($('input:radio:checked').val() === "Romney"){ people = 0; }else if($('input:radio:checked').val() === "Windsor"){ people = 25; }else if($('input:radio:checked').val() === "Putin"){ people = -25; }; //ORG if ($('input:radio:checked').val() === "Christian") { org = 20; }else if ($('input:radio:checked').val() === "Boy Scouts"){ org = 10; }else if($('input:radio:checked').val() === "Freemason"){ org = 30; }else if($('input:radio:checked').val() === "KGB"){ org = -20; }else if($('input:radio:checked').val() === "Islam"){ org = -30; }else if($('input:radio:checked').val() === "Satanic Cult"){ org = -50; }; //FOCAL if ($('input:radio:checked').val() === "Financial") { focal = 15; }else if ($('input:radio:checked').val() === "Industry"){ focal = 20; }else if($('input:radio:checked').val() === "Medical"){ focal = 5; }else if($('input:radio:checked').val() === "Technology"){ focal = 30; }else if($('input:radio:checked').val() === "War"){ focal = -30; }else if($('input:radio:checked').val() === "Spy"){ focal = -20; }; //LOCATION if ($('input:radio:checked').val() === "United Kingdom") { location = 5; }else if ($('input:radio:checked').val() === "U.S.A."){ location = -15; }else if($('input:radio:checked').val() === "China"){ location = 0; }else if($('input:radio:checked').val() === "Germany"){ location = 20; }else if($('input:radio:checked').val() === "Russia"){ location …
accepted answer: http://stackoverflow.com/a/26549259
score: 0
tagged with: addition
has title: Add Variables In If Statement From Values Determined by Radio Buttons
answer count: 1
tagged with: if-statement
has comment: http://stackoverflow.com/comment/41720728
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41721213
has answer: http://stackoverflow.com/a/26549259
tagged with: javascript
tagged with: variables
tagged with: jquery
has comment: http://stackoverflow.com/comment/41721199
type: Question

http://stackoverflow.com/comment/42040178
type: AnswerComment
has text: @Bersama You're welcome :-) Happy to have helped :-)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26621788

http://stackoverflow.com/comment/41786026
has text: While true, it doesn't answer the question. It is an answer to another question.
score: 1
type: Comment
comment on: http://stackoverflow.com/a/26585143
type: AnswerComment

http://stackoverflow.com/q/26638567
has title: How do I properly handle a success response in an ExtJS proxy?
score: 0
type: Question
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/26639004
tagged with: extjs4
answer count: 1
has body: I have created a custom proxy with a custom reader and writer to interact with JSON documents in RavenDB. Loading and saving is all working well, except that the response for each update is not being handled properly. I can still see the red triangle (dirty?) in the corner of some grid rows after they have been successfully saved to the data base. The response looks like this: {Patched: true;} I am familiar with the successProperty, but I am not sure if that relates here or how/where to set it. In the proxy? In the Model? I suppose a less elegant solution would be to hook some event and call commit() on the record.
tagged with: extjs4.2
type: UnansweredQuestion

http://stackoverflow.com/comment/41943728
type: Comment
has text: thank you so much. its working. as it is a variable, i thought "" not necessary
comment on: http://stackoverflow.com/a/26671463
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41925457
has text: @Cheery like what? All I am entering is: sn1 (hit enter) sn2 (hit enter) sn3 . This then returns out as a String. Something did just dawn on me that may come into play (I will also add above) - the input field is a textarea. Does that change this?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26661479
type: QuestionComment

http://stackoverflow.com/comment/41945351
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26671884
type: Comment
has text: its saying `SyntaxError: invalid object initializer` because of this `data: { ajaxContent }`

http://stackoverflow.com/q/26618395
score: -3
downvote count: 3
has body: I have a div containing some PHP processed HTML. Like jsfiddle.net, i want d div, showing the HTML created from PHP, nested in another div. It is a program creating HTML/CSS, viewable to the client and now i want to make them able to copy the HTML/CSS codes for them to use. The code and the viewable code will be on the same site. Example: //Here i want all the code above to show as plain text I have searched the web and haven´t been able to find any solution.. Thanks in advance! :-)
has comment: http://stackoverflow.com/comment/41847852
tagged with: php
linked to: http://stackoverflow.com/q/6817262
has title: Show client-side HTML from div as plaintext
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26618467
accepted answer: http://stackoverflow.com/a/26618467
has comment: http://stackoverflow.com/comment/41847887
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41847820
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41862059
tagged with: css
has comment: http://stackoverflow.com/comment/41848063

http://stackoverflow.com/q/26540842
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I have a simple HTML form with several buttons. With some assistance I have implemented a Javascript to handle different actions depending on which button is clicked, however I've just noticed that this also appears to suppress the value for the button that was clicked as a POST parameter. I need to know the button that was clicked on the action page as it needs to branch conditionally as a result. Here's my HTML form: Quantities are correct Size and orienation is correct Revision Approved and here's my Javascript: When I checked the form values on the index.php page all I see are the following: Array ( [action] => updateItem [itemID] => CBE21852-FF46-5F43-8A59-C59AAE865F28 [ticked] => ticked ) Does anyone know how I can keep the functionality of the script but also include the button that was clicked as a POST parameter?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26540880
type: Question
has comment: http://stackoverflow.com/comment/41706551
tagged with: javascript
has title: Javascript blocking Submit Button from Value
accepted answer: http://stackoverflow.com/a/26540880
has answer: http://stackoverflow.com/a/26540877
possible better answer: http://stackoverflow.com/a/26540910
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26540910

http://stackoverflow.com/comment/41748592
type: Comment
type: QuestionComment
has text: It's not at all clear what you're trying to do here.
score: 1
comment on: http://stackoverflow.com/q/26564481

jquery-mobile
tags question: http://stackoverflow.com/q/26670122
tags question: http://stackoverflow.com/q/26640727
type: Tag
tags question: http://stackoverflow.com/q/26528924
tags question: http://stackoverflow.com/q/26569627
tags question: http://stackoverflow.com/q/26646579
tags question: http://stackoverflow.com/q/26630363
tags question: http://stackoverflow.com/q/26571269
tags question: http://stackoverflow.com/q/26546601
tags question: http://stackoverflow.com/q/26645789
tags question: http://stackoverflow.com/q/26520749
tags question: http://stackoverflow.com/q/26529312
tags question: http://stackoverflow.com/q/26655761
tags question: http://stackoverflow.com/q/26652493
tags question: http://stackoverflow.com/q/26516309
tags question: http://stackoverflow.com/q/26671341
tags question: http://stackoverflow.com/q/26524426
tags question: http://stackoverflow.com/q/26536569
tags question: http://stackoverflow.com/q/26552297
tags question: http://stackoverflow.com/q/26534010
tags question: http://stackoverflow.com/q/26602874
tags question: http://stackoverflow.com/q/26635484
tags question: http://stackoverflow.com/q/26670606
tags question: http://stackoverflow.com/q/26667572
tags question: http://stackoverflow.com/q/26575302
tags question: http://stackoverflow.com/q/26624367
tag name: jquery-mobile

http://stackoverflow.com/comment/42084108
has text: Hey dude I just help you out. I cant make whole code.
type: AnswerComment
comment on: http://stackoverflow.com/a/26672075
score: 0
type: Comment

http://stackoverflow.com/q/26601360
has body: I want to alert some data using of ajax callback but not alerting. Click here ajax.php <?php echo "Hello World!!!"; ?> I am getting the response Hello World!!! but not alerting. Please check above code.
has answer: http://stackoverflow.com/a/26601566
score: 0
possible better answer: http://stackoverflow.com/a/26601457
has answer: http://stackoverflow.com/a/26601457
accepted answer: http://stackoverflow.com/a/26601536
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26601836
answer count: 4
has title: Ajax Data response data not alert
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26601536
type: Question
tagged with: javascript

http://stackoverflow.com/a/26515500
answers question: http://stackoverflow.com/q/26515297
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Working Sample for M The regex used is /0{6}\b/g. Note that $ is not used to check the end of the string, but a word boundary character \b is used which makes this work in a wider range of cases in which other suggestions would fail. You can very easily derive a similar one yourself for K, leaving that as an exercise for you :) After you have done that, you can check if your data matches the first regex or not, and replace if it does. If it doesn't, then test for the second regex (for K) and replace if found. P.S. The service I used to post the solution (Regex 101) is a very useful service and is a perfect tool for prototyping and learning regex. http://jsh.zirak.me/2klw //see this only if you still can't figure out how to do it. This spoiler contains the solution if you can't figure out how to do it

http://stackoverflow.com/a/26857320
answers question: http://stackoverflow.com/q/26636929
type: Answer
score: 0
has body: The explicit loading of "fusioncharts.gantt.js" is not required, it will be automatically loaded by "fusioncharts.widgets.js". If explicit loading is required, try loading "fusioncharts.widgets.js" followed by "fusioncharts.gantt.js"

http://stackoverflow.com/q/26617038
has answer: http://stackoverflow.com/a/26617475
has answer: http://stackoverflow.com/a/26633896
type: Question
has body: I am building a site for both mobile/touch devices as well as desktop non-touch devices. To help with eliminating the 300ms delay on jQuery .click events for touch devices I am using the tappy library, which works beautifully. https://github.com/filamentgroup/tappy That being said, I only want to bind this 'tap' event where necessary and want to bind a regular .click event if the device is non-touch. I know tappy's 'tap' event will fire for non-touch devices, but I'd rather only use it where necessary since there are a few quirks documented. Up to now I have been writing switch functions each time I want to do this, which looks like this: if ($('html').hasClass('no-touch')) { $('.sidebar').find('.strip').find('.explore-wrapper').click(function() { $(this).closest('.sidebar').addClass('active'); }); } else { $('.sidebar').find('.strip').find('.explore-wrapper').bind('tap', function() { $(this).closest('.sidebar').addClass('active'); }); } I'd like to extend jQuery and write my own version of .click, maybe called 'tapClick' so that my code could function like: $('.sidebar').find('.strip').find('.explore-wrapper').tapClick(function() { $(this).closest('.sidebar').addClass('active'); }); I started to try and write my own extension, but couldn't get it...any help would be appreciated: // Custom tap/click bind $.extend({ tapClick : function(callbackFnk) { if ($('html').hasClass('touch')) { $(this).bind('tap', function() { if(typeof callbackFnk == 'function') { callbackFnk.call(this); } }); } else { $(this).click(function() { if(typeof callbackFnk == 'function') { callbackFnk.call(this); } }); } } });
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26633896
has title: Extend jQuery with modified .click function
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41845252
tagged with: touch
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26617475

http://stackoverflow.com/q/26584223
has answer: http://stackoverflow.com/a/26584461
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26584461
has answer: http://stackoverflow.com/a/26584323
has comment: http://stackoverflow.com/comment/41784154
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26584323
has body: I want to change cell value of table when click on that value. Default value of that cell is '0'. When I click on that I want change it to '1' and '1' to '0'. I'm new for web developing. If any one can help it will be highly appreciated. # Init the MySQL Connection mysql_connect("localhost", "root", "") or die(mysql_error()) ; mysql_select_db("selfie") or die(mysql_error()) ; # Prepare the SELECT Query $selectSQL = 'SELECT * FROM `image_upload` INNER JOIN user_table ON image_upload.user_id=user_table.user_id ORDER BY timestamp DESC'; # Execute the SELECT Query if( !( $selectRes = mysql_query( $selectSQL ) ) ){ echo 'Retrieval of data from Database Failed - #'.mysql_errno().': '.mysql_error(); }else{ ?> User name Category Description Image Location Status <?php if( mysql_num_rows( $selectRes )==0 ){ echo ' No Rows Returned '; }else{ while( $row = mysql_fetch_assoc( $selectRes ) ){ echo " {$row['user_name']} {$row['category']} {$row['description']} {$row['location']} {$row['flag']} \n"; } } ?>
tagged with: php
has answer: http://stackoverflow.com/a/26584516
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41784388
has title: Change a cell value of table
type: Question

http://stackoverflow.com/comment/41803801
has text: If you get the "Content-Type" header set correctly, your browser will show the file rather than offer it for download.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26594500

http://stackoverflow.com/q/26546715
type: Question
has body: In Javascript, We can write statement as below. var f_names = { 'a' : 'Apple', 'b' : 'Banana' 'c' : 'Carrot' }; I can call this as f_names['c'] and get output as Carrot. Is there any equivalent to this in Java instead of Map ? Similar to above ? We can create an String array as bellow in java. String[] names= { "Apple","Banana", "Carrot" }; Then can call as names[2] and this will return output as Carrot. I'm looking for solution like this.
has comment: http://stackoverflow.com/comment/41716455
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26546734
score: -1
has answer: http://stackoverflow.com/a/26546791
has title: Regarding Java Map and Array
has comment: http://stackoverflow.com/comment/41716349
favorite count: 0
has comment: http://stackoverflow.com/comment/41716333
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26546954
has comment: http://stackoverflow.com/comment/41716382
answer count: 4
has answer: http://stackoverflow.com/a/26546867
has comment: http://stackoverflow.com/comment/41716512
tagged with: java
upvote count: 1

http://stackoverflow.com/comment/41936763
comment on: http://stackoverflow.com/q/26667674
has text: It is javascript, sorry about that
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/31532193
type: AcceptedAnswer
has body: The accepted answer by @Gergo supplied is no longer the case. On the master branch, Hoek.transform is accepting arrays and iterating over them, transforming each set of underlying keys. Here's the related PR: https://github.com/hapijs/hoek/pull/148 And the master branch's ReadMe (this is slated for an as of yet unreleased tag , v2.15.0): https://github.com/hapijs/hoek/tree/master#transformobj-transform-options Transforms an existing object into a new one based on the supplied obj and transform map. options are the same as the reach options. The first argument can also be an array of objects. In that case the method will return an array of transformed objects.
type: Answer
accepted answer of: http://stackoverflow.com/q/26552322
answers question: http://stackoverflow.com/q/26552322
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/27270315
answers question: http://stackoverflow.com/q/26573736
type: Answer
downvote count: 0
score: 1
has body: This is achievable using canvas &amp; javascript. I won't waste time listing relative resources here, simply google "Draw Canvas Graph" or similar. You will need to store share data, which can be retrieved via social site API's. Facebook, Twitter, Pinterest, Linked In are all easy GET calls, and again a quick google will give you tutorials for that. In principle though, you have to: Record share counts over time (PHP + MySQL) Load a page including this data Write Javascript to draw a graph based on this data
upvote count: 1

http://stackoverflow.com/comment/41788202
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26586379
has text: @rajeshkakawat Yeah it does something else at the minute, its just to get a value.
score: 0

package
tags question: http://stackoverflow.com/q/26621628
tag name: package
type: Tag

http://stackoverflow.com/a/26649214
score: 4
has body: You have 3 options: Edit the files manually - a horribly laborious task and not recommended. Visit http://getbootstrap.com/customize/, specify your own breakpoints there and download the customised version. Use a CSS preprocessor and customise it at your end. Bootstrap provide versions for both Less and Sass. Note that for option 2 and 3, you are looking to change the @grid-float-breakpoint variable. In your example, you want to change the value from @screen-sm-min to @screen-md-min
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41903716
has comment: http://stackoverflow.com/comment/41903470
type: Answer
accepted answer of: http://stackoverflow.com/q/26649090
has comment: http://stackoverflow.com/comment/41903136
answers question: http://stackoverflow.com/q/26649090
has comment: http://stackoverflow.com/comment/41903442
has comment: http://stackoverflow.com/comment/41903000
has comment: http://stackoverflow.com/comment/41903577
has comment: http://stackoverflow.com/comment/41903626

http://stackoverflow.com/comment/41863224
score: 0
comment on: http://stackoverflow.com/a/26625073
type: Comment
type: AnswerComment
has text: So how to acces received data from api?

http://stackoverflow.com/comment/41866406
type: AnswerComment
has text: My mistake, the $.ajax call should be included in the For statement.
type: Comment
comment on: http://stackoverflow.com/a/26628736
score: 0

http://stackoverflow.com/comment/41786529
comment on: http://stackoverflow.com/a/26585312
score: 0
type: AnswerComment
has text: Also, you should put javascript variables inside `myFunction()`
type: Comment

http://stackoverflow.com/comment/41715377
type: QuestionComment
comment on: http://stackoverflow.com/q/26546100
has text: @hitesh it does not work?
score: 0
type: Comment

http://stackoverflow.com/comment/41887836
type: QuestionComment
type: Comment
has text: @dandavis what does OPD stand for ?
score: 0
comment on: http://stackoverflow.com/q/26640244

twitter-bootstrap
tags question: http://stackoverflow.com/q/26530187
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/26641056
tags question: http://stackoverflow.com/q/26656513
tags question: http://stackoverflow.com/q/26591551
tags question: http://stackoverflow.com/q/26620797
tags question: http://stackoverflow.com/q/26545949
tags question: http://stackoverflow.com/q/26649939
tags question: http://stackoverflow.com/q/26552714
tags question: http://stackoverflow.com/q/26631965
tags question: http://stackoverflow.com/q/26637077
tags question: http://stackoverflow.com/q/26554790
tags question: http://stackoverflow.com/q/26515416
tags question: http://stackoverflow.com/q/26539829
tags question: http://stackoverflow.com/q/26625767
tags question: http://stackoverflow.com/q/26582330
tags question: http://stackoverflow.com/q/26639314
tags question: http://stackoverflow.com/q/26583978
tags question: http://stackoverflow.com/q/26641271
tags question: http://stackoverflow.com/q/26638179
tags question: http://stackoverflow.com/q/26550774
tags question: http://stackoverflow.com/q/26667771
tags question: http://stackoverflow.com/q/26640783
tags question: http://stackoverflow.com/q/26642988
tags question: http://stackoverflow.com/q/26652473
tags question: http://stackoverflow.com/q/26564323
tags question: http://stackoverflow.com/q/26620666
tags question: http://stackoverflow.com/q/26518997
tags question: http://stackoverflow.com/q/26594388
tags question: http://stackoverflow.com/q/26526022
tags question: http://stackoverflow.com/q/26658108
tags question: http://stackoverflow.com/q/26663802
tags question: http://stackoverflow.com/q/26659790
tags question: http://stackoverflow.com/q/26615063
tags question: http://stackoverflow.com/q/26565243
tags question: http://stackoverflow.com/q/26573666
tags question: http://stackoverflow.com/q/26555673
tags question: http://stackoverflow.com/q/26659791
tags question: http://stackoverflow.com/q/26611601
tags question: http://stackoverflow.com/q/26567867
tags question: http://stackoverflow.com/q/26571190
tags question: http://stackoverflow.com/q/26631515
tags question: http://stackoverflow.com/q/26558016
tags question: http://stackoverflow.com/q/26669359
tags question: http://stackoverflow.com/q/26609387
tags question: http://stackoverflow.com/q/26609823
tags question: http://stackoverflow.com/q/26539747
tags question: http://stackoverflow.com/q/26566003
tags question: http://stackoverflow.com/q/26577465
tags question: http://stackoverflow.com/q/26623268
tags question: http://stackoverflow.com/q/26635111
tags question: http://stackoverflow.com/q/26579865
tags question: http://stackoverflow.com/q/26605208
tags question: http://stackoverflow.com/q/26623493
type: Tag
tags question: http://stackoverflow.com/q/26537372
tags question: http://stackoverflow.com/q/26524388
tags question: http://stackoverflow.com/q/26600904
tags question: http://stackoverflow.com/q/26566989
tags question: http://stackoverflow.com/q/26520289
tags question: http://stackoverflow.com/q/26652193
tags question: http://stackoverflow.com/q/26640321
tags question: http://stackoverflow.com/q/26630373
tags question: http://stackoverflow.com/q/26581544
tags question: http://stackoverflow.com/q/26567163
tags question: http://stackoverflow.com/q/26639824
tags question: http://stackoverflow.com/q/26657025
tags question: http://stackoverflow.com/q/26546100
tags question: http://stackoverflow.com/q/26640647
tags question: http://stackoverflow.com/q/26568716
tags question: http://stackoverflow.com/q/26591494
tags question: http://stackoverflow.com/q/26661276
tags question: http://stackoverflow.com/q/26589957
tags question: http://stackoverflow.com/q/26523190
tags question: http://stackoverflow.com/q/26529548
tags question: http://stackoverflow.com/q/26564539
tags question: http://stackoverflow.com/q/26562366
tags question: http://stackoverflow.com/q/26570500
tags question: http://stackoverflow.com/q/26546468
tags question: http://stackoverflow.com/q/26619264

http://stackoverflow.com/q/26672863
has title: hover overlayed text on an image bug
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26673182
has answer: http://stackoverflow.com/a/26673085
accepted answer: http://stackoverflow.com/a/26673085
type: Question
has body: I have an overlayng text and navigation arrows on an image, they appear when a mouseover event is fired and hide when the mouse leaves the image. The bug is that the overlay text is not a part of the image, so when i mouse over it, it starts flashing (because when the text hides, the mouse is positioned on the image, and that fires the mouseover event and the text shows up again) This is my current JavaScript logic: $('#container img').mouseover(function(){ $(this).siblings('.discr').show(); $(this).mouseout(function(){ $(this).siblings('.discr').hide(); }) }) For better understanding this is a DEMO and here is what i expect: the overlay text does not flash when the mouse is over it, it acts like when the mouse is over the image only.
has answer: http://stackoverflow.com/a/26676412
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41951854
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26673182
favorite count: 0
tagged with: mouseover
tagged with: css
has comment: http://stackoverflow.com/comment/41947133
has comment: http://stackoverflow.com/comment/41946152

http://stackoverflow.com/comment/41853988
has text: if the bindings are made on elements and not `document` or `body` could try `$('body').html( $('body').html() )`. This would remove any external listeners. If there are inline event handlers can remove them with `removeAttr`. Without knowing more about page this is simply a suggestion, not a sure fire fix
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26621744

http://stackoverflow.com/q/26629180
answer count: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26629278
score: 10
has comment: http://stackoverflow.com/comment/41867346
has comment: http://stackoverflow.com/comment/41867442
upvote count: 10
type: Question
has answer: http://stackoverflow.com/a/48762421
has title: Changing the case of JavaScript object keys
downvote count: 0
has answer: http://stackoverflow.com/a/26629612
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26629224
favorite count: 0
has answer: http://stackoverflow.com/a/26629284
accepted answer: http://stackoverflow.com/a/26629284
has answer: http://stackoverflow.com/a/26629224
has answer: http://stackoverflow.com/a/58272093
has comment: http://stackoverflow.com/comment/134780959
has answer: http://stackoverflow.com/a/49655111
has body: I have following object. var obj = [{ Address1: "dd", Address2: "qww", BankAccNo: "44", BankBranchCode: "44", BloodGrp: "A+" }, { Address1: "dd", Address2: "qww", BankAccNo: "44", BankBranchCode: "44", BloodGrp: "A+" }]; How can I make all of the keys uppercase? I want to be able to access values like this : - obj[0].ADDRESS1
has answer: http://stackoverflow.com/a/58272452
has comment: http://stackoverflow.com/comment/41867064

http://stackoverflow.com/q/26541404
has body: I want to convert a long string of numbers(PI) into individually set variables by assigning each digit(0-9) with a letter. Example:(when the compiler sees a digit and it is "1", "1" will always be assigned var a, the same with "2" as it will always be assigned to var b....etc. var rawPi = 3 1 4 1 5 9 2 6 5 3 5 8 9; var a = 1; var b = 2; var c = 3; var d = 4; var e = 5; var f = 6; var g = 7; var h = 8; var i = 9; var j = 0; //Tried to make an array out of the digits of PI var cookedPi = rawPi.split(' ').map(Number); var i; while(i &lt; pi.length ) { cookedPi.toString()[for(i = 0; i &lt; pi.length; i++){ if(i= a) console.log("a"); //This segement didn't print out "a", so I didn't bother to write an IF statement for the rest of the values. }]; } I tried to use loops in order for the compiler to read each digit individually but that's where I think I went wrong. Also part of the problem is I don't know how to isolate the errors because I don't know where I went wrong. Can somebody explain this, I am somewhat of a novice.
has answer: http://stackoverflow.com/a/26541507
tagged with: arrays
tagged with: javascript
score: -3
has title: Converting a string of numbers into predetermined variables in JS?
tagged with: converters
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41707396
has comment: http://stackoverflow.com/comment/41707434
tagged with: string
has comment: http://stackoverflow.com/comment/41707438
favorite count: 0
has comment: http://stackoverflow.com/comment/41707424
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41707426
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/41707428

http://stackoverflow.com/q/26654428
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26654636
score: 4
has title: AngularJS $location.search() not working
upvote count: 4
has comment: http://stackoverflow.com/comment/41911963
has body: It's the first time I'm trying to use the $location service in AngularJS in order to check for query string arguments. I've been reading the docs and trying to play a bit with it in Plunkr to see how to use it, but so far I've failed to get it to retrieve any parameters from the query string. I've been testing it using this plunk http://plnkr.co/edit/RIFdWa5ay2gmRa6Zw4gm?p=info var app = angular.module('myApp', []) .config(function($locationProvider) { $locationProvider.html5Mode(true); }); angular.module('myApp').controller('myCtrl', function($scope, $location){ $scope.name = "Andrei"; $scope.url = $location.host(); $scope.path = $location.path(); $scope._params = $location.search(); }); I've read that setting html5Mode(true) on the $locationProvider is required in order to get the $location service to work as "expected" - which I've done, but when setting this nothing works anymore in my plunk (you can set it to false and you'll see the binding are qorking again properly). Am I missing something regarding the $location service? Any help or suggestions are appreciated! Thanks!
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26654636

http://stackoverflow.com/q/26656914
downvote count: 0
score: 1
tagged with: asp.net
favorite count: 0
linked to: http://stackoverflow.com/q/3464498
has comment: http://stackoverflow.com/comment/41916243
accepted answer: http://stackoverflow.com/a/26657316
tagged with: vb.net
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/3464498
has title: ASP NET read session from javascript
upvote count: 1
possible better answer: http://stackoverflow.com/a/26657015
type: Question
has answer: http://stackoverflow.com/a/26657015
tagged with: c#
tagged with: javascript
tagged with: webforms
linked to: http://stackoverflow.com/q/3482261
has answer: http://stackoverflow.com/a/26657316
has body: I have a WebForms application in wich I store array of strings in Session object and I need to get this array in javascript code. Maybe someone can provide any solution, how should i do this? Here is my code: function loadAnswers() { var answers = '&lt;%=Session("answers")%&gt;'; } but is doesn't work and answerss variable contain simple string after assignment. ('System.String[]')
answer count: 2

http://stackoverflow.com/comment/41831436
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26605777
type: Comment
has text: So the roundy brakets are both for capturing in match and for logical grouping? and that is why we use that "?:" meaning do not capture?

http://stackoverflow.com/comment/41811553
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26593877
has text: ok thanks im still learning through w3schools and im not mithered about people seeing the pages theres nothing of any value on there just references to a specific product, iv set it up so iv got a web page for each reference number so i just need to build up the page location. As for validation its not that important atm i can implement that later when iv learnt abit more

http://stackoverflow.com/comment/41832390
type: Comment
score: 0
has text: What's in your string o.O You _could_ try this regex instead: `(/:\\+/g`
comment on: http://stackoverflow.com/a/26609704
type: AnswerComment

http://stackoverflow.com/comment/41775516
type: Comment
has text: @theamateurdataanalyst Yes, that's right. But at that point `i` is already set to 4. Note that your `console.log()` call doesn't happen until the function is called later, *after* the loop is finished. That's what makes it different than doing a `console.log()` *inside* the loop.
comment on: http://stackoverflow.com/a/26579054
score: 0
type: AnswerComment

http://stackoverflow.com/q/26530983
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41688724
downvote count: 0
has comment: http://stackoverflow.com/comment/41688468
has body: Tested in Firefox and Chrome. Script found on SO in an old Q/A. Script claimed to be working, doesn't work for me. Would rather use pure JS to solve this problem instead of HTML5 canvas to support older browsers. jsfiddle: http://jsfiddle.net/qnkonmgo/ &lt;html&gt; &lt;head&gt; &lt;script&gt; window.onload = function() { DrawLine(1,1,100,100); } function DrawLine(x1, y1, x2, y2){ if(y1 &lt; y2){ var pom = y1; y1 = y2; y2 = pom; pom = x1; x1 = x2; x2 = pom; } var a = Math.abs(x1-x2); var b = Math.abs(y1-y2); var c; var sx = (x1+x2)/2 ; var sy = (y1+y2)/2 ; var width = Math.sqrt(a*a + b*b ) ; var x = sx - width/2; var y = sy; a = width / 2; c = Math.abs(sx-x); b = Math.sqrt(Math.abs(x1-x)*Math.abs(x1-x)+Math.abs(y1-y)*Math.abs(y1-y) ); var cosb = (b*b - a*a - c*c) / (2*a*c); var rad = Math.acos(cosb); var deg = (rad*180)/Math.PI htmlns = "http://www.w3.org/1999/xhtml"; div = document.createElementNS(htmlns, "div"); div.setAttribute('style','border:1px solid black;width:'+width+'px;height:0px;-moz-transform:rotate('+deg+'deg);-webkit-transform:rotate('+deg+'deg);position:absolute;top:'+y+'px;left:'+x+'px;'); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt;
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41688473
has comment: http://stackoverflow.com/comment/41688675
tagged with: line
has answer: http://stackoverflow.com/a/26531525
score: 1
upvote count: 1
type: Question
has title: Javascript draw line script not working

http://stackoverflow.com/a/26553941
upvote count: 1
answers question: http://stackoverflow.com/q/26553645
score: 1
has body: Insert this code at http://www.url.com/home file var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i); }, any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); }}; if( isMobile.any() ) { window.location.assign("http://www.url.com/portfolio"); }
downvote count: 0
type: Answer

http://stackoverflow.com/a/26679332
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26659931
answers question: http://stackoverflow.com/q/26659931
has body: The solutions for this issue could be 2: 1- Modify the target page (upload.php) to only print the data that you need. 2- In your ajax function filter "xhr.responseText" to display just the data that you want I would decide myself for the 1st option doing an echo of variable msg in upload.php. Then on the success ajax you could try "status.html(data)" if "status.html(xhr.responseText)" still retrieves the whole page.
type: AcceptedAnswer

http://stackoverflow.com/q/26542822
has answer: http://stackoverflow.com/a/26543066
upvote count: 1
has body: I tried to place this code in wordpress loop: it should check checkbox's status for each post by id and if they checked - update value of textarea (it should to update after each click on checkboxes). but it catch value of the last post only.. although it looks right in page-view-source (all IDs on its places) &lt;!--wp loop begin--&gt; &lt;!--post content--&gt; &lt;script&gt; $('.taglist input').click(function() { var sum=0; if (document.getElementById('&lt;?php the_ID(); ?&gt;').checked){sum+=1000;} $('textarea').val(sum) ;} ); &lt;/script&gt; &lt;!--wp loop end--&gt;
tagged with: wordpress
has answer: http://stackoverflow.com/a/26543081
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26543066
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/26543081
type: Question
has title: Using sum of checked items' values from wordpress loop
answer count: 2

http://stackoverflow.com/comment/114596346
type: AnswerComment
score: 0
type: Comment
has text: Unfortunately, this will also convert booleans to strings.
comment on: http://stackoverflow.com/a/26624276

http://stackoverflow.com/comment/56477173
type: AnswerComment
comment on: http://stackoverflow.com/a/26577425
has text: Read the question properly.
type: Comment
score: 1

http://stackoverflow.com/a/26630471
has comment: http://stackoverflow.com/comment/41906068
answers question: http://stackoverflow.com/q/26629703
type: Answer
has body: In global mode the test method starts at lastIndex, wich is updated and not reset, even when you use a different string. Resetting it manually to 0 should correct the problem : ... regexp.lastIndex = 0 if(!regexp.test(textToSearch)) ...
has comment: http://stackoverflow.com/comment/41912749
score: 5
accepted answer of: http://stackoverflow.com/q/26629703
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/41872411
type: AcceptedAnswer

http://stackoverflow.com/a/26657475
type: Answer
score: 2
downvote count: 0
has body: in the first case you are executing the bootstrap.js before the dom gets loaded. This should work: Your order {{item.product_name}} Remove List of Names {{_name.username}} alternatively you can wrap your bootstrap function into document ready and leave the bootstrap.js script in the head section: angular.element(document).ready(function() { angular.bootstrap(document.getElementById("App2"),['namesList']); });
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26657025
accepted answer of: http://stackoverflow.com/q/26657025

http://stackoverflow.com/comment/41745654
has text: We test the solution and somehow the autocomplete did not kick in after keyword.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26559809
type: Comment

http://stackoverflow.com/comment/41835750
comment on: http://stackoverflow.com/q/26611566
type: QuestionComment
type: Comment
has text: Also see: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
score: 0

http://stackoverflow.com/q/26625075
has answer: http://stackoverflow.com/a/26626264
score: 0
has comment: http://stackoverflow.com/comment/41860730
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41859777
has comment: http://stackoverflow.com/comment/41863402
has comment: http://stackoverflow.com/comment/41860279
tagged with: jquery-easyui
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41859724
type: Question
has title: How to add content in dynamic tab
has comment: http://stackoverflow.com/comment/41860107
has comment: http://stackoverflow.com/comment/41859853
has body: I have a jqQrid that I have placed inside a HTML table. Now as per my requirement I have to show this grid inside the dynamic tab which is opened on hyper link click. Here is the code for dynamic tab creation: function addTab(title) { if ($('#tt').tabs('exists', title)) { $('#tt').tabs('select', title); } else { if (title == "Check in List") { //Here i have to call jqgrid loading function but how I am not getting !!! var content = ''; } else { var content = ' Hii '; } $('#tt').tabs('add', { title: title, content: content, closable: true }); } } Here is the function to generate the grid: function CheckInRecordgrid() { //Grid Codes } And here is the HTML table placeholder: Now my question is how to call the grid generation function if the clicked tab is as per the condition? Here is my full grid code.. function CheckInRecordgrid() { var data = [[48803, "DELUX", "A", "2014-09-12 12:30:00", "Done"], [48804, "NORAML", "V", "2014-09-12 14:30:00", "Pending"]]; $("#CheckIngrid").jqGrid({ datatype: "local", height: '100%', autowidth: true, colNames: ['Room No.', 'Category', ' Guest name', ' Date & Time ', 'Status'], colModel: [ { name: 'Room No.', index: 'Room No.', width: 100, align: 'center' }, { name: 'Category', index: 'Category', width: 100, align: 'center' }, { name: 'Guest name', index: 'Guest name', width: 100, align: 'center' }, { name: 'Date & Time', index: 'Date & Time', width: 100, align: 'center' }, { name: 'status', index: 'status', width: 100, align: 'center' } ], caption: "Check In List" }); var names = ["Room No.", "Category", "Guest name", "Date & Time", "status"]; var mydata = []; for (var i = 0; i < data.length; i++) { mydata[i] = {}; for (var j = 0; j < data[i].length; j++) { mydata[i][names[j]] = data[i][j]; } } for (var i = 0; i <= mydata.length; i++) { $("#CheckIngrid").jqGrid('addRowData', i + 1, mydata[i]); } }
has comment: http://stackoverflow.com/comment/41860813
tagged with: jqgrid
has comment: http://stackoverflow.com/comment/41861684
tagged with: javascript

http://stackoverflow.com/a/26567135
answers question: http://stackoverflow.com/q/26566940
has body: If you want to use PHP with your function, you'll have to either use AJAX or POST the data and have it display on refresh. However, I don't recommend doing a form submit every time someone clicks a form item. Ideally, you'd do one of the following: Use JavaScript by itself to run the function and display the result (AngularJS, Backbone, etc. are good for this) Submit the form and it will spit out a result on completion Use AJAX to fill in the item in its place
score: 0
type: Answer

http://stackoverflow.com/q/26576429
tagged with: glsl
has title: Projecting FBO value to screen-space to read from depth texture
score: 1
tagged with: webgl
upvote count: 1
has comment: http://stackoverflow.com/comment/41826484
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26609097
has comment: http://stackoverflow.com/comment/41826058
answer count: 1
has comment: http://stackoverflow.com/comment/41820009
has body: EDIT: Updated the JSFiddle link as it wasn't rendering correctly in Chrome on Windows 7. Context I'm playing around with particles in THREE.JS and using a frame buffer / render target (double buffered) to write positions to a texture. This texture is affected by its own ShaderMaterial, and then read by the PointCloud's ShaderMaterial to position the particles. All well and good so far; everything works as expected. What I'm trying to do now is use my scene's depth texture to see if any of the particles are intersecting my scene's geometry. The first thing I did was to reference my depth texture in the PointCloud's fragment shader, using gl_FragCoord.xy / screenResolution.xy to generate my uv for the depth texture lookup. There's a JSFiddle of this here. It's working well - when a particle is behind something in the scene, I tell the particle to be rendered red, not white. My issue arises when I try to do the same depth comparison in the position texture shader. In the draw fragment shader, I can use the value of gl_FragCoord to get the particle's position in screen space and use that for the depth uv lookup, since in the draw vertex shader I use the modelViewMatrix and projectionMatrix to set the value of gl_Position. I've tried doing this in the position fragment shader, but to no avail. By the way, what I'm aiming to do with this is particle collision with the scene on the GPU. So... the question (finally!): Given a texture where each pixel/texel is a world-space 3d vector representing a particle's position, how can I project this vector to screen-space in the fragment shader, with the end goal of using the .xy properties of this vector as a uv lookup in the depth texture? What I've tried In the position texture shader, using the same transformations as the draw shader to transform a particle's position to (what I think is) screen-space using the model-view and projection matrices: // Position texture's fragment shader: void main() { vec2 uv = gl_FragCoord.xy / te…
favorite count: 0
tagged with: opengl-es-2.0
tagged with: three.js
has comment: http://stackoverflow.com/comment/41826910
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26609097

http://stackoverflow.com/q/26635196
type: Question
type: AnsweredQuestion
tagged with: asp.net-mvc
has body: if my view's model is @model List&lt;myModel&gt; can I do the following in javascript &lt;script&gt; var someint = 0; var modelValue = @Model[someint].myValue; &lt;/script&gt;
has answer: http://stackoverflow.com/a/26647726
tagged with: javascript
has answer: http://stackoverflow.com/a/26635314
has answer: http://stackoverflow.com/a/26635517
has comment: http://stackoverflow.com/comment/41878088
has comment: http://stackoverflow.com/comment/41878420
has answer: http://stackoverflow.com/a/78645577
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26635517
favorite count: 0
has comment: http://stackoverflow.com/comment/41878120
answer count: 5
accepted answer: http://stackoverflow.com/a/26647726
has title: using javascript variable in view @model list
has comment: http://stackoverflow.com/comment/41878448
has answer: http://stackoverflow.com/a/26643889
score: 2
upvote count: 3
downvote count: 1

http://stackoverflow.com/a/26622679
score: 2
downvote count: 0
has body: Email clients are all over the place for their support of CSS and HTML. You really have to structure it like a 1990's website, using tables, br, etc. Campaign Monitor has a really good guide on email clients and what elements they support. I'd start there for your references. https://www.campaignmonitor.com/css/ It may be useful to start with an email template too. Zurb has some good ones at http://zurb.com/playground/responsive-email-templates and http://zurb.com/ink/templates.php.
type: Answer
answers question: http://stackoverflow.com/q/26622593
upvote count: 2
has comment: http://stackoverflow.com/comment/41855907

http://stackoverflow.com/q/26579521
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26579719
has body: I'm trying to send variable variable data into a database, however, the data isn't being sent. I'm using a jQuery $.post function to send the data, so I'm assuming that that's where the issue is, however, I'm not sure what said issue is. Also, I understand I have SQL injection issues at this point in time. jQuery function verify(){ center = $("#center_menu").val(); initials = $("#initials").val(); date = $("#date").val(); recurrent = $("#recurrent_menu").val(); name = $("#name").val(); email = $("#email").val(); aircraft = $("#aircraft_menu").val(); pair1 = $("#pair1").val(); pair2 = $("#pair2").val(); id = scenario +center_sub +date +initials; center_sub = center.substring(0,4); scenario = pair1 +" " +pair2; jep_num = 0; $("#air_id, #chart_id, #chart_desc").children().remove(); $(".jepp_charts").each(function(ind,item){ jep_num = ind + 1; air_id = $("#air_id_" +jep_num).val(); chart_id = $("#chart_id_" +jep_num).val(); chart_desc = $("#chart_desc_" +jep_num).val(); $("#air_id").append(" Airport Identifier: " +air_id +" "); $("#chart_id").append(" Chart Identifier: " +chart_id +" "); $("#chart_desc").append(" Chart Description: " +chart_desc +" "); }) $("input[id='save']").on("click", function(){ verify(); $.post("../php/processing.php", {scenario: scenario, instructor: name, initials: initials, email: email, date: date, center: center, aircraft: aircraft, recurrent: recurrent, pair1: pair1, pair2: pair2, jepaid: air_id, jepcid: chart_id, jepdesc: chart_desc}, function(response){ if(response.success == "1"){ } }, "json"); }) Php Form Processing ob_start(); require("../includes/header.php"); if($_SERVER["REQUEST_METHOD"] == "POST"){ $instructor = $_SESSION["user"]; $initials = $_POST["initials"]; $email = $_SESSION["email"]; $date = $_POST["date"]; $center = $_POST["center"]; $aircraft = $_POST["aircraft"]; $recurrent = $_POST["recurrent"]; $pair1 = $_POST["pair1"]; $pair2 = $_POST["pair2"]; $scenario = $pair1 ." " .$pair2; for($i = 1; $i <= 5; $i++){ $jepaid = "air_…
upvote count: 1
has comment: http://stackoverflow.com/comment/41776327
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41776223
has title: Variable variable data not being sent into the database
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41776244
tagged with: php
downvote count: 0
score: 1
type: Question
answer count: 1

http://stackoverflow.com/comment/41925822
comment on: http://stackoverflow.com/q/26661276
score: 0
type: QuestionComment
has text: I tried fiddle but everyone worked on there fine. I think it might be some components of my page conflicting with each other. I have included the link to the website!
type: Comment

http://stackoverflow.com/q/26518161
has answer: http://stackoverflow.com/a/26518298
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26518298
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Get element by half classname (no jQuery)
has answer: http://stackoverflow.com/a/26518302
accepted answer: http://stackoverflow.com/a/26518302
has answer: http://stackoverflow.com/a/26518336
has comment: http://stackoverflow.com/comment/41666213
type: AnsweredQuestion
has body: I want to to get in titels a list of the 3 links by calling them through the function everything goes well untill it comes to the last part of the (javascript) code. When it execute that code it says 'undefined' 3 times.. Why does it not just show the 3 names? HTML Name1 Name2 Name3 Javascript for (v = 0; v < classname.length; v++) { //classname = ["6.3", "6.4", "7.4"] titels.push(document.getElementsByClassName(classname[v]).innerHTML); console.log(titels[v]); } (no jQuery) Thank you in advance
type: Question

http://stackoverflow.com/comment/41956996
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26637750
has text: thanks, did not know that EL can be used that simply withing JS. Works like a charm after manually creating a JS-Date-Array compatible String within the bean. A `Collection<Date>` did not work out of the box.
type: AnswerComment

http://stackoverflow.com/a/26603130
accepted answer of: http://stackoverflow.com/q/26603088
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26603088
has body: You can add a certain width to the select with the #auswahl id as following : CSS: #auswahl { width:200px; }
type: Answer
score: 0

http://stackoverflow.com/comment/41833281
has text: I have rebuilt it a little using your code, but it doesn't work just yet: http://jsfiddle.net/m77do3u7/ Any ideas?
type: AnswerComment
comment on: http://stackoverflow.com/a/26610706
score: 0
type: Comment

ionic-framework
tags question: http://stackoverflow.com/q/26572460
tags question: http://stackoverflow.com/q/26634270
tags question: http://stackoverflow.com/q/26549668
type: Tag
tags question: http://stackoverflow.com/q/26623669
tags question: http://stackoverflow.com/q/26626361
tags question: http://stackoverflow.com/q/26612156
tags question: http://stackoverflow.com/q/26564024
tags question: http://stackoverflow.com/q/26584781
tags question: http://stackoverflow.com/q/26532978
tags question: http://stackoverflow.com/q/26651310
tags question: http://stackoverflow.com/q/26653984
tags question: http://stackoverflow.com/q/26586855
tags question: http://stackoverflow.com/q/26591197
tags question: http://stackoverflow.com/q/26611773
tags question: http://stackoverflow.com/q/26576099
tags question: http://stackoverflow.com/q/26589082
tags question: http://stackoverflow.com/q/26538945
tags question: http://stackoverflow.com/q/26637284
tag name: ionic-framework

http://stackoverflow.com/q/26655761
has answer: http://stackoverflow.com/a/26655957
has body: I am create a jquery mobile website.I want a popup raised when i click a input field. service jquery code : $(document).ready(function() { $(".popup_trigger").click(function() { $("#popup_service").popup(); }); }); I also try $(".popup_service").popup();
type: AnsweredQuestion
tagged with: jquery-mobile
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26655957
favorite count: 0
accepted answer: http://stackoverflow.com/a/26656179
type: Question
tagged with: http://stackoverflow.com/tag/html
score: -1
has title: popup trigger when click the input field in jquery mobile?
answer count: 2
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26656179
tagged with: javascript
tagged with: dom

http://stackoverflow.com/comment/41876358
has text: @hindmost what do you mean? Like a adding a visible flag on each model? How would that work?
type: Comment
comment on: http://stackoverflow.com/q/26634045
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41929075
score: 1
comment on: http://stackoverflow.com/q/26663611
has text: Your child nodes should be an array of node descriptor objects, instead of abusing properties named after tags for this.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26635233
score: 0
has comment: http://stackoverflow.com/comment/41879121
has comment: http://stackoverflow.com/comment/41902437
has comment: http://stackoverflow.com/comment/41879174
type: Answer
has comment: http://stackoverflow.com/comment/41878657
has body: Please read more about sessions here Then, to answer your question: First you need to start the session, as simple as session_start(); on the top of your script. Second you need to instantiate session variables with the DB values like this: $_SESSION['var'] = $value;. Third, in the html file or whatever, where the form relies, just check for it: if(isset($_SESSION['var'])) { echo '&lt;input type="text" value="'.$_SESSION['var'].'" /&gt;'; } else { echo '&lt;input type="text" value="" /&gt;'; } and use the value if it is set. L.E: So... first thing's first... session_start(); without it, there is no point of having session. Second, you create it like $_SESSION['some_name'] = $row[1] so that var will keep the value from $row[1]. I am presuming that it's the value you need. Do NOT do do it like $_SESSION['$row1'] because first of all this is incorrect, you will NOT have the value of row1 there. You need an unique name so that you can call it where you have the form. The above code will become something like this: &lt;?php session_start(); ini_set('display_errors',1); error_reporting(E_ALL); $DATE = date('Y-m-d'); require_once 'IRCconfig.php'; $connection = new mysqli($db_hostname, $db_username, $db_password, $db_database); if ($connection-&gt;connect_error) die($connection-&gt;connect_error); $query = "SELECT * FROM CLIENT_CHECKIN1 WHERE DATE&gt;='$DATE'"; $result = $connection-&gt;query($query); if (!$result) die ("Database access failed: " . $connection-&gt;error); $rows = $result-&gt;num_rows; for ($j = 0 ; $j &lt; $rows ; ++$j) { $result-&gt;data_seek($j); $row = $result-&gt;fetch_array(MYSQLI_NUM); $_SESSION['first_row'] = $row[1]; $_SESSION['second_row'] = $row[2]; $_SESSION['third_row'] = $row[3]; echo &lt;&lt;&lt;_END &lt;pre&gt; &lt;a href="http://localhost/populateClientCheckin.php" class="post"&gt;$row[1] $row[2] $row[3]&lt;/a&gt; &lt;/pre&gt; _END; } ?&gt; and, where you have the form and the &lt;input type = "text" value = "" /&gt; so where you need the va…
has comment: http://stackoverflow.com/comment/41883670
answers question: http://stackoverflow.com/q/26634706

http://stackoverflow.com/q/26638372
has answer: http://stackoverflow.com/a/26638677
type: Question
has comment: http://stackoverflow.com/comment/41883953
has answer: http://stackoverflow.com/a/26638543
tagged with: javascript
has title: Binding AngularJS value to call existing JavaScript function
has answer: http://stackoverflow.com/a/26638637
score: 0
answer count: 3
has body: I have some existing JavaScript I need to call. My existing function is called 'confirmDelete'. For the sake of demonstration, the shortened version looks like this: function confirmDelete(orderId) { return confirm('Are you sure you want to delete Order #"' + orderId + '"?'); } There is more to this function. Either way, I am trying to call this function like this: delete order My other bindings are working. However, I cannot figure out how to pass the order ID to my existing JavaScript function. How do I do that? Thank you!
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/26540898
upvote count: 2
answers question: http://stackoverflow.com/q/26540868
has comment: http://stackoverflow.com/comment/41706610
type: AcceptedAnswer
downvote count: 0
has body: You need to include jQuery; Add this code inside of head tags
has comment: http://stackoverflow.com/comment/41708506
type: Answer
has comment: http://stackoverflow.com/comment/41706624
has comment: http://stackoverflow.com/comment/41706689
score: 2
accepted answer of: http://stackoverflow.com/q/26540868

http://stackoverflow.com/q/26518801
has answer: http://stackoverflow.com/a/26518940
type: Question
answer count: 2
tagged with: google-maps
has title: javascript for loop prints the same set of cities 5 times instead of 5 distinct sets of cities
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/41667937
possible better answer: http://stackoverflow.com/a/26518940
has body: I have some javascript and html (below) I'm trying to loop through an array of cities and get the distance between each city using google maps API I got this working when I typed in two cities but when I hard coded in the array of 22 cities it displays the same set of cities each time, instead of each distinct set of two cities and the distance between them. I'm guessing that this is related to timing and that the return from google's api is overwriting my variables somewhere but I can not figure out how to fix it. Right now the loops are limited to 3 to save time while trouble shooting. expected output: Rostock,Germany, Lubeck,Germany 200km Rostock, Hamburg 100km lubeck, Hamburg 50km hamburg, Rostock 210km what I get: hamburg, Rostock 210km hamburg, Rostock 0km hamburg, Rostock 210km hamburg, Rostock 0km hamburg, Rostock 210km what am I doing wrong? Calculate driving distance with Google Maps API
has answer: http://stackoverflow.com/a/26527699
accepted answer: http://stackoverflow.com/a/26527699
type: AnsweredQuestion

http://stackoverflow.com/comment/41766922
comment on: http://stackoverflow.com/q/26574311
has text: @HMR let's see what I can learn in the reference you gave. :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/49089606
has text: How do you make the animation once draw once and stay on the screen? For the SVG examples @chipChocolate.py
type: Comment
comment on: http://stackoverflow.com/a/26560472
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41738293
comment on: http://stackoverflow.com/a/26558324
score: 0
type: Comment
has text: Thanks, that was the help I was searching for
type: AnswerComment

http://stackoverflow.com/a/26630246
type: AcceptedAnswer
score: 0
type: Answer
has body: Well, you swapped longitude/lattitude. LatLng() first asks for lattitude (There is probably a marker at some completely different part of the globe, on your map). Just change that part of your code to this: ... var myLatlng = new google.maps.LatLng(Lattitude, Longitude); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Hello World!', animation: google.maps.Animation.DROP }); //marker.setMap(map) ... You don't need marker.setMap(map). That is already done with map: map,
answers question: http://stackoverflow.com/q/26629864
accepted answer of: http://stackoverflow.com/q/26629864

http://stackoverflow.com/q/26590264
has comment: http://stackoverflow.com/comment/41795350
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42449419
has body: I have this code in javascript: var childrenSize = 7; var flAmt = parseFloat(100); var amt = parseFloat(flAmt/childrenSize); //Rounding-off fix var newAmt = (amt.toFixed(2))*childrenSize; alert(newAmt); var excess = 0; if(newAmt != flAmt) excess = parseFloat(flAmt - newAmt); amt = parseFloat(amt) + excess.toFixed(2); alert(amt); amt should be 14.25. But instead, it becomes 14.285714285714286-0.03... why? Also, how can I improve my code?
has answer: http://stackoverflow.com/a/26590340
has comment: http://stackoverflow.com/comment/41795379
has comment: http://stackoverflow.com/comment/41795549
has title: Why float becomes string in javascript
type: Question

http://stackoverflow.com/comment/41807445
score: 0
comment on: http://stackoverflow.com/a/26596437
type: Comment
type: AnswerComment
has text: I'll change it to a controller in plunkr and see if it works real quick

oracle-database
tags question: http://stackoverflow.com/q/26597699
tag name: oracle-database
type: Tag

http://stackoverflow.com/q/26599401
has title: tooltip won't work; div won't display
tagged with: tooltip
has comment: http://stackoverflow.com/comment/41813208
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41813200
has comment: http://stackoverflow.com/comment/41813192
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41813203
has body: I'm very new to JavaScript, and I'm practicing making a tooltip. I get the text, of course, but can't style it with what's in my CSS. I've been through so many tutorials and q&a's trying to find the answer, and I'm still confused. Is there anything that stands out in my code that is getting in my way? Here is my code:
answer count: 0
type: Question

http://stackoverflow.com/comment/41929818
type: QuestionComment
has text: If there are considerations to be made on both sides, an explanation of those considerations would be an answer.
score: 0
comment on: http://stackoverflow.com/q/26659058
type: Comment

http://stackoverflow.com/comment/41924102
type: AnswerComment
type: Comment
has text: it's trying to evaluate `\n` like a variable or a keyword, you want a string.
score: 2
comment on: http://stackoverflow.com/a/26661023

http://stackoverflow.com/a/26645147
score: 2
has comment: http://stackoverflow.com/comment/41896245
upvote count: 2
has body: Here is a jsFiddle illustrating a solution. jsFiddle The JavaScript code becomes: var specialKeys = new Array(); specialKeys.push(8); //Backspace specialKeys.push(9); //Tab specialKeys.push(46); //Delete specialKeys.push(36); //Home specialKeys.push(35); //End specialKeys.push(37); //Left specialKeys.push(39); //Right function IsAlphaNumeric(e) { var keyCode = e.keyCode == 0 ? e.charCode : e.keyCode; var ret = ((keyCode == 32) || (keyCode &gt;= 48 &amp;&amp; keyCode &lt;= 57) || (keyCode &gt;= 65 &amp;&amp; keyCode &lt;= 90) || (keyCode &gt;= 97 &amp;&amp; keyCode &lt;= 122) || (specialKeys.indexOf(e.keyCode) != -1 &amp;&amp; e.charCode != e.keyCode)); document.getElementById("error").style.display = ret ? "none" : "inline"; return ret; } The trick was to allow a keyCode equal to 32.
has comment: http://stackoverflow.com/comment/41896297
accepted answer of: http://stackoverflow.com/q/26645012
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26645012
downvote count: 0
has comment: http://stackoverflow.com/comment/41896338
has comment: http://stackoverflow.com/comment/41896630
has comment: http://stackoverflow.com/comment/41896283
has comment: http://stackoverflow.com/comment/41896260
type: Answer
has comment: http://stackoverflow.com/comment/41896479

http://stackoverflow.com/q/26630479
score: 0
type: Question
has answer: http://stackoverflow.com/a/26630571
has answer: http://stackoverflow.com/a/26630721
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I'm kind of new to the Jquery world so can someone please help me understand my do my $("#dothis").html("hit"); make the content only blink rather then simply show? i think that the function is repeating it self and that's what's causing it. html Code: -- Choose One -- A 1 2 3 4 5 6 7 8 9 10 J Q K -- Choose One -- A 1 2 3 4 5 6 7 8 9 10 J Q K -- Choose One -- A 1 2 3 4 5 6 7 8 9 10 J Q K do this Script:
has answer: http://stackoverflow.com/a/26630572
has answer: http://stackoverflow.com/a/26630569
has title: Why does my content blink?
answer count: 5
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/26381550
tagged with: css
has answer: http://stackoverflow.com/a/26630544
has comment: http://stackoverflow.com/comment/41869300

http://stackoverflow.com/comment/41918002
type: Comment
comment on: http://stackoverflow.com/a/26547684
has text: i've tried and tried (also with onUrlInvokeCallback) but it not work. in the update i've included my code. Can you explain what i'm doing wrong?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26555621
tagged with: css
has title: CSS, change stylesheet if mobile device
score: 1
upvote count: 1
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/41732869
tagged with: javascript
has body: I'am having trouble changing CSS file paths if the end user is accessing my site via a PC or mobile device, below is my CSS, I thought that it would redirect the user if using any handheld device: &lt;link rel="stylesheet" type="text/css" href="/css/style.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="/css/mobile.css" media="handheld" /&gt; Please can someone let me know if this is the correct way or should I be using javascript to manipulate my file path>
has answer: http://stackoverflow.com/a/26555760
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26555686

http://stackoverflow.com/a/26582777
answers question: http://stackoverflow.com/q/26582330
score: 0
type: Answer
has body: Answer to one of your questions, "determine whether the request has come from the "Add new company" button or whether it's come from the "Edit company" would be to use params[:controller] params[:action] to determine the controller action targeted. Or use a session variable or some param[:from_where_name] and check it in the js. Worst case use a hidden field or some data-field to pass the desired value.

http://stackoverflow.com/q/26662080
type: AnsweredQuestion
score: 0
type: Question
tagged with: concatenation
possible better answer: http://stackoverflow.com/a/26662137
accepted answer: http://stackoverflow.com/a/26662142
tagged with: javascript
has answer: http://stackoverflow.com/a/26662137
has answer: http://stackoverflow.com/a/26663036
tagged with: type-conversion
has body: I tried something in my console that I don't quite comprehend. If you add 2 + 3 + "hello" it concatenates to "5hello" However, if you reserve this and add 'hello' + 2 + 3 it concatenates to 'hello23' Why? My guess is because JavaScript looks at the first data type and tries to convert it to that type? Can someone elaborate on this?
has title: Adding strings to numbers and numbers to strings
tagged with: types
has answer: http://stackoverflow.com/a/26662295
has comment: http://stackoverflow.com/comment/41926547
has answer: http://stackoverflow.com/a/26662142
answer count: 4

http://stackoverflow.com/comment/41765090
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26573666
has text: In what way does it not work? Are there errors in the console? What do you expect it to do, and what happens instead? (*edit* - the JavaScript code has syntax errors; you should fix those first.)

http://stackoverflow.com/q/26619182
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/26619880
has title: Scroll To Top Button and open new page
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26619880
has body: I want, When I click on a button to go to the top and change the page. I have this code js> $(document).ready(function(){ //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() &gt; 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll to top $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; }); code html> &lt;a href="&lt;?php $url-&gt;_getURL('openpage'); ?&gt;" class="scrollToTop"&gt;Domestic Electrical installation&lt;/a&gt; thank you for your help

http://stackoverflow.com/q/26523304
answer count: 1
has answer: http://stackoverflow.com/a/26523340
has body: My HTML form is performing an action (adding a new Line to the form to be able to enter another phone-number) when the user left the current input field. This code results in a massive Lag when executed with IE: $("#createOrUpdateContactPersonPhoneNumber0").on('focusout', function() { addAnotherRow(); }); function addAnotherRow() { $("#phoneNumberTable tr:last-child").before(' '); }; When adding the code of the function "addAnotherRow()" directly into the .on('focusout') event there is no Lag.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26523340
type: Question
tagged with: internet-explorer
has title: Internet Explorer lags on assignment of a function to "onfocusout" Event
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/26661874
tagged with: javascript
has body: My grunt-contrib-sass will stop on compilation error with a traceback when I run grunt sass, but not when sass is triggered via grunt-contrib-watch. sass: { development: { options: { style: 'expanded' }, files: [ { expand: true, cwd: '&lt;%= paths.development %&gt;stylesheets/', src: ['*.scss', '*.sass'], dest: '&lt;%= paths.development %&gt;assets/', ext: '.css.liquid' }, ] }, watch: { sass: { files: [ '&lt;%= paths.development %&gt;stylesheets/*{.sass,.*scss}' ], tasks: ['sass:development'] // this swallows errors }, I can't seem to find any information on how to prevent this from happening in the grunt-contrib-sass or grunt-contrib-watch documentation. There is no error propagation option. What am I missing? I have not had this problem on 5+ other previous grunt based projects with similar watch-&gt;sass setups and am curious what the internet thinks.
score: 0
has answer: http://stackoverflow.com/a/26672141
has title: How do I propagate errors to grunt-contrib-watch from grunt-contrib-sass?
type: UnansweredQuestion
type: Question
tagged with: gruntjs
answer count: 1

http://stackoverflow.com/q/26667990
favorite count: 0
type: UnansweredQuestion
tagged with: python
has answer: http://stackoverflow.com/a/26974051
score: 2
upvote count: 2
type: Question
tagged with: open-source
has comment: http://stackoverflow.com/comment/41937782
tagged with: javascript
has body: After making changes in a course on the Teacher side, there are options to preview changes and view live version but currently both options are not working properly and we have to append base url (www.abc.com/) in URL every time to preview changes or view live version. We are using edx open code for providing open(free) courses for users from all over the world. But we are stuck here, please assist us so we can move forward. Thanks in Advance, Anjum
answer count: 1
downvote count: 0
has title: edx "Live Preview" and "View Live Version" button doesn't redirect to required page
tagged with: edx

http://stackoverflow.com/comment/41849889
score: 0
type: AnswerComment
type: Comment
has text: Its not really the question, but it is better practise and since he's already implemented an `.click()`, it would be stupid not to (:
comment on: http://stackoverflow.com/a/26619041

http://stackoverflow.com/comment/41849198
has text: if QTY >25 (250+(SizeChoice(1,2or3)*QTY)+(ColourChoice(1,2or3)*QTY)+StockChoice(1,2or3)*QTY), if QTY<25 = 0 I don't understand how to make that any smaller, it's all part of the same equation.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26607079

http://stackoverflow.com/a/26554410
has comment: http://stackoverflow.com/comment/41730797
has comment: http://stackoverflow.com/comment/41731231
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26554309
has comment: http://stackoverflow.com/comment/41730729
type: Answer
accepted answer of: http://stackoverflow.com/q/26554309
has body: If you use $("button"), the click() function you provide will apply to ALL buttons. I would recommend giving your button an id and then use: $("#myButtonId").click(function(){ $("#d").hide(); }); JQuery selectors are very useful for targeting your elements in the DOM.

http://stackoverflow.com/a/75951696
score: 0
has body: ** Intelligent Stock Market API ** can easily be used to get trending stocks not only on yahoo but also on social media, you can find the Python Sdk for this API here Hope you its all that you wish it to be
type: Answer
answers question: http://stackoverflow.com/q/26621097

http://stackoverflow.com/a/26529025
has body: Its pretty hard to know if you don't tell us what happened. I´ve figure out (maybe) a problem Try Change your code to function getdata(){ function callback(){ var _target = document.getElementById("page"); _target.innerHTML=_xhr.responseText; } _xhr= new XMLHttpRequest(); _xhr.onreadystatechange=callback; _xhr.open("POST", "teachers.html", true); _xhr.send(); }
answers question: http://stackoverflow.com/q/26528817
has comment: http://stackoverflow.com/comment/41685844
has comment: http://stackoverflow.com/comment/41684966
has comment: http://stackoverflow.com/comment/41685476
has comment: http://stackoverflow.com/comment/41685110
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41685672

http://stackoverflow.com/comment/41873071
comment on: http://stackoverflow.com/q/26632553
type: QuestionComment
score: 0
has text: `$(response).find('.item').attr('id')`
type: Comment

http://stackoverflow.com/comment/41865685
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26627402
has text: @Jarema plus, in addition to the richer API and better stack traces it's actually considerably faster than native promises at the moment.

http://stackoverflow.com/q/26528918
answer count: 1
tagged with: highcharts
tagged with: jquery
tagged with: ajax
has title: Highcharts: Updating a Pie with ajax
tagged with: php
has comment: http://stackoverflow.com/comment/41684720
has comment: http://stackoverflow.com/comment/41685171
type: Question
type: AnsweredQuestion
has body: I want to update the pie's data when the li is clicked. If data.php $cid get the value fixed value it works. Example : user_student.cid = 1 will work. If i use user_student.cid = $cid it doesn't work. Does anyone have any idea? Thanks you,pquest. But there have some problems.If I use fixed value 1 ,the alert value is: [["apple",1],["banana",2],["orange",3]] and the pie is working. If I use $cid value(if $cid value is 1) , the value alert is:[["apple",1],["banana",2],["orange",3]] but the pie is not working. Anyone have any idea? &lt;script type="text/javascript"&gt; $(document).ready(function() { $('table.display').dataTable({ "paging": false, "info": false }); $('li').click(function(){ var cid = $(this).attr("id"); $.ajax({ type: "POST", url: 'data.php', data:{ cid:cid }, success:function(reponse){ alert(reponse) /*options.series[0].data = reponse; chart = new Highcharts.Chart(options);*/ } }); var options = { chart: { renderTo: 'pie', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Web Sales &amp; Marketing Efforts' }, tooltip: { pointFormat: '{series.name}: &lt;b&gt;{point.percentage}%&lt;/b&gt;', percentageDecimals: 1, formatter: function() { return '&lt;b&gt;'+ this.point.name +'&lt;/b&gt;: '+ Highcharts.numberFormat(this.percentage, 1); +' %'; } }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#000000', formatter: function() { return '&lt;b&gt;'+ this.point.name +'&lt;/b&gt;: '+ Highcharts.numberFormat(this.percentage, 1); +' %'; } } } }, series: [{ type: 'pie', dataType: 'json', name: 'Browser share', data: [] }] } $.getJSON("data.php", function(json) { options.series[0].data = json; chart = new Highcharts.Chart(options); }); }); }); &lt;/script&gt; data.php &lt;?php require_once("../connectDB.php"); $cid = isset($_POST["cid"]) ? $_POST["cid"] : ""; $result = $db-&gt;prepare("SELECT stu_info.reference FROM stu_info , user_student WHERE stu…
has answer: http://stackoverflow.com/a/26529525
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26529525
score: 0

http://stackoverflow.com/q/26636780
tagged with: shadow-dom
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Polymer Automatic Node Finding Not Working
score: 0
has body: I'm using Polymer Web Components. Whenever I use this.$ I get an error that it is undefined. I also tried this.shadowRoot and it states that it is null. For example: Inside a &lt;polymer-element&gt;: &lt;script&gt; Polymer({ cardClick: function(event, detail, sender) { this.$.ordertemplatediv.style.display = 'none'; // the above line gives the following error: // "Uncaught TypeError: Cannot read property 'style' of undefined" this.shadowRoot.querySelector('#ordertemplatediv').style.display = 'none'; // the above line gives the following error: // "Uncaught TypeError: Cannot read property 'style' of null" } }); &lt;/script&gt; Inside another &lt;polymer-element&gt; in another file: (closing tags were omitted for clarity) &lt;template&gt; &lt;div id="ordertemplatediv"&gt; &lt;template repeat="{{item in items}}"&gt; &lt;!-- some irrelevant elements --&gt; Both files' root element is &lt;polymer-element&gt;. I tried using this.$ many times in different situations in this project but it never worked. Any ideas? Any help would be appreciated. EDIT 1 - CONTEXT This is what I actually want to do: I have 3 &lt;polymer-elements&gt; which we will call &lt;list-1&gt;, &lt;l-card&gt; and &lt;list-2&gt;. &lt;list-1&gt; looks something like this: (closing tags were omitted for clarity) &lt;polymer-element name="list-1"&gt; &lt;template&gt; &lt;template repeat="{{post in posts}}"&gt; &lt;l-card&gt; &lt;l-card&gt; contains the &lt;script&gt; above. &lt;list-2&gt; contains the &lt;template&gt; above. I want &lt;list-2&gt; to be refreshed (data reloaded) when an &lt;l-card&gt; in &lt;list-2&gt; is clicked (or tapped).
type: Question
tagged with: polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/26637349
answer count: 1

http://stackoverflow.com/comment/41798597
score: 0
type: Comment
type: QuestionComment
has text: Lots of available options here: http://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
comment on: http://stackoverflow.com/q/26591387

http://stackoverflow.com/comment/41785216
type: Comment
comment on: http://stackoverflow.com/a/26584747
score: 1
type: AnswerComment
has text: thanks a lot for your response, but I solved it using scope.$eval(attr) ! @artyom

http://stackoverflow.com/comment/85119477
comment on: http://stackoverflow.com/a/26569263
has text: @DamirBeylkhanov Your method will only sort by the departedYet value, it ignores the number value entirely.
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/q/26620630
has answer: http://stackoverflow.com/a/26621701
has body: I have some ASP.NET aspx form that contains: <asp:TextBox ID="TextBox4" CssClass="form-control required" runat="server" placeholder="Last Name"></asp:TextBox> @ <asp:TextBox ID="TextBox1" CssClass="form-control required" runat="server" placeholder="E-Mail"></asp:TextBox> I want to validate using this jQuery, but I don't know how to use it. jQuery(document).ready(function ($) { $("#btnRegister_Click").click(function () { var error = 0; $('input.required').each(function (i, item) { if ($(item).val() == '') { $(item).addClass('form-control has-error'); error = 1; } else { $(item).removeClass('form-control has-error'); } }); if (error) { return false; } }); var min_height = jQuery(window).height(); jQuery('div.col-lg-6 col-lg-offset-3').css('min-height', min_height); jQuery('div.col-lg-6 col-lg-offset-3').css('line-height', min_height + 'px'); $(".inner", ".boxed").fadeIn(500); });
upvote count: 2
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
score: 2
downvote count: 0
has title: Bootstrap validation with ASP.NET framework 4.5 Web Forms
tagged with: asp.net
favorite count: 0
type: Question
tagged with: twitter-bootstrap

http://stackoverflow.com/q/26521597
has comment: http://stackoverflow.com/comment/41672447
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41672315
score: 0
has body: I am having an issue using a constructor to spawn my drawimage. I need to spawn rows and rows of these so I need to be able to spawn these easily. so far I cannot fix this. the error I am recieving right now is Uncaught ReferenceError: requestAnimFrame is not defined Any thoughts on how I can fix this to make the parameter work? I need to have the propertyName equals out to like y1,y2,y2 and so forth because this is how I set the y of the blocks. enemy.y = rand; enemy.y2 = rand2; enemy.y3 = rand3; enemy.y4 = rand4; enemy.y5 = rand5; enemy.y6 = rand6; enemy.y7 = rand7; enemy.y8 = rand8; enemy.y9 = rand9; so here is the code that comes before the enemy.y1-y9's. var requestAnimFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; window.requestAnimationFrame = requestAnimFrame function drawPiece(x,y,letter){ this.x = x; this.y = y; this.letter = letter; var propertyName = propertyName; this.spawn = function(){ for(var i = 1; i &lt;= 9; i++){ if(i &gt; 1){ var propertyName = this.letter + i; } context.drawImage(imgs[0],enemy.x,enemy[propertyName], tileWidth, tileHeight); } } enemy.propertyName = rand; requestAnimFrame(drawPiece); check(); } var redblk = new drawPiece(900,rand,"y"); EDIT: now the error is gone. Do I have enough in the constructor for this to work, seeing this piece of code? Because there is no errors but there is no blocks appearing.
has title: using a constructor to spawn a drawimage
answer count: 1
accepted answer: http://stackoverflow.com/a/26521918
has comment: http://stackoverflow.com/comment/41672400
has answer: http://stackoverflow.com/a/26521918
type: AnsweredQuestion

http://stackoverflow.com/a/26648517
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26644885
has body: Everything you need is in the documentation. google.maps.event.addListener(map, 'click', function(e) { var marker = new google.maps.Marker({ position: e.latLng, map: map }); infowindow.setContent(e.latLng.toString()); infowindow.open(map, marker); });
accepted answer of: http://stackoverflow.com/q/26644885
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41686260
type: QuestionComment
type: Comment
has text: @squint `var` creates a variable, in *this* case scoped to the function, because that's the only other scope other than the global scope.
score: 0
comment on: http://stackoverflow.com/q/26529817

http://stackoverflow.com/comment/41692788
type: Comment
score: 0
type: AnswerComment
has text: you mean the first or the second image?
comment on: http://stackoverflow.com/a/26531829

http://stackoverflow.com/a/26540344
answers question: http://stackoverflow.com/q/26532719
score: -1
upvote count: 0
type: Answer
downvote count: 1
has body: i found a solution: function createNew() { var pdf = new jsPDF('p', 'pt', 'letter') , source = window.document.getElementsByTagName("body")[0] , specialElementHandlers = { '#CreateReport' : function(element, renderer){ // true = "handled elsewhere, bypass text extraction" return true; }, '#PrintReport': function(element, renderer){ // true = "handled elsewhere, bypass text extraction" return true; }, '#ignorePDF': function(element, renderer){ // true = "handled elsewhere, bypass text extraction" return true; } } margins = { top: 60, bottom: 60, left: 40, width: 1000 }; pdf.fromHTML( source , margins.left , margins.top , { 'width': margins.width , 'elementHandlers': specialElementHandlers }, function (dispose) { pdf.output("dataurlnewwindow"); }, margins ) } i put this code and now working fine

http://stackoverflow.com/comment/41673957
has text: You can add anything as that will get replaced once jQuery code executes.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26521600

http://stackoverflow.com/a/26601089
has comment: http://stackoverflow.com/comment/41822175
has comment: http://stackoverflow.com/comment/41821104
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26599918
accepted answer of: http://stackoverflow.com/q/26599918
has body: In your code you are setting cx and cy attributes to the g element. g elements does not support any position attributes like x, y or cx, cy. To move the contents of a g element you will have to use the transform attribute. Your code var node = svg.selectAll(".node") .data(graph.nodes, function(d) {return d.idx; }) .enter().append("g") .attr("class", "node") .attr("cx", function(d) { return d.x; }) //will not work .attr("cy", function(d) { return d.y; }); //will not work Solution var node = svg.selectAll(".node") .data(graph.nodes, function(d) {return d.idx; }) .enter().append("g") .attr("class", "node"); node.append("circle") .attr("r", 10) .style("fill", function(d) { return color(0); }); node.append("text") .attr("dx", 12) .attr("dy", ".35em") .text(function(d) { return d.name }); Use translate function as below to move group elements. function tick() { //Moving &lt;g&gt; elements using transform attribute node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); } JSFiddle
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26552062
has comment: http://stackoverflow.com/comment/41796449
has comment: http://stackoverflow.com/comment/41796835
upvote count: 1
has comment: http://stackoverflow.com/comment/41798898
has comment: http://stackoverflow.com/comment/41798237
has body: When you do document.getElementById('latitude').value that returns the value as a string e.g. "51.23546" instead of the floating point number that Google's API expects. To make sure they get passed to Google as floats, try: setLatLng = new google.maps.LatLng( parseFloat(document.getElementById('latitude').value), parseFloat(document.getElementById('longitude').value) );
answers question: http://stackoverflow.com/q/26550541
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/41947200
has text: Also, was looking for some more detailed info of what markers.exit().remove(); does and how it does it.
comment on: http://stackoverflow.com/a/26672896
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41727589
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26550889
has text: I know what you are saying, but it's not possible with how the design is put together. It's a responsive site, plus the nav can't be absolute positioned.

http://stackoverflow.com/comment/92825829
score: 1
comment on: http://stackoverflow.com/a/52959279
type: AnswerComment
has text: Put the above in tags in html file. Uses - unordered list. When you run it the results are displayed w/ the #s chosen.
type: Comment

http://stackoverflow.com/q/26579109
has body: I'm trying to use multiple textures in a single PointCloud using a ShaderMaterial. I'm passing a texture array to the shader along with texture index attributes and selecting the appropriate texture to use in the fragment shader. Relevant Setup Code: var particleCount = 100; var uniforms = { textures: { type: 'tv', value: this.getTextures() } }; var attributes = { texIndex: { type: 'f', value: [] }, color: { type: 'c', value: [] }, }; var material = new THREE.ShaderMaterial({ uniforms: uniforms, attributes: attributes, vertexShader: document.getElementById('vertexShader').textContent, fragmentShader: document.getElementById('fragmentShader').textContent, transparent: true }); var geometry = new THREE.Geometry(); for (var i = 0; i &lt; particleCount; i++) { geometry.vertices.push(new THREE.Vector3( (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50)); attributes.texIndex.value.push(Math.random() * 3 | 0); attributes.color.value.push(new THREE.Color(0xffffff)); } var particles = new THREE.PointCloud(geometry, material); particles.sortParticles = true; this.container.add(particles); Vertex Shader: attribute vec3 color; attribute float texIndex; varying vec3 vColor; varying float vTexIndex; void main() { vec4 mvPosition = modelViewMatrix * vec4(position, 1.0); vColor = color; vTexIndex = texIndex; gl_PointSize = 50.0; gl_Position = projectionMatrix * mvPosition; } Fragment Shader: uniform sampler2D textures[3]; varying vec3 vColor; varying float vTexIndex; void main() { vec4 startColor = vec4(vColor, 1.0); vec4 finalColor; if (vTexIndex == 0.0) { finalColor = texture2D(textures[0], gl_PointCoord); } else if (vTexIndex == 1.0) { finalColor = texture2D(textures[1], gl_PointCoord); } else if (vTexIndex == 2.0) { finalColor = texture2D(textures[2], gl_PointCoord); } gl_FragColor = startColor * finalColor; } The problem is some points (ones using a texture index higher than 0) are flickering for reasons and can't figure out. Other attempts hav…
favorite count: 0
upvote count: 9
type: UnansweredQuestion
tagged with: three.js
downvote count: 0
tagged with: webgl
has answer: http://stackoverflow.com/a/26680105
score: 9
type: Question
has answer: http://stackoverflow.com/a/50807046
tagged with: javascript
has answer: http://stackoverflow.com/a/38702519
answer count: 3
has title: Three.js - Using multiple textures in a single PointCloud
tagged with: glsles

http://stackoverflow.com/comment/41775593
comment on: http://stackoverflow.com/q/26542301
score: 0
has text: @Json Segel You're welcome :)!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41872366
comment on: http://stackoverflow.com/q/26623163
has text: I tried that but it doesnt work. The parse method never triggers true for _.has(response,'words'). Perhaps that might have something to do with it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26671312
answers question: http://stackoverflow.com/q/26660836
score: 0
has comment: http://stackoverflow.com/comment/41960631
has comment: http://stackoverflow.com/comment/42015501
type: Answer
has body: There is a couple of problems. First of all, as said @wergeld, you need to sort your data: chartData.sort(function(a,b) { return a[0] - b[0]; }); Then the problem is with setting option for navigator: navigator: { series: [{ name: 'MSFT', data: chartData }] }, When should be an object, not an array: navigator: { series: { name: 'MSFT', data: chartData } }, And the last one, do you really need to set xAxis.min/max ? Escpecially to values 2 and 4. when you have timestamps like Working demo: http://jsfiddle.net/Yrygy/253/

http://stackoverflow.com/comment/65600484
has text: I edited the answer and removed the `minChunks` label.
type: Comment
comment on: http://stackoverflow.com/a/29087883
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41746032
comment on: http://stackoverflow.com/a/26544903
type: Comment
has text: But if my browser is not connected to VPN the page does not show, so how will the JS be downloaded and executed. I have put all my JS after body tag and I verified that they do get cached, but still this does not execute the script.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26529983
score: 0
answers question: http://stackoverflow.com/q/26529530
has comment: http://stackoverflow.com/comment/41690537
has comment: http://stackoverflow.com/comment/41688286
has body: it would be better if you posted what code is in getlink.php. I'd suggest you proceed like this. In getlink.php query the database to return the correct row. There is different ways to do that, depending on what framework or library (PDO,mysql_,) you are using. Then return the result as json In the same file, call the function you just defined. It should look to something like this &lt;?php function get_links($url_link) { $sql = "SELECT `name` FROM `variables` WHERE ID=?"; $res = $this-&gt;db-&gt;query($sql, array($url_link))-&gt;row_array(); return $res; } $result = get_links(1); //whatever the id is return json_encode($result); ?&gt; In your javascrit you can do something like this $.get( "getlink.php", function(data) { alert(data.URL); } );
type: Answer

http://stackoverflow.com/q/26554757
type: Question
possible better answer: http://stackoverflow.com/a/26555710
has title: Detect if a USB device is plugged in Javascript from browser
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41731268
has body: Is there Javascript based mechanism with which i can detect, through a browser, that a user has a specific usb device plugged in?
tagged with: browser
answer count: 2
linked to: http://stackoverflow.com/q/3743100
accepted answer: http://stackoverflow.com/a/26555656
favorite count: 0
has answer: http://stackoverflow.com/a/26555656
has comment: http://stackoverflow.com/comment/41731360
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/26555710
tagged with: google-chrome

http://stackoverflow.com/comment/41801535
type: AnswerComment
comment on: http://stackoverflow.com/a/26563164
has text: Thanks for the heads up @deonclem, we normally do our filtering via an API and then update the $scope, so we haven't run into this yet. Appreciate the tip!
type: Comment
score: 1

http://stackoverflow.com/comment/41886317
has text: But you're not asking a question, you're giving a list of requirements. You might as well hire a freelancer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26639314
score: 0

http://stackoverflow.com/comment/41944379
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26672104
type: QuestionComment
has text: Use document.getElementsByClassName

http://stackoverflow.com/a/26660195
accepted answer of: http://stackoverflow.com/q/26593185
type: Answer
answers question: http://stackoverflow.com/q/26593185
score: 0
type: AcceptedAnswer
has body: var browser = window.navigator.userAgent; var msie = browser.indexOf ( "MSIE " ); if(msie &gt; 0){ var remoteId = index.entity.id; var ie_fix = new Date().getTime(); $.ajax({ cache: false, type: "GET", url: '/XYZURL/' + Id, dataType: "json", async: true, success: function(Response) { $scope.data = Response; }, error: function(jqXHR,errorThrown) { alert("jqXHR"); } }); }else{ $scope.data = datafactory.show({id: index.id}); } Altough my code is angular based I used jQuery ajax for all the service calls but tried to implement angular and ajax calls depending on the browser and that has solved my issue. I know it may not be the right approach but the only solution which worked for me.

http://stackoverflow.com/comment/41821057
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26604032
has text: Take a look at the `blur` event instead of keyup
type: QuestionComment

http://stackoverflow.com/a/26635701
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41880318
accepted answer of: http://stackoverflow.com/q/26635170
type: Answer
score: 1
has body: You should use a Page Token to access Insights data from Facebook Pages. An Extended Page Token is valid forever, you just need to store it on your server for future usage. Basically, you just need to extend the User Token and request a Page Token with that Extended User Token with /me/accounts. Here are some links explaining how to generate an Extended Page Token: https://developers.facebook.com/docs/facebook-login/access-tokens/ http://www.devils-heaven.com/facebook-access-tokens/ http://www.devils-heaven.com/extended-page-access-tokens-curl/ Automatic post to my facebook page from Node.js server
upvote count: 1
answers question: http://stackoverflow.com/q/26635170

http://stackoverflow.com/q/26519053
tagged with: php
type: AnsweredQuestion
has body: I have a list view and grid view which are submit buttons and I have sort selection if I click on one of the select options the form will be submitted but I want to keep $_POST value whether the list had been clicked or Grid because when I submit the form the data will be gone I want something like: Name had been clicked and list had been clicked before that live example: (I changed it but concept is the same) I cannot remove onchange submit of select drop down and simply first choose the drop down selection and then submit the buttons because I need it to be like that for when going to the option load the form with new information The reason why I am submitting on onchange is that I need it because I sort my items with this submit my question is how can I have them both? do I need two forms? do I need to use jQuery? or php will do the work? I kept value of option after submit by javascript but I don't know how to maintain the value of $_POST that which one had been clicked how can I keep $_POST value when it has been set and submit the form on onchange of sort? View Results As: Sort Name Price - Low Price - High <?php if(isset($_POST["view"])): if($_POST["view"]=="Grid") { echo "Grid clicked"; echo " "; } if($_POST["view"]=="List" ) { echo "List clicked"; echo " "; } endif; ?>
type: Question
has answer: http://stackoverflow.com/a/26519515
has title: how to keep $_POST after submitting form with onchange event?
score: 0
possible better answer: http://stackoverflow.com/a/26519170
answer count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26532525
accepted answer: http://stackoverflow.com/a/26532525
has answer: http://stackoverflow.com/a/26519170

http://stackoverflow.com/comment/41712018
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26543961
has text: I have added an id (which is holding the same as the reference)- still the same result

http://stackoverflow.com/q/26635388
type: UnansweredQuestion
tagged with: php
score: 1
type: Question
tagged with: javascript
tagged with: image
has answer: http://stackoverflow.com/a/26635525
upvote count: 2
has body: I've got a site where users can enter text up to 250 characters. I want to lay this text over a default image and output a new image file. How can I do that?
answer count: 1
downvote count: 1
has title: Automatically create image file from text and default image in PHP or JS?
favorite count: 0

http://stackoverflow.com/comment/41865670
type: Comment
type: QuestionComment
has text: @Zaggo0 - This works, except now the data being is in the following format-> 0: 'query' when I just want the query. Actually, that's after it's been parsed in Chrome. Before it's been parsed, it is showing with [] around it.
comment on: http://stackoverflow.com/q/26628040
score: 0

wikipedia-api
tag name: wikipedia-api
type: Tag
tags question: http://stackoverflow.com/q/26624825

http://stackoverflow.com/comment/41812889
type: Comment
comment on: http://stackoverflow.com/a/26598931
has text: but $25.00 is fine. it's just going to ignore anything after the dot!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41704777
score: 0
comment on: http://stackoverflow.com/q/26539518
type: Comment
type: QuestionComment
has text: @PM77-1: Ok I still don't get it I think :( Do you perhaps have an example? I can't see how I should do this with my issue?!

http://stackoverflow.com/comment/41848176
type: Comment
comment on: http://stackoverflow.com/q/26568156
has text: @@chanchal, we don't have code online. Is html source code going to help?
score: 0
type: QuestionComment

http://stackoverflow.com/q/26621713
tagged with: javascript
tagged with: jquery
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/41853931
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41853889
favorite count: 0
has answer: http://stackoverflow.com/a/26621834
has body: i need find all images from textarea value and then replaces with inputs text elements and the value of those with the src of the img was reemplace after that the final string is output on a new div ('#newDiv') my script dont replace nothing i dont know why here is what i have done so far, function parsingHtml() { var content = $('#caja').val(); var newContent = $(content).find("img").replaceWith(' '); alert(newContent) $('#newDiv').html(newContent); }; any ideas? thanks in advance!
has comment: http://stackoverflow.com/comment/41854004
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41854032
has comment: http://stackoverflow.com/comment/41854057
has comment: http://stackoverflow.com/comment/41854205
accepted answer: http://stackoverflow.com/a/26621834
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41854056
has title: replace all images with inputs elements jquery

http://stackoverflow.com/comment/41992174
has text: Thanks Andrea, it worked. You saved me :) I would like to vote your answer, but I don't have enough reputation...
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26674133
type: AnswerComment

http://stackoverflow.com/q/26665800
has comment: http://stackoverflow.com/comment/41934341
tagged with: javascript
has answer: http://stackoverflow.com/a/26666123
has body: I am working a basic Javascript program to calculate the area of a trapezoid with given the variable names and the formula for area of a trapezoid which I have figured out mostly. The part I am having trouble is making it so it re-prompts the user for the variable if they enter a value that is not a number. I have tried the following as well as alert instead of prompt: while (isNaN(variablename)==true); { variablename = prompt("please enter a numerical value"); } This does nothing but run through the loop regardless of if it isNaN or not. The following is what I have so far: var topLen = Number(prompt("Enter a Number for the Top Length of the Trapezoid")); var botLen = Number(prompt("Enter a Number for the Bottom Length of the Trapezoid")); var trapHeight = Number(prompt("Enter a Number for the Height of the Trapezoid")); var trapArea = ((.5*trapHeight)*(topLen+botLen)); document.write("The area of a trapezoid with a tip length of " + topLen + ", bottom length of " + botLen + " and the height of " + trapHeight + " is " + trapArea +"."); Please also keep in mind that I cannot use and functions, except for isNaN() as we have not been taught them yet.
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41933975
has comment: http://stackoverflow.com/comment/41933580
type: AnsweredQuestion
has title: Javascript find the Area of a Trapezoid plus don't allow the user to enter non numerical values
has comment: http://stackoverflow.com/comment/41933855
type: Question
accepted answer: http://stackoverflow.com/a/26666123

http://stackoverflow.com/q/26621427
type: AnsweredQuestion
type: Question
has title: I do not get the notion of stating a method or function in a variable
has comment: http://stackoverflow.com/comment/41853524
tagged with: javascript
has answer: http://stackoverflow.com/a/26621462
accepted answer: http://stackoverflow.com/a/26621462
score: 0
answer count: 1
has body: I am a javascript newbie, and faced a somewhat basic problem. function expand(element){ var target = document.getElementById(element); var h = target.offsetHeight; var sh = target.scrollHeight; var loopTimer = setTimeout('expand(\''+element+'\')',8); if(h &lt; sh){ h += 5; } else { clearTimeout(loopTimer); } target.style.height = h+"px"; } In the code above, loopTimer variable is stated(setTimeout). However, what I am confused about is that it is simply 'stated', and not actually 'called'. To make my question clear, I rather expected just setTimeout('expand(\''+element+'\')',8); Because if it is stated in the variable, it seems to me that this method or function is just saved in the loopTimer, and be never used... but the code seems to work even if the loopTimer has not yet been 'called'..

http://stackoverflow.com/a/26516286
has comment: http://stackoverflow.com/comment/41728532
has comment: http://stackoverflow.com/comment/41726096
has comment: http://stackoverflow.com/comment/41717689
has comment: http://stackoverflow.com/comment/41716622
has comment: http://stackoverflow.com/comment/41718573
has comment: http://stackoverflow.com/comment/41715682
answers question: http://stackoverflow.com/q/26514396
has comment: http://stackoverflow.com/comment/41711567
has comment: http://stackoverflow.com/comment/41718963
has comment: http://stackoverflow.com/comment/41731446
has body: I've found a number of things to change in your code. This is a fixed version: JS (function ContactManager(){ // ... self.contacts = ko.observableArray(); self.addItem = function(){ self.contacts.push(new Contact(self.conName(), self.phone(), self.email(), self.address())); } // ... self.load = function(){ // haven't tested, but probably won't work. I think you'd have to convert your JSON to observables self.contacts = localStorage.getItem("stored_contacts"); } self.save = function(){ self.addItem(); // calling it from here, not from your HTML form submit // you have to convert to JSON to save in localStorage localStorage.setItem("stored_contacts", ko.toJSON(self.contacts())); } ko.applyBindings(self.templateName); })(); HTML &lt;form class="addContact" autocomplete="on"&gt; &lt;!-- ... --&gt; &lt;/form&gt; A couple of observations: self.contacts = ko.observableArray(self.save); - this doesn't make any sense. You are initializing an observableArray with a function object. You are not even calling the function, you are passing the function. Either way, doesn't make sense here. &lt;form data-bind="submit: addItem" &gt; and &lt;button data-bind="click: save" type="submit"&gt; - you are binding an event to your click on the button, and another event to the submit of the form, that happens when... well, when you click on the button. This maybe would work with some setup, but wasn't working, so I called the addItem from the save. localStorage.setItem("stored_contacts", self.contacts); - you are trying to store an array of very complex objects (the contacts), each one full of several other complex objects (the observables) inside localStorage. localStorage, though, only stores strings. So you have to convert your objects to JSON. ko.toJSON is the way to go. More at the docs. Edit: This is a working JSFiddle with the saving part. I don't know how does JSFiddle handles the localStorage, but as I told you in the comments on my code in the original answer, your load function i…
has comment: http://stackoverflow.com/comment/41716387
has comment: http://stackoverflow.com/comment/41716571
has comment: http://stackoverflow.com/comment/41731500
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41729856
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41722561
has comment: http://stackoverflow.com/comment/41690932
has comment: http://stackoverflow.com/comment/41718246
accepted answer of: http://stackoverflow.com/q/26514396

http://stackoverflow.com/comment/41787069
type: AnswerComment
score: 0
type: Comment
has text: This is looking very good. How can I sho wthe time inside a certain div? I tried [something here](http://jsfiddle.net/hupnaybv/), but it looks like there are some mistakes Also, how can I add another message when the shop is closed?
comment on: http://stackoverflow.com/a/26585286

http://stackoverflow.com/comment/41905333
score: 2
comment on: http://stackoverflow.com/q/26650721
has text: Are you running it in a browser? If yes, just source the second file after the first.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26611775
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26611849
answer count: 3
upvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26612139
has answer: http://stackoverflow.com/a/26611846
has title: How do I handle interaction between the DOM and the Controller?
downvote count: 0
score: 1
tagged with: angularjs-controller
has body: The more I read (and try to test) Angular apps, I'm seeing that it is bad practice for a controller to refer to the DOM. (e.g. this blog post). I must be missing something big, because if the controller can't access the DOM (e.g. by "regular" javascript calls like document.getElementsByClassName), then I don't understand how to do a lot of things I'd consider very basic. Here's a contrived, simple example that has some of the same problems that my app does: I have a directive that is simply a red box (a div with some styles applied), and uses ng-transclude. So I'd use it in my html file like Text that goes in the red box A button, when clicked, changes the color of all red boxes to blue. I would have something like this in my html file: <intput type="button" value="Make Them Blue" ng-click="makeThemBlue"/> In the controller's makeThemBlue function, I'd (for example) find all of the divs by class name, and change the class to something else which makes them blue Now consider that my real app is much more complicated - many "boxes" consisting of nested directives, that can be dragged around, and have their positions saved. The controller reads all of the saved settings, and lays everything out according to how the user saved it. How would I do something like either of the above examples without having the controller access the DOM?
tagged with: dom

http://stackoverflow.com/q/26611730
type: UnansweredQuestion
downvote count: 1
has body: I am trying to sort my collection using .sort() however I can only seem to sort the collection in an ascending manner, by code for the collection is like this, var ProjectCollection = Backbone.Collection.extend({ url: '/projects', model: app.Project, sort_key: "finish_date", comparator: function (item) { return item.get(this.sort_key); }, sortByField: function(fieldName, orderType) { console.log(fieldName, orderType); this.sort_key = fieldName; if(orderType == "acsending") { this.sort(function(a, b){return a-b}); } else if(orderType == "descending") { this.sort(function(a, b){return b-a}); } } }); The sortByField function gets fired from the view on a select menu change, and it fires this function, sortCollection: function(e) { this.collection.sortByField($('.sort').val(), $('.order').val()); console.log(this.collection); } Why would I not be able to sort in a descending order? The parameters that get sent to the collections function are correct, and the if and if else are run correctly based on those params.
type: Question
tagged with: backbone.js-collections
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/26612369
upvote count: 0
tagged with: javascript
tagged with: sorting
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26612574
has title: cant sort collection in a descending fashion
favorite count: 0

http://stackoverflow.com/comment/41673630
type: AnswerComment
type: Comment
has text: he asks to reload the page, so i answered that way, he didnt give specifics.
comment on: http://stackoverflow.com/a/26522379
score: 0

http://stackoverflow.com/comment/41816232
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26600884
has text: Also, pop open the browser console.log, and try looking for your template's eventMap in `Template.groupsList.__eventMaps[0]` by typing that expression into the console.

http://stackoverflow.com/q/26592327
has comment: http://stackoverflow.com/comment/41799523
tagged with: regex
possible better answer: http://stackoverflow.com/a/26592435
answer count: 4
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/26592406
accepted answer: http://stackoverflow.com/a/26592406
type: AnsweredQuestion
downvote count: 3
score: -1
has comment: http://stackoverflow.com/comment/41799567
has answer: http://stackoverflow.com/a/26592435
has answer: http://stackoverflow.com/a/26592441
has comment: http://stackoverflow.com/comment/41799481
tagged with: javascript
has comment: http://stackoverflow.com/comment/41799525
favorite count: 0
has answer: http://stackoverflow.com/a/26592363
has body: I have some string with the same template: input: azert,erty,tytr,0.243,jfrd,er,dr,0.85493,ftdre,0.2233 output exepected: azert,erty,tytr,jfrd,er,dr,ftdre So I need to delete all ",0." ... How can I proceed in JavaScript? Thanks!
has title: JavaScript Delete String starts with/finish with

http://stackoverflow.com/q/26566226
possible better answer: http://stackoverflow.com/a/26566435
has title: Edit HTML Table Data cell using Jquery
has comment: http://stackoverflow.com/comment/41751686
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41751648
has comment: http://stackoverflow.com/comment/41751877
type: Question
has answer: http://stackoverflow.com/a/26566343
has comment: http://stackoverflow.com/comment/41751720
tagged with: javascript
has comment: http://stackoverflow.com/comment/41751729
tagged with: html-table
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26566435
has comment: http://stackoverflow.com/comment/41751764
has comment: http://stackoverflow.com/comment/41751946
accepted answer: http://stackoverflow.com/a/26566343
tagged with: jquery
has body: I have an HTML table, and each cell of the table will have two data attributes. What I'm trying to do is set a button to switch the value being shown in the table between those two attributes. &lt;table class="table1"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td data-original="A" data-new="B"&gt; A &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; I'm able to set new text and get attributes outside the table, but whenever I try to within the table I keep receiving an error: 'Uncaught -> TypeError: undefined is not a function'. I've been receiving this error for a number of commands $('td').text(), .val(), .attr('td'), .getAttribute(). Am I missing a plugin or something for getting and setting values from tables? ANSWER: I figured out the reason, I was an idiot and didn't mention that there would be numerous TD elements with repeating tags. I eventually used Underscore.js's each method to iterate through them and parts of the below answer to swap the values.

http://stackoverflow.com/a/26556881
answers question: http://stackoverflow.com/q/26554515
has body: I found a solution, not sure if this is the most elegant, but it is producing the correct results now. It looks like when using the strtotime conversion in PHP, it was using the default GMT timezone. In the PHP script, I added the date_default_time_set('UTC') and it works. Hopefully this will help someone in the future. &lt;?php $con = mysql_connect("localhost","root","raspberry"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xbee", $con); $result = mysql_query("SELECT time, temperature FROM data WHERE time &gt;= DATE_SUB(NOW(), INTERVAL 1 HOUR)"); $rows = array(); while($r = mysql_fetch_array($result)) { date_default_timezone_set('UTC'); extract($r); $time = strtotime($r[0]); $time *=1000; $row[0] = $time; $row[1] = $r[1]; array_push($rows,$row); } print json_encode($rows, JSON_NUMERIC_CHECK); mysql_close($con); ?&gt;
type: Answer
score: 0

http://stackoverflow.com/comment/41898993
type: Comment
type: QuestionComment
has text: to check for enter event ,try this $(document).on('keyup','#fool_txt',function(e){ if(e.keyCode == 13) alert("enter"); });
comment on: http://stackoverflow.com/q/26646912
score: 0

http://stackoverflow.com/q/26653824
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41911970
linked to: http://stackoverflow.com/q/15666048
has comment: http://stackoverflow.com/comment/41912772
upvote count: 4
has answer: http://stackoverflow.com/a/26653898
has comment: http://stackoverflow.com/comment/41912129
answer count: 1
downvote count: 0
favorite count: 0
has title: Why should I choose using a Service over a Factory in AngularJS?
tagged with: angularjs
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/15666048
has comment: http://stackoverflow.com/comment/41912413
has comment: http://stackoverflow.com/comment/41912281
tagged with: angularjs-scope
has body: I know this has been asked so many times (Actually, a lot!), but I still can't manage to fully understand what is the main difference between these two. I am aware a service returns a singleton instance of the function provided, and that a factory will simply invoke this function and return its value. But... As I see it, you can do and achieve the same effects using one or another, so how should I choose which one to use? Why should I choose services over factories, or the other way around? Is there a situation where one can do something that the other cannot?
type: Question
has comment: http://stackoverflow.com/comment/41912063
tagged with: angularjs-service

http://stackoverflow.com/comment/41753262
type: Comment
comment on: http://stackoverflow.com/a/26567070
score: 0
has text: Ok I guess `setTimeout` changes what happens then? Edited to try to clarify
type: AnswerComment

http://stackoverflow.com/comment/41668853
score: 1
comment on: http://stackoverflow.com/a/26518918
type: AnswerComment
has text: In JavaScript you can manually set the value of `this` in the function you're invoking, so he would do `handler.call(this, $)`, which will set the value of `this` in `handler` to the current `this` value, and will pass `$` as the first argument. http://jsfiddle.net/0yrx2hpu/3/ I also changed the demo to use `this.id` to get the element's ID. There's no need for jQuery there.
type: Comment

http://stackoverflow.com/q/26649941
has answer: http://stackoverflow.com/a/26652435
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/62006205
type: UnansweredQuestion
score: 6
upvote count: 6
has title: Detecting a Fist with Leap Motion SDK V2
tagged with: math
tagged with: leap-motion
type: Question
has body: I want to check if a Hand in a Leap Motion Frame is currently a Fist. The usually suggested method is to look for hand.grabStrength with a value of 1. The problem is that the value jumps to 1 even with a "Claw-Like" Hand, or anything else with very slightly curled fingers. Another approach would be to check on each finger if it is extended. But this has a similiar issue, Fingers only count as extended if they are completely straight. So even if i check for all fingers to be not extended, the same issue as above occurs (claw-like hands get recognized as grabbed). Combining these two methods also does not solve the issue, which is not surprising given that they both suffer from the same problems. Now, we do have all the bones of each finger available, with positions and everything. But I have no idea where to start with the math to detect if a finger is curled. Basically I have this setup for now: var controller = Leap.loop(function(frame){ if(frame.hands.length&gt;0){ //we only look at the first available hand var hand = frame.hands[0]; //we get the index finger only, but later on we should look at all 5 fingers. var index = hands.fingers[1]; //after that we get the positions of the joints between the bones in a hand //the position of the metacarpal bone (i.e. the base of your hand) var carp = index.carpPosition; //the position of the joint on the knuckle of your hand var mcp = index.mcpPosition; //the position of the following joint, between the proximal and the intermediate bones var pip = index.pipPosition; //the position of the distal bone (the very tip of your finger) var dip = index.dipPosition; //and now we need the angle between each of those positions, which is where i'm stuck } }); So, how do I get the angle between two of those positions (carp to mcp, mcp to pip, pip to dip)? Any ideas?
has answer: http://stackoverflow.com/a/55992040
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41759697
type: QuestionComment
type: Comment
has text: It's a change in V8 actually. And yes, it [has been noticed](https://code.google.com/p/v8/issues/detail?id=3579). )
comment on: http://stackoverflow.com/q/26570626
score: 4

http://stackoverflow.com/comment/41791561
type: Comment
has text: I am going to check that reference, thanks! Gitaar, check my comment on OP
type: AnswerComment
comment on: http://stackoverflow.com/a/26588093
score: 0

http://stackoverflow.com/a/26531820
has body: I think you mean to get the second occurrence of it in the document. Here, you're getting the second child of its parent, and there is none. if (($("body").hasClass("page-node-13"))) { $( ".expanded &gt; ul").eq(1).show(); } jQuery's .eq() method takes a 0-based index of the element in the set to return.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26531752
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26531752
type: Answer
score: 2

http://stackoverflow.com/a/26593698
upvote count: 1
has body: Like so: document.title = 'Text';
downvote count: 0
answers question: http://stackoverflow.com/q/26593481
type: Answer
score: 1

vb6
type: Tag
tags question: http://stackoverflow.com/q/26539312
tag name: vb6

http://stackoverflow.com/comment/41840194
has text: Can you include all resources (JS, images, etc..) correctly? Some gets code 404. I think that problem is that the content isn't completely loaded when you initialize Magnific Popup plugin. The container-fluid could be still empty. Wait until the content of the container-fluid is completely loaded then run your JS as before.
type: Comment
comment on: http://stackoverflow.com/a/26563483
score: 0
type: AnswerComment

http://stackoverflow.com/a/26523829
answers question: http://stackoverflow.com/q/26523690
type: Answer
score: 0
has body: You could try: $text = strip_tags($html); http://www.php.net/manual/en/function.strip-tags.php That will get you quite far. It leaves spaces and returns, but those are easy to remove. $clean = str_replace(array(' ',"\n","\r"),'',$text); http://www.php.net/manual/en/function.str-replace.php Using it on your example gives: TestPageHelloCommunityStackOverflow If you want to leave some spaces intact you could instead try: $clean = trim(implode('',explode("\n",$text))); which results in: Test Page Hello Community Stack Overflow Many variations are possible.

http://stackoverflow.com/q/26633397
type: Question
has body: I'm using express-session Node module for secure session cookies. // Secure session cookie that ensures certain requests require an active session app.use(expressSession({ secret: "wouldn'tyouliketoknow", cookie: { maxAge: new Date(Date.now() + 3600), // 1 hour httpOnly: true, secure: true, // Requires https connection }, // Stores sessions in Mongo DB store: new MongoStore({ host: mongo, port: 27017, db: 'iod', collection: 'sessions' }), // Gets rid of the annoying deprecated messages resave: false, saveUninitialized: false })); This creates a secure session cookie no matter what the request is. I only wanna create a session only for when a user successfully logs in, e.g. a request like this: app.get("/authenticate/:username/:password", function(req, res, next) { ... }); Basically I want the cookie created only when a condition is successfully met within the get handler. How would I go about doing that? Appreciated
tagged with: session
downvote count: 0
tagged with: javascript
tagged with: express
score: 6
has title: Express js session-- Create only for logged in users
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26634507
upvote count: 6
tagged with: node.js
type: AnsweredQuestion
tagged with: cookies
accepted answer: http://stackoverflow.com/a/26634507

http://stackoverflow.com/a/26671049
type: Answer
has comment: http://stackoverflow.com/comment/41942781
score: 0
has comment: http://stackoverflow.com/comment/41943002
answers question: http://stackoverflow.com/q/26670859
has body: Try this: as :visible selector does not work here because Elements with visibility: hidden or opacity: 0 are considered visible, Check this link :visible and same thing apply to :hidden if ($('#hide').css('visibility') == 'visible') { $("#hide").removeClass('show_div'); $("#hide").css('visibility', 'hidden'); } if ($('#Show').css('visibility') == 'hidden') { $("#Show").removeClass('hide_div'); $("#Show").css('visibility', 'visible'); } And you function definition not need to enclose with $(document).ready

http://stackoverflow.com/a/26554678
has body: Your best option would be to use a server side include to put the script on each page. You could put your script into a script file (ad-script.js, the name does not matter) and include it in your pages like this: &lt;script src="ad-file.js"&gt; You could also create a file like ad-file.html and then paste the script into it. Then include it in each page like this: &lt;!--#include file="ad-file.html" --&gt; Also, CSS is a styling language, so it cannot handle scripting.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26554520

http://stackoverflow.com/comment/41783621
comment on: http://stackoverflow.com/a/26559968
type: Comment
score: 0
type: AnswerComment
has text: Sorry, the callback doesn't fire. I set it up [here](http://test.pcardsolution.ch/rfm/) seperately. Do you see what's wrong? thx!

http://stackoverflow.com/q/26596532
possible better answer: http://stackoverflow.com/a/26596661
score: 0
answer count: 2
tagged with: validation
has title: Two functions in one onclick - Javascript
tagged with: regex
has answer: http://stackoverflow.com/a/26596577
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26596661
has body: I'm trying to execute two functions at once validating online form. First form works fine but the second is not being executed. Can anyone point out what is wrong with my code? function both(){ validation(); regex(); } function validation(){ var valid = true; var error = []; if (document.check_in.forename.value == ""){ error.push("First Name"); valid = false; } if (document.check_in.surname.value == ""){ error.push("Surname"); valid = false; } if (valid == false) { alert("Please fill in the following fields:\n" + error.join("\n") + "."); } return valid; } function regex(){ var fnameRE = /^[a-zA-Z]+$/; var valid_reg = true; var error_reg = []; if (!fnameRE.test(document.check_in.forname.value)) { error_reg.push("Please use characters only in First Name field."); valid_reg = false; } else if (valid_reg == false) { alert("Please fill s:\n" + error_reg.join("\n") + "."); } return valid_reg; } And HTML: &lt;form name="check_in" method="POST" action="form.html" onSubmit="return both()"&gt;
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26596577

http://stackoverflow.com/comment/41840916
has text: Talking about js training, you're using the wrong var inside the loop. You clearly want `i` not `num`.
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/26614725
type: Comment

http://stackoverflow.com/comment/41807478
comment on: http://stackoverflow.com/a/26596307
score: 0
type: Comment
has text: I also reported this [as an issue](https://github.com/moment/moment-timezone/issues/144).
type: AnswerComment

http://stackoverflow.com/q/26658989
type: Question
has comment: http://stackoverflow.com/comment/41920205
has title: javascript radio button validate
has answer: http://stackoverflow.com/a/26659185
tagged with: javascript
has comment: http://stackoverflow.com/comment/41920298
possible better answer: http://stackoverflow.com/a/26659185
has answer: http://stackoverflow.com/a/26659216
answer count: 3
has comment: http://stackoverflow.com/comment/41920274
downvote count: 0
has body: hey guys i just try to do some validate for my javascript radio button, but is not work. every time i click submit button it just nothing happened.below is the code. HTML part &lt;form name="FirstPizza"&gt; &lt;td&gt; Style: &lt;br/&gt; &lt;input type="radio" name="style"/&gt; Thin Crust &lt;br /&gt; &lt;input type="radio" name="style" /&gt; Deep Dish &lt;br /&gt; &lt;input type="radio" name="style" /&gt; Sicilian &lt;/td&gt; &lt;/form&gt; Javascript: function submitForm(){ if((!form.style[0].checked) &amp;&amp; (!form.style[1].checked) &amp;&amp; (!form.style[2].checked)) { window.alert("You must have a style") } i should come with a box but nothing happen. Do i miss something?
score: 1
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/26659184
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26659184

http://stackoverflow.com/a/26521133
score: 1
has body: Try $(":contains(NEW ARRIVALS)").is("h1") && $("#tagfilter").remove(); $(function () { $(":contains(NEW ARRIVALS)").is("h1") && $("#tagfilter").remove(); console.log($("#tagfilter").is("*")) }); NEW ARRIVALS All</oa> Bras</oa> Crossbody Jeans Pants Pullovers Satchels Shirts Tops Totes
downvote count: 0
answers question: http://stackoverflow.com/q/26520975
type: Answer
upvote count: 1

http://stackoverflow.com/comment/41948370
type: Comment
has text: I'm agree with your idea. I've try `var myString = 'content:encoded'.replace(/:/g, '\\:');` then `description:$(valeur).find(myString).text()` But it's still not working.
type: AnswerComment
comment on: http://stackoverflow.com/a/26672620
score: 0

http://stackoverflow.com/comment/41907780
comment on: http://stackoverflow.com/q/26652166
score: 4
type: Comment
type: QuestionComment
has text: Scripts can't be removed from the page. You can remove a script element, but the program remains.

http://stackoverflow.com/comment/41738474
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26558783
has text: We can't help you unless you post your "real life" code.

http://stackoverflow.com/a/26654727
answers question: http://stackoverflow.com/q/26654612
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26654612
type: AcceptedAnswer
score: 4
type: Answer
has body: you should be using the change event of the ui select menu look here $( "#speed" ).selectmenu({ change: function( event, ui ) { console.log('change'); } });
downvote count: 0

http://stackoverflow.com/q/26576178
score: -2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26576208
has body: I want to ask can I with javascript and if it can how to do from the likovete href to be converted as text.? Example PAPAPA Papapap to become only the text http://abv.bg http://google.bg` It happens during the opening of the page.
has title: href atribute to text javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/41769980
tagged with: web-scraping
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26576208
type: Question
upvote count: 0

http://stackoverflow.com/comment/41940810
has text: this would be like `$(window).scrollTop() + window.innerHeight >= $(document).height() - BUFFER`... i hope so :D didnt check it, but it should be like this EDIT: you need `>=` because you cant be exact that value scrolling... so your function will trigger while your scrolling.. each scroll event... remember that
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26669815

http://stackoverflow.com/comment/41932139
type: Comment
has text: Perhaps but I'm sure there are many demonstrated simple examples that would better suit the users needs. Such as this post http://stackoverflow.com/questions/4964691/super-simple-email-validation-with-javascript
type: AnswerComment
comment on: http://stackoverflow.com/a/26664960
score: 0

http://stackoverflow.com/comment/50686118
has text: This is an old thread, but I'm still trying to resolve this. I think you are right that I need to get var 'newheight' from the actual iframe content rather than from the body, but I couldn't get this to work using your wrapper div suggestion. Here is the page as it is: www.benjaminbennett.net and here is the page trying to get newheight from a wrapper: www.benjaminbennett.net/index2.html Can you spot any errors? Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/26619999
score: 0
type: Comment

http://stackoverflow.com/comment/41758130
has text: I'm familiar with php, cron jobs, sql and postgresql. The only thing I'm new at is implementing and firing rules. also, how to deal with different variables from different users
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26569527

http://stackoverflow.com/a/26630267
answers question: http://stackoverflow.com/q/26630096
has comment: http://stackoverflow.com/comment/41870104
score: 0
has body: Here's the Updated code: $(document).ready(function () { $("select ").change(function (e) { if ($("#box_g1").val() != "Default") { var ind = $("#box_g1 option:selected").index(); $("#box_g3 option:eq("+ind+")").prop("disabled", true); $("#box_g2 option:eq("+ind+")").prop("disabled", true); $("#box_g2 option").not(":eq("+ind+")").prop("disabled", false); $("#box_g3 option").not(":eq("+ind+")").prop("disabled", false); $("#box_g3, #box_g2").prop("disabled", false); } else { $("#box_g2, #box_g3").prop("disabled", true).val('Disabled'); } }); }); UPDATED FIDDLE
type: Answer

http://stackoverflow.com/comment/41908611
type: Comment
type: QuestionComment
has text: why use radio buttons and not checkboxes? in your situation you would need two radios, one for on and another for off
comment on: http://stackoverflow.com/q/26652645
score: 0

http://stackoverflow.com/q/26610989
tagged with: three.js
has comment: http://stackoverflow.com/comment/41835556
has body: When I add a spot at runtime nothing happens. I have to change the material of the objects to see the light on the modified objects. I added MyMaterial.needsUpdate = true; : it is the default and it changes nothing. I did a simple test with a plane object (PlaneGeometry + MeshPhongMaterial). When I press the "L" key I add a SpotLight ==> nothing happens. Then when I press the "M" key I assign a new material to the plane ==> I see the spot light. I'm missing something but I don't know what... I use three.js r69 WebGLRenderer renderer = new THREE.WebGLRenderer({ antialias: true }); renderer.setClearColor(0xffffff, 1); renderer.setSize(window.innerWidth, window.innerHeight); renderer.shadowMapEnabled = true; renderer.shadowMapType = THREE.PCFSoftShadowMap; renderer.shadowMapWidth = 1024; renderer.shadowMapHeight = 1024; The plane : var planeGeometry = new THREE.PlaneGeometry(60, 20); var planeMaterial = new THREE.MeshPhongMaterial({ color: 0xffffff }); planeMaterial.side = THREE.DoubleSide; planeMaterial.needsUpdate = true; plane = new THREE.Mesh(planeGeometry, planeMaterial); plane.rotation.set(Math.PI / 2.0, 0, 0); plane.receiveShadow = true; plane.castShadow = true; scene.add(plane); Key actions (with THREEx.KeyboardState.js) : function updateKey() { // Add light if (keyboard.pressed("L")) { var spotLight = new THREE.SpotLight(0xffffff, 1.0, 0.0); spotLight.position.set(0, 15, 0); spotLight.angle = 1.39; spotLight.intensity = 0.5; var lightTarget = new THREE.Object3D(); lightTarget.position.set(10,0,0); scene.add(lightTarget); spotLight.target = lightTarget; spotLight.castShadow = true; spotLight.shadowMapWidth = 1024; spotLight.shadowMapHeight = 1024; spotLight.shadowCameraNear = 0.1; spotLight.shadowCameraFar = 50; spotLight.shadowCameraFov = 160; spotLight.shadowCameraVisible = true; scene.add(spotLight); } // change material if (keyboard.pressed("M")) { var mat = new THREE.MeshPhongMaterial({ color: 0x00ff00 }); mat.side = THREE.DoubleSide; plane.material = mat;…
has answer: http://stackoverflow.com/a/26611143
has title: Add light at runtime : materials not updated?
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26611143
has comment: http://stackoverflow.com/comment/41836444
downvote count: 0
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/26533961

http://stackoverflow.com/comment/41925245
type: Comment
comment on: http://stackoverflow.com/a/26660382
score: 1
type: AnswerComment
has text: To add to this answer, I'd suggest putting a master class on the body of this site. You would then repeat the rules you want to reset with the master class prepending all of them. That way this won't affect the site it is pulling from, just the end result of the current one.

variables
tag name: variables
tags question: http://stackoverflow.com/q/26658812
tags question: http://stackoverflow.com/q/26617499
tags question: http://stackoverflow.com/q/26539219
tags question: http://stackoverflow.com/q/26623797
tags question: http://stackoverflow.com/q/26543404
tags question: http://stackoverflow.com/q/26668290
tags question: http://stackoverflow.com/q/26565874
type: Tag
tags question: http://stackoverflow.com/q/26622831
tags question: http://stackoverflow.com/q/26542436
tags question: http://stackoverflow.com/q/26601462
tags question: http://stackoverflow.com/q/26587607
tags question: http://stackoverflow.com/q/26661089
tags question: http://stackoverflow.com/q/26620926
tags question: http://stackoverflow.com/q/26594022
tags question: http://stackoverflow.com/q/26662798
tags question: http://stackoverflow.com/q/26549049

http://stackoverflow.com/comment/41869877
score: 0
type: QuestionComment
type: Comment
has text: I don't think I can do anything about the 404 problem without not using this version of a Google Map.
comment on: http://stackoverflow.com/q/26630650

http://stackoverflow.com/q/26624194
has comment: http://stackoverflow.com/comment/41858252
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Need responsive iframe (div) / fixed aspect ratio / centered horizontally and vertically / that SCALES itself so it's not getting browser-cropped
tagged with: vertical-alignment
has body: Oh man this is frustrating. I always thought I know my way around HTML and CSS but this is driving me crazy! I have a blank black HTML page only containing a 16:9 iframe with the id "content". In this iframe videos and photos with an 16:9 aspect ratio will be shown to the user (this will be an offline application running in Firefox, something like a primitive media player). Everything inside the iframe works (quite an elaborate multimedia experience) everything is fine EXCEPT the placement/dimensions of that "player" iframe on the blank index page! It needs to be centered VERTICALLY with a width of 100% thus touching both sides of the browser window, it needs to be responsive when the browser windows is resized but needs to keep its aspect ratio of course, and most important; it must always be completely visible! Meaning I must NOT be cropped by the browser window! No big deal I reckon with tall 4:3 or 5:4 displays, when centered vertically there will be bars at the top and the bottom of the iframe (the black HTML body) and it won't be cropped anywhere. But kind of a big deal with 16:10 an 16:9 displays since the browser toolbars and the Windows task bar and what have you screw everything up, the aspect ratio isn't really 16:9 or 16:10 anymore when the browser is maximized. So the 16:9 iframe would not be completely visible, it would get cropped a the bottom. (or maybe the user hasn't even maximized the browser and uses the application in an awkward proportioned window with an even more extreme aspect ratio). So the iframe needs to STOP growing responsively before its bottom side gets cropped by the browser window. Never be taller than 100vh. I tried A LOT and in the end I had convoluted div-arrays with a shtload of CSS that accomplished almost everything except the bottom clipping. I am aware of things like "vh" and "vw" and "max-height" and what have you and I tried A LOT. Never got that iframe from being cropped at the bottom when the browser windows gets too lon…
tagged with: iframe
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26624265
linked to: http://stackoverflow.com/q/21645291
possible better answer: http://stackoverflow.com/a/26624269
type: Question
linked to: http://stackoverflow.com/q/396145
has answer: http://stackoverflow.com/a/26624269
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26624265
tagged with: javascript

http://stackoverflow.com/q/26655356
answer count: 1
has comment: http://stackoverflow.com/comment/42029990
has comment: http://stackoverflow.com/comment/41943645
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/26719915
has comment: http://stackoverflow.com/comment/41913516
tagged with: wcf
has body: I'm currently working on a ASP .Net project. I have a search button, and after i press it, a connection to a WCF is made, and then data is retrieved. I want to add a Cancel button, and i want to cancel the search process when i press the Cancel button. The problem is I cant interrupt the postback, so no matter what I do, i cant stop the serach in the middle of the process. I have tried to refresh the page from javascript by calling the follwing: location.reload(true); . But it wont work. It will wait until the postback is finished and then reloads the page. I have also tried to abort the WCF connection after i press Cancel, but the result is the same. Can anyone help me please?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1360253
has comment: http://stackoverflow.com/comment/42024219
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41951050
has answer: http://stackoverflow.com/a/26719915
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41913465
has title: How to cancel a search process in ASP .NET
has comment: http://stackoverflow.com/comment/42014467

http://stackoverflow.com/comment/41958509
type: AnswerComment
has text: How do I deal with the global and local namescope. the BC1click event is accesbile iron router?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26671270

http://stackoverflow.com/comment/41820549
comment on: http://stackoverflow.com/q/26582823
type: Comment
type: QuestionComment
has text: The you would call an API via AJAX that would broker the execution of the script for you and return the output
score: 1

http://stackoverflow.com/comment/41813982
comment on: http://stackoverflow.com/q/26599745
score: 0
has text: The problem with using location.href='www.mydomain.com?get=variable" is that when I do that, it does not pass any of the (many) parameters that builds my query that displays on a table in the resulting page.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26574756
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41768957
answer count: 1
has answer: http://stackoverflow.com/a/26574810
type: UnansweredQuestion
has body: Good day, I found a sweet little javascript that suits my needs but I want to call this function many times on the same page. It is my understanding that for each call to the function needs to be defined with a unique id. I would put this in a loop like this end like this Here is the loop $i=0; if( mysqli_num_rows($result) > 0){ if ($time < $endtime) { echo " "; echo " "; $i++; } What/where should i modify the script to repond to countdown$i ? Thanks
has comment: http://stackoverflow.com/comment/41767149
type: Question
has title: Javascript function inside called in loop

http://stackoverflow.com/comment/41796775
comment on: http://stackoverflow.com/q/26590952
has text: Are you trying to trigger the mouseover event to simulate a hover (and its styling), or are you trying to merely trigger the event?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41983846
type: QuestionComment
comment on: http://stackoverflow.com/q/26568949
has text: No global-ish data, just use the promises return values. Use `Promise.all` for aggregation
score: 0
type: Comment

http://stackoverflow.com/q/26660361
has comment: http://stackoverflow.com/comment/41922885
tagged with: javascript
answer count: 1
tagged with: jquery
tagged with: colorbox
tagged with: backbone.js
has answer: http://stackoverflow.com/a/26660508
has comment: http://stackoverflow.com/comment/41923031
has body: I'm using Handlebars.js for HTML template. Like this: {{#ifCond ImagePath '==' "/images/noneImage.jpg"}} {{else}} {{/ifCond}} ... This is my Colorbox template and its working. If product hasn't a picture, get col-md-8 class. (If has a image, get col-md-16) My Colorbox JS is here: productDetail.bind('onLoaded', function () { productDetailLB = new lightbox({ html: ' ', className: 'product-detail-lightbox', maxWidth: 870, height: 500, onComplete: function () { productDetail.setElement('.productDetail'); productDetail.render(); } }); }); But if product hasn't an image, I want maxWidth: 500 How can I fix it? Thank you.
type: AnsweredQuestion
score: 0
tagged with: handlebars.js
has title: Change Colorbox maxWidth option in Backbone.js?
type: Question
accepted answer: http://stackoverflow.com/a/26660508
has comment: http://stackoverflow.com/comment/41922803

http://stackoverflow.com/a/26621932
score: 0
answers question: http://stackoverflow.com/q/26621744
type: Answer
has body: Edit, Updated Before click at button , default action at input element is to input text ; following click at button , evt.preventDefault() called , text prevented from being input at element. Try var events = ["keydown", "keyup", "keypress"]; $.each($("*"), function (index, elem) { if ($._data(elem, "events") != undefined) { // check `elem` for `keydown`, `keyup`, `keypress` `events` if (new RegExp(events.join("|")).test( Object.keys($._data(elem, "events")))) { $.each(events, function (key, val) { // do stuff at `value` having `events` // call `evt.preventDefault` at `elem` // having `keydown`, `keyup`, `keypress` `events` `events` $(elem).on(val, function(evt) { evt.preventDefault() }) }) } }; }); $(function () { $("input:eq(0)").on("keyup", function (e) { console.log(e); }); $("input:eq(1)").on("keydown", function (e) { console.log(e); }); $("input:eq(2)").on("keypress", function (e) { console.log(e); }); $("button").on("click", function() { var events = ["keydown", "keyup", "keypress"]; $.each($("*"), function (index, elem) { if ($._data(elem, "events") != undefined) { if (new RegExp(events.join("|")).test( Object.keys($._data(elem, "events")))) { $.each(events, function (key, val) { $(elem).on(val, function(evt) { evt.preventDefault() }) }) } }; }); }) }) input:nth-of-type(1) { width : 50px; height : 50px; background : blue; } input:nth-of-type(2) { display : block; width : 50px; height : 50px; background : yellow; } input:nth-of-type(3) { display : block; width : 50px; height : 50px; background : orange; } click to remove keydown, keyup, keypress events below

http://stackoverflow.com/comment/42195394
type: Comment
comment on: http://stackoverflow.com/a/26786316
type: AnswerComment
has text: I change to alternate the var move in each pass (move * -1) and it work, so I award the price.
score: 0

http://stackoverflow.com/q/26531864
has comment: http://stackoverflow.com/comment/41696602
linked to: http://stackoverflow.com/q/20737720
tagged with: reactjs
has body: I need to build a visual editor for an HTML page. It seems that ReactJS is good choice for that. Currently I faced with the following problem: I modeled my data: var Model = { title: 'Hello', description: 'Pellentesque eleifend urna ac purus tempus...', date: new Date().toString() }; And built component which stores its data inside the above structure: var App = React.createClass({ getInitialState: function () { return { value: Model } }, handleMouseEnter: function (event) { $(event.target).css('outline', '1px solid red').attr('contenteditable', true); }, handleMouseLeave: function (event) { var t = $(event.target), v = this.state.value; t.css('outline', 'none').attr('contenteditable', false); v[t.attr('property')] = t.text(); this.setState({value: v}); }, render: function () { var v = this.state.value; return ( {JSON.stringify(this.state)} {v.title} {v.description} {v.date} ); } }); React.renderComponent(<App />, document.getElementById('app')); In that particular case it works. But I want to get rid of onMouseEnter and onMouseLeave properties and to remain only property field. Like that: {JSON.stringify(this.state)} {v.title} {v.description} {v.date} I thought about creating mixin. Then, inside componentDidMount event, attach handlers to all elements with property attribute. But I found no way to achieve this. My question is: Is there a way to traverse tree built by React? I noticed that React Developer Tools (Chrome Extension) can do that. Similar Question: React.js component creating parent child relations and iterating
downvote count: 0
favorite count: 0
score: 9
type: Question
has comment: http://stackoverflow.com/comment/49411024
linked to: http://stackoverflow.com/q/22677931
has title: Is there a way to traverse tree built by React?
has comment: http://stackoverflow.com/comment/41695166
has comment: http://stackoverflow.com/comment/41707901
has comment: http://stackoverflow.com/comment/70184175
has comment: http://stackoverflow.com/comment/48127752
answer count: 1
has comment: http://stackoverflow.com/comment/41702453
has comment: http://stackoverflow.com/comment/41707892
upvote count: 9
has answer: http://stackoverflow.com/a/41489149
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/41735398
comment on: http://stackoverflow.com/a/26557047
has text: Great stuff, I keep seeing piping but this really helps put it into context. It makes sense, let me try it out.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26639133
has body: From what I have read, you want to switch between the tree class values randomly. The jQuery function .addClass() appends class names for the selected elements. So you need to remove old values before setting a new one. $(this).removeClass(randomColors.join(" ")).addClass(randomColors[randomNum]);
answers question: http://stackoverflow.com/q/26638924
has comment: http://stackoverflow.com/comment/41885477
score: 0
type: Answer

http://stackoverflow.com/comment/41812384
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26598506
type: Comment
has text: That's invalid JSON, which is exactly what the OP was not concerned about.

http://stackoverflow.com/comment/41892695
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26640227
type: AnswerComment
has text: i tried it, how do I call the "exposed method" of the service? can you please clarify. thanx again

http://stackoverflow.com/a/49655111
has body: For anyone looking for a solution working with objects, arrays, and nested objects or arrays: // rename function depending on your needs const capitalizeKeys = (obj) =&gt; { const isObject = o =&gt; Object.prototype.toString.apply(o) === '[object Object]' const isArray = o =&gt; Object.prototype.toString.apply(o) === '[object Array]' let transformedObj = isArray(obj) ? [] : {} for (let key in obj) { // replace the following with any transform function const transformedKey = key.replace(/^\w/, (c, _) =&gt; c.toUpperCase()) if (isObject(obj[key]) || isArray(obj[key])) { transformedObj[transformedKey] = capitalizeKeys(obj[key]) } else { transformedObj[transformedKey] = obj[key] } } return transformedObj } const t = { test1: 'hello', test2: { aa: 0, bb: '1', cc: [ 3, '4', 'world'] }, test3: [{ aa: 5, bb: '6' }, { cc: [ 'hello', 'world', 7 ] } ] } console.log(JSON.stringify(capitalizeKeys(t))) (this function is to be adapted since I only had to capitalize the first letter, and there is no need for the helper functions to be nested)
upvote count: 4
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/136496833
answers question: http://stackoverflow.com/q/26629180
type: Answer
has comment: http://stackoverflow.com/comment/105509626

http://stackoverflow.com/comment/41688366
has text: Imho, you should be using jQuery and it's APIs for anything Javascript related as they will ensure you will have cross browser compatibility. The tip is to never try to re-invent what has been already invented and deeply tested. Hope I could help.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26530950

http://stackoverflow.com/a/26516110
has comment: http://stackoverflow.com/comment/41662711
has body: You can add things to the current page using dynamically loaded code. But, you cannot use document.write() to do so. You must add DOM elements directly to the page with methods like .appendChild() or .insertBefore() or set .innerHTML on an existing DOM element. The problem with document.write() is that once the page had been loaded (and thus the document stream closed), any future calls to document.write() will clear the current page and start writing to a new, blank page which general ruins what you are trying to do. And, when you dynamically load code, it will load AFTER the current document has finished loading. document.write() is intended to insert content at the current location in the document stream while the document is in the process of loading which only works when the script is present in the original HTML either as a &lt;script&gt; tag or it can be used on a brand new document (such as the creation of a new iframe or new window).
score: 0
has comment: http://stackoverflow.com/comment/41663840
has comment: http://stackoverflow.com/comment/41663767
type: Answer
has comment: http://stackoverflow.com/comment/41663101
answers question: http://stackoverflow.com/q/26515712
has comment: http://stackoverflow.com/comment/41665261

http://stackoverflow.com/comment/41682853
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26527921
has text: As long as you link to the original answer all is OK.

http://stackoverflow.com/q/26556395
tagged with: javascript
has comment: http://stackoverflow.com/comment/41734755
answer count: 1
accepted answer: http://stackoverflow.com/a/26557068
has body: I am very novice in JS. I am trying to execute following call: this.compiled(_.extend(this.terminals[i], {clazz: 'all'}, obj)); in debug I see that _.extend(this.terminals[i], {clazz: 'all'}, obj) returns Object {terminalId: 3, city: Object, street: "Победы", houseNumber: "5", cost: 1…}city: Objectid: 1name: "Москва"__proto__: Objectclazz: "all"clazz2: ""cost: 1description: "Третий терминал"houseNumber: "5"id: 3mapLat: 55.57834420000001mapLng: 37.59668899999999numberOfCase: 0numberOfEmptyCase: 0numberShow: 0street: "Победы"terminalId: 3timeOfShow: 0__proto__: Object afer in console I see Uncaught ReferenceError: place is not defined VM141:16 (anonymous function) VM141:16 template underscore.js:1269 window.MARC.addTerminalPage.showTerminalsMain. addTerminal:792 renderTerminalsOnMap addTerminal:1144 k jquery-1.8.2.min.js:2 l. fireWith jquery-1.8.2.min.js:2 y jquery-1.8.2.min.js:2send.d What the reason of the problem and how to fix it? Update: more details: message: "place is not defined"stack: "ReferenceError: place is not defined↵ at Object.eval (eval at &lt;anonymous&gt; (http://localhost:9090/resources/js/underscore.js:1261:16), &lt;anonymous&gt;:16:9)↵ at Object._.template.template [as compiled] (http://localhost:9090/resources/js/underscore.js:1269:21)↵ at Object.eval (eval at evaluate (unknown source), &lt;anonymous&gt;:2:6)↵ at Object.InjectedScript._evaluateOn (&lt;anonymous&gt;:732:103)↵ at Object.InjectedScript._evaluateAndWrap (&lt;anonymous&gt;:665:34)↵ at Object.InjectedScript.evaluateOnCallFrame (&lt;anonymous&gt;:783:21)↵ at Object.window.MARC.addTerminalPage.showTerminalsMain (http://localhost:9090/member/createCompany/addTerminal:792:50)↵ at Object.renderTerminalsOnMap [as success] (http://localhost:9090/member/createCompany/addTerminal:1144:37)↵ at p.Callbacks.k (http://localhost:9090/resources/js/jquery-1.8.2.min.js:2:16920)↵ at Object.p.Callbacks.l.fireWith [as resolveWith] (http://localhost:9090/resources/js/jquery-1.8.2.min.js:2:17707)"
tagged with: templates
tagged with: exception
type: AnsweredQuestion
tagged with: underscore.js
score: 0
has answer: http://stackoverflow.com/a/26557068
type: Question
has title: _.extend method returns "place is not defined" in Underscore.js

http://stackoverflow.com/q/26515386
has answer: http://stackoverflow.com/a/26515920
type: AnsweredQuestion
answer count: 1
has title: Wordpress misses css and javascript files
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26515920
tagged with: css
score: 0
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41661206
linked to: http://stackoverflow.com/q/9657098
has body: So I've never worked with wordpress before and my brother said it was way easier then just script it so I thought I'll give it a try. Now I've made a theme and it works, but whenever I try to use a plugin it doesn't have any css or javascript associated with it. I'm probably missing something basic but it's been bothering me the last 6 hours. These are my header and footer files: Header &lt;!doctype html&gt; &lt;html lang="en" class="no-js"&gt; &lt;head&gt; &lt;title&gt;Salon BellaVita&lt;/title&gt; &lt;meta charset="utf-8"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt; &lt;link rel="icon" type="image/ico" href="favicon.ico"/&gt; &lt;!-- Latest compiled and minified CSS --&gt; &lt;!-- &lt;link rel="stylesheet" href="css/bootstrap.css"&gt; &lt;link rel="stylesheet" href="css/bootstrap-theme.css"&gt;--&gt; &lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt; &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:600italic,400,600,700,800' rel='stylesheet' type='text/css'&gt; &lt;link rel="stylesheet" href="&lt;?php bloginfo('stylesheet_url'); ?&gt;" /&gt; &lt;link rel="stylesheet" href="http://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css"&gt; &lt;?PHP function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); ?&gt; &lt;!-- Latest compiled and minified JavaScript --&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- Header ================================================== --&gt; &lt;header class="clearfix header container"&gt; &lt;div class="top-line navbar navbar-fixed-top"&gt; &lt;div class="container"&gt; &lt;ul class="top-menu left"&gt; &lt;li&gt;&lt;a href="?page_id=24"&gt;&lt;i class="icon ion…
tagged with: javascript

http://stackoverflow.com/q/26525029
answer count: 3
has body: I have the following angularJS service define(["angular"], function(Angular) { var dataStorageService = function() { var serviceConstructor = function() { var _getColor = function(color) { return this.config.categoryColorMapping.colors[color]; } } var serviceInstance = new serviceConstructor(); angular.extend(serviceInstance.prototype, { config: { numberOfMessagesDisplayed: 5, maxTitleLength: 48, maxPreambleLength: 140, categoryColorMapping: { colors : { nyheter: '#2B2B2B', sport: '#F59331', underholding: '#F9B00D' }, categories: { nyheter: _getColor('nyheter'), sport: _getColor('sport'), underholding: _getColor('underholding') } } }, get: function(param) { if(this.config.hasOwnProperty(param)) { return this.config[param]; } else { console.warn('Playlist::configService:no "' + param + '" config found'); return false; } }, set: function(param, value) { this.config[param] = value; } }); return serviceInstance; }; return dataStorageService; }); now my goal is to make public the following methods: get set and I want '_getColor' method private but I want to use it within the JSON object config. When I run the code I have "ReferenceError: _getColor is not defined" is it possibie to achievie it this way? (to have _getColor private and use it within the JSON object within angular.extend?)
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26530046
linked to: http://stackoverflow.com/q/16063394
linked to: http://stackoverflow.com/q/21799353
tagged with: extend
type: AnsweredQuestion
has title: Javascript private functions and object.prototype extend
type: Question
possible better answer: http://stackoverflow.com/a/26525076
has answer: http://stackoverflow.com/a/26530046
tagged with: javascript
has answer: http://stackoverflow.com/a/26525076
tagged with: prototype
has answer: http://stackoverflow.com/a/26525147
score: 0

http://stackoverflow.com/q/26586467
linked to: http://stackoverflow.com/q/1452871
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41788279
has answer: http://stackoverflow.com/a/26587859
has title: How to call an appropriate JavaScript method onscroll of a specific iframe scrollbar
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Scenario: I have an html page named main.html with 3 iframes with id's as left, middle and right. We have 3 separate html pages named leftsection.html, middlesection.html and rightsection.html. The left iframe points its src to leftsection.html, middle iframe points to middlesection.html and right iframe pointing to rightsection.html. All the three iframes have their respective scrollbars and data is loaded dynamically using lazy loading. Here I need to invoke method1 on scroll of left iframe, method2 on scroll of middle iframe and method3 onscroll of right iframe. Issue: How to invoke method1 onscroll of left iframe, method2 onscroll of middle iframe and method3 onscroll of right iframe? Note: The scroll bar used is a jQuery scroll bar and not the default scrollbar. Any help would be great.
score: 0
tagged with: jquery-events
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/121748769
type: Comment
score: 1
type: AnswerComment
has text: The other problem with this code is that it will fail to work as expected if a string happens to contain `"::undefined::"`
comment on: http://stackoverflow.com/a/57979882

facebook
tags question: http://stackoverflow.com/q/26562795
tags question: http://stackoverflow.com/q/26557360
tags question: http://stackoverflow.com/q/26593338
tags question: http://stackoverflow.com/q/26630275
tags question: http://stackoverflow.com/q/26645847
type: Tag
tags question: http://stackoverflow.com/q/26542690
tags question: http://stackoverflow.com/q/26586164
tags question: http://stackoverflow.com/q/26580158
tags question: http://stackoverflow.com/q/26642824
tags question: http://stackoverflow.com/q/26640954
tags question: http://stackoverflow.com/q/26564024
tags question: http://stackoverflow.com/q/26645349
tags question: http://stackoverflow.com/q/26527250
tags question: http://stackoverflow.com/q/26639844
tags question: http://stackoverflow.com/q/26527290
tag name: facebook
tags question: http://stackoverflow.com/q/26564945
tags question: http://stackoverflow.com/q/26617690
tags question: http://stackoverflow.com/q/26578395
tags question: http://stackoverflow.com/q/26535753
tags question: http://stackoverflow.com/q/26639644
tags question: http://stackoverflow.com/q/26636960
tags question: http://stackoverflow.com/q/26615153
tags question: http://stackoverflow.com/q/26562967
tags question: http://stackoverflow.com/q/26569463
tags question: http://stackoverflow.com/q/26670860
tags question: http://stackoverflow.com/q/26517452

http://stackoverflow.com/q/26520818
has title: GA GEO Chart cities labeled incorrectly
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/26937691
tagged with: google-visualization
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26937691
type: Question
tagged with: google-maps
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41739298
has body: I have a page that connects to a google analytics account. On the page I have a GEO chart focused on the state of Florida. When I hover over the markers on the map, about half of the markers appear to be correct. The other half are labeled with city names that dont match their marker on the map. Like markers in the middle of the state being labeled as a city in Brazil For examples see the screenshots below. Here's my code that sets up the GEO Charts. Any idea what Im doing wrong? Also here is a jsbin (function(w,d,s,g,js,fjs){ g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(cb){this.q.push(cb);}}; js=d.createElement(s);fjs=d.getElementsByTagName(s)[0]; js.src='https://apis.google.com/js/platform.js'; fjs.parentNode.insertBefore(js,fjs);js.onload=function(){g.load('analytics');}; }(window,document,'script')); gapi.analytics.ready(function() { var CLIENT_ID = '663097249213-ankiu39ud1m7imaa4r5h5mtt4bnpp9b5.apps.googleusercontent.com'; gapi.analytics.auth.authorize({ container: 'auth-button', clientid: CLIENT_ID, }); var viewSelector = new gapi.analytics.ViewSelector({ container: 'view-selector' }); var stateMap = new gapi.analytics.googleCharts.DataChart({ query: { 'dimensions': 'ga:city', 'metrics': 'ga:sessions', 'start-date': '14daysAgo', 'end-date': 'yesterday', }, chart: { type: 'GEO', container: 'state', options: { region: 'US-FL', resolution: 'metros', displayMode: 'markers', width:'100%', height:'100%', keepAspectRatio:true } } }); gapi.analytics.auth.on('success', function(response) { viewSelector.execute(); $('#auth-button').hide(); }); viewSelector.on('change', function(ids) { var newIds = { query: { ids: ids } }; stateMap.set(newIds).execute(); }); }); Here are the request headers: Remote Address:74.125.137.95:443 Request URL:https://content.googleapis.com/analytics/v3/data/ga?start-date=7daysAgo&amp;end-date=yesterday&amp;dimensions=ga%3AuserType&amp;metrics=ga%3Asessions&amp;sort=-ga%3Asessions&amp;max-results=9&amp;ids=ga%3A91097884&amp;output=dat…
has comment: http://stackoverflow.com/comment/41737691
tagged with: google-analytics-api
upvote count: 3
tagged with: google-api

http://stackoverflow.com/a/26581185
has comment: http://stackoverflow.com/comment/41812998
has comment: http://stackoverflow.com/comment/41779259
has body: document.getElementById('username').value = 'MyLogin'; document.getElementById('password').value = password; // I don't care how you get it document.getElementById('loginbutton').click(); Also, why require jQuery if you're going to go all pure JS?
answers question: http://stackoverflow.com/q/26581139
score: 0
has comment: http://stackoverflow.com/comment/41779199
has comment: http://stackoverflow.com/comment/41779242
type: Answer
has comment: http://stackoverflow.com/comment/41791209
has comment: http://stackoverflow.com/comment/41790805
has comment: http://stackoverflow.com/comment/41779179

http://stackoverflow.com/comment/41869010
type: QuestionComment
comment on: http://stackoverflow.com/q/26630144
has text: for example you can override quote_params method to contain params.permit(:name, :email, :json, :uid)
score: 1
type: Comment

http://stackoverflow.com/a/26558608
upvote count: 2
has body: The aggregation framework does not have the string manipulation operators necessary to dissect the string content and break this up into the key/value pairs you need for this operation. The only string manipulation currently available is $substr, which is not going to help unless you are dealing with fixed length data. So the only server side way to do this at present is with mapReduce since you can just the JavaScript functions available to do the right manipulation. Something like this: For the mapper: function() { var obj = {}; this.query.split(/,;/).forEach(function(item) { var temp = item.split(/=/); obj[temp[0]] = temp[1]; }); if (obj.hasOwnProperty('name') emit(obj.name,this.count); } And the reducer: function(key,values) { return Array.sum( values ); } Which is the basic structure of the JavaScript functions required to split out the "name" parameters and use them as the "keys" for aggregation, or general counting of the "key" occurrences. So the aggregation framework cannot execute any JavaScript itself, as it just runs native code operators over the data. It would be a good idea though to look at changing how your data is stored, so that the elements are broken down into a an "object" representation rather than a string when the documents are inserted to MongoDB. This allows native query forms that don't rely on JavaScript execution to manipulate the data: [{ "url": "http://example.com", "query": { "name": "blah", "another_param": "bleh" }, "count": 3 }, { "url": "http://example.com", "query": { "name": "blah", "another_param": "xyz" }, "count": 4 }, { "url": "http://example.com", "query": { "name": "another_name", "another_param": "bleh" }, "count": 3 }] This makes a $group pipeline stage quite simple as the data is now organized in a form that can be natively processed: { "$match": { "query.name": { "$exists": true } }, { "$group": { "_id": "$query.name", "count": { "$sum": "$count" } }} So use mapReduce for now, but ultimately consider changing your rec…
has comment: http://stackoverflow.com/comment/41809909
accepted answer of: http://stackoverflow.com/q/26558284
answers question: http://stackoverflow.com/q/26558284
has comment: http://stackoverflow.com/comment/41805290
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41811986
has comment: http://stackoverflow.com/comment/41750068
type: Answer

http://stackoverflow.com/q/26627914
has comment: http://stackoverflow.com/comment/41864987
type: Question
type: AnsweredQuestion
score: 1
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26628071
accepted answer: http://stackoverflow.com/a/26628071
has title: jQuery - how do you select the previous chosen Select option?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41864961
downvote count: 0
has body: Given this select element: 1 3 3 And I select the option 1 first, how do I retrieve the value of 1 after I choose 2 in this select dropdown using jQuery?

http://stackoverflow.com/a/28727569
score: 1
upvote count: 1
type: Answer
has body: I'm making my own framework and I ran into the same situation as you. So I wrote a module that performs dynamic template urls. If no element or default templateUrl is defined, it stores the inner content of the element as string within the $templateCache service named with a random generated key, then if you set it dynamically as the directive's templateUrl property, the content of its element will be the same as you wrote initially. I don't know if this is a perfect solution but is enough for me: The module (sorry, I cannot host it, Information Security of my work blocks all) (function(){ var moduleName = "templateManager", serviceName = "TemplateManager", NAMES = { ATTR_NAME: "templateUrl", TEMPLATE: "templateUrl", }; angular.module(moduleName, []) .provider( serviceName, function(){ function randomSelector(){ var str = ""; for(var i = 0; i < 10; i++) str += String.fromCharCode(Math.floor(Math.random() * (91-65) + 65)); return str + "_" + String(Math.random().toFixed(5)).split(".")[1]; } this.$get = ["$templateCache",function($templateCache){ var serv = {}; //Private function noTpl(contents){ var selector = randomSelector(); $templateCache.put(selector, contents); return selector; } //Public serv[NAMES.TEMPLATE] = function(templateUrl){ return function(tElem, tAttrs){ var defaultTpl = angular.isDefined(templateUrl) ? (angular.isFunction(templateUrl) ? templateUrl.apply(this,arguments) : templateUrl) : undefined, elementTpl = angular.isDefined(tAttrs[NAMES.ATTR_NAME]) ? tAttrs[NAMES.ATTR_NAME] : undefined; return elementTpl || defaultTpl || noTpl(tElem.html()); } } return serv; }] } ); })(); An use case Content!! Content!! Content!! As you can see, this module always uses a templateUrl defined by default, by the user or from the cache that contains the original content. I Hope I helped and sorry if my english is not good.
answers question: http://stackoverflow.com/q/26529020
downvote count: 0

ng-options
tags question: http://stackoverflow.com/q/26644164
type: Tag
tag name: ng-options
tags question: http://stackoverflow.com/q/26613236
tags question: http://stackoverflow.com/q/26543980

http://stackoverflow.com/a/26548326
type: Answer
has comment: http://stackoverflow.com/comment/47978861
downvote count: 0
score: 1
has body: Seems like it works now. The problem was that I was using my own script first, then I was loading jquery and bootstrap.
answers question: http://stackoverflow.com/q/26539747
upvote count: 1

http://stackoverflow.com/comment/41944555
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26672117
has text: Pls see my edit. I have attached screenshots.

http://stackoverflow.com/q/26601877
favorite count: 0
has comment: http://stackoverflow.com/comment/41861557
tagged with: ruby
has comment: http://stackoverflow.com/comment/41860755
has comment: http://stackoverflow.com/comment/41861504
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41858620
downvote count: 0
has answer: http://stackoverflow.com/a/26604414
accepted answer: http://stackoverflow.com/a/26604414
score: 1
has comment: http://stackoverflow.com/comment/41861418
has comment: http://stackoverflow.com/comment/41861316
has body: I'm setting up the API documentation for a project, and wanted to know what the best tool for the job is.. The site is completely static EXCEPT for the API keys, which I'd like to include in the code examples depending on the user (the user gets their own API key if they're logged in). How can I achieve this, while maintaining a static site (I'm using a static-site generator, middleman).
has comment: http://stackoverflow.com/comment/41861673
has comment: http://stackoverflow.com/comment/41860825
type: Question
linked to: http://stackoverflow.com/q/2870371
has comment: http://stackoverflow.com/comment/41861622
has title: Static API Documentation with embedded API key
tagged with: javascript
has comment: http://stackoverflow.com/comment/41861265
tagged with: jquery
has comment: http://stackoverflow.com/comment/41861451
tagged with: ajax
upvote count: 1
answer count: 1

http://stackoverflow.com/q/26635914
has answer: http://stackoverflow.com/a/27552044
tagged with: javascript
score: 4
tagged with: sankey-diagram
has title: in Sankey diagram: make paths "as short as possible"?
downvote count: 0
has body: I am interested in using Sankey diagrams, like http://bost.ocks.org/mike/sankey/ Specifically, I am using the block that enables cycles: http://bl.ocks.org/cfergus/3956043 But, each "start-node" is drawn on the far left and each "end-node" drawn on the far right. Ascii example: |A ----&gt; B ----&gt; C ----&gt; D| |E-------------&gt; C | &lt;-- starts far left |F --------------------&gt; D| &lt;-- starts far left |G ----&gt; B ------------&gt; H| &lt;-- finishes far right What I prefer (in my specific case) is to keep the paths as short as possible, e.g.: |A ----&gt; B ----&gt; C ----&gt; D| | E-----&gt; C | &lt;-- don't start far left | F ----&gt; D| &lt;-- don't start far left |G ----&gt; B ----&gt; H | &lt;-- don't finish far right Any d3js experts that know if this is easy to modify in the position calculation algorithm? At the moment I manually move the nodes after they have been rendered. from: to:
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
accepted answer: http://stackoverflow.com/a/27552044
tagged with: d3.js
has answer: http://stackoverflow.com/a/26671420
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26671420
type: Question
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/41887243
has text: If you can't do it in the admin console you probably won't be able to do it using an API.
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26639911

http://stackoverflow.com/comment/41926763
type: AnswerComment
comment on: http://stackoverflow.com/a/26662411
type: Comment
has text: You seem to confuse closures with scope.
score: 0

http://stackoverflow.com/a/26538353
has comment: http://stackoverflow.com/comment/41702672
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26537960
upvote count: 1
type: Answer
has body: Ok I'm not exactly sure what other advantages from the Metro UI you're getting, but here's a simple fiddle that doesn't need your directive at all to capture what you had in your first fiddle that works for me. http://jsfiddle.net/f0sph1vp/7/ x The second fiddle you posted, http://jsfiddle.net/gary_stenstrom/xcx2y8uk/64/, is pretty weird to me, because it doesn't seem like you want the second input box to be the same model as your first one. It kind of seems like you want the clicking of the x button to assign the value of the first input to the second. Which makes a lot more sense. X</button

http://stackoverflow.com/q/26594202
tagged with: php
has comment: http://stackoverflow.com/comment/41803090
has body: Why smarty variable doesn't have value in my code when I tested on /nl/nl/ address? Code: {php} global $country; global $lang; $this-&gt;assign('curLang',$lang); $this-&gt;assign('curCountry',$country); {/php} {if $curLang == "nl" &amp;&amp; ($curCountry == "nl" || $curCountry == "be")} {literal} javascript code {/literal} {assign name="test" value="1"} {/if} {$curCountry} &lt;!-- nl --&gt; {$curLang} &lt;!-- nl --&gt; {$test} &lt;!-- Empty value --&gt;
type: AnsweredQuestion
tagged with: smarty
type: Question
has answer: http://stackoverflow.com/a/26594549
has comment: http://stackoverflow.com/comment/41803476
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26594549
has title: Empty smarty variable?

http://stackoverflow.com/q/26670279
answer count: 1
tagged with: arrays
tagged with: jsp
has body: &lt;script type="text/javascript"&gt; video_count =0; videoPlayer = document.getElementById("ss"); video=document.getElementById("myVideo"); function run() { video_count++; if (video_count == 3) video_count = 1; videoPlayer.setAttribute("src","&lt;%=newdirectory+files[i]%&gt;"); video.load(); video.play(); } &lt;/script&gt; Is that possible to pass the video_count++ variable to jsp array file[i] in function run() ?? because all my video files are store in jsp array and I would like to use js video_count++ to load the next video in my array. Thanks
has answer: http://stackoverflow.com/a/26670338
has title: Pass a variable from JavaScript to jsp array
type: UnansweredQuestion
score: 0
tagged with: javascript
type: Question

http://stackoverflow.com/q/26518604
score: 0
type: Question
tagged with: polymer
has title: Trouble using dispatchEvent using Polymer and Firefox
has answer: http://stackoverflow.com/a/26695159
answer count: 3
tagged with: firefox
possible better answer: http://stackoverflow.com/a/26518922
tagged with: javascript
has answer: http://stackoverflow.com/a/26518922
accepted answer: http://stackoverflow.com/a/26695159
has answer: http://stackoverflow.com/a/26537384
has body: I've run into a problem using the javascript function dispatchEvent in a web app using Polymer. My code runs fine in Chrome, but in Firefox (v31 and v33), I receive the following error: TypeError: Argument 1 of EventTarget.dispatchEvent does not implement interface Event. Here is the code that generates the error: button.dispatchEvent(new CustomEvent('chosen', {'detail': value})); Alternatively, I also tried: var event = new Event('chosen'); event.detail = value; button.dispatchEvent(event); The result was the same: this code worked fine in Chrome, but it halted execution with the same error message when it reached the dispatchEvent. I am pretty confident that this code should work in Firefox (see https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events), and indeed, this same code works fine in a non-polymer scenario in Firefox. (In other words, if I try creating and dispatching events in either manner without any of the polymer imports / scripts, it works fine.) My best guess is that something in the Polymer framework (platform.js or polymer.js) overrides some of the built-ins around events. (I am using version 0.3.4.) I've tried searching extensively, but I haven't been able to find anyone with quite the same problem. I did find some people who had the same error message, but they were reporting it using other software (e.g., Selenium). Polymer does supply a "fire" method that is a wrapper around the traditional event dispatching, so I will look into using that. However, I thought I would reach out to the StackOverflow community to see if anyone had any thoughts. Thanks in advance! -----------Follow-up------------ Thanks for those who wrote in. No luck getting it to work so far, but I have created a simple repro that illustrates the issue. Here is the code for my html file. Click Regardless of whether I use the button.fire or the button.dispatchEvent, the code succeeds in chrome and fails in firefox. Chrome result (either codeline)…
has comment: http://stackoverflow.com/comment/41696292
has comment: http://stackoverflow.com/comment/41669142
type: AnsweredQuestion

http://stackoverflow.com/comment/41765509
type: QuestionComment
comment on: http://stackoverflow.com/q/26573810
score: 0
has text: @plbsam I don't get any error, but the content is loaded partially, as the full content is loaded via ajax after sometime
type: Comment

http://stackoverflow.com/q/26582354
has comment: http://stackoverflow.com/comment/41780941
has answer: http://stackoverflow.com/a/26582565
type: Question
accepted answer: http://stackoverflow.com/a/26582565
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41781182
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41781025
has comment: http://stackoverflow.com/comment/41781033
has body: I have a dynamically-populated select box which is intended to be used for displaying information about a single option. The problem I've got is that it doesn't seem to fire a :selected event in the browser when I click on any of the options. I won't know in the future what the information is, but shouldn't a .val() (in theory) get the value of the options which have been dynamically populated? So far it doesn't seem to be working. The original HTML: The options are populated with the following javascript (and it works great, the JSON data seems to be a breeze to work with and I'm happy to start using it): function popuList(){ // Populates the SELECT element with options from the JSON file. var url = "/calls/sessions.php"; var list = ''; $.getJSON(url,'',function(jdata,oSucc,jqXHR){ $.each(jdata,function(i,session){ $.each(session,function(n,data){ list += "\n" + ' '+data.name+' '; }); }); $("#activeList").html(list); }); } The problem is that I can't seem to grab the value of the selected option so that I can dynamically update other elements on the page. I've tried .val() and :selected and even putting the list items into a global array variable... nothing seems to be working, and I'm not really sure why. When I inspect the elements in the browser (FF and Chrome), the options are there, but none of them have a selected attribute when I click them. The code seems not to care whether any of them are selected or not. That being the case, how would I detect interaction with the list? In the inspector the HTML looks something like: 00000000003 00000000002 00000000001 For future reference (and as a reminder) I'm not going to necessarily know the values. Is what I want to do even possible? The above function is called once each pageload from the $(document).ready(function(){} callback. If it matters, jQuery 1.11.1 is the version in use. The browsers are all fully up to date. I'm using Notepad++ for editing. Not sure what other info would be helpful.
upvote count: 1
has comment: http://stackoverflow.com/comment/41781572
has comment: http://stackoverflow.com/comment/41780983
has title: Selecting an option on a dynamically-populated select element in jQuery/AJAX
possible better answer: http://stackoverflow.com/a/26582461
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26582461
has comment: http://stackoverflow.com/comment/41780962
score: 1
has answer: http://stackoverflow.com/a/26582802

http://stackoverflow.com/q/26581978
has body: I want to create a simple html form with different inputs element. The questions and the possible choices for each question are stored in a database. The idea is to render form and child input elements with PHP, so a simple PHP function will take care of typesetting according to whether is type="text" or type="radio": &lt;form&gt; First name: &lt;input id="1" type="text" name="firstname"&gt; Last name: &lt;input id="2" type="text" name="lastname"&gt; &lt;input id="3" type="radio" name="sex" value="male"&gt;Male &lt;input id="4" type="radio" name="sex" value="female"&gt;Female &lt;div id="div_5_optional"&gt; Maiden name: &lt;input id="5" type="text" name="maidenname" disabled="disabled"&gt; &lt;/div&gt; &lt;/form&gt; Now, by default input id="5" will be disabled. But I also want to remove it. I am able to get it with JavaScript by loading in my header (although I can't guarantee the move to be smart) &lt;script&gt; $(document).ready(function(){ $("[disabled=disabled]").parent().remove(); }); &lt;/script&gt; So far so good, the div element is removed. Yet, I want to put the element back and in the original position when the radio button corresponding to Female is clicked. I added in the header, just below the previous js script this &lt;script type='text/javascript' src='scripts/enable_elements.js'&gt;&lt;/script&gt; which loads this function // enable_elements.js $(document).ready(function(){ $('#4').click(function(){ $( '#5' ).prop( "disabled", false ); }); }); Yet the all thing doesn't work. I guess the problem could be the my ready(function)s are only loaded once at the beginning and then put to sleep? Should I structure my form differently?
type: Question
accepted answer: http://stackoverflow.com/a/26582088
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41780351
has comment: http://stackoverflow.com/comment/41780363
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26582032
possible better answer: http://stackoverflow.com/a/26582032
has answer: http://stackoverflow.com/a/26582088
tagged with: php
has title: Best approach to add and remove elements from an html form
has comment: http://stackoverflow.com/comment/41780336
type: AnsweredQuestion

mysqli
tags question: http://stackoverflow.com/q/26551393
type: Tag
tags question: http://stackoverflow.com/q/26634706
tags question: http://stackoverflow.com/q/26645297
tags question: http://stackoverflow.com/q/26520899
tag name: mysqli

http://stackoverflow.com/q/26582330
upvote count: 1
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26582777
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/26582806
downvote count: 0
score: 1
type: Question
has title: Use the same bootstrap modal to both add a new object and edit that object
tagged with: javascript
tagged with: jquery
has body: I have a Rails app where I'm adding new objects to a parent Object using Bootstrap modals and Jquery. This now works fine for the 4 different child objects I wish to add (I have 4 separate modals rendered on the parent object page). I'd like to re-use the same modals to render the edit form (rather than the new form), without adding 4 extra (mostly identical) modals to my page. Is this possible? Modal example: ×Close Add new company <%= render 'companies/modal' %> Companies/Modal code: <%= form_for(@company, :html => {role: :form, 'data-model' => 'company'}, remote: true) do |f| %> <% if @company.errors.any? %> <%= pluralize(@company.errors.count, "error") %> prohibited this company from being saved: <% @company.errors.full_messages.each do |message| %> <%= message %> <% end %> <% end %> <%= f.label :company_name, :class => "control-label" %> <%= f.text_field :company_name, :class => 'form-control' %> <%= f.check_box :existing_customer %> Existing Customer? <div id="organization_id" data-organizationid="<%= @current_user.organization.id %>"> <%= f.hidden_field :organization_id%> <%= f.submit "Save", class: "btn btn-sm btn-success" %> <% end %> Current Javascript: $(document).ready(function () { $('#competitor_modal').on('show'); $('.modal').on('shown.bs.modal', function() { $("#competitor_competitor_name").focus(); var Org; Org = $('#organization_id').attr('data-organizationid'); //pass the organization_id to the hidden text box $('#competitor_organization_id').val(Org); }); }); $(document).ready(function(){ $(document).bind('ajaxError', 'form#new_competitor', function(event, jqxhr, settings, exception){ // note: jqxhr.responseJSON undefined, parsing responseText instead $(event.data).render_form_errors( $.parseJSON(jqxhr.responseText) ); }); }); I presume I'd have to change the Javascript used in Organization.js so that it could determine whether the request has come from the "Add new company" button or whether it's come from the "Edit company" button. Is this best…
answer count: 2

http://stackoverflow.com/a/26661033
answers question: http://stackoverflow.com/q/26661002
score: 5
has body: You need to: quote all your string literals put a + between each pair of strings you want to concatenate use a &lt;br&gt; element instead of a literal new line (since a new line in HTML doesn't cause a line break to be rendered) Such: "Second Value Entered: " + num2 + "&lt;br&gt;" + That said, this looks more like a job for dl/dt/dd than a paragraph with line breaks in it.
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/comment/41690394
has text: because it is adding the click handler to each individual close button, and removing the click handler from event itself
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26530076

http://stackoverflow.com/a/26584525
answers question: http://stackoverflow.com/q/26584332
has comment: http://stackoverflow.com/comment/41786130
downvote count: 0
has body: It seems strtotime() function is including multiple times.either you are loading utilsController.php' multiple times. In that case use require_once. Otherwise check another file has same function strtotime() and you are including it at your current script.Make sure strtotime() function included once.
has comment: http://stackoverflow.com/comment/41785367
type: Answer
has comment: http://stackoverflow.com/comment/41786478
score: 1
upvote count: 1

http://stackoverflow.com/comment/41855365
has text: hi..please elaborate about pdfurl ! but here iam just creating pdf and send to outputstream..in this, what should be the urlpdf..my code is::: BufferedOutputStream output=genratepdf(facesContext, externalContext, response, object); output.flush(); facesContext.responseComplete();
comment on: http://stackoverflow.com/a/26611073
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41856975
score: 0
comment on: http://stackoverflow.com/q/26623431
type: Comment
type: QuestionComment
has text: @SonalPM Your proposed edit has an extra script tag with what appears to be unrelated code. Are you certain the OP wants you to do that?

http://stackoverflow.com/comment/46858664
comment on: http://stackoverflow.com/a/26654814
score: 0
type: AnswerComment
has text: Aural style sheets are for screenreaders and other accessibility tools http://stackoverflow.com/a/6607718/873565
type: Comment

http://stackoverflow.com/comment/41888074
type: QuestionComment
comment on: http://stackoverflow.com/q/26640361
has text: It took me 5 years to realize ;)... thanks @mikehomme
score: 0
type: Comment

http://stackoverflow.com/q/26670033
type: Question
has answer: http://stackoverflow.com/a/26672032
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am using CSS buttons to toggle map layers in a leaflet.js environment. I have 25 layers. I would like to add 1 more button that will toggle ALL layers on/off. Here is the code I use for toggling the layers. 1 2 3 4 5 6 7 25
type: UnansweredQuestion
has title: Toggle all layers in Leaflet
tagged with: leaflet

http://stackoverflow.com/comment/41874079
comment on: http://stackoverflow.com/a/26530191
type: Comment
has text: Well... Nice story, but I don't think Mühlhausen/Münchhausen are related ;). If you check the results, it returns *Germany*. And that point is right in the middle of Germany. Why doesn't it return *ZERO_RESULTS* I can't tell though.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41838675
score: 0
has text: @MikeWillis errors are coming because of two functions buddy
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26613048

http://stackoverflow.com/a/26662452
has comment: http://stackoverflow.com/comment/41926964
has comment: http://stackoverflow.com/comment/41934052
has body: menuSelect.options[menuSelect.selectedIndex].value returns a string, which means that the + operator will be performing string concatenation rather than addition. Cast the value to a Number before trying to do arithmetic. var carValue = +menuSelect.options[menuSelect.selectedIndex].value; // ^ unary + operator casts a string to a number
downvote count: 0
score: 4
upvote count: 4
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41926945
answers question: http://stackoverflow.com/q/26662347
has comment: http://stackoverflow.com/comment/41927795
accepted answer of: http://stackoverflow.com/q/26662347
type: Answer

http://stackoverflow.com/comment/41766904
has text: Looking for some stuff like this ? http://stackoverflow.com/questions/3984287/how-to-show-alternate-image-if-source-image-is-not-found-onerror-working-in-ie
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26574618

http://stackoverflow.com/comment/41755777
type: AnswerComment
type: Comment
has text: cleanup your comment replies and search for "ajax range", it's just one more step on a normal ajax call...
comment on: http://stackoverflow.com/a/26568171
score: 0

http://stackoverflow.com/q/26522976
possible better answer: http://stackoverflow.com/a/26523115
has answer: http://stackoverflow.com/a/26523058
tagged with: javascript
answer count: 2
has title: understanding routes and templates html in angularjs, simples example possible
downvote count: 0
has body: I'm trying to embed angularjs into my existing asp.net mvc4 app. (Views/Shared/) _Layout.cshtml @RenderBody() /js/main.js var app = angular.module("myApp", []); module.config(function ($routeProvider) { $routeProvider.when("/topics", { controller: "topicsController", templateUrl: "/js/templates/topicsView.html" }); $routeProvider.otherwise({ redirectTo: "/" }); }); app.controller("topicsController", function ($scope) { $scope.testData = "some dummy data"; }); /js/templates/topicsView.html topics template view, dummy object {{ testData }} and inside /Views/Home/Index.cshtml I'm trying to navigate to /topics using #/topics url but nothing is rendered (blank page, not 404), not even h1 title from templates/topicsView.html What I'm doing wrong?
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26523058
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26523115
type: Question
tagged with: asp.net-mvc

http://stackoverflow.com/q/26550397
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41749005
tagged with: database
type: Question
has answer: http://stackoverflow.com/a/26553228
has comment: http://stackoverflow.com/comment/41723100
has body: I am making a node.js application that uses this database manager: https://github.com/louischatriot/nedb. I have a database containing a message like this: {"mes":"hi","username":"hello","number":1,"date":"Fri Oct 24 2014 10:42:53 GMT-0400 (Eastern Daylight Time)","_id":"Zzi6OQVnoSXKYlHR"} I want it to delete all messages older than 1 day. So I made something else like this: setInterval(function(){ db.find({}).sort({ number: -1 }).exec(function (err, docs) { var arrayLength = docs.length; tDate = new Date(); tDate = tDate.toString(); for (var i = 0; i &lt; arrayLength; i++) { } }); },5000); Which every 5 seconds goes through every entry in the database. So how would I, using the database entries, could check if the oldest one is older than 1 day?
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41723735
answer count: 1
accepted answer: http://stackoverflow.com/a/26553228
has comment: http://stackoverflow.com/comment/41723234
has comment: http://stackoverflow.com/comment/41727520
has title: How to check if database entry is older than 1 day in javascript

http://stackoverflow.com/comment/41916297
comment on: http://stackoverflow.com/q/26633129
score: 0
type: Comment
type: QuestionComment
has text: Yes that was the conclusion i came to in the end. Thanks for the reply!

http://stackoverflow.com/a/26628154
type: Answer
answers question: http://stackoverflow.com/q/26610423
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26610423
score: 1
upvote count: 1
type: AcceptedAnswer
has body: as othree explains in his jQuery rtl scroll type plugin there are 3 main implementations for horizontal scrolling when dir is set to rtl: WebKit, Firefox/Opera and IE the difference between these implementations is as follows: because you can't use jQuery I've modified othree code in this plunker and it works fine in chrome, firefox and IE11

http://stackoverflow.com/a/26658680
answers question: http://stackoverflow.com/q/26658254
type: Answer
score: 1
upvote count: 1
has body: It looks like you can just do moment().locale('us').weekday(0) as of version 2.1.0 http://momentjs.com/docs/#/get-set/weekday/
has comment: http://stackoverflow.com/comment/119288930
has comment: http://stackoverflow.com/comment/41940538
downvote count: 0

webshim
tags question: http://stackoverflow.com/q/26534461
tag name: webshim
type: Tag

http://stackoverflow.com/q/26653771
has comment: http://stackoverflow.com/comment/41910585
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/41914351
has title: knockout.js checked not firing subscription in Android 4.2 browser
accepted answer: http://stackoverflow.com/a/26691516
linked to: http://stackoverflow.com/q/10127001
score: 0
has comment: http://stackoverflow.com/comment/41911156
answer count: 1
tagged with: javascript
has body: The following radio button doesnt fire the subscription for the button to be enabled on the Android browser. It works on all desktops/browsers/OS and even iPhone but not Android. Am I missing something? It works if the input element is switched to a checkbox. I am using knockout.js 3.2. Submit function SubmitTask(classSubmission, options) { var self = this; self.accept = ko.observable(false); }
has comment: http://stackoverflow.com/comment/41911343
tagged with: android
has comment: http://stackoverflow.com/comment/41914560
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26691516

http://stackoverflow.com/a/26544440
answers question: http://stackoverflow.com/q/26543014
type: Answer
has body: You have a variety of prompts elements customized using jquery . I found the below one most useful. Have look at Alertify plugin Prompt window can be easily configured as below after adding the required css and js files to your project , // confirm dialog alertify.confirm("Message", function (e) { if (e) { // user clicked "ok" } else { // user clicked "cancel" } });
score: 0

http://stackoverflow.com/a/26547300
has body: As for Highcharts you can remove axis using Axis.remove - API. If you want to hide it from view you are doing it correctly if xAxis: { ... lineWidth: 0, minorGridLineWidth: 0, lineColor: 'transparent', ... labels: { enabled: false }, minorTickLength: 0, tickLength: 0 } source Live example, like jsFiddle would be very helpful to determinate origin of the unwanted grey line.
has comment: http://stackoverflow.com/comment/41729133
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26542939
answers question: http://stackoverflow.com/q/26542939

http://stackoverflow.com/comment/41925663
comment on: http://stackoverflow.com/q/26661642
type: Comment
type: QuestionComment
has text: Yes there is: Recursively iterate over the structure and make the modification.
score: 0

http://stackoverflow.com/q/26574493
has comment: http://stackoverflow.com/comment/41766902
answer count: 1
has title: Angular module error
has comment: http://stackoverflow.com/comment/41767503
has comment: http://stackoverflow.com/comment/41767560
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41766801
has body: i try to write an angular app using best code practice and i got to this: index.html file contain : Hrs app Main file: app.js: angular.module('home', []); angular.module('av', []); // Declare app level module which depends on filters, and services angular.module('hrsApp', [ 'hrsApp.controllers', 'hrsApp.services', 'hrsApp.directives', 'hrsApp.filters', // AngularJS 'ngRoute', // All modules are being loaded here but EMPTY - they will be filled with controllers and functionality 'home', 'av' ]); // configure our routes angular.module('hrsApp').config([ '$routeProvider', function ($routeProvider) { 'use strict'; $routeProvider // route for the home page .when('/', { templateUrl: 'views/home.html', controller: 'homeCtrl' }) // route for the about page .when('/av', { templateUrl: 'views/av.html', controller: 'avCtrl' }) // route for the contact page .otherwise({ redirectTo: '/' }); } ]); Then i added the home controller: /*global angular*/ angular.module('home').controller('homeCtrl', [ '$scope', function ($scope) { 'use strict'; $scope._init = function () { $scope.message = "welcome to Home Ctrl"; }; // DESTRUCTOR $scope.$on('$destroy', function () { }); // Run constructor $scope._init(); $scope.log('info', '[HomeCtrl] initialized'); } ]); and home template that for the moment contain only a binding to the message variable: {{message}} When i try to run the application i got : Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.0/$injector/modulerr?p0=hrsApp&p1=Error%3A%…googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.3.0%2Fangular.min.js%3A18%3A3) angular.js:38 Any idea what i do wrong?
has comment: http://stackoverflow.com/comment/41767423
has comment: http://stackoverflow.com/comment/41767117
type: Question
has answer: http://stackoverflow.com/a/26576187
tagged with: javascript
has comment: http://stackoverflow.com/comment/41766727
score: 0

http://stackoverflow.com/q/26530895
has answer: http://stackoverflow.com/a/26531125
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
has comment: http://stackoverflow.com/comment/41688242
accepted answer: http://stackoverflow.com/a/26531125
has body: I have a script that I have created in jQuery, which works how I would like it to, however I just know there will be a simpler, more dynamic way of doing the following. I was wondering whether someone could help me out? Ok, so my HTML structure is: Option for 1 go here Option for 2 go here Please note, the above is duplicated ten times, with just the class name changing. I can easily change the markup if it would be easier to include numbers. Then my jQuery, which can be condensed and made dynamic: $(document).ready(function() { // Grid Layout - Number of Categories // var number_of_categories = $('.number_of_categories_list'); if ( $(number_of_categories).val() == '1' ) { $('.one_category').show(); } else if ( $(number_of_categories).val() == '2' ) { $('.one_category').show(); $('.two_category').show(); } else if ( $(number_of_categories).val() == '3' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); } else if ( $(number_of_categories).val() == '4' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); $('.four_category').show(); } else if ( $(number_of_categories).val() == '5' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); $('.four_category').show(); $('.five_category').show(); } else if ( $(number_of_categories).val() == '6' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); $('.four_category').show(); $('.five_category').show(); $('.six_category').show(); } else if ( $(number_of_categories).val() == '7' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); $('.four_category').show(); $('.five_category').show(); $('.six_category').show(); $('.seven_category').show(); } else if ( $(number_of_categories).val() == '8' ) { $('.one_category').show(); $('.two_category').show(); $('.three_category').show(); $('.four_category').show(); $('.five_category').show(); $('.six_category').show(); $('.se…
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41688184
has title: Making the following dynamic in jQuery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26531173
has comment: http://stackoverflow.com/comment/41688222
has answer: http://stackoverflow.com/a/26531173
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41688244

http://stackoverflow.com/comment/41764777
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26573521
has text: consider using SVG instead, it's time to put SVG content into webpage nowadays.
score: 2

http://stackoverflow.com/a/26613162
has body: You can use a 'for' loop: var maxnum = 32; for (var i=1; i&lt;maxnum; ++i) { console.log(i); }
type: Answer
answers question: http://stackoverflow.com/q/26613087
score: 0

http://stackoverflow.com/comment/41879695
comment on: http://stackoverflow.com/q/26636101
has text: You're binding to `locChangeCounter.count()`, which returns a new value each time it's called. Angular's digest cycle will repeat until all bindings stop changing.
type: QuestionComment
type: Comment
score: 3

http://stackoverflow.com/q/26527394
has comment: http://stackoverflow.com/comment/41682176
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26528243
linked to: http://stackoverflow.com/q/2671930
score: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26535766
has answer: http://stackoverflow.com/a/26527839
has body: In the following example: The title some text and again another text. I'm trying to get all the text in one string. When I just do $('#mainDiv').text() it returns the text as The titlesome textand againanother text. In this case I would like to have spaces between the words in child elements. So I came very close doing: if ($('#mainDiv').find("*").length >= 1) { $('#mainDiv').find("*").each(function () { sFullText = sFullText + $(this).text().trim().replace(/\s\s+/g, ' ') + ' '; }); } The result now is: The titlesome textand again another text. So this works when all text is in child elements, but not if some text is in the mainDiv. (the page and it's content is dynamic so I don't know what specific elements are in mainDiv)
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Get text of div with child element using jQuery
has comment: http://stackoverflow.com/comment/41681828
has comment: http://stackoverflow.com/comment/41681814
tagged with: css

http://stackoverflow.com/comment/41799387
score: 0
comment on: http://stackoverflow.com/q/26592016
type: Comment
type: QuestionComment
has text: Yes, but you didn't say that in the post.

http://stackoverflow.com/q/26603675
downvote count: 0
has comment: http://stackoverflow.com/comment/42019975
has title: How to change the dimensions of the Jssor Image Slider without losing it's responsive nature, image aspect ratio, etc. only on iPhone device?
has body: The website I'm developing is responsive in nature i.e. the website design gets adjust according to the device on which it is browsed. I've used Bootstrap framework for it. I'm using Jssor JQuery Image slider in my website. It's working fine and perfect for me on all devices and all popular well-known browsers. The only issue I'm facing is when it is viewed on iPhone the size of sliding images in Jssor slider should get changed to dimensions 460 px * 280 px. In other words, the Jssor image slider should look somewhat bigger than the current size. But while doing this the aspect ratio of the images appearing in slider should be maintained. Also when the website is viewed on iPhone the image slider should occupy the whole horizontal screen. That is the image slider shouldn't have any white space appearing around the slider. Currently two vertical blank bars are appearing on both sides of the slider. Initially when the website is viewed on a browser on PC or laptop the resolution of slider images is 940 px * 370 px and it gets auto adjust as per the size of the device on which it it browsed. The said dimension change should happen only on iPhone and not on any other devices. On other devices it's working absolutely fine and perfect. Also the aspect ratio of the images should not get disturb in this process. For your reference I'm putting below the HTML code and jQuery code of the slider. All the necessary library files have been included. HTML code : slideshow transition twins slideshow transition twins slideshow transition twins slideshow transition twins slideshow transition twins javascript jQuery code :
favorite count: 0
tagged with: css
has answer: http://stackoverflow.com/a/26754554
tagged with: jssor
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/26826031
type: Question
tagged with: iphone
accepted answer: http://stackoverflow.com/a/26826031
possible better answer: http://stackoverflow.com/a/26729179
has answer: http://stackoverflow.com/a/26729179
tagged with: javascript
tagged with: jquery
answer count: 3
score: 3

http://stackoverflow.com/comment/41759330
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26570331
score: 0
has text: I am just typing `person.run()` in chrome developer console. I want to know errors happen in chrome developer console(by your own try out codes) captured by `window.onerror`?

http://stackoverflow.com/comment/41917248
score: 0
type: AnswerComment
type: Comment
has text: I tried $(this).click() and $(this).trigger('click') however both seem to fail in IE8
comment on: http://stackoverflow.com/a/26657464

http://stackoverflow.com/q/26642910
tagged with: transit
has comment: http://stackoverflow.com/comment/41892646
type: UnansweredQuestion
has title: Need help making my HTML and CSS code for navigation effect more efficient
has body: $(document).ready(function(){ $("#sticky-header").hide(); }); $(window).scroll(function(){ if( $(document).scrollTop() &gt; 160 ) { $.fx.speeds._default = 300; $('#sticky-header').show(); $("#sticky-header").transition({ y: 60 }); } else { $.fx.speeds._default = 0; $('#sticky-header').clearQueue().transition({ y: 0 }); $('#sticky-header').hide(); } }); Here's my code: http://jsfiddle.net/de74ezo5/ I am trying to slide a new navigation down when scrolling past the top header, and then hide it when returning. Is there a more efficient way to do this? Possibly with CSS transitions? My method appears clunky and inefficient to me. The animation tends to be jumpy sometimes.
has answer: http://stackoverflow.com/a/26643325
type: Question
has comment: http://stackoverflow.com/comment/41893010
has comment: http://stackoverflow.com/comment/41892673
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41892597
tagged with: css
has comment: http://stackoverflow.com/comment/41892950
has comment: http://stackoverflow.com/comment/41892460

http://stackoverflow.com/q/26660656
has comment: http://stackoverflow.com/comment/41923544
has comment: http://stackoverflow.com/comment/41924837
has body: I wrote the following code to make XHR requests to a heartbeat endpoint on my server every 2 seconds. Depending on success or failure I continue the execution or block the UI using Jquery UI block plugin. var uiBlocked = false; window.setInterval(function() { $.ajax({ cache: false, type: 'HEAD', url: '/heartbeat/', timeout: 1000, success: function(data, textStatus, XMLHttpRequest) { if (uiBlocked == true &amp;&amp; navigator.onLine) { uiBlocked = false; $.unblockUI(); } }, error: function(XMLHttpRequest, textStatus, errorThrown) { if (uiBlocked == false){ uiBlocked = true; $.blockUI({ message: "Lost connectivity, please reconnect your VPN.", css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' } }); } } }) }, 2000); Now my entire UI gets cached at the client and the next calls are ajax calla that change part of the page. The problem is that some of these calls block for more than 2 seconds and at that time the page blocks and user is alerted for connectivity. How do I avoid this false positive effectively? I cannot increase the timeout value because if I do make the timeout to lets 10 seconds, what if the end user makes a blocking call at the 9th second which blocks for 3 seconds, then again I will get a false positive. Is there a workaround this situation.
has comment: http://stackoverflow.com/comment/41923455
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41923604
has comment: http://stackoverflow.com/comment/41924081
has comment: http://stackoverflow.com/comment/41924237
has comment: http://stackoverflow.com/comment/41924966
type: Question
has comment: http://stackoverflow.com/comment/41923541
tagged with: javascript
tagged with: jquery
has title: Detecting if your server is down using query
tagged with: ajax
score: 0

http://stackoverflow.com/comment/41912945
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26654937
has text: I am able to download the file in my browser. It is a public file on a public website. I also have a Java function that successfully attains it using `URL,` `URLConnection,` `InputStreamReader,` and `BufferedReader.`
score: 0

http://stackoverflow.com/a/26665257
type: Answer
has comment: http://stackoverflow.com/comment/41956794
accepted answer of: http://stackoverflow.com/q/26659579
has body: First off, it's a wrong event. onCreated obviously is supposed to fire when a download is created, and so it is guaranteed not to be completed. And it won't fire again. Next off, you're using Chrome API events wrong. They are not attached to a particular DownloadItem, but are dispatched globally, i.e. chrome.downloads.onCreated. An event is not a function to be executed (like onclick on an HTML element), it's an object with a method addListener to attach handlers. Putting it together, and taking a look at chrome.downloads API, you need this: chrome.downloads.onChanged.addListener(function(delta) { if (delta.state.current == "complete") { // Play sound } });
answers question: http://stackoverflow.com/q/26659579
has comment: http://stackoverflow.com/comment/41956688
has comment: http://stackoverflow.com/comment/41955893
has comment: http://stackoverflow.com/comment/41955991
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41956325
has comment: http://stackoverflow.com/comment/41956887
has comment: http://stackoverflow.com/comment/41954363
has comment: http://stackoverflow.com/comment/41955879
has comment: http://stackoverflow.com/comment/41956232
has comment: http://stackoverflow.com/comment/41956558

http://stackoverflow.com/a/26610706
answers question: http://stackoverflow.com/q/26610634
downvote count: 0
has comment: http://stackoverflow.com/comment/41833489
has body: You can use this snippet: $('#cat').change(function(){ $('form').siblings('div').hide(); $('.'+$('#cat').val()).show(); }); Working Demo
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41834135
has comment: http://stackoverflow.com/comment/41833281
has comment: http://stackoverflow.com/comment/41835406
type: Answer
accepted answer of: http://stackoverflow.com/q/26610634

http://stackoverflow.com/q/26518162
tagged with: c#
has comment: http://stackoverflow.com/comment/41668560
has comment: http://stackoverflow.com/comment/41669313
tagged with: javascript
score: 0
tagged with: gridview
linked to: http://stackoverflow.com/q/21772763
type: UnansweredQuestion
has body: How to select group of rows through shift keys in javascript. For example, I have a ASP.NET Grid View that has few rows. When I click on a row and then press shift key and then click on another row, how to select the rows in between these first row selected and the latest row clicked. I need to implement this in Javascript. I have a gridview that contains some of the columsn which are hidden and not displayed in the UI columns.
answer count: 0
has title: selecting rows in gridview in asp.net through Shift key (Selecting multiple rows from one to many using shift)
type: Question

http://stackoverflow.com/a/26564362
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41748302
has comment: http://stackoverflow.com/comment/41748607
has comment: http://stackoverflow.com/comment/41748774
has comment: http://stackoverflow.com/comment/41748897
type: Answer
has comment: http://stackoverflow.com/comment/41748422
score: 2
has body: Your code works fine. Maybe your html code is somehow wrong. Here is how I made it work: {{ myForm.email }} DEMO
has comment: http://stackoverflow.com/comment/41748776
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26564131
answers question: http://stackoverflow.com/q/26564131
has comment: http://stackoverflow.com/comment/41748556
has comment: http://stackoverflow.com/comment/41748487
upvote count: 2

http://stackoverflow.com/q/26621042
has body: I have a page that I would like to enhance by using Chrome's Rich Notifications. The pages I've read however, seem to imply that this API is only available to Chrome extensions. Is this the case? I would love to take advantage of the API, but I don't want to invest the time in converting my web application into a Chrome extension unless absolutely necessary. Thanks!
tagged with: google-chrome
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
tagged with: google-chrome-app
tagged with: notifications
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/26632621
answer count: 1
has title: Chrome Rich Notifications for Extensions Only?
has answer: http://stackoverflow.com/a/26632621

http://stackoverflow.com/a/26531000
upvote count: 1
has comment: http://stackoverflow.com/comment/41688581
answers question: http://stackoverflow.com/q/26529838
downvote count: 0
has body: Here's what I was saying - but first of all I too personally find the ajax to MVC controller binding painful sometimes. It's flexible, but if anything at all is out of place, you just get nulls - as you know. Anyway... [HttpPost] public ActionResult FirstDoc(MyObject inputObj) { //use inputObj here as needed } Then, you need a definition for the MyObject - to keep it simple public class MyObject{ string start {get;set;} string end {get;set;} } If all your ducks are in a row, including your options on the ajax side of course, your object 'should' bind.
type: Answer
has comment: http://stackoverflow.com/comment/41690780
has comment: http://stackoverflow.com/comment/41690186
has comment: http://stackoverflow.com/comment/41688493
score: 1

http://stackoverflow.com/a/52654480
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26615966
has body: If you are using jQuery, I created a deferred implementation of Alnitak's answer function deferredEach (arr, batchSize) { var deferred = $.Deferred(); var index = 0; function chunk () { var lastIndex = Math.min(index + batchSize, arr.length); for(;index&lt;lastIndex;index++){ deferred.notify(index, arr[index]); } if (index &gt;= arr.length) { deferred.resolve(); } else { setTimeout(chunk, 0); } }; setTimeout(chunk, 0); return deferred.promise(); } Then you'll be able to use the returned promise to manage the progress and done callback: var testArray =["Banana", "Orange", "Apple", "Mango"]; deferredEach(testArray, 2).progress(function(index, item){ alert(item); }).done(function(){ alert("Done!"); })

http://stackoverflow.com/comment/41661108
type: Comment
comment on: http://stackoverflow.com/q/26515389
type: QuestionComment
score: 0
has text: Oh, and writing `and` and `or` in an if statement is not quite right. It's `&&` and `||`, respectively.

http://stackoverflow.com/a/26595957
answers question: http://stackoverflow.com/q/26595704
downvote count: 0
upvote count: 2
type: Answer
has body: I'm not sure if I understand what are you asking for, but hey, let's avoid globals, shall we? That said, I would suggest you to try an approach like this: var app = {}; app.x = 'initial value'; app.bindEvents = function() { $('#anyElement').click(function() { app.x = 'test'; console.log(app.x); }); }; app.bindEvents = function() { app.bind(); }; $(app.init); Here, our code is only setting one global object (app), avoiding polluting the namespace. The problem in your code was that you were trying to set a "global" but that x wasn't a global, but just a local variable. See a working JSFiddle here
score: 2

http://stackoverflow.com/comment/41693755
type: Comment
has text: Why do you think that strings are hashed? Or compared using only internal references? Of course, an engine might do some optimisations if you have `a==a`, but if two string literals or differently created strings are compared that needs to happen (at least once) by value.
comment on: http://stackoverflow.com/a/26532637
score: 0
type: AnswerComment

http://stackoverflow.com/a/26661829
has body: The outer container has to have position: relative and the div that you want to stretch to the bottom has to have position: absolute. This solution is pure css with no calls to calc(). body, html { margin: 0; height: 100%; } #container { position: relative; width: 100%; height: 100%; } #header { height: 150px; width: 100%; background-color: #999999; } #mainContent { width: 760px; top: 150px; bottom: 0; right: 0; left: 0; background-color: #CCCCCC; margin: 0 auto; position: absolute; } JSFiddle: http://jsfiddle.net/wt0k73bz/
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26661505
score: 2

http://stackoverflow.com/comment/41967134
score: 0
type: Comment
type: QuestionComment
has text: This question appears to be off-topic because it appears to be about doing someones homework.
comment on: http://stackoverflow.com/q/26665312

http://stackoverflow.com/comment/41878151
comment on: http://stackoverflow.com/a/26634354
has text: Thanks. I like this and I think it is pretty clever.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41842301
has text: Test it on a real webserver. Or change //connect to https://connect
comment on: http://stackoverflow.com/q/26615153
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26630017
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41868888
type: Question
tagged with: session
tagged with: javascript
has answer: http://stackoverflow.com/a/26630065
linked to: http://stackoverflow.com/q/6874478
accepted answer: http://stackoverflow.com/a/26630065
answer count: 1
has body: I'm using phonegap and I cannot figure out how to start a session. It's not possible to use php in the code itself because of phonegap. So I need a solution for getting the session by using javascript, I know that I need to use Ajax but I'm new with ajax and that's most of my problem. So if someone can help me with this I would appreciate it. I need to load this code in a html page with JavaScript. &lt;?php session_start(); if(!empty($_SESSION['login_user'])) { header('Location: home.php'); } ?&gt;
favorite count: 0
tagged with: ajax
tagged with: php
has title: how to start a php session in Javascript?
type: AnsweredQuestion
tagged with: cordova
has comment: http://stackoverflow.com/comment/41868479
score: 0

http://stackoverflow.com/a/26671780
answers question: http://stackoverflow.com/q/26671714
type: Answer
has comment: http://stackoverflow.com/comment/41943870
has body: Use the success handler of each to progress and perform the next method in sequence. You can find documentation and examples of how to use the "success" of the call here: http://api.jquery.com/jquery.ajax/ EDIT: why the anonymous downvote?
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26671714

http://stackoverflow.com/q/26645997
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27077324
has body: I am trying to create grid with advanced features(filter, re-sizable, scrolling, fixed header, row formatting, cell formatting) using angular js. I have read the following grids documentation. ng-grid ng-table smart-table And, ng-grid has many features and perfect for our requirements. but I want the following 2 options also. is it possible to achieve from ng-grid? Formatting We have number of columns in my grid (approx 40). Most of the column data need to be formatted in cell. for eg: Adding link, change date format, Reducing length of the content with tooltip..etc., Here, I can not do this stuff inside views. But this one is handled perfectly in ng-table. If I can not do this in view, then my javascript (using callbacks) code is going to be increased. I don't want this way because angular perfectly do dynamic views. Also, I want Header formatting, filter formatting, row formatting should be done inside views. Responsive using Bootstrap Our application should work in all devices. but ng-grid not working as responsive if I view my application in tablet devices.
has title: Angular ng-grid/ui-grid implementing view logics inside views
tagged with: grid
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/28908238
score: 0
upvote count: 1
downvote count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/26539431
tags question: http://stackoverflow.com/q/26661545
tag name: csv
tags question: http://stackoverflow.com/q/26653621
tags question: http://stackoverflow.com/q/26648650
tags question: http://stackoverflow.com/q/26568929
tags question: http://stackoverflow.com/q/26597460
tags question: http://stackoverflow.com/q/26523087
tags question: http://stackoverflow.com/q/26654937
tags question: http://stackoverflow.com/q/26653902
tags question: http://stackoverflow.com/q/26599722

promise
tags question: http://stackoverflow.com/q/26672317
tags question: http://stackoverflow.com/q/26586266
tags question: http://stackoverflow.com/q/26566514
tags question: http://stackoverflow.com/q/26621030
tags question: http://stackoverflow.com/q/26573785
tags question: http://stackoverflow.com/q/26594382
tags question: http://stackoverflow.com/q/26526601
tag name: promise
tags question: http://stackoverflow.com/q/26531638
type: Tag
tags question: http://stackoverflow.com/q/26525506
tags question: http://stackoverflow.com/q/26553098
tags question: http://stackoverflow.com/q/26613121
tags question: http://stackoverflow.com/q/26610537
tags question: http://stackoverflow.com/q/26634654
tags question: http://stackoverflow.com/q/26569070
tags question: http://stackoverflow.com/q/26527098
tags question: http://stackoverflow.com/q/26565291
tags question: http://stackoverflow.com/q/26623037
tags question: http://stackoverflow.com/q/26612074
tags question: http://stackoverflow.com/q/26635874
tags question: http://stackoverflow.com/q/26638185
tags question: http://stackoverflow.com/q/26520537
tags question: http://stackoverflow.com/q/26627402
tags question: http://stackoverflow.com/q/26568949
tags question: http://stackoverflow.com/q/26521098
tags question: http://stackoverflow.com/q/26667598
tags question: http://stackoverflow.com/q/26592316
tags question: http://stackoverflow.com/q/26657057
tags question: http://stackoverflow.com/q/26552998

http://stackoverflow.com/comment/41873160
type: Comment
has text: Well, you might all find me crazy, but I've started defining a grammar for a language which would be similar to what I am talking about. No, it won't be written the way I wrote it out in my examples, but the basic idea is there. You would be able to write out statements like CSS, yet be able to alter specific attributes of each element returned and perform calculations, not just alter stylistic attributes. Each block would be a loop, in a way. Do you think this is a good idea? Should I stop now and let this new language die, or should I keep pressing on and see what I can conjure up?
type: QuestionComment
comment on: http://stackoverflow.com/q/26590725
score: 0

http://stackoverflow.com/q/26640859
has comment: http://stackoverflow.com/comment/41889125
type: Question
tagged with: video-streaming
has answer: http://stackoverflow.com/a/26643227
has body: I've implemented video.js to load MP4s from Amazon s3. I'm really struggling to get smooth playback, even on a small (7mb) video. It's very jumpy and stop -starting. The internet connection here is fast, and if I download it directly it downloads instantly. I've tried several things, lastest is buffering with: var player = videojs('video'); player.on("ended", function(){ closeVideo(); }); player.ready(function(){checkBuffer(player); }); videoPlaying = true; } function checkBuffer(player){ var howMuchIsDownloaded = player.bufferedPercent(); if(howMuchIsDownloaded &gt; 0.3){ player.play(); //start playing the video }else{ setTimeout(checkBuffer, 100, player); } } This works but it's still very jumpy after playing. Video is constructed: $('body').append( " &lt;video id='video' class='video-js' preload width='100%' height='100%'" + " data-setup='{}'&gt;" + " &lt;source src='http://cdn.example.com/"+ video +"' type='video/x-m4v' /&gt;" +" &lt;/video&gt;" ); Any clues how to get smooth video like in the video.js examples?
has title: Video.js smooth playback
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41889233
has comment: http://stackoverflow.com/comment/41888944
answer count: 1
tagged with: video.js
has comment: http://stackoverflow.com/comment/41888644
has comment: http://stackoverflow.com/comment/41889544
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: video

http://stackoverflow.com/comment/42165341
has text: I use 'Yeoman angular generator' (https://github.com/yeoman/generator-angular) for my application scaffolding and the structure it generates works fine for most apps.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26534341
score: 0

http://stackoverflow.com/q/26567556
accepted answer: http://stackoverflow.com/a/26568706
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
score: 1
has body: I'm a young developer and I'm trying to get some best practice down. I hope my question isn't subject to too much opinion and I can get a standard answer here. Basically I have a big ol' JS file I wrote, couple thousand lines long. There are three main types of things? (objects?). exported functions I use on my node.js server to manipulate data submitted variables used by the exported functions and nowhere else functions that are called by the exported functions in this file and nowhere else. I'd like to split them up so that I don't have to scroll so much when making edits. In my head it would make sense to have the three files, with the "exported functions" file calling the variables and functions it needs on top. Is this common practice? Is there a best way to call variables and functions from another file? Any advice here would be greatly appreciated.
type: Question
has comment: http://stackoverflow.com/comment/41754574
tagged with: file-structure
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41754984
answer count: 1
has comment: http://stackoverflow.com/comment/41756127
has title: File structure preference
has answer: http://stackoverflow.com/a/26568706
favorite count: 0
has comment: http://stackoverflow.com/comment/41755629

http://stackoverflow.com/comment/41889883
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26641261
has text: To prevent the alert, you HAVE to hijack the alert function before the other code runs - that code isn't set up to wait for page load, so will be executed immediately. Which means to prevent it, you have to run before (either in the head, or in the body before the other script). But you could easily turn alerts back on in `document.ready`.
type: Comment

http://stackoverflow.com/comment/41681522
score: 4
has text: I'm guessing it should only return true if all fields are valid. So I reckon `success` should default to `true` and be set to `false` in the first part of the if.
type: Comment
comment on: http://stackoverflow.com/a/26527270
type: AnswerComment

http://stackoverflow.com/comment/41772311
comment on: http://stackoverflow.com/a/26577285
type: Comment
has text: So "function" was actually supposed to be a keyword and not a placeholder?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41935366
has text: also one more condition might be needed, ```delTask >=1```
comment on: http://stackoverflow.com/a/26666686
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26581618
possible better answer: http://stackoverflow.com/a/26581705
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26581705
favorite count: 0
has answer: http://stackoverflow.com/a/26581754
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26581779
has comment: http://stackoverflow.com/comment/41779744
accepted answer: http://stackoverflow.com/a/26581944
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26582014
type: Question
has answer: http://stackoverflow.com/a/26581944
has body: I'm trying to use jQuery to highlight a div that's clicked on and keep it that way until one of a few other divs are clicked on. JSfiddle All of the CSS and HTML are fine; if I manually change the ids and classes of the wrapper divs, they work as expected. However, the jQuery code doesn't seem to work: var $allWraps = $("#mainBody .wrap"); $allWraps.each(function () { $(this).on("click", ".kid ", function () { setFocus($(this)); }); }); function setFocus(f) { $allWraps.each(function () { $(this).each(function () { $(this).removeAttr(" id "); $(this).addClass(" unfocused "); }); f.attr(" id ", " focused "); f.removeClass(" unfocused "); }); } I'm not 100% sure i'm using the .each() function correctly, or if I have the correct syntax for using DOM object parameters in a function.
tagged with: javascript
answer count: 6
tagged with: jquery
has title: Using click events to change the div in "focus"?
has answer: http://stackoverflow.com/a/26581756

http://stackoverflow.com/comment/41897313
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26645862
has text: If you use `console.error` instead of `console.log`, you should get a stacktrace in your console (click on the black triangle to see it).
score: 0

http://stackoverflow.com/comment/41686266
score: 2
type: Comment
type: QuestionComment
has text: The first argument passed to a `.click` handler is an `Event`, not whatever you assume it is in the code above
comment on: http://stackoverflow.com/q/26529817

http://stackoverflow.com/q/26658402
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26658562
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41920341
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26658562
has comment: http://stackoverflow.com/comment/41919211
tagged with: javascript
has title: Is there a Simpler way to output a complete 'script' tag as text?
has body: I'm writing some AJAX that pulls in a web page that has the potential to have scripts and/or css that I'm trying to separate out into a couple of supporting fields in a form that runs all of this. I believe the pertinent code in this case is the AJAX finalizer. xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var JavascriptContent = document.getElementsByName('AgendaJS')[0]; var CSSContent = document.getElementsByName('AgendaCSS')[0]; var Parser = new DOMParser(); var xmlData = Parser.parseFromString(xmlhttp.responseText, "text/html"); var ResponseBody = xmlData.getElementsByTagName('body')[0]; tinymce.activeEditor.setContent(ResponseBody.innerHTML); var ResponseScripts = xmlData.getElementsByTagName('script'); var i = 0; for( i = i; i &lt;= ResponseScripts.length; i++ ) { JavascriptContent.innerText += "\r\n" + String(ResponseScripts[i]); } return; } } The idea here is to add any script tags ( preferably a direct copy of the full text ) to the 'AgendaJS' textarea. The way I see it right now, is that I am almost bound to examining the individual elements of the script tag and regenerating the entire tag from 'scratch' - so my hope here is that I can find a manner in which to dump this element into that field that doesn't yield this: [object HTMLScriptElement] I've glanced around at a few posts here and elsewhere that claim that a particular method works - but I am yet to confirm any of them. To be clear - I'd effectively like the resulting addition to the JS field to be the full tag and closing tag, like so: &lt;script type="text/javascript" src="/tinymce/js/tinymce/tinymce.min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/41721389
type: Comment
type: QuestionComment
has text: How's this http://jsfiddle.net/j08691/94fhxb7u/?
comment on: http://stackoverflow.com/q/26548616
score: 0

http://stackoverflow.com/comment/41930863
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26663656
has text: Edited to add more info. Thanks.

http://stackoverflow.com/a/26566702
has comment: http://stackoverflow.com/comment/41752715
answers question: http://stackoverflow.com/q/26566623
has comment: http://stackoverflow.com/comment/41752552
score: 0
has body: If you wanna do it on the server-side, then simply $contents = file_get_contents('url to page'); echo $contents; If you wanna do it on the client-side $.ajax({ 'url' : 'URL HERE', 'type' : 'GET', 'success' : function(data) { $("#contents").html(data); } }); Note: The client-side will only work if the the appropriate access control origin headers are sent (most websites don't allow them)
type: Answer

http://stackoverflow.com/q/26518689
favorite count: 0
type: UnansweredQuestion
downvote count: 2
has title: Need help creating a javascript or a bootstrap like popup modal for a form submission in Telesope meteor app?
tagged with: popup
score: -2
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/26518733
tagged with: window
answer count: 1
tagged with: javascript
has body: Hi I'm using meteor site http://www.telesc.pe and need help making the submit form link open in a pop window or javascript overlay vs a new page with a close button. Any suggestions? newtometeor Thanks!
has comment: http://stackoverflow.com/comment/41670166
tagged with: meteor

http://stackoverflow.com/comment/41896194
has text: just select the textboxes that you want and give them the desired value -> `select: function( event, ui ) { $('#textbox1').val(ui.item.value); $('#textbox2').val(ui.item.id); }`
comment on: http://stackoverflow.com/q/26644940
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/q/26584298
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26584343
has title: Adding jQuery code to wordpress
answer count: 1
downvote count: 0
has body: I am trying to add the following code to Wordpress but it doesn't seem to work. The same code in a fiddle works. Please help. $(".box").hover( function (e) { $('.box').not(this).addClass('grey') }, // over function (e) { $('.box').removeClass('grey') } // out );
favorite count: 0
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26584343
type: Question

http://stackoverflow.com/comment/41840575
has text: Thanks, yes the orderNum is alphanumeric. I'll try with your modified way.
comment on: http://stackoverflow.com/q/26614453
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26637458
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26637502
type: Question
possible better answer: http://stackoverflow.com/a/26637611
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26637515
has title: Jquery input value not showing up correctly
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26637515
has answer: http://stackoverflow.com/a/26637527
has answer: http://stackoverflow.com/a/26637611
has body: I have something very simple to just get an input value. The code looks like this: var $a = $('.custom-amount').val(); $('.custom-amount').on('change', function() { alert($a) }) And my input: &lt;div class='custom-amount'&gt; &lt;input placeholder='Custom Amount' type='text-area'&gt; For some reason, my alerts are empty. Does anyone see whats going wrong?
answer count: 4

http://stackoverflow.com/q/26650352
has title: Passing values from views to controllers in AngularJS
type: Question
possible better answer: http://stackoverflow.com/a/26650489
score: 0
has answer: http://stackoverflow.com/a/26650489
answer count: 2
has answer: http://stackoverflow.com/a/26650856
tagged with: javascript
has body: I have templated my Angular app with Yeoman, so my app directory structure is nice and neat and will give you an idea of how my project is constructed. I have 2 routes in my app, one is called 'main' and the other 'sub'. When I'm in my 'main' view, I have a link that then forwards the user to the 'sub' view. How can I pass a simple value to the 'sub' controller through the link from my 'main' view? i.e. my link is just a standard html link: Go to sub When you hit that the sub.js controller can add some data to $scope for the sub view and so on. I want to access the value in the 'sub' controller that was passed from the 'main' view... Hope that makes sense..
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26650856

http://stackoverflow.com/a/26666168
type: AcceptedAnswer
has body: This should be the bare minimum to get the code running: var counter = 0; document.writeln(" ") document.writeln(" Day ") document.writeln(" Hiding Place ") document.writeln(" Explosion ") do{ counter = counter + 1 var hide = Number(prompt("It is day " + counter + ". Where will you hide (1, 2, 3, or 4)?")); var explosionLocation = Math.floor(Math.random() * 4) + 1; if (hide <1 || hide >4) { alert("That is not a valid choice.") } else { alert("Hiding place " + explosionLocation + " has exploded!") if (hide !== explosionLocation) { alert("You have survived!") document.writeln(" " + counter + " " + hide + " " + explosionLocation + " ") } else { alert("You have died. You survived for a total of " + (counter - 1) + " days.") document.writeln(" " + counter + " " + hide + " " + explosionLocation + " ") document.writeln(" Survived for " + (counter - 1) + " days ") } } } while (explosionLocation !== hide) The three key lines that were changed are these: alert("You have died. You survived for a total of " + (counter - 1) + " days.") document.writeln(" " + counter + " " + hide + " " + explosionLocation + " ") document.writeln(" Survived for " + (counter - 1) + " days ") } A few quotes were mismatched, and you need to place parenthesis around counter - 1 if you'd like it to actually do the math on it. Otherwise, JavaScript gets confused what you're asking of it when you place - in the middle of combining strings.
score: 0
accepted answer of: http://stackoverflow.com/q/26666090
type: Answer
has comment: http://stackoverflow.com/comment/41934974
answers question: http://stackoverflow.com/q/26666090
has comment: http://stackoverflow.com/comment/41934534

http://stackoverflow.com/comment/41878030
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26634706
has text: Nevermind, I need more reputation to post images.
score: 0

http://stackoverflow.com/comment/41855494
comment on: http://stackoverflow.com/q/26622619
has text: `document.getElementById('total').value = var;` what did you expect "var" to be? You also haven't asked a question
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/26590856
has comment: http://stackoverflow.com/comment/41797908
score: 0
has comment: http://stackoverflow.com/comment/41797245
has comment: http://stackoverflow.com/comment/41799508
answers question: http://stackoverflow.com/q/26590645
has comment: http://stackoverflow.com/comment/41797053
has comment: http://stackoverflow.com/comment/41799324
type: Answer
has body: When I was doing my chat app I didn't use any streams, since Meteor is reactive I just stored all messages in a Collection, and find() was returning data, no packages were needed. If I wanted to send data to users, I simply fetch() users who are online(with mizzao:user-status aswell), and then sent message to all of them using .forEach

http://stackoverflow.com/comment/44263512
has text: but why does it still working if we pass as `this` the `window`? Is it Array-like object? For example: `Array.prototype.forEach.call( window, function( element, index, array ){ console.log(index, element, array) })`
comment on: http://stackoverflow.com/a/26546575
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41669956
comment on: http://stackoverflow.com/a/26518866
type: Comment
score: 0
has text: +1 for nice and concise answer. BTW, `quadraticCurveTo` can generate a parabola if the middle control point is tangent to the midpoint of the starting and ending control points. `bezierCurveTo` acts identically to a quadratic curve if its 2 middle control points are set to the same point.
type: AnswerComment

http://stackoverflow.com/comment/50899563
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26727195
type: Comment
has text: I am just wondering if the lock screen is just an html5 overlaying layer, does it mean it can be easily removed if the device is rooted and pulled from the source code, or would it be no difference if it is written in Native Java?

http://stackoverflow.com/comment/42998952
comment on: http://stackoverflow.com/a/26598490
type: Comment
score: 0
has text: It may be that the DOM/jQuery hasn't finished loading/processing yet?
type: AnswerComment

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/26564148
tag name: openlayers-3
tags question: http://stackoverflow.com/q/26544865
tags question: http://stackoverflow.com/q/26519613
tags question: http://stackoverflow.com/q/26606991

http://stackoverflow.com/comment/41814361
comment on: http://stackoverflow.com/q/26599905
score: 0
type: Comment
has text: @Thilo - thanks for your help. I will look into this technique. Do you have or know any links which explain this technique in detail? Thanks in advance.
type: QuestionComment

http://stackoverflow.com/q/26514477
has body: I have this list using ng-repeat with filter: {{theme.name}} {{theme.avg_score}} {{theme.count_of_cards}} I would like to after ng-click method show only items which JSON attribute "type" == "CUSTOM" I tried to do it by this way: $scope.setFilter = function(theme) { console.log("Trying to set filter"); $scope.q = "CUSTOM" }; But it search in all attributes in JSON. Question is: How can i set which column (or columns) can be used for search? Additional question: Is possible to set sorting by another JSON attribute together? JSON result looks like: "themes": [ { "id": "20", "user_id": "50", "name": "dwdwdw", "language_code_from": "cz", "language_code_to": "en", "type": "CUSTOM", "created": "2014-10-19 15:36:05", "count_of_cards": 0, "avg_score": 0 }, { "id": "21", "user_id": "50", "name": "wfwfw", "language_code_from": "en", "language_code_to": "cz", "type": "CUSTOM", "created": "2014-10-19 15:36:27", "count_of_cards": 0, "avg_score": 0 } ] Many Thanks for any advice. EDIT: Now i can filter by value in attribute, but not by value in text input: $scope.setFilter = function(filter) { console.log("Trying to set filter"); switch (filter) { case "CUSTOM": $scope.filterProp = "type"; $scope.filterValue = "CUSTOM"; console.log("apply custom"); return true; case "BASIC": $scope.filterProp = "type"; $scope.filterValue = "BASIC"; console.log("apply basic"); return true; case "NAME": $scope.filterProp = "name"; $scope.filterValue = $scope.q; console.log("apply name "+$scope.q); return true; } }; List of found themes No theme found, add some please {{theme.name}} {{theme.avg_score}} {{theme.count_of_cards}}
answer count: 1
tagged with: angularjs
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: Angular JS - how to set filter by attribute value?
type: Question
tagged with: filtering
tagged with: javascript
has answer: http://stackoverflow.com/a/26514617
accepted answer: http://stackoverflow.com/a/26514617
score: 0

http://stackoverflow.com/a/26560905
has comment: http://stackoverflow.com/comment/41742310
has comment: http://stackoverflow.com/comment/41826676
score: 0
has body: Try the easy way before of each href link put the follow change normal way http://www.google.cl new way http%3A%2F%2Fwww.google.cl just put the http%3A%2F%2F before the page
answers question: http://stackoverflow.com/q/26560279
type: Answer

http://stackoverflow.com/a/26538276
type: Answer
has body: Unsure if this is related or not.. But it appears you have an extra quote (") in your &lt;button/&gt; tag. This could be throwing off Chrome but not FF. I just tested this (JSFiddle) and by looking at the console log I indeed see button.delete-file-btn as the currentTarget.
has comment: http://stackoverflow.com/comment/41702661
score: 0
has comment: http://stackoverflow.com/comment/41702569
has comment: http://stackoverflow.com/comment/41703102
answers question: http://stackoverflow.com/q/26538068

http://stackoverflow.com/comment/41790772
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26578221
type: AnswerComment
has text: Maybe it would be best if you could supply a small pseudo-code, to clarify the architecture.

http://stackoverflow.com/comment/94464336
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26633844
type: Comment
has text: Thanks for the clarification, good to know. So the two that *should* be equivalent are in fact not in Safari (presumably a bug), and so checking a `var(--x)` *value* should be preferred to a `--x` *property*. I’ve updated the answer to work around that bug.

http://stackoverflow.com/comment/41780408
type: QuestionComment
comment on: http://stackoverflow.com/q/26571452
has text: @Quentin: Hence the inclusion of the script link to Blockhead.js, pointing to the new file. But I will check out a validator and get back to you on the results.
score: 0
type: Comment

http://stackoverflow.com/comment/41855239
type: Comment
comment on: http://stackoverflow.com/q/26622464
score: 0
has text: This link may help you [enter link description here][1] [1]: http://stackoverflow.com/questions/21939818/loading-order-javascript-files-in-asset-pipeline
type: QuestionComment

http://stackoverflow.com/comment/41764423
type: QuestionComment
has text: You may have disabled the eval() function in php.ini. Check for "disable_functions" in php.ini file.
comment on: http://stackoverflow.com/q/26573087
score: 0
type: Comment

http://stackoverflow.com/a/26590491
has body: You do not need to reference "this" in your map functions to access your local variable. Remove "this" when you try to access the onClick variable. var renderLocationLink = React.createClass({ render: function(){ var onClick = this.props.onClick; var locationLinks = this.props.linkArray.map(function(link,index){ return (&lt;a onClick={onClick} href={link}&gt;{link} &lt;/a&gt;) }) return ( &lt;div &gt;{locationLinks}&lt;/div&gt; ) } })
type: Answer
accepted answer of: http://stackoverflow.com/q/26587754
answers question: http://stackoverflow.com/q/26587754
score: 6
upvote count: 8
downvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/41690038
comment on: http://stackoverflow.com/q/26531818
type: Comment
score: 0
has text: Yes I removed it to make things more clear, so the [bg-attr="paper"] has nothing to do with it anymore. Sorry
type: QuestionComment

http://stackoverflow.com/q/26667464
type: Question
has answer: http://stackoverflow.com/a/26670117
type: AnsweredQuestion
has body: I am using reveal-modal popup http://foundation.zurb.com/docs/components/reveal.html. Is there in in-built method to prevent closing of popup on esc key. Or how can i make it work? I tried the following, $(document).keyup(function(e) { if (e.keyCode === 27) { return e.preventDefault(); } }); Link to open pop-up &lt;a class="action icon-primary" id="manageAccess" ng-click="Popup()"&gt;&lt;img src="images/Manage_Access_Icon.svg"/&gt;Access Pop up&lt;/a&gt; pop-up &lt;div id="AccessContainer" class="reveal-modal large" data-reveal data-options="close_on_background_click:false;"&gt; //contents inside pop-up &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt; // wil close pop-up &lt;/div&gt; $scope.Popup = function() { return $("#AccessContainer").foundation("reveal", "open"); }; In foundation.reveal.js settings : { animation: 'fadeAndPop', animation_speed: 250, close_on_background_click: true, close_on_esc: true, // how can i change this from my js dismiss_modal_class: 'close-reveal-modal', bg_class: 'reveal-modal-bg', open: function(){}, opened: function(){}, close: function(){}, closed: function(){}, bg : $('.reveal-modal-bg'), css : { open : { 'opacity': 0, 'visibility': 'visible', 'display' : 'block' }, close : { 'opacity': 1, 'visibility': 'hidden', 'display': 'none' } } } But still not working. Please help, Thanks.
upvote count: 4
has title: Reveal modal popup foundation: Prevent close on popup
has comment: http://stackoverflow.com/comment/41940148
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26670117
tagged with: zurb-foundation
favorite count: 0
score: 4
tagged with: popup

http://stackoverflow.com/comment/41890257
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26640088
type: Comment
has text: Well in my example I had a type where I called the variable `mytest` instead of `myTest` (uppercase T) which could have caused that problem. I have updated the code

http://stackoverflow.com/a/42907951
has comment: http://stackoverflow.com/comment/105374090
has comment: http://stackoverflow.com/comment/105380373
downvote count: 3
upvote count: 83
score: 80
has body: simple es6 adapted from h3manth: document.querySelectorAll('iframe').forEach( item =&gt; console.log(item.contentWindow.document.body.querySelectorAll('a')) )
has comment: http://stackoverflow.com/comment/109712769
has comment: http://stackoverflow.com/comment/109981727
answers question: http://stackoverflow.com/q/26630519
has comment: http://stackoverflow.com/comment/129322338
has comment: http://stackoverflow.com/comment/137121438
type: Answer

http://stackoverflow.com/comment/41929511
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26663838
has text: Wow, that was fast and right to the point. Oh it's still you :) Thanks! Accepting soon (need to wait 10 mins) ;).
score: 0

http://stackoverflow.com/comment/41757027
score: 0
has text: I don't think so. I'm trying to update a counter field on another class based on the change in value of another class. So before I update another class, I think it makes more sense to wait for the other class to save. I think `beforeSave` is typically used to enforce a particular data format.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26568564

http://stackoverflow.com/q/26575648
upvote count: 2
type: Question
tagged with: object
tagged with: javascript
has comment: http://stackoverflow.com/comment/41769136
tagged with: prototype
has comment: http://stackoverflow.com/comment/41769226
answer count: 2
downvote count: 0
has body: Mozilla's Javascript docs say that this is a good way to create objects: // Shape - superclass function Shape() { this.x = 0; this.y = 0; } // superclass method Shape.prototype.move = function(x, y) { this.x += x; this.y += y; console.info('Shape moved.'); }; // Rectangle - subclass function Rectangle() { Shape.call(this); // call super constructor. } // subclass extends superclass Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; var rect = new Rectangle(); rect instanceof Rectangle; // true rect instanceof Shape; // true rect.move(1, 1); // Outputs, 'Shape moved.' However, when practicing, I intentionally skipped the lines Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; and all the behaviour seemed totally normal. It seems like there were no consequences of skipping those lines. For example, I still created Rectangle objects, called its properties, etc. Are those lines superfluous? What am I missing?
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26575706
has title: When creating a subclass in Javascript, why assign prototype fields?
score: 2
has answer: http://stackoverflow.com/a/26575744

http://stackoverflow.com/comment/41814590
type: Comment
comment on: http://stackoverflow.com/a/26592120
has text: I tired your code, but the browser throws Failed to instantiate module photoSharingApp due to: Error: [$injector:modulerr] http://errors.angularjs.org/1.2.26/$injector/modulerr?p0=...) Thanks for the suggestion.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41917412
type: AnswerComment
comment on: http://stackoverflow.com/a/26655055
has text: Thanks mate! Only have one issue left i think, when clicking on open all open of course, but when closing one or two etc by hand the close function works as open. How do i rate your answers, because your are very helpful! Can't see where?
score: 0
type: Comment

http://stackoverflow.com/q/26574406
has answer: http://stackoverflow.com/a/27071385
has comment: http://stackoverflow.com/comment/41768097
score: 0
has comment: http://stackoverflow.com/comment/42715086
has body: i have created a angularjs directive which creates a d3 sunburst chart. The problem is I keep getting maximum call stack error in chrome and too much recursion error in firefox. I have tracked the problem to the function d3.layout.partition. Now this is a function provided by d3.js to plug in values to create a sunburst chart or any hierarchical chart. I currently have no idea how to fix this problem. Any suggestion would be appreciated. Thanks. chrome error firefox error var partition = d3.layout.partition() .children(function(d){ return d.values; }) .value(function(d) { console.log(d); return d.count; }); var root = d3.nest() .key(function(k){ return k.key}) .entries(d); root = {key:'All',values:root}; console.log(partition.nodes(root)) the partition.nodes(root) results in the recursion error
answer count: 1
has comment: http://stackoverflow.com/comment/42703199
has title: Angular.js gives maximum call stack size error when using d3.layout.partition
has comment: http://stackoverflow.com/comment/41767803
has comment: http://stackoverflow.com/comment/41766684
has comment: http://stackoverflow.com/comment/42723441
tagged with: angularjs
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41766889
has comment: http://stackoverflow.com/comment/42654253
has comment: http://stackoverflow.com/comment/42332173
type: Question
has comment: http://stackoverflow.com/comment/42715194
has comment: http://stackoverflow.com/comment/42720469
has comment: http://stackoverflow.com/comment/41766510
tagged with: javascript

http://stackoverflow.com/a/26578144
answers question: http://stackoverflow.com/q/26567900
type: Answer
has body: Finally I found a solution. The full working solution is in this snippet: iScroll test iScroll scrollToLast Scroll function works, as does the call of myScroll2.scrollToElement(document.querySelector('.iscroller2 li:nth-child(10)')), (yes I have 3 containers in the HTML, so indexes of 0, 1, and 2 are available). Yet I do not understand why the following works... function loaded () { var iscroller = $('.iscroller'); iscroller.each(function(index){ /*var wird definiert*/ $(this).addClass('iscroller'+index); eval('var myScroll'+index); }); iscroller.each(function(index){ /*var wird einmalig gefüllt*/ eval('myScroll'+index+' = new IScroll(\'.iscroller'+index+'\', { mouseWheel: true, click: true });'); }); } But this not (scrolling works but still ReferenceError: myScroll2 is not defined) function loaded () { var iscroller = $('.iscroller'); iscroller.each(function(index){ /*var wird definiert UND einmalig gefüllt*/ eval('var myScroll'+index); eval('myScroll'+index+' = new IScroll(\'.iscroller'+index+'\', { mouseWheel: true, click: true });'); }); } And this neither function loaded () { var iscroller = $('.iscroller'); iscroller.each(function(index){ /*var wird gleich definiert UND gefüllt*/ eval('var myScroll'+index+' = new IScroll(\'.iscroller'+index+'\', { mouseWheel: true, click: true });'); }); } This is still not logical to me, so perhaps somebody could post another answer to explain what's happening.
score: 0

http://stackoverflow.com/comment/41793548
has text: attrs.value != 0 change this to attrs.value !== 0; there were 2 other javascript warnings in js file 1. for (key in $scope.data) should be for (var key in $scope.data)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26589298
score: 0

http://stackoverflow.com/comment/50410849
comment on: http://stackoverflow.com/a/26553697
score: 0
type: Comment
has text: @Raymond, I now have the same problem here. May I know do you figure it out?
type: AnswerComment

http://stackoverflow.com/comment/41758309
type: AnswerComment
type: Comment
score: 0
has text: the `getConnection` is in my answer below
comment on: http://stackoverflow.com/a/26566613

http://stackoverflow.com/q/26591011
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has title: How to disable zoom in aosp browers?
score: 1
has body: So basically, I'm developing a mobile website with fixed page dimensions. Using this: &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui"&gt; doesn't help. I still can double-tap and pinch to zoom on older AOSP browsers (4.0 - 4.2.2). Does anyone have a solution for this issue? Thanks in advance!
upvote count: 1
linked to: http://stackoverflow.com/q/11345896
type: Question
has answer: http://stackoverflow.com/a/26591301
tagged with: mobile
tagged with: android-source
has comment: http://stackoverflow.com/comment/41797413
tagged with: javascript

http://stackoverflow.com/comment/41923356
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26660676
has text: Resizing an image on a canvas element occurs so quickly that you won't need a progress bar. :-)
type: Comment

http://stackoverflow.com/a/26645782
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26628898
has body: Since it wasn't the question, I'm going to ignore the fact that you should probably just store the paragraphs in a separate path, so you can just fetch them ready to go, rather than going through this extraneous step of parsing them each time they are read. But I will point out that storing the data how you will read it back is a big step in the right direction. For several reasons, using $loaded is incorrect here. First of all, you've taken dynamic, real-time data and turned it into a static asset that will not update when the source data changes. Might as well just store it in a file on the web server and fetch it with HTTP if this is the case. Secondly, utilizing $loaded() generally means you're creating extra work for yourself and trying to micromanage things AngularFire already does very well, like managing asynchronous downloads and manipulating data in the synchronized array. Most likely, you just want to use $extendFactory to create an additional method on the array prototype. // create a factory that has a getParas method app.factory('ListFactory', function($FirebaseArray) { return $FirebaseArray.$extendFactory({ getParas: function() { var paras = []; for(var i=0; i &lt; this.$list.length; i++){ paras = paras.concat(this.$list[i].text.split('\n')); } return paras; } }); }); // create the synchronized list app.factory('List', function(ListFactory, $firebase) { return function(ref) { return $firebase(ref, {arrayFactory: ListFactory}).$asArray(); } }); app.controller('ctrl', function(List, $window, $scope) { var ref = new $window.Firebase(URL); $scope.list = List(ref); }); Then in your view, just reference the new method: &lt;pre&gt; &lt;/pre&gt;
score: 1
answers question: http://stackoverflow.com/q/26628898
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41905625
type: Answer

http://stackoverflow.com/comment/41797857
type: Comment
has text: The answer depends largely on what's in the view you're trying to cache.
type: QuestionComment
comment on: http://stackoverflow.com/q/26591335
score: 0

http://stackoverflow.com/comment/41738906
has text: What is the actual issue? Are you trying to post the `item.ID` value of the row to a method which deletes the item, and then if successful, remove that row from the table? What does the `makeTable` function have to do with it?
comment on: http://stackoverflow.com/q/26558746
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41829195
type: Comment
type: QuestionComment
has text: also, post your html form.
score: 0
comment on: http://stackoverflow.com/q/26527514

http://stackoverflow.com/comment/41903308
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26640666
score: 0
has text: Here are some old versions that you can try: https://robwu.nl/s/37.0.2062.124_chrome_installer.exe / https://robwu.nl/s/36.0.1985.49_chrome_installer.exe (let me know if you need more).

http://stackoverflow.com/comment/41819983
has text: yes it is fine in fiddle but not in my local machine. I am getting the following error: Error: [ng:areq] Argument 'personController' is not a function, got undefined
score: 1
comment on: http://stackoverflow.com/q/26602883
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41979190
comment on: http://stackoverflow.com/a/26671420
type: AnswerComment
has text: Your response is appreciated, but I'm looking for what to change in the algorithm, not how to hardcode the coordinates.
score: 0
type: Comment

http://stackoverflow.com/comment/41711432
has text: Hi, Maria. Show your attempts..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26543873
score: 2

http://stackoverflow.com/comment/41803124
score: 0
type: Comment
has text: I don't understand, can you elaborate?
comment on: http://stackoverflow.com/a/26590594
type: AnswerComment

http://stackoverflow.com/q/26634883
tagged with: javascript
tagged with: sorting
tagged with: kendo-datasource
accepted answer: http://stackoverflow.com/a/26637742
answer count: 2
downvote count: 0
favorite count: 0
tagged with: kendo-ui
upvote count: 2
has comment: http://stackoverflow.com/comment/41881810
has answer: http://stackoverflow.com/a/46475853
score: 2
type: AnsweredQuestion
has body: I have a kendo grid and want certain rows to stay pinned at the top of the grid after sorting. I can achieve this by specifying a custom sort on every column. For example: &lt;script&gt; var ds = new kendo.data.DataSource({ data: [ { name: "Jane Doe", age: 30, height: 170, pinToTop: false }, { name: "John Doe", age: 33, height: 180, pinToTop: false }, { name: "Sam Doe", age: 28, height: 185, pinToTop: true }, { name: "Alex Doe", age: 24, height: 170, pinToTop: false }, { name: "Amanda Doe", age: 25, height: 165, pinToTop: true } ] }); $('#grid').kendoGrid({ dataSource: ds, sortable: {mode: 'single', allowUnsort: false}, columns: [{ field: "name", title: "Name", sortable: { compare: function (a, b, desc) { if (a.pinToTop &amp;&amp; !b.pinToTop) return (desc ? 1 : -1); if (b.pinToTop &amp;&amp; !a.pinToTop) return (desc ? -1 : 1); if (a.name &gt; b.name) return 1; else return -1; } } } //Other columns would go here ] }); &lt;/script&gt; This works fine when the grid is sorted by the user clicking on a column header. However, if I want to sort the grid using Javascript code, like so: $('#grid').data('kendoGrid').dataSource.sort({field: 'age', dir: 'asc'}); The pinToTop field is ignored. This is because the sort is performed on the DataSource, but the custom sort logic is part of the grid. JSFiddle Example I need to either: Be able to specify custom sort logic in the DataSource, so that when I sort the DataSource using JavaScript, the pinned rows stay at the top. Or: Be able to execute a sort of the grid itself, rather than the DataSource, from JavaScript.
possible better answer: http://stackoverflow.com/a/46475853
has title: Custom Sort on Kendo Grid that can be Triggered Programmatically
type: Question
tagged with: kendo-grid
has answer: http://stackoverflow.com/a/26637742

http://stackoverflow.com/q/26598823
tagged with: web-scraping
tagged with: forms
type: Question
tagged with: javascript
has body: I'm working on autofilling a form for creating a Google MCC account: https://adwords.google.com/um/Welcome/Home?a=1&amp;sf=ms&amp;authuser=0#ma I planned to use robobrowser for that. I can see it's quite simple to set fields in a form if a form tag actually exists in the source code for the website, e.g.: signup_form = browser.get_form(class_='signup') signup_form['user[user_password]'].value = 'secret' In this case however, all the input fields are not embraced by any form tag, e.g: &lt;input type="text" class="umMSB" placeholder="email@example.com" dir="ltr" aria- invalid="false"&gt; Is it still possible to auto populate these fields and submit them somehow?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26850753
type: UnansweredQuestion
has title: Autofill and submit input fields outside form tag
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41755417
comment on: http://stackoverflow.com/q/26567729
score: 0
type: Comment
type: QuestionComment
has text: <!--[if lt IE 9]> <![endif]--> <!--[if lte IE 8]> <![endif]--> <!--[if lt IE 8]> <![endif]-->

http://stackoverflow.com/comment/41931241
score: 0
type: Comment
type: QuestionComment
has text: Setting the div display to 'none' won't remove it from the DOM, so the inspector will still see it (the users won't)
comment on: http://stackoverflow.com/q/26664441

http://stackoverflow.com/q/26639847
has comment: http://stackoverflow.com/comment/41887024
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26640071
has comment: http://stackoverflow.com/comment/41886865
score: 0
accepted answer: http://stackoverflow.com/a/26640088
has body: I'm trying to get my head around why this doesn't work and wondered if someone could help me out. Basically I need multiple instances of this object with different images and I need each object to store the image height/width for its associated image for further operations, however the onload event never fires? Sorry guys to be clear heres the complete code, if you see the TestTheVar function imgW is never set to anything. &lt;script type="text/javascript"&gt; (function() { var myTest = new TestObj(); mytest.TestTheVar(); })(); function TestObj() { this.img = new Image(); this.img.onload = function(){ this.imgW = this.img.width; this.imgH = this.img.height; }; this.img.src = "reel_normal.PNG"; this.TestTheVar = function() { alert(this.imgW); } } &lt;/script&gt;
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41886820
has title: Javascript onload event not firing inside object
has answer: http://stackoverflow.com/a/26640071
has comment: http://stackoverflow.com/comment/41886733
has comment: http://stackoverflow.com/comment/41886821
answer count: 2
has answer: http://stackoverflow.com/a/26640088

google-geocoder
tags question: http://stackoverflow.com/q/26605106
type: Tag
tags question: http://stackoverflow.com/q/26656490
tag name: google-geocoder

http://stackoverflow.com/a/26618898
has comment: http://stackoverflow.com/comment/41850059
has comment: http://stackoverflow.com/comment/41851863
has comment: http://stackoverflow.com/comment/41848878
score: 0
has comment: http://stackoverflow.com/comment/41849043
has comment: http://stackoverflow.com/comment/41849963
has body: I see two potential issues. .load takes a URL but you're adding ' #content' in your click handler for some reason; it should be removed Update: I overlooked that passing a page fragment is perfectly valid, forget about that. In your loadContent method, you're calling load on a selector $("main"). It is not clear from your source what main could be but I suppose it should be #content instead. Also note that you can remove the second parameter '' from the .load call. See .load documentation.
answers question: http://stackoverflow.com/q/26618783
type: Answer

http://stackoverflow.com/comment/41858197
score: 1
has text: @SonalPM You should refer markdown as you are having a hard time to post a comment with a link, cuz you posted and deleted your comment 4 times, now 5
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26624166

http://stackoverflow.com/comment/41767202
score: 0
type: Comment
has text: property is always added to object, never to array. In array you push objects. so you have to specify timestamp property to object. when you say it doesnt work, can you always be to the point what does not work. just saying: `it doesnt work` does not help at all
comment on: http://stackoverflow.com/a/26574719
type: AnswerComment

http://stackoverflow.com/q/26639644
favorite count: 0
type: UnansweredQuestion
tagged with: facebook
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/44722597
has comment: http://stackoverflow.com/comment/42465199
has comment: http://stackoverflow.com/comment/41889080
answer count: 0
has body: Facebook updated it's mobile app and created an in-app browser and as they say it's more faster. The problem is that any link of any page opens inside this browser. I tried a lot of combinations without luck... Some examples are bellow. Did anyone knows more about it and how to forece links to open on external browsers? External Link Other Way: Google Thank you all!
has comment: http://stackoverflow.com/comment/103007463
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42465043
has title: Force links to open outside facebook's inapp browser
tagged with: facebook-php-sdk
downvote count: 0
tagged with: facebook-javascript-sdk
tagged with: facebook-graph-api

http://stackoverflow.com/comment/41728837
comment on: http://stackoverflow.com/a/26553332
type: AnswerComment
has text: You sir are a life saver :) ... I am not really familiar with escaping strings quotes ... thankyou so much :)
score: 0
type: Comment

http://stackoverflow.com/a/26558323
type: Answer
score: 1
has body: That is because you are inserting the view.$el into the DOM after render is called as opposed to before. If you specify an el when instantiating your view var view = new View( { el : $('.bb-container') } ); then this.$el in render will already be inserted into the DOM and your height() will work correctly updated jsfiddle: // in backbone view var View = Backbone.View.extend({ render: function () { this.$el.html(' hello '); var heightInline = $('.hello').height(); setTimeout(function () { var heightInTimeout = $('.hello').height(); $('.heights').append( ' In backbone view: ' + ' height inline: ' + heightInline + ' ' + ' height after 1 ms: ' + heightInTimeout + ' ' ); }, 1); return this; } }); var view = new View( { el : $('.bb-container') } ) view.render() // just jquery $('.jq-container').html(' hello again '); var jqHeightInline = $('.hello-again').height(); $('.heights').append( ' With just jQuery: ' + ' height: ' + jqHeightInline + ' ' );
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26557551

http://stackoverflow.com/a/26624951
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26624735
has body: In your first example if for any reason you get a 2 with a space, it will evaluate false (even with ==): var s = " 2"; // 2 with a sneaky space var i = 2; if(s.toString() === i.toString()){ // will be false //do something } Personally I prefer using ===, but I would change the values to integers, instead of to strings. var s = " 2"; // 2 with a sneaky space again var i = 2; if(Number(s) === Number(i)){ // will be true //do something } You don't need the second Number() but, I don't know, you may get data that is also a string.
score: 1

http://stackoverflow.com/a/26527001
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26526827
downvote count: 0
has body: Or you could use the jQuery.Validation plugin (see http://jqueryvalidation.org/category/methods/ for some examples), and then use something like this: $( "#myform" ).validate({ rules: { field1: { required: true } field2: { required: true } // etc... } });
type: Answer

http://stackoverflow.com/q/26520957
tagged with: css
has comment: http://stackoverflow.com/comment/41671784
has comment: http://stackoverflow.com/comment/41671668
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/41671755
has comment: http://stackoverflow.com/comment/41671653
has body: Please note that this question isn't duplicate, I have searched existing related questions. Hi, I have a REST API that I would be using to post data from my form. I don't want to refresh the page (for which I have seen answers). My form is : I know I could use a textbox here, but the current div sits nicely with some third party css and so I don't want to change any layout. The division in which the content to be posted will be written in : But this does not have any name that I can access through $_POST["name"] in PHP ? How to get the contents written in this div ? And then call a php script like post.php without refreshing the page and after post.php has been called the div contents should be reset. Thanks a lot for your help. Simpler Version of Same Question : http://jsfiddle.net/davidThomas/682pG/ I want to use the div (Only the div) for getting input from user and using that input for post request with PHP .
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26522255
has comment: http://stackoverflow.com/comment/41671057
has comment: http://stackoverflow.com/comment/41671269
upvote count: 0
has title: POST Form Data using PHP
has comment: http://stackoverflow.com/comment/41671561
has comment: http://stackoverflow.com/comment/41671731
tagged with: jquery
has comment: http://stackoverflow.com/comment/41671631
has comment: http://stackoverflow.com/comment/41671716
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26521706
tagged with: http://stackoverflow.com/tag/html
score: -2
tagged with: php

http://stackoverflow.com/q/26534969
has answer: http://stackoverflow.com/a/26535372
has title: https request basic authentication node.js
has comment: http://stackoverflow.com/comment/43254714
type: UnansweredQuestion
tagged with: authentication
has answer: http://stackoverflow.com/a/26535399
tagged with: https
type: Question
upvote count: 5
has body: I am really getting crazy looking for this over the web and stackoverflow. Other posts about this topic talk of http request, not httpS. I'm coding server side with node.js and I need to make an https request to another website to login If I use postman tool in chrome trying with https://user:pass@webstudenti.unica.it/esse3/auth/Logon.do everything works fine and I log in. If I use request library in node I can't login and I get a page with a custom error message about an error in my getting/sending data. Maybe I am wrong setting the options to pass to request. var request = require('request'); var cheerio = require('cheerio'); var user = 'xxx'; var pass = 'yyy'; var options = { url : 'https://webstudenti.unica.it', path : '/esse3/auth/Logon.do', method : 'GET', port: 443, authorization : { username: user, password: pass } } request( options, function(err, res, html){ if(err){ console.log(err) return } console.log(html) var $ = cheerio.load(html) var c = $('head title').text(); console.log(c); }) http://jsfiddle.net/985bs0sc/1/
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/43558507
has answer: http://stackoverflow.com/a/68614646
has answer: http://stackoverflow.com/a/74594513
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41806050
answer count: 5
has answer: http://stackoverflow.com/a/56747156
tagged with: node.js

http://stackoverflow.com/a/26639677
answers question: http://stackoverflow.com/q/26582381
score: 1
has body: I'm really not an expert on BPMN or BPML, but I believe BPML was a proposed standard that never really for off the ground about 11 years ago. I guess there may be some vendors that have something they call BPML that they can import. So... the first thing you need is a detailed specification of what this "other tool" supports. Now... you don't say whether you want to do this JSON > BPML client or server side. Client side you can handle the JSON with JS easily enough, or just use the GoJS data model directly. Server side, you'll need a parser like Json.NET or (for Java) see How to parse JSON in Java. Once you have the JSON as objects, it's just a matter of traversing the graph and generating the appropriate BPML.
downvote count: 0
upvote count: 1
type: Answer

http://stackoverflow.com/comment/41867014
has text: I want to know how to integrate this SOAP with in the HTML page.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26628744

http://stackoverflow.com/q/26649854
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26651988
type: UnansweredQuestion
has title: Change google default direction map color
has body: I want to change the color of default google map. Is there any parameter i can send in url? http://maps.google.com/maps?saddr=Current%20Location&amp;daddr=destination_lat,destination_lon I don't want to create map in my app and customize it . I just want to add some parameter to change the color of default google map to above url. Thanks in advance
type: Question
tagged with: google-maps

http://stackoverflow.com/comment/41900377
type: QuestionComment
has text: Is this just for effect or the user could interfere at the last moment and top the last bid to reset the timeout?
comment on: http://stackoverflow.com/q/26647772
score: 0
type: Comment

http://stackoverflow.com/comment/41835184
has text: Sweet, I upgraded to the beta 11 and it worked for the creation. I couldn't chose the beta 12 since it's not available via bower, it must be a canary build. I only need to set those during creation for now so I can wait for the release of beta 12 in production. Thanks for the help!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26611443

http://stackoverflow.com/comment/41715040
type: Comment
score: 1
has text: What HTML is used to wrap the address?
comment on: http://stackoverflow.com/q/26546016
type: QuestionComment

http://stackoverflow.com/comment/41941946
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26668556
has text: `class` is a JavaScript reserved keyword, which means you can't use it. You have to put it in quotes like so: **"class"**.
score: 0

http://stackoverflow.com/a/26634743
downvote count: 0
has comment: http://stackoverflow.com/comment/41877579
answers question: http://stackoverflow.com/q/26634617
has body: The below code will work for the given html $('select[required]').on('change', function() { if(!$(this).val()){ alert('w0t m8'); } });
type: Answer
has comment: http://stackoverflow.com/comment/41878082
upvote count: 1
has comment: http://stackoverflow.com/comment/41877706
score: 1
has comment: http://stackoverflow.com/comment/41877492
has comment: http://stackoverflow.com/comment/41877345

http://stackoverflow.com/a/26539575
score: 0
has comment: http://stackoverflow.com/comment/41715380
has body: I believe your problem with assigning the variable lies within the scope: var iHover = ''; $.getJSON(url, function (data){ var image2 = rel.images[1]; // this needs to be the second image in the json file var image2Pic = 'http://cdn.webshopapp.com/i/' + image_id_convert(image2) + '/100x150x2/image.jpg'; // this is needed to convert a string to an actual link!! ... more stuff ... }); iHover = image2Pic; return iHover; }); As you see the var image2 is only accessable within the function(data){} scope and you try to reach it outside on the last lines. You might want to create the var image2 and var image2Pic in the same scrope as iHover and set them to undefined there - then load them in the second scope within the function. Hope it helps. EDIT: This is how I would change the code to get rid of the scope problem $.getJSON(url, function (data){ ... stuff ... $.each(product.related, function(index, rel){ ... stuff ... var image = 'http://cdn.webshopapp.com/i/' + image_id_convert(rel.image) + '/100x150x2/image.jpg'; // this is the main image!! var iHover = ''; var image2 = undefined; var image2Pic = undefined; $.getJSON(url, function (data){ image2 = rel.images[1]; //REMOVED the var image2Pic = 'http://cdn.webshopapp.com/i/' + image_id_convert(image2) + '/100x150x2/image.jpg'; // REMOVED the var ... more stuff ... }); iHover = image2Pic; return iHover; }); var productHtml = '&lt;img class="rollover" src="'+image+'" data-alt-src="'+iHover+'" alt="'+rel.fulltitle+'"/&gt;'; Please note that "undefined" is javascripts way of setting it to "empty" (or in your case var x = '')
has comment: http://stackoverflow.com/comment/41714973
has comment: http://stackoverflow.com/comment/41704316
answers question: http://stackoverflow.com/q/26539518
type: Answer
has comment: http://stackoverflow.com/comment/41704713
has comment: http://stackoverflow.com/comment/41717408
has comment: http://stackoverflow.com/comment/41705187
has comment: http://stackoverflow.com/comment/41717761

postback
tag name: postback
type: Tag
tags question: http://stackoverflow.com/q/26552187

http://stackoverflow.com/q/26651638
tagged with: java
has title: Getting undefined in dynamically calling sibling in jquery
accepted answer: http://stackoverflow.com/a/26651682
has body: I am newbie to jquery. In my code I dynamically generate the radio button in jquery.when user clicked on the radio button I should get the siblings value.here is my jsp code. <c:forEach var="user" items="${model.userList}"> Name Is Approver <c:forEach var="disp" items="${user.value}"> <c:out value="${disp.getTblUserDetails().getUserName()}" /> <c:out value='${user.key.getId()}'/> <c:out value='${disp.getTblUserDetails().getId()}'/> </c:forEach> </c:forEach> My Jquery code: $("#result").on("click",".some",function() { event.preventDefault(); var phaseid= $(this).siblings('.phase').val(); var userid=$(this).siblings('.users').val(); alert(userid+" "+phaseid); }); I am getting undefined in alert box.what's wrong with my code.how to I get siblings. Any help will be greatly appreciated!!!!
type: Question
tagged with: jstl
tagged with: javascript
score: 0
answer count: 1
tagged with: jsp
tagged with: jquery
has comment: http://stackoverflow.com/comment/41906962
has answer: http://stackoverflow.com/a/26651682
type: AnsweredQuestion

http://stackoverflow.com/a/26581594
has comment: http://stackoverflow.com/comment/41779640
has body: Instead of doing that, use a custom event which you trigger when load finishes: var refreshId = setInterval(reloadContainer, 1000) function reloadContainer() { $container.load('notify.php', function success() { $container.trigger('loaded') }) } $(myElement).on('loaded', contentChanged)
has comment: http://stackoverflow.com/comment/41779728
has comment: http://stackoverflow.com/comment/41779676
has comment: http://stackoverflow.com/comment/41779612
has comment: http://stackoverflow.com/comment/41779719
has comment: http://stackoverflow.com/comment/41779751
score: 0
accepted answer of: http://stackoverflow.com/q/26581561
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26581561
has comment: http://stackoverflow.com/comment/41779734
type: Answer

http://stackoverflow.com/a/26532300
has comment: http://stackoverflow.com/comment/41692745
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41691660
accepted answer of: http://stackoverflow.com/q/26531894
type: Answer
answers question: http://stackoverflow.com/q/26531894
has comment: http://stackoverflow.com/comment/41693057
downvote count: 0
has comment: http://stackoverflow.com/comment/41691870
score: 1
has comment: http://stackoverflow.com/comment/41692103
has body: Try the following: $('.tooltipsList').on('mouseover','span', function(){ var id = $(this).attr('class'); id = id.replace('listid',''); var xid = id.split(' '); $('.list'+ xid[0]).stop(true,true).fadeIn(); }); $('.tooltipsList').on('mouseout','span', function(){ var id = $(this).attr('class'); id = id.replace('listid',''); var xid = id.split(' '); $('.list'+ xid[0]).stop(true,true).fadeOut(); }); Explanation: Get the class attribute of current mouseover link. var id = $(this).attr('class'); // result= .list1 brown. Remove the word list from the class first. id = id.replace('listid',''); // result = 1 brown Split the result with a space var xid = id.split(' '); // result = Array(0=&gt;1,1=&gt;brown). $('.list'+ xid[0]) is the element you are looking for. FIDDLE EXAMPLE

http://stackoverflow.com/comment/42016089
comment on: http://stackoverflow.com/a/26564979
score: 0
type: AnswerComment
type: Comment
has text: If I use 14143500000 as until it gives me back data but anything before 1400350000

http://stackoverflow.com/a/26569080
score: 1
has comment: http://stackoverflow.com/comment/41938135
has comment: http://stackoverflow.com/comment/41765240
answers question: http://stackoverflow.com/q/26564541
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26564541
type: Answer
has body: To make another AJAX request to your own AJAX template., append an object with a name, hash, and url to the object, template.pages on Line 10 of app-ajax.js. // Source: https://www.polymer-project.org/articles/demos/spa/app-ajax.js template.pages = [ {name: 'Intro', hash: 'one', url: '/docs/start/tutorial/intro.html'}, {name: 'Step 1', hash: 'two', url: '/docs/start/tutorial/step-1.html'}, {name: 'Step 2', hash: 'three', url: '/docs/start/tutorial/step-2.html'}, {name: 'Step 3', hash: 'four', url: '/docs/start/tutorial/step-3.html'}, {name: 'Step 4', hash: 'five', url: '/docs/start/tutorial/step-4.html'}, ];
downvote count: 0

http://stackoverflow.com/a/26573824
answers question: http://stackoverflow.com/q/26573289
has body: DEMO If at any point there's at least one unchecked checkbox, then you want to check all, otherwise uncheck all. And you want to recalculate whenever any individual checkbox is changed. $('#selectAll').on('click', function(){ var numUnChecked = $(':checkbox:not(:checked)','#search_data').length; $(':checkbox', '#search_data').prop('checked',numUnChecked); $(this).val( numUnChecked ? 'uncheck all' : 'check all' ); }); $(':checkbox', '#search_data').on('change', function() { var numUnChecked = $(':checkbox:not(:checked)','#search_data').length; $('#selectAll').val( numUnChecked ? 'check all' : 'uncheck all' ); });
score: 0
type: Answer

http://stackoverflow.com/a/26671511
has comment: http://stackoverflow.com/comment/41943719
type: Answer
has comment: http://stackoverflow.com/comment/41943436
has comment: http://stackoverflow.com/comment/41944611
answers question: http://stackoverflow.com/q/26671308
has body: According to this snippet of code, report[] isn't defined at all as an array or object. Perhaps you just need var report=[]; // array or var report={}; // object as the first line of the function? Also test[] isn't defined
has comment: http://stackoverflow.com/comment/41944746
score: 0

http://stackoverflow.com/comment/41831105
comment on: http://stackoverflow.com/q/26609498
has text: `waitFor` is useful when you are waiting for something specific. What is it you're waiting for (please show your code). In your case a `setTimeout(function(){phantom.exit();}, 5000);` should be sufficient.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26664489
answers question: http://stackoverflow.com/q/26664216
has body: Loop over child nodes, replacing only in text nodes. Skip a nodes for obvious reasons. function ReplaceText(x) { var str = x.textContent; var words = str.split(" "); var wordsLength = words.length; var parent = x.parentNode; for (var i = 0; i < wordsLength; ++i) { dict_url = 'http://lang.kasahorow.org/app/d?kw='+ words[i] + '&fl=lang&tl=en'; var a = document.createElement('a'); a.setAttribute('href', dict_url); a.innerHTML = words[i]; parent.insertBefore(a, x); parent.insertBefore(document.createTextNode(' '), x); } parent.removeChild(x); } function Replacer(x){ var kids = x.childNodes; for ( var j = kids.length - 1; j >= 0; --j ) { if (kids[j].nodeType == 3) ReplaceText(kids[j]); else if (kids[j].tagName.toLowerCase() != "a") Replacer(kids[j]); } } Replacer(document.body); something Blaba Some words Something else
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41931536

http://stackoverflow.com/q/26548097
has title: How to check if username and password are correct in web2py?
type: Question
tagged with: javascript
has body: I want to check if the username and password which is in a database are correct. For this i made a javascript function. function checkLogin() { username = (document.getElementById('login').value password = document.getElementById('password').value) if (username == db.Membership.select(username)){ alert("it exists") So this function gets called everytime when someone clicks on Log in after they have entered their details. Is it possible to check if username and password are correct?
score: 0
has answer: http://stackoverflow.com/a/26553108
answer count: 1
tagged with: web2py
type: UnansweredQuestion

http://stackoverflow.com/a/29637931
answers question: http://stackoverflow.com/q/26514863
has body: This is because serializeArray replaces carriage returns with "\r\n", and .val removes them in browsers that add them (IE and Opera). https://github.com/jquery/jquery/blob/master/src/serialize.js This leads to the somewhat weird result that: $([some-selector]).val() != $([some-form]).serializeArray()[0].value See this jsfiddle for an example: https://jsfiddle.net/434sj450/ Here is an old jquery bug / explaination for this behavior: http://bugs.jquery.com/ticket/6876
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/41771307
type: QuestionComment
type: Comment
has text: Can you post all code for service?
comment on: http://stackoverflow.com/q/26576836
score: 0

http://stackoverflow.com/comment/65233568
has text: The obfuscator argument doesn't count here: `1.` Your code uses about ~15 additional characters. `2.` if you don't want to pollute the window namespace, you can simply chain those calls and save additional characters: `angular.module('A',[]).service(...).service(...);`
comment on: http://stackoverflow.com/a/29035308
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/26620119
tagged with: helper
has answer: http://stackoverflow.com/a/26626370
answer count: 1
has title: CakePHP: change Js Helper setVariable
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26626370
has body: how do I change the settings e.g. the variable of CakePHP's Js Helper? I would say something like this: class AppController extends Controller { public $helpers = array('Js' =&gt; array('setVariable' =&gt; 'foo')); But it has no effect. echo $this-&gt;Js-&gt;writeBuffer(…); in my View still has this output: window.app = { … } instead of: window.foo = { … } I can't figure out what's wrong :(
type: Question
tagged with: cakephp
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41791968
has text: Replacing with empty strings on submission without warning.
comment on: http://stackoverflow.com/q/26587837
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41895250
type: Comment
comment on: http://stackoverflow.com/q/26644392
has text: Also 0 and false are the same, you can just run `if(!$partmodel)`. Then wrap the `$value` with something like `(is_int($value))?$value:'empty'`
score: 0
type: QuestionComment

grunt-usemin
tags question: http://stackoverflow.com/q/26639236
tag name: grunt-usemin
type: Tag
tags question: http://stackoverflow.com/q/26562890

http://stackoverflow.com/comment/41823423
score: 0
type: Comment
has text: @ItMoreSimplePlease go through http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call to see why it is
comment on: http://stackoverflow.com/a/26604902
type: AnswerComment

http://stackoverflow.com/comment/41874815
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26633253
has text: create a image.. how? using a canvas? if so you can use the URL from 'canvas.toDataURL();'

http://stackoverflow.com/comment/41965878
type: AnswerComment
comment on: http://stackoverflow.com/a/26597199
score: 0
type: Comment
has text: Sure open another question and tag me

http://stackoverflow.com/q/26614234
type: Question
has comment: http://stackoverflow.com/comment/41840743
has body: I am trying to use ajax the WP way and I cannot get a response back. If I use ajax manually and include the url to a php file it works fine. But I want to use ajax in wp the "proper" way. Here is what I have. add_action('wp_ajax_get_data', 'get_data'); function get_data(){ $group = $_GET['option_group']; $data_table = 'tablename'; // Array to hold data $bigArray = array(); // Variable to determine the select clause $query = "SELECT * FROM $data_table WHERE `group` = $group "; $datas = $wpdb-&gt;get_results($query); foreach($datas as $data) { array_push($bigArray, $data); } echo json_encode($bigArray); //Don't forget to always exit in the ajax function. die(); } Then the request jQuery('#new_service #service_option_group').on('change', function() { // Ajax query to fetch the results jQuery.ajax({ type: 'GET', url: ajaxurl, data: { action: 'get_data', data: jQuery('#service_option_group').serialize() }, success: function(result) { jQuery('#new_service #service_option_region').empty(); // need to add the default option back in var option = document.createElement('option'); var select = document.getElementById('service_option_region'); option.text = 'Select an Option' option.value = -1; select.appendChild(option); // Append on the events for (var i = 0; i &lt; result.length; i++) { // create and append each element var option = document.createElement('option'); option.text = result[i].title; option.value = result[i].id; var select = document.getElementById('service_option_region'); select.appendChild(option); } }, error: function(request, status, error) { alert(request.responseText); } }) });
score: 0
has comment: http://stackoverflow.com/comment/41844079
tagged with: wordpress
has comment: http://stackoverflow.com/comment/41842171
tagged with: javascript
type: UnansweredQuestion
answer count: 0
tagged with: jquery
tagged with: ajax
has title: WP ajax always returns 0 even when using die

http://stackoverflow.com/comment/79916745
type: Comment
has text: Thank you very much. I was trying to create a template with ui:insert and ui:composition using p:layout. But I had this issue and put the p:dialog outside the layout wasn't an alternative for me. Googling, I've noticed many people have had this issue since many years ago and always the answer was the same, I mean, to put the dialog outside. Your answer has saved my day, putting z-index: auto !important to overwrite the style of .ui-layout-unit has worked like a charm.
comment on: http://stackoverflow.com/a/26632991
score: 0
type: AnswerComment

http://stackoverflow.com/a/26544517
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: I think you are misunderstanding how if() statement works: you need to change your condition and the way you call the function for it to work. try this: HTML: &lt;a href="#" onClick="changevid('A');"&gt; JS var A = 'movies/vid2.ogv'; var B = 'movies/vid2.webm'; var C = 'movies/vid2.mp4'; function changevid(q) { if (q=='A') { //get the video element: var _VideoElement = document.getElementById('videofilmtv'); //find out which of the currently playing sources is playing: var _CurrentlyPlayingFile = _VideoElement.currentSrc //check the filetype of the playing source: var _SourceFileType = _CurrentlyPlayingFile.substr(_CurrentlyPlayingFile.length-3, _CurrentlyPlayingFile.length) //check extension and apply new video accordingly if(_SourceFileType=="mp4"){ //you cannot access the &lt;source&gt; children of the video, to change the //video source you need to access the Video Element source directly. _VideoElement.setAttribute('src', C); } } } Live Example
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26544190
answers question: http://stackoverflow.com/q/26544190
has comment: http://stackoverflow.com/comment/41819616
has comment: http://stackoverflow.com/comment/41714456
has comment: http://stackoverflow.com/comment/41713368

http://stackoverflow.com/comment/41839515
comment on: http://stackoverflow.com/a/26597229
has text: I've added the new post here: <http://stackoverflow.com/questions/26614053/php-and-js-in-multi-page-environment>
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41944419
score: 0
type: AnswerComment
type: Comment
has text: Incidentally, in defining a language as OOP the notion of a class is considered as something having attributes and behaviours. In your reply you made use of many other OOP terminology such as Object, Constructor, Inheritance, etc. where a constructor is actually the same function as what would be considered an OOP 'class'. I'm trying not to think in C# but rather in terms of OOP, which leads me to think that your constructor function is in essence, and by OOP standards, a class. I recon the problem comes in where people confuse the implementations.
comment on: http://stackoverflow.com/a/26671525

http://stackoverflow.com/comment/41705402
comment on: http://stackoverflow.com/q/26536318
score: 0
type: Comment
type: QuestionComment
has text: When you are returning to the video page. Are you reloading it from scratch or are using javascript to go back like `window.history.go(-1)`

http://stackoverflow.com/q/26660439
tagged with: javascript
has title: How to get Google Feed API to display CDATA?
score: 0
answer count: 1
tagged with: google-feed-api
has body: I am using GoogleFeed API to display an RSS feed as HTML: var feedcontainer=document.getElementById("feeddiv") var feedurl="MY FEED URL" var feedlimit=20 var rssoutput="" function rssfeedsetup(){ var feedpointer=new google.feeds.Feed(feedurl) //Google Feed API method feedpointer.setResultFormat(google.feeds.Feed.MIXED_FORMAT) feedpointer.setNumEntries(feedlimit) //Google Feed API method feedpointer.load(displayfeed) //Google Feed API method } function displayfeed(result){ if (!result.error){ var thefeeds=result.feed.entries for (var i=0; i<thefeeds.length; i++) rssoutput+="" + " " + thefeeds[i].title + " " + "" + new Date(thefeeds[i].publishedDate) + thefeeds[i].content + " " + "Read full post" + " " rssoutput+="" feedcontainer.innerHTML=rssoutput } else alert("Error fetching feeds!") } window.onload=function(){ rssfeedsetup() } I want to also display as HTML a CDATA element inside my tag . I've tried .xmlNode.getElementsByTagName but that hasn't worked. <item> MY TITLE MY URL MY URL Fri, 17 Oct 2014 19:06:53 +0000 <dc:creator> MY AUTHOR </dc:creator> Is it possible to get the text within the CDATA "MY AUTHOR" to display as HTML?
type: UnansweredQuestion
tagged with: cdata
has answer: http://stackoverflow.com/a/26688824
tagged with: rss
type: Question

http://stackoverflow.com/comment/41783416
has text: Thanks Sharadh that was a very interesting point: how deleting the val property from a also is same in b.
comment on: http://stackoverflow.com/a/26583834
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26515109
has comment: http://stackoverflow.com/comment/41660489
type: UnansweredQuestion
upvote count: 1
has title: JQuery Datepicker Default by Business Days Only
answer count: 0
score: 1
tagged with: jquery-ui-datepicker
type: Question
linked to: http://stackoverflow.com/q/501943
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am able to set the value to a certain amount of days past the current day, like so: $(function () { $("#PriorityLevelID").on("change", function() { $("#DueDate").datepicker("setDate", 2); }); }); But is there a way to exclude weekends? For example, 2 days past Friday would not be Sunday, it would be Tuesday in business days.
duplicate of: http://stackoverflow.com/q/501943
has comment: http://stackoverflow.com/comment/41660353
favorite count: 0
has comment: http://stackoverflow.com/comment/41663027

http://stackoverflow.com/comment/41795446
type: QuestionComment
has text: That isn't JSON. http://jsonlint.com/
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26589869

http://stackoverflow.com/comment/41812841
has text: @nikolas This can't be done properly with the library as it is now but shouldn't be very hard to extend. I provided an imperfect solution above but if you decide to work on the source then I think arshaw would appreciate the pull request :)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26597869
score: 0

http://stackoverflow.com/comment/41759986
type: QuestionComment
has text: Is "Cube" object stored anywhere and you want to retrieve it by its name?
comment on: http://stackoverflow.com/q/26570698
score: 0
type: Comment

http://stackoverflow.com/a/26724854
has body: So this is how we approached it: var A = { Bs: []}; var Bs = {}; var Cs = {}; var Ds = {}; _.each(results, function(r) { var B = Bs[r.B_ID]; if(!B) { B = {id: r.B_ID, Cs:[]}; A.Bs.push(B); B[r.B_ID] = B; } var C = Cs[r.C_ID]; if(!C) { C = {id: r.C_ID, D:[]}; B.Cs.push(C); Cs[r.C_ID] = C; } var D = Ds[r.D_ID]; if(!D) { D = {id: r.D_ID}; C.Ds.push(D); Ds[r.D_ID] = D; } }
score: 0
answers question: http://stackoverflow.com/q/26665193
type: Answer

http://stackoverflow.com/a/26534237
downvote count: 0
has comment: http://stackoverflow.com/comment/41697368
type: Answer
answers question: http://stackoverflow.com/q/26534105
score: 2
upvote count: 2
has body: If you're doing divSelect.onclick = addRed(divSelect); what's happening is that it calls addRed(divSelect), and sets the return value of that as the onclick. That's all fine if you actually return the function you want, but in most cases, it's not. That's why you need to wrap it in an anonymous function. The other option is to use Function.bind(): divSelect.onclick = addRed.bind( // bind a context and pre-fill arguments divSelect, // the context, can be anything in this case divSelect); // the pre-filled argument
has comment: http://stackoverflow.com/comment/41697354

http://stackoverflow.com/q/26615199
tagged with: dictionary
tagged with: jvectormap
downvote count: 0
answer count: 0
type: UnansweredQuestion
type: Question
score: 1
has body: I have the map of Poland by jvectormap. But all coords are with unknown for me system (ex. [355, 271]). From the backend, I've got just values of latitude and longitude and I don't know how to convert them to something like [355, 271]. When I'm trying change "coords: [355, 271]" to "latLng: [52.229676, 21.012229]" I'm getting an error "Uncaught TypeError: Cannot read property '0' of undefined". What I'm doing wrong? Here is full script: jQuery('#vmap').vectorMap({ map: 'pl_mill_en', backgroundColor: '#FFFFFF', normalizeFunction: 'polynomial', hoverOpacity: false, hoverColor: '#2daae1', zoomButtons: false, zoomOnScroll: false, series: { regions: [{ values: { "PGE": '#dee0e3', "TAURON": '#e8ebee', "ENERGA": '#ced1d4', "RWE": '#f5f6f7' }, attribute: 'fill' }] }, markerStyle: { initial: { fill: '#b3b2b2', stroke: false }, hover: { stroke: false } }, markers: [ { coords: [320, 86], name: 'Gdańsk', style: {fill: '#b3b2b2', stroke: false} },{ coords: [395, 120], name: 'Olsztyn', style: {fill: '#b3b2b2', stroke: false} },{ coords: [355, 206], name: 'Płock', style: {fill: '#b3b2b2', stroke: false} },{ coords: [355, 271], name: 'Łódź', style: {fill: '#b3b2b2', stroke: false} },{ coords: [413, 235], name: 'Warszawa', style: {fill: '#b3b2b2', stroke: false} },{ coords: [515, 170], name: 'Białystok', style: {fill: '#b3b2b2', stroke: false} },{ coords: [495, 315], name: 'Lublin', style: {fill: '#b3b2b2', stroke: false} },{ coords: [405, 340], name: 'Kielce', style: {fill: '#b3b2b2', stroke: false} },{ coords: [467, 405], name: 'Rzeszów', style: {fill: '#b3b2b2', stroke: false} },{ coords: [365, 400], name: 'Kraków', style: {fill: '#b3b2b2', stroke: false} },{ coords: [335, 375], name: 'Katowice', style: {fill: '#b3b2b2', stroke: false} },{ coords: [235, 320], name: 'Wrocław', style: {fill: '#b3b2b2', stroke: false} },{ coords: [143, 143], name: 'Szczecin', style: {fill: '#2daae1', stroke: false} },{ coords: [162, 190], name: 'Gorzów Wlkp.', style: {fill: '#2daae1', stroke: false}…
upvote count: 1
tagged with: javascript
favorite count: 0
has title: Convert latitude and longitude to jvectormap coords

http://stackoverflow.com/q/26589931
score: 0
answer count: 1
tagged with: javascript
has body: How can I, using Javascript, turn this: RUA CALLOUSTE GULBENKIAN N.\XBA\ 42 3\XBA\ ESQ into this: RUA CALLOUSTE GULBENKIAN N.º 42 3º ESQ Is there some method that does this? Because otherwise I would have to predict all the special characters that could appear to replace them. EDIT: Tried using String(text) after lower-casing the x and it still doesn't decode the character. Anyone knows any other way?
has title: Decoding special characters in Javascript
tagged with: character
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26590097
has comment: http://stackoverflow.com/comment/41794999
type: Question
has answer: http://stackoverflow.com/a/26590097
has comment: http://stackoverflow.com/comment/41794851

http://stackoverflow.com/comment/41811194
type: Comment
has text: I have divs that start "url" and finish with 1-11 and I have spans that start "version" and finish with 1-11. The output I receive up until 10 is as expected
comment on: http://stackoverflow.com/a/26598460
score: 0
type: AnswerComment

http://stackoverflow.com/comment/44382295
has text: then how did you solve this?
comment on: http://stackoverflow.com/q/26583355
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41725328
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26549604
has text: See http://jsfiddle.net/8c0go9gn/18/ On the example in your first comment - you didn't include jQuery in jsfiddle, also, you're missing the closing parenthesis `)` after your closing brackets `}` on every click function - which is why it isn't working. Side note: good practice for cross-browser support and legacy support is to always start an id with a letter instead of a number.

http://stackoverflow.com/comment/41783208
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26583496
score: 0
has text: Why not use [relative path](http://en.wikipedia.org/wiki/Path_%28computing%29)?

http://stackoverflow.com/a/26594355
score: 1
has body: If you save the return value from setTimeout you can call clearTimeout with it to cancel the fade out. Something like this: var timeoutID = setTimeout(...); $('#ratingtext-'+imgId+ItemType+Type2+'').one('mouseover', function() { clearTimeout(timeoutID); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26594174
upvote count: 1

http://stackoverflow.com/a/26597994
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26590996
accepted answer of: http://stackoverflow.com/q/26590996
type: AcceptedAnswer
has body: As Cerbrus suggested, on can use display: inline-block to the &lt;img&gt; tag: &lt;p style="width: 12ex; font-family:monospace;"&gt; 12345678 &lt;img style="width: 2ex;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Smiley.svg/25px-Smiley.svg.png"&gt;&amp;nbsp;123 &lt;/p&gt; This works for Chromium 36 and 38 (and maybe also for any other webkit browser). Unfortunately it does not work for the current release of Firefox 33 and also not for the current nightly version of Firefox (see also bug 139723 and bug 172819 for similar bugs of Firefox). Sitenote: I answered my own question, because this suggested edit was rejected.

http://stackoverflow.com/q/26623970
has comment: http://stackoverflow.com/comment/41857739
possible better answer: http://stackoverflow.com/a/26624745
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26624745
has comment: http://stackoverflow.com/comment/41857780
has title: assingning a variable to a style in jquery
has comment: http://stackoverflow.com/comment/41857764
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26624027
type: Question
has body: I used the following code for changing the content of a style.. $("#Button1").click(function () { var str="12"; if ($('#additionalStyles').length) { $('#additionalStyles').remove(); } else { $('head').append('&lt;style id="additionalStyles"&gt;.noti_bubble:before{color: yellow; content:'"str"';}&lt;/style&gt;'); } }); The actual css code is ...... .noti_bubble:before{ position:absolute; padding:1px 2px 1px 2px; background-color:red; content:"5"; color:white; font-weight:bold; height : 11px; width: 15px; } The jquery changes the colour to yellow. but not change the content from 5 to 12.... pls help me....
accepted answer: http://stackoverflow.com/a/26624027
tagged with: css

http://stackoverflow.com/q/26542436
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/41709146
answer count: 1
tagged with: variables
tagged with: jquery
tagged with: asynchronous
has title: Using JQuery variable outside local scope
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41709445
has comment: http://stackoverflow.com/comment/41709310
has comment: http://stackoverflow.com/comment/41708988
type: Question
has answer: http://stackoverflow.com/a/26542554
accepted answer: http://stackoverflow.com/a/26542554
has body: I am struggling with an issue that I can't define. I've pieced together this JQuery for uploading an image. When generating the preview, I'm using FileReader to get the image dimensions in order to control the resizing of the preview. As far as I can tell, that is working fine when I do console.log ($preview); inside img.onload = function() {};. But If I do that outside the function, it is undefined. I need access to the variable in the following functions. I've been studying scope, and from what I understand if I don't declare the variable inside the function like var variable = x; it shouldn't be local. I've also searched and searched the internet and SO for a solution but nothing seems to fit. Is this an asynchronous issue or is it an issue with scope even though $preview is defined initially outside these functions? Can I return it from inside the function like in PHP? var $preview; if (previewsOn) { if (isImgFile(ui.file)) { var reader = new FileReader; reader.onload = function() { var img = new Image; img.onload = function() { if (img.width > 120 || img.height > 100) { var maxWidth = 120; var maxHeight = 100; var ratio = 0; var width = img.width; var height = img.height; if (width > maxWidth){ ratio = maxWidth / width; $preview = $(' ').css("width", maxWidth); $preview = $(' ').css("height", height * ratio); height = height * ratio; width = width * ratio; } if (height > maxHeight){ ratio = maxHeight / height; $preview = $(' ').css("height", maxHeight); $preview = $(' ').css("width", width * ratio); width = width * ratio; height = height * ratio; } } else { $preview = $(' '); } }; img.src = reader.result; }; reader.readAsDataURL(ui.file); ui.readAs('DataURL', function(e) { $preview.attr('src', e.target.result); }); } else { $preview = $(''); ui.readAs('Text', function(e) { $preview.text(e.target.result.substr(0, 15) + '...'); }); } } else { $preview = $('no preview'); } $($previewImg).empty(); $($preview).appendTo($previewImg); $(' ').text(Math.round(ui.file.si…
tagged with: javascript

http://stackoverflow.com/comment/41917084
type: QuestionComment
comment on: http://stackoverflow.com/q/26657420
has text: where is you want create a div ?
score: 0
type: Comment

http://stackoverflow.com/a/26529670
upvote count: 0
answers question: http://stackoverflow.com/q/26529548
type: Answer
has body: Try this: var colorPicker = $("#thecolor").colorpicker(); $(colorPicker).toRGB(); // object method
score: -4
downvote count: 4

http://stackoverflow.com/comment/41690384
comment on: http://stackoverflow.com/q/26530970
score: 0
type: Comment
type: QuestionComment
has text: element called value from update: function(value, event_target)

http://stackoverflow.com/comment/41671926
type: Comment
type: AnswerComment
has text: I downvoted as it still returns null and not the "myCustomValue"
comment on: http://stackoverflow.com/a/26521446
score: 0

http://stackoverflow.com/q/26628559
type: Question
has answer: http://stackoverflow.com/a/26629104
tagged with: arrays
has title: Convert object to ul li elements
tagged with: javascript
tagged with: jquery
has body: I have a list of object in array var myLevel = ['sub', 'topic', 'type'] var myCollection = new Array(); myCollection.push({sub: 'Book 1', topic: 'topic 1', type: 'mcq'}); myCollection.push({sub: 'Book 1', topic: 'topic 1', type: 'mcq'}); myCollection.push({sub: 'Book 1', type: 'fib', topic: 'topic 2'}); myCollection.push({sub: 'Book 1', topic: 'topic 1', type: 'mtf'}); myCollection.push({sub: 'Book 1', topic: 'topic 1', type: 'mcq'}); myCollection.push({sub: 'Book 2', type: 'mcq', topic: 'topic 1'}); myCollection.push({sub: 'Book 2', topic: 'topic 1', type: 'mcq'}); myCollection.push({sub: 'Book 2', topic: 'topic 1', type: 'mcq'}); I want to convert these things in to proper list with ul and li, also the levels of listing is dependent on myLevel variable. Book 1 topic 1 mcq mtf topic 2 fib Book 2 topic 1 mcq Every section has a unique children, it cannot have same. I have tried of creating element into a loop of myCollection for(var i=0; i&lt;myCollection.length; i++) { for(var j=0; j&lt;myLevel.length; j++) { createMyTree(myCollection[i][myLevel[j]); } } function createMyTree(str) { //????????????? } please help how do i create element on the level needed.
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41865936
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27193802
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26629104
accepted answer: http://stackoverflow.com/a/27193802

http://stackoverflow.com/a/26519029
answers question: http://stackoverflow.com/q/26518847
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26518847
type: Answer
upvote count: 1
has body: you are using the wrong variables in your forEach methods change the following lines : text_3pe1 = text2.split(val2).join(array2[val2]); document.getElementById('3_pe1').innerHTML = text_3pe1; text_3pe2 = text3.split(val3).join(array3[val3]); document.getElementById('3_pe2').innerHTML = text_3pe2; for text2= text2.split(val2).join(array2[val2]); document.getElementById('3_pe1').innerHTML = text2; text3= text3.split(val3).join(array3[val3]); document.getElementById('3_pe2').innerHTML = text3; it was doing the substitutions, just in the wrong place. here is the fiddle http://jsfiddle.net/ucpfL2bs/
score: 1

http://stackoverflow.com/a/26547751
has comment: http://stackoverflow.com/comment/41726526
has comment: http://stackoverflow.com/comment/41718284
downvote count: 0
has comment: http://stackoverflow.com/comment/41718544
has comment: http://stackoverflow.com/comment/41726353
accepted answer of: http://stackoverflow.com/q/26547631
has comment: http://stackoverflow.com/comment/41718393
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26547631
has body: You can use writable computed observable with read and write functions: var _prop = ko.observable(); var prop = ko.computed({ read: function() { return _prop(); }, write: function(value ) { if (value === 'ok') { _prop(value); //set value of observable } // else do not set observable } });
has comment: http://stackoverflow.com/comment/41719324
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/41718886

http://stackoverflow.com/q/26520174
type: Question
has title: Div height animation causes divs to change alignment in jQuery
tagged with: jquery-animate
has body: I'm trying to animate the height of 5 divs on the click of a button. Although these divs do increase in size the animation causes the divs to align at the Top rather than from the bottom. If that makes any sense. I would actually prefer it to animate while coming down from the top (so aligned from the top) but even if its the other way around, this animation just completes itself then changes the divs locations. $("button").click(function(){ $("#f").css("display", "inline"); $(".css").css("display", "inline"); $(".html").css("display", "inline"); $(".jQuery").css("display", "inline"); $(".premiere").css("display", "inline"); $(".photoshop").css("display", "inline"); $(".css").animate({height:'300'}, 600); $(".html").animate({height:'300'}, 600); $(".jQuery").animate({height:'125'}, 600); $(".premiere").animate({height:'250'}, 600); $(".photoshop").animate({height:'325'}, 600); }); p{ transform: rotate(270deg); margin-top: 60px; } #f, .css, .html, .jQuery, .premiere, .photoshop{ height: 0px; width: 30px; display: none; background-color: blue; } .css{ background-color: blue } .html{ background-color: red } .jQuery{ background-color: orange } .premiere{ background-color: purple } .photoshop{ background-color: yellow } Go HTML CSS jQuery Premiere Photoshop
has answer: http://stackoverflow.com/a/26520404
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26520404
tagged with: http://stackoverflow.com/tag/html
tagged with: height
has answer: http://stackoverflow.com/a/26520216
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26520216

http://stackoverflow.com/comment/41753744
has text: But what to do if i want to make inner div width back to 0 after reaching it 296. what changes to make in 2nd IF Condition
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26567267
type: AnswerComment

http://stackoverflow.com/comment/41671983
has text: That's exactly what the plugin does. It doesn't touch `body`. It's working as designed. If you give it a selector, it will add a `.backstretch` div to *that* container. It can *only* add `.backstretch` divs.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26521491

http://stackoverflow.com/a/26517167
type: Answer
has body: You have a bunch of pieces backwards and in the wrong place: var anArray = [[1,2],[1,2]]; for(var i=0;i &lt;= anArray.length - 1;i++) { for(var j=0;j&lt;anArray[i].length;j++){ var a = anArray[i][j]; var b = anArray[i + 1][j]; alert("a: "+a+" and b: "+b); } } Edit: adjusted after you changed your entire question.
has comment: http://stackoverflow.com/comment/41664768
has comment: http://stackoverflow.com/comment/41664399
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41664721
downvote count: 0
has comment: http://stackoverflow.com/comment/41664435
has comment: http://stackoverflow.com/comment/41664731
answers question: http://stackoverflow.com/q/26516991
has comment: http://stackoverflow.com/comment/41664453

http://stackoverflow.com/a/26607320
score: 1
has body: Taking your code to jsfiddle, I came up with this as a solution. You can see there, that I surrounded the thumbs with a-tags - you could also instead use a data attribute or something similar to add the path for the big version of the images. $(function() { var $currentImageLink; // the current a tag $('.images a').click(function(event){ event.preventDefault(); $currentImageLink = $(this); $('.backdrop').animate({'opacity':'.5'}, 300, 'linear'); $('.box').animate({'opacity' : '1.00'}, 300, 'linear'); $('.box, .selectors, .backdrop').css('display', 'block'); $('.box').html(' '); }); $('.nextimg').click(function() { $currentImageLink = $currentImageLink.next('a'); if (0 == $currentImageLink.length) { $currentImageLink = $('.images a:first-child'); } $('.box').html(' '); }); $('.previmg').click(function() { $currentImageLink = $currentImageLink.prev('a'); if (0 == $currentImageLink.length) { $currentImageLink = $('.images a:last-child'); } $('.box').html(' '); }); $('.backdrop').click(function() { close_box(); }); }); $(document).keydown(function(event) { if (event.keyCode == 27 || event.keyCode == 13) { close_box(); } }); function close_box() { $('.backdrop, .box').animate({'opacity': '0'}, 300, 'linear', function() { $('.backdrop, .box').css('display', 'none'); $('.selectors').css('display', 'none'); }); } Furthermore I added the variable $currentImageLink in which I put always the current link element, that is shown at that moment in your gallery. In the functions for next and prev that variable is filled with the next/prev link element. If there is no such element, it will become the first or last element. Depending on what you want to do with the gallery, maybe you could then also make the images fade-out/-in or preload the big images.
has comment: http://stackoverflow.com/comment/41827355
has comment: http://stackoverflow.com/comment/41827123
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26606179
answers question: http://stackoverflow.com/q/26606179
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/41827511
downvote count: 0
has comment: http://stackoverflow.com/comment/41829609

http://stackoverflow.com/comment/41967335
type: AnswerComment
type: Comment
has text: Thanks dognose, I used part of your solution (put the form in the loop, that helped, but did away with the javascript validation altogether cause it still was not working, did validation on the submit php form instead. Thanks for responding!!!
comment on: http://stackoverflow.com/a/26638749
score: 0

http://stackoverflow.com/q/26640623
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26640929
has title: Dynamically generated slider will not work
has answer: http://stackoverflow.com/a/26640929
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26956387
tagged with: css
score: 0
has body: I have a box shadow generator.I have 4 sliders for each value(x-axis,y-axis,blur,spread) I have also created a 5th slider via javascript(I want this slider to enable/disable inset property) The problem Is that it is not working: Here is my code: $(document).ready(function() { $("#code").css({ " $( document ).ready(function() { $("#code").css({ "border": "3px solid gold", "padding": "4px", "color": "lightblue" }); $("#inset").css('width', '10%'); $(".slider").change( function() { var x = $("#x").val() + "px "; var y = $("#y").val() + "px "; var b = $("#blur").val() + "px "; var s = $("#spread").val() + "px "; var code = x + y + b + s + " dodgerblue "; $(".generator").css("box-shadow", code); $(".h-shadow").html(x); $(".v-shadow").html(y); $(".blur").html(b); $(".spread").html(s); }); $("#optimize").before( " "); $("#boxSub").click( function() { $(".slider").val(0); $('.Code').html("0"); $(".blur").html("0"); $(".spread").html("0"); $('.generator').css("box-shadow", $("#boxShadowf").val()); }); $("#inset").change( function() { var ins = $("#inset").val(); if (ins === "1") { var code = x + y + b + s + " dodgerblue inset"; $(".generator").css("box-shadow", code); } else { var code = x + " " + y + " " + b + " " + s + " dodgerblue"; $(".generator").css("box-shadow", code); } }); $("#toggleCode").click( function() { $('.code').toggle(789); }); $("#optimize").click(function() { /**** Optimize the code by finding the spread and the blur values If any of those to is equal to 0 or 0px then removeit or print an empty string ***/ var b = $(".blur").html(); var s = $(".spread").html(); if (b === "0" || b === "0px" && s != "0" || s != "0px") { $(".blur").html(b); } else { if (b === "0" || b === "0px") { $(".blur").html(""); } if (s === "0" || s === "0px") { $(".spread").html(""); } } }); $("#resetCode").click(function(event) { $(".slider").val(0); $('.generator').css('box-shadow', '0px 0px 0px 0px'); $('.Code').html("0"); $('.v-shadow').html(" 0"); $('.blur').html("0"); }); }); bo…
answer count: 2
has answer: http://stackoverflow.com/a/26956387
type: AnsweredQuestion

http://stackoverflow.com/q/26614762
tagged with: passport.js
score: 0
tagged with: rest
has title: How to secure Node.js connect-rest REST API with OAuth?
has comment: http://stackoverflow.com/comment/41841013
tagged with: node.js
has answer: http://stackoverflow.com/a/26615120
tagged with: oauth
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41841180
has body: I tried Googling around for some examples, or well anything, but couldn't find any results. I think partially because the name of the package "connect-rest" is so generic. Anyway, here is what i'm looking to do. I am using the Node module "connect-rest" to build a server side API. It is mostly finished at this point, and i'm now looking to secure it. Now the module itself has a system of authentication with API Keys, which is well and fine, but not very secure for Javascript clients, since anyone could just browse the source and grab the key. And trying to secure a key -- well it just doesn't work without getting super complicated. So instead i'd rather use a standard OAuth setup. I was hoping to use Passport in combination with connect-rest and wondering if anyone has done this before or point me to some examples?
has comment: http://stackoverflow.com/comment/41841321
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26615026
tagged with: javascript

http://stackoverflow.com/a/26647877
score: 1
downvote count: 0
type: Answer
upvote count: 1
has body: Putting a / before the assets might work. Like this...
answers question: http://stackoverflow.com/q/26634345

http://stackoverflow.com/q/26553217
accepted answer: http://stackoverflow.com/a/26553332
favorite count: 0
has comment: http://stackoverflow.com/comment/41728390
has answer: http://stackoverflow.com/a/26553504
has comment: http://stackoverflow.com/comment/41728796
has comment: http://stackoverflow.com/comment/41728529
upvote count: 1
has title: javascript function with 2 arguments is not working
tagged with: php
possible better answer: http://stackoverflow.com/a/26553504
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41728376
has comment: http://stackoverflow.com/comment/41728381
has answer: http://stackoverflow.com/a/26553332
has comment: http://stackoverflow.com/comment/41728764
has answer: http://stackoverflow.com/a/26553277
type: Question
has body: DEscription : I have a php script that displays the div on an html page echo ' '; Now when I click on this div the star_it function gets called and it works perfect... The problem I want to pass another argument in the star it function .. like this echo ' '; or a simple alphabet if any like star_it(this.id,s) but when I do so the function stops working as when I click the div the function does not gets called .... I dont know why I am stuck and now my star rating system does not work... I have absolutely no idea what is wrong Anyone ??
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41728541
answer count: 3

http://stackoverflow.com/q/26551393
answer count: 1
favorite count: 0
tagged with: mysqli
score: -3
tagged with: php
accepted answer: http://stackoverflow.com/a/26551474
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
tagged with: mysql
has body: I saw a lot of examples on the net to how to extract a DB query result into JSON, but none of them really worked. I need a PHP template of a few lines that will retrieve a table and convert it to JSON, echoing back to the client a string of JSON that I can parse on the client side. I need to use this template for a get request using JavaScript XHR. Since I'm mostly programing client side, I'm running into some difficulties building this script. I would appreciate your help and will learn greatly from it :)
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41724967
has comment: http://stackoverflow.com/comment/41725085
has answer: http://stackoverflow.com/a/26551474
upvote count: 0
has title: MySQLi database tables to JSON - need template

http://stackoverflow.com/a/26555900
accepted answer of: http://stackoverflow.com/q/26555768
score: 4
answers question: http://stackoverflow.com/q/26555768
has body: You can use new line characters \n to make text more readable: var eD = []; if (CkStatus &amp;&amp; document.getElementById(ids).value == '') { eD.push('Please enter lienholder name'); document.getElementById(ids).focus(); flag = false; } // ... if (eD.length) alert(eD.join('\n')); As you can see I'm also pushing error messages into ed array, which makes it more convenient to concatenate resulting message using .join() method. Demo: http://jsfiddle.net/t4Lgm0n2/11/
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/26646600
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/26647164
has answer: http://stackoverflow.com/a/26647164
upvote count: 2
has answer: http://stackoverflow.com/a/26646883
answer count: 2
tagged with: node.js
has body: Model.js file has the following entry exports.update = function(tag,view,date){ { ..... .... } and calling the function like update('test','1213','11/10/2014') it throws the following error, update('test','1213','11/10/2014') ^ ReferenceError: update is not defined I can call the update module from the different file, without any error something like this var model = require('./Model'); model.update('test','1213','2001/1/23') The question is how can invoke the Update method from the same js (Model.js )file
accepted answer: http://stackoverflow.com/a/26646883
has title: calling nodejs function from the same file and from the different file

http://stackoverflow.com/comment/41701354
type: Comment
score: 0
has text: you're not hiding anything from the user (unless i'm mis-understanding something here), you're just giving them a handier and internally-comfortable path to get to that info. you're hiding stuff from the outside world, but nothing the user cares about. a path is just a path, might as well use a semantic one...
type: AnswerComment
comment on: http://stackoverflow.com/a/26537772

http://stackoverflow.com/q/26558783
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41738466
has comment: http://stackoverflow.com/comment/41738439
favorite count: 0
accepted answer: http://stackoverflow.com/a/26558842
has comment: http://stackoverflow.com/comment/41738480
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41738462
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/26558842
linked to: http://stackoverflow.com/q/5915096
score: -4
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41738491
has body: https://copy.com/XPfxgQeHF78d8lgw is a link to the files the link to the fiddle is here http://jsfiddle.net/LgjzvcpL/9/ I have tried eliminating everything I can on the real life version but that doesn't help document.getElementById("image").style.backgroundImage = "url(" + dir + images[randomCount] + ".jpg" + ")";
has title: assigning a div a background via javascript is working in jsfiddle.net but not in code
has comment: http://stackoverflow.com/comment/41738474

http://stackoverflow.com/q/26587754
favorite count: 0
possible better answer: http://stackoverflow.com/a/26590693
has body: Though i have included the onclick handler for the a tag in the html returned by the render method of the reactjs component(component with the name renderLocationLink) , though the rendering takes place correctly the onclick handler attribute doesnt appear in the rendered html on the webpage .I want the Not able to figure whats the issue , here is the code var feedApp = React.createClass({ getInitialState: function(){ return { data : [ {display_name:"Rao",content:"this is Rao post",links:['link1','link2','link3']}, {display_name:"Sultan",content:"this is Sultans",links:['link4','link5','link6']}, {display_name:"John",content:"this is John post",links:['link7','link8','link9']} ] } }, fetchFeedsFromUrl: function(){ console.log('Onclick triggered'); }, render: function(){ return (<Feeds data={this.state.data} onClick={this.fetchFeedsFromUrl} />) } }) var Feeds = React.createClass({ render: function(){ var onClickfunc = this.props.onClick; var feeds = this.props.data.map(function(feed){ return ( <oneFeed name={feed.display_name} onClick={this.onClickfunc} content={feed.content} links={feed.links} /> ) }); return( {feeds} ) } }) var oneFeed = React.createClass({ render: function() { return ( {this.props.name} <renderLocationLink onClick={this.props.onClick} linkArray={this.props.links} /> {this.props.content} ) } }); var renderLocationLink = React.createClass({ render: function(){ var onClick = this.props.onClick; var locationLinks = this.props.linkArray.map(function(link,index){ return ({link} ) }) return ( {locationLinks} ) } }) React.renderComponent(feedApp(null),document.body);
has answer: http://stackoverflow.com/a/26590693
has title: anchor tag (a tag) onclick event handler not working
type: Question
has comment: http://stackoverflow.com/comment/41796711
has comment: http://stackoverflow.com/comment/41800986
type: AnsweredQuestion
score: 10
upvote count: 10
tagged with: reactjs
answer count: 3
has comment: http://stackoverflow.com/comment/41798774
has answer: http://stackoverflow.com/a/26593469
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26590491
accepted answer: http://stackoverflow.com/a/26590491

http://stackoverflow.com/a/26657239
has body: Thanks Andrew! HTML Works ...the 1st menu About ...the 2nd menu JS $(".ToggleDisplay").click(function(e){ var BoxToDisplay = $(this).prop("id").replace("Link", ""); $(".newboxes").each(function(){ //Check if this is the right one to display if ($(this).prop("id") == BoxToDisplay) $(this).show(); else $(this).hide(); }); e.preventDefault(); return false; }); FIDDLE
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26656042

http://stackoverflow.com/q/26563847
has answer: http://stackoverflow.com/a/26565765
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26565765
linked to: http://stackoverflow.com/q/8366733
has title: Is it possible to only rerender a part of a template
favorite count: 0
tagged with: backbone.js
upvote count: 1
has body: I have a template with the divs #entries and #movies In my #entries div I show the models of my movie collection. In my #movies div I show the results of a searchquery. (The naming of elements is quite bad, I agree). In the view which renders the template I have the following events, events: -&gt; "click li": "addEntry" "click .remove": "destroyEntry" addEntry: (e) -&gt; movie_title = $(e.target).text() @collection.create title: movie_title appendEntry: (entry) -&gt; view = new Movieseat.Views.Entry(model: entry) $('#entries').append(view.render().el) destroyEntry: (e) -&gt; thisid = @$(e.currentTarget).closest('div').data('id') @collection.get(thisid).destroy() The li element gets rendered in the #movies div. This way I can click on the results from a different view and add them into a other collection. This works, but there's a problem. In the same view I have this, initialize: -&gt; @collection.on('change', @render, this) @collection.on('add', @appendEntry, this) @collection.on('destroy', @render, this) return The problem is that when the collection changes (like when I add or remove a movie from it) it rerenders the template. This means it rerenders the #entries and #movies div. But now it just renders a empty #movies div (without the searchquery collection). So I was wondering if it's possible to only render a part of a template. In this case I would like to only rerender the #entries div and just leave the #movies div alone.

http://stackoverflow.com/q/26515349
has comment: http://stackoverflow.com/comment/41660763
tagged with: contains
tagged with: find
has comment: http://stackoverflow.com/comment/41660745
has body: I have an HTML table that is filled dynamically and only shows a certain button in the first column if specific conditions are met, otherwise this button does not appear. The button looks as follows (it always has the name = voidBtn): &lt;input type="button" name="voidBtn" value="Void" /&gt; How can I check whether the current row contains this button or not ? I was thinking of something like the following but didn't know how to write this the right way: if($(this).closest('tr').find('input[name=void]') ... OR if($(this).closest('tr').find("td:eq(1):contains('voidBtn')") ... I just need to know if the current row has such a button as then I want to click on it and do some other stuff.
has answer: http://stackoverflow.com/a/41014317
downvote count: 0
tagged with: jquery
favorite count: 0
has title: How to check if a table row contains a certain button in jQuery?
has answer: http://stackoverflow.com/a/26515467
answer count: 4
accepted answer: http://stackoverflow.com/a/26515503
score: 2
tagged with: closest
has answer: http://stackoverflow.com/a/41014808
upvote count: 2
has answer: http://stackoverflow.com/a/26515503
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26515467
tagged with: javascript
type: Question

http://stackoverflow.com/a/26515815
has body: Typically when you write a recursive function it will do something and then either call itself or return. You need to define callback in the scope of the recursive function (i.e. recurse instead of start), and you need to call it at the point where you would normally return. So, a hypothetical example would look something like: get_all_pages(callback, page) { page = page || 1; request.get({ url: "http://example.com/getPage.php", data: { page_number: 1 }, success: function (data) { if (data.is_last_page) { // We are at the end so we call the callback callback(page); } else { // We are not at the end so we recurse get_all_pages(callback, page + 1); } } } } function show_page_count(data) { alert(data); } get_all_pages(show_page_count);
has comment: http://stackoverflow.com/comment/61882524
answers question: http://stackoverflow.com/q/26515671
score: 8
type: Answer
downvote count: 0
upvote count: 8

http://stackoverflow.com/comment/41705358
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26540032
has text: It looks fine, are you sure the things in the `if` statement or in the `//do more stuff` are not messing things up? And have you tried a non-ajax, regular form submit to test the php?
type: Comment

http://stackoverflow.com/q/26569906
has body: Super simple concept, but it's giving me trouble... 5 div elements total 1st div is centered, z-indexed to the front. Other 4 divs are each 1/4 of the page. When hovered, each apply a unique css property to the 1st div. Here's what I currently have Or here's the code: $(document).ready(function(){ function point(a, b, c, d) { $(".middle").css("transition", ".15s ease-in-out all"); $(".middle").css("border-radius", a . "% " . b . "% " . c . "% " . d . "%"); } function unpoint() { $(".middle").css("transition", ".15s ease-in-out all"); $(".middle").css("border-radius", "50% 50% 50% 50%"); } $(".section-1") .on( "mouseenter", point(0, 50, 50, 50) ) .on( "mouseleave", unpoint() ); }); Thanks for the help!
has answer: http://stackoverflow.com/a/26570086
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26570028
score: 0
has title: How do I reuse a custom function in jQuery to apply multiple css properties?
type: UnansweredQuestion

http://stackoverflow.com/comment/41762805
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26571353
type: QuestionComment
has text: Please do not ask us do your homework

http://stackoverflow.com/q/26528120
has comment: http://stackoverflow.com/comment/41682913
has comment: http://stackoverflow.com/comment/41683419
tagged with: http://stackoverflow.com/tag/html
score: -1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26530425
has comment: http://stackoverflow.com/comment/41683779
tagged with: google-chrome
downvote count: 1
type: Question
has body: This piece of code works fine in Chrome but not in Firefox or IE. &lt;script&gt; $(document).ready(function(){ var currentOne=$("#instructions"); currentOne.addClass("visibleLabel"); $('map area').mousemove(function(e) { $(currentOne).removeClass("visibleLabel"); currentOne = '#' + $(this).data('label'); $(currentOne).addClass("visibleLabel"); }); }); &lt;/script&gt; &lt;img src="http://greenparty.org.uk/assets/images/site_graphics/national/greenmap.png" usemap="greenuk" id="theGreenMap"&gt; &lt;map name="greenuk"&gt; &lt;area shape="poly" id="region-southeast" data-label="southeast" coords="256,485,262,486,285,542,301,531,344,536,349,547,298,577,263,574,234,587,205,577,202,562,216,513,214,499,247,498" alt="southEast" href="south-east" /&gt; &lt;!-- etc. --&gt; &lt;/map&gt; Here is the JS Fiddle: http://jsfiddle.net/ve9hywdq/1/ If you try it in Firefox you are unable to click the parts of the map you want but in Chrome you can.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41682860
accepted answer: http://stackoverflow.com/a/26530425
upvote count: 0
tagged with: firefox
answer count: 1
favorite count: 0
has title: JS Cross Browser Compatibility Issue

http://stackoverflow.com/comment/41736796
type: Comment
score: 2
has text: `MyClass.prototype.foo()` won't do the same as `this.foo()`. The first won't have the right context (`this`), probably the global. `MyClass.prototype.foo.call(this)` would do right, but that's just silly.
type: AnswerComment
comment on: http://stackoverflow.com/a/26557808

http://stackoverflow.com/q/26623845
favorite count: 0
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/26624113
has comment: http://stackoverflow.com/comment/41857591
upvote count: 1
tagged with: design-patterns
answer count: 1
tagged with: oop
has comment: http://stackoverflow.com/comment/41857620
has answer: http://stackoverflow.com/a/26624113
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
has title: $http request in controller?
has body: I have an impression that all data-related requests has to be delegated to services/factories. But reading examples of $http implementation met not once that they are put right inside of a controller, e.g.: var app = angular.module("MyApp", []); app.controller("PostsCtrl", function($scope, $http) { $http.get('data/posts.json'). success(function(data, status, headers, config) { $scope.posts = data; }). error(function(data, status, headers, config) { // log error }); }); is that considered as normal practice/pattern or it is just for the sake of an example?

http://stackoverflow.com/comment/41744691
score: 0
type: QuestionComment
type: Comment
has text: alert $(elmt), see what you get inside the function.
comment on: http://stackoverflow.com/q/26562248

http://stackoverflow.com/q/26546016
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41715132
tagged with: css
has answer: http://stackoverflow.com/a/26546147
has body: I have used an online email encoder to generate a sort-of harvester-proof email-link, but this link won't adapt to my styling. Does anybody know how I can style this kind of link? As of now I don't know where to call the css class. Here is an example of the link I've encoded: Please enable Javascript to see the email address Thanks!
upvote count: 1
answer count: 1
has title: Styling encoded mailto address
tagged with: javascript
has comment: http://stackoverflow.com/comment/41715040
accepted answer: http://stackoverflow.com/a/26546147
type: AnsweredQuestion
tagged with: mailto
downvote count: 0

http://stackoverflow.com/q/26641516
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has title: return a date object or string from a momentjs object created with a time string
has answer: http://stackoverflow.com/a/26689576
possible better answer: http://stackoverflow.com/a/26644679
has comment: http://stackoverflow.com/comment/41975307
has answer: http://stackoverflow.com/a/26644679
tagged with: momentjs
has comment: http://stackoverflow.com/comment/41892643
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/26689576
has body: I have this time in the sql server saved: '12:45:00' I need to show this time in a html timepicker which wants the time in the following: Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date How do I have to use the momentjs library that I can bind my value to the timepicker?
type: AnsweredQuestion
downvote count: 0

unix
tags question: http://stackoverflow.com/q/26533995
type: Tag
tag name: unix

http://stackoverflow.com/comment/41854872
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26622141
has text: Your code is working for me and no page refresh happen. So fault should be somewhere else.
type: Comment

http://stackoverflow.com/q/26648470
has answer: http://stackoverflow.com/a/26650266
has comment: http://stackoverflow.com/comment/41902719
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41903220
type: AnsweredQuestion
tagged with: google-visualization
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26650266
has body: I want to make a line chart whith googlechart ( https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart ). But i'm not able to format the array for the chart. The array must looks like this : var data = google.visualization.arrayToDataTable([ ['Year', 'Sales', 'Expenses'], ['2004', 1000, 400], ['2005', 1170, 460], ['2006', 660, 1120], ['2007', 1030, 540] ]); And I'm trying to make it that way : var data = google.visualization.arrayToDataTable('Year', 'Marque1', 'Marque2', 'Marque3', 'Marque4'); var i=1; msg.forEach(function(entry) { data.addRows([ ['2004', i-1, 0, i, 6], ['2004', i, 0, i, 6], ['2004', i+1, 0, i, 6] ]); i++; }); It's not the real values but i'll set them when i'll be able to make an array. I have this error in the browser console when I run : Uncaught Error: Type mismatch. Value 0 does not match type string in column index 1 When I put some strings instead, google send me a error message instead of the chart : Data column(s) for axis #0 cannot be of type string
has title: Dynamic array for googlechart json javascript
type: Question

http://stackoverflow.com/comment/41815289
comment on: http://stackoverflow.com/q/26600633
has text: @Wolfram: JavaScript has automatic semicolon insertion; that won’t make a difference here.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41708846
type: Comment
comment on: http://stackoverflow.com/q/26542361
has text: Have you tried debugging the code?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41878510
type: Comment
has text: Personally, I think `var timer` is not in the right place.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26635527

http://stackoverflow.com/q/26569955
linked to: http://stackoverflow.com/q/6259604
type: Question
has body: I am trying to style a piece of code that has the debugger keyword in it. I am using the debugging window(IE, FF, Opera) to see CSS style effects but the debugger is stopping every time I refresh the page(as it should). Can I toggle or disable the debugger keyword through the browser(not by deleting it from my code) so I could do the style I want without it bothering me every time I refresh the page? myApp.service('User', ['$localStorage', function ($localStorage) { debugger; this.$storage = $localStorage; }]); Thanks The debugger statement
tagged with: debuggervisualizer
tagged with: javascript
score: 15
upvote count: 15
has comment: http://stackoverflow.com/comment/41772038
has comment: http://stackoverflow.com/comment/41772105
linked to: http://stackoverflow.com/q/45767855
downvote count: 0
has title: Disable the debugger statement through the browser
favorite count: 0
has answer: http://stackoverflow.com/a/36009202
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/100762970
has answer: http://stackoverflow.com/a/45774890
answer count: 4
tagged with: cross-browser
has answer: http://stackoverflow.com/a/78503432
has comment: http://stackoverflow.com/comment/41761784
tagged with: javascript-debugger
has answer: http://stackoverflow.com/a/26570003
has comment: http://stackoverflow.com/comment/41758676

http://stackoverflow.com/a/26603462
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26589508
has comment: http://stackoverflow.com/comment/41841695
downvote count: 0
type: Answer
has body: I found the solution in this topic, apologies for a duplicate question. How do I force jquery to center an element when it is dragged to and snapped to another container? So in this case the solution would look like this: $( document ).ready(function() { $( ".item" ).draggable({ scroll: false, revert: 'invalid', stack: false, create: function(){$(this).data('position',$(this).position())}, cursor: "pointer", start:function(){$(this).stop(true,true)}, drag: function(event, ui) { $( ".droparea" ).removeClass( "highlight" ); } }); $( ".droparea" ).droppable({ accept: ".item", drop: function( event, ui ) { $( this ).addClass( "highlight" ).find( "p" ); snapToMiddle(ui.draggable,$(this)); } }); }); function snapToMiddle(dragger, target){ var topMove = target.position().top - dragger.data('position').top + (target.outerHeight(true) - dragger.outerHeight(true)) / 2; var leftMove= target.position().left - dragger.data('position').left + (target.outerWidth(true) - dragger.outerWidth(true)) / 2; dragger.animate({top:topMove,left:leftMove},{duration:200,easing:'linear'}); } .item { position: relative; margin: 0 auto; width: 100px; height: 100px; border: 1px solid red;} .droparea { width: 150px; height: 150px; float: left; margin: 2px; border: 1px solid #000; outline: 1px solid transparent} .highlight {border: 1px solid blue}

http://stackoverflow.com/comment/41833946
has text: @ brso05 .. I want to have this code in javascript. public String timeNow() { Calendar c = Calendar.getInstance(); TimeZone z = c.getTimeZone(); int offset = z.getRawOffset(); if(z.inDaylightTime(new Date())){ offset = offset + z.getDSTSavings(); } int offsetHrs = offset / 1000 / 60 / 60; int offsetMins = offset / 1000 / 60 % 60; System.out.println("offset: " + offsetHrs); System.out.println("offset: " + offsetMins); c.add(Calendar.HOUR_OF_DAY, (-offsetHrs)); c.add(Calendar.MINUTE, (-offsetMins)); return c.getTime().toString(); }
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26610463
type: Comment

http://stackoverflow.com/a/26626516
accepted answer of: http://stackoverflow.com/q/26625014
answers question: http://stackoverflow.com/q/26625014
type: AcceptedAnswer
score: 0
type: Answer
has body: You'll need to reload the updated script to get the updated position: function initialize() { var mapOptions = { zoom: 18, center: sendai, mapTypeId: google.maps.MapTypeId.ROADMAP}, map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions), //we will store the LatLng here pos = new google.maps.MVCObject(), //use a single marker with updated position marker = new google.maps.Marker(); //set the latLng of the MVCObject pos.set('latLng',new google.maps.LatLng(newMarker.latitude, newMarker.longitude)); //bind the markers position to the latLng of the MVCObject marker.bindTo('position',pos,'latLng'); marker.setMap(map); setInterval(function(){ //the currently loaded script var script=document.querySelector('script[src^="inputData.js"]'), //the updated script update=document.createElement('script'); //load-handler for the updated script google.maps.event.addDomListenerOnce(update,'load',function(){ pos.set('latLng',new google.maps.LatLng(newMarker.latitude, newMarker.longitude)); map.setCenter(pos.get('latLng')); map.setZoom(18); }); //replace current script with updated script script.parentNode.replaceChild(update,script); //load update update.src='inputData.js?'+new Date().getTime(); },2000); }

http://stackoverflow.com/q/26547927
has comment: http://stackoverflow.com/comment/41718762
has title: ASP.NET MVC app is throwing a 403.14
answer count: 0
has comment: http://stackoverflow.com/comment/41738232
type: Question
has body: I have an ASP.NET MVC app. The app is using a client-side JavaScript framework. This app works fine when I visit the main URL. That URL looks like this: http://localhost:1801/my-app/Item?i=123 However, when I load the app in an older browser (IE8), the user gets redirected to a URL with a hash (#) in it. The new URL looks like this: http://localhost:1801/#/my-app/Item?i=123 In the case of older browsers, ASP.NET MVC returns a status code of 403.14. I've confirmed that the route is the problem. I did so by copying and pasting the second URL into Chrome. In other words, the app works in Chrome with the first URL, however, I get a 403.14 in Chrome with the second URL. How can I make ASP.NET MVC accept the second URL? From my understanding, the client-side framework is adding the hash as some fallback method because HTML 5 routing isn't supported in IE 8. Thank you!
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41719059
tagged with: angularjs
type: UnansweredQuestion
tagged with: asp.net-mvc-4

http://stackoverflow.com/a/26646743
type: Answer
has body: Assuming that you want to access the succeeded value from the "stringified json" , you will need to convert the string '[{"test_count2":"360","succeeded":"185"}]' which is now a plain string back to an json object. Steps are: var str = '[{"test_count2":"360","succeeded":"185"}]'; var obj = JSON.parse(str); //This function reverses what JSON.stringify does to a json alert(obj.succeeded); //Output: 185 Hope i was clear :)
score: 0
answers question: http://stackoverflow.com/q/26646615

http://stackoverflow.com/a/26672336
has comment: http://stackoverflow.com/comment/42303318
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42315673
downvote count: 0
has body: Trying using this: function test(){ var x = document.getElementsByClassName("myClass"); var i; for (i = 0; i &lt; x.length; i++) { var val = x[i].innerHTML; //innerHTML returns the written text inside the element tag alert(val); alert(x[i].getAttribute("data")); //this will give you the data attribute } } You can get any other attribute you like from that element just by replacing the innerHTML by that attribute's name
answers question: http://stackoverflow.com/q/26672104

http://stackoverflow.com/a/26537550
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has body: You can always use this when another radio is checked: $("#div1 .clearfix input:text").val(""); function showhideForm(lien) { if (lien == "Yes") { document.getElementById("div1").style.display = 'block'; document.getElementById("div2").style.display = 'none'; } else if (lien == "None") { document.getElementById("div2").style.display = 'block'; document.getElementById("div1").style.display = 'none'; $("#div1 .clearfix input:text").val("");//here use to clear inputs } } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input type="radio" value="Yes" name="lien" id="lien" onchange="showhideForm(this.value);"/&gt;&lt;label for="lien"&gt;Lien&lt;/label&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="radio" value="None" name="lien" id="nolien" onchange="showhideForm(this.value);"/&gt;&lt;label for="nolien"&gt;No Lien&lt;/label&gt; &lt;div id="div1" style="display:none"&gt; &lt;div class="clearfix"&gt; &lt;p&gt; &lt;label for="lname"&gt;Lienholder Name:&lt;/label&gt; &lt;input type="text" name="lienlname" id="lienlname"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for="laddress"&gt;Lienholder Address:&lt;/label&gt; &lt;input type="text" name="lienladdress" id="lienladdress"&gt; &lt;/p&gt; &lt;p&gt; &lt;label for="ldate"&gt;Date of Lien:&lt;/label&gt; &lt;input type="text" name="lienldate" id="datepicker2"&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="div2" style="display:none"&gt; &lt;!---You are not qualified to see this form.---&gt; &lt;/div&gt; After (hate) comments (kidding) a js approach: function showhideForm(lien) { if (lien == "Yes") { document.getElementById("div1").style.display = 'block'; document.getElementById("div2").style.display = 'none'; } else if (lien == "None") { document.getElementById("div2").style.display = 'block'; document.getElementById("div1").style.display = 'none'; //js container = document.getElementById('div1'); inputs = container.getElementsByTagName('input'); for (index = 0; index &lt; i…
accepted answer of: http://stackoverflow.com/q/26537486
type: Answer
has comment: http://stackoverflow.com/comment/41700820
score: 2
has comment: http://stackoverflow.com/comment/41700764
answers question: http://stackoverflow.com/q/26537486
has comment: http://stackoverflow.com/comment/41701004

http://stackoverflow.com/comment/41730729
type: Comment
comment on: http://stackoverflow.com/a/26554410
type: AnswerComment
has text: I have done this but nothing happens when I click the button. Does the script have to come before the button in the document?
score: 0

http://stackoverflow.com/comment/41934994
score: 0
has text: I am not using a closure anywhere. I am passing a function to another function. I don't think that is the same thing.
comment on: http://stackoverflow.com/q/26666534
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26634344
has comment: http://stackoverflow.com/comment/41876600
has comment: http://stackoverflow.com/comment/41876430
possible better answer: http://stackoverflow.com/a/26634572
has body: I would like to skip all this piece of code if some preconditions are not met, but I also want to move all the code between the parenthesis in a function. Is it allowed? I don't understand how this syntax works. $.ajax({ type: "POST", url: urlAppend, data: JSON.stringify(xxx), contentType: "application/json; charset=utf-8", dataType: "json", processdata: false, success: function (result) { if (canceled) { return; } //Long code } //Long code 2 }, error: function (request, error) { alert('ppp'); } });
has answer: http://stackoverflow.com/a/26634577
has comment: http://stackoverflow.com/comment/41876542
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41876351
tagged with: javascript
tagged with: jquery
has title: Making a JQuery ajax request conditional
has comment: http://stackoverflow.com/comment/41876742
has comment: http://stackoverflow.com/comment/41876403
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/26634604
has comment: http://stackoverflow.com/comment/41876354
has answer: http://stackoverflow.com/a/26634572
answer count: 4
has comment: http://stackoverflow.com/comment/41876427
has answer: http://stackoverflow.com/a/26634538
favorite count: 0
accepted answer: http://stackoverflow.com/a/26634538
has comment: http://stackoverflow.com/comment/41876448
downvote count: 2
has comment: http://stackoverflow.com/comment/41876422
has comment: http://stackoverflow.com/comment/41876478
has comment: http://stackoverflow.com/comment/41876447
type: AnsweredQuestion

opencv
type: Tag
tags question: http://stackoverflow.com/q/26614245
tag name: opencv

http://stackoverflow.com/comment/41834785
comment on: http://stackoverflow.com/q/26606234
type: Comment
type: QuestionComment
has text: @NidhishKrishnan Give me some time to do my code with below example, If it successful i will give things :)
score: 0

http://stackoverflow.com/comment/41801824
type: QuestionComment
has text: Where is the controller in your posted html? `FilterVisible` is not a global variable that angular sets. It is attached to the scope. http://jsbin.com/cowuxowoqi/1/edit
comment on: http://stackoverflow.com/q/26593485
score: 0
type: Comment

http://stackoverflow.com/comment/41888733
has text: Why do you use Query string with POST request?
comment on: http://stackoverflow.com/q/26640406
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41775982
type: Comment
has text: @jfriend00 Just beat me to it! The iptables solution is a good one as long as you don't need to serve any static files. If you do, I think it's better to do what I mentioned - serve them with Nginx and reverse proxy everything else to the port the Node.js application is running on.
type: AnswerComment
comment on: http://stackoverflow.com/a/26579107
score: 0

http://stackoverflow.com/comment/41801739
type: Comment
comment on: http://stackoverflow.com/q/26592659
score: 0
type: QuestionComment
has text: This looks... weird (no offense). I would consider 2 courses of action from here. A) Pre-condition your data so that it gets passed to the view in a way that you can show all items and not use `ng-if`. It looks like what you're doing can be expensive. B) Create a [filter](https://docs.angularjs.org/guide/filter) for your `ng-repeat` to filter and return items that you want to show.

http://stackoverflow.com/a/26596665
has body: You can add $parent to your ng-options as ng-if creating child scope please see below var app = angular.module('app', []); app.controller('firstCtrl', function($scope) { $scope.colors = [{ name: "red" }, { name: "black" }] }); <div ng-if="1<2"> Color (null not allowed): or use controller as syntax ie: HTML: <div ng-if="1<2"> Color (null not allowed): JS var app = angular.module('app', []); app.controller('firstCtrl', function() { var vm = this; vm.colors = [{ name: "red" }, { name: "black" }] });
score: 1
answers question: http://stackoverflow.com/q/26596563
upvote count: 2
has comment: http://stackoverflow.com/comment/41807797
downvote count: 1
type: Answer

http://stackoverflow.com/a/26657663
has body: It's possible, but you can't bind a second dropdzone on the same element, as you did. 2 Dropzones on one element makes no sense. 2x document.body in your solution atm. Try this... HTML: JavaScript: var myDropzoneTheFirst = new Dropzone( //id of drop zone element 1 '#a-form-element', { url : "uploadUrl/1" } ); var myDropzoneTheSecond = new Dropzone( //id of drop zone element 2 '#an-other-form-element', { url : "uploadUrl/2" } );
has comment: http://stackoverflow.com/comment/77870134
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/99301567
answers question: http://stackoverflow.com/q/26657489
type: Answer
accepted answer of: http://stackoverflow.com/q/26657489
has comment: http://stackoverflow.com/comment/77849845
downvote count: 1
upvote count: 28
has comment: http://stackoverflow.com/comment/82184820
score: 27

http://stackoverflow.com/q/26591639
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26594476
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/41798435
type: Question
upvote count: 4
answer count: 3
has title: Count the number of images selected with input=file
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41798145
favorite count: 0
has answer: http://stackoverflow.com/a/41164773
has answer: http://stackoverflow.com/a/67346334
has body: There is a way in PHP to show the number of files selected from an "input=file", inside the input? Something like this. I saw only codes that print the number in a label outside the input, like this (from this question HTML5 Get input file count on change) $('input[type=file]').change(function () { fileCount = this.files.length; $(this).prev().text(fileCount + 'Selected'); }) But I don't understand how can I put the value inside the input...inside "value" maybe? This is my input code Aggiungi immagini Thank you!
linked to: http://stackoverflow.com/q/12557453
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41798284

http://stackoverflow.com/comment/41727075
has text: Nice one! Thank you Danko. For some reason I have never used the CSS white-space property before.
type: AnswerComment
comment on: http://stackoverflow.com/a/26536847
type: Comment
score: 0

http://stackoverflow.com/q/26636742
has comment: http://stackoverflow.com/comment/41881096
has body: I am working with AngularJS and have created a Module, which has a Factory and a Filter. The Factory gets a local json file translations) and the filter provides a function that returns a translated version of the text. So the code looks like the following; angular .module('i18n', []) .factory('translationDataFact', ['$http', function($http){ var t = {}; var user = {}; t.defaultLanguage = 'en-GB'; t.languageFile = null; t.init = function(){ t.setLanguage(); if(!t.languageFile){ $http .get('translations/' + t.defaultLanguage + '.json') .success(function(data){ t.languageFile = data.strings; }) .error(function(error){ console.log(error); }); } } t.setLanguage = function(){ /* change default language to User language here */ if(user.id){ t.defaultLanguage = user.language; } return t.defaultLanguage; } t.init(); return t.languageFile; }]) .filter('t', ['translationDataFact', function (translationDataFact) { var translate = function (stringIdenitfier) { var translation = translationDataFact.languageFile[stringIdenitfier]; if(translation){ return translation; } return "translate me!!"; }; return translate(stringIdenitfier); }]); Then I wish to use the filter to translate variables and names like this {{"string" | t }} The problem I am having is that I have no idea how to make sure The return of the Factory is set before the Filter runs this. Also I am confused by how I prevent the whole application rendering until this filter is ready? Any help would be amazing as I am lost :(
has comment: http://stackoverflow.com/comment/41881633
answer count: 3
upvote count: 1
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: Angular Factories and Filters $http
has answer: http://stackoverflow.com/a/26636902
score: 1
has answer: http://stackoverflow.com/a/26637193
has comment: http://stackoverflow.com/comment/41881525
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26640796

http://stackoverflow.com/a/26616365
has comment: http://stackoverflow.com/comment/41844244
has body: The problem is, that you do not understand the concept of callbacks in JavasScript. Please read the following question: Can someone explain me the callback functions Your callback functions (they are set through the set attribute) manipulate the guardsval variable only when some event happens (in this case the set event, I guess). The problem is, that you call alert(guardsval), when guardsval isn't initialized yet.
score: 3
has comment: http://stackoverflow.com/comment/41867716
answers question: http://stackoverflow.com/q/26616011
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41866697
upvote count: 3
has comment: http://stackoverflow.com/comment/41861137

http://stackoverflow.com/a/26659140
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41921572
upvote count: 1
has comment: http://stackoverflow.com/comment/41921071
has comment: http://stackoverflow.com/comment/41920865
has comment: http://stackoverflow.com/comment/41921250
has comment: http://stackoverflow.com/comment/41920770
answers question: http://stackoverflow.com/q/26658902
downvote count: 0
has body: Try this instead var CustomAction = function(){ var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); this.oList = web.get_lists().getByTitle("Classification"); // .load() tells CSOM to load the properties of this object // multiple .load()s can be stacked clientContext.load(oList); // now start the asynchronous call and perform all commands clientContext.executeQueryAsync((function(sender, args){alert('No of rows: ' + oList.get_itemCount())}(this, this.onSuccess)), (function(sender, args){alert('Request failed.\n' + args.get_message() + '\n' + args.get_stackTrace())}(this, this.onFailure))); };

http://stackoverflow.com/a/26570885
score: 20
type: AcceptedAnswer
downvote count: 0
has body: Resolve - plunkr You could make use of modalInstance's resolve property; this acts as the link between the modal instance and the parent controller. You inject the object in to the ModalInstanceController, and assign it to the scope of your modal instance. UI Bootstraps resolve works exactly the same as ngRouter's; as such if for whatever reason resolve cannot resolve an object, the modal will not open. var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', resolve: { user: function() { return $scope.user; } } }); Scope - plunkr An alternative, and arguably simpler method would be to pass in the parents scope in to the modal. Note that currently this doesn't work when using controllerAs syntax on the parent controller. var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', scope: $scope });
accepted answer of: http://stackoverflow.com/q/26570653
answers question: http://stackoverflow.com/q/26570653
type: Answer
upvote count: 20

http://stackoverflow.com/comment/41871961
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26625529
has text: Shouldn't ` + window.pageYOffset` be ` - document.getBoundingClientRect().top`?
score: 0

http://stackoverflow.com/comment/41753021
comment on: http://stackoverflow.com/q/26566623
type: Comment
has text: tampermonkey or greasemonkey would allow you to run your own code on any site.
score: 0
type: QuestionComment

http://stackoverflow.com/a/26609936
has comment: http://stackoverflow.com/comment/41836502
type: Answer
has comment: http://stackoverflow.com/comment/41836874
has comment: http://stackoverflow.com/comment/41836260
has body: Let your showItemsList method accept your list as argument: function showItemsList(items) { var ul = document.getElementById("product_list"); ul.innerHTML = ""; for(i =0; i &lt; items.length; i++) { // get the current product var currentProduct = items[i]; // create element li var li = document.createElement('li'); // create product img var productImg = document.createElement('img'); productImg.src = currentProduct.img; productImg.className = "thumbnail"; li.appendChild(productImg); // create caption li.appendChild(document.createTextNode(currentProduct.title + " " + currentProduct.price + "kr")); ul.appendChild(li); } } Now your searchItem method can use it: function searchItem() { var matches = []; var ul = document.getElementById("product_list"); var search = document.getElementById("search").value; for(var x = 0; x &lt; gallery.length; x++){ //Get the current product var currentProduct = gallery[x]; //get the current product categories var currentProductCategories = currentProduct.category; //Loop through each category for(var z = 0; z &lt; currentProductCategories.length; z++){ //Check if the category is the one we are looking for if(currentProductCategories[z] == search){ matches.push(currentProduct); } } } showItemsList(matches); }
answers question: http://stackoverflow.com/q/26609769
has comment: http://stackoverflow.com/comment/41836670
score: 0
has comment: http://stackoverflow.com/comment/41836099

http://stackoverflow.com/comment/41808336
has text: @morissette is there a way to do it without session??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26596843

http://stackoverflow.com/comment/41781120
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26582314
has text: sorry, i'm new to this. how should i add coffee_and_donuts.js to external resources?

http://stackoverflow.com/a/26564786
upvote count: 6
has comment: http://stackoverflow.com/comment/50709272
answers question: http://stackoverflow.com/q/26563048
has comment: http://stackoverflow.com/comment/50709281
has body: The best I came up with: var gulp = require('gulp'); var tap = require('gulp-tap'); gulp.task('default', function() { return gulp.src([ 'generated/header.js', 'app.js', '*.js', './!(generated)/**/*.js', // &lt;- All subdirs except 'generated' 'generated/{templates,footer}.js', '!**/*.test.js', '!node_modules/**' ]).pipe(tap(function(file) { console.log(file.path); })); }); Running it: ∴ glob-test gulp [20:07:51] Using gulpfile ~/Desktop/glob-test/gulpfile.js [20:07:51] Starting 'default'... /Users/heikki/Desktop/glob-test/generated/header.js /Users/heikki/Desktop/glob-test/app.js /Users/heikki/Desktop/glob-test/config.js /Users/heikki/Desktop/glob-test/gulpfile.js /Users/heikki/Desktop/glob-test/about/about.js /Users/heikki/Desktop/glob-test/core/routing.js /Users/heikki/Desktop/glob-test/core/utils.js /Users/heikki/Desktop/glob-test/core/navbar/navbar.js /Users/heikki/Desktop/glob-test/generated/templates.js /Users/heikki/Desktop/glob-test/generated/footer.js [20:07:51] Finished 'default' after 326 ms The main trick is avoiding the "!" character at the beginning of glob when including files. https://github.com/isaacs/minimatch#comparisons-to-other-fnmatchglob-implementations "If the pattern starts with a ! character, then it is negated." ps. Placement of the negated globs doesn't matter. They are always moved to the end behind the scenes.
accepted answer of: http://stackoverflow.com/q/26563048
score: 6
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/26661952
tagged with: quickbooks
has body: Have anybody succeeded in interacting directly with Web Connector using qbwc:///? stuff ? I created a small page which calls these custom scheme URL with Ajax function CheckQWCLoaded() { var strURL = 'qbwc://docontrol/WSExists?AppName=Quickbooks+to+eUnify+Integration?'; var CheckResult = false; jQuery.ajax({ url: strURL, dataType: "json", complete: function (XMLHTTP) { if (XMLHTTP.status == 200) CheckResult = jQuery.parseJSON(XMLHTTP.responseText); } }); return CheckResult; } But when I run it in IE I get 'Access denied' error. How can I grant permissions to my JS ? Thanks, Slava
has comment: http://stackoverflow.com/comment/73014835
has title: Using qbwc protocol on a web page
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/51930362
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/72793018
upvote count: 1
has comment: http://stackoverflow.com/comment/73018668
type: Question
tagged with: javascript

http://stackoverflow.com/q/26528371
has answer: http://stackoverflow.com/a/26529019
has answer: http://stackoverflow.com/a/26528987
has comment: http://stackoverflow.com/comment/41683600
downvote count: 3
has title: Javascript calculator with exponents
has comment: http://stackoverflow.com/comment/41683793
type: Question
has answer: http://stackoverflow.com/a/26528967
has comment: http://stackoverflow.com/comment/41684063
tagged with: javascript
answer count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/41683389
has comment: http://stackoverflow.com/comment/41683506
favorite count: 0
has body: I am attempting to create a simple calculator using html5, css3 and javascript. My problem is that my button for exponent does not seem to work, all the other operator buttons work fine. My code is as follows: Calculator
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/26646940
has comment: http://stackoverflow.com/comment/41899093
has comment: http://stackoverflow.com/comment/41899579
has answer: http://stackoverflow.com/a/26647106
possible better answer: http://stackoverflow.com/a/26647106
has body: I have this textbox indside a datalist tr> Email <asp:TextBox ID="tb_email" CssClass="tb_orderByPhn" runat="server" /> And a button to call javascript as <asp:LinkButton id="btn_order" class="btn btn-lg btn-block btn-success btn_rad " OnClick="btn_order" OnClientClick=" return validate_order()" runat="server" >Order now </asp:LinkButton> On the above button click i am calling a javascript function.Upto this it is good but it won't recognize a textbox id why? function validate_order() { alert("ok"); var name = document.getElementById('<%=tb_email.ClientId%>').value; alert(name); } It gives the error: The name 'tb_email' does not exist in the current context.
has comment: http://stackoverflow.com/comment/41900002
type: AnsweredQuestion
tagged with: c#
has answer: http://stackoverflow.com/a/26647115
type: Question
answer count: 2
tagged with: javascript
has title: Textbox id is not accessible in the javascript
accepted answer: http://stackoverflow.com/a/26647115
score: 0

http://stackoverflow.com/q/26515088
tagged with: javascript
tagged with: prototype
linked to: http://stackoverflow.com/q/21321962
has answer: http://stackoverflow.com/a/26515177
score: 3
tagged with: this
answer count: 1
has comment: http://stackoverflow.com/comment/41661747
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/41667418
upvote count: 3
has body: I have a question reminiscent of JavaScript - The Good Parts: Function prototypes vs Object prototypes. In particular, on page 33 of "JavaScript: The Good Parts", we have the following: Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; } String.method('trim', function () { return this.replace(/^\s+|\s+$/g, ''); }); console.log( "foo ".trim() ); // Not in "JavaScript: The Good Parts" but added for discussion. What is the purpose of return this; in Function.prototype.method - is it to allow "dot chaining" or "to program in a cascade style" as noted at the top of page 49? Also, how does the system know that this refers to the string literal "foo " within String.method?
type: Question
has title: The Good Parts, Augmenting Types
downvote count: 0

http://stackoverflow.com/comment/42038875
comment on: http://stackoverflow.com/a/26707483
score: 0
has text: Omg..didn’t read your entire post - again! So I don’t think the first option (find an object with a constant webpack number/index) is possible. Although the approach with iteration is messy I think it’s the only solution.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41756169
comment on: http://stackoverflow.com/q/26568305
has text: Yes i checked every thing i am getting this Chrome Developer Console `Caption 2 definition error, Style 'left' not specified. Please always specify caption like 'position: absolute; top: ...px; left: ...px; width: ...px; height: ...px;'. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla suscipit nunc urna. Quisque congue venenatis diam. Aliquam dignissim erat ac laoreet lacinia. `
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41818162
has text: +1 for you. this works like charm. One more question to ask related to this. I want to use this jquery script above for multiple combobox. i.e. same script for two or more combobox. Also if 'A' value is selected in 1st Combobox, then it is disabled in other combobox. Is there anyway to do that... For clarification i am editing the question. Please check..
comment on: http://stackoverflow.com/a/26587691
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26578795
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: osascript
tagged with: objective-c
has title: NSTask completion
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26676689
tagged with: osx-yosemite
score: 2
upvote count: 2
has body: How do I provide a callback to know when a task has completed? Do I need to set up an NSRunLoop or something? ObjC.import('Cocoa'); exec("/usr/bin/say",["hello"]) function done(notification) { $.NSLog('Application done'); $.NSLog(notification); } function exec(cmd,args){ var task = $.NSTask.alloc.init task.launchPath=cmd task.arguments=args task.terminationHandler = $(done) // does not work! task.launch $.NSLog("running: "+task.running) return task } PS The language is JavaScript for Automaton, a new OSASCRIPT language for Yosemite OS X 10.10
type: Question
tagged with: automation

http://stackoverflow.com/comment/41919904
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26658702
has text: Couldn't you just return the value from your method and assign it to $scope.value?

http://stackoverflow.com/a/26662625
has comment: http://stackoverflow.com/comment/41940767
has comment: http://stackoverflow.com/comment/41952175
has comment: http://stackoverflow.com/comment/41930561
has comment: http://stackoverflow.com/comment/41949788
score: 83
has comment: http://stackoverflow.com/comment/41928571
upvote count: 83
has comment: http://stackoverflow.com/comment/41965464
has body: There is no need to go into the land of strings, which could be awkward if you ever had a decimal value. function RoundedMax(a) { var mx = Math.max.apply(Math, a); if (mx == 0) {return 0}; var size = Math.floor(Math.log(Math.abs(mx)) / Math.LN10); var magnitude = Math.pow(10, size); var yMax = Math.ceil(mx / magnitude) * magnitude; return yMax; } function RoundedMin(a) { var mn = Math.min.apply(Math, a); if (mn == 0) {return 0}; var size = Math.floor(Math.log(Math.abs(mn)) / Math.LN10); var magnitude = Math.pow(10, size); var yMin = Math.floor(mn / magnitude) * magnitude; return yMin; } var arr = [-9.9,-1.23,-8.2,-2.01,-4.5,0]; document.write(RoundedMax(arr) + &quot; &quot; + RoundedMin(arr)); Outputs: 0 -10. EDIT Updated in view of the comments. Now works even in IE8. Now (2023) that all current browsers support ECMAScript 6: function RoundedMax(a) { var mx = Math.max.apply(Math, a); if (mx == 0) {return 0}; var size = Math.floor(Math.log10(Math.abs(mx))); var magnitude = Math.pow(10, size); var yMax = Math.ceil(mx / magnitude) * magnitude; return yMax; } function RoundedMin(a) { var mn = Math.min.apply(Math, a); if (mn == 0) {return 0}; var size = Math.floor(Math.log10(Math.abs(mn))); var magnitude = Math.pow(10, size); var yMin = Math.floor(mn / magnitude) * magnitude; return yMin; }
has comment: http://stackoverflow.com/comment/41950635
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41942398
answers question: http://stackoverflow.com/q/26661999
has comment: http://stackoverflow.com/comment/41931398
has comment: http://stackoverflow.com/comment/42971526
accepted answer of: http://stackoverflow.com/q/26661999
type: Answer
has comment: http://stackoverflow.com/comment/41963543

http://stackoverflow.com/q/26583803
has comment: http://stackoverflow.com/comment/41783400
has comment: http://stackoverflow.com/comment/41783601
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/41783396
has comment: http://stackoverflow.com/comment/41783468
tagged with: http://stackoverflow.com/tag/html
has title: How to guarantee image load before my JavaScript runs?
has answer: http://stackoverflow.com/a/26583895
type: UnansweredQuestion
tagged with: performance
has body: I am trying to use img.onload = function() { ... } to guarantee that a picture is fully loaded in order to proceed with my steps. This method does not work for me because I need to load another picture after the first one has been loaded (I have an array of pictures that must be loaded, one after another, with a specific time interval). Is there any alternative (maybe jQuery) to guarantee that the picture was loaded?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26584053

http://stackoverflow.com/q/26518538
answer count: 2
has title: Underscore.js how to countBy
has body: I'm new to the underscore.js library, and a novice still at javascript. I have successfully used the countBy method to summarize my responses. But how do you use a countBy to count things that are not there vs some predefined buckets? Or should I be using a different method altogether? Consider the following example, here is the JSFiddle http://jsfiddle.net/itchesavvy/bfmhtp5e/2/ var data = [{ questionData: { type: 'multiple choice', content: { text: 'This is the question?', answers: [{ _id: 'id1', value: 'First answer' }, { _id: 'id2', value: 'Second answer' }, { _id: 'id3', value: 'Third answer' }, { _id: 'id4', value: 'Fourth answer' }] } }, responses: [{ answer: 'id1', timestamp: 1 }, { answer: 'id2', timestamp: 4 }, { answer: 'id1', timestamp: 10 }, { answer: 'id3', timestamp: 15 }, { answer: 'id3', timestamp: 16 }, { answer: 'id1', timestamp: 25 }, { answer: 'id2', timestamp: 35 }, { answer: 'id3', timestamp: 42 }, { answer: 'id1', timestamp: 44 }, { answer: 'id1', timestamp: 50 }, { answer: 'id2', timestamp: 70 }, { answer: 'id3', timestamp: 80 }, { answer: 'id2', timestamp: 81 }] }]; var b = _.countBy(data[0].responses,'answer'); console.log(b); This results in the following object {id1:5, id2:4, id3:4} I would like to know how to get {id1:5, id2:4, id3:4, id4:0} using the data from questionData.content.answers Even more so, I would like to know how to get {'First answer':5, 'Second answer':4, 'Third answer':4, 'Fourth answer':0} again probably using the data from questionData.content.answers in the value fields.
favorite count: 0
tagged with: javascript-objects
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26519040
downvote count: 0
tagged with: underscore.js
type: Question
has answer: http://stackoverflow.com/a/26519040
has answer: http://stackoverflow.com/a/26519037
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26519037
upvote count: 2

http://stackoverflow.com/comment/41787697
has text: hey Xan , Problem doesnot lie in opening the popup window , but closing it . I want to close the popup child window from parent window where it was created
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26586275
type: AnswerComment

http://stackoverflow.com/q/26555326
has body: I have an array of objects var j = [{"v1":["1","2","3"]}, {"v2":["4","5","6"]}, {"v3":["7","8","9"]}]; I want to check against the object property and perform some sort of logic. I am new to JS so I'm not sure of all the methods I have access to. Basically I want to compare the key value of the object to a string. If the key and the string are the same, then I would remove that object from the array. I'm not sure how to iterate through the object's key in the array. var str = "v1"; for (var i in j) { if (i.key == str) { // not sure how to access key value j.splice(i,1); } }
type: Question
has answer: http://stackoverflow.com/a/26555362
has answer: http://stackoverflow.com/a/26555704
has comment: http://stackoverflow.com/comment/41732599
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41732470
has comment: http://stackoverflow.com/comment/41733075
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41732468
has comment: http://stackoverflow.com/comment/41732600
has comment: http://stackoverflow.com/comment/41732527
accepted answer: http://stackoverflow.com/a/26555704
has comment: http://stackoverflow.com/comment/41732683
has title: iterating array of objects and the key values in JS
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41732569
possible better answer: http://stackoverflow.com/a/26555362

http://stackoverflow.com/comment/41696467
type: AnswerComment
comment on: http://stackoverflow.com/a/26534548
type: Comment
has text: But how will the localStorage.setItem() look like?
score: 0

http://stackoverflow.com/q/26618583
tagged with: client-side
favorite count: 0
upvote count: 1
tagged with: local-storage
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41849689
has body: I would like to load some text from either a text file or (preferably) a comma-separated value file. The web application is a single HTML file on a shared drive (due to business restrictions of data protection). The text file will be in the same directory as the HTML file. I need a method of getting the data into the web app automatically on start up, this would simplify the interactions with the application, yet still make it easy enough to add more data the system for end users. I have tried using objects which have been able to get the text loaded into the body but it loads up a new document of which I do not know how to manipulate in Javascript.
score: 1
has title: How do you load a string from local file only using client-side languages?
accepted answer: http://stackoverflow.com/a/26618672
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/41848744
downvote count: 0
has comment: http://stackoverflow.com/comment/41848177
has answer: http://stackoverflow.com/a/26618672
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/26538536
type: Question
has comment: http://stackoverflow.com/comment/41702614
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41702605
has body: I am looking at algebra and trying to find methods to translate expressions into programming loops. The simple version of this center of gravity equation (as I understand) would be to find a single value from a data set. sudo code: var Price=[];//Array of imaginary numbers var i=Price.length; var S1 = 0.0, S2 = 0.0, Answer = 0.0; while(i--){ S1 += (i+1) * Price[i]; S2 += Price[i]; if(!i){Answer = S2/S1;} } In the expression Σ (Sigma) is the instruction to sum up where N would be the number of times and i is the iteration. Why is the i in (i+1) shown as an x in the expression?
has title: Translate Algebraic expressions into programming
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26546331
possible better answer: http://stackoverflow.com/a/26546432
has answer: http://stackoverflow.com/a/26546432
upvote count: 1
has title: Case sensitivity in password validation in login form
type: Question
type: AnsweredQuestion
has body: I have a login form, i am done with connecting to DB, everything works fine. I have a username = a and password = b in my DB. During login if i enter "B" in password, i am able to login, can some one help me out with validating that password field. Thx in advance. The JSP code is as follows: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Login Name Password
accepted answer: http://stackoverflow.com/a/26546749
score: 1
has comment: http://stackoverflow.com/comment/41715610
answer count: 3
downvote count: 0
tagged with: jsp
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41715652
has answer: http://stackoverflow.com/a/26546442
has answer: http://stackoverflow.com/a/26546749
has comment: http://stackoverflow.com/comment/41715701

http://stackoverflow.com/q/26551787
downvote count: 1
has answer: http://stackoverflow.com/a/26552017
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/642650
upvote count: 9
accepted answer: http://stackoverflow.com/a/26551840
tagged with: javascript
has comment: http://stackoverflow.com/comment/41725802
has comment: http://stackoverflow.com/comment/41725892
has answer: http://stackoverflow.com/a/26552037
favorite count: 0
linked to: http://stackoverflow.com/q/1133770
possible better answer: http://stackoverflow.com/a/26551921
has title: Convert negative number in string to negative decimal in JavaScript
answer count: 5
has answer: http://stackoverflow.com/a/26551921
has answer: http://stackoverflow.com/a/26551948
has answer: http://stackoverflow.com/a/26551840
score: 8
has body: I have a string : "-10.456" I want to convert it to -10.465 in decimal (using JavaScript) so that I can compare for greater than or lesser than with another decimal number. Regards.

http://stackoverflow.com/q/26590092
has answer: http://stackoverflow.com/a/26787184
upvote count: 4
tagged with: mongodb
downvote count: 0
has body: On the web page when the user clicks on the logout button, I have a JavaScript function which clears the user session which is stored on the MongoDB. It works fine. Also I would like to clear the user session when the user closes the browser. Here is the issue I am facing : when the user clicks on the refresh icon the logout function is getting called. I only want this function to be called when the browser is closed. Can I prevent this function from calling on the page refresh? My logic here is to clean up the session when the browser is closed. I am deleting the session which is on MongoDB. Is there a better way to manage the session? var isRefresh = false; $(window).keydown(function (event) { if (event.keyCode == 116) { // User presses F5 to refresh refresh = true; } }); // Calls the logout function when you close the browser thus cleans the session data. var windowsCloseEventListener = window.attachEvent || window.addEventListener; var chkForBrowserCloseEvents = window.attachEvent ? 'onbeforeunload' : 'beforeunload'; /// make IE7, IE8 compitable windowsCloseEventListener(chkForBrowserCloseEvents, function (e) { // For &gt;=IE7, Chrome, Firefox if (!isRefresh) { $scope.logout(); } });
tagged with: javascript
answer count: 6
tagged with: browser-close
has answer: http://stackoverflow.com/a/26594386
favorite count: 0
has answer: http://stackoverflow.com/a/26760514
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4194883
has answer: http://stackoverflow.com/a/26787194
has answer: http://stackoverflow.com/a/26782837
linked to: http://stackoverflow.com/q/1119289
type: Question
has answer: http://stackoverflow.com/a/26743898
tagged with: session
has title: Browser refresh using OnBeforeUnload event
score: 4
tagged with: angularjs-scope

http://stackoverflow.com/a/26662228
downvote count: 0
has comment: http://stackoverflow.com/comment/41927253
has comment: http://stackoverflow.com/comment/41927566
score: 4
answers question: http://stackoverflow.com/q/26661565
has body: The following code does what you asked for. Salient points: The rules for expression_list now build an actual list of values to be used with the functions being called. The list built by expression_list are passed to apply so that they become the arguments of the function being called (undefined is there as the first argument to set the value of this to undefined). I've added a console.log instruction to the actions for expression so that I'd see what is going on when I run the resulting parser at the command line. I've moved the definition of funcs to the very start. Where it was jison was just not putting it in the right place in the final file. Here's the final file: %{var funcs = { pow: function(a, b) { return Math.pow(a, b); }, test: function(a) { return a*2; } } %} /* lexical grammar */ %lex %% \s+ /* skip whitespace */ [0-9]+("."[0-9]+)?\b return 'NUMBER' [a-zA-Z]+ return 'NAME' "," return ',' "*" return '*' "(" return '(' ")" return ')' &lt;&lt;EOF&gt;&gt; return 'EOF' . return 'INVALID' /lex %start expressions %% /* language grammar */ expressions : e EOF { console.log($1); return $1; } ; expression_list : expression_list ',' e { $$ = $1.concat([$3]); } | e { $$ = [$1]; } ; e : e '*' e {$$ = $1*$3;} | '(' e ')' {$$ = $2;} | NUMBER {$$ = Number(yytext);} | NAME '(' expression_list ')' {$$ = funcs[$NAME].apply(undefined, $expression_list);} ;
has comment: http://stackoverflow.com/comment/41926994
type: Answer
upvote count: 4

http://stackoverflow.com/q/26515239
has comment: http://stackoverflow.com/comment/41661579
has title: Chunking Arrays by Condition Javascript
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/41660418
has body: I'm trying to group some JSON data into pairs, for a slider, but we've got a layout rule as below Portrait | Portrait Landscape Portrait | Portrait Portrait | Portrait Landscape Landscape So in the gallery, 2 portrait images can be next to each other, however landscape images use a view of their own. The data I've got follows this basic setup var photos = [ { "id": "1", "landscape": false }, { "id": "2", "landscape": false }, { "id": "3", "landscape": true }, { "id": "4", "landscape": true }, { "id": "5", "landscape": false }, { "id": "6", "landscape": true }, { "id": "7", "landscape": false }, { "id": "8", "landscape": false }, { "id": "9", "landscape": false }, { "id": "10", "landscape": false }, { "id": "11", "landscape": false }, { "id": "12", "landscape": true }, { "id": "13", "landscape": true }, { "id": "14", "landscape": false }, { "id": "15", "landscape": true } ]; However I need to format it in a similar structure to below - trying to keep the original order of the data as intact as possible. var views = [ [{id:"1", landscape: false},{id:"2", landscape: false}], [{id:"3", landscape: false},{id:"4", landscape: false}], [{id:"5", landscape: true}], [{id:"6", landscape: false},{id:"7", landscape: false}], [{id:"7", landscape: true}] ]; //etc etc We don't have access to jQuery, but have the full _underscore.js library to hand and of course native javascript. Could somebody please shed some light on how this would be possible? Many thanks
has comment: http://stackoverflow.com/comment/41660290
has comment: http://stackoverflow.com/comment/41661148
type: Question
has comment: http://stackoverflow.com/comment/41660541
tagged with: arrays
tagged with: javascript
tagged with: chunking
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26515675
has comment: http://stackoverflow.com/comment/41662144
has comment: http://stackoverflow.com/comment/41660597
type: UnansweredQuestion

http://stackoverflow.com/a/26552306
has comment: http://stackoverflow.com/comment/41734377
has body: WebSQL and IndexedDB databases are both linked to the host. So foo.com and bar.com would have different databases, even if they gave them the same name. It's standard web security; the same thing happens with cookies and LocalStorage. From the Cross Directory Attacks section: Different authors sharing one host name, for example users hosting content on geocities.com, all share one set of databases. So apparently databases are shared per-domain but not per-host.
has comment: http://stackoverflow.com/comment/41727059
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41757528
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26529686

http://stackoverflow.com/a/26641451
has body: try to use developer tool, you will find this code #quotes_slider_container &gt; .flex-direction-nav .flex-prev, #quotes_slider_container &gt; .flex-direction-nav .flex-next{ background: none #fff; } overwrite the background-image .flex-direction-nav .flex-prev{ background: url(../images/bg-prev.png) center no-repeat; . . } resolve this issue and it will see the arrows again.
answers question: http://stackoverflow.com/q/26641316
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41981774

http://stackoverflow.com/q/26606383
possible better answer: http://stackoverflow.com/a/26606434
tagged with: javascript
has answer: http://stackoverflow.com/a/26606434
has comment: http://stackoverflow.com/comment/41825288
answer count: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/26606692
favorite count: 0
tagged with: angularjs
tagged with: angular-promise
upvote count: 6
has title: How to pass $q to angular directive link function?
has answer: http://stackoverflow.com/a/26606478
type: AnsweredQuestion
has body: I need to use $q a link function of my directive. I need it to wrap possible promise that is retuned by one of arguments (see the example below). I don't know however, how to pass $q dependency to a this function. angular.module('directives') .directive('myDirective', function() { return { scope: { onEvent: '&amp;' } // ... link: function($scope, $element) { $scope.handleEvent() { $q.when($scope.onEvent()) { ... } } } } }
score: 6
type: Question
has answer: http://stackoverflow.com/a/26606692
tagged with: angularjs-directive

http://stackoverflow.com/q/26587484
type: UnansweredQuestion
has title: Including Moment.js in LiveCycle Designer
tagged with: momentjs
score: 2
tagged with: livecycle
upvote count: 2
has answer: http://stackoverflow.com/a/26609210
has body: For few days I've been trying to include the actual Moment.js library in my dynamic PDF which I've created with Adobe Livecycle Designer. We've used an older version (1.7.2) without any problems but now I only get a 'Function not exist' error. Does anyone have any expierience with this? Thanks in advance.
type: Question
has answer: http://stackoverflow.com/a/30920795
tagged with: javascript
answer count: 2
tagged with: livecycle-designer
downvote count: 0
favorite count: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/26569527
tags question: http://stackoverflow.com/q/26642365
tag name: web-services
tags question: http://stackoverflow.com/q/26667827
tags question: http://stackoverflow.com/q/26573070

http://stackoverflow.com/comment/41919054
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26658374
has text: Thanks. there is any way to this in another way?

http://stackoverflow.com/comment/41663027
type: QuestionComment
has text: The easiest thing would be to check and see if the day you want to select (prior to selecting it) returns 0 or 6 from getDay() which would mean that it's a Saturday (6) or Sunday (0) and then adjust as needed. Otherwise you'd probably have to mess around with beforeShowDay().
comment on: http://stackoverflow.com/q/26515109
score: 0
type: Comment

http://stackoverflow.com/q/26516870
has title: Rendering Ember view with helpers
tagged with: ember.js
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41674112
tagged with: model-view-controller
type: AnsweredQuestion
type: Question
tagged with: jsfiddle
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41671278
has answer: http://stackoverflow.com/a/26524100
has body: I have read the ember guide to achieve the same in my Ember Application, but i can't. I am trying to configure my view with a Controller which makes a multiplication between two values Here the code: App.TotalView = Ember.View.extend({ attributeBindings: ['value', 'placeholder'], placeholder: null, value: '', total: (function() { return this.get('newThread.selectContentTariffa') * this.get('newThread.primary'); }).property('newThread.selectContentTariffa', 'newThread.primary') }); Here in the view: &lt;td&gt;{{view "total" valueBinding=newThread.value}}&lt;/td&gt; I can not get the result of this multiplication in this view,is this code correct? what's wrong? You can see here: http://emberjs.jsbin.com/qakado/edit
accepted answer: http://stackoverflow.com/a/26524100

http://stackoverflow.com/a/26579524
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41776307
score: 1
answers question: http://stackoverflow.com/q/26579321
accepted answer of: http://stackoverflow.com/q/26579321
has body: You need to call initialize2(); from within your geocode function callback: // get the destination's LatLng object geocoder.geocode( {'address': DESTINATION_ADDRESS}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { destination_LatLng = results[0].geometry.location; initialize2(); } }); The problem is that you were trying to initialise the map before the geocoder had finished. You can also put this all in one link:
has comment: http://stackoverflow.com/comment/41776291
has comment: http://stackoverflow.com/comment/41776272
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41776457

http://stackoverflow.com/q/26594331
has title: Safari Extension: WebSocket connection failure calls onclose and not onerror and no exception
tagged with: safari
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41840548
has body: I'm writing browser extensions for Firefox, Chrome and Safari. When attempting to connect to a WebSocket server using the Safari Extension where there is NO server listening on a particular port, my Safari extension doesn't throw an exception, nor does it call onerror. Instead, the Safari extension's onclose handler is being called. I'm also seeing this message in the console: [Error] WebSocket network error: The operation couldn’t be completed. Connection refused (global.html, line 0) On Firefox and Chrome, it seems to handle it properly AFAIK and calls onerror. I'm just doing something like this: var socket = new WebSocket('ws://127.0.0.1:'+inPort, inHandlerName); socket.binaryType = "arraybuffer"; then declare handlers for onopen, onclose, onerror, and onmessage. inPort is 9000 and inHandlerName is a string like "global-handler". I put exception handlers in each of the WebSocket handlers and also the function that has the code that creates the WebSocket, but I am not seeing any exceptions caught. Is this a known problem? Is there a way to find out if the connection failed? Edit: This happens on a simple web page in Safari as well: var theSocket = new WebSocket('ws://127.0.0.1:9000', 'global-message'); theSocket.onopen = function() { console.log("onopen"); }; theSocket.onerror = function() { console.log("onerror"); }; theSocket.onmessage = function() { console.log("onmessage"); }; theSocket.onclose = function() { console.log("onclose"); };
type: Question
answer count: 1
tagged with: websocket
upvote count: 6
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26635641
favorite count: 0
downvote count: 0
score: 6
has answer: http://stackoverflow.com/a/26635641
tagged with: safari-extension

http://stackoverflow.com/comment/41924466
score: 0
type: Comment
has text: Right, this is how I had it done at first, but since it wasn't working was going to test it with just using less than. Now that it works I'll be adding the || back in. Thanks!
comment on: http://stackoverflow.com/a/26660865
type: AnswerComment

http://stackoverflow.com/comment/41689417
comment on: http://stackoverflow.com/q/26530545
score: 0
has text: When you do `$(xml)` you are parsing it. You need to tell the parser _not_ to do that by using CDATA.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26536890
has comment: http://stackoverflow.com/comment/41700691
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41699625
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41699661
tagged with: jquery
tagged with: express
has title: Consuming JSON with an array in ExpressJS
has answer: http://stackoverflow.com/a/26537941
tagged with: node.js
favorite count: 0
has body: On the webpage I am POSTing some JSON using jQuery: $.post('/url', data); My data is a javascript object that contains some values and an array. JSON.stringify(data) looks like: {"favoriteAnimal":"piglet", "okayAnimals":["cats","dogs"]} I'm consuming this JSON in a NodeJS webapp using ExpressJS (which is wired up with the body-parser middleware). I can retrieve the favorite animal like req.body.favoriteAnimal and it gives me the string piglet which is all fine and dandy. But how do I access the values in the array? req.body.favoriteAnimal // piglet req.body.okayAnimals // undefined req.body.okayAnimals[] // syntax error This works... req.body['okayAnimals[]'] ...but smells fishy. It also won't return an array if the original data that is being POSTed contains only one element in its array (it just returns a single string). Is there something going on with the the jQuery encoding of the JSON or something going on with the decoding in ExpressJS that's preventing me from accessing it like req.body.okayAnimals and getting an array every time?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26537038

http://stackoverflow.com/comment/41746640
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26561252
has text: Nice, but 4 ^ ((3 ^ 2) ^ 2) ^ 1 isn't working, can you fix that aswell?

http://stackoverflow.com/a/26562901
accepted answer of: http://stackoverflow.com/q/26562878
has comment: http://stackoverflow.com/comment/41748745
score: 1
answers question: http://stackoverflow.com/q/26562878
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41747201
type: Answer
has body: Check the Console output in your browser (e.g. F12 in Chrome/IE, FireBug in FireFox). Off the top of my head try replacing //ajax.googleapis.com with http://ajax.googleapis.com; or download the file and reference that file with a relative path. When you're running locally your protocol is file:// and //host means "access host via the same protocol the page is using". Also href="/css/... is absolute path so it'll look for the css file on your file system root (/ in unix, C:\ or D:\ in Windows) that can cause a styling issue. Update I'll try to walk through simply (as simple as handing network/file resources and 4 languages/libs at the same time can be ;) I copied your code from the question into D:\test\fiddle.html and opened it in Chrome, then pressed F12. Get better acquainted with Chrome Developer Tools, web development without it is like cutting a 100 year old tree with a spreading knife. The basic usage is essentially: Right click > Inspect element. GET file:///D:/test/jquery.js net::ERR_FILE_NOT_FOUND fiddle.html:6 The above line was modified by you after saving the page. It's because you included JQuery in the fiddle. Under Frameworks & Extensions set it to "No Library (Pure JS)" since you're including JQuery yourself with Uncaught ReferenceError: $ is not defined fiddle.html:92 Result of JQuery not included because of the schema being wrong (//). You'll also need to move the two JQuery MONDAY TUESDAY Wednesday x Assignment1 xAssignment2 xAssignment3 xAssignment4 xAssignment1 xAssignment2 xAssignment3 xAssignment4 xTodo1 xTodo2 xTodo3 xTodo4
upvote count: 1

http://stackoverflow.com/comment/41726635
has text: This disables all user highlighting on anything with the 'first' class, which isn't exactly needed. It is always best to understand the problem first - and then try to solve it - rather than piling 'quick-fix' code on top of everything. In time your solution will become completely unmanageable and you'll get all kinds of unexpected results.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26549387

http://stackoverflow.com/comment/41738347
comment on: http://stackoverflow.com/q/26554424
score: 0
type: QuestionComment
has text: @JonathanWood: What a fragile little person you seem to be. If you don't like my comments, stop sending me notifications. But I guess you just want me to tell me how great you are. Alright then. Wow, great question! You're really breaking new ground here! No one has ever wondered about boolean evaluations of values in a dynamically typed language before! Well done!
type: Comment

http://stackoverflow.com/comment/41899858
type: Comment
has text: This didn't worked in my case. Got the Error `[W] XTemplate evaluation exception: Cannot read property 'mask' of undefined` I think this error occur, because the property `protoEl` of the grid is null.
comment on: http://stackoverflow.com/a/26631823
type: AnswerComment
score: 0

http://stackoverflow.com/q/26666843
has title: Any way to prevent Safari edge swipe (on iPhone, for example)?
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26666897
downvote count: 0
has comment: http://stackoverflow.com/comment/110198853
type: Question
tagged with: safari
has answer: http://stackoverflow.com/a/26666897
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
has body: I've been researching how to prevent Safari's feature of swiping at the edge of the screen to navigate to previous/next pages in browser history. I have an application that uses Hammer.js to pan an image, and on mobile the image takes up the whole screen. So if the user happens to start panning at the left edge of the image, for example, it forgoes that by ignoring my little javascript app and instead going to the previous page. I haven't found anything saying it is actually possible to prevent this edge swipe feature...though I did find this: https://gist.github.com/mountainstorm/9430618. However, all it seemed to accomplish for me was breaking mouse scroll functionality. Any help would be greatly appreciated. Thanks!
linked to: http://stackoverflow.com/q/50156425
tagged with: macos

http://stackoverflow.com/q/26540502
favorite count: 0
has answer: http://stackoverflow.com/a/26540537
score: -2
type: AnsweredQuestion
downvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/26540537
has title: Why does Array.prototype.some return boolean?
has comment: http://stackoverflow.com/comment/41705909
tagged with: javascript
linked to: http://stackoverflow.com/q/10457264
has body: I feel like this gives me very little flexibility whenever I'm using this function. Usually I'm looking for the first occurrence of the element when I use this function but it just returns true which I find a little lacking. The primary reason for me to use this function is to break the loop whenever I find the element so using forEach defeats the purpose because forEach doesn't short-circuit. Array.prototype.filter is the same. Am I missing something or do I have to use for loop to get the first matched element in JavaScript?
upvote count: 0
tagged with: arrays
answer count: 1
duplicate of: http://stackoverflow.com/q/10457264

http://stackoverflow.com/q/26541501
tagged with: date-conversion
type: Question
has body: Please find my code below to convert date in string format to date format. var olddatetxt = "10/01/2014"; //October 1st 2014 var olddatearray = olddate.split("/"); //Values inside array are [10,01,2014] var olddate = new Date(olddatearray [2], olddatearray [0], olddatearray [1]); The problem here is the variable olddate is getting the value as Sat Nov 1 00:00:00 UTC+0530 2014 What is the error here ? Im passing values of October month &amp; why my result is November 1st ?
tagged with: date
score: 0
answer count: 1
has title: Javascript String to Date Conversion using new Date()
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26541526
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26541526

http://stackoverflow.com/q/26630144
has body: Hi so I have this POST request .click(function() { $.ajax({ type: "POST", url: "../quotes/create", data: { name : "John ", email: "john@john.com", json: "data", uid: "uid", }, dataType:'text', success: function(data,status,xhr){ console.log(status); alert("SUCCESS!"); }, error: function(xhr,status,error){ console.log(status,error); alert("ERROR!"); } }); }) in my controller I have the following: def create respond_to do |format| format.html {render text: "Your data was sucessfully loaded. Thanks"} end end On click I get the "SUCCESS!"message. Im just confused how to take this forward. I basically want to store this data in a way like this @quote = Quote.create(quote_params) if @quote.save flash[:success] = "Quote Created :)" redirect_to root_url else render 'new' end private def quote_params params.require(:quotes).permit(:uid, :name, :email, :json) end Any ideas on how to get the params data here in the controller and then get the page to redirect to the root_url after "SUCCESS!" ?
has comment: http://stackoverflow.com/comment/41873250
has comment: http://stackoverflow.com/comment/41873432
type: Question
has comment: http://stackoverflow.com/comment/41868666
has comment: http://stackoverflow.com/comment/41869407
has comment: http://stackoverflow.com/comment/41879576
tagged with: javascript
has comment: http://stackoverflow.com/comment/41869187
tagged with: ajax
tagged with: controller
score: 0
has comment: http://stackoverflow.com/comment/41869366
has title: Dealing with a POST Ajax in rails controller
has comment: http://stackoverflow.com/comment/41869010
has comment: http://stackoverflow.com/comment/41874062
answer count: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/41868722
tagged with: parameters

http://stackoverflow.com/a/26601424
has comment: http://stackoverflow.com/comment/41817931
downvote count: 0
has body: You can simply keep a flag in the database. when the button is clicked it will be set as a false and when operation finishes set it back to true. So the other user's access gets restricted.
has comment: http://stackoverflow.com/comment/41817028
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26601372
score: 1

http://stackoverflow.com/q/26518023
tagged with: html5-canvas
downvote count: 0
has body: I just had a really strange thing happen to me with Notepad++, and it could have been potentially devastating. My entire JS/HTML5 file (~350 lines) was randomly replaced with NUL's. All I know is that I saved my program, left Notepad++ going, and shut off my Surface Pro 1. I went into another classroom and turned it on again, a process taking maybe 3 minutes. This is also something I have done 1,000 times before. I turn on my tablet, enter my password, and am greeted not by my Checkers program (incomplete, obviously) but by a program consisting of one line and 9,986 NUL's in that line. The save option was grayed out, so I closed the file tab and reopened it from the directory it was in. Still NUL's. I had a back-up, thank God and OneNote in Heaven, but I still lost an hour of work since making that back-up. Anyone know what happened, so I can not have this happen when I don't have a back-up?
favorite count: 0
has comment: http://stackoverflow.com/comment/41676648
has title: Odd Notepad++ Issue...Code Completely Replaced by NUL
has comment: http://stackoverflow.com/comment/41690266
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 2
tagged with: nul
answer count: 0
type: Question
tagged with: notepad++
has comment: http://stackoverflow.com/comment/41666065
tagged with: javascript

http://stackoverflow.com/comment/41806260
type: QuestionComment
has text: @agf, I'm talking with them now, but what is in the docs isn't how it's functioning. Someone else also had the exact same problem: http://stackoverflow.com/questions/25643520/braintree-payments-escrow-funding#comment41769701_25643520
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26576252

header
type: Tag
tags question: http://stackoverflow.com/q/26660867
tag name: header
tags question: http://stackoverflow.com/q/26578140
tags question: http://stackoverflow.com/q/26663602
tags question: http://stackoverflow.com/q/26618893

http://stackoverflow.com/a/26610479
type: Answer
answers question: http://stackoverflow.com/q/26548106
upvote count: 5
has body: When you write .on("mousemove", mousemove()); it is immediately call the mousemove function and passes its return value as the listener function to the "mousemove" event. Because you are not setting correctly the this that is why d3.mouse(this) returns null. The fix is very easy: just pass in your mousemove function as reference and don't call it: .on("mousemove", mousemove); However even after this fix you will still get an error in the fiddle because your bisectDate function is missing...
has comment: http://stackoverflow.com/comment/41862891
type: AcceptedAnswer
downvote count: 1
score: 4
accepted answer of: http://stackoverflow.com/q/26548106
has comment: http://stackoverflow.com/comment/41869602

http://stackoverflow.com/comment/44133434
type: QuestionComment
has text: In my case the issue was that Ajax form handler not being called after form submit. Instead it would directly branch to the 'action' parameter given in the form. The basic issue was due to repeated switching of WYSIWYG and HTML editors in the wordpress, somehow the ajax form submit handler was commented out by automatically by inserting ![CDATA[. The solution is to disable WYSIWYG while editing wordpress posts and delete the ![CDATA[ keyword before the scripts...
score: 0
comment on: http://stackoverflow.com/q/26573749
type: Comment

http://stackoverflow.com/a/26582919
type: Answer
score: 0
has body: Where did you put the jquery code? It needs to be after where you have defined the displayfood, otherwise that element will not be found when code executes. Alternatively, use the ready function.
answers question: http://stackoverflow.com/q/26582864

http://stackoverflow.com/q/26587284
answer count: 1
has answer: http://stackoverflow.com/a/26587922
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/17004614
tagged with: highcharts
tagged with: arrays
has body: This is my array of series. var newData = [{ name: 'All', data: myVar, grouping: false, zIndex: 1, color: '#999966', stack: 1, dataLabels: { enabled: true, shadow: false, useHTML: true, formatter: function() { if (this.y != 0) return '&lt;div class=\'amount\'&gt;' + this.y + '&lt;/div&gt;'; }, y: 0, }, },{ name: 'Negative', data: mySeries[0], grouping: true, zIndex: 2, color: '#FF3030', dataLabels: { enabled: true, shadow: false, useHTML: true, formatter: function() { if (this.y != 0) return '&lt;div class=\'amount\'&gt;' + this.y + '&lt;img src="img/neg.png"&gt;&lt;/div&gt;'; }, y: 0 }, }, { name: 'Positive', data: mySeries[1], grouping: true, zIndex: 2, color: '#7ACC29', dataLabels: { enabled: true, shadow: false, useHTML: true, formatter: function() { if (this.y != 0) return '&lt;div class=\'amount\'&gt;' + this.y + '&lt;img src="img/pos.png"&gt;&lt;/div&gt;'; }, y: 0 }, } ]; In configuration I make pointing to this array. series: newData, Question: How can I dynamically change highchart to point to different array? For example to "oldData". Make like this: series: oldData, Thanks in advance!
type: Question
has title: how to dynamically change array in highchart?
score: 0

http://stackoverflow.com/q/26672104
has comment: http://stackoverflow.com/comment/41944543
possible better answer: http://stackoverflow.com/a/26672336
linked to: http://stackoverflow.com/q/16566299
type: Question
has comment: http://stackoverflow.com/comment/41944521
has comment: http://stackoverflow.com/comment/41944379
has answer: http://stackoverflow.com/a/26675326
tagged with: javascript
has comment: http://stackoverflow.com/comment/41944660
tagged with: class
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Get Attributes Value for multiple class
has answer: http://stackoverflow.com/a/26672392
accepted answer: http://stackoverflow.com/a/26672392
has body: Im a Javascript beginner. I want to get attribute value on multiple class elements. I tried with IDs, but it's not revelent since IDs are supposed to be unique. My HTML looks like this : &lt;a href="#" class="Test" onclick="myJavascriptFunc()" data="FooBar_1"&gt; &lt;a href="#" class="Test" onclick="myJavascriptFunc()" data="FooBar_2"&gt; &lt;a href="#" class="Test" onclick="myJavascriptFunc()" data="FooBar_3"&gt; Any help would be appreciated. Thanks
has answer: http://stackoverflow.com/a/26672838
has answer: http://stackoverflow.com/a/26672336
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/26519691
has comment: http://stackoverflow.com/comment/41671309
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26519131
answers question: http://stackoverflow.com/q/26519131
has comment: http://stackoverflow.com/comment/41670875
type: Answer
has comment: http://stackoverflow.com/comment/41671233
has comment: http://stackoverflow.com/comment/41670195
score: 0
has body: Demo on Fiddle HTML: Post this: Post JavaScript: var btn = document.getElementsByTagName("button")[0]; var inpt = document.getElementsByName("postHere")[0]; var cnt = 0; btn.onclick = function() { if (!inpt.value) alert("Hey! You didn't enter anything!"); else alert("The field contains the text: " + inpt.value); var tbl = document.getElementsByTagName("table")[0]; var row = tbl.insertRow(cnt++); var cell = row.insertCell(0); var txt = document.createTextNode(inpt.value); cell.appendChild(txt); };

http://stackoverflow.com/q/26516910
has body: the code doesnt give different scores for right and wrong answers, i need it to give the total score for the questions; even if you put wrong answers it says you've still got 3/3 00000
has title: javascript, quiz score wont work
tagged with: javascript
has answer: http://stackoverflow.com/a/26517094
has answer: http://stackoverflow.com/a/26517204
has comment: http://stackoverflow.com/comment/41663841
answer count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/41663856
has comment: http://stackoverflow.com/comment/41663762
favorite count: 0
type: UnansweredQuestion
downvote count: 8
score: -8
has comment: http://stackoverflow.com/comment/41664058
has comment: http://stackoverflow.com/comment/41663901
has answer: http://stackoverflow.com/a/26517029
type: Question

http://stackoverflow.com/comment/57418991
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26578359
has text: Please reduce this down to about 20 or 30 lines.

http://stackoverflow.com/comment/41660726
type: Comment
type: QuestionComment
has text: `setTimeout(fillhome(), 1000);` should be `setTimeout(fillhome, 1000);`
comment on: http://stackoverflow.com/q/26515398
score: 0

http://stackoverflow.com/comment/41922771
has text: it is included at the bottom https://github.com/twotimes22/twotimes22.github.io/blob/master/index.html
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26659893

http://stackoverflow.com/comment/41669971
score: 1
comment on: http://stackoverflow.com/q/26520349
type: Comment
type: QuestionComment
has text: The `+` operator automatically converts the elements into strings with `.toString()` (which outputs `[object...]`) because you cannot add HTML nodes together (but you can concatenate HTML strings, as *tymeJV* suggested).

http://stackoverflow.com/q/26648118
has comment: http://stackoverflow.com/comment/41901326
has comment: http://stackoverflow.com/comment/41901232
has comment: http://stackoverflow.com/comment/41900944
has comment: http://stackoverflow.com/comment/41900883
favorite count: 0
accepted answer: http://stackoverflow.com/a/26663171
upvote count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/41901065
has comment: http://stackoverflow.com/comment/41903038
has comment: http://stackoverflow.com/comment/41901682
has comment: http://stackoverflow.com/comment/41901167
has comment: http://stackoverflow.com/comment/41902592
has comment: http://stackoverflow.com/comment/41901494
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41900908
has comment: http://stackoverflow.com/comment/41903149
has comment: http://stackoverflow.com/comment/41901189
has comment: http://stackoverflow.com/comment/41902289
has comment: http://stackoverflow.com/comment/41901193
has comment: http://stackoverflow.com/comment/41903085
type: Question
has comment: http://stackoverflow.com/comment/41901640
has comment: http://stackoverflow.com/comment/41901314
has comment: http://stackoverflow.com/comment/41901013
has comment: http://stackoverflow.com/comment/41901820
has answer: http://stackoverflow.com/a/26663171
has comment: http://stackoverflow.com/comment/41901614
possible better answer: http://stackoverflow.com/a/26648301
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26648301
has comment: http://stackoverflow.com/comment/41901173
has body: I have gone through this before, but I don't know what I am doing wrong. I also take a look the documentation plus the existing question on Stack Overflow but I could not find any answer. This drives me crazy. I know I missed something but I could not trace it. This is what I have in index.php <?php echo ' '; foreach($datas as $data){ echo ' '; echo ' '; echo ' '; echo ' '; } echo ' '; So in my file.js $(function() { var CA = (function() { function add(form) { console.log('Form: ' + form.find('[name="qty"]').val() ); return false; } $('.vForm').submit(function(e) { add($(this)); e.preventDefault(); }); }()); }); For some reason I could not able to get the "qty" value in the text field in file.js. The code below also failed. I just got "undefined" in the console log. console.log('Form: ' + form.find('input[name="qty"]').val() ); Any help is greatly appreciated. Thank you.
has comment: http://stackoverflow.com/comment/41934771
answer count: 2
has comment: http://stackoverflow.com/comment/41900999
has title: jquery .find() is not returning value
has comment: http://stackoverflow.com/comment/41902080
has comment: http://stackoverflow.com/comment/41901440
downvote count: 0
has comment: http://stackoverflow.com/comment/41901239
has comment: http://stackoverflow.com/comment/41901994

http://stackoverflow.com/q/26561157
has comment: http://stackoverflow.com/comment/41742848
possible better answer: http://stackoverflow.com/a/26562086
has comment: http://stackoverflow.com/comment/41742749
tagged with: javascript
has comment: http://stackoverflow.com/comment/41742817
has comment: http://stackoverflow.com/comment/41743057
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26561573
downvote count: 0
has title: shortest way to create 2d array certain size
score: 1
has comment: http://stackoverflow.com/comment/41742825
favorite count: 0
accepted answer: http://stackoverflow.com/a/26561573
type: Question
has body: What is the shortest way to create a 2d array of a certain size? I figured that following code is pretty short, but can you do it with even less code? var x = 5; var y = 7; var my2dArray = (new Array(y)).fill(0).map( function(){ return new Array(x); } );
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26562086

http://stackoverflow.com/a/26619212
has body: You need to add models to your form's input elements: &lt;form name="myForm" ng-submit="subMe()"&gt; &lt;input type="text" name="name" value="" ng-model="myForm.name" /&gt; &lt;input type="text" name="email" value="" ng-model="myForm.email" /&gt; &lt;/form&gt; and $scope.subMe = function(){ console.log( $scope.myForm ); // { name: "abc", email: "abc@test.com"} } I am not sure I understand the second part of your question, but you will want to create an Angular Service for best practices when submitting your form data to your api.
score: 0
answers question: http://stackoverflow.com/q/26619112
type: Answer

http://stackoverflow.com/comment/41835909
type: QuestionComment
type: Comment
has text: At first I didn't understand what error you were getting; but after reading "I can not find the problem Cannot read property "0" from undefined" four times, I finally understand.
comment on: http://stackoverflow.com/q/26611535
score: 2

http://stackoverflow.com/q/26608717
has comment: http://stackoverflow.com/comment/41829989
tagged with: css
has comment: http://stackoverflow.com/comment/41829646
has comment: http://stackoverflow.com/comment/41829483
has body: I have 2 dropdowns and one of them(the second one) is dynamic in the sense that its values change according to the option chosen in the first dropdown. JSFiddle result: http://jsfiddle.net/pgbw56vb/10/embedded/result/ Can someone pls show me how i can make the second dropdown a multi-select? I'm really green in Jquery and html. JSFiddle: http://jsfiddle.net/pgbw56vb/10/ &lt;select id="kategorie_oder_seite"&gt;&lt;/select&gt; &lt;select id="auswahl"&gt;&lt;/select&gt; var data = { "Kategorie": ["Kraft", "Startseite", "Insurance", "Risk",], "Seite": ["http://jsfiddle.net/tony089/pgbw56vb/2/", "https://stackoverflow.com/users/login?returnurl=%2fquestions%2fask"], }; var $kategorien = $("#kategorie_oder_seite").on("change", function() { var seiten = $.map(data[this.value], function(seite) { return $("&lt;option /&gt;").text(seite); }); $("#auswahl").empty().append(seiten); }); for (var kategorie in data) { $("&lt;option /&gt;").text(kategorie).appendTo($kategorien); } $kategorien.change(); Thanks in advance.
has answer: http://stackoverflow.com/a/26608846
has comment: http://stackoverflow.com/comment/41830207
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/26608851
has comment: http://stackoverflow.com/comment/41829719
has comment: http://stackoverflow.com/comment/41829485
has comment: http://stackoverflow.com/comment/41830617
has comment: http://stackoverflow.com/comment/41830322
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41829508
has comment: http://stackoverflow.com/comment/41829847
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has title: Make dropdown multi-select
has answer: http://stackoverflow.com/a/26608972
type: Question
has comment: http://stackoverflow.com/comment/41830987
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26534135
answers question: http://stackoverflow.com/q/26532428
score: 0
type: Answer
has body: You could use PhantomJS to run a headless browser on the terminal and have JavaScript for socket.io client in the page loaded to PhantomJS.

http://stackoverflow.com/a/26625725
accepted answer of: http://stackoverflow.com/q/26625448
answers question: http://stackoverflow.com/q/26625448
type: Answer
upvote count: 1
downvote count: 0
has body: You want to use the componentRestrictions of the Places library: new google.maps.places.Autocomplete(document.getElementById('autocomplete'), { types: ['geocode'], componentRestrictions: { country: 'de' // ISO 3166-1 Alpha-2 country code, case insensitive } }); Hope this helps.
type: AcceptedAnswer
score: 1

http://stackoverflow.com/comment/44227075
comment on: http://stackoverflow.com/q/26532234
score: 0
type: QuestionComment
has text: Why opt-in to block a functionality, and then take issue with a library using that functionality?
type: Comment

http://stackoverflow.com/comment/41762827
type: Comment
has text: Hello rquinn, yes i know. I also tried to return directly the promise, but the result is the same, only in the calling method. For e.g. I'm calling the "promisedQuery" from an adapted "valueOf"-method. I currently do not know how to handle the promise correctly within the "valueOf"-method to return the results from the database. The code above is a snapshot of one of my tries. :)
comment on: http://stackoverflow.com/a/26567442
score: 0
type: AnswerComment

http://stackoverflow.com/a/43898317
has body: Not sure what version of fullcalendar you were using at the time of posting, but for anyone looking now with v2 or v3, fullcalendar has on/off and get/set utilities that allow you to add/remove handler functions or get/set options dynamically after init. https://fullcalendar.io/docs/utilities/handlers/ https://fullcalendar.io/docs/utilities/dynamic_options/ According to the docs: var calendar = $('#calendar').fullCalendar('getCalendar'); calendar.on('eventRender', function(event, element, view) { console.log('event rendered!', event); });
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26577094

http://stackoverflow.com/comment/41682376
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26527779
has text: SO what? What makes it impossible?

http://stackoverflow.com/comment/41781816
has text: Can you try creating a fiddle with your problem? After I applied the setXY method, the msgBox got positioned correctly.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26582358

http://stackoverflow.com/a/26555719
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26555239
has body: Ok - so the html you provided in the fiddle is really excessive, so instead of going through the whole thing, I created a very simple example to show/hide sections using jQuery's toggle() function, which I would recommend for this scenario since it automatically detects the target element's current visible state. Example: http://jsfiddle.net/Lv1wwfp2/2/ Group 1 Group 2 Group 3 Group 1 Group 2 Group 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26555239
type: Answer

http://stackoverflow.com/comment/41883689
type: QuestionComment
comment on: http://stackoverflow.com/q/26638235
score: 0
type: Comment
has text: jQuery ajax functions return promise objects - you can simply return the result of the $.get call to the calling function, and access the ajax response through the callbacks

http://stackoverflow.com/a/26621462
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41894766
has body: The setTimeout function returns a timeout ID that can be used to cancel the timeout later. This code is calling setTimeout and saving its result (the ID of the new timeout) in a variable so it can be passed to clearTimeout later. To be clear: you're not saving the setTimeout function in the variable; you're saving the result of calling it. Just like target holds a DOM element returned by calling the document.getElementById function, not the function itself.
accepted answer of: http://stackoverflow.com/q/26621427
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41853511
type: Answer
answers question: http://stackoverflow.com/q/26621427

http://stackoverflow.com/q/26538871
type: AnsweredQuestion
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26538969
tagged with: flask
favorite count: 0
has answer: http://stackoverflow.com/a/26538969
has answer: http://stackoverflow.com/a/26539528
score: 3
has body: Using Python 3.4.1 Everything is working fine, otherwise. For example: {{thing}} will create elements of however many things I expect, and console is even logging my expected results... but when the html is rendered the expressions are removed and I'm met with a list of empty elements: I know this is an issue with Flask using the same curly-brace notation. Does anybody know how to get AngularJS expressions to render otherwise? Tried both: jinja_options = Flask.jinja_options.copy() jinja_options.update(dict( block_start_string='<%', block_end_string='%>', variable_start_string='%%', variable_end_string='%%', comment_start_string='<#', comment_end_string='#>', )) app = Flask(__name__) app._static_folder = 'static' and app = Flask(__name__) app._static_folder = 'static' app.jinja_options.copy().update(dict( block_start_string='<%', block_end_string='%>', variable_start_string='%%', variable_end_string='%%', comment_start_string='<#', comment_end_string='#>', )) using the tag just renders it as-is without interpreting the delimiters. Leads to a bunch of 404's obviously. app = Flask(__name__) app._static_folder = 'static' app.jinja_options.update(dict( variable_start_string='%%', variable_end_string='%%' )) and app = Flask(__name__) app._static_folder = 'static' app.jinja_options.update( variable_start_string='%%', variable_end_string='%%' ) both give TypeError: 'ImmutableDict' objects are immutable Changing my angular expressions to {{'{{thing}}'}} works but I'd just as soon switch to a different framework than have to manage my angular code like that.
tagged with: angularjs
upvote count: 3
tagged with: python
accepted answer: http://stackoverflow.com/a/26539528
has title: Flask is parsing out AngularJS expressions

http://stackoverflow.com/comment/41833585
comment on: http://stackoverflow.com/a/26607898
score: 0
type: AnswerComment
has text: To make it more readable: `var circle = new google.maps.Circle(covered); Circles.push(circle);`
type: Comment

http://stackoverflow.com/a/26554305
has comment: http://stackoverflow.com/comment/41730971
has comment: http://stackoverflow.com/comment/41731092
upvote count: 1
has comment: http://stackoverflow.com/comment/41730606
score: 1
accepted answer of: http://stackoverflow.com/q/26554122
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26554122
downvote count: 0
has comment: http://stackoverflow.com/comment/41730655
has body: If I undestand well, you want the total ? int n; int total = 0; for (int i = 0; i &lt; goods.length; i++) { n = ((Integer)session.getAttribute(goods[i])).intValue(); if ( n &gt; 0 ) { out.println("&lt;li&gt;&lt;b&gt;" + goods[i] + "&lt;/b&gt; : " + n +" pcs for the price of $"+price[i] +"&lt;/li&gt;"); cost=n*price[i]; total=total+cost; out.println("$"+cost); } out.println("Total is : $"+total); }
type: Answer
has comment: http://stackoverflow.com/comment/41730467
has comment: http://stackoverflow.com/comment/41731204

http://stackoverflow.com/comment/41799508
score: 0
type: AnswerComment
type: Comment
has text: Instead of storing them in a collection, how about you put them in a Session variable? Each person can have their own copy. This way, refreshing or leaving the app will cause the Session to get killed, but the variable can still be treated as "reactive". Or, if you want to use Collections, do a "soft delete" buy storing a "read_by" array to indicate that a particular person already read the message.
comment on: http://stackoverflow.com/a/26590856

http://stackoverflow.com/comment/41712412
score: 1
has text: *"I have text on my website that I want to make LARGER when the user mouses over and SMALLER when the user leaves the hover."* Design- and UX-wise, this is very probably a bad idea.
comment on: http://stackoverflow.com/q/26544338
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41842093
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26615153
score: 0
has text: To avoid people's private photo's being yanked, you need to have a Facebook Application that request such permissions. Otherwise it wouldn't be secure.

http://stackoverflow.com/a/26661997
has body: How are you showing that the user is logged in? Is this an MVC application where you would be able to pass whether or not the user is logged in to the view? Then you would simply have to check a certain value on the DOM for whether or not the user is logged in and then display. Modern browsers also have access to local storage, so you could store whether or not the user is logged in there, then check with javascript / jQuery and display accordingly.
has comment: http://stackoverflow.com/comment/41926282
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26661846
score: 0
accepted answer of: http://stackoverflow.com/q/26661846
type: Answer
has comment: http://stackoverflow.com/comment/41926221
has comment: http://stackoverflow.com/comment/41926308

http://stackoverflow.com/a/26771465
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26533736
score: 0
type: Answer
has body: It turned out to be a CORS issue. Opera 12.17 seems to be very restrictive when it comes to CORS. I moved the app and all the necessary resources into one domain and it works as it should. Note * this issue only happens with Opera 12.17 , later versions seem to work.
answers question: http://stackoverflow.com/q/26533736

meteor-helper
tag name: meteor-helper
tags question: http://stackoverflow.com/q/26664299
type: Tag

http://stackoverflow.com/q/26545060
tagged with: javascript
has body: I am new to Node.js. I understand that "before waiting" i.e. before fileRead method returns a value "data" should be undefined, but shouldn't it hold a value after it has waited for one second and surely the fileRead function must have returned a value by now. Please find code below.. Here is a simple code to read file in fileReader.js : exports.fileRead = function(callback){ var fs = require('fs'); var f; var b = new Buffer(10000); fs.open('package.json', 'r', function(err, handle){ f = handle; console.log("reading"); fs.read(f, b, 0, 10000, null, function(err, bytesRead){ console.log("read complete!"); fs.close(f); callback(); console.log("returning"); return b.toString('utf8',0,bytesRead); }); }); } Here is a file that "imports" fileReader "module" (let me know if my terminology is wrong) : var filePrinter = require('./fileReader.js'); var data; data = filePrinter.fileRead(function(){ console.log("before waiting -\n"+ data); }); setTimeout(function(){ console.log("after waiting -\n" + data); },1000); console spits this when running : reading read complete! before waiting - undefined returning after waiting - undefined I know the below code using callback to pass a parameter would work just fine but what is the issue in above code? //fileReader.js exports.fileRead = function(callback){ var fs = require('fs'); var f; var b = new Buffer(10000); fs.open('package.json', 'r', function(err, handle){ f = handle; console.log("reading"); fs.read(f, b, 0, 10000, null, function(err, bytesRead){ console.log("read complete!"); fs.close(f); callback(b.toString('utf8',0,bytesRead)); }); }); } //============================= var filePrinter = require('./fileReader.js'); var data = null; data = filePrinter.fileRead(function(b){ data = b; console.log("before waiting -\n"+ data); }); setTimeout(function(){ console.log("after waiting -\n" + data); },1000);
has answer: http://stackoverflow.com/a/26545331
accepted answer: http://stackoverflow.com/a/26545335
possible better answer: http://stackoverflow.com/a/26545331
has title: node.js - this instance gets updated?
tagged with: node.js
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26545335
answer count: 2

http://stackoverflow.com/q/26654812
possible better answer: http://stackoverflow.com/a/26655234
tagged with: counter
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26655051
has body: I have implement the css/js flip counter from Chris Nanney of which you can see the jsfiddle here http://jsfiddle.net/H4PLA/1/. Problem that I have is that I would expect by setting the ad hoc parameters in the code below, I could define a: - start value, - end value, - increment value, - pace, with this script at the end of my html page: var value = 0; var endVal = 99; var inc = 9; //between 0 and 1000 var pace = 400; // between 400 and 2000 var nextCount; var myCounter = new flipCounter('flip-counter', { value: value, auto: false }); function doCount() { value = value + inc &gt;= endVal ? value + inc : endVal; myCounter.setValue(value); nextCount = value != endVal ? setTimeout(doCount, pace) : null; } doCount(); Somehow though, the end result (value=99) is shown straight away with no live dynamic increment between 0 and 99. Has someone got any idea why ? Thanks.
tagged with: http://stackoverflow.com/tag/html
has title: css flip counter - cannot set proper pace
has comment: http://stackoverflow.com/comment/41912793
has answer: http://stackoverflow.com/a/26655187
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/26655023
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26655051
has answer: http://stackoverflow.com/a/26655234
score: 0
type: Question

http://stackoverflow.com/q/26572858
downvote count: 2
answer count: 3
favorite count: 0
has title: Uncaught SyntaxError: Unexpected token o : Simple JSON parser not working
has comment: http://stackoverflow.com/comment/41763596
duplicate of: http://stackoverflow.com/q/15617164
type: UnansweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26572911
has body: Can someone see what is wrong with this simple JSON parser? (JSFiddle Link) I am getting an error in the console saying Uncaught SyntaxError: Unexpected token o var a = document.getElementById('a'); var json = { type: "cow", sound: "moo", colors: ["black", "white", "brown"], feed: { types: ["hay", "grass"], consistency: "wet" } }; var parsed = JSON.parse(json); //called with every property and it's value function process(key,value) { console.log(key + " : " + value); } function traverse(o,func) { for (var i in o) { func.apply(this,[i,o[i]]); if (o[i] !== null &amp;&amp; typeof(o[i])=="object") { //going on step down in the object tree!! traverse(o[i],func); } } } //that's all... no magic, no bloated framework traverse(json,process);
linked to: http://stackoverflow.com/q/15617164
type: Question
has answer: http://stackoverflow.com/a/26572887
score: -2
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/26572948

http://stackoverflow.com/q/26559323
has title: extjs4 TypeError: store is undefined
tagged with: extjs4.2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41742899
has answer: http://stackoverflow.com/a/62081924
type: Question
has body: I am a newbie for extjs4. I am reading the application architecture in the extjs offical website which offered a simple example(application_architecture). But I encountered some issues when studying this case. The app sturcture in eclipse is like above. The question I met is regarding the store. app\controller\Users.js please look at the comment in this piece of code. Ext.define('AM.controller.Users', { extend: 'Ext.app.Controller', stores: [ 'AM.store.Users' //this line of code can't work, unless I update it to `Users` //or it will report the exception 'TypeError: store is undefined' ], models: [ 'AM.model.User' ], Now I pasted the code of the other files related to this issue. app\store\Users.js Ext.define('AM.store.Users', { extend: 'Ext.data.Store', model: 'AM.model.User', autoLoad: true, proxy: { type: 'ajax', api: { read: 'data/users.json', update: 'data/updateUsers.json' }, reader: { type: 'json', root: 'users', successProperty: 'success' } } }); I have searched for the exception in google, but got nothing helpful, and I have debugged it in firefox, still nothing, maybe because I am an expert in javascript. I also checked the source code of other extjs apps in the company I worked, I found the controller can refer to the store like 'AM.store.Users' Thanks in advance!
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26559482
tagged with: extjs
tagged with: extjs4

http://stackoverflow.com/q/26636020
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/26636058
has body: I want center a inline-block element, with a text inside. This is the HTML: FAÇA SUA RESERVA Escolha o dia que deseja participar e aceite o nosso aplicativo. I need center just the title, and the subtitle "FAÇA SUA RESERVA", for this i'm using: .container.body .subtitle, .container.body .title { text-align: center; } It's working ok, but if i make changes in the title element, the text-align: center it stops working.. This is the css for the title element: .title { display: inline-block; border: 1px solid #F98835; color: #f98835; padding: 10px; } i already try setup margin: 0 auto;, and it doesn’t seem to have an effect
has title: Centering a inline-block element
has answer: http://stackoverflow.com/a/26636645
has answer: http://stackoverflow.com/a/26636781
answer count: 4
possible better answer: http://stackoverflow.com/a/26636391
has answer: http://stackoverflow.com/a/26636391
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26636058
type: AnsweredQuestion

http://stackoverflow.com/comment/41930556
has text: This needlessly passes and entire object to the server, and assumes the collections are named the same on the client as the publications are on the server. Check [my answer](http://stackoverflow.com/a/26664357/1269037) for the correct solution.
type: AnswerComment
comment on: http://stackoverflow.com/a/26661840
type: Comment
score: 2

http://stackoverflow.com/q/26600633
type: Question
has comment: http://stackoverflow.com/comment/41815328
possible better answer: http://stackoverflow.com/a/26600758
upvote count: 2
has comment: http://stackoverflow.com/comment/41815483
has comment: http://stackoverflow.com/comment/41815713
has answer: http://stackoverflow.com/a/26600865
has title: Adding multiple functions on
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26600806
has comment: http://stackoverflow.com/comment/41815828
has comment: http://stackoverflow.com/comment/41815464
answer count: 5
has answer: http://stackoverflow.com/a/26600758
has comment: http://stackoverflow.com/comment/41815289
has comment: http://stackoverflow.com/comment/41815282
linked to: http://stackoverflow.com/q/3291680
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41815605
has answer: http://stackoverflow.com/a/26603344
downvote count: 0
has body: I am trying to add multiple onload functions into my &lt;body&gt; My current code: &lt;body onload="_googWcmGet(number, '1800 000 000'); initialize()"&gt; The _googWcmGet is working but the second function isn't working... Please help!
has answer: http://stackoverflow.com/a/26601242
accepted answer: http://stackoverflow.com/a/26601242

http://stackoverflow.com/a/26636068
has body: .hover(function() { $( this ).toggleClass( "active" ) } This is from jQuery's docs - http://api.jquery.com/hover/ If you want to have a delayed job of sorts... you can use mouseenter (and leave, if you want custom stuff) .mouseenter(function() { $( this ).addClass( "active" ) }).delay(5000).removeClass( "active") That should work... you might have to use a custom timeout? delay doesn't always do what I think it's going to, but I think that'll do.
has comment: http://stackoverflow.com/comment/41879804
downvote count: 0
answers question: http://stackoverflow.com/q/26635984
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26662281
has comment: http://stackoverflow.com/comment/41926877
has answer: http://stackoverflow.com/a/26662425
has comment: http://stackoverflow.com/comment/41926960
has comment: http://stackoverflow.com/comment/41926723
has comment: http://stackoverflow.com/comment/41926779
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26689560
type: Question
has comment: http://stackoverflow.com/comment/41927105
tagged with: javascript
has answer: http://stackoverflow.com/a/26689560
has comment: http://stackoverflow.com/comment/41926925
has comment: http://stackoverflow.com/comment/41927212
has comment: http://stackoverflow.com/comment/41926588
score: 0
has title: Form Still Submitting
answer count: 2
has comment: http://stackoverflow.com/comment/41926558
has body: I am trying to stop a form from being submitted but even though the alert is triggered, the form is still submitting. This is my Javascript code (reduced to essentials): if(status == 1) { alert("Test"); e.preventDefault(); e.stopPropagation(); var elem = document.getElementById("error"); if(elem) { elem.parentNode.removeChild(elem); } var span = document.createElement("span"); span.className = "error_class"; span.id = "error"; span.innerHTML = "Please try again."; document.getElementById("field").appendChild(span); return false; } I'm testing with Firefox Beta and Google Chrome Beta. Can someone tell me what's missing? The code above is part of a function assigned to an event listener of a button.
possible better answer: http://stackoverflow.com/a/26662425
has comment: http://stackoverflow.com/comment/41926751

http://stackoverflow.com/q/26639468
upvote count: 2
has body: I am trying to debug Gulp task I wrote. I tried using 'gulp-debug' module but all it really does is just stat a file...which isn't usefull for me. For starters, how can I make the process go to the terminal? I wan to see what wiredep is outputing. I tried .pipe(process.stdout) but I got TypeError('invalid data'). var bowerStream = gulp.src('./app/bower_components') .pipe(wiredep()) .pipe(process.stdout)
type: Question
has answer: http://stackoverflow.com/a/29825117
has title: Gulp debugging - piping to process.stdout gives TypeError('invalid data')
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: gulp
accepted answer: http://stackoverflow.com/a/29825117
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41886191
possible better answer: http://stackoverflow.com/a/30067519
has answer: http://stackoverflow.com/a/30067519
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/41803093
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594150
has text: isn't there a `console.log($(this).attr('name').value)`?
score: 0

http://stackoverflow.com/comment/41828886
type: AnswerComment
has text: i am still getting the same error can u give me an example of how can i fix my error please
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26608283

http://stackoverflow.com/comment/41884379
has text: Actually, I think it's not finding /views/productList.html (http://errors.angularjs.org/1.3.0/$compile/tpload?p0=%2Fviews%2FproductList.html in the first line of the error.) According to the docs https://docs.angularjs.org/error/$compile/tpload it happens when it can't find the template. "To resolve this error, ensure that the URL of the template is spelled correctly and resolves to correct absolute URL. The Chrome Developer Tools might also be helpful in determining why the request failed."
score: 1
comment on: http://stackoverflow.com/a/26638112
type: AnswerComment
type: Comment

http://stackoverflow.com/a/31432044
score: 1
has body: Managed to solve the problem.follow the code: HTML: &lt;input id="image_link" name="link" type="text" value=""&gt; &lt;a class="btn iframe-btn" type="button" href="&lt;?=$filemanager_path;?&gt;/dialog.php?type=1&amp;field_id=image_link"&gt;Select&lt;/a&gt; &lt;div id="cont-img"&gt;&lt;img id="image_preview" src="" style="display:none;" width="303" /&gt;&lt;/div&gt; JAVAscript: &lt;script&gt; function responsive_filemanager_callback(field_id){ console.log(field_id); var url=jQuery('#'+field_id).val(); //alert('update '+field_id+" with "+url); //your code $('#image_preview').attr('src',document.getElementById("image_link").value).show(); parent.$.fancybox.close(); } &lt;/script&gt; I used fanybox to open and close the popup
type: Answer
has comment: http://stackoverflow.com/comment/57692845
upvote count: 1
answers question: http://stackoverflow.com/q/26530019
downvote count: 0

http://stackoverflow.com/comment/41749821
comment on: http://stackoverflow.com/q/26565198
score: 0
type: QuestionComment
type: Comment
has text: http://jsfiddle.net/6kwn857o/

http://stackoverflow.com/comment/41844834
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26616217
type: QuestionComment
has text: Cool :) There might be, but binary is not exactly javascripts strength, haha

http://stackoverflow.com/a/26665132
has comment: http://stackoverflow.com/comment/41932145
has comment: http://stackoverflow.com/comment/41932237
has comment: http://stackoverflow.com/comment/41932122
has comment: http://stackoverflow.com/comment/41932306
score: 0
has body: You should use javascript for the redirection, not ajax. When your ajax request has completed successfully you should then do a window.location = 'new/path/to/some/location'; Using the header("Location: ...") in your destination PHP script (the one that receives the data) will only return to you the html in the ajax response body, but not interpret it.
type: Answer
answers question: http://stackoverflow.com/q/26665081

http://stackoverflow.com/comment/41903537
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26648444
has text: Can't you understand the error message? It sayd that number is not a function... and indeed, `sites.length` is a numeric property, not a function. Omit the braces. Beside that, but `print();` in the callback function of `chrome.tabs.getSelected`. Otherwise it won't print any results.
type: QuestionComment

http://stackoverflow.com/a/26642763
has comment: http://stackoverflow.com/comment/41892290
score: 0
has comment: http://stackoverflow.com/comment/41892204
answers question: http://stackoverflow.com/q/26642673
type: Answer
has body: This: rememberMe:$('#remember').val() Needed to become: rememberMe:$('#remember').is(':checked')

http://stackoverflow.com/q/26562933
has body: Is there any debugger like there is in Visual Studio,for example in C#, I can follow every step of the program and find out how the code works, which function does it call first or what value does a certain integer has after loop? Thanks
tagged with: javascript
score: -1
has title: Javascript debugger similar to Visual Studios debugger?
downvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41745779
has answer: http://stackoverflow.com/a/26562962
accepted answer: http://stackoverflow.com/a/26562962
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: debugging

http://stackoverflow.com/q/26568833
tagged with: javascript
tagged with: fullcalendar
accepted answer: http://stackoverflow.com/a/26571212
has body: I have the following code, which filters FullCalendar by dates, content of items etc.The problem I have, is the filter is not respected when the month is changed. Seems like the calendar internally caches the initial source. Can anyone help? $(document).ready(function () { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, editable: true, events: getUrl() }); $('#siteSelect').click(function () { $('#calendar').fullCalendar('removeEvents'); $('#calendar').fullCalendar('removeEventSource', ''); $('#calendar').fullCalendar('addEventSource', getUrl()); }); function getUrl() { return 'api/Event?' + getFilter(); } $("#toggleButton").click(function () { $("#toggleDiv").slideToggle("slow"); }); }); function getFilter() { return $("#filterForm").serialize(); }
answer count: 1
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26571212
type: Question
has title: Filter cleared when changing month

http://stackoverflow.com/a/26566721
has body: You need to use a quantifier with your character class. The + quantifier means "one or more" times. Also you can avoid escaping certain characters inside of your class and remove the global modifier. '2*****'.replace(/[-+*/]+$/, '') //=&gt; "2" Explanation: [-+*/]+ # any character of: '-', '+', '*', '/' (1 or more times) $ # before an optional \n, and the end of the string
upvote count: 5
answers question: http://stackoverflow.com/q/26566696
has comment: http://stackoverflow.com/comment/41752918
type: Answer
has comment: http://stackoverflow.com/comment/41752864
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26566696

http://stackoverflow.com/comment/41739873
has text: Doesn't really work because it allows the div's to exceed 100% width
score: 0
comment on: http://stackoverflow.com/q/26559542
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41861043
type: AnswerComment
score: 0
type: Comment
has text: First things to learn are [jQuery's selectors](http://api.jquery.com/category/selectors/)
comment on: http://stackoverflow.com/a/26625799

http://stackoverflow.com/a/26626077
answers question: http://stackoverflow.com/q/26626021
score: -3
upvote count: 1
has body: If your Javascript contains HTML tags, a validator considers these part of the document, unless you prefix your code like this: You might have come across another way to resolve this issue: This basically chops the string to "hide" the tags from a validator. It makes code harder to read and I'd never prefer this "hack" to the CDATA solution. Please have a look at this question, which is rather old but has a lot of answers.
downvote count: 4
has comment: http://stackoverflow.com/comment/41865630
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41862025
has comment: http://stackoverflow.com/comment/41863707
has comment: http://stackoverflow.com/comment/41862207
has comment: http://stackoverflow.com/comment/41862654
has comment: http://stackoverflow.com/comment/41867038
accepted answer of: http://stackoverflow.com/q/26626021
type: Answer

http://stackoverflow.com/comment/41945578
type: QuestionComment
has text: well are you sure this ID is still in http://finance.yahoo.com in the first place. I don't see it. Those IDs probably change a lot so you have to find another handle for your scraping
score: 0
comment on: http://stackoverflow.com/q/26668474
type: Comment

http://stackoverflow.com/comment/42012615
type: AnswerComment
comment on: http://stackoverflow.com/a/26682118
score: 0
type: Comment
has text: I just discovered that there is a .css with a margin bottom on the generated div by the plugin, and that is 20px, when I remove it, then the scrollbar is gone. I know its hard to answer such kind of question without the entire code, but your idea guided me in the right direction.

http://stackoverflow.com/comment/41778204
type: Comment
type: QuestionComment
has text: using javascript is just still based on CSS features. So if the CSS features are not supported, using something like `style.feature = ...` will also not work.
comment on: http://stackoverflow.com/q/26580733
score: 0

http://stackoverflow.com/a/26525645
downvote count: 0
answers question: http://stackoverflow.com/q/26525601
type: Answer
has body: .replace() replace only the fisrt occurence with a string, and replace all occurences with a RegExp: jQuery('#amount').val().replace(/€/g, "")
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26525601
type: AcceptedAnswer

http://stackoverflow.com/comment/97110625
has text: I needed it to do `NaN` in addition to `undefined` as well. In case anyone else does in the future: `function customStringify(o) { return JSON.stringify(o, (k, v) => v === undefined ? '__undefined__' : v !== v ? '__NaN__' : v).replace(/"__undefined__"/g, 'undefined').replace(/"__NaN__"/g, 'NaN'); }`
type: Comment
score: 1
comment on: http://stackoverflow.com/a/48957243
type: AnswerComment

http://stackoverflow.com/a/26562981
answers question: http://stackoverflow.com/q/26562895
type: Answer
score: 0
has body: Basically you are setting the content of the derp once and for all before pressing the button function isPrime($n) { $i=2; if ($n==2){ document.getElementById("derp").innerHTML = "True"; } $sqrtN = sqrt($n); while ($i&lt;= $sqrtN){ if ($n % $i ==0){ document.getElementById("derp").innerHTML = "False"; } $i++; } document.getElementById("derp").innerHTML = "True"; } And not sure you really need the $ everywhere - that's a PHP thing

http://stackoverflow.com/q/26552381
has comment: http://stackoverflow.com/comment/41726898
has comment: http://stackoverflow.com/comment/41726872
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26552932
score: 1
has comment: http://stackoverflow.com/comment/41726901
has body: I am a big noob in Javascript, and this is probably the first of a long series of questions! Here what I'm trying to do: I have a folder containing several .txt files called art1.txt, art2.txt, etc. (the total number can vary, this is important). I am building a script that will extract the text information of every txt files and append them one after another on a web page. Here it is: function init(){ for (var i=1; ; i++) { $(function doAjax (){ var getArt = { "method" : "get", "url" : "data/ConstitutionLaw/art" + i +".txt", "success" : successHandler, "error" : endLoop }; $.ajax(getArt); function successHandler(data){ console.log(data); var newArt = document.createElement('p'); newArt.setAttribute('class', "article"); newArt.innerHTML = data; $('#artBody').append(newArt); }; //end of successHandler }); //end of doAjax function endLoop() { /* end the for loop */ }; }; //end of for } //end of init At the moment, I execute the function doAjax an infinite number of times, because I don't know how many txt files I have. I want to break the loop if the code doesn't find the file artN.txt (meaning there is no more files in the folder) by executing the endLoop function I tried to use a if statement after the function doAjax, but problem is it's an asynchronous function and the for loop doesn't wait for doAjax to end before starting another loop. How could I make the for loop to wait until doAjax is finished to start a new loop? Also, if you have any suggestions to make the overall less clumsy, please let me know. :) Thanks for reading!
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26552596
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26552596
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41726870
accepted answer: http://stackoverflow.com/a/26552932
has title: Break a for loop containing an AJAX-type function
has comment: http://stackoverflow.com/comment/41727043
upvote count: 1
has comment: http://stackoverflow.com/comment/41726996

http://stackoverflow.com/q/26632998
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26633217
favorite count: 0
has body: Pretty new to JS and I've been at this for a while. It nearly works, the issue is with the last couple of lines. I want to add the current value of x to a running total. x should only contain quantity * unitCost for the current iteration of the loop. I think it's just a small syntax error but every example I can find seems to use the same formatting as I do. The console error I get in Chrome is "Uncaught TypeError: Cannot read property 'value' of undefined". var starters = ["tom_soup", "summer_salad", "fondue", "flatbread", "ahi_tatar"]; var startersLength = starters.length; function calcOrderVal() { var total; for (var i = 0; i &lt; startersLength; i++) { var x // retrieve individual cost of dish var unitCost = parseFloat(document.getElementById(starters[i]).getAttribute("data-price")); console.log("Cost of the unit is " + unitCost); // retrieve user-entered quantity var quantity = document.getElementById(starters[i]).value; console.log("Quantity required: " + quantity); // Multiply the cost by the quantity x = unitCost * quantity; console.log("Cost of this: " + x); // Add to running total total += parseFloat(x[i].value); console.log("Grand total: " + total); Here's my HTML too if that's relevant: &lt;h1&gt;Pre-order form&lt;/h1&gt; &lt;div class="qty"&gt;Quantity&lt;/div&gt; &lt;form&gt; &lt;fieldset&gt; &lt;legend&gt;Order from any of our starters: &lt;/legend&gt; &lt;div class="item"&gt; &lt;label class="starter" for="tom_soup"&gt;Roasted Tomato Soup served with goat cheese croutons and basil puree.&lt;/label&gt; &lt;input type="text" id="tom_soup" class="txt" name="quantity" size="5" data-price="2.0" onkeydown="r2t()" onchange="calcOrderVal()"&gt; &lt;span class="num-error"&gt;Must be a non-negative integer&lt;/span&gt; &lt;/div&gt; &lt;div class="item"&gt; &lt;label class="starter" for="summer_salad"&gt;Summer Salad - organic butter lettuce with apples, blood oranges, and gorgonzola, tossed with raspberry vinaigrette. &lt;/label&gt; &lt;input type="text" id="s…
accepted answer: http://stackoverflow.com/a/26633041
downvote count: 1
upvote count: 0
has title: Basic Javascript - trying to implement a running total within a For loop
has answer: http://stackoverflow.com/a/26633041
has comment: http://stackoverflow.com/comment/41874203
has answer: http://stackoverflow.com/a/26633217
has comment: http://stackoverflow.com/comment/41873972
has comment: http://stackoverflow.com/comment/41874156
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/41873851
type: Question

http://stackoverflow.com/q/26533188
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has title: passing portion of json string values to jquery function
type: UnansweredQuestion
tagged with: php
has body: I have following json string. I need only 'locked' item and need to pass to a jquery function.I used json encode from php to get the string. {"ignored":[],"status":{"message":"success","code":200},"locked":[8089033,809241‌​5]} My jquery function is as follows $.map(locked, function (id) { $("#grid-table tr#" + id) .find("input[type=checkbox]") .after($("&lt;img src='http://www.placehold.it/20x10/ff0000'&gt;")); }); }); I am not getting an idea how to get only locked= [8089033,809241‌​5]; to my jquery function
has answer: http://stackoverflow.com/a/26533330

http://stackoverflow.com/q/26587619
score: 0
accepted answer: http://stackoverflow.com/a/26587812
has body: I have installed the audio.js plugin. I have entered this code to the header.php which is in the includes folder &lt;script src="audio/audiojs/audio.min.js"&gt;&lt;/script&gt; The other pages shows the player with the default size. But the site that i am creating, only in the homepage i need to change the width of the player. Any idea? Please help!!
type: AnsweredQuestion
tagged with: audio
has comment: http://stackoverflow.com/comment/41790148
type: Question
has comment: http://stackoverflow.com/comment/41790213
answer count: 1
tagged with: javascript
has title: Customizing the width of audio.js
has answer: http://stackoverflow.com/a/26587812
tagged with: css

http://stackoverflow.com/q/26582257
score: 1
tagged with: cocos2d-html5
favorite count: 0
type: Question
has title: Cocos2d-js sprite array touch event
has body: var GameLayer = cc.Layer.extend({ ball:[], number:[], label:[], numberofballs:8, _order:0, ctor:function () { this._super(); this.init(); }, init:function(){ this._order=0; cc.log(this._order); this.setBall(); }, setCoordX:function(){ var coordX=Math.random()*1000%330+50; cc.log(coordX); return coordX; }, setCoordY:function(){ var coordY = Math.random()*700%700+50; cc.log(coordY); return coordY; }, onTouchBegan:function(touch, event){ var target = event.getCurrentTarget(); var PosInScreen = target.convertToNodeSpace(touch.getLocation()); var Size = target.getContentSize(); var rect = cc.rect(0, 0, Size.width, Size.height); if(cc.rectContainsPoint(rect, PosInScreen)){ if(target.getTag()==this._order) { target.removeFromParent(); this._order++; } } return false; }, setBall:function(){ for(var i=0;i&lt;this.numberofballs;i++){ this.number.push(Math.round(Math.random()*100)); } this.number.sort(function(left,right){ return left-right; }); for(var i=0;i&lt;this.numberofballs;i++){ var eventListener = cc.EventListener.create({ event: cc.EventListener.TOUCH_ONE_BY_ONE, swallowTouches: true, onTouchBegan: this.onTouchBegan}); this.ball[i]=cc.Sprite.create(res.ball_png); this.ball[i].x=this.setCoordX(); this.ball[i].y=this.setCoordY(); this.ball[i].setTag(i); this.addChild(this.ball[i]); var label=new cc.LabelTTF(this.number[i],"Ariel",25); label.x=50; label.y=55; this.ball[i].addChild(label); cc.eventManager.addListener(eventListener, this.ball[i]); } } }); var GameScene = cc.Scene.extend({ onEnter:function () { this._super(); var layer = new GameLayer(); this.addChild(layer); } }); This is my whole code. First, in setBall function, I added cc.eventManager.addListener(eventListener, this.ball[i]); I want to make touch event with this.ball array directly. Second,in onTouchBegan function, this._order is null. I don't know why. How can I fix it?
upvote count: 1
answer count: 1
tagged with: cocos2d-js
has answer: http://stackoverflow.com/a/26586233
accepted answer: http://stackoverflow.com/a/26586233
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26577448
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/41773122
answers question: http://stackoverflow.com/q/26577292
has comment: http://stackoverflow.com/comment/98830517
has comment: http://stackoverflow.com/comment/41772887
has comment: http://stackoverflow.com/comment/41772685
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/41772411
type: Answer
has body: You can do this with AJAX by calling the wiki api with custom query string parameters. DEMO http://jsfiddle.net/fm0vxg32/ JS $(document).ready(function(){ $.ajax({ type: "GET", url: "http://en.wikipedia.org/w/api.php?action=parse&amp;format=json&amp;prop=text&amp;section=0&amp;page=Jimi_Hendrix&amp;callback=?", contentType: "application/json; charset=utf-8", async: false, dataType: "json", success: function (data, textStatus, jqXHR) { var markup = data.parse.text["*"]; var blurb = $('&lt;div&gt;&lt;/div&gt;').html(markup); $('#article').html($(blurb).find('p')); }, error: function (errorMessage) { } }); }); CSS #article { // custom styling }
has comment: http://stackoverflow.com/comment/41773493
accepted answer of: http://stackoverflow.com/q/26577292

http://stackoverflow.com/q/26570698
has comment: http://stackoverflow.com/comment/41760884
has comment: http://stackoverflow.com/comment/41759986
score: 0
has comment: http://stackoverflow.com/comment/41760085
type: Question
has title: Convert string to name of object (casting)
type: AnsweredQuestion
tagged with: object
has answer: http://stackoverflow.com/a/26571654
tagged with: javascript
answer count: 2
tagged with: casting
tagged with: string
has comment: http://stackoverflow.com/comment/41811461
possible better answer: http://stackoverflow.com/a/26570907
accepted answer: http://stackoverflow.com/a/26571654
has answer: http://stackoverflow.com/a/26570907
has body: I want to cast a string to an existing object. Background: I am using only JS, no libraries and no server side code. I have existing objects with elements I wish to display. I pass the name of the object using a query string so it arrives as a string. Example ?Room=Cube and what I wind up with is nextRoom = getQueryString(); // which returns a string and I want to display the Cube object. However nextRoom contains "Cube" and JS is not helpful, if I call a display function: display(nextRoom) Javascript treats it as a string and fails. Currently I fake it out with the object: castToObj{"Cube":Cube, "Other":Other, "Etc":Etc, ........} ..... room = castToObj[nextRoom]; // accessing the object returns the room Object then I can display the room by calling: display(room); // now JS treats the parameter as an object But this requires me to rewrite code to modify the castToObj{} contents every time I add a room. I would like a way to turn "Cube" into Cube, in other words turn a string into an object. I have tried many variations but have been unsuccessful. I could list ways I have tried but that seems senseless because they were all failures. HELP! PLEASE! P.S I retired about twenty years ago before learning C++, OOP, etcetera so my javascript skills are just my "C" programming experience expanded.

http://stackoverflow.com/comment/41673430
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26522374
has text: @AbeMiessler if you want to show `alert` (execute script) on mouseover - then yes. But this is definitely not secure :)

http://stackoverflow.com/a/26548567
answers question: http://stackoverflow.com/q/26548478
type: Answer
upvote count: 1
has body: It is an error in the book and is corrected in the errata: The book claims that the following code will result in a global object: var bFunc = function () { return this }; var b = {name: "b", fun: bFunc}; b.fun(); //=&gt; some global object, probably Window This is incorrect. In fact, b.fun() returns the object stored in the variable b. The semantics of this is such that this is set when the function is invoked, not when the function is defined. If the function is called using either b.fun() or b'fun', this is set to b. Note from the Author or Editor: This is definitely misleading. A more appropriate snippet would be: var bObj = {name: "b", fun: function(){ return this }}; bObj.fun(); //=&gt; {name: "b", fun: function (){ return this }} var bFunc = bObj.fun; bFunc(); //=&gt; some global object, probably Window The explanation text would then read as follows: Well, this might be surprising. You see, when a function is called within the context of an object, its this reference points to the object itself. However, when I later bound bFunc to the field bObj.fun, its reference was changed to the global object when called. In most programming languages offering...
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26548478

http://stackoverflow.com/comment/41717573
has text: Thanks a lot for helping Sir! I just realized that using powershell is not a smart and reliable choice for this work. I will have to figure out something else.
type: AnswerComment
comment on: http://stackoverflow.com/a/26538801
score: 0
type: Comment

http://stackoverflow.com/q/26562967
answer count: 2
tagged with: cordova
accepted answer: http://stackoverflow.com/a/26599471
has body: We are currently building Cordova/Ionic hybrid mobile app and we would like to integrate Audience Network. App is written in HTML/CSS/JavaScript and for the Audience Network there is only Native SDK available. Is there a Cordova plugin on someone's roadmap? Or is there a way how to integrate Native SDK without plugin? I'm even considering to create a Cordova plugin myself, but I have barely minimal experiences with Java and Objective-C/Swift.
tagged with: android
tagged with: facebook
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27791481
has title: FB Audience Network in Cordova apps?
has answer: http://stackoverflow.com/a/27791481
type: Question
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/26599471
score: 0

http://stackoverflow.com/a/26585111
answers question: http://stackoverflow.com/q/26584781
type: AcceptedAnswer
downvote count: 0
has body: I suggest that you hide the select and show another control that represents the date picker..
accepted answer of: http://stackoverflow.com/q/26584781
has comment: http://stackoverflow.com/comment/41785834
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/26566516
has body: I have no experience with this control but I think you need to use {{}} and there's a little logical problem, too. So instead of &lt;input type="text" class="form-control" size="8" ng-model="time1" max-time="time2" ...&gt; &lt;input type="text" class="form-control" size="8" ng-model="time2" max-time="time1" ...&gt; Use the following &lt;input type="text" class="form-control" size="8" ng-model="time1" ...&gt; &lt;input type="text" class="form-control" size="8" ng-model="time2" min-time="{{ time1 }}" ...&gt; The logical problem was that you had max-time set on both controls, referring to each other's value. So time1 couldn't be greater than time2 nor time2 greater than time1. It should be sufficient to let time1 be any time and just evaluate that time2 is no less than time1. Also, it's annoying that changing time1 value is not causing re-evaluation of time2's min-time instantly but only after you change the time2 itself. I don't know if it's supposed to work this way, it can be related to Error:[$rootScope:inprog] your Plunker is throwing frequently.
accepted answer of: http://stackoverflow.com/q/26556949
answers question: http://stackoverflow.com/q/26556949
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/26586783
downvote count: 0
score: 1
has title: How to get the main object of a firebase database?
favorite count: 0
has comment: http://stackoverflow.com/comment/41834934
has answer: http://stackoverflow.com/a/26598156
type: Question
upvote count: 1
tagged with: firebase
has body: Here's a quite simple question but I have not been able to find an answer anywhere about this, so hopefully I can get the answer here. I want to iterate through the keys in my database using: for (var key in X) { //X is the main object I need } However, in order to do this I need the actual object of the database, not the reference to the database. Because when I iterate over the reference I get a lot of nonsense properties. So how do I get the object containing all the keys that I add personally? Hopefully my question makes sense.
answer count: 1
accepted answer: http://stackoverflow.com/a/26598156
tagged with: javascript
has comment: http://stackoverflow.com/comment/41793544
has comment: http://stackoverflow.com/comment/41842177
type: AnsweredQuestion

http://stackoverflow.com/comment/41935849
comment on: http://stackoverflow.com/a/26657776
score: 0
type: Comment
has text: Thank you. It's much cleaner this way. So does it mean it's not possible to escape the quote?
type: AnswerComment

http://stackoverflow.com/a/26518834
type: Answer
has body: Thank's all for advices, I found a solution: $("a.button-buy-modal").click(function () { var prTitle = $(this).parent().parent().children('.products__title').html(); var prPrice = $(this).parent().parent().children('.products__priceholder').children('.products__price').children('strong').html(); var prId = $(this).parent().parent().children('.products__priceholder').children('.products__id').html(); var prImage = $(this).parent().parent().parent().children('.products__imageholder').children('.products__thumbnail').attr('src'); console.log(prTitle); console.log(prPrice); console.log(prId); console.log(prImage); })
score: 0
answers question: http://stackoverflow.com/q/26518465

http://stackoverflow.com/q/26543961
tagged with: javascript
has answer: http://stackoverflow.com/a/26544648
accepted answer: http://stackoverflow.com/a/26544648
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41712164
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41711890
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41712133
has title: Angular ng-options behaves odd
has comment: http://stackoverflow.com/comment/41712018
has comment: http://stackoverflow.com/comment/41712427
has body: I have this typahead with angular strap: Group Location getPlaces returns array of objects which looks like this: { reference: "ccj32213SIJD", name: "some name", } When I am typing I am getting correct results, but when I select the wonted option the value that I see in my input is the reference (instead of the name). Can any one point out my mistake? Here is the controller code: $scope.getPlaces = function(viewValue) { var input = viewValue || $scope.currentPlace; return googleService.placesAutocomplete(input).then( function(places) { return places; } ); };
type: AnsweredQuestion
tagged with: angular-strap

http://stackoverflow.com/comment/41841702
type: QuestionComment
has text: It's not a good idea to pass around scope. Why not have all the chart options on `$scope` and watch for changes in the chartOptions object and react accordingly?
score: 1
comment on: http://stackoverflow.com/q/26615000
type: Comment

http://stackoverflow.com/comment/41750923
score: 0
type: Comment
type: QuestionComment
has text: For one thing, use http://threejs.org/examples/js/controls/OrbitControls.js, and when learning or debugging, use the un-minified version http://threejs.org/build/three.js.
comment on: http://stackoverflow.com/q/26557252

http://stackoverflow.com/q/26610665
has body: I am stuck trying to implement a recurrence parten for FullCalendar events. I have managed to do the Daily repeat events. But it is the weekly events I am struggling with. I want it to mimic the one in MS Outlook. I have to generate IDs for the recurring Events as mentioned in a post on SO. Below is the sample code that I am working on: //freqValue is the number of occurrences if (freqValue != null) { eventData.id = randomString();//Assigns a "uniqueID" as generated by randomString function $("#calendar").fullCalendar('renderEvent', eventData, true);//render for a non-repeat event switch (freqValue) { //====================================================================================== //Daily events code works! case 'Daily': if (freqValueDaily != null) { switch (freqValueDaily) { case 'everyNumDays': //loop through the Event frequency for (var i = 0; i &lt; eventFrequency; i++) { //Manufacture events var dayInterval = $('#dayInterval').val(); eventData.start = moment(eventData.start).add(dayInterval, 'days').format(); eventData.end = moment(eventData.end).add(dayInterval, 'days').format(); $("#calendar").fullCalendar('renderEvent', eventData, true); } break; case 'everyWeekDay': for (var l = 0; l &lt; eventFrequency; l++) { for (var m = 0; m &lt; 7; m++) { eventData.start = moment(eventData.start).add(1, 'days').format(); eventData.end = moment(eventData.end).add(1, 'days').format(); $("#calendar").fullCalendar('renderEvent', eventData, true); } } break; default: } } break; //===================================================================================== //Code for WEEKLY events that does not work!!!!!Help needed here. case 'Weekly': if (weekDays.length &gt; 0) {//weekdays is an array that contains the user selected week days i.e Sunday, Tuesday, Monday e.t.c var weekInterval = $("#weekInterval").val();//takes value for repeat interval e.g Repeat every 2 weeks on Sunday and Friday etc. 2 being the weekInterval for (var n = 0; n &lt; eventFrequency; n++) {/…
type: Question
has title: FullCalendar Recurring Events (Client side)
score: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: momentjs
answer count: 0
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43088390
tagged with: fullcalendar

http://stackoverflow.com/comment/41903327
has text: I now have it working using colour separation. So long as I have a consistent background colour.
type: Comment
comment on: http://stackoverflow.com/a/26634831
score: 0
type: AnswerComment

http://stackoverflow.com/a/26642440
upvote count: 2
has body: The key to joint movements is putting all arm parts in a group and then setting proper offset points. The importance of an offset point is that they set where any arm part will rotate (==rotation point) Here's an outline of how to add kinetic motion to an upper and lower arm: Put the upper and lower arm in a group Set the group, upper &amp; lower offsets (==rotation points) to { x:0, y:armDiameter/2 } To rotate the upper arm, change the groups rotation To rotate the lower arm, change the lower arm rotation Group Rotation == 0 degrees, Lower rotation == 0 degrees Group Rotation == 50 degrees, Lower rotation == 0 degrees Group Rotation == 50 degrees, Lower rotation == 65 degrees Here's example code and a Demo: var stage = new Kinetic.Stage({ container: 'container', width: 350, height: 350 }); var layer = new Kinetic.Layer(); stage.add(layer); var lastWidth = 0; var baseGroup = new Kinetic.Group({ x: 50, y: 200, draggable: true }); layer.add(baseGroup); var lastParent = baseGroup; var appendages = []; appendages.push({ name: 'shoulder', width: 50, diameter: 20, fill: 'brown' }); appendages.push({ name: 'elbow', width: 80, diameter: 20, fill: 'peru' }); appendages.push({ name: 'hand', width: 30, diameter: 20, fill: 'tan' }); appendages.push({ name: 'finger', width: 15, diameter: 20, fill: 'wheat' }); for (var i = 0; i &lt; appendages.length; i++) { lastParent = addAppendage(i); appendages[i].group = lastParent; var appendage = appendages[i]; var html = "Rotate " + appendage.name + ":"; html += "&lt;input id=" + appendage.name; html += " data-apindex='" + i + "'"; html += " class='apRange' type=range min=0 max=90 value=0&gt;&lt;br&gt;"; $('body').append(html); } $('.apRange').change(function() { var appendageIndex = parseInt($(this).data('apindex')); appendages[appendageIndex].group.rotation(-parseInt($(this).val())); layer.draw(); }); function addAppendage(i) { var appendage = appendages[i]; var d2 = appendage.diameter / 2; // new group for this appendage var newGroup =…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41936452
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26639764
has comment: http://stackoverflow.com/comment/41991130
answers question: http://stackoverflow.com/q/26639764
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41925367

http://stackoverflow.com/comment/41732105
score: 0
has text: So, it's giving you a syntax error on the line that says `featherEditor.launch({` ?
comment on: http://stackoverflow.com/q/26554718
type: QuestionComment
type: Comment

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/26603548
tags question: http://stackoverflow.com/q/26591619
type: Tag
tags question: http://stackoverflow.com/q/26660937

http://stackoverflow.com/comment/41782138
score: 0
type: Comment
type: QuestionComment
has text: @lapin As my reputation is low I cannot upload screenshots. Can you provide your mail id so that I can send them to you.
comment on: http://stackoverflow.com/q/26582019

http://stackoverflow.com/comment/109543059
type: Comment
comment on: http://stackoverflow.com/a/43188967
score: 0
type: AnswerComment
has text: We should use `angular.element(document)` instead of `angular.element('html')` : )

http://stackoverflow.com/comment/41822538
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26604845
has text: ehrm ... what's up doc? you're calling several ids that you're not posting here and you're not explaining what is the problem ...

http://stackoverflow.com/q/26607368
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
has title: Can Size of the Angular-Strap's "Aside" window reduced or increased?
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: angular-strap
has answer: http://stackoverflow.com/a/26969289
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26969289
has body: I am using Angular-Strap's Aside. Works well! But wanted to know whether the size of the "Aside window can be decreased. If so, how to do that.

http://stackoverflow.com/q/26571353
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26571551
has title: Angularjs: How to bind different result set with different controls using common method?
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41762805
has body: I am new to Angularjs and facing one problem. The requirement is little bit unique in itself, Here is the description: I have two inputs, two dropdown and two Get buttons and once i enter one url in first input field and click on Get button, it will bind all the "key" not values to dropdown using "getApiResults" method in the controller but when i add other url in the second input field and click on Get button it will fetch all the keys from second api and bind the dropdown BUT the problem is it also bind the first dropdown again with second api results because of the fact that we are updating the "fieldnames". I don't know how to handle this problem. Please help.. Here is the complete code: Get Get
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/41840314
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26599620
has text: @jt0dd, I made a little more elaborated answer, taking into account your comment.

http://stackoverflow.com/a/26610789
type: Answer
answers question: http://stackoverflow.com/q/26610537
has comment: http://stackoverflow.com/comment/41881611
score: 0
has body: You can use what's known as a callback function. Modify insertBlankWIdget so that it accepts a function as a parameter, and calls the function when the promise is complete. insertBlankWidget:function( callback ){ var promise=this.getWidgetModel(); promise.done(function(){ //code which must be executed before Lines after insertBlankWidget callback(); }); } then for handleWidgetDrop handleWidgetDrop:function (){ //some lines this.insertBlankWidget( function() { //Lines after insertBlankWidget call } ); }
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/41857317
has comment: http://stackoverflow.com/comment/41863100

http://stackoverflow.com/a/26561875
has comment: http://stackoverflow.com/comment/41752282
accepted answer of: http://stackoverflow.com/q/26561833
type: Answer
answers question: http://stackoverflow.com/q/26561833
has body: You cannot save the button itself since local storage only stores strings. Instead, save the information that you need in the form of a string (in this case, the color): function save() { var storeButton = document.getElementById("testButton1"); localStorage.setItem("buttonColor", storeButton.style.backgroundColor); } function load() { var color = localStorage.getItem("buttonColor"); if (color) { document.getElementById("testButton1").style.backgroundColor = color; } }
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41744202
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27411716
type: Answer
has body: Did you mean check by index or value? Here's an example. You could always use checkIndex like so: $("#polistbox").jqxListBox('checkIndex',2); In the link that you gave me - It showed you everything you need, unless you haven't told us something else.
answers question: http://stackoverflow.com/q/26605831
score: 0

http://stackoverflow.com/comment/41733452
type: QuestionComment
score: 0
has text: I think I see what you're saying: you include that script on your page, and when it runs, it prints the image, but it leaves out the dimensions. Is that correct? If so I'm not sure if you'll ever be able to make their system print it with dimensions. And anything you do to get the dimensions will have to be after it's been printed on your page. So in terms of speeding things up, it'll be useless. The browser will already have determined the dimensions the moment the image was printed.
comment on: http://stackoverflow.com/q/26554854
type: Comment

http://stackoverflow.com/comment/41905758
has text: Yes it sure is, but that's a whole different question. I use [jQuery UI](http://jqueryui.com/autocomplete/) for this. You can call it like `$('input[name="txtbox"]').autocomplete({ source: availableTags });` The source is a JavaScript array like `var availableTags = [ "ActionScript", "PHP", "Ruby", ];`
score: 0
comment on: http://stackoverflow.com/q/26647876
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41908545
comment on: http://stackoverflow.com/q/26645638
has text: Regex validation isn't my problem, my problem is event handling.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41922480
has text: StackOverflow question. I'll write the CSS alternative for you in the morning. But basically, you toggle a class with your jQuery. One class will have `right: 0%;` and the other will have `right: 100%`. This will snap on click now (obviously), but then you define the transition like so: `transition: all 3s ease;`. The `all` means any difference in CSS properties will be animated where possible, you could've just had `right` but I assume you might want to play around with it so left `all` in. NOTE: Check for `-webkit` equivalents of transition attributes etc.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26659199

http://stackoverflow.com/q/26559446
type: Question
tagged with: csrf
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: ajax
has body: var xhr = new XMLHttpRequest(); var temp = "csrf_test_name="+document.getElementsByName("csrf_test_name")[0].value; xhr.open("POST", "upload", true); xhr.onreadystatechange=function(){ if (xhr.readyState==4 &amp;&amp; xhr.status==200){ console.log(xhr.responseText); } } xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(temp); The above code works and does not result in a 500 error (for csrf failure). I want to upload files so I need to change the Request Header to the following: xhr.setRequestHeader("Content-Type", "multipart/form-data"); When I do this it fails the csrf check. I have seen other suggestions that involve turning off the csrf for uploads but would prefer not to do this. Is there away to leave it enabled and upload these files?
type: UnansweredQuestion
answer count: 0
score: 1
tagged with: codeigniter
upvote count: 1
has title: Codeigniter with CSRF protection and multipart/formdata request header

http://stackoverflow.com/q/26612074
has title: How to load a unique when.js file in html
tagged with: promise
has comment: http://stackoverflow.com/comment/41846749
answer count: 0
has comment: http://stackoverflow.com/comment/41835976
type: UnansweredQuestion
score: 0
type: Question
tagged with: javascript
has body: For now, this setup is working, but I wish to improve it. I use when.js with this apps.html: When experiments ... where the file require-minium.js contains: require.config( { paths: { "jquery": "jquery-1.10.2", "underscore": "lodash.dev", "when": "when", "backbone": "backbone" }, shim: { "underscore": { exports: "_" }, "jquery": { "deps": [ "when", "jquery" ], exports: "$" }, "backbone": { "deps": [ "underscore", "jquery" ], "exports": "Backbone" }, "when": { "exports": "when" } } } ); To load when.js successfully, I had to create the lib directory in my apps/js/ to let when.js load its "modules" when needed. Is there a way to have only a single when.js library file or is it my setup that is not correctly installed ?
tagged with: boilerplate

http://stackoverflow.com/a/26679161
answers question: http://stackoverflow.com/q/26615312
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42038952
upvote count: 16
has body: Very very intresting problem! Thanks for this question! So...some observations first: Not allowing diagonal movement fixes this problem but since you are interested in diagonal movement I had to search more. I had a look at path simplifying algorithms like: Ramer Douglas Peuker (http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm) and an implementation: https://gist.github.com/rhyolight/2846020. I added an implementation to your code without success. This algorithm doesn't take into account obstacles so it was difficult to adapt it. I wonder what would the behavior be (for diagonal movements) if you had used Dijkstra instead of A* or if you used an 'all shortest paths between a pair of nodes' algorithm and then you sorted them by increasing changes in direction. After reading a bit about A* here http://buildnewgames.com/astar/ I thought that the implementation of A-star you are using is the problem or the heuristics. I tried all the heuristics on the a-star of your code including euclidean that I coded myself and tried also all the heuristics in the http://buildnewgames.com/astar code Unfortunately all of the diagonal allowing heuristics were having the same issue you are describing. I started working with their code because it is a one-to-one grid and yours was giving me issues drawing. Your simplifyPath that I tried to remove was also causing additional problems. You have to keep in mind that since you are doing a remapping this could be an issue based on that On a square grid that allows 4 directions of movement, use Manhattan distance (L1). On a square grid that allows 8 directions of movement, use Diagonal distance (L∞). On a square grid that allows any direction of movement, you might or might not want Euclidean distance (L2). If A* is finding paths on the grid but you are allowing movement not on the grid, you may want to consider other representations of the map. (from http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html…
score: 16
accepted answer of: http://stackoverflow.com/q/26615312
has comment: http://stackoverflow.com/comment/42001005

selenium
tags question: http://stackoverflow.com/q/26626138
tags question: http://stackoverflow.com/q/26566623
tags question: http://stackoverflow.com/q/26659441
tag name: selenium
tags question: http://stackoverflow.com/q/26522739
tags question: http://stackoverflow.com/q/26626096
type: Tag
tags question: http://stackoverflow.com/q/26654803

http://stackoverflow.com/comment/41943244
score: 0
type: Comment
type: QuestionComment
has text: @ashokramcse: same result
comment on: http://stackoverflow.com/q/26671281

passwords
tags question: http://stackoverflow.com/q/26609129
tag name: passwords
type: Tag

http://stackoverflow.com/q/26577841
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
has body: I'm trying to do a simple thing, this is my html: First and this is my js script var div1 = document.getElementById("div1"); var first = document.getElementById("first"); first.addEventListener("click", function(e){ alert("Hello"); div1.innerHTML = div1.innerHTML + 'Second'; }, false); when i click on the #first link a second anchor is inserted into #div1, after that, if i try to click again on the #first link nothing appens... why this? i have created a jsfiddle: http://jsfiddle.net/jkL7bomw/
has comment: http://stackoverflow.com/comment/41773130
has answer: http://stackoverflow.com/a/26577889
accepted answer: http://stackoverflow.com/a/26577889
answer count: 1
tagged with: events
has title: Event stop firing after parent modified
has comment: http://stackoverflow.com/comment/41773084

http://stackoverflow.com/comment/71105269
type: Comment
type: QuestionComment
has text: @NateW i had tried putting link to different js fiddle but for that i am not able to autopopulate the result. I am just able to populate the search text
comment on: http://stackoverflow.com/q/26524620
score: 0

http://stackoverflow.com/q/26610844
score: 0
has answer: http://stackoverflow.com/a/26610986
has body: I'm trying to pass a link from my controller to my view using viewbag, the link is to be used as the source for an iframe. However &amp; appears so the lnk does not work. Controller link = "http://example.com/Index?aa=aa&amp;q=bb"; ViewBag.Answer3 = link; View &lt;iframe height="30" id="Audio" src=""&gt; &lt;script&gt; function Reveal () { var listen = document.getElementById("Audio"); listen.src = "@ViewBag.Answer3"; ... However it doesn't work and when I look at the debugger I see this listen.src = "http://example.com/Index?aa=aa&amp;amp;q=bb"; Thanks in advance for your help Tom
answer count: 1
has title: Passing a link via viewbag MVC RAZOR &amp appearing
tagged with: razor
accepted answer: http://stackoverflow.com/a/26610986
tagged with: asp.net-mvc-4
type: AnsweredQuestion
type: Question
tagged with: asp.net-mvc
tagged with: javascript

http://stackoverflow.com/comment/41927749
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26662025
has text: May I only get {"myValue":{"Name":GPS,"value":29.889}} that string?

http://stackoverflow.com/q/26548300
tagged with: asp.net
score: 0
has answer: http://stackoverflow.com/a/26548430
type: Question
accepted answer: http://stackoverflow.com/a/26548430
tagged with: c#
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I'm using ASP.NET to return a Json file with the following query: public ActionResult getTransactionTotals(int itemID) { DBEntities db = new DBEntities(); var query = from trans in db.Transactions // Linq query removed for brevity into selection select new TransactionAmount { name = selection.Key, amount = selection.Select(t =&gt; t.TransactionId).Distinct().Count() }; return Json(query.ToList(),JsonRequestBehavior.AllowGet); } Here's the object that gets created: using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace OhYeah { public class TransactionAmount { public String name { get; set; } public int amount { get; set; } } } Which returns a JSON in this form: [{"name":"billy", "amount":5}, {"name":"timmy", "amount":18}] Now, I want to edit either the Linq query or the Json serializer to output a Json like this: [{"billy":5, "timmy":18}] Notice the second Json is a single item, where the "name" key is now the value of "name" in the first Json. The "name" and "amount" keys are discarded. The "name" value is always unique, there can be no two billy's or timmy's, so that does not have to be taken into account. How do I do this?
answer count: 1
tagged with: javascript
has title: ASP.NET - how do you change the way a JSON gets serialized?

http://stackoverflow.com/q/26566940
has comment: http://stackoverflow.com/comment/41752945
has comment: http://stackoverflow.com/comment/41753621
has comment: http://stackoverflow.com/comment/41753253
favorite count: 0
has body: I am having a dynamic table with info popups. here mycode &lt;a id="1" onclick="check(this.id)"&gt; &lt;script type="text/javascript"&gt; function check(value) { var result = &lt;?php echo function(value)?&gt; } &lt;/script&gt; So I need pass an value Which I received from js function to php function. Please help how to solve it.I dont want to use Ajax or go to other page.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26567213
score: -3
tagged with: php
has comment: http://stackoverflow.com/comment/41752949
downvote count: 3
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41753122
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41753178
has comment: http://stackoverflow.com/comment/41753098
has answer: http://stackoverflow.com/a/26567135
has comment: http://stackoverflow.com/comment/41753085
has title: How to pass a value from JS to php functions with out ajax
has comment: http://stackoverflow.com/comment/41752885

http://stackoverflow.com/a/26636043
type: Answer
has body: You can change the css for that specific element from Javascript. Otherwise, I would just use a n extra class...
score: 0
answers question: http://stackoverflow.com/q/26635984

http://stackoverflow.com/comment/41816227
type: QuestionComment
has text: Yes. It looks like for text input, the callback function needs to return false? Frankly, I am not too familiar with handling input with javascript, so I don't understand the dynamics 100% other than the mark-up portion.
type: Comment
comment on: http://stackoverflow.com/q/26601022
score: 0

http://stackoverflow.com/q/26613940
answer count: 1
tagged with: internet-explorer
has title: Retrieving input value of innerHTML in JavaScript doesn't work properly in IE 9 and above
has answer: http://stackoverflow.com/a/26613992
tagged with: javascript
type: AnsweredQuestion
tagged with: jsp
type: Question
accepted answer: http://stackoverflow.com/a/26613992
has comment: http://stackoverflow.com/comment/41839699
has body: I've ran into an issue with my JSP web application between IE version 9 and above vs. IE version 7, 8, and Quirks mode. In IE version below 9, when I update the value of an input text field in a table and look at the innerHTML of the table in JavaScript, I can see that the value for the input text field within the innerHTML has been updated to the new value that I entered on the page. However, when I look at the innerHTML value for the input text field for IE 9 and above, the value will remain what the value was when the page loads. Somehow the innerHTML value doesn't get updated in IE 9 and above but does so below IE 9, and I was wondering if there's a specific reason for the differences between browser version.
score: 0
tagged with: innerhtml

http://stackoverflow.com/comment/41689390
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26531435
has text: yes, no javascript = data sent javascript= data arrives empty.
type: Comment

http://stackoverflow.com/comment/41739828
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26559574
has text: [Here, have a cookie](http://jsfiddle.net/k49y4ebg/)
score: 0

http://stackoverflow.com/q/26642081
has title: Trying to submit form action via ajax, getting undefined
type: Question
accepted answer: http://stackoverflow.com/a/26642214
has comment: http://stackoverflow.com/comment/41890985
tagged with: javascript
has comment: http://stackoverflow.com/comment/41890906
has comment: http://stackoverflow.com/comment/41891154
has body: I have the following code which is returning a undefined value for the .prop('action') I am not quite sure why Any thoughts? $(function() { $('#generalContactForm').submit(function(event) { var formEl = this; var submitButton = $('input[type=submit]', formEl); var formData = { 'firstName' : $('input[name=firstName]').val(), 'lastName' : $('input[name=lastName]').val(), 'phoneNumber' : $('input[name=phoneNumber]').val(), 'email' : $('input[name=email]').val(), 'numberofGuests': $('input[name=numberofGuests]').val(), 'eventType': $('input[name=eventType]').val(), 'alcohol': $('input[name=alcohol]').val(), 'contactTime': $('input[name=contactTime]').val(), 'eventDate': $('input[name=eventDate]').val(), 'contactTextarea': $('input[name=contactTextarea]').val(), }; $.ajax({ type : 'POST', url : formEl.prop('action'), data : formData, beforeSend: function() { submitButton.prop('disabled', 'disabled'); } }).done(function(data) { submitButton.prop('disabled', false); }); event.preventDefault(); }); });
has answer: http://stackoverflow.com/a/26642214
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/41891016
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41890977
score: 1
upvote count: 1

http://stackoverflow.com/comment/41694265
comment on: http://stackoverflow.com/a/26533863
has text: This worked kind of, since it uses absolute positioning it makes it quite difficult to adjust any other content below it to adopt to screen size.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41823799
type: QuestionComment
comment on: http://stackoverflow.com/q/26605369
score: 0
has text: @Regent post your comment as an answer, your advice resolved the problem, thanks
type: Comment

http://stackoverflow.com/comment/41933778
comment on: http://stackoverflow.com/a/26665963
score: 0
type: Comment
has text: not removing the parent, that is just the native js way of removing an element, select its parent then remove the child
type: AnswerComment

http://stackoverflow.com/a/26531525
has comment: http://stackoverflow.com/comment/41693740
type: Answer
answers question: http://stackoverflow.com/q/26530983
downvote count: 0
score: 1
has body: This works. See the fiddle here: http://jsfiddle.net/jvs9hLwf/1/ (function DrawLine(elementId, x1, y1, x2, y2) { if (y1 &lt; y2) { var pom = y1; y1 = y2; y2 = pom; pom = x1; x1 = x2; x2 = pom; } var a = Math.abs(x1 - x2); var b = Math.abs(y1 - y2); var c; var sx = (x1 + x2) / 2; var sy = (y1 + y2) / 2; var width = Math.sqrt(a * a + b * b); var x = sx - width / 2; var y = sy; a = width / 2; c = Math.abs(sx - x); b = Math.sqrt(Math.abs(x1 - x) * Math.abs(x1 - x) + Math.abs(y1 - y) * Math.abs(y1 - y)); var cosb = (b * b - a * a - c * c) / (2 * a * c); var rad = Math.acos(cosb); var deg = (rad * 180) / Math.PI div = document.getElementById(elementId); div.setAttribute('style', 'border:1px solid black;width:' + width + 'px;height:0px;-moz-transform:rotate(' + deg + 'deg);-webkit-transform:rotate(' + deg + 'deg);position:absolute;top:' + y + 'px;left:' + x + 'px;'); })("div", 1, 1, 100, 100); First - instead of putting it in a window.onload event, I immediately invoke the function with the desired parameters, but kept the function name so that it can be reused. Second - I've added in a parameter so you can specify the element ID that you are trying to draw the line in when you call the function.
upvote count: 1

http://stackoverflow.com/comment/41898740
score: 0
has text: okay, read your codes. You used some JS libraries; please mention it in question. Also, please paste the console output here. And, can I assume the code is wrapped within `document.ready` function? If I were you, I will use `VideoJS` library, which can achieve your goal in few lines.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26646451

http://stackoverflow.com/a/47372674
has body: There are already good answers here. I have used while loop to solve the problem. The function is very fast and it can return value in less than a second for even a very large number. function padMaxValue(value) { var i = 10; var counter = 0; var roundMax = 10; var copyValue = value; //If the value is negative, convert copyValue to positive if(value &lt; 0) copyValue *= -1; while(roundMax &lt;= copyValue) { roundMax += i; counter++; if(counter == 9) { i *= 10; counter = 0; } } if(value &lt; 0) roundMax *= -1; return roundMax; } document.write(padMaxValue(8) + "&lt;br&gt;"); document.write(padMaxValue(77) + "&lt;br&gt;"); document.write(padMaxValue(889.65) + "&lt;br&gt;"); document.write(padMaxValue(-880.65) + "&lt;br&gt;"); document.write(padMaxValue(-765889.65) + "&lt;br&gt;"); document.write(padMaxValue(7888.88) + "&lt;br&gt;"); document.write(padMaxValue(88999887788899.099887) + "&lt;br&gt;"); Output: 10 80 900 -900 -800000 8000 90000000000000
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26661999

http://stackoverflow.com/a/26550692
has body: I don't know why they all aren't binding but aren't you look for the on change function? So you can just bind to that once? //Untested var Category = document.getElementsById('category'); Category.addEventListener("change", getQuestion, false); Also, If you're not against Jquery, you might want to look into it it often gets rid of cross-browser issues. In Jquery: $('body').on('change', '#category', function() { getQuestion($(this)); })
downvote count: 0
has comment: http://stackoverflow.com/comment/41723723
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26550550

http://stackoverflow.com/a/37013607
downvote count: 0
has body: You can use the ChartNew.Js libary available at https://github.com/FVANCOP/ChartNew.js/ . This libary adds the functionality to add an array of object for the color options. It does add some options for changing the labels as well, but I do not think it is possible to use an image for the actual chart's labels. You may be able to modify the tooltip that pops up for that label doing something like: How to add image to chart.js tooltip?, but I cant say for sure. Here is some code that I used in a recent app to color code each bar based on the percent value of the data: //Set all canvas options and fill with data self.chartJs = function () { //create an array for each column to be set into the chart properties -- also create arrays for the colors of the columns var arrayOfJobData = self.chartData(); var descArray = []; var effArray = []; var colorArray = []; for (i = 0; i &lt; arrayOfJobData.length; i++) { //console.log(arrayOfJobData[i].Cost_Code_Description); descArray.push(arrayOfJobData[i].Cost_Code_Description); //console.log(arrayOfJobData[i].Efficency); effArray.push(arrayOfJobData[i].Efficency); //Create an array of colors to match with the corresponding efficency % to show a + - relationship in the color scheme if (arrayOfJobData[i].Efficency &lt; 100) { colorArray.push("red"); } else if (arrayOfJobData[i].Efficency &gt;= 100) { colorArray.push("green"); } } //chart data is set and colors selected var barChartData = { labels: descArray, //array labels holding the desc for each cost code datasets: [ { type: "Bar", //label: "Efficency %", fillColor: colorArray, strokeColor: "black", pointColor: "rgba(220,220,220,1)", pointstrokeColor: "white", drawMathLine: "mean", //using the math functions add-in draw a line with the average % mathLineStrokeColor: "orange", data: effArray //array of efficency percent values }] } You can basically build your own array of colors using a method somewhat like was mentioned by the other guy to set only the last color if you want to…
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26654511
upvote count: 1

http://stackoverflow.com/comment/41884582
comment on: http://stackoverflow.com/q/26638304
type: Comment
type: QuestionComment
has text: Right, and I assume if I wanted server side rendering then I wouldn't be able to use EE or Craft? I'd have to use a node based CMS? @FakeRainBrigand
score: 0

http://stackoverflow.com/q/26556569
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26557473
downvote count: 0
score: 1
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/26557473
tagged with: javascript
favorite count: 0
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/41735704
has body: I am building a JavaScript and HTML widget that will reside on external webpages (via a copy/pasted snippet) and feed back into a rails application. I notice that JavaScript function Date.parse("09/31/2014") returns a number as if it's a real date (this year September only had 30 days), but when such a date hits the back end, rails rejects it (which can be demonstrated by running "09/31/2014".to_date in IRB). I am looking for a solution that does not rely on external libraries, because as an embedded widget, I don't want to be loading tons of external resources into the host page.
has title: Validate existence of a date in JavaScript (assuming proper formatting)

http://stackoverflow.com/q/26653846
type: AnsweredQuestion
score: 1
has title: angular.copy is failing to copy an object
upvote count: 1
type: Question
has body: I am using angular to make a deep copy of a canvas object, and I am getting Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('checkbox') does not support selection. canvas = document.getElementById('workercanvas') canvas.width = cfg.labelsImage.width canvas.height = cfg.labelsImage.height ctx = canvas.getContext('2d') clonedCanvas = null if clonedCanvas is null clonedCanvas = angular.copy(canvas) Any thoughts? Can angular.copy copy DOM elements? UPDATE: use angular.element.clone I tried using angular.element.clone, the problem with that is that it seems that it doesnt make a deep copy, I have the following: imgObj = new Image(imgWidth, imgHeight) imgObj.onload = -&gt; ctx.drawImage(imgObj, 0, 0, imgWidth, imgHeight) if clonedCanvas is null clonedCanvas = angular.element.clone(canvas) clonedImg = angular.element.clone(imgObj) clonedCanvasContext = clonedCanvas.getContext('2d') clonedCanvasContext.drawImage(clonedImg, 0, 0, imgWidth, imgHeight) When I am changing the imgObj this also affects the clonedImg and changes the clonedCanvas, I want somehow to keep the original information. Is angular.element.clone make a deep copy?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41910777
tagged with: canvas
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26654095
duplicate of: http://stackoverflow.com/q/3318565
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41910914
has comment: http://stackoverflow.com/comment/41910825
linked to: http://stackoverflow.com/q/3318565
accepted answer: http://stackoverflow.com/a/26654095
has comment: http://stackoverflow.com/comment/41910842

http://stackoverflow.com/comment/42538435
type: Comment
comment on: http://stackoverflow.com/a/27004590
has text: I said that i've tried that. I just get a bunch of question marks.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26589667
has comment: http://stackoverflow.com/comment/41827449
has comment: http://stackoverflow.com/comment/41822391
has comment: http://stackoverflow.com/comment/41803087
has comment: http://stackoverflow.com/comment/41827601
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41825267
type: Answer
has comment: http://stackoverflow.com/comment/41798925
has comment: http://stackoverflow.com/comment/41821718
has comment: http://stackoverflow.com/comment/41829291
has comment: http://stackoverflow.com/comment/41829639
has comment: http://stackoverflow.com/comment/41823712
has body: Firstly: Your jQuery has a mistake in it. Change the -webkit-animation-iteration-count from 0.9 to 0.7. Also, please take a look at: http://caniuse.com/#search=animation. You can see, that you have to use the prefix "-webkit" for google chrome. That is why, you need to define both of it in your img style tag. Like so: &lt;img src="3ds_preset_gearshape.png" class="gwd-img-r1sa gwd-gen-hlergwdanimation" data-gwd-style="" data-gwd-override-style="" style="animation-iteration-count: 0.1;-webkit-animation-iteration-count: 0.1;"&gt; A better way to do this, would be to define the iteration count in your stylesheet, not in the html. If you need different iteration counts for different img's, then this is not a good solution for you, ofcourse. Otherwise change: 3s linear 0s 1 normal forwards to 3s linear 0s 0.1 normal forwards And leave the style in the img tags blank For the stop and play part of your question: jsfiddle.net/Lvq6ee8d/14/ For explanation: You know that your animation runs 3 seconds, so I have set a timeout function, which starts when the event "animationstart" is being triggered. Then after 300ms(3000ms/100*10 = 300ms) the animationplaystate is set to pause. So after 10%, the animation stops. And on hover, the animation continues. Also keep in mind, that in this example we need to change the css a little bit. We set the animation iteration to the desired amount, where we want the animation to be when it's finished(1 in my example), so we can use pause and running on it.
score: 1
has comment: http://stackoverflow.com/comment/41820077
upvote count: 1
has comment: http://stackoverflow.com/comment/41822582
has comment: http://stackoverflow.com/comment/41822793
has comment: http://stackoverflow.com/comment/41821550
accepted answer of: http://stackoverflow.com/q/26588628
has comment: http://stackoverflow.com/comment/41823171
has comment: http://stackoverflow.com/comment/41821078
answers question: http://stackoverflow.com/q/26588628
has comment: http://stackoverflow.com/comment/41825037
has comment: http://stackoverflow.com/comment/41824637
has comment: http://stackoverflow.com/comment/41826897
has comment: http://stackoverflow.com/comment/41801841
has comment: http://stackoverflow.com/comment/41822961

http://stackoverflow.com/comment/71103591
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26524620
has text: @Xtremcool - do you have a jsfiddle reproducing this issue?
score: 0

http://stackoverflow.com/comment/41799308
comment on: http://stackoverflow.com/q/26592016
type: QuestionComment
type: Comment
score: 0
has text: There's no triangle in your code, only two points, a triangle contains three points ...

http://stackoverflow.com/q/26561918
tagged with: http://stackoverflow.com/tag/html
has body: so what I try is to show an error "First name must be filled out" as a text called "check", not as an alert... Please help:) First name: Thanks in advance!
upvote count: 2
possible better answer: http://stackoverflow.com/a/26561966
downvote count: 1
has answer: http://stackoverflow.com/a/26561966
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26561961
score: 1
tagged with: forms
type: Question
answer count: 2
tagged with: validation
tagged with: javascript
has title: Java Script form validation
favorite count: 0
has answer: http://stackoverflow.com/a/26561961

http://stackoverflow.com/a/26664122
score: 0
has comment: http://stackoverflow.com/comment/41930237
answers question: http://stackoverflow.com/q/26664068
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41930134
accepted answer of: http://stackoverflow.com/q/26664068
has comment: http://stackoverflow.com/comment/41930107
has comment: http://stackoverflow.com/comment/41930268
has comment: http://stackoverflow.com/comment/41930058
type: Answer
has comment: http://stackoverflow.com/comment/41930203
has body: You can simply tweak your event listener to this: $('.thumbs a').on('click', function() { var $hash = $(this).attr('data-room'); window.location.href = '#' + $hash; }); Hope that helps PS: try to use the on method if you are using a recent copy of jQuery

http://stackoverflow.com/comment/41815056
has text: you want to display table of `data` or `data.error`
score: 0
comment on: http://stackoverflow.com/q/26599883
type: Comment
type: QuestionComment

kendonumerictextbox
type: Tag
tags question: http://stackoverflow.com/q/26592908
tag name: kendonumerictextbox

http://stackoverflow.com/q/26648768
has body: I have this form Name <asp:TextBox ID="tb_name" ClientIDMode="Static" CssClass="tb_orderByPhn" runat="server" /> Phone <asp:TextBox ID="tb_phone" ClientIDMode="Static" CssClass="tb_orderByPhn" runat="server" /> Email <asp:TextBox ID="tb_email" ClientIDMode="Static" CssClass="tb_orderByPhn" runat="server" /> <asp:LinkButton id="btn_order1" class="btn btn-lg btn-block btn-success btn_rad " OnClick="btn_order" OnClientClick=" return validate_order();" runat="server" >Order now </asp:LinkButton> The form is validated by the javascript as function validate_order() { if (document.getElementById("tb_phone").value == "") { document.getElementById("tb_phone").style.borderColor="red"; return false; } if (document.getElementById("tb_email").value == "") { document.getElementById("tb_email").style.borderColor="red"; return false; } if (document.getElementById("tb_name").value == "") { document.getElementById("tb_name").style.borderColor="red"; return false; } return true; } But when i click the button keeping the field empty i get red border on one textbox only(the first textbox in the javascript function ie tb_phone) instead of all three.Please can anyone explain this?
has answer: http://stackoverflow.com/a/26648887
answer count: 4
accepted answer: http://stackoverflow.com/a/26648966
has comment: http://stackoverflow.com/comment/41902038
possible better answer: http://stackoverflow.com/a/26648813
downvote count: 1
has answer: http://stackoverflow.com/a/26648813
type: AnsweredQuestion
score: -1
type: Question
has answer: http://stackoverflow.com/a/26648966
has answer: http://stackoverflow.com/a/26648965
upvote count: 0
tagged with: javascript
has title: Javascript function not working on validating the form
favorite count: 0

http://stackoverflow.com/a/26650964
answers question: http://stackoverflow.com/q/26650211
upvote count: 1
has comment: http://stackoverflow.com/comment/41906376
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41906044
score: 1
has body: The reason is in your click handler you're setting the css on the element to display:none, which gets added to the elements inline style. i.e &lt;div class="sidebar" style="display: none;"&gt;. Then when the screen size changes to above 800, the media css rule changes the style on the element but the inline style element overrides the css rule so element stays hidden. Instead of setting the css of the element directly, add/remove a class to it to hide/show it so the media css rule can override it. if($(".sidebar").hasClass("show")){ $(".sidebar").addClass("hide").removeClass("show"); $(".event").addClass("show").removeClass("hide"); }else{ $(".sidebar").addClass("show").removeClass("hide"); $(".event").addClass("hide").removeClass("show"); } Update: See http://jsfiddle.net/df2f8qm7/2/ I added .show and .hide rules inside media: @media (max-width: 800px) { .sidebar{ display: none; width: 100%; } .event{ width: 100%; display: block; } .sidebar .sidebar-content{ margin-right: 0px; } .sidebar-button{ display: block; } .show { display:block; } .hide { display:none; } } @media (min-width: 800px) { .sidebar{ display: block; } .event{ display: block; } .show { display:block; } .hide { display:block; } }
accepted answer of: http://stackoverflow.com/q/26650211
type: Answer

http://stackoverflow.com/q/26527098
has comment: http://stackoverflow.com/comment/41681974
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41683176
tagged with: promise
answer count: 0
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/41686994
tagged with: bluebird
tagged with: internet-explorer
has body: Preconditions: I have index.php page. I dynamically add new iframe element to the generated page with src 'index.php' - so inside my basic page the same page is being rendered (except its being initialized in the other way). My index.php page includes index.js file that has some wrapper functions for interaction with my API. Wrapper function returns Bluebird's promise. https://github.com/petkaantonov/bluebird/blob/master/API.md When I want to get some data from API I use my wrapper function in this manner: MyApp.API.get('/url', queryParams).then().caught(). That code works fine in Chrome/FF/Safari/IE8+ However, when I try to use that code in IE9/10 (remember, I have an iframe with the same src), and wrapper function is being called from inside an iframe, my promise is neither being resolved nor being thrown any exception which can be caught. I have no idea what can cause such a strange behaviour as wrapper function is being widely used across application. What is more weird is that IE8/11 works absolutely fine. I understand that its hard to help as there is such a little information provided by me. However, if anyone can suggest me something - that would be great.
type: Question
has title: Bluebird promise not being resolved in IE 9/10

http://stackoverflow.com/comment/41822821
type: Comment
type: QuestionComment
score: 0
has text: In your first `if` statement i.e. `if (choice1 == choice2) {..`, you start the game again calling `startGame();` explicitly over there. Is it not normal for the game to restart as per your code?
comment on: http://stackoverflow.com/q/26604954

http://stackoverflow.com/q/26657323
has comment: http://stackoverflow.com/comment/41917881
has title: Is there any way to call the Jquery .on() within a function body
tagged with: javascript
has comment: http://stackoverflow.com/comment/41917217
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41916917
tagged with: jquery
has answer: http://stackoverflow.com/a/26657988
has comment: http://stackoverflow.com/comment/41917002
type: Question
has comment: http://stackoverflow.com/comment/41916974
has body: I need to whether is it possible to call the Jquery .on() within a function as explained below. JQuery code function() {$('.progress .button:first-of-type input').val( parseInt($('.spinner .btn:first-of- type input').val()); }); But I need to have a function like below it is possible? function() {$('body').on(('.progress .button:first-of-type input').val( parseInt($('.spinner .btn:first-of- type input')).val()); }); Because here first-of-type that value is generated on fly. So,I need to call this .on() so that Jquery can recognize events for the attributes created on fly. Kindly, post your suggestions.
score: 0
has comment: http://stackoverflow.com/comment/41917426
answer count: 1

http://stackoverflow.com/comment/41765021
score: 0
type: Comment
has text: Thank you for you answer, only why do you state that "this operation will not change the value of the result" even if it actually floor it to an integer from a float?
type: AnswerComment
comment on: http://stackoverflow.com/a/26573501

http://stackoverflow.com/comment/41682921
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26528159
has text: You tried using [target](http://www.w3schools.com/tags/att_a_target.asp) attribute?
score: 0

http://stackoverflow.com/comment/41678275
type: Comment
type: QuestionComment
has text: But isn't JSTL only supposed to return the value, which would then be what comes after the value attribute?
comment on: http://stackoverflow.com/q/26525227
score: 0

http://stackoverflow.com/q/26636186
has title: Animated Motion Background Effect
upvote count: 0
tagged with: wordpress
has body: I am trying to achieve a look on a Wordpress website which has a moving smoke effect in the background like this example http://hk.qeelin.com/collections/ I have seen that this is in Javascript, but I am unsure how it's working? Does anybody know how this look can be achieved please?
type: Question
has answer: http://stackoverflow.com/a/26636346
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/26636353
favorite count: 0
type: UnansweredQuestion
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/26560655
has title: Execute Js Script in Selenium Webdriver
type: Question
has comment: http://stackoverflow.com/comment/41741979
tagged with: javascript
score: 0
answer count: 0
type: UnansweredQuestion
has body: I would like to ask why when I execute this, it does not return a value into numOfPeople . Thanks a lot. People.prototype.deleteAllPeople = function(){ var numOfPeople = this.getNumOfPeole(); for (var i = 0; i &lt; numOfPeople; i++) { try{ this.click(this.By.xpath(this.getPeopleByOrder(i) + this.classContains('padding') + this.xPathContainText("Delete"))); }catch(error){ this.log("Cannot delete people " + i); } } }; People.prototype.getNumOfPeole= function(){ return this.driver.executeScript( "return jQuery(function($) { " + 'return $("div.single-pane").length;' + " }); " ); };
tagged with: selenium-webdriver
has comment: http://stackoverflow.com/comment/41741901

http://stackoverflow.com/a/26714374
score: 5
has comment: http://stackoverflow.com/comment/42025399
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42022864
downvote count: 0
has body: EDIT In your specific case, it has to do with the Roboto web font. It is included in the Google Maps API, but nothing is using it at the time on your page before an InfoWindow is opened so the browser has no reason to download it, and doesn't. When you open the infoWindow, however, the browser at the point realizes it needs the font, and starts to download it, but google maps has measured the infoWindow size before the font is downloaded (see the original answer on how google maps api measures on infoWindow's size). When the font has finished downloading, the content in the infoWindow gets re-painted in the Roboto font which in fact makes the infoWindow a different (larger) size than the size that Google measured it to be before the font was downloaded and it's at this point you'll see scrollbars. This also explains why you see scrollbars the first time - when google maps measured the infoWindow before the font was downloaded - but you won't see them after - because the font is already downloaded, whatever measurements google maps takes now will be the correct ones. So, the solution is to a) Render something in the Roboto font on your page (causing the browser to download that font) before the first infoWindow is open OR b) Use a different font (one that is used elsewhere on your page, and thus is downloaded on page load) for your infoWindow content. I'll leave the rest of my answer up because it's a common misunderstanding of how infoWindows work, and, as you pointed out with your google search, a lot of people got hung up on it. TLDR: Never use a parent selector (e.g. like #map-canvas) to style the HTML content of your infoWindow. It's not a bug. Here's how google maps info window styles work: When you tell google maps API that you want to open an infoWindow with HTML content, google dynamically creates a div element, appends it to your body tag, grabs the measurements of the dynamically created div, and then appends a div with those measurements to the map which …
type: Answer
accepted answer of: http://stackoverflow.com/q/26657630
has comment: http://stackoverflow.com/comment/42057689
answers question: http://stackoverflow.com/q/26657630
has comment: http://stackoverflow.com/comment/42119304
has comment: http://stackoverflow.com/comment/42055081
upvote count: 5

http://stackoverflow.com/comment/41660391
has text: @Murplyx: Don't know where you heard that. A quick Google for "javascript tofixed memory leak" brings back no results to suggest any such thing.
score: 0
comment on: http://stackoverflow.com/a/26515176
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41868851
comment on: http://stackoverflow.com/a/26629104
has text: exactly what i wanted. Thanks a lot Markai :)
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26614372
has comment: http://stackoverflow.com/comment/41862484
type: UnansweredQuestion
tagged with: streaming
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/41840156
type: Question
has body: Background We have been embedding the EMP (http://news.bbc.co.uk/1/hi/help/7277283.stm) in a quadrant on our bespoke MI wall boards for some months successfully. The code uses a div to host an iframe: &lt;div id="emp1" class="player" style="float: left; width: 100%; height: 100%;"&gt; &lt;p&gt;In order to see this content you need to have both &lt;a href="http://www.bbc.co.uk/webwise/askbruce/articles/browse/java_1.shtml" title="BBC Webwise article about enabling javascript"&gt;Javascript&lt;/a&gt; enabled and &lt;a href="http://www.bbc.co.uk/webwise/askbruce/articles/download/howdoidownloadflashplayer_1.shtml" title="BBC Webwise article about downloading"&gt;Flash&lt;/a&gt; installed. Visit &lt;a href="http://www.bbc.co.uk/webwise/"&gt;BBC&amp;nbsp;Webwise&lt;/a&gt; for full instructions&lt;/p&gt; &lt;/div&gt; And then a bunch of javascript to populate it: function updateEmp(widthEmp, heightEmp) { width = widthEmp; height = heightEmp; $('bbc_emp_embed_emp1').morph({ width: widthEmp + 'px', height: heightEmp + 'px' }); } function reload(url, title) { var emp = new embeddedMedia.Player(); emp.setWidth("100%"); emp.setHeight("100%"); emp.setDomId("emp1"); emp.quality = "low"; emp.set("config_settings_autoPlay", "true"); emp.setPlaylist('http://www.bbc.co.uk/emp/simulcast/bbc_news24.xml'); emp.setConfig('http://www.bbc.co.uk/emp/simulcast/config_bbc_news24.xml'); emp.write(); } The problem Last week the EMP was either retired or has broken. Check out the below link for what we get when we try and access the EMP (just the text "This content doesn't seem to be working. Try again later." : http://www.bbc.co.uk/emp/player.swf I have contacted the beeb and have had no response as yet. Is there another way to embed the bbc other than a nasty iframe surrounded by a div with overflow hidden?
tagged with: javascript
has title: BBC EMP (Embedded Media Player) "Content appears not to be working..."

http://stackoverflow.com/a/26565624
type: Answer
answers question: http://stackoverflow.com/q/26565405
score: 0
has body: In your each loop, you are iterating using a selector .info-tabs $('.info-tabs').each( //some stuff here ) But i dnt see any info-tabs class anywhere. So check your html content first.

http://stackoverflow.com/comment/41990925
type: Comment
comment on: http://stackoverflow.com/q/26665672
has text: Where does your $respond in core.php come from? I can't find an insanciation of the object. In your js, you want to display the property discount_rate. Where was this set? In your core.php it seems, that you are just assigning status and discount rate
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41767782
score: 1
has text: What type of JavaScript minifier outputs code like that?
type: AnswerComment
comment on: http://stackoverflow.com/a/26575020
type: Comment

http://stackoverflow.com/a/26593739
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: This JavaScript file is run in the context of the viewer's inner html page (ReaderControl.html) allowing you to modify things directly in the viewer so WebViewerUniversalInstance will be null (as that's not in the inner page). However I made a small test file with var ele = document.getElementById('DocumentViewer'); and ele wasn't null so I'm not quite sure why that wasn't working for you. Anyway, some examples of things you can do. For custom actions you'll probably want to run your code in the "viewerLoaded" or "documentLoaded" events. For UI changes you shouldn't need to have code in either event. So for example if you wanted to hide the print button you could just put in your file: $('#printButton').hide(); For modifying UI related things I would recommend right-click, Inspect Element to find the ids/classes of things you want to modify. Alternatively you can download WebViewer and take a look at ReaderControl.html. Here's an example of doing something in the viewerLoaded event: $(document).on('viewerLoaded', function() { readerControl.docViewer.SetMargin(0); }); And here's an example of doing something in the documentLoaded event: $(document).on('documentLoaded', function() { readerControl.setCurrentPageNumber(2); readerControl.rotateClockwise(); readerControl.setZoomLevel(2); }); There are many, many more things you could do and you can view the documentation here: http://www.pdftron.com/webviewer/demo/lib/html5/doc/ Some objects you might be interested in: readerControl: available after viewerLoaded DocumentViewer: available after viewerloaded (readerControl.docViewer) Document: available after documentLoaded (docViewer.GetDocument()) If you have more questions you can always ask on the WebViewer forums: https://groups.google.com/forum/#!forum/pdfnet-webviewer
score: 4
has comment: http://stackoverflow.com/comment/41950508
type: Answer
has comment: http://stackoverflow.com/comment/42502648
has comment: http://stackoverflow.com/comment/42251431
has comment: http://stackoverflow.com/comment/42487751
has comment: http://stackoverflow.com/comment/42390730
answers question: http://stackoverflow.com/q/26590091
has comment: http://stackoverflow.com/comment/42189707
accepted answer of: http://stackoverflow.com/q/26590091

http://stackoverflow.com/comment/41679890
type: QuestionComment
has text: To clarify, you want the dropdown with the options (tags) to be hidden, is that it? In other words, you don't want to show the "suggestions"?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26521321

http://stackoverflow.com/q/26543785
has answer: http://stackoverflow.com/a/26544195
tagged with: this
downvote count: 0
has comment: http://stackoverflow.com/comment/41711287
favorite count: 0
tagged with: ajax
has body: I am sending an ajax request when the user hit the search button in the following manner: $('#search').on('click',function(){ $('#searchResponse').hide(); $('#searchResponse').html('&lt;img src="assets/img/loading.gif"&gt;'); $('#searchResponse').show(); $.ajax({type:'POST',url:'assets/php/handler.php',data:$('#form').serialize(),success:function(response){ $('#searchResponse').html(response); }}); return false; }); Everything is working fine but I want to have something like an automatic update after the above happens. This means I have to set up something like a timeout after the request is completed so the ajax is fired again. I've tried the following but with no success unfortunately: $('#search').on('click',function(){ $('#searchResponse').hide(); $('#searchResponse').html('&lt;img src="assets/img/loading.gif"&gt;'); $('#searchResponse').show(); $.ajax({type:'POST',url:'assets/php/handler.php',data:$('#form').serialize(),success:function(response){ $('#searchResponse').html(response); },complete:function(){ setTimeout(this, 5000); }}); return false; }); I guess that the selector isn't right but what alternative should I use to suits my needs? Any help of guidance is more than welcomed.
has comment: http://stackoverflow.com/comment/41711610
upvote count: 2
has answer: http://stackoverflow.com/a/26543834
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/41711749
has title: Send ajax request at a given interval after on click event
tagged with: settimeout
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26543834
possible better answer: http://stackoverflow.com/a/26544195
answer count: 2

http://stackoverflow.com/comment/41890646
type: Comment
type: QuestionComment
has text: Jolly good. I've added my comment as an answer now for the befit of others. Feel free to mark it as correct if it solved your problem.
comment on: http://stackoverflow.com/q/26620504
score: 0

http://stackoverflow.com/q/26537685
has title: Looping Simple JSON Array
has comment: http://stackoverflow.com/comment/41701084
score: 0
tagged with: http://stackoverflow.com/tag/json
answer count: 1
has answer: http://stackoverflow.com/a/26537748
tagged with: arrays
has body: For some reason my loop is treating this array as a string and looping through each character. Here's the structure: var json = [ { "featured": "1", "href": "someurl/", "property": "some property", "location": "Winston-SalemNorth Carolina, United States", "date": "23 Oct", "year": "2014" }, { "featured": "1", "href": "someurl/", "property": "Sheraton Albuquerque Airport Hotel", "location": "AlbuquerqueNew Mexico, United States", "date": "23 Oct", "year": "2014" } ] I'm looping it with: for(var i = 0; i <= json.length; i++) { console.log(json[i]); } Here's a snippet of the type of output I get: f e a t u r e d " : " 1 "
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41701189
has comment: http://stackoverflow.com/comment/41701107
type: Question

http://stackoverflow.com/comment/41841165
has text: What is your issue exactly? The database isn't getting updated? Or the server isn't receiving anything at all?
comment on: http://stackoverflow.com/a/26614648
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41785240
has text: Yes, you have to use `$eval` if you don't want to use isolated scope. Otherwise the solution would be cleaner, as provided by @Artyom Pranovich.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26584240
type: Comment

http://stackoverflow.com/a/26652663
has comment: http://stackoverflow.com/comment/41909288
has comment: http://stackoverflow.com/comment/41909460
has comment: http://stackoverflow.com/comment/41908650
type: Answer
has body: You could just use document.querySelector to find the element (or document.querySelectorAll to get a list of all matched elements): document.querySelector('TABLE.tableClass TD.tdClass IMG'); However, this isn't supported in IE 7. Nor is getElementsByClassName()... You may want to consider dropping support for IE7 altogether. A lot of the major websites out there don't support IE7 any more. More and more sites / libraries are dropping support for IE*, too.
has comment: http://stackoverflow.com/comment/41909610
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26652526
score: 4
has comment: http://stackoverflow.com/comment/41908736
has comment: http://stackoverflow.com/comment/41909177

http://stackoverflow.com/q/26637849
has answer: http://stackoverflow.com/a/26639114
upvote count: 0
score: -2
tagged with: arrays
tagged with: javascript
tagged with: jquery
has body: I have my constructor and array built, how do I make it appear in the html file. this is a plus/minus show hide thing. Here is the html: FAQs <?php include "menu.html" ?> Phone Book Import Muscle Bikes Here is the javascript and it does have jQuery in it: $(document).ready(function() { // the toggle event method has been removed from jQuery 1.9 $("#faqs h2").toggle( function() { $(this).toggleClass("minus"); $(this).next().show(); }, function() { $(this).toggleClass("minus"); $(this).next().hide(); } function contacts(id, type, name, phone) { this.id = id; this.type = type; this.name = name; this.phone = phone; } var auto = new Array(); auto[0] = new contacts("foreign", "car", "BMW", "867-5309") auto[1] = new contacts("american", "car", "Ford", "224-3425") auto[2] = new contacts("two", "bike", "Harley", "224-9191") ); // end toggle // here's one way to code this app without the toggle event method // but this is by no means the only way /*$("#faqs h2").click(function() { $(this).toggleClass("minus"); if ($(this).attr("class") != "minus") { $(this).next().hide(); } else { $(this).next().show(); } }); // end click*/ }); // end ready the array and/or constructor might be done wrong. so how would i put the array in the html so it would display whats all in the array instead of putting it all in the html file?
has comment: http://stackoverflow.com/comment/41884124
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41883122
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41883114
has comment: http://stackoverflow.com/comment/41883709
has comment: http://stackoverflow.com/comment/41882901
has title: constructor & array in html
has comment: http://stackoverflow.com/comment/41883008
has comment: http://stackoverflow.com/comment/41883649
type: Question

http://stackoverflow.com/a/26665718
has comment: http://stackoverflow.com/comment/41948839
has body: I believe this is the same issue that RequireJS has. In web browsers, when you dynamically load in a script, it can't dynamically load other scripts if the scripts are on a different domain. This is a security thing. Just load the script tag like normal, or take a look at this blog post: http://rbrundritt.wordpress.com/2011/11/20/bing-maps-v7-control-lazy-loader/
score: 0
has comment: http://stackoverflow.com/comment/41940817
type: Answer
answers question: http://stackoverflow.com/q/26660913

http://stackoverflow.com/a/26621715
has comment: http://stackoverflow.com/comment/41854008
answers question: http://stackoverflow.com/q/26621660
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: If it's conciseness you want, then you could try: var selectPeople = people.filter(function(k, i) { return nums.indexOf(i) &gt;= 0; }); Similarly, you could do (I actually prefer this): var selectPeople = nums.map(function(k) { return people[k]; }); Note: This only works in modern browsers. However, I can't think of many scenarios where using push is not the best option. If it is a naming conflict, you can always wrap it in a temporary function (which works in all browsers): var selectPeople = (function() { var temp = []; for (var i = 0; i &lt; nums.length; ++i) temp.push(people[nums[i]]); return temp; })(); This essentially eliminates any naming conflicts (or, for example, conflicts where selectPeople is not a true array as it lacks a push method).
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/41853871
accepted answer of: http://stackoverflow.com/q/26621660

http://stackoverflow.com/q/26566233
possible better answer: http://stackoverflow.com/a/26566263
has comment: http://stackoverflow.com/comment/41751527
tagged with: recursion
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26566302
accepted answer: http://stackoverflow.com/a/26566302
type: Question
has answer: http://stackoverflow.com/a/26566263
tagged with: arrays
has body: Below is a function that basically takes a multi-dimensional array and converts it into a single-dimensional array. I am using recursion to solve this. Also, there is one constraint - I cannot use a global variable, so no variables can be defined outside of the function. Here is the function. function flattenArray(someArr) { var results = []; if(isArrayLike(someArr)) { for(var i = 0; i != someArr.length; i++) { flattenArray(someArr[i]) } } else { results.push(someArr); } return results; } Here, the function will always return a blank array, since every time the function recurs, it clears the array. So, how can you avoid this without using a global variable? Assume: isArrayLike() function returns true or false.
tagged with: javascript
score: 0
answer count: 2
has title: How can I create a recursive function along maintaining the history of the local variables?

http://stackoverflow.com/comment/41836213
has text: I've updated my answer and the [working example link](http://plnkr.co/edit/hkSGoAgy7UhaVUVrLgQb?p=preview) in the answer.
type: Comment
comment on: http://stackoverflow.com/a/26589605
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41853875
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26608137
type: Comment
has text: Sure, just add `setTimeout(function(){$(".TextBox").children(":first").html('');}, 500);` in the Timeout waiting for complete sequence (in `displaySequence`l185-6) or check updated answer

http://stackoverflow.com/comment/58202492
type: AnswerComment
type: Comment
score: 4
has text: I think you might need to brush up on your JS internals... http://altitudelabs.com/blog/what-is-the-javascript-event-loop/ http://stackoverflow.com/questions/8058612/does-calling-settimeout-clear-the-callstack
comment on: http://stackoverflow.com/a/34999925

http://stackoverflow.com/a/26636129
has comment: http://stackoverflow.com/comment/41881490
has body: You can use window.parent.document as a context in jQuery selector, and then manipulate CSS values. $(":button").click(function(){ $('#inneriframe, #outerdiv', window.parent.document).css({"height":"350px"}); })
downvote count: 0
has comment: http://stackoverflow.com/comment/41889758
type: Answer
answers question: http://stackoverflow.com/q/26635778
score: 3
upvote count: 3

http://stackoverflow.com/comment/41711894
has text: Thanks for the pointer (http://stackoverflow.com/questions/568977/identifying-between-refresh-and-close-browser-actions/13916847#13916847). I tried to search before but couldn't find it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26543856
type: AnswerComment

http://stackoverflow.com/a/26664227
has comment: http://stackoverflow.com/comment/41930590
has comment: http://stackoverflow.com/comment/41930721
has comment: http://stackoverflow.com/comment/41930275
has comment: http://stackoverflow.com/comment/41930816
accepted answer of: http://stackoverflow.com/q/26664164
has comment: http://stackoverflow.com/comment/41931015
answers question: http://stackoverflow.com/q/26664164
has comment: http://stackoverflow.com/comment/41930929
type: AcceptedAnswer
has body: 1)I can only guess that you're trying to use JQUERY? Where do you include the library? 2 )#.ajax isnt valid Jquery function try $.ajax instead
score: 0
has comment: http://stackoverflow.com/comment/41930383
has comment: http://stackoverflow.com/comment/41930790
type: Answer
has comment: http://stackoverflow.com/comment/41930305

http://stackoverflow.com/comment/41797930
comment on: http://stackoverflow.com/q/26591387
has text: Convert input to `Date`, then [add days to it](http://stackoverflow.com/questions/563406/add-days-to-datetime)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26596018
has body: The styles you apply via css are lost when you getContext. You should try using prop too/instead. canvas.prop({ width: 700, height: 400 });
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26595800
answers question: http://stackoverflow.com/q/26595800
score: 1

http://stackoverflow.com/comment/41815929
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26600918
has text: could you share code snippet?

http://stackoverflow.com/comment/41762333
comment on: http://stackoverflow.com/q/26572094
type: QuestionComment
type: Comment
has text: That structure's a bit odd, what's the purpose of the outermost array and why are the objects distributed amongst multiple nested arrays?
score: 3

junit
type: Tag
tags question: http://stackoverflow.com/q/26583283
tag name: junit

http://stackoverflow.com/comment/41846259
score: 0
comment on: http://stackoverflow.com/a/26617109
type: AnswerComment
type: Comment
has text: the scenario is the moment "displaymessage1()" is called , I should see the message on spinnerbox and then when "displaymessage2()" immediately I should see the meesage of displaymessage2 on spinner and then for displaymessage3 nd after that spinner should hide as the ajax will be completed after displaymessage3()

http://stackoverflow.com/q/26617336
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
has title: Stop page redirection using javascript without warning or asking
has body: This answer tells how to stop redirection: &lt;script language="JavaScript" type="text/javascript"&gt; //&lt;![CDATA[ window.onbeforeunload = function(){ return 'Are you sure you want to leave?'; }; //]]&gt; &lt;/script&gt; This codes works, but asks an user whether to stay on the page or redirect. Can the redirect be stopped without any type of alert or asking?
upvote count: 2
tagged with: http-redirect
has answer: http://stackoverflow.com/a/26617387
answer count: 1
linked to: http://stackoverflow.com/q/2635370
has comment: http://stackoverflow.com/comment/41845889
has comment: http://stackoverflow.com/comment/41845924
type: UnansweredQuestion
score: 2

http://stackoverflow.com/q/26550477
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
score: 0
has body: Please try the following code for example: It does not work on page load if the document ready function is defined above kendo control...But if it's below, it works fine... Why is this so?
answer count: 1
has comment: http://stackoverflow.com/comment/58078859
tagged with: asp.net
type: UnansweredQuestion
has title: Why document ready does not work for kendo controls
has answer: http://stackoverflow.com/a/26551979
linked to: http://stackoverflow.com/q/5263385
type: Question

http://stackoverflow.com/q/26546585
type: UnansweredQuestion
tagged with: web-applications
score: 2
downvote count: 0
has title: ExtJS 4 to ExtJS 5 migration
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26547456
answer count: 2
tagged with: frameworks
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41742956
tagged with: extjs
has body: We are migrating a web application from ExtJS 4 to ExtJS 5. Testing the index.html results in the following error (outputted by the Firefox-FireBug-console): NetworkError: 404 Not Found - http://localhost:8080/ext/build/examples/ux/grid/FiltersFeature.js?_dc=1414147197935 I have already searched for the FilterFeatures.js-file inside the directory, but it isn't there. According to the "Whats New in ExtJS 5.0"-site this file was so popular, that they thought it would be wise to move it. Can someone tell me how to include this file or the functionality, so that the error vanishes? I have already tried to add the following to my app.js file: Ext.Loader.setPath('Ext.ux', './ext/build/examples/ux'); Ext.application({ ... requires: [ 'Ext.ux.grid.FiltersFeature' ], ... }); But the error persists. I think i need to get a reference to an object that is now hidden somewhere else. I just dont know how to reference it, because i dont know the js-file it is now placed in and how to do it syntactically correct in Ext JS 5.
has answer: http://stackoverflow.com/a/29896550

http://stackoverflow.com/q/26588875
has body: When I update the manifest's version the default page displays a spinner that shows 0-100% then a success message will show. However, first time users never passes the 100%. It stops there. It does not executes the next function which is updateready. Below is my code: &lt;script&gt; var opts = { lines: 13, // The number of lines to draw length: 11, // The length of each line width: 5, // The line thickness radius: 17, // The radius of the inner circle corners: 1, // Corner roundness (0..1) rotate: 0, // The rotation offset color: '#FFF', // #rgb or #rrggbb speed: 1, // Rounds per second trail: 10, // Afterglow percentage shadow: false, // Whether to render a shadow hwaccel: false, // Whether to use hardware acceleration className: 'spinner', // The CSS class to assign to the spinner zIndex: 2e9, // The z-index (defaults to 2000000000) top: 'auto', // Top position relative to parent in px left: 'auto' // Left position relative to parent in px }; var overlay; var spinner; var target; window.applicationCache.addEventListener('checking', function (event) { console.log("Checking for updates."); console.log("inside checking event, appcache status : %s", applicationCache.status); }, false); window.applicationCache.addEventListener('downloading', function (event) { target = document.createElement("div"); document.body.appendChild(target); spinner = new Spinner(opts).spin(target); overlay = iosOverlay({ text: "0%", spinner: spinner }); }, false); window.applicationCache.addEventListener('progress', function (event) { var per = event.loaded.toString() / event.total.toString(); var totalPercentage = Math.round(per * 100); Math.round overlay.update({ text: totalPercentage + "%", spinner: spinner }); }, false); window.applicationCache.addEventListener('updateready', function (e) { if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { window.setTimeout(function () { overlay.update({ icon: "loader/img/check.png", text: "Success" }); }, 2e3); window.setTimeou…
tagged with: html5-appcache
has title: Using manifest, first time users never pass the "progress" function
type: Question
tagged with: cache-manifest
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26592251
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

wicket
tags question: http://stackoverflow.com/q/26534031
type: Tag
tag name: wicket

http://stackoverflow.com/comment/41691143
comment on: http://stackoverflow.com/q/26531894
type: Comment
type: QuestionComment
score: 1
has text: Sorry. I thought it would be easier to send the links instead of pasting in code. Trying my best to make it work and to explain what I'm trying to do is even tougher for me. I'll try to edit my question better.

http://stackoverflow.com/q/26528744
tagged with: javascript
has body: I'm using Google Maps API v3 to handle a map. In addition I took an input/text and an input/button to let the user look for a zip code. The map then should center on that zipcode. And it does! But on some zip codes I come to very exotic places. The server, client and anything else is in Germany, so I would like to lock all queries to Germany. For example if I want to center on "92224" I don't see Bavaria, I get lost in Lithuania. I'm using the following code from this answer to center by command: function codeAddress(zipCode) { geocoder.geocode( { 'address': zipCode}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { //Got result, center the map and put it out there map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); } Now how can I achieve that this query only will center on German zip codes? (If it helps, German zip codes are always 5 numbers long.)
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26530191
has title: How to center on a map by zip code for a specific country?
type: AnsweredQuestion
score: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/26530191
favorite count: 0
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/11147803
answer count: 1
tagged with: google-maps

http://stackoverflow.com/comment/41927402
comment on: http://stackoverflow.com/a/26661513
type: Comment
has text: Yup. And you are just dealing with your predefined view model so nothing unpredictable, no $parent or anything.. :) There was another question today here http://stackoverflow.com/questions/26658679/ng-if-causing-parent-index-to-be-set-to-index/26658945#26658945, you can get around with a legit usage of ng-init.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41733036
type: Comment
has text: This is perfect, I'm also trying to get the section below it to hide when they are reversed, right now it's controller by this ng-show="!showNow". My attempt based off your answer was this : . This did not seem to work. Any insight? Thanks again!
comment on: http://stackoverflow.com/a/26555635
score: 0
type: AnswerComment

http://stackoverflow.com/q/26635309
type: Question
linked to: http://stackoverflow.com/q/500431
answer count: 2
has comment: http://stackoverflow.com/comment/41878137
linked to: http://stackoverflow.com/q/1140089
tagged with: javascript
has answer: http://stackoverflow.com/a/26635363
has comment: http://stackoverflow.com/comment/41878134
has body: I am working with a bit of code which has the following Javascript function. I have read this SO article which has explained things a little bit but I am still a bit confused as to how this code works. The code is as follows: messageBus = (function() { var messages = {}; function publish(name, data) { //does some stuff } function subscribe(name, callback) { //does some stuff } function unsubscribe(name, callback) { //does some stuff } return { publish:publish, subscribe:subscribe, unsubscribe:unsubscribe }; })(); And then is called by messageBus.publish("Submit"); What does the return { publish:publish, subscribe:subscribe, unsubscribe:unsubscribe }; bit do in the code do?
favorite count: 0
has answer: http://stackoverflow.com/a/26635430
possible better answer: http://stackoverflow.com/a/26635363
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/139853469
has title: Self invoked Javascript function
type: AnsweredQuestion
score: -1
accepted answer: http://stackoverflow.com/a/26635430

http://stackoverflow.com/q/26593615
tagged with: random
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26594094
tagged with: css
favorite count: 0
upvote count: 0
type: UnansweredQuestion
tagged with: loops
downvote count: 1
tagged with: numbers
has title: Javascript random number loops undefined onclick
score: -1
has body: I cannot find the error within my code, whenever i try to run it, the onclick returns with an error "loopNums is not defined". The user can only enter a number between 1 and 15 and the loop will generate 10 random numbers between the user input and 100 to determine which is divisible or not. Loop Practice Enter a number <p />
type: Question

http://stackoverflow.com/comment/41714430
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26545549
has text: Weird! Good question
type: Comment

http://stackoverflow.com/q/26574625
has title: Issue on Targeting Dynamic Content in an Exiting
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26574712
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has body: Can you please take a look at this demo and let me know why I am not able to apply CSS rules to .popover class? As you can see I already tried the $("#pop").find('.popover').css("background-color", "red"); $("#pop").closest(".popover").css("background-color", "red"); but neither of .find() or .closest() are working here! Thanks
score: 1
accepted answer: http://stackoverflow.com/a/26574712
type: Question

http://stackoverflow.com/comment/41777160
type: Comment
has text: how do i set the offset for a group? group.setoffsetX(value);
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26577396

http://stackoverflow.com/q/26526201
has comment: http://stackoverflow.com/comment/41679833
linked to: http://stackoverflow.com/q/15603561
type: Question
has answer: http://stackoverflow.com/a/26526490
has comment: http://stackoverflow.com/comment/41679695
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/12859942
tagged with: ajax
has comment: http://stackoverflow.com/comment/41680062
score: 0
has comment: http://stackoverflow.com/comment/41679815
has title: AJAX not sending post data
answer count: 3
has answer: http://stackoverflow.com/a/26526418
type: UnansweredQuestion
has body: I am currently attempting to send form data via ajax to a php function but it does not appear to be sending it. This is the HTML Form: &lt;form onSubmit="return registration();" id="registration_form"&gt; &lt;input type="email" id="email_address" name="email_address" class="inputTextFooter"&gt; &lt;input src="images/go.png" alt="Go" type="submit"&gt; &lt;/form&gt; The AJAX: function registration(){ if(!$('#email_address').val()){ alert("Empty"); } else { $.ajax( { type: "POST", url: "includes/registration_check.php", data: $('#registration_form').serialize(), success: function( response ) { alert( response ); } }); } return false; }; Finally the PHP: $user_id = NULL; $user_email = isset($_POST['email_address']) ? $_POST['email_address'] : ''; $distinct_query = "SELECT distinct user_email FROM user_emails"; $result=mysql_query($distinct_query, $connection); $rows = mysql_num_rows($result) - 1; $distinct_result_array = array(); while($fetched_array = mysql_fetch_assoc($result)) { $distinct_result_array[] = $fetched_array; } for ($loop = 0; $loop &lt;= $rows; $loop++) { if (in_array($user_email, $distinct_result_array[$loop])) { echo "Email taken."; break; } else{ } } $query = "INSERT INTO user_emails (user_id, user_email) VALUES ('".$user_id."', '".$user_email."')"; mysql_query($query, $connection); echo "You have successfully registered and will be checked by administration."; When I send the form it adds to the database but the email field is blank.
tagged with: php
has answer: http://stackoverflow.com/a/26526416
has comment: http://stackoverflow.com/comment/41680237
has comment: http://stackoverflow.com/comment/41679875
has comment: http://stackoverflow.com/comment/41679791

http://stackoverflow.com/comment/41728434
comment on: http://stackoverflow.com/q/26552749
type: Comment
type: QuestionComment
has text: If you do what I suggested, you will get `["a","b","c"]` for the keys. See here for working demo: http://jsfiddle.net/jfriend00/dt7Le6h9/
score: 0

http://stackoverflow.com/comment/41920130
has text: I think it would of in 0.9.4 but not since the newer version came out. I could be wrong and the issue could be that it's loading the page before the users collection has been populate in which case a waitOn function should resolve it.
comment on: http://stackoverflow.com/q/26657592
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41785645
has text: jQuery is JavaScript (though I suspect you mean that you simply don't want to use that library?). But...what relation does the end-result have to the search string?
comment on: http://stackoverflow.com/q/26584990
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41865194
type: Comment
type: QuestionComment
has text: @A.Wolff I'm not, it would be a string/JSON.
comment on: http://stackoverflow.com/q/26628040
score: 0

http://stackoverflow.com/q/26656074
tagged with: javascript
has answer: http://stackoverflow.com/a/26735450
has body: In my angular app I have a product view/controller that has the common questions for product (SKU, Name, Description etc). I also have a dropdown field named ProductType that I will use to load a dynamic view/js/controller for questions that vary based on that product type. When the user saves the product I'll have a property on the base product model named ProductTypeConfig (as well as ProductType) that contains a json representation of the product type configuration and I want to pass all that to the server controller for persistence. Has anyone seen this done before in Angular? Comments or clues as to how to go about this? I don't want to load all of js for every product type controller etc. ahead of time as this will potentially be plugable by the client as new product types are rolled out. EDIT: Ok, so I created a plunk to demonstrate what I'm trying to accomplish. I have the dynamic piece working well I think. At this point I just need to figure out how to grab the dynamic data in the saveProduct() function in the ProductController. When save is clicked, I need to somehow call a method on either the TypeAController or the TypeBController depending on which one is loaded. I was thinking that I could probably create a service that all the controllers would depend on and have it do the work. Is this something that is possible? The plunk is located here http://plnkr.co/edit/6kQYKU This is the main controller: (function() { var app = angular.module('ProductApp', ['ngRoute']); app.config(function($httpProvider, $routeProvider) { $routeProvider. when('/', { templateUrl: 'product.html', controller: 'ProductController' }). otherwise({ redirectTo: '/' }); }); var ProductController = function($scope, $log, $routeParams, $location) { var saveProduct = function() { // how to get data from either TypeAController or TypeBController here when saved from ProductController $log.log('Product saved') $location.path('/'); }; $scope.saveProduct = saveProduct; // values $scope.Produ…
score: 0
answer count: 1
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26735450
has title: Passing data between controllers in angular
type: Question

http://stackoverflow.com/comment/41800895
type: QuestionComment
comment on: http://stackoverflow.com/q/26558111
score: 0
has text: @BenjaminTrent I am using Chrome. I just had a brief look into Janus and tried their Video MUC demo. Somehow even with 3 people in a room the streams were freezing and connections dropped. I know that this can have various reasons (network and friends), but it's not very motivating to start investing time into it, when this is what they show as an example. Have you tried this example with different experiences?
type: Comment

http://stackoverflow.com/q/26620374
has answer: http://stackoverflow.com/a/26620469
type: AnsweredQuestion
downvote count: 0
score: 1
has body: $("#searchType").on('change', function () { var selectionAction = { All: loadAll(), Competitions: loadAll("competitions"), Clubs: loadAll("clubs"), Teams: loadAll("teams") }; var selection = $("#searchType").find('option:selected').val(); selectionAction[selection] }); See the above code. The idea is that when selection equals one of the properties in my object, then the corresponding function will be called. e.g. when selection equals Competitions then we would invoke loadAll("competitions") function. Instead what I am finding is that when it enters the onChange function that it invokes all functions. What am I doing wrong here?
type: Question
has answer: http://stackoverflow.com/a/26620398
accepted answer: http://stackoverflow.com/a/26620398
tagged with: javascript
answer count: 2
upvote count: 1
has title: Javascript: Defining a map of functions
has comment: http://stackoverflow.com/comment/41851721
possible better answer: http://stackoverflow.com/a/26620469
favorite count: 0

http://stackoverflow.com/comment/41843334
has text: Ben, please provide the `php` for us to look at. Also, check your browser console `network` tab to see the response from the server. It will most likely tell you what is going on
comment on: http://stackoverflow.com/q/26616024
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41784455
type: Comment
type: QuestionComment
score: 1
has text: If there is a class or function definition in that file, you should always use `require_once`.
comment on: http://stackoverflow.com/q/26584332

http://stackoverflow.com/comment/41771311
comment on: http://stackoverflow.com/q/26576773
score: 0
type: Comment
type: QuestionComment
has text: cause it calls function by navigating. and it's not what I looking for

http://stackoverflow.com/a/26652502
score: 0
has body: Try - Add "event" as a parameter that doSomething gets Send it to formValidation Add event.preventDefault(); function doSomething(event) { str = document.registration.userpass.value; str2 = document.registration.userpass2.value; document.registration.response.value = MD5(str); document.registration.response2.value = MD5(str2); document.registration.userpass.value=""; document.registration.userpass2.value=""; formValidation(event); } function formValidation(event) { if (registration.userpass.value == registration.username.value) { alert("Error: Password must be different from Username!"); document.registration.userpass.focus(); event.preventDefault(); return false; } }
answers question: http://stackoverflow.com/q/26652403
type: Answer

http://stackoverflow.com/q/26545294
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41714316
tagged with: data-binding
tagged with: unit-testing
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41714132
score: 0
has body: I'm trying to unit test the databinding in a very simple angular directive: Directive .directive('uri', function () { return { restrict: 'E', templateUrl: 'views/partials/directives/uri.html', transclude: false, replace: false, scope: false, controller: function ($scope) { $scope.uri = null; } }; }); Template url Unit Test describe('Directive: uri', function () { // we declare some global vars to be used in the tests var elem, scope, $compile, directive = angular.element(''), template = 'views/partials/directives/uri.html'; // load the module / template we want to test beforeEach(module('app', template)); // before each test, creates a fresh scope beforeEach(inject(function ($rootScope, _$compile_, $templateCache) { //assign the template to the expected url called by the directive and put it in the cache var tplCache = $templateCache.get(template); $templateCache.put(template, tplCache); console.log(tplCache); scope = $rootScope.$new(); $compile = _$compile_; })); function compileDirective() { //create the element with the directive template elem = $compile(directive)(scope); scope.$digest(); } it('should set the input value to the scope.uri value', function () { // add uri to scope var uri = 'test-uri'; scope.uri = uri; // then produce our directive using it console.log(scope.uri); compileDirective(); console.log(scope.uri); console.log(elem); // this should impact the input value value var templateAsHtml = elem.html(); expect(templateAsHtml).toContain(scope.uri); }); }); The templateCache caches the template. The element gets compiled on the scope with the supplied directive. But somehow the uri property is not linked to my directive. Also, after the scope.$digest() the scope.uri is null... Karma test results LOG: ' url ' LOG: 'test-uri' LOG: null LOG: Object{0: url , length: 1} PhantomJS 1.9.7 (Mac OS X) Directive: uri should set the input value to the scope.uri value FAILED Expected ' url ' to contain null. PhantomJS 1.9.7 (Mac OS X): Executed 6 of 6 (1 FAILED) …
answer count: 1
has title: Unit test databinding in angular directive with templateUrl
has answer: http://stackoverflow.com/a/26545752

http://stackoverflow.com/a/26579135
score: 2
downvote count: 0
has body: A single store is a good idea if you want to have the same data in multiple views. That's correct, the filters will be applied across all stores. In Ext5, the concept of "chained stores" has been implemented, see here for more information: http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.data.ChainedStore
has comment: http://stackoverflow.com/comment/41819474
accepted answer of: http://stackoverflow.com/q/26578881
has comment: http://stackoverflow.com/comment/41785668
answers question: http://stackoverflow.com/q/26578881
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41824062
has text: I'm using localhost. I thought it could be some problem with encoding, but doesn't seem to be
comment on: http://stackoverflow.com/q/26600094
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41700449
type: QuestionComment
has text: css issue! you need to fix the `padding` and `margin` on `li`
comment on: http://stackoverflow.com/q/26536941
score: 0
type: Comment

http://stackoverflow.com/a/26562979
has body: There's a library called skollr.js that let you decide what happen when an element appear on the screen. Check it out.
type: Answer
has comment: http://stackoverflow.com/comment/41746035
answers question: http://stackoverflow.com/q/26562178
score: 0

http://stackoverflow.com/comment/41925108
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26661528
has text: As long as you know what you are `eval`ing, the only problem may be the performance implications.
score: 4

http://stackoverflow.com/comment/41863744
score: 1
comment on: http://stackoverflow.com/a/26626978
type: AnswerComment
type: Comment
has text: I added a line in javascript code here http://jsfiddle.net/ubfpzL4c/10/ . Is it what are you looking for? The last clicked div will be above others.

http://stackoverflow.com/q/26667397
tagged with: javascript
tagged with: canvas
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has body: guys. here is a bit of code that is supposed to be okay, though it doesn't work...heh...quite typical =) function xxx() { var txtCanvas = document.getElementById('text'); var textOne = txtCanvas.getContext('2d'); var alpha = 0.5; textOne.globalAlpha = alpha; // loading image var img = new Image(); img.src = "http://tvangeste.com/gallery/selani/tv4_2.jpg" img.onload = function () { textOne.drawImage(img, 0, 0); } //end of image loader if (alpha &lt; 1) { alpha += 0.1; } } requestAnimationFrame(xxx); This is Fiddle to show how it doesn't work... http://jsfiddle.net/gLs1owd6/ The script is supposed to do one simple thing - to fade in the image. Any suggestions? Thanks!
type: Question
has answer: http://stackoverflow.com/a/26667582
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
answer count: 1
has title: Canvas - image opacity loop (fade in)
accepted answer: http://stackoverflow.com/a/26667582

http://stackoverflow.com/q/26517676
has comment: http://stackoverflow.com/comment/41884009
has body: I'm converting an existing project to RequireJS and I'm doing it in steps. Currently I'm only attempting to conditionally load jQuery 1 or 2 depending on some Modernizr Tests... However the namespacing portion of the script is located in a template file... while the scripts are currently split up between a batch of files that gets concatenated and minified later and some inline scripts strewn throughout the template files... I hate to just start moving code around and would like to keep most of it in place while I try to get the conditional loading running.. so my question is: How important is it to adhere to the name-to-file-path lookup algorithm rules in RequireJS? It says to never define more than one module per file, but I'm unsure why this is.
linked to: http://stackoverflow.com/q/19216580
tagged with: js-amd
answer count: 0
type: UnansweredQuestion
has title: Is it safe to use only named modules in RequireJS instead of using the name/folder algorithm?
upvote count: 1
has comment: http://stackoverflow.com/comment/41665353
score: 1
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/41796357
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41676734
score: 0
type: AnswerComment
has text: Hmm, I copied the "your case" code, but it doesn't work at all. Neither does the other answer. What am I doing wrong here? It sounds like it should just work. Edit: The buttons (mobile-nav-button etc.) don't get hidden and the toggle-able menu is just always active when I get below 992 pixels.
type: Comment
comment on: http://stackoverflow.com/a/26524118

http://stackoverflow.com/q/26644705
has comment: http://stackoverflow.com/comment/41896704
tagged with: image
tagged with: caching
type: Question
tagged with: html-table
has body: I have an assignment that involves me creating a simple shopping cart. There will be a list of items for the user to choose from, which includes a picture for each item. I have to cache the images before I add them to my table. My problem is, my function for caching and loading the images does not do anything. All that happens is the table displays the image alts. Here's my table, as well as the call to the cacheImages() function Digital Camera $75.99 Portable DVD Player $35.99 Headphones $45.99 Microwave Oven $75.99 Bluetooth Stereo Speaker $89.99 And here is my cacheImages() function, which is in a seperate .js file linked to my htm document function cacheImages(){ var cameraImage = new Image(); cameraImage.src = "images/camera.jpg"; var dvdImage = new Image(); dvdImage.src = "images/dvdPlayer.jpg"; var headphonesImage = new Image(); headphonesImage.src = "images/headphones.jpg"; var microwaveImage = new Image(); microwaveImage.src = "images/microwave.jpg"; var stereoImage = new Image(); stereoImage.src = "images/stereo.jpg"; document.images[0].src = cameraImage.src; document.images[1].src = dvdImage.src; document.images[2].src = headphonesImage.src; document.images[3].src = microwaveImage.src; document.images[4].src = stereoImage.src; }
has comment: http://stackoverflow.com/comment/41896910
answer count: 1
has comment: http://stackoverflow.com/comment/41896830
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41896732
linked to: http://stackoverflow.com/q/10240110
has title: Cache images, then load them into a table in javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26644882

http://stackoverflow.com/comment/41726282
has text: I am so sorry.. I think I understand iffy enough w/ your excellent explanation. However, what I am puzzled is in fact with the example I gave.. I don't understand why i=5 by the time result[i] = function() { return a[i]; }; is ran.. I understand in settimeout and set interval case, but why also in this case? Is this just simply how for loop works in javascript?
comment on: http://stackoverflow.com/a/26550566
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41955805
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26659580
type: AnswerComment
has text: Didn't mean to give a confusion answer - the answer is that there's no way to do that and that there are no short-term plans of adding support for it. It's not that we don't want to add it, it'd be awesome, but it is not prioritised right now.

http://stackoverflow.com/comment/52428026
comment on: http://stackoverflow.com/a/26641136
type: AnswerComment
has text: @Jwan622: `require('./hamming')` evaluates as the Hamming object we exported above; `.compute` accesses its `compute` member.
type: Comment
score: 1

http://stackoverflow.com/comment/41838772
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26613639
has text: Files aren't included when a form is serialized, you have to use a `formData` object to include the files when posting with ajax.

http://stackoverflow.com/q/26664205
has comment: http://stackoverflow.com/comment/41932416
score: 0
answer count: 1
type: UnansweredQuestion
has body: I have a list (ul) of items (li)s. I want to use event delegation to bind a click event to the list instead of to each individual item. I used the code below do to so successfully. document.getElementById('list').addEventListener('click', function(e) { if(e.target.nodeName === 'LI') { doTheWork(); } }); Great. However, my list items are parents of other nodes, and when I click on those nodes, I never can call doTheWork because the target is not an li. Title ... How can I handle a click on a list item that has children without binding an event to each item itself? For example, if my list item has a title, how can I catch the click event on the list item when the user technically clicked on the title tag?
type: Question
has title: Event delegation -- list items with children of their own
tagged with: performance
has answer: http://stackoverflow.com/a/26664705
tagged with: javascript
has comment: http://stackoverflow.com/comment/41930209
has comment: http://stackoverflow.com/comment/41930984

http://stackoverflow.com/q/26575156
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41768785
has answer: http://stackoverflow.com/a/37959387
tagged with: php
tagged with: node.js
has title: Using Node.js with CouchCMS
upvote count: 0
has comment: http://stackoverflow.com/comment/41768264
has answer: http://stackoverflow.com/a/26575250
accepted answer: http://stackoverflow.com/a/26575250
type: AnsweredQuestion
has body: I would like to use the features of Grunt and Gulp (preprocessing, compressing, watching etc.), but I don't want to abandon traditional PHP. I use CouchCMS which requires traditional PHP. Can I use both CouchCMS with Grunt or Gulp? If not, why is that so, and is there any viable alternative? Thanks
score: -1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41768682
possible better answer: http://stackoverflow.com/a/37959387
downvote count: 1

http://stackoverflow.com/a/26640343
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26640244
has body: Function has refence to special keyword "this" that points to Current Scope(or protypical scope of parent till global scope) or current Object Instance , Here Points to PageSizes Object Use this var pageSizes = { w: parseInt(scope.page.imagewidth), h: parseInt(scope.page.imageheight), offset: function() { return this.w/this.h; } } and then chnage this line , as offset it not an property it is a function now console.log('page.offset', pageSizes.offset); to console.log('page.offset', pageSizes.offset());

http://stackoverflow.com/q/26620797
has title: Fuelux - how to use repeater
tagged with: javascript
tagged with: jquery
score: 0
tagged with: twitter-bootstrap
has body: I am trying to use Fuelux repeater for one of my projects but I cant figure out how to populate data using javascript. The examples they have provided use couple of other plugins(Require.js and underscore.js) and I am not familiar with those. Can someone please help me to do this without any other plugins. I removed all require methods in the code but that didnt work either. Please look at this fiddle for what I have so far. /*! * JavaScript for Fuel UX's docs - Repeater Examples * Copyright 2011-2014 ExactTarget, Inc. * Licensed under the Creative Commons Attribution 3.0 Unported License. For * details, see http://creativecommons.org/licenses/by/3.0/. */ define function(require){ // var $ = require('jquery'); // var _ = require('underscore'); var colors = { bug: '#A8B820', dark: '#705848', dragon: '#7038F8', electric: '#F8D030', fairy: '#EE99AC', fighting: '#C03028', fire: '#F08030', flying: '#A890F0', ghost: '#705898', grass: '#78C850', ground: '#E0C068', ice: '#98D8D8', normal: '#A8A878', poison: '#A040A0', psychic: '#F85888', rock: '#B8A038', steel: '#B8B8D0', water: '#6890F0' }; var columns = [ { label: 'Name', property: 'name', sortable: true }, { label: 'Id', property: 'id', sortable: true }, { label: 'Type', property: 'type', sortable: true }, { label: 'Height (in)', property: 'height', sortable: true }, { label: 'Weight (lbs)', property: 'weight', sortable: true }, { label: 'Abilities', property: 'abilities', sortable: true }, { label: 'Weakness', property: 'weakness', sortable: true } ]; var delays = ['300', '600', '900', '1200']; var pokemon = [{ "abilities": "Overgrow", "weight": "15.2", "weakness": "fire, flying, ice, psychic", "height": "28.0", "id": "001", "name": "Bulbasaur", "ThumbnailAltText": "Bulbasaur", "ThumbnailImage": "http://assets2.pokemon.com/assets/cms2/img/pokedex/detail/001.png", "type": "grass, poison" }, { "abilities": "Overgrow", "weight": "28.7", "weakness": "fire, flying, ice, psychic", "height": "39.0", "id": "002", "name": "Ivysa…
has answer: http://stackoverflow.com/a/26664185
accepted answer: http://stackoverflow.com/a/26664185
type: AnsweredQuestion
tagged with: fuelux
type: Question
answer count: 1

http://stackoverflow.com/a/26598931
has comment: http://stackoverflow.com/comment/41812907
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26564586
has comment: http://stackoverflow.com/comment/41812756
has comment: http://stackoverflow.com/comment/41812545
answers question: http://stackoverflow.com/q/26564586
has body: Replace your whole &lt;script&gt;..&lt;/script&gt; bit with this... &lt;script&gt; $(document).ready(function() { $("#RYSSD1").keyup(function() { $('#RYSBDB').val($(this).val()); $('#RYSBA2').val($(this).val()); }); var inputs = $('input[name="RYSSPT"], input[name="RYSEP"]'); $(inputs).click(function() { var total = 0; $(inputs).filter(':checked').each(function() { var value = ($(this).val()).match(/\$([0-9]*)/)[1]; total = total + parseInt(value); }) $('#total').html('$' + total); $('#deposit').html('$' + (total / 2)); $('#balance').html('$' + (total / 2)); $('#RYSTotal').val('$' + total); $('#RYSDA').val('$' + (total / 2)); $('#RYSBA').val('$' + (total / 2)); }); $('input[name="RYSYFS"]').click(function() { $(this).blur(); $('#RYSTS1').val($(this).val()); }) $('input[name="RYSSPT"').click(function() { $(this).blur(); $('#RYSSP').val($(this).val()); }) $('input[name="RYSEP"').click(function() { $(this).blur(); $('#RYSEP').val($(this).val()); }) }); &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/42003869
has comment: http://stackoverflow.com/comment/41812785
has comment: http://stackoverflow.com/comment/41812368
has comment: http://stackoverflow.com/comment/41812462
score: 0
has comment: http://stackoverflow.com/comment/41812861
has comment: http://stackoverflow.com/comment/41812738
has comment: http://stackoverflow.com/comment/41812889
has comment: http://stackoverflow.com/comment/41812679
has comment: http://stackoverflow.com/comment/41996832

http://stackoverflow.com/comment/41931175
type: QuestionComment
comment on: http://stackoverflow.com/q/26664441
has text: and the input is still shown on the page
score: 0
type: Comment

http://stackoverflow.com/comment/41915573
has text: No problem. Cna you alter the way these are randomly generated? You have duplicate IDs on your page
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26656430

http://stackoverflow.com/q/26572889
answer count: 1
has answer: http://stackoverflow.com/a/26961404
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: Knob.js - Is there a way to link up dials so that they have a combined total?
downvote count: 0
score: 1
has body: I'm using the latest jQuery Knob.js and wondered if there is a way to link up 3 dials so that each value changes on "change" in order for the combined total to never go over 100%? Initially all 3 dials are set to 33%. if a user changes one of the dial the other 2 should increase or decrease to equate to 100 in total.
tagged with: jquery-knob
favorite count: 0
type: Question
upvote count: 1

http://stackoverflow.com/a/26609394
accepted answer of: http://stackoverflow.com/q/26557215
answers question: http://stackoverflow.com/q/26557215
score: 1
upvote count: 1
has body: Okay so the thing that I was doing wrong was that I was using JSON and trying to access it as an array. $("#etlTable").DataTable({ "dom": '&lt;"top"iflp&lt;"clear"&gt;&gt;rt&lt;"bottom"iflp&lt;"clear"&gt;&gt;', "iDisplayLength": 100, "ordering": false, "autowidth": true, "columns": [{ "data": "file_name","class": "nowrap" }, { "data": "start_time", "class": "nowrap" }, { "data": "end_time"}, { "data": "duration"}, { "data": "outcome", "class": "chk"}, { "data": "client_name" }, { "data": "details" } ], "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { if (aData[4] == "Fail") { $(nRow).children().each(function (index, td) { $(this).addClass('res'); }); } } }); because it is an array, and they have an alias, I had to do this instead: "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { if (aData['outcome'] == "Fail") { $(nRow).addClass('highlight'); $(nRow).css('background-color', '#FFFF00'); } console.log(aData['outcome']); } Notice this part here: aData['outcome'] to find this I had to add this: console.log(aData['outcome']); It now works brilliantly.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41877942
score: 0
type: Comment
type: QuestionComment
has text: $row 1, 2, and 3 are the first middle and last names of a particular client. There are numerous clients. I only want to populate the form with the data of a particular client (the one whose link is clicked). Im going to add a screenshot for clarity.
comment on: http://stackoverflow.com/q/26634706

http://stackoverflow.com/a/26656440
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26655713
has body: The simplest solution is to add pointer-events:none; to the text class. This makes the text div ignored by the hover listener and the event goes through it. http://jsfiddle.net/fqn55yfs/4/ This means you can't select the text though. If you need user-interaction with the text, then use friedi's answer.

http://stackoverflow.com/a/26590869
has body: When adding the shortcut handler you know which textarea the handler is being added to so you could do: $('textarea[name="test01"]').sceditor('instance').addShortcut('ctrl+enter', function () { submitform($('textarea[name="test01"]').get(0).form); }); function submitform(form) { console.log(form.id); } Working example: http://jsfiddle.net/5jc6f589/
type: Answer
has comment: http://stackoverflow.com/comment/41797720
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26589767
answers question: http://stackoverflow.com/q/26589767
has comment: http://stackoverflow.com/comment/41797838
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41888346
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26640615
type: QuestionComment
has text: Would it not be simpler to have a regular css file with the different styles given different classes, then only change the class according to scroll, rather than all of the styles? It would avoid the strangeness of altering a background image through JavaScript.

http://stackoverflow.com/comment/41955012
comment on: http://stackoverflow.com/a/26648837
score: 0
has text: Actually I figured out a solution. I placed my script in a template that was inheriting my current template. That gave the script enough time to load before the next script ran and solved all my problems.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41802716
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26593165
has text: According to the current API docs (and in my experience), if you don't specify an encoding when you call `.readFileSync()` then you get a buffer. If you do specify an encoding, you get a string.
score: 0

http://stackoverflow.com/q/26585899
linked to: http://stackoverflow.com/q/16484884
type: Question
has comment: http://stackoverflow.com/comment/41787143
has title: Find out how many days till next birthday and previous birthday - javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/41787214
duplicate of: http://stackoverflow.com/q/16484884
score: 0
tagged with: datetime
has body: I am trying to find out how many days until there next birthday aswell as when there last one was. So far I have tried just seeing if todays day is the same as the one they inputted Basically I have a form that the user gives there Date of birth, I then want to find out how many days until there next birthday will be, as well as when there last birthday was. I can't find anything on the internet. here is what i've tried so far. var userInput = new Date(document.getElementById('selDay').value, document.getElementById('selMonth').value); var today = new Date(bdate.getDay(),bdate.getMonth()); if(userInput == today) { alert('Birthday Today'); } var untilBirthday = ''; var sinceBirthday = ''; I cannot get it too even show if the userInput is the same as todays day
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26530413
tagged with: javascript
has comment: http://stackoverflow.com/comment/41689353
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26530723
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41687563
has title: ASP.NET MVC - Print out application root
type: Question
has body: I am trying to get the path to my application root in an ASP.NET MVC app. I need that path in a dom element I can reach in JavaScript. Currently, I have the following: &lt;link rel="home" id="ApplicationRoot" href="@(~)" /&gt; That generates an error that says: CS1525: Invalid expression term ',' I don't know why. Either way, how do I get the application root path put in the href value of the link element? Thank you
tagged with: asp.net-mvc

http://stackoverflow.com/comment/42082337
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26555337
has text: What is baseUrl ? is that another service ? I don't understand why you are creating 2 methods in this.post if you are only using one. I would suggest another approach, have you consider to create a factory and return a resource class ? The way this is now is creating instance each time you call each method

http://stackoverflow.com/comment/41763077
comment on: http://stackoverflow.com/a/26561674
score: 0
type: AnswerComment
type: Comment
has text: @gstackoverflow: [MomentJS](http://momentjs.com) is probably the most flexible, actively-developed date library for JavaScript at the moment. It has significant parsing abilities.

http://stackoverflow.com/a/26614890
answers question: http://stackoverflow.com/q/26614646
type: Answer
has body: you could just go through the files one at a time. var index = 0; $("#result").on("click", function(){ Search_file("&lt;?php echo addslashes(realpath($row["movies_dir"]))?&gt;"+"\\"+files[index]); index++; }); the idea is every time you click result's div it will load the next file. I didn't include code to check limit, and things like that.
score: 0

http://stackoverflow.com/comment/41884021
type: Comment
has text: Well yes, but if understand this correctly, you have to provide your own design to the colorpicker, in this case you just simply copy the example.
comment on: http://stackoverflow.com/a/26638344
type: AnswerComment
score: 0

http://stackoverflow.com/a/26517686
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26517643
downvote count: 0
has body: Since you included the jQuery tag, here's a jQuery solution. As long as you're using jQuery 1.x, IE8 support is included. $('#myselect option').each( function() { $(this).prop('disabled', true).appendTo('#newselect'); } ); Red Orange Yellow Green Blue
answers question: http://stackoverflow.com/q/26517643
type: Answer
score: 3

http://stackoverflow.com/q/26646302
has comment: http://stackoverflow.com/comment/41897975
has body: For every word that is entered into the text box I want to add a "-" before each word except for words like "is" and "was". $('#WhatTextBox').keyup(function() { var word_check = $('#WhatTextBox').val(); if(!word_check.match('is') OR !word_check.match(' ')) { $('#special'("-"+$('#WhatTextBox').val()); } What am I missing here?
has title: Add "-" for every word - javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41898063
has comment: http://stackoverflow.com/comment/41897934
has comment: http://stackoverflow.com/comment/41897993
has comment: http://stackoverflow.com/comment/41898170
has comment: http://stackoverflow.com/comment/41898021
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26646569
upvote count: 1
has comment: http://stackoverflow.com/comment/41897960
type: Question
has comment: http://stackoverflow.com/comment/41898053
has comment: http://stackoverflow.com/comment/41898665
has answer: http://stackoverflow.com/a/26647273
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26646397
has comment: http://stackoverflow.com/comment/41898085
accepted answer: http://stackoverflow.com/a/26646569
has comment: http://stackoverflow.com/comment/41898328
answer count: 3
has answer: http://stackoverflow.com/a/26646397
downvote count: 0

http://stackoverflow.com/comment/41826557
type: Comment
type: QuestionComment
has text: Can't you just add (Or at least more of it) here? It gives the whole thing much more context....?
comment on: http://stackoverflow.com/q/26607084
score: 0

http://stackoverflow.com/q/26571345
has answer: http://stackoverflow.com/a/26571958
has title: How to implement animated images/icons on a website?
score: 0
tagged with: web
possible better answer: http://stackoverflow.com/a/26571397
tagged with: animation
accepted answer: http://stackoverflow.com/a/26571958
has answer: http://stackoverflow.com/a/26571397
type: AnsweredQuestion
has body: I want to build a website with animated images, like the one in dropbox homepage: https://www.dropbox.com/ Another example is the intro images in treehouse homepage: http://teamtreehouse.com/ I think maybe I can use javascript and jQuery to dynamically change the images and their positions, but I am not sure. I wonder if there is any library or technology available to implement this kind of animation?
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

gwtp
tags question: http://stackoverflow.com/q/26595872
type: Tag
tag name: gwtp

http://stackoverflow.com/comment/41660291
has text: When you debug this, where exactly does it fail? Are any elements found? Are they the elements you expect? Is their styling being updated in the DOM? Is something else making them not be visible?
comment on: http://stackoverflow.com/q/26515147
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/26519823
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26519847
has title: Print specific elements on page?
has comment: http://stackoverflow.com/comment/41797058
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26519847
has comment: http://stackoverflow.com/comment/41767039
type: Question
has body: I'm looking to print specific text elements of a page. I currently have 10 cards on a single page and when a user chooses to print a specific card, I only want the chosen card to print. I was using javascript:window.print(), but found that it prints all the cards. However I found a snippet of code (below) that does what I want, but strips off the logo. I've try adding document.getElementById('logo') but it doesn't work. Not sure how to add the logo as a printable area as well. Is there a jQuery method as well that could handle this without using a plugin? HTML Text Print Text Print Text Print JS function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; }
tagged with: javascript
has comment: http://stackoverflow.com/comment/41669133

jquery-ui
tags question: http://stackoverflow.com/q/26629537
tags question: http://stackoverflow.com/q/26598229
tags question: http://stackoverflow.com/q/26629094
tags question: http://stackoverflow.com/q/26519854
tags question: http://stackoverflow.com/q/26663915
tags question: http://stackoverflow.com/q/26555606
tags question: http://stackoverflow.com/q/26587709
tags question: http://stackoverflow.com/q/26631850
tags question: http://stackoverflow.com/q/26672241
tags question: http://stackoverflow.com/q/26671973
tags question: http://stackoverflow.com/q/26630567
tags question: http://stackoverflow.com/q/26557944
tags question: http://stackoverflow.com/q/26664566
tags question: http://stackoverflow.com/q/26529225
tags question: http://stackoverflow.com/q/26529244
tags question: http://stackoverflow.com/q/26590182
tags question: http://stackoverflow.com/q/26610683
tags question: http://stackoverflow.com/q/26610342
tags question: http://stackoverflow.com/q/26609777
tags question: http://stackoverflow.com/q/26662440
tags question: http://stackoverflow.com/q/26557093
tags question: http://stackoverflow.com/q/26534679
tags question: http://stackoverflow.com/q/26654612
tags question: http://stackoverflow.com/q/26579899
tags question: http://stackoverflow.com/q/26589508
tags question: http://stackoverflow.com/q/26529684
tags question: http://stackoverflow.com/q/26598220
tags question: http://stackoverflow.com/q/26525777
tags question: http://stackoverflow.com/q/26660914
tags question: http://stackoverflow.com/q/26548669
tags question: http://stackoverflow.com/q/26522558
tags question: http://stackoverflow.com/q/26620243
tags question: http://stackoverflow.com/q/26635205
tags question: http://stackoverflow.com/q/26636873
tags question: http://stackoverflow.com/q/26576346
tags question: http://stackoverflow.com/q/26589944
tags question: http://stackoverflow.com/q/26515516
tags question: http://stackoverflow.com/q/26671054
tags question: http://stackoverflow.com/q/26573573
type: Tag
tags question: http://stackoverflow.com/q/26638551
tag name: jquery-ui
tags question: http://stackoverflow.com/q/26566768
tags question: http://stackoverflow.com/q/26591513
tags question: http://stackoverflow.com/q/26603028
tags question: http://stackoverflow.com/q/26561897
tags question: http://stackoverflow.com/q/26659316
tags question: http://stackoverflow.com/q/26571463

http://stackoverflow.com/q/26553195
has title: HTML 4.01 Validation double quotation marks issue
tagged with: css
has body: I'm trying to validate successfully an html page with elements created dynamically but I get the following error from the HTML 4.01 Strict validator: ".." is not a member of a group specified for any attribute Referring to the two dots in the url specified as background: &lt;div onclick="startGame();" style="background: url("../media/backgrounds/lev0.png") repeat scroll 0% 0% transparent;" id="gamewindow"&gt;&lt;/div&gt; Apparently the validator thinks the " after url( to be the end of the style attribute and in such manner gives me the error and two following still related to this issue. The main problem is that the inline style attribute is defined via javascript and I cannot change the double quotation marks to a single ' since it is done in automatic. I modified the code in the Direct Input field of the validator replacing " with ' and it worked well without any errors. Any ideas of how to solve this would be very much appreciated.
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/41743831
downvote count: 1
has comment: http://stackoverflow.com/comment/41744439
type: Question
has comment: http://stackoverflow.com/comment/41742289
tagged with: javascript
has comment: http://stackoverflow.com/comment/41728471
tagged with: validation
has comment: http://stackoverflow.com/comment/41746487
has answer: http://stackoverflow.com/a/26561297
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26571901
type: Answer
answers question: http://stackoverflow.com/q/26571829
score: 2
downvote count: 0
has body: Try this.. cart = $(this).parents("table").find('.info').text(); instead of cart=$(".info").text();
upvote count: 2

http://stackoverflow.com/comment/85866248
type: QuestionComment
comment on: http://stackoverflow.com/q/26630650
has text: possible duplicate https://stackoverflow.com/questions/23713982/detecting-404-code-in-javascript
score: 0
type: Comment

http://stackoverflow.com/comment/41916520
type: QuestionComment
has text: 1 million rep pts for you, Lars! Thanks; all fixed. I hope this is a useful question for others. I looked far and wide for something similar and didn't find anything.
comment on: http://stackoverflow.com/q/26652777
score: 0
type: Comment

http://stackoverflow.com/comment/41800101
score: 0
has text: @KevinB To the best of my knowledge it creates a new document/window.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26592535

http://stackoverflow.com/q/26633987
upvote count: 1
has title: Why is parseFromString resulting in [object HTMLUnknownElement]?
has comment: http://stackoverflow.com/comment/41875697
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26653812
answer count: 1
has body: I have the following lines of code: ... var parser = new DOMParser(); //create a new DOMParser var doc = parser.parseFromString(mattes_get_mattes_xml(), "application/xml"); //convert the string to xml console.log(mattes_get_mattes_xml()); console.log(doc); ... The first output statement, console.log(mattes_get_mattes_xml());, results in the following: 11852997eab43ff5c7b1803692bee608 0 4208 <id/> 11852997eab43ff5c7b1803692bee608 0.5 12 4208 <id/> The second output statement, console.log(doc);, results in the following: I'm not sure what is wrong with the first element that it isn't parsing correctly.
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/comment/41934694
score: 0
type: Comment
type: QuestionComment
has text: @Nit is there a better way to implement an array equals function? The method I used from the SO post I reference seems to be the most common one I could find.
comment on: http://stackoverflow.com/q/26666513

http://stackoverflow.com/a/26593714
answers question: http://stackoverflow.com/q/26593481
type: Answer
accepted answer of: http://stackoverflow.com/q/26593481
has comment: http://stackoverflow.com/comment/41802371
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41802270
type: AcceptedAnswer
downvote count: 0
has body: You can change the HTML title and head elements on a per-view basis by using angularjs-viewhead. here how to use it. put the angularjs-viewhead.js in your asset folder Declare as a dependency of your application as normal var app = angular.module('myApp', ['ng', 'viewhead']); This sort of setup can be achieved in an AngularJS application using the view-title directive. First, set up your title element to bind to the special scope variable viewTitle, which will be set when a tilted view is instantiated: FooBaz With this in place, add to each view's template a single view-title element setting the view's title: About

http://stackoverflow.com/a/26656423
has comment: http://stackoverflow.com/comment/41939746
accepted answer of: http://stackoverflow.com/q/26582809
answers question: http://stackoverflow.com/q/26582809
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Remove "stroke-linecap" and/or "stroke-linejoin".
downvote count: 0
score: 1

http://stackoverflow.com/q/26539431
tagged with: javascript
upvote count: 2
has title: PapaParse not working (returns empty array)
answer count: 1
favorite count: 0
tagged with: papaparse
tagged with: http://stackoverflow.com/tag/csv
linked to: http://stackoverflow.com/q/49752889
has comment: http://stackoverflow.com/comment/94767526
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26559746
accepted answer: http://stackoverflow.com/a/26559746
has body: I am trying to parse a variant of this file (instead of using tab as delimiter I am using a file that has comma as delimiter) https://github.com/materechm/Schizophrenia/blob/master/GWAS.txt This is my code, but I am getting an empty array and no errors var csv = Papa.parse('GWAS.csv', { delimiter: ",", header: true, comments: false, complete: function(results) { console.log(results); } });
type: Question

http://stackoverflow.com/comment/103132981
score: 0
type: AnswerComment
has text: Perfect. Saved my day Jon - many thanks. Just adding URL and Data does not work. It NEEDs these three top be added - as Jon specifies 'type': 'GET', 'dataType': 'json', 'contentType':'application/json',
type: Comment
comment on: http://stackoverflow.com/a/26764206

http://stackoverflow.com/q/26649538
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41916236
type: Question
has answer: http://stackoverflow.com/a/26653036
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
score: 0
has body: In my application - I make an AJAX call to fetch image/binary data. Question is how to set "application/octet-stream" as content type when making fetch() from my model ? My Model -- I cant change fetch of "BLA" defined. How to set the CONTENT TYPE through my model ? define(function(require) { var bla= require("bla"); return BLA.Model.extend({ __name__: 'xyz', url: function() { console.log(this.attributes); return SOME_URL + this.get('someAttribute'); }, initialize: function(options) { this.options = options; this.promise = this.fetch(options); } }); });
has title: BackBone js - How to set contentType when making AJAX Call?

http://stackoverflow.com/q/26547527
has answer: http://stackoverflow.com/a/26547630
has title: Opposite of jQuery .parents() selector
score: 1
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26547630
duplicate of: http://stackoverflow.com/q/7258606
has answer: http://stackoverflow.com/a/26547549
tagged with: javascript
tagged with: jquery
answer count: 2
has body: I'm making an userscript for a page. The page is old-school tables-everywhere design. I'm trying to access long table of fields so that they can be filled by script. The structure can be simplified to be like this: So I was thinking I could get aAll tables that are in form table but do NOT contain . I think oposite of the parents selector in jQuery would be ideal. Does something like this exist?
downvote count: 0
linked to: http://stackoverflow.com/q/7258606
favorite count: 0
accepted answer: http://stackoverflow.com/a/26547549
type: AnsweredQuestion

http://stackoverflow.com/a/26583071
has comment: http://stackoverflow.com/comment/41782332
score: 0
has body: Add event handler to change event of text boxes and compare values. &lt;script language="javascript" type="text/javascript"&gt; var bal=''; var days=''; $(document).ready(function () { $( "#txtbalance" ).change(function() { bal=$(this).val(); return compare(bal,days); }); $( "#txtdays" ).change(function() { bal=$(this).val(); return compare(bal,days); }); }); function(bal,days) { if(bal!='' &amp;&amp; days!='' &amp;&amp; parseInt(bal)&lt;parseInt(days)) { alert("u cant apply"); return false; } return true; } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/26582833

http://stackoverflow.com/a/26554734
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26553831
has body: Here is what your setup should look like. function getCompanyInfo(companyName) { return $.post("ajax/companyInfo.php", { company: companyName }).then(function (rawData) { return rawData.split("/"); }); } $('#next1').on('click', function() { var companyName = $(this).closest('.inside').find('select').val(); resizeall($(this), 200, 100); getCompanyInfo(companyName).done(function (array) { console.log(array); // everything else you want to do with the array goes here }); }); Read up on jQuery Deferreds to find out what .then() and .done() do. Final tip: If you want to update data on the server, use a POST request. If you want to fetch information from the server, use a GET request. The .post() in my code above is there because you used it in your code. It's semantically wrong and you really should change it to .get().

http://stackoverflow.com/q/26535727
has title: Sails.js/Waterline populate deep nested association
has answer: http://stackoverflow.com/a/26973731
has answer: http://stackoverflow.com/a/32219468
upvote count: 11
linked to: http://stackoverflow.com/q/23446484
score: 11
type: Question
type: AnsweredQuestion
tagged with: sails.js
possible better answer: http://stackoverflow.com/a/26973731
tagged with: waterline
has body: I understand that there is no built-in way in Sails.js/Waterline of populating deep nested associations yet, so I am trying to use bluebird promises to accomplish that but I'm running into a problem. I'm successfully retrieving the user, and all the posts (populated with the images collection) associated with it (console.log shows me that everything is filled properly). However, when I override the property "post" of the user and try to assign the fully populated posts retrieved before, it does not fill properly the images property of Post.js. It is like the ORM is preventing the image collection of Post.js to be manually assigned. What am I doing wrong? What is the best way of populating deep nested one-to-many associations? Bellow I've pasted all the code that I'm executing.... // Populate nested association nested: function (req, res, next){ var username = req.param("id"); User .findOneByUsername(username) .populateAll() .then(function (user){ var posts = Post.find({ "user": user.id }) .populate('images') .populate('category') .then(function (posts){ return posts; }); return [user, posts]; }) .spread(function (user, posts){ user.posts = posts; // This won't work.... It assigns all the fields properly but the images collection attribute res.json(user); }).catch(function (err){ if (err) return res.serverError(err); }); } // --- User.js Model --- // module.exports = { attributes: { ....., posts: { collection: "post", via: "user" }, ..... } } // --- Post.js Model --- // module.exports = { attributes: { ...., user: { model: "user" }, images: { collection: "postImage", via: "post" }, .... } } // --- PostImage.js Model --- // module.exports = { attributes: { ...., post: { model: "post" } }, } Regards, Sávio Lucena
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/32219468
favorite count: 0

http://stackoverflow.com/a/26545400
has body: HTML and CSS are strange things. It seems that the rule "width > height" in action
answers question: http://stackoverflow.com/q/26544185
type: Answer
score: 0

http://stackoverflow.com/comment/41744852
type: Comment
comment on: http://stackoverflow.com/a/26552348
has text: i realized that the *schema assignment* is very handy too.. in my usecase most schemas do not allow multiple possible schema for one property. i'm trying to integrate `tv4` (or maybe `json-schema`) in angularjs directives, so i wish the controller to lookup for the schema of the property, knowing the property path..
type: AnswerComment
score: 0

http://stackoverflow.com/a/26583926
answers question: http://stackoverflow.com/q/26583753
score: 2
downvote count: 0
has body: I've made a working fiddle for you. I've basicly changed the JavaScript a bit and I assume you have included jquery... $('document').ready(function(){ SaveData = function(){ var data = $("#inputToDo").val(); alert(data); } } Here's the Fiddle
upvote count: 2
type: Answer

http://stackoverflow.com/comment/41788841
has text: Yes, I certainly did this. Thanks again. Do you think it's a bug in ng-grid and should be posted as an issue?
comment on: http://stackoverflow.com/q/26536362
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26546294
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/41716986
favorite count: 0
tagged with: actionscript-3
type: Question
has comment: http://stackoverflow.com/comment/41719515
accepted answer: http://stackoverflow.com/a/26548638
has comment: http://stackoverflow.com/comment/41716662
has comment: http://stackoverflow.com/comment/41719429
upvote count: 2
answer count: 1
downvote count: 1
has title: JavaScript onClick function to trigger ActionsScript3 Event
has comment: http://stackoverflow.com/comment/41717122
tagged with: javascript
has comment: http://stackoverflow.com/comment/41716517
tagged with: externalinterface
tagged with: actionscript
has answer: http://stackoverflow.com/a/26548638
has comment: http://stackoverflow.com/comment/41716079
has comment: http://stackoverflow.com/comment/41716337
has comment: http://stackoverflow.com/comment/41715809
has body: Before I begin I will explain that I am relatively new to ActionScript, also newish to JavaScript but have a handle on what I can/need to do. I have done some hunting online to find out what is needed to do this, however I am not 100% sure on how to do it. The only tutorials I am able to find are about sending text from one to the other and vice versa. What I am trying to achieve: [JavaScript] HTML element is clicked. [ActionScript] Performs an Event and passes Boolean back to JavaScript on success/error. [JavaScript] Dependent on true/false will have methods in place to continue. I am NOT asking you to do this for me, however if you know of any good documentation/tutorials that you can point me to I would appreciate it. I am wanting to learn how to do this, not get shown/told how to do it. Tutorials I have already read: tuts+ circlecube AGAIN thanks for any help / useful links that come my way :)
type: AnsweredQuestion

angular-ui-bootstrap-tab
tags question: http://stackoverflow.com/q/26570653
type: Tag
tag name: angular-ui-bootstrap-tab

http://stackoverflow.com/q/26647758
possible better answer: http://stackoverflow.com/a/26647995
type: Question
has answer: http://stackoverflow.com/a/26647995
has comment: http://stackoverflow.com/comment/41900324
linked to: http://stackoverflow.com/q/11899622
has comment: http://stackoverflow.com/comment/41903637
tagged with: asp.net-mvc
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has body: I find many times the pages use "a" tag and want to make it like a button. it's something like this: I'm confusing about why not just use "button" tag? like this: button what is the difference between? I really want to learn it, thanks! One more situation question: Three "button-like < a > tag" as below: Hint: Different one call ajax then get different period record Need to use onclick="location.replace()" because back to last page smoothly. Original code: Today I have changed to: Today Consider about: Today What will you do in this situation? Is any incorrect to use button tag ?
has answer: http://stackoverflow.com/a/26648241
upvote count: 6
has comment: http://stackoverflow.com/comment/41900487
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42147596
has title: what is the difference between and
accepted answer: http://stackoverflow.com/a/26648241
score: 6

http://stackoverflow.com/a/26576072
score: 0
answers question: http://stackoverflow.com/q/26562559
type: Answer
has body: I agree with the comment to use scopes - but there are a couple of quick and dirty ways... when you instantiate myViewModel - you could instantiate it on the window - and then reference it directly window.myViewInstance = new myViewModel() function myOtherViewModel () { this.propA = myViewInstance.xyz } I use this method when I have something that provides global functionality that I want to use elsewhere. Its what jQuery and ko do... bind $ and ko to the window. if myViewModel.xyz = ko.observable() then passing it without parens passes it as an observable - which will change as its value changes. With the parens will pass the result at the time it is evaluated. Alternatively - you can reference it using ko.dataFor like this. myViewModel () {...} instance = new myViewModel ko.applyBindings(instance, $('div')[0]) // this applies bindings of myViewModel to the first div on the page only myOtherViewModel () { this.propA = ko.dataFor($('div')[0]) // passes the entire object this.propB = ko.dataFor($('div')[0]).xyz // gives you just one property } Which would scope your object to just a part of the page
has comment: http://stackoverflow.com/comment/42018096

http://stackoverflow.com/comment/41744236
comment on: http://stackoverflow.com/q/26562028
score: 1
type: Comment
type: QuestionComment
has text: In PHP if you __file_put_contents()__ in non-existing directory.. it is created by default.

http://stackoverflow.com/a/26597000
downvote count: 0
upvote count: 2
has body: As stated in the MDN Docs, and here I quote, The operands of all bitwise operators are converted to signed 32-bit integers in two's complement format. This means tha when you apply a bitwise operator, for instance ~, to 2.1 it is first converted to an integer, and only then is the operator applied. This effectively achieves the rounding down (floor) effect for positive numbers. As to why these operators are used, instead of the much nicer to grasp Math.floor, there are two main reasons. For one, these operators may be considerably faster to achieve the same result. Besides performance, some people just want the shortest code possible. All three operators you mentioned achieve the same effect, but ~~ just happens to be the shortest, and arguably the easiest to remember. Given that the float to integer conversion happens before the bitwise operators are applied, let's see what happens with ~~. I'll represent our target number (2, after the convertion from 2.1) using 8 bits, instead of 32, for shortness. 2: 0000 0010 ~2: 1111 1101 (-3) ~~2: 0000 0010 So, you see, we apply an operator to retrieve only the integer part, but we can't apply only one bitwise not, because it would mess up the result. We revert it to the desired value applying the second operator. Regarding your last example, take into account that the number you're testing with, 2e+21, is a relatively big number. It's a 2 followed by twenty-one zeroes. It simply doesn't fit as a 32-bit integer (the data-type it is being converted to, when you apply the bitwise operators). Just look at the difference between your number and what a 32-bit signed integer can represent. Max. Integer: 2147483647 2e+21: 2000000000000000000000 How about binary? Max. Integer: 01111111111111111111111111111111 2e+21: 11011000110101110010011010110111000101110111101010000000000000000000000 Quite big, huh? What really happens under the hood is that Javascript is truncating your big number to what it can represent in 32 bits. 110110001101…
type: Answer
answers question: http://stackoverflow.com/q/26595947
score: 2

http://stackoverflow.com/a/26623368
type: Answer
has body: Assuming that you want to convert a string into an element, you can use RegEx to do this: "toElement": function () { var string = '&lt;div id="cardId" class="card c9"&gt;&lt;/div&gt;' var e = /&lt;(.+?)\s/g.exec(string)[1]; var id = /id="(.+?)"/g.exec(string)[1]; var cls = /class="(.+?)"/g.exec(string)[1]; var element = document.createElement(e); element.hash = id; element.className = cls; }
answers question: http://stackoverflow.com/q/26623150
score: 0

http://stackoverflow.com/q/26632476
accepted answer: http://stackoverflow.com/a/26632498
upvote count: 1
has comment: http://stackoverflow.com/comment/41872954
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/161738
type: AnsweredQuestion
has title: Regular expression failed in URL address test
tagged with: regex
score: 1
has answer: http://stackoverflow.com/a/26632498
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41873349
answer count: 1
has body: I try to build an Regular expression to check valid URL address. for now I tested different address and all was good , but those next (valid) address's failed: url = "http://example.com/tr/vvf/index.php/docs/po/trf" //url = "http://example-a.mydomain.com/test/ny" also not working var pattern = new RegExp("(https|ftp|http)://[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;amp;:/~+#-]*[\w@?^=%&amp;amp;/~+#-])?"); pattern.test(url) I think because of the index.php/doc... Any ideas how to fix it

http://stackoverflow.com/a/26571477
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26571443
answers question: http://stackoverflow.com/q/26571443
type: Answer
has body: You need confirm var bro = confirm("Bro, do you even javascript?"); alert("you selected " + bro); It returns a boolean after the user selects his or her choice. It is a blocking function, use wisely :)
downvote count: 0

http://stackoverflow.com/q/26577396
has body: im trying to rotate an arm, when i click on the upperarm it rotates 12 degrees. How do i also rotate the lower arm the same way so that its attached to the upper arm. i have set an offset in both images which is the point of rotation. Can anyone help. I guess i need to transform both points of rotation by the same amount? any help would be great. &lt;script src="http://d3lp1msu2r81bx.cloudfront.net/kjs/js/lib/kinetic-v5.0.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; function loadImages(sources, callback) { var images = {}; var loadedImages = 0; var numImages = 0; for(var src in sources) { numImages++; } for(var src in sources) { images[src] = new Image(); images[src].onload = function() { if(++loadedImages &gt;= numImages) { callback(images); } }; images[src].src = sources[src]; } } function initStage(images) { var stage = new Kinetic.Stage({ container: 'container', width: 1600, height: 1200 }); //body var bodyGroup = new Kinetic.Group({ x: 0, y: 0, draggable: false }); //arm var armGroup = new Kinetic.Group({ x: 0, y: 0, draggable: false }); var layer = new Kinetic.Layer(); /* * go ahead and add the groups * to the layer and the layer to the * stage so that the groups have knowledge * of its layer and stage */ layer.add(bodyGroup); layer.add(armGroup); stage.add(layer); //********************************************************** //body image //bodyImg=createNewKineticImage(0,0,images.body); //********************************************************** //ARM //START POINT //********************************************************** upperArmX=800; upperArmY=600; //********************************************************** //upperarm //********************************************************** var upperArmImg=createNewKineticImage(upperArmX,upperArmY,images.upperarm); upperArmImg.offsetX(upperArmImg.width()); upperArmImg.offsetY(upperArmImg.height()/2); //********************************************************** //******************************************************…
tagged with: kineticjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41777160
has title: Rotating two images joined together like an arm
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/41777356
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41773868
tagged with: html5-canvas

http://stackoverflow.com/a/26627061
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26624367
has body: Add the following Style in your CSS. #select-choice-year{font-size:15px;} FIDDLE DEMO
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/26624367

http://stackoverflow.com/a/26573416
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26573069
has comment: http://stackoverflow.com/comment/41764644
answers question: http://stackoverflow.com/q/26573069
type: Answer
score: 2
downvote count: 0
has body: Field Type should be multiselectddl Make sure you are using the jTable files available in this repository https://github.com/stanleyta/jtable/commit/6876303615a239dc409dee481a877a8f934f340d
has comment: http://stackoverflow.com/comment/41764577
has comment: http://stackoverflow.com/comment/103186915
has comment: http://stackoverflow.com/comment/103180182

linechart
tag name: linechart
type: Tag
tags question: http://stackoverflow.com/q/26624430

http://stackoverflow.com/q/26514111
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26514328
has answer: http://stackoverflow.com/a/26514159
has answer: http://stackoverflow.com/a/26514194
upvote count: 3
has answer: http://stackoverflow.com/a/26514196
type: Question
has answer: http://stackoverflow.com/a/26514276
possible better answer: http://stackoverflow.com/a/26514194
has title: how to get "year" from string values in jquery or javascript?
tagged with: javascript
answer count: 6
accepted answer: http://stackoverflow.com/a/26514159
has answer: http://stackoverflow.com/a/26514422
score: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has body: i got the string like this : string1 = "Feb 2010 " string2 = "On Going" string3 = "may 1990 " string4 = "jun 1990 " string5 = "On Going " i am trying to write one funcation like this : function getyear(val) { return val; } so if i pass string1 , it should give me "2010", and if pass string2 ,it should be give me "Now", how it possible using jquery? or java script?

http://stackoverflow.com/comment/41911289
type: QuestionComment
score: 1
has text: I think you can use this: http://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript
comment on: http://stackoverflow.com/q/26654196
type: Comment

http://stackoverflow.com/a/26520591
accepted answer of: http://stackoverflow.com/q/26519854
downvote count: 0
answers question: http://stackoverflow.com/q/26519854
has body: Assuming you are using jQuery UI Sortable: $('.sorted_table').children("tbody").sortable({ stop: function (event, ui) { countRows(); // re-number rows after sorting } }); jsFiddle demo here: http://jsfiddle.net/7vmf1c4L/
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/41743297
score: 0
type: AnswerComment
has text: But you can also use new Date(dateString);
comment on: http://stackoverflow.com/a/26561492
type: Comment

http://stackoverflow.com/a/26555946
score: 2
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/26555848
has body: You would use an XMLHttpRequest function dialResponse() { console.log(this.responseText);//should be return value of 1 } var oReq = new XMLHttpRequest(); oReq.onload = dialResponse; oReq.open("get", "http://admin:password@192.168.0.20/cgi-bin/ConfigManApp.com?Id=34&amp;Command=1&amp;Number=0123456789", true); oReq.send(); This will be semi-hidden. However, it is still issued client side so they will see it occur in the network record. If you want this to be truly hidden, you would have to do it server side.

http://stackoverflow.com/q/26515712
has title: Can dynamically loaded functions finish writing the page that dynamically loaded them
has comment: http://stackoverflow.com/comment/41662118
has answer: http://stackoverflow.com/a/26516110
downvote count: 1
has answer: http://stackoverflow.com/a/26539276
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/41703530
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/41663516
has body: Please Help. Question: Can I dynamically load a JS file (/scripts/banner.js) and then use one of its functions -- writeBanner(document, t1, t2, t3) -- to finish writing the page? I've read till my eyes bleed, but: -- Every example I find assumes the reader will call a function AFTER the page is rendered, and -- Every example assumes blocking is bad. Unfortunately: -- I need to call the functions in order to finish writing the page that loaded them, and -- Blocking is not a problem. The app is deployed as an EAR file, so no JS files need thereafter be downloaded from anywhere else. Why try to do this? The initial window ("TAPP") loads a dozen functions from 6 JS files. All pages use them to write HTML in the page's body element that displays a consistent banner with up to 3 paramaterized title lines. Level-1 Pages: These are opened in the initial ("TAPP") window by each other. It already has all functions loaded – works perfectly. Level-2 pages: These are opened in pop-up windows opened by level-1 pages. They use "this.opener", i.e. "TAPP" to call those functions – works perfectly. Now I want to be able to open Level-2 pages both -- as pop-ups from a level-2 page, AND -- as free standing pages. NOTE: All level-2 pages.jsp being with this include to write the HEAD element: &lt;%@ include file='/jsp-pages/level-2/headers/beg.jsp' %&gt; That way I only need to deal with scripting for all of them, in one place, at one time. First Step: I added this code to beg.jsp: &lt;script language="javascript"&gt; var SH = ""; if (this.opener &amp;&amp; this.opener.name == "TAPP") { SH = this.opener; // TAPP has all required functions } else { //Dynamically add the required &lt;script&gt; elements /************************************/ // see code I tried below /************************************/ SH = this; // "this" now has all the functions TAPP has // alert ("Opener is NOT TAPP: " + SH); } // All pages can now call SH.writeBanner(document, t1,t2, t3) with their own titles &lt;/…
favorite count: 0
has comment: http://stackoverflow.com/comment/41667047
type: UnansweredQuestion

http://stackoverflow.com/comment/41879608
has text: @user3467855: Example updated to convert the string to a numeric value and do match checks like `< 200` etc. Numeric matches will be faster (for many values).
type: Comment
comment on: http://stackoverflow.com/a/26635757
score: 0
type: AnswerComment

http://stackoverflow.com/a/26591976
has body: You could always check against the URL: // If the script is not being loaded from my domain if(url.indexOf('http://mydomain') == -1) { // Allow the error to propagate normally return false; } This may not be effective however if some third party is injecting inline scripts as opposed to externally loaded ones.
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26561231
answers question: http://stackoverflow.com/q/26561231
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/41835926
score: 1
comment on: http://stackoverflow.com/q/26608348
type: QuestionComment
has text: It's not duplicate as issue is just in Firefox, and as you can see I've already used answers from it (`opaque mode`).
type: Comment

http://stackoverflow.com/a/26660384
type: Answer
has comment: http://stackoverflow.com/comment/41923370
has body: One work around would be this &lt;form class="form-inline" role="form" name="AddEditContact" ng-init="scacContactDetails = searchScacContactResults[0]&gt;
has comment: http://stackoverflow.com/comment/41926386
upvote count: 2
has comment: http://stackoverflow.com/comment/41923634
answers question: http://stackoverflow.com/q/26659940
score: 2
downvote count: 0

http://stackoverflow.com/a/31775452
has comment: http://stackoverflow.com/comment/64063581
answers question: http://stackoverflow.com/q/26556436
upvote count: 10
type: Answer
has comment: http://stackoverflow.com/comment/95481424
has comment: http://stackoverflow.com/comment/56515607
has body: From the ReactDOM.render() documentation: If the optional callback is provided, it will be executed after the component is rendered or updated.
has comment: http://stackoverflow.com/comment/75816313
score: -1
downvote count: 11

http://stackoverflow.com/q/26578446
score: 2
downvote count: 0
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41774463
has comment: http://stackoverflow.com/comment/41774119
tagged with: javascript
has answer: http://stackoverflow.com/a/40998120
upvote count: 2
answer count: 2
has title: AngularJS ng-repeat applied multiple times in $compiled directive
has body: I've written a directive that dynamically creates a popover for an element: app.directive('popover', function($compile, $timeout){ return { link: function(scope, element, attrs) { $timeout(function() { // grab template var tpl = $(element).find('.popover-template') // grab popover parts of template var template = { //$compile( $(element).siblings(".pop-content").contents() )(scope) title: tpl.find('.template-title').contents(), content: tpl.find('.template-content').contents() }; // render template with angular var content = $compile(template.content)(scope); var title = $compile(template.title)(scope); $(element).popover({ html: true, placement: "right", content: content, title: title }); scope.$digest() }); } }; }); In application it looks like this: Click me {{ x.name }} and {{ y.name }} f in [1,2,3] item {{ f }}, index {{ $index }} The popover is created and displayed. The title works correctly as well. However, ng-repeat is applied multiple times in any iteration: As you can see, the iteration that should only include 3 elements in fact includes 3*3 elements. The directive creates popovers for exactly 3 elements, so I guess that's where my mistake lies. How can I make sure that within each popover, ng-repeat is only called once?
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41774447
has answer: http://stackoverflow.com/a/40999613
has comment: http://stackoverflow.com/comment/41774190

http://stackoverflow.com/q/26625556
type: Question
has title: AngularJS: Is '$scope.ctrl = $scope' good or bad?
has comment: http://stackoverflow.com/comment/41862348
tagged with: javascript
tagged with: controller
downvote count: 0
has body: In AngularJS world, there are battle between '$scope' and 'Controller As'. (Or, '$scope.ctrl = this' instread of 'Controller As' But, how about '$scope.ctrl = $scope' ? Is this good or bad idea ? By this, I can refer controller as variable to avoid accidentally use wrong scope's variables, without changing '$scope' style code. But, I couldn't find this as a practice. Why ?
favorite count: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1

http://stackoverflow.com/comment/41920939
has text: @Drew: I've used XRegExp quite a bit and it's always worked well for me. Perhaps you didn't use the correct syntax?
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26659285

http://stackoverflow.com/comment/41794252
type: QuestionComment
has text: I have just noticed that sometimes it refuses to center the **.item** div... The **.item** div has to be dragged into the inner part of the **.droparea** element...otherwise it won't center the **.item** element after releasing the item element.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26589508

apache
tag name: apache
tags question: http://stackoverflow.com/q/26646784
tags question: http://stackoverflow.com/q/26644966
type: Tag

background-image
tags question: http://stackoverflow.com/q/26650127
tag name: background-image
tags question: http://stackoverflow.com/q/26624614
type: Tag

http://stackoverflow.com/a/26546063
score: 0
type: Answer
has body: You can use window.location.hash to detect the values after the hash. exp: var val=window.location.hash.substring(1);//substring to remove the # if(val.length!==0){ $(".target").hide(); $("."+val).show(); }
answers question: http://stackoverflow.com/q/26545709

http://stackoverflow.com/comment/41851396
score: 0
has text: array[0] <-- even though that is empty it should still return with nothing. I dont mind receiving an empty array, in fact that is anticipated. The problem is I'm recieving an error.
comment on: http://stackoverflow.com/q/26619747
type: Comment
type: QuestionComment

responsive-design
tags question: http://stackoverflow.com/q/26553645
tags question: http://stackoverflow.com/q/26626607
tags question: http://stackoverflow.com/q/26516296
tags question: http://stackoverflow.com/q/26538967
tags question: http://stackoverflow.com/q/26640695
tags question: http://stackoverflow.com/q/26555638
tag name: responsive-design
type: Tag
tags question: http://stackoverflow.com/q/26624926
tags question: http://stackoverflow.com/q/26618014

http://stackoverflow.com/q/26540978
type: AnsweredQuestion
score: 1
has body: I'm working with the Wordpress Search &amp; Filter plugin and it's exactly what I needed for filtering though my gallery and shop content! I would like to make my selections submit every time a dropdown is changed, as opposed to having to click the submit button. (See link below). In researching other posts, I've found that the solution is to implement this into my theme's java script file: $(".searchandfilter select").change(function() { $(".searchandfilter").submit(); }); I have put the line into my WooThemes Canvas's 'general.js' file but it seems to make no difference. I still need to click on the submit button to make changes. I've tried placing it in various other js files but I've had no luck. The page in questions is this one: http://richardrosenman.com/wordpress/portfolio/ Does anyone have any insight as to what I'm doing wrong? I would REALLY appreciate any help as I'm stuck (and somewhat of a novice with Javascript!). Thanks!
tagged with: wordpress
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26541020
tagged with: javascript
has title: Wordpress Search & Filter Autosubmit
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26541020
tagged with: plugins

http://stackoverflow.com/comment/41946340
type: AnswerComment
comment on: http://stackoverflow.com/a/26671727
score: 0
type: Comment
has text: Yeah it has the html, but it is not loaded to

http://stackoverflow.com/q/26587533
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Need help with getting html elements interact with google maps. I have 2 sections on a Web page. On the right side of the page, I have a map showing multiple markers. On the left side of the page, I have a list with addresses which correspond to the markers in the map. Please suggest pointers on how to highlight a marker when the corresponding address is selected from the list on the left side of the page.
has title: How to highlight map marker upon selection of an html element
upvote count: 14
type: Question
score: 14
has answer: http://stackoverflow.com/a/26588306
tagged with: javascript
tagged with: google-maps

http://stackoverflow.com/q/26580844
score: 9
has body: Summary What I am trying to do is pretty simple: 1a. If an image is not a local store of some sort (such as IndexedDB), read the image as a byte array from the server, put in local store (as a byte array or a reference to a file, I don't care) 1b. If an image is in the local store, read the byte array from local store. Show this byte array as an image in an html page. Somehow, between Blobs, objectURLs, indexedDB and caching it has all gotten overly complicated and is exhibiting some strange behaviour. If there was a way to stick an ArrayBuffer directly into an image rather than first converting to a Blob then an ObjectURL, then I would probably go with that as it is simpler and gets rid of the problematic Blobs and a few unnecessary steps. If you would like to see a code sample of the flow then see this jsfiddle. Note that, as described below, the problem does not occur in the jsfiddle sample (for some reason that I can't figure out). There is a reason that I am using IndexedDB rather than relying on browser caching, so lets try to avoid that discussion and has no bearing on the fact that IndexedDB seems to be misbehaving on Chrome. I am interested if anyone else has encountered something similar or any suggestions as how to improve the situation. Details Chrome version 38.0.2125.104 m. Basically, the flow is to check if blob is in IndexedDB by index (see jsfiddle for reference): 1a. If it is not, then retrieve blob from server (xhr.open), put the blob in IndexedDB (objectStore.put) and show the blob (imgSrc = createTheObjectUrl(blob)). 1b. If it is, then retrieve the blob from IndexedDB (objectStore.get), create URL from blob, set image src to URL. The problem is that it works initially, but after a short while (sometimes when I refresh the page, sometimes when I close Chrome and return to the web page) I get a 404 (not found) when accessing the URL for the blob. There are a few things to note: - In my limited tests with other browsers I do not see the same behavi…
has comment: http://stackoverflow.com/comment/44036374
has title: The mysterious case of disappearing blobs in Chrome (in IndexedDB)
type: AnsweredQuestion
tagged with: indexeddb
tagged with: google-chrome
linked to: http://stackoverflow.com/q/13966186
type: Question
upvote count: 9
tagged with: javascript
has answer: http://stackoverflow.com/a/26926685
has comment: http://stackoverflow.com/comment/44013269
linked to: http://stackoverflow.com/q/7596515
accepted answer: http://stackoverflow.com/a/26926685
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/50248343
has text: possible duplicate of [How to return the response from an asynchronous call?](http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-asynchronous-call)
comment on: http://stackoverflow.com/q/26553831
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41763035
type: AnswerComment
has text: `value.added + '.000Z'` **outputs** 2014-10-24 20:14:30.000Z; `new Date(value.added + '.000Z')` **outputs** Invalid Date; `newYear.setHours(newYear.getHours()) + 2` **outputs** NaN. Makes little sense to me :(
comment on: http://stackoverflow.com/a/26572165
type: Comment
score: 0

base64
tags question: http://stackoverflow.com/q/26648090
tags question: http://stackoverflow.com/q/26630275
tag name: base64
tags question: http://stackoverflow.com/q/26555434
tags question: http://stackoverflow.com/q/26631629
tags question: http://stackoverflow.com/q/26647929
tags question: http://stackoverflow.com/q/26524026
type: Tag

http://stackoverflow.com/q/26654542
has title: Checkbox event and holding array - how to handle in code?
type: Question
has answer: http://stackoverflow.com/a/26654910
tagged with: javascript
tagged with: jquery
score: 0
has body: I have the following code in my phonegap app: function onDeviceReady() { var listOfSports = new Array(["Aikido"],["Air Sports"],["American Football"],["Angling"],["Archery"],["Yoga"]); $.each(listOfSports, function (i) { console.log(i); var li = $('&lt;li&gt;&lt;input class="checkbox" type="checkbox"' + 'id="' + listOfSports[i] + '"' + 'label="' + listOfSports[i] + '"&gt;' + listOfSports[i] + '&lt;/li&gt;') .appendTo("ul.listViewContainer"); }); $("#listViewContainer").listview(); $("#listViewContainer").listview("refresh"); } How can I get the value of checked items and add the value to an array when checked or remove when unchecked?
answer count: 1
accepted answer: http://stackoverflow.com/a/26654910
tagged with: cordova
type: AnsweredQuestion

http://stackoverflow.com/q/26580326
score: 1
has answer: http://stackoverflow.com/a/26580486
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Javascript propertyIsEnumerable returns false but still enumerable
has body: According to MDN: The propertyIsEnumerable() method returns a Boolean indicating whether the specified property is enumerable But when I run the following code, it outputs: method info is NOT enumerable but can be seen in for loop var Person = function(name){ this.name = name; }; Person.prototype.info = function(){ console.log("Name =", this.name); }; var me = new Person('Mike'); console.log('method info is' + (me.propertyIsEnumerable('info') ? '' : ' NOT') + ' enumerable'); for(var k in me) { if (k == 'info') { console.error('but can be seen in for loop') } } This confuses me. UPDATE As answered by @RobG, since propertyIsEnumerable only checks property on object itself, what should I do if I want to iterate over properties only on the object?
upvote count: 1
accepted answer: http://stackoverflow.com/a/26580486
type: AnsweredQuestion

http://stackoverflow.com/comment/41927762
comment on: http://stackoverflow.com/q/26662833
score: 1
type: Comment
type: QuestionComment
has text: Well, you will not be able to serialize DOM nodes and functions if that's what you expect. Which data are you trying to send? Your object seems to be doing WAY TOO MUCH btw... [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle)

http://stackoverflow.com/a/26664684
upvote count: 2
has body: Here you are one option using jQuery ui http://jsfiddle.net/7ta68xyt/5/ $(".dismissAllButton").draggable({ axis: 'x', containment: 'parent', start: function (event, ui) { posTopArray = []; posLeftArray = []; if ($(this).hasClass("group")) { $(".group").each(function (i) { thiscsstop = $(this).css('top'); if (thiscsstop == 'auto') thiscsstop = 0; thiscssleft = $(this).css('left'); if (thiscssleft == 'auto') thiscssleft = 0; posTopArray[i] = parseInt(thiscsstop); posLeftArray[i] = parseInt(thiscssleft); }); } begintop = $(this).offset().top; beginleft = $(this).offset().left; }, drag: function (event, ui) { var topdiff = $(this).offset().top - begintop; var leftdiff = $(this).offset().left - beginleft; if ($(this).hasClass("group")) { $(".group").each(function (i) { $(this).css('top', posTopArray[i] + topdiff); $(this).css('left', posLeftArray[i] + leftdiff); }); } } });
downvote count: 0
answers question: http://stackoverflow.com/q/26663915
type: Answer
score: 2

http://stackoverflow.com/q/26628718
has comment: http://stackoverflow.com/comment/41866522
has comment: http://stackoverflow.com/comment/41867116
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26629195
type: Question
tagged with: regex
tagged with: css
answer count: 1
has title: style not working on ul li on countdown
has comment: http://stackoverflow.com/comment/41867381
has comment: http://stackoverflow.com/comment/41866690
has comment: http://stackoverflow.com/comment/41866321
score: 0
accepted answer: http://stackoverflow.com/a/26629195
has body: Style not working on ul li... It is only showing without any style. I'm creating countdown of time by JavaScript but its not working.... JavaScript function is working but my ul li could not get style on output. <?php //if ($this->getProducts()->getSize() > '0') { ?> <?php foreach ($this->getProducts() as $_Product) { ?> <?php //echo $timespan = strtotime($_Product['special_to_date']) - strtotime($_Product['special_from_date']);exit; ?> <a href="<?php echo $_Product->getProductUrl(); ?>"><img src="<?php echo $this->helper('catalog/image')->init($_Product, 'small_image')->resize(145, 200) ?>" alt="<?php echo $_Product->getName(); ?>"> <?php echo $_Product->getName(); ?> <?php echo Mage::helper('core')->formatPrice($_Product->getPrice()); ?> <?php //echo " "; print_r($_Product->toArray());exit; ?> <div id="newcountdown<?php echo $_Product['sku']; ?>"> <?php } ?> <?php //} ?>
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41725601
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26551273
has text: The second one because it doesn't depend on an assignment outside the function (i.e. `thisPage = abc.forgotPassword;`).
score: 0

data-binding
tags question: http://stackoverflow.com/q/26518621
tags question: http://stackoverflow.com/q/26575978
type: Tag
tags question: http://stackoverflow.com/q/26665447
tags question: http://stackoverflow.com/q/26545294
tags question: http://stackoverflow.com/q/26599709
tag name: data-binding

http://stackoverflow.com/q/26599853
has answer: http://stackoverflow.com/a/26633430
tagged with: asp.net-mvc-4
tagged with: twitter-bootstrap-3
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: What I'm trying to do is when I am in Index page, if I click the Register button, then it will show modal popup dialog of register page form. 'Index.cshtml' is in 'Home' view which has there own controller(HomeController.cs) and 'Register.cshtml' (which we need to bring this in to modal pop up when we click register button in 'Index') is in 'Account' view that has 'AccountController.cs' to controlling of register part. First we tried to make javascript in index to make when I click the register button then it will make dialog box with content which bring register view page url (by .load()). However, when we filled out the form and click submit button in the register form, then, if it succeed to register, it is ok (because in controller makes that redirect to index page) but if it failed, what controller do is add some validation summary which said why it is failed and return partial view which makes redirect to register page. This means that it will go to register pager instead dialog change. I knew why this happen because register form connects with register controller. So what I am doing here is that, I made Register view to partial view in the Shared folder. So I can bring this to the Index.cshtml more easier. (Also I changed making dialog box from custom javascript to using modal class in Bootstrap.) Here is my _Layout.cshtml &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;title&gt;@ViewBag.Title - My ASP.NET Application&lt;/title&gt; @Styles.Render("~/Content/css") &lt;link href="~/Content/jquery-ui.css" rel="stylesheet" /&gt; @Scripts.Render("~/bundles/jquery") &lt;script src="~/Scripts/jquery-ui.js"&gt;&lt;/script&gt; @Scripts.Render("~/bundles/modernizr") &lt;/head&gt; &lt;body&gt; &lt;div class="navbar navbar-inverse"&gt; &lt;!--navbar-fixed-top not spanning rest of contents, change body margin in site.css to use--&gt; &lt;div class="container"&gt…
answer count: 1
type: UnansweredQuestion
tagged with: razor
has title: How to create to work Modal Popup register in index which has their own controllers in MVC?

http://stackoverflow.com/q/26579705
has answer: http://stackoverflow.com/a/28552284
favorite count: 0
has comment: http://stackoverflow.com/comment/46573407
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/28552284
linked to: http://stackoverflow.com/q/26447885
type: AnsweredQuestion
score: 1
has title: Angularjs - dynamically add and update DOM
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41778661
tagged with: javascript
has body: I am trying add HTML elements through javascript that has a directive: document.getElementsByClassName("day-grid")[0].innerHTML = "&lt;div ng-uc-day-event&gt;&lt;/div&gt;"; or var ele = document.createElement("div"); ele.setAttribute("ng-uc-day-event",""); document.getElementsByClassName("day-grid")[0].appendChild(ele); Both results in adding the div to .day-grid. I am using a directive to load template from an external file into ng-uc-day-event. It works as expected when it is run from the HTML file, but it doesn't work when I run the above code from the developer console. How do I make angularjs to call the directive or evaluate the element when I am adding the element to DOM, so that the template is loaded into div when it is inserted into .day-grid? Below is the directive I am using: ulcal.directive("ngUcDayEvent", function ($timeout) { return { restrict: 'A', templateUrl: 'views/dayevent.html', link: function (s, e, a) { $timeout(function () { s.$emit("ucDayEventLoaded"); }) } } });
answer count: 2
possible better answer: http://stackoverflow.com/a/26580936
has answer: http://stackoverflow.com/a/26580936
downvote count: 0

http://stackoverflow.com/a/26652652
has body: You can sort the persons array by age property and pick first one: var persons = [ { name: 'Michael', age: 45, position: 'manager' }, { name: 'Dwight', age: 36, position: 'assistant manager' }, { name: 'Foo', age: 99, position: 'foo' }, { name: 'Bar', age: 37, position: 'bar' } ]; persons.sort(function(a, b) { return a.age &gt; b.age; }); console.log('Youngest person: ', persons[0]);
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26652327
score: 0
accepted answer of: http://stackoverflow.com/q/26652327
type: AcceptedAnswer

http://stackoverflow.com/comment/41893398
comment on: http://stackoverflow.com/a/26582215
type: Comment
has text: Hi Sam, sure. For the time being I requested the users to push my current changes and I will look into this meanwhile. Well, I am on to other priority tasks, but this afternoon or evening I will post here again on this problem. SUrely, we both resolve this problem and I learn :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/26621880
favorite count: 0
downvote count: 2
has answer: http://stackoverflow.com/a/26621906
accepted answer: http://stackoverflow.com/a/26621906
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 0
has comment: http://stackoverflow.com/comment/41854191
has title: (select) elements still taking space after display:none
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41854176
type: Question
has comment: http://stackoverflow.com/comment/41854181
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has body: So the problem is that for any other elements, display:none make the element invisible and doesn't take up space, however only for the element, it still take up space when display:none. option1 option2 It just made the select element invisible, but still takes up space, I tried giving display:none to the option elements too, and have researched on google and stackoverflow, but it seems nobody is getting the same problem. Anybody could shed some light about this? Thankyou in advance.

http://stackoverflow.com/comment/41680748
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26526511
has text: @bean You should maybe include some kind of input->output specification in your question to make clear for what exactly your function should test.
type: Comment

http://stackoverflow.com/q/26592094
tagged with: http://stackoverflow.com/tag/html
has title: Changing HTML code with Javascript show/hide
has answer: http://stackoverflow.com/a/26592204
has answer: http://stackoverflow.com/a/26592729
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26592729
accepted answer: http://stackoverflow.com/a/26592204
has comment: http://stackoverflow.com/comment/41799060
has comment: http://stackoverflow.com/comment/41799039
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/41799218
has comment: http://stackoverflow.com/comment/41799444
type: Question
has body: I have tried a few different things, including a switch statement, appending using JQuery etc. and I can't get this to work with the button. What I am trying to do is change the words in P2 from: Please push ` this ` to show more information about me. to: Please push ` this ` to hide more information about me. I have to do the same thing with "courses" but I think if I could understand the first one, I could get how to do the second see/hide on my own. I am so confused now :/ I think it has something to do with span tags, but I honestly am in my first week of HTML and have not learned what are probably really simple procedures for things like this yet. I would appreciate any and all the help I can get to help me figure this out. About me My Page Stuff about me Here is a link to learn more about HTML! Please push this to see more information about me. Please push this to see my list of courses." More stuff about me... Course Name Date Time Programming Paradigms Tuesday / Thursday 11:00-12:15 Computer Organization Tuesday / Thursday 9:30-10:45 Linear Algebra Monday/Wednesday/Friday 11:50-12:40 Combinatorics Monday/Wednesday/Friday 8:35-9:25

http://stackoverflow.com/a/26594752
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41807083
score: 7
has comment: http://stackoverflow.com/comment/41832241
type: Answer
has body: Instead of doing these. Create a mock object for $modal with show and hide methods and set your expectations on them. describe('FooController', function () { var scope, controller, modal; beforeEach(module('app')); beforeEach(inject(function ($rootScope, $controller) { //set up a new scope and the controller for the test scope = $rootScope.$new(); //Create spy object modal = jasmine.createSpyObj('modal', ['show', 'hide']); //provide modal as dependency to the controller. controller = $controller('FooController', {$scope: scope, $modal:modal}); })); it('should show the modal', function () { scope.makeItFoo(); expect(modal.show).toHaveBeenCalled(); }); });
accepted answer of: http://stackoverflow.com/q/26594270
has comment: http://stackoverflow.com/comment/41812816
has comment: http://stackoverflow.com/comment/41807635
has comment: http://stackoverflow.com/comment/41804156
answers question: http://stackoverflow.com/q/26594270
has comment: http://stackoverflow.com/comment/41807696
upvote count: 7
has comment: http://stackoverflow.com/comment/49617269
has comment: http://stackoverflow.com/comment/41804138
has comment: http://stackoverflow.com/comment/41809606
has comment: http://stackoverflow.com/comment/49617011
has comment: http://stackoverflow.com/comment/48742254
has comment: http://stackoverflow.com/comment/41806593
has comment: http://stackoverflow.com/comment/41806911

http://stackoverflow.com/comment/41843293
score: 0
type: Comment
has text: Thank you. I'm getting an error: "Unexpected token '+'" at the first " + themeName + " I tried making the object a string but that didn't work either.
comment on: http://stackoverflow.com/a/26610627
type: AnswerComment

http://stackoverflow.com/comment/41807208
score: 0
comment on: http://stackoverflow.com/q/26596216
type: QuestionComment
has text: yes, because the first ajax call is working. i am calling the same url 2 times. one time with get and one time with post
type: Comment

http://stackoverflow.com/comment/53615796
score: 0
type: Comment
type: QuestionComment
has text: I actually figured it out by logging the "transaction object" most commonly named "tx" in the official phonegap docs.
comment on: http://stackoverflow.com/q/26545220

iframe
tags question: http://stackoverflow.com/q/26664983
tags question: http://stackoverflow.com/q/26577292
tags question: http://stackoverflow.com/q/26664566
tags question: http://stackoverflow.com/q/26660440
tags question: http://stackoverflow.com/q/26606995
tags question: http://stackoverflow.com/q/26622428
tags question: http://stackoverflow.com/q/26521437
tags question: http://stackoverflow.com/q/26624194
tags question: http://stackoverflow.com/q/26579001
tag name: iframe
tags question: http://stackoverflow.com/q/26535616
tags question: http://stackoverflow.com/q/26561734
tags question: http://stackoverflow.com/q/26561481
tags question: http://stackoverflow.com/q/26583033
tags question: http://stackoverflow.com/q/26561011
tags question: http://stackoverflow.com/q/26574043
tags question: http://stackoverflow.com/q/26581612
tags question: http://stackoverflow.com/q/26657687
tags question: http://stackoverflow.com/q/26667485
tags question: http://stackoverflow.com/q/26523521
tags question: http://stackoverflow.com/q/26657826
tags question: http://stackoverflow.com/q/26616186
tags question: http://stackoverflow.com/q/26588421
tags question: http://stackoverflow.com/q/26654655
tags question: http://stackoverflow.com/q/26668775
tags question: http://stackoverflow.com/q/26586546
tags question: http://stackoverflow.com/q/26603306
tags question: http://stackoverflow.com/q/26665331
tags question: http://stackoverflow.com/q/26619591
tags question: http://stackoverflow.com/q/26553251
tags question: http://stackoverflow.com/q/26649215
tags question: http://stackoverflow.com/q/26651990
tags question: http://stackoverflow.com/q/26611968
tags question: http://stackoverflow.com/q/26653641
tags question: http://stackoverflow.com/q/26667572
tags question: http://stackoverflow.com/q/26549509
type: Tag
tags question: http://stackoverflow.com/q/26668664
tags question: http://stackoverflow.com/q/26550888
tags question: http://stackoverflow.com/q/26573815
tags question: http://stackoverflow.com/q/26603057
tags question: http://stackoverflow.com/q/26528159
tags question: http://stackoverflow.com/q/26598991
tags question: http://stackoverflow.com/q/26577213
tags question: http://stackoverflow.com/q/26630519
tags question: http://stackoverflow.com/q/26635778
tags question: http://stackoverflow.com/q/26586376
tags question: http://stackoverflow.com/q/26549131
tags question: http://stackoverflow.com/q/26613617
tags question: http://stackoverflow.com/q/26619201
tags question: http://stackoverflow.com/q/26620602
tags question: http://stackoverflow.com/q/26638945
tags question: http://stackoverflow.com/q/26582906
tags question: http://stackoverflow.com/q/26619304
tags question: http://stackoverflow.com/q/26545194
tags question: http://stackoverflow.com/q/26558280
tags question: http://stackoverflow.com/q/26527098
tags question: http://stackoverflow.com/q/26606922

http://stackoverflow.com/comment/41739196
has text: Are you familiar with a DOM inspector, like Firefox Inspector, Firefox Firebug, Chrome DevTools, or IE Developer Tools? I'd like you to inspect the HTML for the "Terminos de uso" in the corner using an inspector. Once you see its HTML in the DOM, look up a couple lines for its grandparent element with the class "gm-style-cc", and click on that guy's sibling element right after it with the classes "gmnoprint gm-style-mtc". In my copy of maps, this div has the zoom and street-view controls. Look at its CSS, and at its children with their CSS, see if there's anything making it invisible.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26556003
type: QuestionComment

http://stackoverflow.com/comment/41890310
has text: You might want to play around with the `padding-bottom` on the `.embed-responsive.embed-responsive-16by9` and see what suits your content the best.
type: Comment
comment on: http://stackoverflow.com/a/26624265
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41815119
score: 0
has text: geo-location is actually working, the only problem is the file does not load properly according to visitor location
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26600558

http://stackoverflow.com/a/26662237
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26662202
answers question: http://stackoverflow.com/q/26662202
type: Answer
downvote count: 0
score: 3
has body: The only thing you can do is iterate over the object's properties: for (var prop in Animals) { Animals[prop].toString = ...; }
upvote count: 3

http://stackoverflow.com/comment/41972409
has text: Sorry, IE (including 11) doesn't support CSS animation of SVG. If you need it to work in IE, you will have to use JS to manipulate the stroke offset. You could do it yourself, or use one of the SVG-manipulating JS libraries to help you.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26600281

http://stackoverflow.com/comment/41931989
type: QuestionComment
has text: Why the downvote?? Just trying to get some info from the community on 1.3 -> 2.0
comment on: http://stackoverflow.com/q/26665067
score: 0
type: Comment

http://stackoverflow.com/q/26545786
has comment: http://stackoverflow.com/comment/41715150
has comment: http://stackoverflow.com/comment/41715236
has body: I am learning Javascript and I am a C++ programmer. I have tried creating an object with a constructor with object.create and here is the result: var PlayGround ={ initGrid : function(N) { this.N=N; this.grid = new Array(N); for (var i = 0; i &lt; N; i++) { this.grid[i] = new Array(N); for (var j = 0; j &lt; N; j++) { this.grid[i][j] = false; } } return true; } }; var PlayGround_property = { N:{ value: 100, writable:true }, grid:{ value:null, writable:true } } var board= Object.create(PlayGround, PlayGround_property); It works as I want: the object board contains the object grid, and now I can use the set and get keyword to define the behaviour of the = and () operator. Anyway I have read around the web that the this keyword in Javascript is not safe and I want to be sure that it is referring always to the board object and not to the global window object. Is there a way or I am overthinking? Other question, are there other ways to write object with a constructor (and maybe other members) in Javascript?
has comment: http://stackoverflow.com/comment/41715121
has comment: http://stackoverflow.com/comment/41715183
has comment: http://stackoverflow.com/comment/41715325
has title: Object.create to create an object with costructor
has answer: http://stackoverflow.com/a/26546507
accepted answer: http://stackoverflow.com/a/26546507
linked to: http://stackoverflow.com/q/80084
type: AnsweredQuestion
tagged with: oop
has comment: http://stackoverflow.com/comment/41715022
has comment: http://stackoverflow.com/comment/41715081
type: Question
has comment: http://stackoverflow.com/comment/41714607
answer count: 1
has comment: http://stackoverflow.com/comment/41714977
tagged with: javascript
score: 0

http://stackoverflow.com/comment/97972005
comment on: http://stackoverflow.com/a/26624162
has text: You may need to push an initial state to make this work... Something like this `window.onload = function() { if (window.history && history.pushState) { history.pushState(null, null, null); } };`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41732767
comment on: http://stackoverflow.com/q/26555546
type: QuestionComment
type: Comment
has text: You need to do some Angular.js tutorials.
score: 0

http://stackoverflow.com/comment/41897671
type: Comment
comment on: http://stackoverflow.com/q/26646099
type: QuestionComment
has text: Post what you've tried so that people can help you on it.
score: 1

http://stackoverflow.com/comment/41724727
type: QuestionComment
comment on: http://stackoverflow.com/q/26550889
has text: There are ways to attack that with CSS (such as positioned elements and width declarations). You might consider posting the whole enchilada and reconsidering the architecture on this header.
score: 0
type: Comment

http://stackoverflow.com/q/26667140
score: 0
has comment: http://stackoverflow.com/comment/41951202
accepted answer: http://stackoverflow.com/a/26667419
type: Question
has comment: http://stackoverflow.com/comment/41935737
tagged with: javascript
tagged with: jquery
has body: Cannot find anywhere how to make a drop-down list open a .xls file. What my code is: Untitled Document Excel List: Select an Excel list File name File name When I do this, it opens 4 additional tabs and then asked if I want to open or save the excel file. How can I make it work by choosing the excel list and not having the 4 additional tabs open and only show to open or save the file?
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26667419
has comment: http://stackoverflow.com/comment/41935708
possible better answer: http://stackoverflow.com/a/26667186
tagged with: php
has title: Using Javascript to open an .xls file from a drop-down list
has answer: http://stackoverflow.com/a/26667186
type: AnsweredQuestion

http://stackoverflow.com/q/26593907
has comment: http://stackoverflow.com/comment/41802559
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26594106
score: 0
has comment: http://stackoverflow.com/comment/41802535
has comment: http://stackoverflow.com/comment/41802532
has title: How to make 1 button with changing ids do different things?
favorite count: 0
has body: I have a button that when pressed besides doing something it changes its own id so when pressed again it does something different as if it is a different button. The problem is that after changing the id for the first time the prev button click function throws an error because the id doesn't exist anymore. $("#button1").click(function() { //do something document.getElementById("#button1").id = "button2"; }); $("#button2").click(function() { //do something different document.getElementById("#button2").id = "button1"; });
has comment: http://stackoverflow.com/comment/41802584
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26594106
downvote count: 1
type: Question
answer count: 1

http://stackoverflow.com/a/26618541
answers question: http://stackoverflow.com/q/26618285
has body: The window resize event and also the DOM ready event are called earlier then the Google Font is loaded. My solution is to use the Web Font Loader to get control about the moment the Google Font is loaded... "It is co-developed by Google and Typekit." First, it is described here: https://github.com/typekit/webfontloader Just an approach: var activeCallback = jQuery.Callbacks(); // define a callback activeCallback.add(function() { // add a callback function resizeWindow(); }); WebFont.load({ google: { families: ['Montserrat'] }, active: function () { activeCallback.fire(); } // fire the callback });
type: Answer
has comment: http://stackoverflow.com/comment/41848368
has comment: http://stackoverflow.com/comment/41848183
score: 0
has comment: http://stackoverflow.com/comment/41848796
has comment: http://stackoverflow.com/comment/41848641

http://stackoverflow.com/a/26655798
accepted answer of: http://stackoverflow.com/q/26655583
has comment: http://stackoverflow.com/comment/41917520
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26655583
has body: This is because angular.isElement expects a node element or a jQuery wrapped element. You can change your code to: console.log("angular.isElement('title'): ", angular.isElement(document.querySelector('title'))); Compare: AngularJS documentation on isElement
score: 0
type: Answer

http://stackoverflow.com/comment/41725400
type: Comment
comment on: http://stackoverflow.com/q/26550996
has text: My confusion about this question is from the title: "Why is funcname() = value; valid syntax?" There is no situation where that is valid syntax. There will *always* be an error thrown.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41757731
score: 0
type: QuestionComment
type: Comment
has text: Sorry, just this all is so clear for me )). It's not working here: $("input[name='item_url']:last").change(function (event) { }). All elements (original and cloned) has same 'name' attribute so I'm using its as selector.
comment on: http://stackoverflow.com/q/26569345

http://stackoverflow.com/comment/51905276
comment on: http://stackoverflow.com/a/31214810
has text: Did you find out why?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26660459
tagged with: regex
accepted answer: http://stackoverflow.com/a/26660768
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26660524
has body: im trying to remove all text except one in javascript the idea is do something like //jQuery("someelement").attr("class"); var classes= "cnode_1 timestamp_1413504000 item"; classes = classes.replace(/^(?!timestamp_)/,''); i want to take only the text who starts with timestamp_, the expected ouput is : timestamp_1413504000 i want this , then to grab the number //now "classes" show be timestamp_1413504000 classes = classes.replace("timestamp_",""); the expected ouput is : 1413504000 i want to avoid use something like, split the clasess base on space, then use for bucle, and finally compare with indexOf
has answer: http://stackoverflow.com/a/26660524
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26660544
score: 0
answer count: 3
has title: How to remove all text except one with starts with some word?
has answer: http://stackoverflow.com/a/26660768

http://stackoverflow.com/comment/42141947
comment on: http://stackoverflow.com/a/26763570
has text: thank you for your reaction. the problem is that i don't know how to do this.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26566906
accepted answer: http://stackoverflow.com/a/26566990
score: -1
type: Question
has body: I am using & (expression binding) operator in isolated scope of a directive but I am unable to trigger function on the parent controller . There should be output on the console but I am receiving none. Here in the HTML part: Directive & Ctrl Data {{person.name}} Directive Data Here goes the JS part : angular.module('isolate_scope', []) .controller('isolateScopeController', function($scope){ $scope.persons = [ { name:"tanmay", age:"28" }, { name: "James", age:"28" }, { name:"Rylan", age:"26" }, { name:"Aditya", age:"23" } ]; $scope.printScopeToFile = function(){ console.log("printng to file....."); for(var i in $scope.persons){ console.log("Name = " + $scope.persons[i].name + " Age = " + $scope.persons[i].age); } }; }) .directive('friends',function(){ return { restrict :'E', template: ' ', scope :{ name:'=frnd' } }; }) .directive('myButton',function(){ return { restrict: 'E', template: ' callParentfunction ', scope : { isolatedFunction:"&" } }; }); Fiddle for the same: http://jsfiddle.net/v51kob1q/
answer count: 1
has answer: http://stackoverflow.com/a/26566990
tagged with: javascript
has title: & operator not working in the isolated scope of directive
downvote count: 1
favorite count: 0
upvote count: 0
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/41819070
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26602883
has text: man your code works fine just change the option in the fiddle from onload to "no wrap - in " here is the changed option http://jsfiddle.net/dq8r196v/2/

http://stackoverflow.com/a/26566435
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26566226
has comment: http://stackoverflow.com/comment/41752068
has body: I don't know how .text() didn't work for you. To set text inside td elements, you use .text(). To get the data inside data-current or data-new, jQuery has a handy function .data(tag), for example $(sel).data('current'). Here's a fiddle displaying usage of this on your problem.

http://stackoverflow.com/comment/41806544
score: 0
has text: Why do you want to detect a refresh? What is the purpose? I'm asking you because maybe what you are trying to do could be achieved in a different way.
type: QuestionComment
comment on: http://stackoverflow.com/q/26595867
type: Comment

http://stackoverflow.com/comment/99015330
has text: `var r= readLine();` `var area = Math.PI * Math.pow(r); // Showing NaN ` Where as `var area = Math.PI * (r * r ) // giving the result ` can anyone explain why ?
score: 0
comment on: http://stackoverflow.com/a/26594370
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41883459
type: Comment
comment on: http://stackoverflow.com/q/26638034
score: 0
type: QuestionComment
has text: what do you mean by `html composing itself `?

http://stackoverflow.com/comment/41819698
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26588475
type: Comment
has text: Is it possible to permanently modify these items then using javascript/jquery? For instance, can you replace the word "first" to "second" of the second feed using text input from a web page?

http://stackoverflow.com/a/26530191
upvote count: 2
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/41688144
has comment: http://stackoverflow.com/comment/41717840
accepted answer of: http://stackoverflow.com/q/26528744
has comment: http://stackoverflow.com/comment/41717642
has comment: http://stackoverflow.com/comment/41868496
has comment: http://stackoverflow.com/comment/41941419
answers question: http://stackoverflow.com/q/26528744
type: Answer
has comment: http://stackoverflow.com/comment/41874079
has comment: http://stackoverflow.com/comment/41921619
has comment: http://stackoverflow.com/comment/41921575
has body: You want to setup componentRestrictions and filter by country. See the documentation. Example: function codeAddress(zipCode) { geocoder.geocode({ 'address': address, "componentRestrictions":{"country":"DE"} }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } else { alert("Geocode was not successful for the following reason: " + status); } }); } Demo: JSFiddle demo Note: As a side note, you cannot filter by multiple countries. This is a long awaited feature that Google still didn't implement until now. Edit: 2017-04-19 Google has now implemented a way to filter by up to 5 countries: see https://issuetracker.google.com/issues/35821685 I will not make any comment about how much useful this is...
has comment: http://stackoverflow.com/comment/65103861
score: 1
has comment: http://stackoverflow.com/comment/41689229

ng-init
type: Tag
tag name: ng-init
tags question: http://stackoverflow.com/q/26593485

http://stackoverflow.com/comment/41718146
has text: simplest approach is to have table and image in same parent and use mouse events on parent
score: 0
comment on: http://stackoverflow.com/q/26547669
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41902592
comment on: http://stackoverflow.com/q/26648118
score: 0
type: Comment
type: QuestionComment
has text: Re IIFE: An IIFE is a function you wrap in brackets and call immediately and looks like this `(function(){...})()`. The return result is whatever that function returns (which in your case there is no value returned). Can you try your own code in a JSFiddle *of your own* and provide that here as nobody seems to be able to reproduce your problem. It may be something else you have not shown us. Use Save-As from a browser to get the output HTML (more useful than the PHP source).

http://stackoverflow.com/comment/41690699
type: Comment
has text: Thank you! That makes a lot of sense to do the class. I take that to mean that they still haven't exactly made it possible to automatically attach the pseudo-elements with the elements when you give it a jquery command. Do you think it'll be likely in the near future, or will we just always have to stick with finding these round-about ways to manage pseudo-elements?
type: AnswerComment
comment on: http://stackoverflow.com/a/26532094
score: 0

http://stackoverflow.com/comment/41911551
type: QuestionComment
comment on: http://stackoverflow.com/q/26654298
score: 1
has text: A **much** simpler approach would be to make sure your CSS rules apply to print media in whatever way is appropriate to your content.
type: Comment

http://stackoverflow.com/q/26586855
tagged with: javascript
tagged with: ionic-framework
has comment: http://stackoverflow.com/comment/41791837
upvote count: 3
has comment: http://stackoverflow.com/comment/41789303
tagged with: jquery
has comment: http://stackoverflow.com/comment/41789604
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41789636
has comment: http://stackoverflow.com/comment/41788781
downvote count: 0
answer count: 0
has title: Parse HTML in javascript without loading all resources
has comment: http://stackoverflow.com/comment/41809771
has body: I know there has been many question around this but I did not find any answer to my specific case (which should not be that specific after all). I am build a html mobile app for multi platform using cordova, angularjs and ionic. My app is getting web pages from a server that I do not own and I need to extract some data from those pages. I have found many ways but not satisfactory to me. jQuery : I manage to parse the HTML successfully but unfortunately parsing my html page triggers the loading of the resources such as images which I don't want at all. I just want to extract string from the html page and certainly not load all the images. create a virtual dom element with innerHTML like this var el = document.createElement( 'div' ); el.innerHTML = MyHtmlPage; same issue like JQuery, the resources like image are loaded too. Using a DomParser like this var el = new DOMParser().parseFromString(string, 'text/html'); This is not supported by all platform browser. I wish someone can help me find a decent solution, I may otherwise use regexp but I hate those.
type: Question
score: 3

http://stackoverflow.com/a/26643133
has comment: http://stackoverflow.com/comment/41892896
accepted answer of: http://stackoverflow.com/q/26643038
upvote count: 5
type: AcceptedAnswer
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/41892884
type: Answer
has body: Use text-anchor: middle or text-align: center instead of text-anchor: start: Fiddle.
answers question: http://stackoverflow.com/q/26643038

http://stackoverflow.com/comment/41885321
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26639139
has text: If you upgrade to 1.10 you can use the following: https://datatables.net/examples/basic_init/complex_header.html

http://stackoverflow.com/comment/41827275
has text: [See this question](http://stackoverflow.com/questions/25493561/overwrite-ds-store-ember-cli/26607584#26607584).
type: AnswerComment
comment on: http://stackoverflow.com/a/26587408
score: 0
type: Comment

http://stackoverflow.com/a/66934562
score: 0
has body: using http://movable-type.co.uk/scripts/sha512.html you obtain the same output as using the function hash('sha512', 'puma'); That is an excellent solution from Chris Veness
type: Answer
answers question: http://stackoverflow.com/q/26616217

http://stackoverflow.com/q/26579174
has title: Design: why does JavaScript have separate Function and Object objects, and why do these have their own separate prototype objects?
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41775693
has comment: http://stackoverflow.com/comment/41775681
has comment: http://stackoverflow.com/comment/41776498
has comment: http://stackoverflow.com/comment/41775712
has comment: http://stackoverflow.com/comment/41776652
has comment: http://stackoverflow.com/comment/41775578
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41775598
type: AnsweredQuestion
tagged with: prototypal-inheritance
has comment: http://stackoverflow.com/comment/41775682
has comment: http://stackoverflow.com/comment/41775703
tagged with: prototype-programming
tagged with: prototype
type: Question
upvote count: 2
has body: I've come across the following diagram which looks rather messy. So here comes my question: Why does JavaScipt have separate Function and Object function objects (instead of for instance simply having everything defined at the top level by the user point to a single prototype object Root, and with the prototype of Root pointing back to Root, which would seem to be a much simpler and more intuitive design)? Thanks. Sorry for my misunderstanding. Now I realize: JavaScript has primitive data types and objects. The primitive data types are boolean, number, string, null, and undefined. When needed the first three of these are treated as instances of Boolean, Number, and String. Everything else is an object, including functions, arrays, regular expressions, and dates. Functions may be used as constructors or as ordinary functions. When a function is used as a constructor it can be used to instantiate object instances via the new operator. The prototype of the instantiated instance (accessed via the __proto__ property) is set to the constructor's 'prototype' property when the instance is instantiated. The __proto__ members are used to resolve properties via the prototypical inheritance chain. Since functions are more specialized than objects there is a Function.prototype object stuck in the prototypical inheritance chain between functions and the top-level Object.prototype object. The Function and Object constructor functions should themselves not normally be needed since we can make use of the function keyword and object literals directly.
has answer: http://stackoverflow.com/a/26579210
accepted answer: http://stackoverflow.com/a/26579210
has comment: http://stackoverflow.com/comment/41785915
has comment: http://stackoverflow.com/comment/41775697
answer count: 1

http://stackoverflow.com/q/26582019
answer count: 0
has comment: http://stackoverflow.com/comment/41781926
has comment: http://stackoverflow.com/comment/41817994
score: 0
has comment: http://stackoverflow.com/comment/41784289
has comment: http://stackoverflow.com/comment/41785414
type: Question
tagged with: javascript
has title: The whole background is going down when the key board is going down
has comment: http://stackoverflow.com/comment/41782138
has comment: http://stackoverflow.com/comment/41780420
has comment: http://stackoverflow.com/comment/41781386
has comment: http://stackoverflow.com/comment/41784003
has comment: http://stackoverflow.com/comment/41782634
has comment: http://stackoverflow.com/comment/41812886
has comment: http://stackoverflow.com/comment/41818116
has comment: http://stackoverflow.com/comment/41781881
has comment: http://stackoverflow.com/comment/41825384
has body: When we are setting the keyboard to go down it is shifting the whole background down. The html for the UI is: In the div inside the body the whole section part is getting replace each time when the app navigates from screen to screen. .... When we are closing the keyboard the whole body is going down as a result of which there are some UI distortions. The css for the issue is: .main_wrapper.create_account{ background-image:url(../img/create-account-bg.jpg); background-repeat: no-repeat; background-size: cover; height: 100%; background-color: #000; } And If I add overflow:scroll to the css then the issue is getting fixed but there is jerk when the keyboard is coming up
has comment: http://stackoverflow.com/comment/41791640
has comment: http://stackoverflow.com/comment/41781541
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41824770
tagged with: cordova

http://stackoverflow.com/comment/41869421
has text: When running this on an array of empty arrays, e.g. `empty_array.filter(nonEmpty).reduce(productAdd)`, I get a `Uncaught TypeError: Reduce of empty array with no initial value` in console. How would I tackle this?
score: 0
comment on: http://stackoverflow.com/a/26629905
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26521310
has comment: http://stackoverflow.com/comment/41671681
has title: Using Handlebars object in JavaScript
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: handlebars.js
type: Question
score: 2
has body: I want to pass an entire object right into javascript, but it doesn't seem to work. I tried the {{{data}}} approach and the {{data}} approach like recommended in another post. I'm doing something like this in the handlebars file: &lt;script&gt; var myData = {{data}}; // or even {{{data}}} &lt;/script&gt; Both of these give me the exception: Uncaught SyntaxError: Unexpected Identifier. However if I do a var myDataUrl = "{{data.url}}"; It works fine, but for the first case it prints out "[Object Object"]. Any thoughts on how I can make case 1 work?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41671772
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/26522470

http://stackoverflow.com/a/26615143
has body: Perhaps try something like this? Array.prototype.slice.call(document.querySelectorAll('.testPageRow td')).forEach(function(e) { e.className = 'selected'; }); Demo: http://jsfiddle.net/62d4La7w/
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41841993
has comment: http://stackoverflow.com/comment/41841828
has comment: http://stackoverflow.com/comment/41843917
accepted answer of: http://stackoverflow.com/q/26615016
has comment: http://stackoverflow.com/comment/41843963
answers question: http://stackoverflow.com/q/26615016
upvote count: 1
has comment: http://stackoverflow.com/comment/41842058
type: AcceptedAnswer

angularjs-scope
tags question: http://stackoverflow.com/q/26620554
tags question: http://stackoverflow.com/q/26592929
tags question: http://stackoverflow.com/q/26668270
tags question: http://stackoverflow.com/q/26633092
tags question: http://stackoverflow.com/q/26622566
tags question: http://stackoverflow.com/q/26618433
tags question: http://stackoverflow.com/q/26607623
tags question: http://stackoverflow.com/q/26601819
tags question: http://stackoverflow.com/q/26570660
tags question: http://stackoverflow.com/q/26528728
tags question: http://stackoverflow.com/q/26618554
tags question: http://stackoverflow.com/q/26576099
tags question: http://stackoverflow.com/q/26653824
tags question: http://stackoverflow.com/q/26650152
tags question: http://stackoverflow.com/q/26584660
tags question: http://stackoverflow.com/q/26590092
tags question: http://stackoverflow.com/q/26661879
tags question: http://stackoverflow.com/q/26616448
tags question: http://stackoverflow.com/q/26558269
tags question: http://stackoverflow.com/q/26642558
tags question: http://stackoverflow.com/q/26557304
tags question: http://stackoverflow.com/q/26661407
tags question: http://stackoverflow.com/q/26559178
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/26643571
tags question: http://stackoverflow.com/q/26664588
tags question: http://stackoverflow.com/q/26641313
tags question: http://stackoverflow.com/q/26537960
tags question: http://stackoverflow.com/q/26639220
tags question: http://stackoverflow.com/q/26594270
tags question: http://stackoverflow.com/q/26660664
type: Tag

http://stackoverflow.com/comment/41870032
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26630763
type: Comment
has text: Is there any hack or any programming I can do to change the browser to a non-IE browser inside Outlook?

http://stackoverflow.com/comment/41860355
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26616130
score: 0
has text: Thank's, it works great replacing $("<g></g>") with $(document.createElementNS('http://www.w3.org/2000/svg', 'g'))

http://stackoverflow.com/comment/41834549
has text: I think document.getElementById("requestList").innerHTML = ""; does the same thing. The list doesn't disappear.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26610949

http://stackoverflow.com/q/26579899
tagged with: jquery-ui-datepicker
has comment: http://stackoverflow.com/comment/106427758
upvote count: 3
answer count: 1
tagged with: jquery
favorite count: 0
has body: When using jQuery UI's date-picker, if you call getDate while the text in the text box is not a valid date, getDate returns today's date. Example How can I distinguish between today's date and an invalid date when retrieving the date?
has answer: http://stackoverflow.com/a/26579900
accepted answer: http://stackoverflow.com/a/26579900
type: AnsweredQuestion
score: 3
downvote count: 0
has title: jQuery UI Datepicker getDate returns today's date on invalid date
type: Question
tagged with: jquery-ui
tagged with: javascript

http://stackoverflow.com/q/26612209
has title: AngularJs - Broadcast event to single controller
type: AnsweredQuestion
tagged with: typescript
upvote count: 1
tagged with: forms
type: Question
has answer: http://stackoverflow.com/a/26620595
tagged with: javascript
has comment: http://stackoverflow.com/comment/41838612
has body: I have a page where there are a list of Leads who each can have certain actions. Each action is a form so the same form can be displayed multiple times on the same page. Each form has it's own scope and it;s own instance of the controller. When the form is submitted, I call a service to do the ajax operation and upon completion I broadcast a message, and in the controller I listen to the message. The problem is because each instance of the form has its own instance of the controller, the even listener is fired for each form. How can I only call this for the active controller? Here is some sampel code: The service: /** * Delegate downline submit */ delegatedDownlineSubmit(delegateDownLineModel: IDelegateDownLineModel) { this.PostJson('/api/Lead/DelegateDownLine', delegateDownLineModel) .success(function (response: IAjaxResponse) { if (response !== null) { LeadServices.rootScope.$broadcast('LeadService.DelegatedDownlineSubmitted', response); } }); } Controller - called once for each instance of form: delegateDownLineFormScope.$on('LeadService.DelegatedDownlineSubmitted', function (event: ng.IAngularEvent, ajaxResponse: IAjaxResponse) { //Do stuff }); I have also tried calling the broadcast only on the scope: LeadServices.rootScope.BroadcastToElement('#Lead_123 form[name=DelegateDownLineForm]', 'LeadService.DelegatedDownlineSubmitted', response); /** * Broadcast a message to another element on the page */ scope.BroadcastToElement = function (selector: any, message: string, ...args: any[]) { var broadcastArgs = [message]; if (args) { broadcastArgs = broadcastArgs.concat(args); } return angular.element(selector).scope().$broadcast.apply(this, broadcastArgs); }; Thanks in advance for your help.
answer count: 1
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/26620595
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/41909138
type: Comment
has text: Your code is valid. http://jsfiddle.net/gilleez/gez37k9m/
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26652970

http://stackoverflow.com/q/26645486
favorite count: 0
has answer: http://stackoverflow.com/a/26645608
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26645562
has body: So I need to write a module/function that would analyse a string and parse all possible date values given in any arbitrary form, eg: bla-bla-bla today --&gt; new Date() january foo Mar 11th bar --&gt; [new Date('2014/1/1'), new Date('2014/3/11')] // more than one date lorem 11/08 ipsum --&gt; new Date('2014/11/08') monday --&gt; new Date('2014/10/27') How difficult would it be? Should I even bother trying, or it's a lot more difficult than I'm imagining? Maybe someone has already done something like that? Only dates, time doesn't really matter, also I need to do it on the client, crazy eh?
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/76891776
tagged with: date
type: Question
downvote count: 0
tagged with: javascript
answer count: 3
has title: Parse date(s) out of arbitrary string

http://stackoverflow.com/comment/41921734
type: Comment
type: QuestionComment
has text: `document.getElementById('computer-screen').removeClass('computer-off')`: nodelists don't have add/removeclass methods. You seem to be very confused as to the difference between jQuery and JavaScript.
comment on: http://stackoverflow.com/q/26659749
score: 0

http://stackoverflow.com/q/26617270
type: AnsweredQuestion
tagged with: forms
type: Question
tagged with: validation
tagged with: javascript
has answer: http://stackoverflow.com/a/26617315
has title: JavaScript email validation - String variable before the @
score: 0
accepted answer: http://stackoverflow.com/a/26617315
has body: I need to validate an email address input in JavaScript. The format should be name@xx.xx where "name" is another input text in the form and I have it in a var called "name_input". I don't know how to be sure that the email will contains that variable before the @ sign.
answer count: 1
tagged with: email
tagged with: regex
has comment: http://stackoverflow.com/comment/41845783
favorite count: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/26551121
has comment: http://stackoverflow.com/comment/100912762
has body: It turns out that angular does not support circular references in the equals method. I forked it, committed a fix, and submitted a pull request. Then I found out that similar fixes had already been considered, but rejected because of either performance issues or browser compatibility. For my project, I don't care about browser compatibility, so I'll be using my own patched version of angular to support circular references. pull request discussion here: https://github.com/angular/angular.js/pull/9762#issuecomment-60282505 git fork here: https://github.com/andersonbd1/angular.js
has comment: http://stackoverflow.com/comment/96074385
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/100912025
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/26516859

http://stackoverflow.com/comment/44132854
score: 0
type: Comment
has text: Yes, I use TouchEmulator.js as well as hammer.js
comment on: http://stackoverflow.com/a/27255266
type: AnswerComment

http://stackoverflow.com/q/26612210
has title: How to make Bootstrap Datepicker returns number of days instead of date?
tagged with: momentjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26612759
type: Question
tagged with: javascript
tagged with: jquery
has body: After having searched all over SO to find an answer to my issue, I'm resolved to post a new question : my problem is I want that instead of having Bootstrap Datepicker returns a date, I want it to return the number of days between today and the selected date. My piece of code is: $('#datepicker').datepicker({ language: 'fr', startDate: new Date(), autoclose: true }).on('changeDate', function(e) { var start = moment(e.date); var end = moment(new Date()); var diff = start.diff(end, 'days'); // returns correct number $(this).val(diff); // doesn't seem to have any effect }); Even if I use return diff, #datepicker will always show selected date when I want the number of days between the two dates. Many thanks.
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26612759
tagged with: bootstrap-datepicker

http://stackoverflow.com/q/26565264
answer count: 3
has answer: http://stackoverflow.com/a/26565340
has answer: http://stackoverflow.com/a/26565933
has comment: http://stackoverflow.com/comment/41750363
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/26565340
has comment: http://stackoverflow.com/comment/41749976
has comment: http://stackoverflow.com/comment/41750010
score: 0
has title: How to prevent the insertion of a tab if one already exists?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26565933
has comment: http://stackoverflow.com/comment/41750539
has body: My problem is simple all i need to do is to prevent the insertion of a tab ia one already exists Problem: I have a search bar in which when the user inputs a name the results are wrapped in a div with class.result_container_2 , now when the user clicks on this tab , a tab is inserted in another div with class .selected_recipients . Now i want the script to detect if the tab has already been inserted I've already tried it with .each() but with no luck The script: below is the current script which generates the tab $(document).on('click', ".result_container_2", function() { var to_disp = $(this).data('recipient_disp'); var to_show = $(this).data('recipient_show'); var rel = $(this).attr('rel'); //the current account if (to_disp != rel) { //if the clicked tab is not the current account var a = $(".selected_recipients").children().length; var b = a++; $(".selected_recipients").show().append('' + to_show + 'x'); $(".display_found_query_cont_mess_drawer").hide(); } }); //---for removing recipient---- $(document).on('click', ".recipient_remove", function() { $(this).parent(".recipient_tab").remove(); if ($(".selected_recipients").children().length == 0) { $(".selected_recipients").hide(); } }) /*-------recipients tabs -------*/ .selected_recipients { display: inline-block; padding: 5px 0px; border-bottom: 1px solid #CCC; width: 100%; } .recipient_tab { float: left; display: block; padding: 4px; margin-left: 5px; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2; background-image: -moz-linear-gradient(#777, #666); background-image: -webkit-gradient(linear, left top, left bottom, from(#777), to(#666)); background-image: -webkit-linear-gradient(#777, #666); background-image: -o-linear-gradient(#777, #666); background-image: -ms-linear-gradient(#777, #666); background-image: linear-gradient(#777, #666); } .recipient_remove { padding: 2px; float: left; display: block; margin-left: 5px; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2; ba…
has answer: http://stackoverflow.com/a/26565766
has comment: http://stackoverflow.com/comment/41750686
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41750401
has comment: http://stackoverflow.com/comment/41750513
has comment: http://stackoverflow.com/comment/41750376

http://stackoverflow.com/comment/41836267
score: 1
has text: That's a tough one. It should be working. I'd post in the DataTables forum. Allan has been very helpful.
comment on: http://stackoverflow.com/q/26611601
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26619041
answers question: http://stackoverflow.com/q/26618948
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41850202
has body: I would also suggest getting rid of the inline javascript and just adding the disabling code to that first block of jquery you have.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41849889

http://stackoverflow.com/a/27002666
answers question: http://stackoverflow.com/q/26616277
downvote count: 0
has body: In Meteor, Template helper functions used to be formatted like this: Template.dashboard.tasks = function () { ... }; But that has been deprecated, and the new format is: Template.dashboard.helpers({ tasks: function(){ ... } }); In Jasmine, with the previous formatting, you could access helper functions like: Template.dashboard.tasks(); But now you must call helper functions like this: Template.dashboard.__helpers[' tasks'](); Sanjo (the original author of the meteor-jasmine repo) suggested using a function like this to make it easier to call helper functions (especially if the syntax ends up getting changed again): function callHelper(template, helperName, context = {}, args = []) { template.__helpers[` ${helperName}`].apply(context, args); }
upvote count: 6
type: AcceptedAnswer
score: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/26616277

size
type: Tag
tags question: http://stackoverflow.com/q/26607031
tag name: size

http://stackoverflow.com/a/26559838
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26556970
accepted answer of: http://stackoverflow.com/q/26556970
has body: Yes, in Javascript functions are objects, so they can be assigned to variables just like you're doing in your code here. The function references in your FileStream object are missing this references, such as this._gotFSRead. For example: ReadFile: function (filename) { alert("ReadFile Called"); this._filename = filename; window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, this._gotFSRead, this._fail); return this._dataread; }, There are many places where this is missing, and you need to fix your _fail references too.
score: 0

http://stackoverflow.com/a/26634486
answers question: http://stackoverflow.com/q/26634045
type: Answer
downvote count: 0
has body: As hindmost mentionned, you should add a visible field to app.Project model. Then in ProjectView attach a listener to this field: this.listenTo(this.model, "change:visible", this.onVisibleChange) and the method definition: onVisibleChange: function(){ $(this.el).css('display', (this.get('visible')) ? 'block': 'none') } In your filter method you run over the collection and change the visible field of each model accordingly to if it should or should not being rendered. var ProjectCollection = Backbone.Collection.extend({ url: '/projects', model: app.Project, status: function( status ) { return this.each(function(project){ project.set('visible', project.get('status') == status) }); }, });
score: 1
upvote count: 1

http://stackoverflow.com/a/26644771
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41895573
has body: Yeah, this can be confusing. Angular uses jQLite, a subset of jQuery. $(element) would be a jquery object, and could therefore have jquery functions called upon it. Calling `document.createElement('div').css("background", "green"), for instance, would not work because it is not a jquery-wrapped element. Hope this helps!
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26644661

http://stackoverflow.com/comment/41864315
comment on: http://stackoverflow.com/q/26627629
type: Comment
type: QuestionComment
has text: So, you want to copy the entire object, except for the `thesis` property?
score: 0

http://stackoverflow.com/q/26627996
score: 2
has comment: http://stackoverflow.com/comment/41865378
downvote count: 0
has comment: http://stackoverflow.com/comment/41865653
has body: How can I set the background-color: #ccc to the {{colorLike}} helper? This colour is used for the list items. Names: {{#each userNames}} {{name}} {{/each}} I would also like to register another helper {{colorDislike}} in bacground-colour: #fff. This is so that that if an element exists in a particular field, {{colourDislike}} will over-ride {{colorLike}}. I'm gathering I can achieve this with an 'if' statement. Template.viewPost.helpers({ userNames: function(){ var selectedPostId = Session.get('postId'); var arrayOfLike = Posts.find({_id: selectedPostId}, {fields: {likes: 1}}).fetch(); var sumArray = _.chain(arrayOfLike).pluck('likes').flatten().value(); return Meteor.users.find({_id: {$in: sumArray}}); }, }); The selected post is from the session set from another template created upon clicking the post title. When clicked, the user can see a list of all the userNames of those that liked the post. So I'm aiming to get these names {{name}} to be in a certain colour. When the user clicks the name, they are able to view the 'item' which is a field in this particular user profile on the viewItem template. This template also displayed a button to 'dislike' the item. If so, the userId of the item is stored in the 'dislike' field of the Post document. {{profile.item}} Dislike
has answer: http://stackoverflow.com/a/26628252
tagged with: spacebars
type: AnsweredQuestion
has title: Meteor conditional CSS
has comment: http://stackoverflow.com/comment/41865325
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41865093
linked to: http://stackoverflow.com/q/12127076
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/26629835
favorite count: 0
accepted answer: http://stackoverflow.com/a/26628252
tagged with: css
tagged with: meteor

http://stackoverflow.com/comment/41813454
has text: Cutting and pasting is not exactly the best way to learn how to program...
comment on: http://stackoverflow.com/q/26599580
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/26652203
has comment: http://stackoverflow.com/comment/41915231
has comment: http://stackoverflow.com/comment/42019925
has title: HighCharts - Two datasets and two y-axis
type: Question
has comment: http://stackoverflow.com/comment/41951348
tagged with: highcharts
has comment: http://stackoverflow.com/comment/41962001
tagged with: javascript
has comment: http://stackoverflow.com/comment/42019176
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41909823
has body: I would like to create a chart that should look something like this: As you can see there are two different datasets. Furthermore, I know the mapping of the left values to the right values. The problem is that as soon as I enter two datasets in my chart, the mapping of the values does not work anymore. Is there any possibility in highcharts that I can specify the mapping of two different units? Thanks, enne Edit: This is my current approach: jsfiddle.net/enne87/7r4roq0e/2

http://stackoverflow.com/q/26547025
has title: Restricting the li being sorted within ul area
tagged with: knockout-sortable
answer count: 0
tagged with: knockout.js
type: Question
linked to: http://stackoverflow.com/q/12408015
tagged with: javascript
duplicate of: http://stackoverflow.com/q/12408015
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
has body: I am using Knockout Sortable with template binding for sorting the li's within a ul. How can we restrict the li being sorted within a limited ul area? My code is allowing me to drag and drop any where in the page.
upvote count: 1
has comment: http://stackoverflow.com/comment/41717460

http://stackoverflow.com/q/26566460
has comment: http://stackoverflow.com/comment/41752022
has title: Function not executing when if statement is inserted
tagged with: if-statement
has body: My class assignment is to create a web page that will prompt the user for their age, then decide if that user is too old/young to play in a youth sport team using the AND and OR operators. 2 functions are required, each being called by their own button. One calls the function that determines eligibility using the AND operator and the other calls the function that uses the OR operator. In other assignments I have had no problem prompting the user for input and using that input, but every time I try and use an if statement in my function, the web page acts as if nothing happened when I click the buttons to call these functions. Code pasted below: Aaron Stockdale's Age Range Page Aaron Stockdale's Age Range Check This page will prompt Aaron for his age to check if he can play in the youth team. Click on the button below to enter Aaron's age
possible better answer: http://stackoverflow.com/a/26567541
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26566502
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26566502
upvote count: 1
has answer: http://stackoverflow.com/a/26567541
downvote count: 1

http://stackoverflow.com/comment/41773755
has text: well i suppose the thing is is that I only want the answer to only show up after both links are clicked. if that makes sense?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26568125

http://stackoverflow.com/comment/41672315
comment on: http://stackoverflow.com/q/26521597
has text: I don't think such error could be thrown with just this snippet of code. The `requestAnimFrame` is definitely declared (and also has a non-undefined value - ***tested*** this in Chrome). So the problem could be somewhere else (such as somewhere ***before*** this snippet of code).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26600918
upvote count: 0
has body: I make countdown timer from 00:60 to 00:00. when the timer hit 00:00, I want to refresh the page only once to get new value from database. Is there anyway how to do it? In my case, when the timer hit 00:00, the page will keep refresh.
type: Question
has comment: http://stackoverflow.com/comment/41815929
has comment: http://stackoverflow.com/comment/41815788
tagged with: javascript
score: -1
has title: refresh page only once to get new value from database
has answer: http://stackoverflow.com/a/26600952
downvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41815802
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/41816457

http://stackoverflow.com/q/26642943
has comment: http://stackoverflow.com/comment/41892573
type: Question
has answer: http://stackoverflow.com/a/26643484
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41892562
has comment: http://stackoverflow.com/comment/41892446
tagged with: multidimensional-array
has title: TypeError: Cannot read property "0" from undefined - Javascript
has comment: http://stackoverflow.com/comment/41892507
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/41892899
has body: I am trying to run the following code and I am getting the following error: TypeError: Cannot read property "0" from undefined. (line 111) The line in question would be: perCampaignRows.push([STRATEGISTS[i][1], and here's the full code. var perCampaignRows = []; for (var i = 0; i &lt; STRATEGISTS.length; i++) { var accountIterator = MccApp.accounts() .withCondition("ManagerCustomerId = '" + STRATEGISTS[i][0] + "'") .get(); var mccAccount = AdWordsApp.currentAccount(); while (accountIterator.hasNext()) { var account = accountIterator.next(); MccApp.select(account); Logger.log("Checking " + account.getName() + " - CID: " + account.getCustomerId()); var campaignIterator = AdWordsApp.campaigns() .withCondition("Status = ENABLED") .get(); var activeCampaigns = campaignIterator.totalNumEntities(); if (activeCampaigns === 0) { Logger.log("No Active Campaigns"); perCampaignRows.push([ STRATEGISTS[i][1], STRATEGISTS[i][2], account.getCustomerId(), account.getName(), activeCampaigns, '', '', '', '', '', '', '', '', '', '', ]); } else { Logger.log(activeCampaigns + " Active Campaigns"); } while (campaignIterator.hasNext()) { var campaign = campaignIterator.next(); Logger.log("Campaign: " + campaign.getName()); var mobileBid = checkPlatform(campaign); var isRotatingEvenly = checkAdRotation(campaign); var sitelinkData = checkSitelinks (campaign); var isUsingMobileAds = checkAds(campaign); var callExtData = checkCallExtensions(campaign); var isUsingAdSchedule = checkAdSchedules(campaign); var isSomewhatLimitedByBudget = checkBudgetLimitations(campaign); if (isUsingAdSchedule &amp;&amp; isSomewhatLimitedByBudget) { var warnAboutBudgetAndSchedule = "TRUE"; } else { var warnAboutBudgetAndSchedule = "FALSE"; } Logger.log(perCampaignRows); perCampaignRows.push([ STRATEGISTS[i][1], STRATEGISTS[i][2], account.getCustomerId(), account.getName(), activeCampaigns, campaign.getName(), mobileBid, isRotatingEvenly, sitelinkData[0], sitelinkData[1], sitelinkData[2], isUsingMobileAds, callExtDa…

http://stackoverflow.com/comment/41878842
type: Comment
has text: Because divs are block-level elements by default, if you want them to appear in a row, you need to set the inner div css to "display:inline-block;" [like this](http://jsfiddle.net/1qk3voxq/2/). I'm not sure what you mean about the classes.
score: 0
comment on: http://stackoverflow.com/a/26635015
type: AnswerComment

http://stackoverflow.com/comment/41823325
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26604823
has text: @TimDev Yes ofc. Otherwise it would have worked ;) but why does it differ?

http://stackoverflow.com/comment/41792497
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26571739
score: 0
has text: bower info angular-ngkit returns the expected results. Is this question still relevant?

http://stackoverflow.com/q/26594022
type: Question
tagged with: google-maps-markers
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: variables
favorite count: 0
has title: Javascript variable loop
has answer: http://stackoverflow.com/a/26594107
score: -1
has comment: http://stackoverflow.com/comment/41802751
type: UnansweredQuestion
downvote count: 1
tagged with: loops
has body: I need to assign 50 map markers for a google map. I don't want to have the (almost) same line of code 50 times. What is the best way to loop through this easily and optimize code? var marker1 = new google.maps.Marker({position: new google.maps.LatLng(location1_latitude,location1_longitude),map: map1,title:location1}); var marker2 = new google.maps.Marker({position: new google.maps.LatLng(location2_latitude,location2_longitude),map: map1,title:location2}); var marker3 = ... repeating to var marker50 = new google.maps.Marker({position: new google.maps.LatLng(location50_latitude,location50_longitude),map: map1,title:location50});

http://stackoverflow.com/q/26668474
has comment: http://stackoverflow.com/comment/132331895
tagged with: javascript
has comment: http://stackoverflow.com/comment/41945578
score: 0
tagged with: node.js
answer count: 0
type: UnansweredQuestion
tagged with: web-scraping
has title: Why can't I use that kind of ID as context with Cheerio?
has comment: http://stackoverflow.com/comment/41966747
has body: I try to scrape some links from Yahoo Finance, using node.js and cheerio. But I can't make it work with Yahoo ID's as context. Here's the code I try to use: var request = require('request'), cheerio = require('cheerio'); urls = []; request('http://finance.yahoo.com', function(err, resp, body) { if(!err &amp;&amp; resp.statusCode == 200) { var $ = cheerio.load(body); $('a', '#yui_3_16_0_1_1414729926453_1539').each(function() { var url = $(this).attr('href'); urls.push(url); }); console.log(urls); } }); Maybe someone could help with a hint where I'm getting things wrong?
type: Question
tagged with: cheerio

http://stackoverflow.com/comment/41842508
score: 0
type: AnswerComment
has text: That's a great diagnosis, but if you're in doubt you can use the codes that i put and test that your self. Thanks alot
type: Comment
comment on: http://stackoverflow.com/a/26615054

http://stackoverflow.com/q/26643049
answer count: 2
has comment: http://stackoverflow.com/comment/41892681
has comment: http://stackoverflow.com/comment/41892989
has comment: http://stackoverflow.com/comment/41892671
has title: Is it possible to create a basic car game without Object Oriented programming?
has comment: http://stackoverflow.com/comment/41892683
favorite count: 0
accepted answer: http://stackoverflow.com/a/26643225
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41892716
downvote count: 3
has body: For my grade 10 computer science project, me and my partner are creating a car game with html and Javascript (with jquery). Is it possible and feasible to do this without Object Oriented programming, which my teacher tells us that we cannot use?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41892674
has comment: http://stackoverflow.com/comment/41892696
possible better answer: http://stackoverflow.com/a/26643104
score: -2
has answer: http://stackoverflow.com/a/26643104
tagged with: javascript
has comment: http://stackoverflow.com/comment/41893221
has comment: http://stackoverflow.com/comment/41892639
has answer: http://stackoverflow.com/a/26643225

servlets
tags question: http://stackoverflow.com/q/26607791
tags question: http://stackoverflow.com/q/26561727
tags question: http://stackoverflow.com/q/26542414
tags question: http://stackoverflow.com/q/26531500
tags question: http://stackoverflow.com/q/26524067
tag name: servlets
type: Tag
tags question: http://stackoverflow.com/q/26670748

http://stackoverflow.com/a/26591380
type: Answer
answers question: http://stackoverflow.com/q/26590827
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41798070
accepted answer of: http://stackoverflow.com/q/26590827
upvote count: 2
type: AcceptedAnswer
has body: TinyMCE doesn't set the textarea value until the form is submitted so you need to manually call tinyMCE.triggerSave(); before getting the value.

http://stackoverflow.com/a/26646924
has body: I think it isn't possible do drag an element outside of his frame, instead of the iframe you could use a div which loads the "abc.aspx": $("#iframediv).load("path/to/abc.aspx");
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26646627

http://stackoverflow.com/a/26660992
has comment: http://stackoverflow.com/comment/41928236
has body: You are misusing writeUInt16LE and writeUInt32LE. If you want to write the 32-bit integer 0x5622 in little endian, for instance, you should use buf.writeUInt32LE(0x5622, 24); You are reversing every value that you write in little endian, resulting in those appearing in the file in big endian, which is going to result in an invalid file. For concreteness, here is how I would rewrite your code: var fs = require("fs"); var buf = new Buffer(176400); var fileName = "i_write_this_wave.wav"; var fd = fs.openSync(fileName, "w"); buf.writeUInt32BE(0x52494646, 0); buf.writeUInt32LE(buf.length-8, 4); buf.writeUInt32BE(0x57415645, 8); buf.writeUInt32BE(0x666d7420, 12); buf.writeUInt32LE(0x10, 16); buf.writeUInt16LE(0x01, 20); buf.writeUInt16LE(0x02, 22); buf.writeUInt32LE(0x5622, 24); buf.writeUInt32LE(0x15888, 28); buf.writeUInt16LE(0x04, 32); buf.writeUInt16LE(0x10, 34); buf.writeUInt32BE(0x64617461, 36); buf.writeUInt32LE(buf.length-44, 40); var vl = 32000; var of = 44; while (of &lt; 176400) { buf.writeUInt16LE(vl, of); of = of + 2; } fs.writeSync(fd, buf, 0, buf.length);
accepted answer of: http://stackoverflow.com/q/26659844
answers question: http://stackoverflow.com/q/26659844
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41926714
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41926119

http://stackoverflow.com/comment/41900908
type: Comment
type: QuestionComment
score: 1
has text: @KarlViiburg $(function() { does the same thing
comment on: http://stackoverflow.com/q/26648118

http://stackoverflow.com/a/26590327
has body: A JSON object is hardly any different than a plain object and can be traversed in exactly the same way, i.e. using a loop: .success(function (transport) { for ( var idx in transport.result ) { // idx == 'CAR', then idx == 'BUS' etc. // transport.result[idx] = [ ["myCar1", 12223], ["myCar2", ...], ... ], etc. doStuffWith(transport.result[idx]); } }
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26589869
score: 2
accepted answer of: http://stackoverflow.com/q/26589869
downvote count: 0

http://stackoverflow.com/q/26617290
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41851773
has comment: http://stackoverflow.com/comment/41854041
tagged with: bind
tagged with: coldfusion
has title: bind onload with coldfusion
has comment: http://stackoverflow.com/comment/41935931
type: Question
tagged with: javascript
has body: Using coldfusion and a cfc I have a dynamic form the load and changes. I work fine when I test via localhost and locally on the server however when I try to use it via the URL it does not load. I cannot seem to figure out the issues. The site is jowa-usa.us the contact us page. Also please find the code below. ********Form********* <cfselect name="Market" bindOnLoad="Yes" bind="cfc:data.getMarket()"/> <cfselect name="Country" bindOnLoad="Yes" bind="cfc:data.getCountry()"/> <cfselect name="State" bindOnLoad="Yes" bind="cfc:data.getState({Country})" /> <cfinput type="submit" name="submit" value="Search" validate="required"> *******data.cfc******* SELECT DISTINCT Country FROM dbo.SPCompanies ORDER BY Country <cfset count="1" /> <cfset results = arraynew(2)> <cfset results[count][1]="#country#" /> <cfset results[count][2]="#country#" /> <cfset count= count+1> <cfreturn results /> <cfargument name="country" type="string" required="true"> SELECT DISTINCT State FROM dbo.SPCompanies WHERE country = '#country#' ORDER BY state <cfset count="1" /> <cfset results = arraynew(2)> <cfset results[count][1]="#state#" /> <cfset results[count][2]="#state#" /> <cfset count= count+1> <cfreturn results /> SELECT DISTINCT Market FROM dbo.SPCompanies ORDER BY market <cfset count="1" /> <cfset results[count][1]="#market#" /> <cfset results[count][2]="#market#" /> <cfset count= count+1> <cfreturn results /> Any help would be much apreciated, as I have been struggling to understand why this works only when you go localhost or 127.0.0.1 and not when you visit the site.
score: 0
has comment: http://stackoverflow.com/comment/41847340
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41851766
answer count: 0

http://stackoverflow.com/a/32587878
answers question: http://stackoverflow.com/q/26656836
type: Answer
has comment: http://stackoverflow.com/comment/63646692
downvote count: 0
has body: What works for me is adding the youtube by file and from the JS and then using the onYoutubePlayerAPIReady event like this: window.onYouTubePlayerAPIReady = function(){ var player = new YT.Player('player', { height: '390', width: '640', videoId: 'M7lc1UVf-VE', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); }
score: 6
upvote count: 6

http://stackoverflow.com/q/26595704
type: Question
has answer: http://stackoverflow.com/a/26595798
has comment: http://stackoverflow.com/comment/41806060
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41806024
has body: $(document).ready(function() { var x = ""; $("#anyElement").click(function() { x = "test"; alert(x); }); alert(x); }); When first alert works, messagebox shows "test". when second alert works, messagebox shows " ". $("#anyElement").click(function() { // How can i set the x veriable as "test" here });
answer count: 3
possible better answer: http://stackoverflow.com/a/26595957
accepted answer: http://stackoverflow.com/a/26595810
has answer: http://stackoverflow.com/a/26595957
has title: How to set the global variable in click event?
favorite count: 0
score: 4
has comment: http://stackoverflow.com/comment/41806524
has comment: http://stackoverflow.com/comment/41806103
has comment: http://stackoverflow.com/comment/41806047
tagged with: jquery-click-event
downvote count: 1
type: AnsweredQuestion
upvote count: 5
has comment: http://stackoverflow.com/comment/41806218
tagged with: global-variables
has answer: http://stackoverflow.com/a/26595810

http://stackoverflow.com/comment/41804188
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594456
score: 0
has text: Just tried those numbers like so, Quinoa div.style.transformOrigin = "120px 50px"; And my hypotenuse is still not positioned correctly. Although I see it is in the jsfiddle you posted, I'll take a look at the code there.

http://stackoverflow.com/comment/41821303
has text: @JohnJerrby: Yea, that really means nothing to us. ___How___ do you assign that `myObj` variable? What does it contain?
comment on: http://stackoverflow.com/q/26603982
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41826346
score: 1
comment on: http://stackoverflow.com/q/26606528
type: Comment
type: QuestionComment
has text: PLEASE DO NOT UPDATE QUESTION only minor reason using snippet editor instead of jsfiddle. Is this not a issue. please.

http://stackoverflow.com/comment/41768202
score: 0
has text: edit your html code to `onclick="return editthisframily();"`. Note `return` in this changed code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26575226

http://stackoverflow.com/comment/41668887
score: 0
type: Comment
type: QuestionComment
has text: Thank you @StephenKennedy for your answer. I overlooked that option, past experience with Latin American legislatures' web pages has led me to take the absence of such user-friendly resources for granted. The site map in question offers no clue as to the existence of an official API of FTP. Any hints on how to determine their presence?
comment on: http://stackoverflow.com/q/26516575

http://stackoverflow.com/comment/74599080
type: QuestionComment
has text: @Ron How to tackle multiple file upload? Thanks for responding.
comment on: http://stackoverflow.com/q/26549942
score: 0
type: Comment

http://stackoverflow.com/q/26573749
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26573777
tagged with: forms
answer count: 2
accepted answer: http://stackoverflow.com/a/26593171
possible better answer: http://stackoverflow.com/a/26573777
downvote count: 0
tagged with: javascript
duplicate of: http://stackoverflow.com/q/18774821
has comment: http://stackoverflow.com/comment/44133434
has body: I have a basic HTML form with a submit button at the end. Problem is, the Javascript function I have provided as "onsubmit" handler in the form header is not being called. &lt;form name="Details" method="post" onsubmit="validateForm()" id="Details_Form_ID"&gt; This handler function is defined in the same file as follows: &lt;script type="text/javascript"&gt; function validateForm() { alert('I am an alert box!'); } &lt;/script&gt; When I look at code in Chrome tools, I notice that the above Javascript code itself is wrapped under a &lt;p&gt; element and not shown as a "script"...screenshot below. I suspect that the Javascript is being treated as plain text and hence not executing. How do I overcome this? I am using wordpress and have edited a "post" to include this code.
favorite count: 0
linked to: http://stackoverflow.com/q/18774821
tagged with: http://stackoverflow.com/tag/html
has title: HTML form submit not calling Javascript "onsubmit" handler in Wordpress post
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/26593171
tagged with: wordpress
type: Question

http://stackoverflow.com/q/26591593
upvote count: 2
tagged with: three.js
has answer: http://stackoverflow.com/a/26591938
type: AnsweredQuestion
score: 2
has title: Three.js: How to know if all the textures are fully loaded and shown (and no black rectangles remains)?
accepted answer: http://stackoverflow.com/a/26591938
linked to: http://stackoverflow.com/q/20712047
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/41802173
tagged with: javascript
has body: I am working on a web application where the user builds a house he/she wants built and then can preview it in 3D. When the browser doesn't support WebGL, the house is rendered on the server and a few screenshots are sent to the client. However, if the screenshots are taken to soon, some textures won't show and will be replaced by black rectangles. In three.js, is there an event firing or a way to tell if or when all the textures and fully loaded and shown?
linked to: http://stackoverflow.com/q/16344865
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
tagged with: opengl-es
favorite count: 0

http://stackoverflow.com/comment/41941998
type: Comment
type: QuestionComment
has text: I think that I never mentioned that this code is used in production and it is not for sure. I just playing with JS scope feature to better understand how exactly it works. It's all about curiosity, not the real problems..I hope that this type of questions is allowed in SO, isn't it?)
comment on: http://stackoverflow.com/q/26670116
score: 1

http://stackoverflow.com/a/26638112
answers question: http://stackoverflow.com/q/26638094
has comment: http://stackoverflow.com/comment/41883416
score: 0
has body: It is not able to find the file "/views/checkoutSummary.html". Make sure that the path is correct.
has comment: http://stackoverflow.com/comment/41884379
type: Answer

http://stackoverflow.com/q/26559574
has answer: http://stackoverflow.com/a/26559662
tagged with: radio-button
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41739828
answer count: 3
has answer: http://stackoverflow.com/a/26559645
type: AnsweredQuestion
tagged with: twitter-bootstrap
has body: I'm using bootstrap and I find it confusing when trying to extract the label name. How do I get the selected label text? (e.g. Furniture or Fruits) &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="radio" name="radioGroup" value="myval1" /&gt;&lt;/span&gt; &lt;input class="form-control" value="Furniture" disabled&gt; &lt;/div&gt; &lt;div class="input-group"&gt; &lt;span class="input-group-addon"&gt; &lt;input type="radio" name="radioGroup" value="myval2" /&gt;&lt;/span&gt; &lt;input class="form-control" value="Fruits" disabled&gt; &lt;/div&gt; I tried these but did not give the label text: alert($( $(":radio[name=radioGroup]:checked").prop("labels") ).text()); alert($('input[name="radioGroup"]:checked').text()); alert($('input[name="radioGroup"]:checked + label').text());
accepted answer: http://stackoverflow.com/a/26559602
type: Question
has title: Get bootstrap radio button text - jquery
possible better answer: http://stackoverflow.com/a/26559645
has answer: http://stackoverflow.com/a/26559602
score: 0

http://stackoverflow.com/a/50221215
has body: There are in general two ways to do this as far as I know. One is to use setTimeout (or requestAnimationFrame if you are doing this in a supporting environment). @Alnitak shown how to do this in another answer. Another way is to use a web worker to finish your blocking logic in a separate thread, so that the main UI thread is not blocked. Using requestAnimationFrame or setTimeout: //begin the program console.log('begin'); nonBlockingIncrement(100, function (currentI, done) { if (done) { console.log('0 incremented to ' + currentI); } }); console.log('do more stuff'); //define the slow function; this would normally be a server call function nonBlockingIncrement(n, callback){ var i = 0; function loop () { if (i &lt; n) { i++; callback(i, false); (window.requestAnimationFrame || window.setTimeout)(loop); } else { callback(i, true); } } loop(); } Using web worker: /***** Your worker.js *****/ this.addEventListener('message', function (e) { var i = 0; while (i &lt; e.data.target) { i++; } this.postMessage({ done: true, currentI: i, caller: e.data.caller }); }); /***** Your main program *****/ //begin the program console.log('begin'); nonBlockingIncrement(100, function (currentI, done) { if (done) { console.log('0 incremented to ' + currentI); } }); console.log('do more stuff'); // Create web worker and callback register var worker = new Worker('./worker.js'), callbacks = {}; worker.addEventListener('message', function (e) { callbacks[e.data.caller](e.data.currentI, e.data.done); }); //define the slow function; this would normally be a server call function nonBlockingIncrement(n, callback){ const caller = 'nonBlockingIncrement'; callbacks[caller] = callback; worker.postMessage({ target: n, caller: caller }); } You cannot run the web worker solution as it requires a separate worker.js file to host worker logic.
score: 4
has comment: http://stackoverflow.com/comment/118389532
type: Answer
answers question: http://stackoverflow.com/q/26615966
upvote count: 4
downvote count: 0

dom3
tags question: http://stackoverflow.com/q/26554911
type: Tag
tag name: dom3

http://stackoverflow.com/a/26622685
answers question: http://stackoverflow.com/q/26622366
has comment: http://stackoverflow.com/comment/41858016
downvote count: 0
has comment: http://stackoverflow.com/comment/41857338
type: Answer
score: 1
has body: The solution is to define a publish function on the server that takes as a parameter the search keyword. Meteor.publish('files', function publishFunction(keywords) { check(keywords, String); // https://docs.meteor.com/#/full/check_package return Files.find({ $or: [ { name: keywords }, { description: keywords }, { tags: keywords } ]}, { sort: ... limit: ... fields: ... } ); }); Then on the client, pass the keywords as a parameter: waitOn: function () { return Meteor.subscribe('files', keywords); } It's also worth noting that there might be packages doing what you want already, e.g. autocomplete or datatables. See also Understanding Meteor publish/subscribe.
upvote count: 1

http://stackoverflow.com/q/26584812
has answer: http://stackoverflow.com/a/75183700
has comment: http://stackoverflow.com/comment/41785348
type: Question
has comment: http://stackoverflow.com/comment/104039638
has answer: http://stackoverflow.com/a/79144636
has answer: http://stackoverflow.com/a/26585143
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41785432
answer count: 6
has body: I am creating some elements dynamically with jquery. (say with id test_element1, test_element2 and so on..) I have the below CSS - div[id^=test_]:before { content: ""; height: 100%; width: 100%; box-shadow: #aaaaaa 0px 0px 10px inset; position: absolute; left: 0px; top: 0px; z-index: -1; } The ::before element does not show up when I inspect the element. It shows up only if the test_element1 is already present in my HTML (ie. static content). How do I make the ::before appear for my dynamic elements ?
score: 12
has title: How to add ::before pseudo element on elements created dynamically by jQuery
has answer: http://stackoverflow.com/a/62497351
has comment: http://stackoverflow.com/comment/41785399
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/70731234
has answer: http://stackoverflow.com/a/65599189
tagged with: css
downvote count: 1
upvote count: 13
has comment: http://stackoverflow.com/comment/41871421
has comment: http://stackoverflow.com/comment/139556978

http://stackoverflow.com/comment/41911343
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26653771
has text: Are you sure that this setup with the one radio button is working on other browsers? Have you tried to "uncheck" your radio button? You can try to specify the value attribute to "fix" this: ` `. Because in KO the checked binding is working differently for radio buttons and you have to work extra to properly work with boolean values: http://stackoverflow.com/questions/10127001/binding-true-false-to-radio-buttons-in-knockout-js
score: 1

http://stackoverflow.com/comment/41807686
type: Comment
comment on: http://stackoverflow.com/q/26596216
score: 0
type: QuestionComment
has text: It is actually not working on the same url. There must be something wrong with my ajax post call

http://stackoverflow.com/q/26565770
upvote count: 4
answer count: 2
tagged with: ember.js
downvote count: 0
tagged with: ember-cli
favorite count: 0
has answer: http://stackoverflow.com/a/26567049
type: UnansweredQuestion
score: 4
has answer: http://stackoverflow.com/a/26943529
tagged with: unit-testing
type: Question
has title: EmberJS + EmberCLI Unit Test Helper Function Undefined
tagged with: javascript
has body: I am trying to get a test helper working using Ember CLI, but I always get [functionName] is undefined. Here is my test, helper, as according to the emberjs docs: `import Ember from "ember"` acceptanceHelpers = -&gt; Ember.Test.registerAsyncHelper("performLogin", (app) -&gt; visit "/login" fillIn("#username", "sampleusername") fillIn("#password", "samplepassword") click(".form-actions button:first") wait() ) `export default acceptanceHelpers` And where I use it: login-test.coffee: `import Ember from "ember"` `import startApp from "../helpers/start-app"` `import acceptanceHelpers from "../helpers/acceptance-helpers"` App = null module "Acceptance: Login", setup: -&gt; App = startApp() teardown: -&gt; Ember.run App, "destroy" test "User is able to log in / transition to dashboard", -&gt; performLogin() andThen -&gt; equal(currentRouteName(), "dashboard") But I get: ReferenceError: performLogin is not defined at Object.module.setup (unhost/tests/acceptance/login-test.js:15:16) at Object.Test.setup (http://localhost:4200/assets/test-support.js:1063:31) at http://localhost:4200/assets/test-support.js:1168:10 at process (http://localhost:4200/assets/test-support.js:887:24) at http://localhost:4200/assets/test-support.js:476:5 How can I configure my acceptance test to properly use defined test helpers in Ember CLI?

http://stackoverflow.com/comment/41697033
type: QuestionComment
has text: @epascarello `value < 0 ? '(' + String(value.toFixed(0)).split('').reverse().chunk(3).map(function(chunk) { return chunk.reverse().join(''); }).join(',') + ')' : String(value.toFixed(0)).split('').reverse().chunk(3).map(function(chunk) { return chunk.reverse().join(''); }).join(',')`
comment on: http://stackoverflow.com/q/26534997
score: 0
type: Comment

http://stackoverflow.com/a/26668329
type: Answer
has body: Purely going out from your example (doing this in html), the following should work: document.getElementById("demo").innerHTML = "Hello &lt;br /&gt; Dolly."; &lt;p id="demo"&gt;&lt;/p&gt; EDIT: just mentioning @ahmadalbayati's name here who provided the answer first in a comment, though I have not seen that before posting this answer (probably didn't refresh the screen).
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26668232
score: 3
answers question: http://stackoverflow.com/q/26668232
has comment: http://stackoverflow.com/comment/41937834
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41937803

http://stackoverflow.com/comment/41889422
comment on: http://stackoverflow.com/a/26638249
type: AnswerComment
has text: That was great, thanks. One more question - how can I make the transition between the slides smoother? Like fade..It may seem obvious, but I am terrible with coding. Fine with html and css, but terrible with programming languages.
score: 0
type: Comment

http://stackoverflow.com/comment/41759417
has text: For some reason it still is not working, I am getting "Uncaught TypeError: Cannot read property 'length' of null" in imagesloaded.js even though I am importing it as you did. My code is the exact same as your codepen. The only difference is I have a js file containing the javascript in the right pane of codepen. I am importing this js file at the top of my html (also tried it on the bottom).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26541548
type: AnswerComment

http://stackoverflow.com/q/26593005
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41806656
tagged with: input
upvote count: 1
tagged with: file
type: Question
has body: Is there a way to open an html file using javascript in a new tab? I would want the user to select an html file using the &lt;input type="file"&gt;. After selecting a file, some JavaScript code will open that html file.
has comment: http://stackoverflow.com/comment/41801326
has answer: http://stackoverflow.com/a/26594812
has comment: http://stackoverflow.com/comment/41801167
tagged with: javascript
tagged with: jquery
score: -1
has title: Open an html file programatically using javascript in a new browser tab from disk
has comment: http://stackoverflow.com/comment/41800898
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/41714791
has text: I cut and pasted your second example into a page here that I loaded in Firefox and I get `foo` both times, which is exactly what I expected would happen. In other words, I cannot reproduce the problem you describe there. Make sure you are using a recent version of RequireJS (2.1.15 is latest at time of writing).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26541110

http://stackoverflow.com/comment/41889182
type: QuestionComment
comment on: http://stackoverflow.com/q/26638331
has text: I mean something like this: `force.on('tick', function() { force.alpha( force.alpha() / .995 ); })`
score: 0
type: Comment

http://stackoverflow.com/comment/41885447
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26638774
has text: the fact that OP was pretty explicit about that constraint at least warranted the note. Hopefully they didn't realise that extra bit would lead to an impossible geometry and they've just learned something =)
score: 0

http://stackoverflow.com/comment/41677375
type: QuestionComment
comment on: http://stackoverflow.com/q/26516575
score: 1
has text: I don't speak Spanish so can't really help there, but you could always drop them an email or call them. You might even be able to get a DVD. Chances are they will say no but imho its worth the few minutes to find out before you spend hours or days on a brute force solution. Good luck either way.
type: Comment

http://stackoverflow.com/a/26654433
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26653721
score: 2
has body: Django collect static automatically in STATIC_ROOT accessed by STATIC_URL. Put your "base" statics like bootstrap in your project package (project package is a dir with init.py) simpleform &gt; static &gt; bootstrap &gt; copy here all tree dirs from bootstrap package: css, fonts, js. And store your application statics in signup &gt; static &gt; also create css, js dirs. So if hai.css is one of basic css that you will use in your base.html put it to simpleform &gt; static &gt; css &gt; hai.css. settings.py This is how you should make available project statics: STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'simpleform/static'), ) And for applications statics: STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) Also you have set a directory where django should store collected statics and uploaded media (and urls for accessing them). For example this is set it to src &gt; static and src &gt; media: STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' simpleform.urls if settings.DEBUG: # static files (images, css, javascript, etc.) urlpatterns += patterns( '', url(r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT}), url(r'^static/(?P&lt;path&gt;.*)$', 'django.views.static.serve', { 'document_root': settings.STATIC_ROOT}), ) template {% load staticfiles %} &lt;link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet" media="screen"&gt; &lt;link href="{% static 'css/hai.css' %}" rel="stylesheet" media="screen"&gt;

http://stackoverflow.com/q/26652327
has comment: http://stackoverflow.com/comment/41909634
has title: Finding object with lowest value for some key, in Javascript
has comment: http://stackoverflow.com/comment/41909647
has body: In my Javascript program, I have a list of Person objects. For example [ "Michael": { "age": 45, "position": "manager", ... }, "Dwight": { "age": 36, "position": "assistant manager", ... }, .... ] I want to find the youngest Person. I've accomplished this by creating two arrays: one of all the Persons and one of all their ages, and getting the index of the lowest age and applying it to the first array. Like: var arrayOfPersons = [persons[0], persons[1], ....]; var arrayOfAges = [persons[0].age, persons[1].age, ....]; var min = arrayOfAges.indexOf(Math.max.apply(Math, arrayOfAges)); var youngestPerson = arrayOfPerson[min]; The problem with this is it is inefficient doesn't seem like the best way. Also it doesn't deal with the fact that there may be a tie for youngest. Does anyone know of a more native, simpler way to do this?
has comment: http://stackoverflow.com/comment/41908277
tagged with: min
type: AnsweredQuestion
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/26652652
type: Question
has comment: http://stackoverflow.com/comment/41908221
accepted answer: http://stackoverflow.com/a/26652652
score: 0
answer count: 1
tagged with: object

http://stackoverflow.com/q/26585566
favorite count: 0
tagged with: angularjs
has body: I have controller homemodule.controller("productController", function ($scope, $http, $resource, dataServiceSingleProduct, $routeParams) { $scope.data = dataServiceSingleProduct; dataServiceSingleProduct.getProduct() .then(function () { //success }, function () { // error alert("could not load product"); }); }); and data service homemodule.factory("dataServiceSingleProduct", function ($http, $q) { return { product: _product, getProduct: _getProduct }; // implementation var _product = []; var _getProduct = function () { var deferred = $q.defer(); $http.get("/Data/GetProduct", { params: { "id": 2 } }) .then(function (result) { // success angular.copy(result.data, _product); deferred.resolve(); }, function () { // error deferred.reject(); }); return deferred.promise; }; }); This works with this hardcoded parameter id (params: { "id": 2 }) My question is: How can I send read id parameter in dataServiceSingleProduct service. It's available on controller using $routeParams.
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26586007
type: Question
accepted answer: http://stackoverflow.com/a/26586007
has title: read parameter value in dataservice
score: 2
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/41917426
type: Comment
type: QuestionComment
has text: Actually what you are going to do? Jqueru on() accept first argument as some event. But what you trying to pass? I can't understand your goal!
comment on: http://stackoverflow.com/q/26657323
score: 0

http://stackoverflow.com/a/42817534
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26664285
accepted answer of: http://stackoverflow.com/q/26664285
score: 1
has body: This is great: https://alisdair.mcdiarmid.org/kill-sticky-headers/ A sticky header is a sure sign of stuff you don't want on your screen, and this just destroys them! Could probably modify it to change them from fixed to static, but I haven't found a case where I actually want to.
type: AcceptedAnswer

http://stackoverflow.com/comment/41869296
comment on: http://stackoverflow.com/q/26630373
score: 0
type: Comment
has text: Hi @DavidG When I change it from != to == my modal popup breaks.
type: QuestionComment

http://stackoverflow.com/q/26651990
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26652077
linked to: http://stackoverflow.com/q/251420
score: 2
has body: I have an asp.net web page that contains some javascript code and an Iframe element that views a different web page , my question is : are there any available ways to make these two windows communicate with each other ? For eaxmple : I have a function called "Say HelloWorld" in the asp.net javascript code that should be invoked from the Iframe if a button in the Iframe page was clicked
downvote count: 0
tagged with: asp.net
favorite count: 0
has title: Talking between different javascript windows?
upvote count: 2
tagged with: iframe
has comment: http://stackoverflow.com/comment/41907567
has answer: http://stackoverflow.com/a/26652077
type: AnsweredQuestion
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26652088
has answer: http://stackoverflow.com/a/26652088

http://stackoverflow.com/comment/41749439
comment on: http://stackoverflow.com/q/26565070
type: Comment
type: QuestionComment
has text: If you assign an object to another variable, you are not cloning the object, instead, both variables will contain the same reference to the same data in memory. Therefore, you must clone the objects. See http://stackoverflow.com/q/122102/1529630 and http://stackoverflow.com/q/728360/1529630
score: 1

http://stackoverflow.com/comment/42083376
score: 0
type: AnswerComment
has text: setInterval does the job to initialize autocompletes periodically.
comment on: http://stackoverflow.com/a/26568265
type: Comment

http://stackoverflow.com/q/26601347
has comment: http://stackoverflow.com/comment/41858835
answer count: 2
has comment: http://stackoverflow.com/comment/41832011
possible better answer: http://stackoverflow.com/a/27186735
has answer: http://stackoverflow.com/a/26776379
tagged with: javascript
favorite count: 0
tagged with: google-chrome-extension
has body: I am developing a chrome extension in which one can select a color scheme from list given in popup and apply it to the open (highlighted) tab. From one of code snippet I comes to know that using code : "document.body.style.backgroundColor='red'" in chrome.tabs.executeScript change the background color. but there is only one line in code. What my steps are select the color scheme from popup get the class name of the selected li apply that class to the DOM document Please see the code below popup.js document.addEventListener('DOMContentLoaded', function () { var li = document.querySelectorAll('li'); for (var i = 0; i < li.length; i++) { li[i].addEventListener('click', click); } }); function click(e) { // console.log(e.target.className); // gives correct value chrome.tabs.executeScript(null, { code : "var scriptOptions = { param1: e.target.className} ;"}, function(e){ console.log('clicked class'); console.info(param1); // gives nothing document.body.setAttribute('class', e.target.className); }); window.close(); } How to get e.target.className inside function(e) ? again If I use jquery. it changed the that popup background color only, see the code $(function(){ console.log('jQuery added'); $(document).on ('click', 'li', function(){ var cl = this.className; $('body').removeClass().addClass(cl); }); }); Please tell me What is the proper way to accomplish this in both javascript and jQuery
has comment: http://stackoverflow.com/comment/42130274
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/26776379
has comment: http://stackoverflow.com/comment/41856111
score: 1
has title: How to apply class to the active tab page from chrome extension
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42130864
has answer: http://stackoverflow.com/a/27186735
has comment: http://stackoverflow.com/comment/42124467

http://stackoverflow.com/comment/41659327
type: QuestionComment
has text: @Al.G. Doesnt a blank href reload the current page?
comment on: http://stackoverflow.com/q/26514695
score: 0
type: Comment

http://stackoverflow.com/q/26608377
tagged with: javascript
has title: How do I append a range of JSON data to my HTML using Javascript or Jquery?
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26608586
accepted answer: http://stackoverflow.com/a/26608586
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26608470
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26608541
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26608470
type: Question
has body: What I am trying to do is to break-up what I grab from my JSON file. For example say my JSON data looks like this: { "paintings": { "painting": [ { "title": "Boardwalk 5", "artist": "Arnie Palmer", "image": "ap1.jpg", "price": 850 }, { "title": "A Lasting Piece", "artist": "Arnie Palmer", "image": "ap2.jpg", "price": 450 }, { "title": "Surf at High Tide", "artist": "Arnie Palmer", "image": "ap3.jpg", "price": 950 }, { "title": "The Games We Play", "artist": "Arnie Palmer", "image": "ap4.jpg", "price": 850 } ] } } I want append to the first 2 items in my JSON array then append items 3 and 4 to . Here is how I am pulling all my data: $(document).ready(function () { $.ajax({ type: 'GET', url: 'data.json', dataType: 'json', success: jsonParser }); }); function jsonParser(json) { $('#load').fadeOut(); $.getJSON('data.json', function(data){ $.each(data.paintings.painting, function(k,v){ var title = v.title; var img = v.image; var price = v.price; ///here is where I need help $('.area1').append(' ' + title + ' $' + price + ' ') }); }); } And here is my HTML: ...first half of JSON data here... ... second half of JSON data here So one JSON file with the data broken up then appended to two areas

http://stackoverflow.com/a/26645551
upvote count: 8
has comment: http://stackoverflow.com/comment/41899391
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/59936685
accepted answer of: http://stackoverflow.com/q/26645271
answers question: http://stackoverflow.com/q/26645271
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/41932777
has comment: http://stackoverflow.com/comment/44558671
has body: I would use document.cookie with a factory code like this: Creates a cookie (for example this one expires in a year): app.factory('$remember', function() { return function(name, values) { var cookie = name + '='; cookie += values + ';'; var date = new Date(); date.setDate(date.getDate() + 365); cookie += 'expires=' + date.toString() + ';'; document.cookie = cookie; } }); This factory removes the cookie: app.factory('$forget', function() { return function(name) { var cookie = name + '=;'; cookie += 'expires=' + (new Date()).toString() + ';'; document.cookie = cookie; } }); Then whenever a user successfully logs in cache the key using $remember: $remember('my_cookie_name', response.user._id); And always check if the cookie is there when logging in the user else use a a standard login and save it to their cookies. If the remember me is not enabled, forget the document.cookie
downvote count: 0

http://stackoverflow.com/comment/41845772
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/26617172
type: Comment
has text: No, listening on multiple elements is something unique to jQuery. CC @pbaldauf

http://stackoverflow.com/comment/41742737
comment on: http://stackoverflow.com/a/26561143
type: Comment
has text: But that won't work if you don't know the number of vars until run time. You would actually have to create the function on the fly from a string and then do multiple evals then!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42008879
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26649460
score: 0
has text: @GreenSky It's going to be hard to provide a work-around for one of the most important security features in the language. My only suggestion would be to make it a .js file that puts its data on some global variable and include that in a script tag, but then it's no longer json. Or deploy to an http server but that was already suggested.

http://stackoverflow.com/comment/103839137
has text: @RichardLöwenström I am using Full calendar 4 version. it does not work. Do you have any other solution for version 4. Thanks.
type: Comment
comment on: http://stackoverflow.com/a/26597869
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41845638
score: 0
type: Comment
has text: To be frank, I'll be amazed if I can do what I'm asking. But the post you've mentioned is not a veto for my question. I'm not trying to abort the sent request. I'm trying to divert it before it is even sent. Which means I'm trying to prevent any request from being sent and instead load them from a previously downloaded Data URI Scheme string.
comment on: http://stackoverflow.com/a/26617102
type: AnswerComment

http://stackoverflow.com/q/26656541
type: UnansweredQuestion
has title: Javascript: Display all the comparison results in a loop in a table form
has comment: http://stackoverflow.com/comment/41915747
tagged with: javascript
type: Question
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: My code below might have several matching results but it is now displaying only the last match in the table I have created. How would make a dynamic table so that all the results can be displayed? I am fairly new in javascript so excuse my lack of use of proper terms. for(var i = 0; i &lt; result.length; i++) { var obj = result[i]; //console.log(obj); var item = obj.item_name; var price = obj.item_price; var re = new RegExp("^.*"+input_item+".*","gi"); if(item.match(re)){ document.getElementById('item_name').innerHTML = item document.getElementById('item_price').innerHTML = price } /*else { alert("doesnt match") }*/ }
has comment: http://stackoverflow.com/comment/41915639
answer count: 0
has comment: http://stackoverflow.com/comment/41915537

http://stackoverflow.com/q/26670154
downvote count: 0
tagged with: javascript
tagged with: dom-events
score: 4
tagged with: keycode
favorite count: 0
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/60983156
tagged with: phantomjs
has body: I am trying to automate some things only with phantomjs. Doing the same work with casperjs works but the challenge is to get it working only with phantomjs. I want to press enter in a normal textfield which I have focused on. page.sendEvent('keypress', page.event.key.A); //this works page.sendEvent('keypress', page.event.key.Enter); //this doesn't work The script runs without any errors but in the output I can see that the enter event did not work. I tested another function which worked: page.sendEvent('keypress', page.event.key.A); //this works page.sendEvent('keypress', page.event.key.Backspace); //this works Why is only the enter event not working? Every other key works. Is there a way to do it with keycodes?
linked to: http://stackoverflow.com/q/21843958
has title: Phantomjs: Function sending a keypress event doesn't work with enter
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/41941403

http://stackoverflow.com/comment/41874712
type: Comment
type: QuestionComment
has text: dateFormat could be any: `dd/mm/yyyy` for example ;) @CodeGodie
comment on: http://stackoverflow.com/q/26631013
score: 0

http://stackoverflow.com/comment/41716386
comment on: http://stackoverflow.com/a/26546734
has text: That is not at all Javascript map. It's Javascript object.
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/a/26650892
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41905727
answers question: http://stackoverflow.com/q/26650471
has comment: http://stackoverflow.com/comment/41905833
downvote count: 0
type: Answer
has body: Change jQuery to this: $('select.btn').on('change', function() { var animal_type = $('#animalType option:selected').text(); var animal_town = $('#animalTown option:selected').text(); $.ajax({ type: 'POST', url: '/public/rehomed', data: { 'query': { 'animal_type': animal_type } }, // or 'name': animal_name etc success: function(data) { console.log(data); } }); }); then in controller: class PublicController &lt; ApplicationController def rehomed respond_to do |format| format.js { render :json =&gt; Animal.where(params[:query]) } end end end Note: queries as shown above may open a serious security issue, so do NOT do it unless you have a very strong reason or you know what you're doing. If you don't change the jQuery shown above, then you will have to fetch the submitted value presented in params inside your controller like this : def rehomed respond_to do |format| format.js { render :json =&gt; Animal.where(:animal_type =&gt; params[:animal_type]) } end end

http://stackoverflow.com/a/26557286
score: 1
accepted answer of: http://stackoverflow.com/q/26557216
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: You will need to wait for the DOM to finish loading in order for your JS code to be aware of the checkboxes. Something like this (place it in the head or body, doesn't matter): &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('.chk_boxes').click(function(){ $('.chk_boxes1').attr('checked',$(this).is(':checked')); } }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/41736178
has comment: http://stackoverflow.com/comment/41736028
answers question: http://stackoverflow.com/q/26557216
downvote count: 0

http://stackoverflow.com/comment/41745569
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26562727
type: AnswerComment
has text: I still don't understand how to escape the "{" and "(" if they are already in the string. It seems like a recursive problem. If I new how to escape it, then I could escape it! XD

http://stackoverflow.com/q/26601743
type: Question
tagged with: dynamics-crm-2011
possible better answer: http://stackoverflow.com/a/32133483
tagged with: javascript
tagged with: odata
score: 0
has body: I have Web Resource (HTML + JavaScript) which contains a button in it. I wanted to show View on click of button. Can I use OData to filter contents of view and show it? To be more specific, I want to pass filter (preferably OData) to my created view, or existing view, and show it on button click. I wanted to open view of Contact entity. To show the entity form I used following code, but what to use with view? var parameters = {}; parameters["ContactID"] = guid; Xrm.Utility.openEntityForm("contact", parameters); Kindly suggest how to achieve in Dynamics CRM? Thanks.
answer count: 2
accepted answer: http://stackoverflow.com/a/28818468
tagged with: xrm
type: AnsweredQuestion
tagged with: dynamic
has answer: http://stackoverflow.com/a/28818468
has answer: http://stackoverflow.com/a/32133483
has title: How to show view on button click?

http://stackoverflow.com/comment/41771324
type: Comment
has text: The synatx error in the jquery.min.js doesn't show up when I run the console on one of the pages in the main directory, so I guess this is the problem, even though all the pages reference this same file. But the jquery.min.js file is jargon to me,I don't know how to fix the syntax error.
comment on: http://stackoverflow.com/q/26564323
score: 0
type: QuestionComment

http://stackoverflow.com/a/26631871
answers question: http://stackoverflow.com/q/26596842
score: 0
has body: Okay so I figured out my issue. I forgot that Date.now() gives the date since 12am on some day. I took that in ms, transferred it to seconds, took the MOD of that % 7200 and subtracted 7200 from that to get it to count down. Then I just did some rounding and simple subtraction to get hours minutes and seconds. var end = Date.now(); var div = (end / 1000); var time = (div / 7200); var timesince = (div % 7200); var timebefore = (7200 - timesince); var hours = Math.floor(timebefore / 3600); var minutes = Math.floor(timebefore / 60 - hours * 60); var seconds = Math.floor(timebefore - minutes * 60 - hours * 3600); document.write(hours + ":" + minutes + ":" + seconds);
type: Answer

http://stackoverflow.com/a/33576983
score: 0
has body: From personal experience, I have noticed that Chrome is more forgiving when it comes to small errors. It is strange how you are not getting an error in the debug box at all... But, a place I can see from reading the code is where you define the variables a,b,c... I recommend placing a comma after each. So, you get: var a = parseInt(answer1), b = parseInt(answer2), c = parseInt(answer3), d = parseInt(answer4), e = parseInt(answer5), f = parseInt(answer6), g = parseInt(answer7), h = parseInt(answer8), ii = parseInt(answer9), j = parseInt(answer10); Then here is where I think you have an error. You have var c = ... again after already defining c. So, try removing the var right there.
type: Answer
answers question: http://stackoverflow.com/q/26657048

jquery-plugins
tags question: http://stackoverflow.com/q/26518840
tags question: http://stackoverflow.com/q/26647326
tags question: http://stackoverflow.com/q/26521491
tags question: http://stackoverflow.com/q/26567902
type: Tag
tags question: http://stackoverflow.com/q/26605468
tags question: http://stackoverflow.com/q/26623045
tags question: http://stackoverflow.com/q/26528653
tags question: http://stackoverflow.com/q/26656458
tags question: http://stackoverflow.com/q/26624367
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/26567673
tags question: http://stackoverflow.com/q/26538211
tags question: http://stackoverflow.com/q/26548911
tags question: http://stackoverflow.com/q/26625649
tags question: http://stackoverflow.com/q/26604805
tags question: http://stackoverflow.com/q/26645785
tags question: http://stackoverflow.com/q/26577094

http://stackoverflow.com/comment/41912139
type: AnswerComment
has text: I know, but he wanted to work with the for(var x in array) method
type: Comment
comment on: http://stackoverflow.com/a/26654102
score: 0

http://stackoverflow.com/comment/41775250
type: QuestionComment
comment on: http://stackoverflow.com/q/26578770
has text: It does because I can see the image changing, but it become tiny, or sometimes disappear, but I can see from the code that se src changes !
score: 0
type: Comment

http://stackoverflow.com/q/26521823
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26522382
upvote count: 1
has comment: http://stackoverflow.com/comment/41672589
type: Question
has answer: http://stackoverflow.com/a/26522382
tagged with: javascript
has title: Is AngularJS's ngSanitize supposed to fix tags?
tagged with: sanitize
has comment: http://stackoverflow.com/comment/41672562
has comment: http://stackoverflow.com/comment/41673034
answer count: 1
downvote count: 0
has body: Still not sure when to use Sanitize and when not to. I moved an old database to a new machine. It's got quite a few blog posts. I used to display these w/ PHP which was horribly intuitive. I can't say as much for the Angular way. angular.module( 'myApp', ['ngSanitize'] ); function blogController($scope,$http,$sanitize) { var site = "http://onfilm.us/gamengai"; var page = "/fft.php"; console.log( site + page ); $http.get( site + page ) .success(function(response) { for ( var i = 0; i &lt; response.length; i++ ) { response[i].text = response[i].text.replace( /&lt;br\s*\/?&gt;/mg, "\n" ); // response[i].text = $sanitize( response[i].text ); // this mangles it } $scope.data = response; }); } I ran a regex on to handle that. The above gets the data from a PHP script. If I sanitize the text, it turns those quotes &amp; apostrophe's into garbage. (Maybe b/c they're escaped?) More importantly though, is not respected. It's printed out as a string literal. I asked this question and was recommended sanitize, but it only solved part of the problem. EDIT: The original text (in a DB) would be something like 'MyLink'. And that's exactly how it displays on the page. See it in action here: http://onfilm.us/gamengai/index.html

http://stackoverflow.com/comment/41841488
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26614971
type: Comment
has text: So I should use label and then createTextNode to insert the text ?

http://stackoverflow.com/a/26620787
answers question: http://stackoverflow.com/q/26616399
score: 0
has body: If one of the promises within a $q.all is rejected, the overall promise is rejected. The rejection value is the same as that from the one rejected promise. Catch the rejection, then handle your retry logic in the catch handler. $q.all(restArr) .then(doSomething) .catch(handleError);
type: Answer

http://stackoverflow.com/a/26656582
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26656513
score: 0
accepted answer of: http://stackoverflow.com/q/26656513
has body: Your button group is a bootstrap style group and means nothing on the server side. Your inputs will need to be named in order to produce a value from the form's postback. Checkbox 1 (pre-checked) Checkbox 2 Checkbox 3
type: AcceptedAnswer

http://stackoverflow.com/comment/44305185
comment on: http://stackoverflow.com/a/26635597
score: 1
type: AnswerComment
type: Comment
has text: @Federico It's unclear to me still what the "best" solution is. I've been experimenting with this strategy for data loading combined with counting the number of outstanding async requests. Unfortunately `flux` is injected into stores after construction, so no great way to get actions in the initialize method. You might find some good ideas from Yahoo's isomorophic flux libs; this is something Fluxxor v2 should support better. Feel free to email me if you want to chat about this more.

http://stackoverflow.com/q/26599556
type: AnsweredQuestion
upvote count: 7
type: Question
has body: I want to trigger a function to run as quickly as possible, but it needs to wait for another (third party) script to finish loading, else the proper variable will not be defined yet. Can I listen for a specific script to finish loading and bind a function to that event? I need code, so: When this loads: &lt;script src="https://www.officeball.biz/socket.io/socket.io.js"&gt;&lt;/script&gt; run this: function(){ console.log('socket ready!'}` It would seem that I could just mutate the third party script to call the function, but not in this case: socket.io is a dynamically generated script which I have no control over the source of. The alternative would be to wait for the document to load; this question is an attempt to run the script as soon as possible instead.
score: 7
tagged with: javascript
has comment: http://stackoverflow.com/comment/41813463
has answer: http://stackoverflow.com/a/26599620
answer count: 1
downvote count: 0
favorite count: 0
has title: Can I trigger a function once a specific third party script has loaded?
accepted answer: http://stackoverflow.com/a/26599620

http://stackoverflow.com/a/26518733
answers question: http://stackoverflow.com/q/26518689
score: 0
has body: You should be able to use Bootstrap modals via the bootstrap-3 package. meteor add mizzao:bootstrap-3 Then refer to the Boostrap documentation. Should be pretty easy.
type: Answer

http://stackoverflow.com/q/26534997
tagged with: formatting
type: Question
has comment: http://stackoverflow.com/comment/41697033
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/41697764
tagged with: javascript
favorite count: 0
score: 0
has body: There is a random number (not necessarily positive or integer), say, -14383040.327843. I want to turn it into "(14,383,040)". So to spell it: negative number has to be in brackets fraction part should be stripped off without rounding every N decimal places (3 by default) from right to left there has to be a separator (, by default) no leading zeros What is the fastest (across major browsers) way to get such string?
downvote count: 1
has answer: http://stackoverflow.com/a/26535300
has answer: http://stackoverflow.com/a/26535466
type: UnansweredQuestion
has title: Fastest way to format an integer in JavaScript?

http://stackoverflow.com/q/26632788
possible better answer: http://stackoverflow.com/a/26633433
tagged with: javascript
has answer: http://stackoverflow.com/a/26633433
accepted answer: http://stackoverflow.com/a/26632827
type: AnsweredQuestion
has body: I think I have rather a simple question, I think... I have this code var resul = numCorrect+numIncorrect; if (resul == 5){} In place of 5 I want to have a multiple of 5 (5, 10, 15, 20) and so on. No 0! I don't know how to express this in jquery. 5n doesn't work. thanks in advance!
tagged with: math
has answer: http://stackoverflow.com/a/26632827
has title: Expression of a multiple of 5
type: Question
score: 0
answer count: 2

http://stackoverflow.com/a/26662425
type: Answer
answers question: http://stackoverflow.com/q/26662281
downvote count: 1
has comment: http://stackoverflow.com/comment/41926822
has comment: http://stackoverflow.com/comment/41926908
has comment: http://stackoverflow.com/comment/41927038
has body: This will do the trick: $('form').submit(function(e) { e.preventDefault(); //Do your stuff alert('Form was not submitted!'); }); Or you could attach a onclick listener to the submit button $('form .submit-button').click(function(e) { e.preventDefault(); //Do your stuff alert('Form was not submitted!'); }); Hope this helps. If not, show us more code and use the console to check for errors.
upvote count: 1
score: 0

http://stackoverflow.com/comment/41658964
score: 0
has text: @ovesyan19, I don't see any signs of trying to solve it. What happened when you debugged the save and load functions?
type: Comment
comment on: http://stackoverflow.com/q/26514396
type: QuestionComment

http://stackoverflow.com/q/26571702
score: 0
has comment: http://stackoverflow.com/comment/41784047
answer count: 1
accepted answer: http://stackoverflow.com/a/26572165
has comment: http://stackoverflow.com/comment/41762482
has comment: http://stackoverflow.com/comment/41762111
type: AnsweredQuestion
has title: add hours to new Date only showing NaN
has comment: http://stackoverflow.com/comment/41761775
has comment: http://stackoverflow.com/comment/41762353
tagged with: date
has body: I know there are many questions like this when I googled it, and I cannot seem to make it work. I use Safari as my bowser, which is new to me since OS X Yosemite. But, I cannot figure this one out. All I am trying to do, using Keith Wood countdown plugin, is get a datetime from a database and add 2 hours. Here is the code: $(data).each(function(key, value) { var box = ''; box += '&lt;div class="outterBox" id="qBox'+value.qid+'" name="'+value.qid+'"&gt;'+value.question+'&lt;/div&gt;'; box += '&lt;div id="timer'+value.qid+'"&gt;&lt;/div&gt;'; var newYear = new Date(value.added); var endtime = newYear.setHours(newYear.getHours() + (2)); console.log(value.added); console.log(endtime); $('#listQuestions').append(box); $('#timer'+value.qid).countdown({until: endtime}); }); It seems pretty simple, I tried to make the new adjusted date (with the extra two hours) a new Date again, but that gave me the same problem. Here is the output in console: With console.log(new Date(endtime); 2014-10-24 19:48:01 Invalid Date 2014-10-24 19:39:14 Invalid Date 2014-10-24 19:30:23 Invalid Date and: With console.log(endtime): 2014-10-24 19:56:14 NaN 22014-10-24 19:48:01 NaN 2014-10-24 19:39:14 NaN 2014-10-24 19:30:23 NaN Worth noting I have tried many examples I have found with adding hours to dates, but none of them worked, so this example seems the most logical, but I am doing something stupidly wrong. Any ideas? UPDATE With the help from below, I have some issues which perhaps I did not really make clear in my explaining. It looks like the date coming in from a cycle jquery(ajax)/php/database/php(echo)/jquery(ajax) looks like this: 2014-10-24 19:30:23 I do not think the above is a valid date, but a string. I think this because if I add this: newYear = new Date(value.added); I get Invalid Date. So any getHours() request cannot be evaluated, and so gives an error. I have tried breaking down the string, and recreate a new date like this: var dt = newYear.split(/\-|\s/); endDate = new Date(dt…
type: Question
has comment: http://stackoverflow.com/comment/41761948
tagged with: javascript
has answer: http://stackoverflow.com/a/26572165

http://stackoverflow.com/a/26651710
answers question: http://stackoverflow.com/q/26651525
downvote count: 0
has body: You're trying to use object syntax within a function. So either get your function to return your functions, or just use an object instead and export that. To pass in an argument you'll need something like an init function. var obj = { init: function (name) { this.name = name; return this; }, func1: function () { console.log('Hallo ' + this.name); return this; }, func2: function () { console.log('Goodbye ' + this.name); return this; } }; module.exports = obj; And then just import it within another file using the init method. Note the use of return this - this allows your methods to be chained. var variable = require('./getVariable'); // David var obj = require('./testfile').init(variable); obj.func1(); // Hallo David obj.func2(); // Goodbye David
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26556003
has answer: http://stackoverflow.com/a/26566165
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Zoom in and zoom out option not appearing
has answer: http://stackoverflow.com/a/26565300
type: Question
has comment: http://stackoverflow.com/comment/41739196
has comment: http://stackoverflow.com/comment/41739190
tagged with: javascript
has body: The zoom in and zoom out option is working on the map, but its invisible, it's not appearing. Any help please? Here is the coding: (Ignore the JEVLOCATION_LAT/LON) Here is a picture of the map: http://i1382.photobucket.com/albums/ah268/Lucas_Maddox/mapzoomwontshow_zpscd0118c9.png Thank you!
score: 0
has comment: http://stackoverflow.com/comment/41745797
answer count: 2

http://stackoverflow.com/q/26523597
type: Question
has answer: http://stackoverflow.com/a/26523677
tagged with: javascript
linked to: http://stackoverflow.com/q/2710300
has body: I have divs with a common class and a hidden div to show only when said div is hovered over. Depending on the hovered div's ID it should render out a different html string in the target hidden div, append html, unhide and then hide again and clear div on mouseLeave. It seems simple enough, I'm using a switch statement to get the ID of triggering div and render the correct HTML accordingly. Console log shows the correct html string based on my switch statement, however only the last item in the switch statement gets appended to target div. Full code is here: http://jsfiddle.net/xo1h8quq/ $( document ).ready(function(){ var buildHtml = function(id) { console.log(id); var html; switch (id) { case 'gluten': html = ' This is why gluten sucks '; case 'dairy': html = ' This is why dairy sucks '; case 'soy': html = ' This is why soy sucks '; case 'gmo': html = ' This is why gmo sucks '; case 'preservatives': html = ' This is why preservatives suck '; case 'fillers': html = ' This is why fillers suck '; case 'sugars': html = ' This is why sugars suck '; } return html; }; $( ".why-out" ).hover( function() { console.log(this); var html = buildHtml(this.id); $('#why-out-pop').html(''); //console.log(html); $('#why-out-pop').append(html).removeClass('hide'); }, function() { $('#why-out-pop').html('').addClass('hide'); } ); }); .hide { visibility: hidden; } #why-out-pop { position: absolute; margin-top: -158px; margin-left: 30px; border-style: solid; border-width: 3px; border-radius: 40px; border-color: black; background-color: #c3c3c3; padding: 10px; color: black; text-align: right; font-weight: light; z-index: 1000; } .why-out { text-align: right; font-weight: bold; } #out-head { text-align: right; font-weight: bold; } Test Seester WHAT'S OUT Gluten/Grain /OUT Dairy /OUT Soy /OUT GMO's /OUT Preservatives /OUT Fillers /OUT Refined Sugars /OUT This is a test
has answer: http://stackoverflow.com/a/26523828
score: 0
answer count: 2
tagged with: jquery
has title: Why won't my CSS render correctly with jquery .hover()?
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26523677
has comment: http://stackoverflow.com/comment/41675485
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26523828

http://stackoverflow.com/comment/41782614
type: QuestionComment
type: Comment
has text: @MohitArora : Even though :this http://jsfiddle.net/k9Dbf/9/ works fine . My code is almost similar to it but still not working . What can be the mistake?
comment on: http://stackoverflow.com/q/26583329
score: 0

http://stackoverflow.com/comment/41771961
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26576954
has text: try looking at the pure code, on your local computer without the php.

http://stackoverflow.com/q/26571874
linked to: http://stackoverflow.com/q/1150381
tagged with: parameters
downvote count: 6
has comment: http://stackoverflow.com/comment/41762034
type: UnansweredQuestion
has body: I'm a seasoned Java developer by now, and I love how Java uses types, signatures, methods, etc. It makes everything understandable, easy to follow and logical. Now I'm trying to develop something in Javascript. I'm trying to learn Angular JS. However I am finding it so very confusing to understand how this code is developed. Take a look at the code at this tutorial about ng-repeat. I'll post a sampling of the code; app.directive('lkRepeat', function(){ return { transclude : 'element', compile : function(element, attr, linker){ return function($scope, $element, $attr){ var myLoop = $attr.lkRepeat, match = myLoop.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/), indexString = match[1], collectionString = match[2], parent = $element.parent(), elements = []; // $watchCollection is called everytime the collection is modified $scope.$watchCollection(collectionString, function(collection){ var i, block, childScope; // check if elements have already been rendered if(elements.length &gt; 0){ // if so remove them from DOM, and destroy their scope for (i = 0; i &lt; elements.length; i++) { elements[i].el.remove(); elements[i].scope.$destroy(); }; elements = []; } My question is: How can you read such code? When functions are called, where are the method signatures? Also, when returning a value of function with parameters like $scope, $element, $attr, are these just place holders for the variables that will be passed? If so, then why do they have such funny names, why not drop the dollar sign?
has answer: http://stackoverflow.com/a/26571911
upvote count: 1
has comment: http://stackoverflow.com/comment/41762077
type: Question
has title: How a Java developer can understand Javascript code
tagged with: javascript
has comment: http://stackoverflow.com/comment/41761974
tagged with: function
score: -5
answer count: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/26569282
score: 0
type: Answer
has body: Its tough to say without seeing the layout of what you are trying to do but I think you're going to have to hack it. This sounds like a really abstract project... If not there is probably a much easier way. Can you post the code? You are probably right in the a lower z-index will make it unclickable, but only if there is a transparent div or some of it's margin/padding blocking it. Try: 1. Right click, view source, see if you can position elements using relative positioning instead of margin and padding. Make sure the top divs are as small as possible. If you can see through it it probably doesn't need to be blocking anything. 2. Create an invisible div on top for clicking so that it looks like you're clicking on the hidden element (this is a mega hack and not best practice, or even good practice, but sometimes you just need it to work) I'm really just guessing. If you can show us what you're working on it will be a lot easier to offer a solution!
answers question: http://stackoverflow.com/q/26569212

http://stackoverflow.com/comment/41707454
score: 0
comment on: http://stackoverflow.com/q/26531663
type: Comment
type: QuestionComment
has text: If I am having text box inside div. how can I use this?

http://stackoverflow.com/comment/41828273
comment on: http://stackoverflow.com/a/26607839
score: 0
type: AnswerComment
type: Comment
has text: Thanks for the example, can the for loop be placed in my Controller rather than Factory? Memoization looks interesting, but i've never used it and wouldnt know where to start? Would it be simple in this case?

http://stackoverflow.com/comment/41896246
type: Comment
has text: What approach, though? You've described it, but you haven't given any actual technical details.. such as code.
score: 0
comment on: http://stackoverflow.com/q/26644930
type: QuestionComment

http://stackoverflow.com/comment/41820413
has text: How can i just hide it after page reload?
comment on: http://stackoverflow.com/q/26603550
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41674846
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26517883
type: Comment
has text: it looks like your a step ahead of me. I should indeed watch for changes on the collection to update my DOM. But if you take it one step back you can see that I don't have a way yet to render out the JSON to a nice li element.

http://stackoverflow.com/comment/41870045
score: 0
comment on: http://stackoverflow.com/q/26630650
has text: Are you sure you have the right url to the map? Does it give problems in all browsers? How frequent is it? Also it's not a good solution. Think of the url would change. The browser will reload for ever.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/26657954
has answer: http://stackoverflow.com/a/27890073
tagged with: linq-to-sql
has body: How do I create textbox which can save any input in database using jquery Ajax in Asp.net mvc4... e.g:I write "my new task" in textbox and click on button and this saves in database with "The project" id and the "UserId" which is login in application, so how can I create this in mvc4, here is my code.. public actionresult Insert(task,projectId,UserId) { //linq to sql here... } and Ajax code is source: function(request, response) { $.ajax({ url: pagePath + "/insert", data: "{ 'id': '" + request.term + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function(data) { return data; }, success: function(data) { response($.map(data.d, function(item) { { value = item.Name return value; } })) }, error: function(XMLHttpRequest, callStatus, errorThrown) { alert(callStatus); } }); }, Is this the correct way? Can someone please guide me
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41926612
type: UnansweredQuestion
has title: how can i create textbox which can save any input in database using jquery ajax in Asp.net mvc4
tagged with: asp.net-mvc-4
type: Question

http://stackoverflow.com/a/26551563
has comment: http://stackoverflow.com/comment/41725289
accepted answer of: http://stackoverflow.com/q/26551427
has body: You have made one of the most common mistakes anyone makes when using JQuery. You tried to attach a click handler to a DOM object before the DOM was loaded: &lt;html&gt; &lt;head&gt; ... &lt;script src="script.js"&gt;&lt;/script&gt; contents of script.js: $('.navbar-toggle').click(function(){ ... }); You have to wait for the DOM to load before you run that code. Like so: $(function () { $('.navbar-toggle').click(function(){ ... }); }); Note: $(function) is just a shortcut for $(document).ready(function).
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26551427
has comment: http://stackoverflow.com/comment/41727118
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/41704555
type: Comment
has text: Did you test this? There's quite a few issues.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26539572

http://stackoverflow.com/a/26672251
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26671484
has body: I suggest caching the hidden ul so you can hide them all and just show what you want. Something like: http://jsfiddle.net/Lc8L9r9o/1/ $(document).ready(function () { var $uls = $('.top-nav-head li &gt; ul'); $(document).on('click', '.top-nav-head li ul li a', function () { $('.top-nav-head &gt;li').removeClass('active'); $(this).closest('.top-nav-head &gt;li').addClass('active'); }); /* ************* */ $(document).on('mouseenter', '.top-nav-head &gt; li', function () { $uls.hide(); $(this).find('ul').show(); }); $(document).on('mouseleave', '.top-nav-head &gt; li ', function () { $uls.hide(); }); /* ************* */ });
answers question: http://stackoverflow.com/q/26671484
score: 1
upvote count: 1

http://stackoverflow.com/q/26523190
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41680610
has comment: http://stackoverflow.com/comment/41675843
answer count: 0
has comment: http://stackoverflow.com/comment/41675919
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: I am trying to put a reCAPTCHA in Twitter Bootstrap dialog. I found that it doesn't work. Nothing was shown in the dialog. Here are my codes: in body &lt;div class="modal fade" id="recaptchaModel" tabindex="-1" role="dialog"&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"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Enter the text below to continue&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body" id="recaptcha_div"&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-success" onclick="submitForm()"&gt;Continue&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; at the button of body: &lt;script src="js/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/bootstrap.min.js"&gt;&lt;/script&gt; in JavaScript file ... function buttonAction() { showRecaptcha(); $('#recaptchaModel').modal(); }; function showRecaptcha(){ Recaptcha.create("my key(I am sure that I put the correct key", 'recaptcha_div', { theme: "red", callback: Recaptcha.focus_response_field}); }; Here is the result Can anyone help me to fix my code? Thanks!
has title: reCAPTCHA doesn't work in Twitter Bootstrap dialog
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/41825310
type: QuestionComment
score: 0
has text: @DavidThomas updated question. the html structure now is exactly what i have. except that there are more than 50 input checkboxes with 12 different input names.
comment on: http://stackoverflow.com/q/26603310
type: Comment

http://stackoverflow.com/comment/41756834
comment on: http://stackoverflow.com/q/26568853
score: 0
type: Comment
has text: I doubt `innerHTML` let's you parse the javascript you retrieve from your ajax call. I think there's a bit of software architecture that should be improved here.
type: QuestionComment

http://stackoverflow.com/comment/41843109
type: QuestionComment
comment on: http://stackoverflow.com/q/26597019
score: 0
has text: I didn't post full my full script, looking at it, see updated code, on click second part gets executed, probably why its repeating, any way this can be refactored so that it doesn't go into an infinite loop?
type: Comment

http://stackoverflow.com/q/26634588
answer count: 1
favorite count: 0
tagged with: angularjs
has title: Why does angular binding breaks between directives when transcluded?
upvote count: 1
has answer: http://stackoverflow.com/a/26634944
type: AnsweredQuestion
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/26634944
downvote count: 0
tagged with: javascript
has body: I have the following scenario I combined a page with a controller and several directives, one with transclude switch on (which seems to cause the problem). When I click on "changeMe()" the value of the scope change to erez. When I click on "close" we assign null to the property on the scope within the directive. I verified the same scenario with values other than null... When I click on "changeMe()" again... nothing happens!! Why is that? How do I fix it? The HTML template Change me! {{name}} - This is my name directive The Javascript code angular.module('guy', []); angular.module('guy').controller('GuyCtrl', function($scope){ $scope.name = 'guy'; $scope.changeName = function(){ $scope.name = 'erez'; } }); angular.module('guy').directive('myName',function ($log) { return { template: ' my name is: {{name}} Close ', restrict: 'EA', scope: { name : '=name' }, link: function postLink($scope, element) { $scope.close = function(){ $scope.name = null; } } } } ); angular.module('guy').directive('myLayout',function ($log) { return { template: ' This is the grand layout ', restrict: 'EA', transclude:true, link: function postLink($scope, element) { $log.info('linking layout'); } } } ); You can use this plunkr to run it

http://stackoverflow.com/comment/41858728
type: AnswerComment
has text: function drag(target, mySVG) { mySVG.dataTransfer.setData('text/html', mySVG.target.id); }; function drop(target, mySVG) { var id = mySVG.dataTransfer.getData('text/html'); mySVG.target.appendChild(document.getElementById(id)); mySVG.preventDefault(); }
type: Comment
comment on: http://stackoverflow.com/a/26622391
score: 0

http://stackoverflow.com/q/26527154
tagged with: css
has comment: http://stackoverflow.com/comment/41682203
tagged with: twitter-bootstrap
linked to: http://stackoverflow.com/q/7273338
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41681466
has comment: http://stackoverflow.com/comment/41681731
has comment: http://stackoverflow.com/comment/41682029
type: Question
has answer: http://stackoverflow.com/a/37123829
answer count: 2
has comment: http://stackoverflow.com/comment/41681414
has answer: http://stackoverflow.com/a/26527720
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41682127
score: 0
has body: I'm using Bootstrap and WordPress. I've been researching how to horizontally and vertically align an image inside a div (classic problem, apparently). I used the answer to this question to vertically align my image: How to vertically align an image inside div Now I need to horizontally align it. I know to do that, you normally add margin: 0 auto; The problem is that the method that I followed uses margin:auto; and it undos the vertical align if I change it to margin:0 auto; I started to make a JSFiddle of the problem, but I couldn't replicate it. So I think it's something in Bootstrap that is overriding it, but I'm not sure what. Here is the basic code I'm using from the vertical align solution on the other stackoverflow question: HTML &lt;div class="crop-featured-2"&gt; &lt;img src="image.png"&gt; &lt;/div&gt; CSS .container { position: relative; width: 100%; overflow: hidden; } .crop-featured-2 { height: 100px; width: 200px; position: relative; border: 1px solid red; padding: 5px; display:block; } .crop-featured-2 img { min-height: 100px; width:100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; border:0px; padding:0; } You can see the problem at http://ucaftercruz.com/upcoming/?page_id=30. It's the slider at the top and the problem is in the .carousel-inner div. Resize the browser to around 800px wide to be able to really see the issue. Thanks so much in advance!
tagged with: http://stackoverflow.com/tag/html
has title: Horizontally and vertically align image in div
has comment: http://stackoverflow.com/comment/41681552

http://stackoverflow.com/comment/41932512
has text: we arent supposed to use jQuery. something to do with addEventListener
comment on: http://stackoverflow.com/q/26665312
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41764162
has text: Sure you have PHP running at all? It's not something builtin, you need to install stuff on the server first.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26573087

http://stackoverflow.com/comment/41923031
has text: and can you use a conditional to setting maxWidth?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26660361
type: Comment

http://stackoverflow.com/comment/41882714
has text: You can't have line breaks in a string. Why are you creating JSON that way in the first place?
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26637748
type: Comment

http://stackoverflow.com/a/26531917
answers question: http://stackoverflow.com/q/26531500
has comment: http://stackoverflow.com/comment/41693352
has comment: http://stackoverflow.com/comment/41693640
has body: Finally your code should be this: HttpSession session = req.getSession(true); for (int i = 0; i &lt; goods.length; i++) { if (session.getAttribute(goods[i]) == null) session.setAttribute(goods[i], new Integer(0)); } if ((s = req.getParameter("fifa")) != null) { int n = ((Integer) session.getAttribute(goods[0])).intValue(); session.setAttribute(goods[0], new Integer(n + 1)); } else if ((s = req.getParameter("battle")) != null) { int n = ((Integer) session.getAttribute(goods[1])).intValue(); session.setAttribute(goods[1], new Integer(n + 1)); } else if ((s = req.getParameter("gta")) != null) { int n = ((Integer) session.getAttribute(goods[2])).intValue(); session.setAttribute(goods[2], new Integer(n + 1)); } And html page: Fifa 15 &lt;/br&gt; &lt;img src="images/fifa-15.jpg" width = 200 height = 300 alt="image" /&gt;&lt;/br&gt; &lt;input type="submit" value="add to cart" name = "fifa"&gt;&lt;/br&gt; Battlefield 4&lt;/br&gt; &lt;img src="images/battlefield-4.jpg" width = 200 height = 300 alt="image" /&gt;&lt;/br&gt; &lt;input type="submit" value="add to cart" name ="battle"&gt;&lt;/br&gt; GTA 5&lt;/br&gt; &lt;img src="images/gta-5.jpg" width = 200 height = 300 alt="image" /&gt;&lt;/br&gt; &lt;input type="submit" value="add to cart" name = "gta"&gt; After detecting which button was pressed you can choose action for each button.
score: 0
accepted answer of: http://stackoverflow.com/q/26531500
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41693110
has comment: http://stackoverflow.com/comment/41695267
type: Answer
has comment: http://stackoverflow.com/comment/41693563
has comment: http://stackoverflow.com/comment/41693807

http://stackoverflow.com/comment/41720019
comment on: http://stackoverflow.com/a/26546255
type: AnswerComment
type: Comment
has text: Sure! Feel free to get back if you find other issues.
score: 0

http://stackoverflow.com/a/26551801
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26550963
has body: I wouldn't touch the events object for this anyhow. The event object defines the events from child elements of el that are propagated to the parent element (el). The question is more about how you glue different views together. I use intermediary custom objects (which I call controllers, as Backbone does not provide Controllers out of the box) that are used to instantiate the views and listen to events that were triggered from within the view. You can use specified event aggregators to use within particular 'controller' objects to handle the events. MyApp = {}; MyApp.some_vent = _.extend({}, Backbone.Events); MyApp.some_vent.on("some:event", function(){ alert("some event was fired!"); }); If the controller holds a reference to the view where you want to cause some effect, you can execute these view's methods accordingly.
answers question: http://stackoverflow.com/q/26550963
has comment: http://stackoverflow.com/comment/41726565
upvote count: 1

http://stackoverflow.com/comment/41895314
has text: If you have control over who is updating the value.... then you can think about a custom jQuery event and then you can use a directive
comment on: http://stackoverflow.com/a/26644436
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26548475
has body: Hope this helps you: var json = { "users": [ {"id": 322, "name": "Ivan"}, {"id": 12, "name": "Vanya"} ] }; //To print name value of id 12 for (var 1=0; i&lt; json.users.length; i+=1){ if(json.users[i].id===12){ console.log(json.users[i].name); //Prints name value of user id 12 break; } } //To Add new user json.users.push({"id": 143, "name": "Adam"})
score: 0
answers question: http://stackoverflow.com/q/26548349
type: Answer

http://stackoverflow.com/q/26570484
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26571550
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26571550
type: AnsweredQuestion
has body: Here is my rock,paper, scissors game. http://jsfiddle.net/Renay/hL3j5hm6/6/ &lt;html&gt; &lt;/html&gt; How do i go about adding an animation where before the result is given, there is a 3,2,1 countdown while the images are bouncing up and down. I've tried adding various functions but nothing has seemed to worked. I'm not too sure how to go about adding movement to images and where abouts it would go in my script. In steps : User choice is selected(rock/paper/scissors button) Countdown begins Two hand symbols start bouncing up and down Computer and User choices are shown under images. Result is shown Steps that are in italic is what i am having trouble with. I know the CSS isn't ideal but i'll fix that up after i get the functioning right. Any sort of help is greatly appreciated. Thanks
upvote count: 2
score: 1
has title: Rock,paper,scissors game animation.
downvote count: 1
has comment: http://stackoverflow.com/comment/41761446

http://stackoverflow.com/comment/41818988
has text: This seems to be similar, take a look: http://stackoverflow.com/questions/18482219/css-pseudo-element-size-issue
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26602854
type: Comment

http://stackoverflow.com/q/26629871
tagged with: ajax
tagged with: angularjs
has body: I have a page which has a modal window(AngularUI bootstrap modal directive). DOM for this modal box is being loaded dynamically from server. This modal box is opened when a button on page is clicked. Inside this modal box there is another directive applied on a anchor element. This directive is for selecting and uploading files. The issue is that the file upload directive is working(i.e. opening the file select dialog of windows) if I keep it anywhere on parent page but does not work if I keep it inside the modal box. My understanding why the directive is not working is that DOM for modal is being loaded later and Angular finishes attaching events by the time user opens the modal box.
type: UnansweredQuestion
has title: AngularJS: Directive not working for elements inserted via AJAX call
type: Question
tagged with: angularjs-directive
tagged with: javascript
has answer: http://stackoverflow.com/a/26630308
score: 0
answer count: 1

http://stackoverflow.com/comment/41785744
type: Comment
comment on: http://stackoverflow.com/q/26584958
score: 0
type: QuestionComment
has text: What is your question? I'll guess you should figure that out when you search for 'ceasar cipher' and 'ascii table'.

http://stackoverflow.com/q/26570348
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41759587
type: Question
has comment: http://stackoverflow.com/comment/41766366
has comment: http://stackoverflow.com/comment/41761049
has comment: http://stackoverflow.com/comment/41776736
has comment: http://stackoverflow.com/comment/41801609
upvote count: 1
tagged with: angular-ui-router
has body: I'm building a simple search app. The search result page is defined as: .state('search', { url: '/search?q', templateUrl: 'views/search.html', controller: 'SearchCtrl' }) And in SearchCtrl, I have two scope functions to add/remove search terms: $scope.searchByTerm = function(term) { termsService.addTerm($scope.selectedTerms, term); $state.go($state.current, {q: $scope.selectedTerms}, {reload: true}); }; $scope.removeTerm = function(term) { termsService.removeTerm($scope.selectedTerms, term); $state.go($state.current, {q: $scope.selectedTerms}, {reload: true}); }; The termsService.addTerm function simply pushes term into $scope.selectedTerms array, and termsService.removeTerm removes term from the array if it exists. Since I want the page to reload and fetch data according to new search terms, I have set reload to be true. With this, the SearchCtrl sometimes gets initiated twice, mostly when $scope.selectedTerms has 2 or more items. I've tried all possible ways of rewriting this, and it still consistently runs twice. If I remove the termsService line in both functions, the state transition wouldn't initiate SearchCtrl twice. Can't figure out what can possibly go wrong... (angular-ui-router#0.2.11, angular#1.2.26)
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has title: Controller initiated twice on state transition
downvote count: 0
score: 1
favorite count: 0

http://stackoverflow.com/comment/71536379
comment on: http://stackoverflow.com/q/26608810
has text: Which version of KnockoutJS are you using? It may be worth checking the [KnockoutJS changelog](https://github.com/knockout/knockout/releases), as there have been a couple of memory leak fixes (at least one of which relates to `foreach` / `template` binding, which may be related).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26517038
has comment: http://stackoverflow.com/comment/41668230
answers question: http://stackoverflow.com/q/26516718
has body: The following should do it for you hoping the corresponding elements are in the same order: $('[data-js]').on('change',function() { $('.address-continue').data('id', this.id); }); $('.address-continue').on('click',function() { alert( $(this).data('id') ); }); You cannot assign a second element in your document the id of another. IDs should be unique; therefore I have used data-id. $('[data-js]').on('change',function() { $('.address-continue').data('id', this.id); }); $('.address-continue').on('click',function() { alert( $(this).data('id') ); }); (id created dynamically) Address 1 (id created dynamically) Address 2 Continue
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41668490
has comment: http://stackoverflow.com/comment/41668305

http://stackoverflow.com/q/26593642
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26594619
answer count: 1
tagged with: javascript
tagged with: jquery
has title: DataTables with more tables on one page
score: 0
tagged with: datatables
has body: I would like to ask how can i use DataTables plugin with more tables generated by JavaScript code on one page. From three tables only two are rendered and in the wrong order. jsfiddle var keywords1 = JSON.parse("{\"1\": [\"lor\"],\"2\": [\"ember\"],\"3\": [\"pleasant\"]}"); var keywords2 = JSON.parse("{\"1\": [\"bachelor\"],\"2\": [\"mber\"],\"3\": [\"pleasant\"]}"); var keywords3 = JSON.parse("{\"1\": [\"b\"],\"2\": [\"rem\"],\"3\": [\"pl\"]}"); buildKeywordTableString(keywords1); buildKeywordTableString(keywords2); buildKeywordTableString(keywords3); function buildKeywordTableString(keywords){ var keywordTableString = '&lt;table cellpadding="0" cellspacing="0" border="0" class="display" id="example"&gt;&lt;/table&gt;'; var keys = Object.keys(keywords); var dataSet = new Array(); for (var i = 0; i &lt; keys.length; i++){ for (var j = 0; j &lt; keywords[keys[i]].length; j ++){ var row = new Array(); row.push(keywords[keys[i]][j]); row.push(keys[i]); dataSet.push(row); } } $('#example').dataTable( { "data": dataSet, "columns": [ { "title": "Key" }, { "title": "R" } ] } ); document.body.innerHTML = keywordTableString + document.body.innerHTML; } Thanks for any help.
has answer: http://stackoverflow.com/a/26594619

http://stackoverflow.com/comment/41744904
type: AnswerComment
has text: @T.J.Crowder Updated the answer. Please do check it out.
type: Comment
comment on: http://stackoverflow.com/a/26562419
score: 0

http://stackoverflow.com/q/26581715
tagged with: javascript
has comment: http://stackoverflow.com/comment/87494508
tagged with: sequelize.js
answer count: 1
has comment: http://stackoverflow.com/comment/87482187
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
has body: The official API documentation suggests using Model.update like this: var gid = ...; var uid = ...; var values = { gid: gid }; var where = { uid: uid }; myModel.update(values, where) .then(function() { // update callback }); But this gives me: "Missing where attribute in the options parameter passed to update". The docs also mention that this usage is deprecated. Seeing this error makes me think, they already changed it. What am I doing wrong?
has answer: http://stackoverflow.com/a/26581716
score: 9
type: Question
accepted answer: http://stackoverflow.com/a/26581716
has title: Sequelize update does not work anymore: "Missing where attribute in the options parameter passed to update"
upvote count: 9
downvote count: 0

http://stackoverflow.com/a/26619923
upvote count: 2
has body: It's addEventListener, not addEventListeners (note the s). Whenever you have foo(bar()), bar is called first and its return value is passed to foo. So in your case, you are calling clearOrSelectAll first and pass the return value to addEventListener. However, addEventListener expects a function as argument and if clearOrSelectAll doesn't return a function, this won't work. Do button.addEventListener("click", clearOrSelectAll); and access the element the handler is bound to via this.
accepted answer of: http://stackoverflow.com/q/26619819
answers question: http://stackoverflow.com/q/26619819
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26561368
answers question: http://stackoverflow.com/q/26561248
type: Answer
has comment: http://stackoverflow.com/comment/41743309
score: 2
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/41743427
has body: This is a somewhat common problem with parallel async calls. The simplest solution requires promises. I recommend the Bluebird promise library, but most will do fine. var fbApi = function(url){ return new Promise(function(resolve, reject){ FB.api(url, function(resp){ resolve(resp); }); }); } function setStatus(statusObject){ return fbApi("/{personId}?fields=id,link,name,picture") .then(function(response){ var html = ...; return html; }); } function getFeedItemPromises(){ return fbApi("/{id}/feed").then(function(response){ return response.data.map(function(item){ }); }); } Depending on your needs, initFeed could be one of these. The first renders the feed when all items are available, and the second renders it when each item is available, but enforces the order. function initFeed(){ return Promise.all(getFeedItemPromises()) .then(function(itemsHtml){ // append all of the items at once $('#fb-status-wrapper').append(itemsHtml.join("\n")); }); } Or this which ensures the order, but eagerly appends items to the feed, after all previous items have been added. function initFeed(){ function renderItem(html){ $('#fb-status-wrapper').append(html); } // reduce can be used to chain promises in sequence return getFeedItemPromises().reduce(function(p, nextPromise){ return p.then(function(){ return nextPromise }) .then(renderItem); }, Promise.resolve()) } An alternative would be to create a div for each item which acts as a placeholder, keep those in an array, and fill them in when each resolves. This works especially well if you know the height of the items beforehand, and fade them in when they load. From a UX perspective, this is the best in my opinion. I would not recommend the above if you don't know the heights of items, as it'll cause headache inducing shifting of items as new ones are inserted.

http://stackoverflow.com/q/26626720
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: Autocomplete not working for dynamically created content
has answer: http://stackoverflow.com/a/26626899
type: Question
answer count: 2
tagged with: autocomplete
has body: I am having a bit of trouble trying to add a autocomplete field to my dynamically created content. Previously it worked fine as the textbox was generated in HTML, but I cannot figure how to make it work with dynamically generated content (even trough I am using static textbox id for test purposes) Autocomplete: jQuery(document).ready(function($){ var products= JSON.parse( '&lt;?php echo json_encode($products_list) ?&gt;' ); var t = 0; var r = '&lt;?php echo json_encode($number_of_rows_tuote) ?&gt;'; var availableProducts = []; var cellPlace = []; while(t &lt; r){ availableProducts.push(products[t]['prsku']+":"+products[t]['prname']); cellPlace.push(t); t++; } $( "#product2" ).autocomplete({ source: availableProducts }); }); Dynamic create content function addElement() { var contentID = document.getElementById('more'); var newTBDiv = document.createElement('div'); newTBDiv.setAttribute('id','strText'+intTextBox); newTBDiv.innerHTML ="&lt;br&gt;&lt;div class='product'&gt;&lt;TABLE&gt;&lt;tr&gt;"; newTBDiv.innerHTML += "&lt;td&gt;&lt;input type='text' placeholder = 'product_code' name='sku_" + intTextBox + "' id='sku_" + intTextBox + "'/&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' id='product2' name='product2'&gt;&lt;/td&gt;; contentID.appendChild(newTBDiv); } &lt;body onload="addElement();"&gt;
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26626874

http://stackoverflow.com/comment/41900117
has text: Thanks, this shows an alert box. How about if I want to use a custom pop-up I created instead of a default JavaScript alert?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26647625

http://stackoverflow.com/comment/41900183
type: QuestionComment
has text: put the image in front of (document order) the video and hide the image oncanplay, otherwise it won't be shown until the video loads...
comment on: http://stackoverflow.com/q/26646451
score: 0
type: Comment

http://stackoverflow.com/q/26553998
tagged with: jquery
tagged with: colorbox
has comment: http://stackoverflow.com/comment/41729958
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41729933
accepted answer: http://stackoverflow.com/a/26554084
has title: Trying to reference a class after the page loads with colorbox
type: Question
has comment: http://stackoverflow.com/comment/41729827
has answer: http://stackoverflow.com/a/26554084
has body: I have a list of links that are generated after a button click, so obviously, these links are rendered after the page and the jquery has already loaded. The links look like: &lt;a class="person" href="xxxxxx.xxx"&lt;/a&gt; The jquery I'm using is: $(document).ready(function(){ $(".person").colorbox({iframe:true, width:"80%", height:"80%"}); }; Assigning that class to a link on the page that renders with the page works correctly. How can I use the jquery to reference tags, classes, etc. that load afterwards?
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/26649332
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/26661920
favorite count: 0
upvote count: 5
has title: How to import core elements and paper elements in JSFiddle
has answer: http://stackoverflow.com/a/26655499
accepted answer: http://stackoverflow.com/a/26655499
has answer: http://stackoverflow.com/a/30954454
has answer: http://stackoverflow.com/a/26661920
type: AnsweredQuestion
has body: How can I import core elements and paper elements in JSFiddle. I'm importing polymer through those statements: How can import for example core-input or paper-input?
downvote count: 0
tagged with: core-elements
type: Question
tagged with: polymer
tagged with: jsfiddle
score: 5
tagged with: paper-elements

http://stackoverflow.com/a/26517883
has comment: http://stackoverflow.com/comment/41674846
answers question: http://stackoverflow.com/q/26514177
type: Answer
score: 0
has body: Take a look at listenTo and the list of built in events. I think you probably want to listen to the collection's events and call a render method when something changes. For example, you could add this to your initialize to re-render when the collection is fetched: this.listenTo(this.collection, 'sync', this.render); Or you could just render a single item when it's added to the collection: this.listenTo(this.collection, 'add', this.renderItem);

http://stackoverflow.com/a/26672032
type: Answer
answers question: http://stackoverflow.com/q/26670033
has body: If you are using JQuery then you can hide all the element under the layers div using $('layers a').hide(); and show them again by using $('layers a').show(); or you could add a class on the click such as "hide" that has a css of display:none and then just remove the class when you click to show the layers
score: 0

http://stackoverflow.com/comment/41823171
comment on: http://stackoverflow.com/a/26589667
has text: how can I send you the link, can I pm you in stackoverflow?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26608908
score: 1
has body: Since you have spaces in onclick property value, you should wrap its value with, for example, "": ...... Fiddle example. Instead of inline JS onclick="" (which is discouraged nowdays), you can use jQuery's .on("click"): var filesName = 'Document Draft.png'; var newRow = " td Data 1 Delete "; $("#idDocList").append(newRow); $('#idDocList').on('click', ".delete", function() { deleteDocument(this, filesName); }); Fiddle example.
accepted answer of: http://stackoverflow.com/q/26608526
has comment: http://stackoverflow.com/comment/41829871
answers question: http://stackoverflow.com/q/26608526
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

shiny
tags question: http://stackoverflow.com/q/26619162
tag name: shiny
tags question: http://stackoverflow.com/q/26650561
type: Tag

http://stackoverflow.com/comment/41777242
score: 0
has text: Ember is all about reusability, instead of having some external thing fix up your date field, define a specialized component that fixes it and you can reuse it over and over. (example updated)
type: AnswerComment
comment on: http://stackoverflow.com/a/26578949
type: Comment

http://stackoverflow.com/comment/41740329
comment on: http://stackoverflow.com/q/26557672
score: 0
type: Comment
type: QuestionComment
has text: this can be a solution for you http://stackoverflow.com/a/2891155/2043592

http://stackoverflow.com/comment/99628591
score: 0
has text: @Hassan sorry, no I don't have a demo of this anywhere. It works almost the same as the original spidifier library. Feel free to open a github issue if you have specific questions though!
type: AnswerComment
comment on: http://stackoverflow.com/a/26662124
type: Comment

http://stackoverflow.com/comment/41900323
comment on: http://stackoverflow.com/q/26647720
score: 0
type: Comment
type: QuestionComment
has text: from the calling function, other module will use this data

http://stackoverflow.com/comment/41801372
comment on: http://stackoverflow.com/q/26592929
has text: Looks like a good case for creating your slider widget as a custom directive rather than an ng-include so that you can keep your scope clean, provide a distinct interface, and avoid issues like @Roberto Linares pointed out.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/41864135
comment on: http://stackoverflow.com/q/26627518
has text: Would it not be possible to do it all in one request?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26531435
tagged with: jquery
has answer: http://stackoverflow.com/a/26531619
accepted answer: http://stackoverflow.com/a/26531619
tagged with: php
has comment: http://stackoverflow.com/comment/41689363
type: Question
type: AnsweredQuestion
has title: js deleting submitted form data
has comment: http://stackoverflow.com/comment/41689390
tagged with: http://stackoverflow.com/tag/json
has body: The problem: Javascript function( which was premade by template) cleans the form data sent to me by php The php code: &lt;?php header('Content-type: application/json'); $status = array( 'type'=&gt;'success', 'message'=&gt;'GJ ' ); $name = @trim(stripslashes($_POST['name'])); $phone = @trim(stripslashes($_POST['phone'])); $subject = @trim(stripslashes($_POST['subject'])); $message = @trim(stripslashes($_POST['message'])); $email_to = 'email@email.com';//replace with your email $body = 'Name: ' . $name . "\n\n" . 'Телефон: ' . $phone . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message; $success = @mail($email_to, $subject, $body); echo json_encode($status); die; The javascript function code: var form = $('.contact-form'); form.submit(function () {'use strict', $this = $(this); $.post($(this).attr('action'), function(data) { $this.prev().text(data.message).fadeIn().delay(3000).fadeOut(); },'json'); return false; }); When there's no js code php returns white screen with a line but the @mail sends normal message, but when there is this code fade in and out works good, but the data arrives empty. The message in message and name is cyrylic if that is important. Please help me fix it(i.e. i need both data arriving and success fade-in appearing or at least data arriving with no .php white screen) or just explain what the js code does i don't get it. Thanks
tagged with: javascript
tagged with: forms
score: 0
has comment: http://stackoverflow.com/comment/41689268
answer count: 1

http://stackoverflow.com/comment/41748854
has text: @WestLangley, it seems to me that using `THREE.Vector3(0, 0, -1)` requires some previous knowledge of where the camera *should* be looking at, whereas in my case (see edits) the library which receives the camera object knows nothing about the vector originally passed to `camera.lookAt()` (and shouldn't be fed any additional information which is not deducible simply from the camera itself). Anyhow, for the sake of it I tried using `var vector = new THREE.Vector3(0, 0, -1)` but still no dice: after applying the camera's quaternion to it, it points to the origin rather than the point `(1, 2, 3)`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26557252

http://stackoverflow.com/a/26619269
downvote count: 0
has body: You have no submit input or button, so ng-submit isn't what you would use to view the form data. initialize an empty object in the scope of your form like so myApp.controller('formController', function($scope) { $scope.formData = {}; $scope.submitForm = function() { //do stuff on submit } }); Then bind the ng-model in your markup like so Submit {{formData}} You can view it with {{formData}} in the markup, within the scope of formController EDIT: changed submit form function name to make more sense.
accepted answer of: http://stackoverflow.com/q/26619112
answers question: http://stackoverflow.com/q/26619112
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/q/26603423
has answer: http://stackoverflow.com/a/36294854
upvote count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26603656
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26603453
answer count: 5
has answer: http://stackoverflow.com/a/26603911
type: AnsweredQuestion
score: 1
has title: jQuery input number spinner
has answer: http://stackoverflow.com/a/26603662
type: Question
possible better answer: http://stackoverflow.com/a/26603453
accepted answer: http://stackoverflow.com/a/26603656
tagged with: javascript
has comment: http://stackoverflow.com/comment/41819925
has body: I have this code for jQuery spinner up-down number : HTML: JS: (function ($) { $('.spinner .btn:first-of-type').on('click', function() { $('.spinner input').val( parseInt($('.spinner input').val(), 10) + 1); }); $('.spinner .btn:last-of-type').on('click', function() { $('.spinner input').val( parseInt($('.spinner input').val(), 10) - 1); }); })(jQuery); This Worked But I need to add two option: prevent user add number to input set Maximum and Minimum for number How do add this option?! DEMO FIDDLE

http://stackoverflow.com/comment/41904971
comment on: http://stackoverflow.com/a/26650565
type: Comment
has text: You missed the little detail that the cloned element was not actually added to the DOM. Show will work for `visibility` too.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26652788
score: 0
has title: Object Oriented Javascript Error Object Is Not A Function
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26652850
possible better answer: http://stackoverflow.com/a/26652838
answer count: 3
has answer: http://stackoverflow.com/a/26652838
accepted answer: http://stackoverflow.com/a/26652850
has body: I'm trying to create a simple marquee that simply changes in intervals. I am just trying to understand objects in Javascript. Currently, I am receiving the error, object is not a function. var marquee = { domElement: jQuery( 'span' ), titles: [ 'First', 'Second', 'Third', 'Fourth' ], current: '', next: 0, _getCurrent: function(){ this.current = this.domElement.text(); }, _setNext: function(){ this.next = this.titles.indexOf( this.current ) + 1; }, changeHeading: function(){ this._getCurrent(); this._setNext(); this.domElement.text( this.titles[ this.next ] ); } }; var marqueeInterval = setInterval( marquee.changeHeading, 700 ); Any help on why I can't get this to work would be greatly appreciated. I am new to Object Oriented Javascript, and am just trying to understand. Thanks!
type: AnsweredQuestion
tagged with: javascript-objects
type: Question
tagged with: object
tagged with: oop
has answer: http://stackoverflow.com/a/26652962

http://stackoverflow.com/q/26574935
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41767552
type: Question
tagged with: image
score: 0
has title: Canvas remove white Pixels in Images
linked to: http://stackoverflow.com/q/6755314
has comment: http://stackoverflow.com/comment/41767646
tagged with: canvas
has answer: http://stackoverflow.com/a/28160488
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41767749
has comment: http://stackoverflow.com/comment/41767672
has comment: http://stackoverflow.com/comment/41769450
has comment: http://stackoverflow.com/comment/41767765
tagged with: css
has body: I have been looking at canvas ImageData remove white pixels to get ride of white pixels in my images but it doesn't work as it doesn't recognise putImageData(). Is there a way to create a method to get rid of white pixels by passing an image in and returning the image back again. I have multiple images already on the canvas but all have white backgrounds.
tagged with: pixel

http://stackoverflow.com/a/26607396
has body: gl.uniformMatrix4fv always operates on the currently used shader program. Since there is no shader program activated when you call this function, nothing is set. Calling gl.useProgram(program); directly before the uniformMatrix4fv statement should fix your problem. Hint: Always check the javascript error console. At least for me (Chrome) it tells me that WebGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program which is a good indicator for where to search for the problem.
has comment: http://stackoverflow.com/comment/41832065
downvote count: 0
has comment: http://stackoverflow.com/comment/41829161
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26606968
answers question: http://stackoverflow.com/q/26606968
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/26542689
downvote count: 0
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26542518
has body: Can't you just test if a name is specified? I.e. add an if statement that checks that the name is not null and not empty... You might also want to test for things like slashes, in case the user is trying to create subdirectories... I lifted a test for null or empty from here, but you can roll your own. function doGet(e) { return HtmlService.createHtmlOutputFromFile('form.html'); } function uploadFiles(form) { try { var dropbox = "Student Files"; var folder, folders = DriveApp.getFoldersByName(dropbox); if (folders.hasNext()) { folder = folders.next(); } else { folder = DriveApp.createFolder(dropbox); } var id = "1L2syfAOm6MiYPtWuWwFZFK_ZtLpLOjNx9EpjHh2IKUY"; var ss = SpreadsheetApp.openById(id); var blob1 = form.myFile1; if( !isEmpty(blob1) ) { var file1 = folder.createFile(blob1); file1.setDescription("Uploaded by " + form.myName); var f1 = '=HYPERLINK("' + file1.getUrl() + '", "File 1")'; Logger.log("test"); var sheet = ss.getSheetByName('Sheet1'); sheet.appendRow([form.myName, form.addy, form.twitter, form.status, form.what, form.projTitle, form.brief, form.full, form.role, form.date, form.website, f1]); return "Your entry was successfully uploaded!"; } else { return "No file name specified!"; } } catch (error) { return error.toString(); } } // New stuff. A function that tests if a string is empty or null function isEmpty(str) { return (!str || 0 === str.length); }
upvote count: 1
answers question: http://stackoverflow.com/q/26542518
type: Answer

http://stackoverflow.com/q/26633092
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/41875222
has comment: http://stackoverflow.com/comment/41874827
score: 0
has title: trigger Controller scope from directive AngularJs
has comment: http://stackoverflow.com/comment/41875018
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41874222
has body: I have a TimelineController that has a publish function on the scope, that will send some data to the server. My timeline is composed by 2 directives timeline (Element) share-post (Element) I would like to be able to call from the share-post directive the publish function on my TimelineController is that possible?. Controller function TimelineController($scope,TimelineService) { $scope.posts = []; $scope.publish = function(wall_type,wall_id,text,video,image) { console.log('click controller'); TimelineService.publishPost(wall_type,wall_id,text,video,image).$promise.then(function(result){ $scope.posts.push(result.response); }); }; } Timeline Directive: function timelineDirective() { return { restrict: 'E', replace: true, scope: { type: '@', ids: '@', postime: '&', posts: '=' }, templateUrl:"/js/templates/timeline/post-tmpl.html", controller: function($scope,$element) { this.type = $element.attr('type'); this.ids = $element.attr('ids'); } } }; Timeline Directive Template {{post.text}} SharePost Directive: From this directive I would like call the publish on the TimelineController function sharePost() { return { restrict: 'E', replace: true, require: "^timeline", templateUrl:"/js/templates/timeline/share-tmpl.html", link: function($scope,$element,$attr,ctrl) { $scope.pub = function() { // This does not work because it call the parent directive // Instead of controller $scope.publish(ctrl.type, ctrl.ids, $scope.text); } } } }; Sharepost Directive Template Share
has answer: http://stackoverflow.com/a/26634734
tagged with: angularjs-scope
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/26633259

http://stackoverflow.com/comment/41720136
type: AnswerComment
has text: Please explain what you are doing *by editing your answer*.
type: Comment
comment on: http://stackoverflow.com/a/26548023
score: 0

http://stackoverflow.com/comment/41975237
type: Comment
comment on: http://stackoverflow.com/q/26596109
score: 1
has text: @ZaneZ this should have been the bounty description rather than *Looking for an answer drawing from credible and/or official sources.*
type: QuestionComment

http://stackoverflow.com/comment/41714412
score: 0
type: QuestionComment
type: Comment
has text: It does collapse actually. But you need to click twice on the header if you add collapsible:true. Although, still a glitch
comment on: http://stackoverflow.com/q/26544236

http://stackoverflow.com/comment/41911791
type: QuestionComment
has text: Well print style sheets **do** work, all the way back to IE6, though they're far from perfect. If your print style sheet is not working, then that should be the problem you work on. Converting some HTML + CSS to PDF is not an easy thing to do.
comment on: http://stackoverflow.com/q/26654298
score: 0
type: Comment

http://stackoverflow.com/comment/41926612
has text: are you getting an error when you run the code?
score: 0
comment on: http://stackoverflow.com/q/26657954
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41687903
comment on: http://stackoverflow.com/a/26530080
type: AnswerComment
has text: @MichailMichailidis That still doesn't tell the user it stops the original form submitting. If you're unaware that the form is still submitting your comment is clear. Not to mention you added it after I had already posted my answer.
score: 0
type: Comment

http://stackoverflow.com/comment/41693274
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26533079
type: Comment
has text: Have you confirmed that the lgLoginController controller is firing when you click on the /Dashboard link? Put a javascript console.log('lgLoginController') statement in the controller to verify that it's running as you expect. I don't think it's running again when you go to Dashboard -- if that's the case, the $scope.authenticated value is never getting updated until you reload and it actually runs again.

http://stackoverflow.com/q/26650685
score: 1
has answer: http://stackoverflow.com/a/26651060
type: Question
has body: I have the following date format: 1/6/2014 7:28. I want to plot this along with other dates in the same format along the x-axis of a d3.js graph. I am using var format = d3.time.format('%m-%d-%Y %H:%M').parse; but the console just returns null, After the call to the data I am doing data.forEach(function(d) { d.timestamp = format(d.timestamp); }); Am I doing this the correct way? Thanks
answer count: 1
downvote count: 0
tagged with: javascript
has title: Format date / time with d3.js
favorite count: 0
linked to: http://stackoverflow.com/q/26652925
tagged with: d3.js
upvote count: 1
accepted answer: http://stackoverflow.com/a/26651060
type: AnsweredQuestion

http://stackoverflow.com/comment/41916978
comment on: http://stackoverflow.com/a/26657186
has text: Seems on the heavy side for what it provides you though, seems like UA detection is required because of browser inconsistencies
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41719294
has text: What is not working here ? Where is the second code block wrapped in ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26548221
score: 0

http://stackoverflow.com/comment/41875296
score: 0
type: Comment
type: QuestionComment
has text: Thanks @yarons. That definitely helps drill into the coverage and identify what specifically is not being covered. I still don't really understand *in depth* what the percentages mean =/.
comment on: http://stackoverflow.com/q/26618243

http://stackoverflow.com/comment/41722944
comment on: http://stackoverflow.com/a/26550311
has text: i will try this now. i think this could be the problem!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26657713
accepted answer: http://stackoverflow.com/a/26670902
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26670902
upvote count: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41922429
tagged with: jquery
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has title: Add buttons to html template, after receiving JSON
score: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I want to add buttons to the DOM dynamically, after receiving JSON from my API when users access the site. I already implemented the function to get the data, but now I have problems to add the buttons dynamically to the HTML template. Furthermore, I don't know how to call a function on a first page load for a specific template. Here is my code: app.run(function($rootScope, $http, ApiService) { $http.get('connection.properties').then(function (response) { ApiService.getAllElements($rootScope); }); }); In my ApiService I have this function: getAllElements : function($scope) { var requestData = { 'username' : 'user123' }; this.doRequest(requestData).success(function(data) { if (data.success) { console.log(data); // add buttons } }).error(function() { alert('Sorry bro.'); }); } I am a complete AngularJS beginner, so I don't know the correct way on how to do this. Any help would be greatly appreciated. EDIT: data JSON structure looks like this: {"success":true,"msg":"user active,1 element in db","userid":"1","elements":[{"element_id":"1","name":"Element1","description":"This is element 1"}]} And in my profile.html template I have this static button: Element1

http://stackoverflow.com/comment/41928327
has text: @SterlingArcher irrelevant for the question or in general?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26662347

http://stackoverflow.com/comment/41880268
score: 0
type: Comment
type: QuestionComment
has text: See http://stackoverflow.com/questions/15666048/service-vs-provider-vs-factory?rq=1
comment on: http://stackoverflow.com/q/26635455

http://stackoverflow.com/comment/41727043
has text: are you using a server-side "back-end" language like php, python, or other? The problem with the $.ajax the way you are calling it is asynchronous. you wont be able to break from the loop that way
type: Comment
comment on: http://stackoverflow.com/q/26552381
score: 0
type: QuestionComment

http://stackoverflow.com/q/26643240
has answer: http://stackoverflow.com/a/26644334
linked to: http://stackoverflow.com/q/13571700
type: Question
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26644334
has title: Convert DateTime to string in Where Predicate
has body: I would like to create a Predicate that allows the user to search a date for a text string. breeze.Predicate.create('startDate', 'contains', filterValue); The filter value is entered by the user eg. '2014-06-' 'contains' will not work with a DateTime type. Is is possible to convert the 'startDate' to a formatted string type when creating the Predicate? Any help appreciated.
tagged with: breeze
type: AnsweredQuestion

http://stackoverflow.com/q/26619698
has title: How to "dump" points selected with the LinkedBrush plugin for mpld3?
downvote count: 0
answer count: 1
tagged with: javascript
score: 4
favorite count: 0
tagged with: python
tagged with: d3.js
type: UnansweredQuestion
tagged with: mpld3
has comment: http://stackoverflow.com/comment/42125032
has comment: http://stackoverflow.com/comment/46974192
has answer: http://stackoverflow.com/a/26787983
has body: I am trying to implement a plugin that allows the user to dump relevant information about points selected by the LinkedBrush plugin. I think my question is sort of related to this example. I have meta information tied to each point via the HTMLTooltip plugin. Ideally, I would somehow be able to dump this too. In the example I linked to, the information is outputted via a prompt. I wish to be able to save this information to a text file of some kind. Put slightly differently: How do I determine which points in a scatter plot have been selected by the LinkedBrush tool so that I can save the information?
has comment: http://stackoverflow.com/comment/42152273
type: Question
upvote count: 4

http://stackoverflow.com/comment/41900593
has text: i modified the answer please check that @apache
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26646391

http://stackoverflow.com/q/26561751
has comment: http://stackoverflow.com/comment/41743872
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26561792
has title: (this) usage in jQuery
has comment: http://stackoverflow.com/comment/41743798
tagged with: this
answer count: 1
tagged with: jquery
has body: I have the HTML element like this below &lt;div class="myclassname" data-barcolor="#000000"&gt;&lt;/div&gt; And I am trying to get these "data-barcolor" property using (this). keyword, instead of using classname..like below $('.myclassname').easyPieChart({ barColor : $(this).attr('data-barcolor'), }); It doesn't work properly. But $('.myclassname').easyPieChart({ barColor : $('.myclassname.').attr('data-barcolor'), }); Works perfectly. By Using classname i can't get the values dynamically. I have more than one class in the same name with different values. so how to get the values in jquery!
favorite count: 0
has comment: http://stackoverflow.com/comment/41743811
upvote count: 2
has comment: http://stackoverflow.com/comment/41743780
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/26599158
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41812965
type: Answer
has comment: http://stackoverflow.com/comment/41813034
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26599105
has comment: http://stackoverflow.com/comment/41812751
score: 4
answers question: http://stackoverflow.com/q/26599105
has body: The problem is that you're not rendering the posts template. You can fix this by adding this.render() or this._super() before you define the templates of the outlets of the route you are in get rendered: App.PostsRoute = Ember.Route.extend({ renderTemplate: function() { // add this line this._super(); this.render('sidebarTemplate', { into: 'posts', outlet: 'sidebar' }); this.render('contentTemplate', { into: 'posts', outlet: 'content' }); } }); Just one note on extending features; In this particular code, the call this._super() would technically be the same as calling this.render(), but the difference is that by calling _super() you are extending the renderTemplate functionality by appending your stuff to what the method would do on its own, which in this case would be call this.render() and perhaps another routine this method might need to perform (generally speaking, not exclusive to renderTemplate), while if you call the method that does the thing you want yourself, in this case the render method, you'll be excluding from the flow the other things that this method could perform. And this is not right or wrong. It really depends on what you want to achieve. For most cases you should call this._super() instead of re-writing the implementation again in the event that the method you're extending does more than one thing and/or gets to do more than one thing in the future.

http://stackoverflow.com/q/26591510
tagged with: caching
has body: If I make multiple requests for a resource via ajax calls with 'cache: false', does this prevent the browser from caching each response using the request header (or some other way), or does it bypass the previously cached responses because the resource url is made unique due to the _=date param and thus never matches anything in the cache? As a reference, here is the jquery documentation on the ajax's cache property: 'If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters.' So does it really 'force requested pages not to be cached'? Or does it simply imitate that effect by appending the date - with the affect that no two requests are ever the same and so a fresh request made (but all the while the poor browser has a whole bunch of cached but never used responses)? (If I am so miss understanding the way caching works please feel free to school me!! (I'm assuming its basically a key value type of system with the key being the request information, and the value being the response for that request.))
has title: Does 'cache: false' PREVENT caching, or UNIQUE-IFY the request to bypass cached?
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: backbone.js
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41798788
has answer: http://stackoverflow.com/a/26596417
downvote count: 0
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/26534521
score: 2
downvote count: 0
tagged with: safari-extension
tagged with: safari
type: AnsweredQuestion
has title: Creating a JSONP Callback From Safari Extension
favorite count: 0
has answer: http://stackoverflow.com/a/26565515
accepted answer: http://stackoverflow.com/a/26565515
type: Question
upvote count: 2
tagged with: jsonp
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/8495825
has body: I'm trying to load some data from Reddit via a Safari extension. I'm using a JSONP pattern to create the callback function and attach the new src to the script. However, it looks like there are two window namespaces, and the function that I dynamically create is not available to the context of the dynamically added script. This link seems to detail the problem for chrome, which I'm guessing is similar to mine in Safari. JSONP request in chrome extension, callback function doesn&#39;t exist? Here's the code (works outside of extension): function jsonp(url, callback) { var callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random()); window[callbackName] = function(data) { delete window[callbackName]; callback(data); }; console.log('about to create script'); var script = document.createElement('script'); script.src = url + (url.indexOf('?') &gt;= 0 ? '&amp;' : '?') + 'jsonp=' + callbackName; document.body.appendChild(script); console.log('script should be appended'); } function getImages(){ jsonp('http://www.reddit.com/r/cats/.json', function(data) { data.data.children.forEach(function(el){ console.log(el.data.url); }); }); } Any ideas, work arounds? Thanks!

http://stackoverflow.com/comment/41890719
comment on: http://stackoverflow.com/a/26594957
score: 0
type: AnswerComment
type: Comment
has text: @SkipHuffman Did you wrap the properties in a `features` object?

http://stackoverflow.com/comment/41821302
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26603963
has text: I'm not well known with angularjs, but can't you save the values of an item in the attributes of the a tag?

http://stackoverflow.com/q/26660748
has answer: http://stackoverflow.com/a/26661204
score: 0
linked to: http://stackoverflow.com/q/6431459
type: UnansweredQuestion
has title: jQuery: Textbox text change event after autocomplete?
tagged with: model-view-controller
type: Question
has comment: http://stackoverflow.com/comment/41923674
tagged with: c#
answer count: 2
tagged with: autocomplete
has body: I'm using jquery autocomplete plugin for a textbox: $('#TargetArea').autocomplete({ source: '@Url.Action("GetTarget", "Ads", new { type = "Zip", term = target })' }); It works fine. Now, I want to do is: when the textbox text changed, call an action to get data from database, then show the data in another div. $('#TargetArea').change(function () { var url = "/My/Test"; var target = $("#TargetArea").val(); $.post(url, { Target: target }, function (data) { $("#resultId").html(data); }); }) However, this change event never triggered. If I comment out the autocomplete part, then it works fine. Anyone knows what the problem is? or, How I should do this? Thanks
has answer: http://stackoverflow.com/a/26660910
tagged with: javascript
tagged with: jquery

html-table
tags question: http://stackoverflow.com/q/26597807
tag name: html-table
tags question: http://stackoverflow.com/q/26520918
tags question: http://stackoverflow.com/q/26566226
tags question: http://stackoverflow.com/q/26644705
tags question: http://stackoverflow.com/q/26519131
tags question: http://stackoverflow.com/q/26571611
tags question: http://stackoverflow.com/q/26617795
tags question: http://stackoverflow.com/q/26645757
type: Tag
tags question: http://stackoverflow.com/q/26615111
tags question: http://stackoverflow.com/q/26598878

http://stackoverflow.com/q/26550654
tagged with: javascript
has comment: http://stackoverflow.com/comment/41741388
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41723538
tagged with: css
has answer: http://stackoverflow.com/a/26560346
type: UnansweredQuestion
has body: I have a bit of a problem where I have to link to particular sections within a web page over which I have no control. Rather than having lots of nice, unique elements so I can just use www.thepage.com#yayforcss, this page instead has multiple instances of the same element. Is there any way to link to the xth instance of a class in a web page?
has answer: http://stackoverflow.com/a/26560481
has title: Shortcut to the second instance of a class in css
has comment: http://stackoverflow.com/comment/41723603
type: Question
answer count: 2

http://stackoverflow.com/comment/41845412
has text: yes but i don't want register my web app for an id.
type: Comment
comment on: http://stackoverflow.com/a/26615537
score: 0
type: AnswerComment

http://stackoverflow.com/a/35590185
upvote count: 2
has body: Figured it out. Problem #1: The problem, as I mentioned in the question, is that on-select is executed before the div is created and that regular callbacks (such as onload) won't work in templates that are injected by angular elements. You can fix this by used a corresponding angular directive. So, you can use ng-load in the editor div. Problem #2: Essential problem: The code editor (which contains the processing code) and the target canvas (to which we want to inject said code) will never exist at the same time. Solution: Save the code when the code tab is deselected and inject that stored value when the canvas is loaded. Full Solution <ion-content> <ion-content> <ion-content> <ion-content>
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26637284

http://stackoverflow.com/a/26614345
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/26599968
downvote count: 0
has body: It is also possible to write res.locals.userCount = CountOfUsers; and then later just res.view();
type: Answer

http://stackoverflow.com/q/26555492
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26556685
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/45202410
answer count: 2
has body: In Ace Editor, I want to find a text, select row and replace that text. I can find the text (using own tags to find them), and it is working. I'm also able to get the row (line) number by using following code: editor.find('needle',{ backwards: true, wrap: true, caseSensitive: true, range: null, wholeWord: true, regExp: false }) editor.$search.set({ needle: /(start_#D1_SavePos)/ }); var found = editor.$search.find(editor.getSession()), Range = require('ace/range').Range, // find tagname "start_#D1_SavePos" in editor mine = new Range(found.start.row+1, found.start.column-1, found.end.row+1, found.end.column), // read the line number D1SavePos = (editor.session.getTextRange(mine)), // get next line number, after "start_#D1_SavePos" // I need only this and in the editor it will be R13=0 rowOfD1SavePos = (mine+1), // Rewrite R13 with value from input text // get Value from input field newD1SavePos = document.getElementById("highestBTTXT").value, //Replace Zero-Value from R13 to new value D1SavePos = D1SavePos.replace(/R13=0/, "R13=" + newD1SavePos); // Now set this to editors row Tried to make the row selection with, because in "rowOfD1SavePos" the read line number is stored: editor.selection.moveCursorToPosition(rowOfD1SavePos); but it is not working. If this works I want to replace this row with the value "D1SavePos" UPDATE 25.10.14 This is my perfect working solution: editor.find('needle',{ backwards: true, wrap: true, caseSensitive: true, range: null, wholeWord: true, regExp: false }); editor.$search.set({ needle: /(start_#D1_SavePos)/ }); var found = editor.$search.find(editor.getSession()), Range = require('ace/range').Range, // Find Coordinates, after Line "start_#D1_SavePos" row = new Range(found.start.row+1, found.start.column-1, found.end.row+1, found.end.column), // read Text in row D1SavePos = (editor.session.getTextRange(row)), // rewrite // get value from input field newD1SavePos = document.getElementById("highestBTTXT").value; // rewrite R-Parameter with i…
downvote count: 0
favorite count: 0
tagged with: ace-editor
score: 6
has title: ACE EDITOR Find Text, select row and replace text
upvote count: 6
has answer: http://stackoverflow.com/a/45202410
accepted answer: http://stackoverflow.com/a/26556685

http://stackoverflow.com/a/26544487
type: Answer
accepted answer of: http://stackoverflow.com/q/26544464
downvote count: 0
answers question: http://stackoverflow.com/q/26544464
has body: Simple: $scope.packageElement.pData = dataFromServer.pData; $scope.packageElement is an object, it doesn't have a concat function. Or, a better option could be to use angular.extend(): var expectedOutPut = angular.extend({}, $scope.packageElement, {'pData': dataFromServer.pData}); This way, you'll copy the objects, instead of modifying them. Note: Keep in mind that angular.extend does not support recursive merge (deep copy).
score: 3
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/26595300
tagged with: c#
has answer: http://stackoverflow.com/a/26595622
downvote count: 3
score: -3
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: asp.net
has body: Please forgive me if you feel this is very basic question! I have a label like below in the C# codebehind. lblNewUser.Text= Click Here +"to create a new user"; I have a separate method to create new user in the c#. I just want to navigate to the create user C# method when user click on the above link "Click Here"? How can i acheive this?
has comment: http://stackoverflow.com/comment/41805252
favorite count: 0
type: Question
has title: On click of a hyperlink, need to pass the control to a method?
answer count: 1

http://stackoverflow.com/comment/41763117
has text: Take a look at this answer http://stackoverflow.com/a/25910045/949476 In your case your custom function would return `''` if `comment_id === 0`.
type: Comment
comment on: http://stackoverflow.com/q/26572508
score: 1
type: QuestionComment

http://stackoverflow.com/q/26625710
answer count: 1
has body: My controller cannot pick up the data that processed from $http.get() in requirejs environment. Any idea how can I fix it? UserFactory.js define(['app'], function (app) { app.module1.factory('UserFactory', ['$http', function($http) { //your minsafe controller var factory = {}; factory.getUsers = function(){ $http.get('api.php').success(function(data) { // here the data from the api is assigned to a variable named users return data; // [{"id":"1","name":"Big Kev","email":"bigkev@example.com"},{"id":"2","name":"Judy","email":"punk@example.net"},{"id":"3","name":"Suzy","email":"suzy@example.com"},{"id":"4","name":"Joey","email":"sheena@example.org"},{"id":"5","name":"DeeD","email":"deedee@example.net"}] }); }; return factory; }]); }); view.js, define(['app'], function (app) { app.module1.controller('View1Ctrl', ['$scope','UserFactory', function($scope,userFactory) { //your minsafe controller $scope.message = "Message from View1Ctrl"; $scope.users = userFactory.getUsers(); console.log($scope.users); // undefined }]); }); as you can see, I get undefined for $scope.users. It seems that console.log($scope.users); is executed before $http.get('api.php') in the factory. How can I fix this then?
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26625897
tagged with: ajax
has title: Angular + requirejs - the controller cannot pick up ajax return data from the factory?
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/26625897
tagged with: php
score: 0
tagged with: requirejs

http://stackoverflow.com/a/26566282
has comment: http://stackoverflow.com/comment/41751994
type: Answer
has body: Right, so there are a couple of ways to do this. Putting arguments inside of parens doesn't work because infix macros can't match outside of enclosing delimiters so when the arguments macro gets invoked it sees zero tokens before or after it (the error should be clearer). Your other solution is running into hygiene problems since the arguments macro needs access to the args identifier but infix macros are not allowed to match before the equals sign when it's in a var statement so it can't actually match the args identifier. So couple of solutions. The easiest is to just do something like what the bluebird wiki suggested: macro argify { rule { ( $arg ) } =&gt; { var $arg; for (var i, len = arguments.length; i &lt; len; i++) { args.push(arguments[i]); } } } function foo() { argify(args) return args; } You could also go the unhygienic route (not really recommended but arguments is already kinda unhygienic so&#x2026;): let function = macro { case {$mname $name ( $parens ...) { $body ... } } =&gt; { letstx $args = [makeIdent("args", #{$mname})]; return #{ function $name ( $parens ...) { var $args = []; for (var i, len = arguments.length; i &lt; len; i++) { $args.push(arguments[i]); } $body ... } } } } function foo() { return args; } Edit: I just thought of another solution that would allow you to keep your current syntax by overriding var: let var = macro { rule { $args = [].slice.call(arguments) } =&gt; { var $args = []; for(var i, len = arguments.length; i &lt; len; i++) { $args.push(arguments[i]); } } rule { $rest ... } =&gt; { var $rest ... } } function foo() { var args = [].slice.call(arguments); }
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26555614
has comment: http://stackoverflow.com/comment/41751767
answers question: http://stackoverflow.com/q/26555614
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41751944
downvote count: 0

http://stackoverflow.com/comment/41866050
comment on: http://stackoverflow.com/q/26627872
type: Comment
has text: The fittext, letteringjs, textillate, etc... `:)`
type: QuestionComment
score: 0

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/26520900
tags question: http://stackoverflow.com/q/26601841
type: Tag
tags question: http://stackoverflow.com/q/26550355

http://stackoverflow.com/q/26596792
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
upvote count: 7
has comment: http://stackoverflow.com/comment/41834674
score: 7
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/41821799
tagged with: bundle-layout
downvote count: 0
favorite count: 0
has body: I am trying to create a diagram similar to this one in D3.js: http://mbostock.github.io/d3/talk/20111116/bundle.html This example uses hierarchical edge bundling. However, my data is not hierarchical in nature and I want to represent a relatively simple network structure. I have a bunch of nodes divided into groups, and connected through a simple connectivity matrix. I am able to generate a force-directed network diagram in D3.js similar to this: http://bl.ocks.org/mbostock/4062045 var width = 500, height = 500; var color = d3.scale.category20(); var force = d3.layout.force() .charge(-120) .linkDistance(30) .size([width, height]); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var graph = getData(); force .nodes(graph.nodes) .links(graph.links) .start(); var link = svg.selectAll(".link") .data(graph.links) .enter() .append("line") .attr("class", "link") .style("stroke-width", function(d) { return Math.sqrt(d.value); }); 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); node.append("title") .text(function(d) { return d.name; }); force.on("tick", function() { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); node.attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }); }); function getData() { return { "nodes":[ {"name":"Myriel","group":1}, {"name":"Napoleon","group":1}, {"name":"Mlle.Baptistine","group":1}, {"name":"Mme.Magloire","group":1}, {"name":"CountessdeLo","group":1}, {"name":"Geborand","group":1}, {"name":"Champtercier","group":1}, {"name":"Cravatte","group":1}, {"name":"Count","group":1}, {"name":"OldMan","group":1}, {"name":"Labarre","group":2}, {"name":"Valjean","group":2}, {"name":"Marguerite","group":3}, …
has title: Create radial network diagram with non-hierarchical data in D3.js

http://stackoverflow.com/q/26568364
has answer: http://stackoverflow.com/a/26568493
has comment: http://stackoverflow.com/comment/41755939
has comment: http://stackoverflow.com/comment/41755859
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41755816
has comment: http://stackoverflow.com/comment/41755995
has title: Unable to display html input
has comment: http://stackoverflow.com/comment/41755818
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41755923
has comment: http://stackoverflow.com/comment/41755884
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41755879
possible better answer: http://stackoverflow.com/a/26568448
has body: So I have two input boxes, one for a username and one for a password. I want to display the inputs back to the user after they hit login, but for some reason all that appears is: [object HTMLInputElement][object HTMLInputElement] This is my code: JAVA User name: Password: Login
has comment: http://stackoverflow.com/comment/41755901
has answer: http://stackoverflow.com/a/26568448
has answer: http://stackoverflow.com/a/26568815
accepted answer: http://stackoverflow.com/a/26568815
tagged with: input

http://stackoverflow.com/comment/41717247
type: Comment
type: QuestionComment
has text: @05K3 The `validateSelect` function doesn't exist, either create it or remove the onblur event.
comment on: http://stackoverflow.com/q/26546964
score: 0

http://stackoverflow.com/comment/41815159
has text: well I thanks for the links, I'll keep working on it
score: 0
comment on: http://stackoverflow.com/q/26600325
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26564907
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26564861
has body: Each time you initializing var part=[] that it will make the array empty . Only the last value will be inside it . So initialize before the .each method , not inside in it .
answers question: http://stackoverflow.com/q/26564861
type: Answer
has comment: http://stackoverflow.com/comment/41749357
score: 1

http://stackoverflow.com/comment/41773149
type: QuestionComment
comment on: http://stackoverflow.com/q/26577094
score: 1
has text: not always, it depends on the plugin. SOme have ways to change options on the fly
type: Comment

http://stackoverflow.com/comment/41802019
type: AnswerComment
has text: You did mention that his seems a bit hacky.. I wonder, is there a more appropriate way create a class where when instanced the instance has formatted data, similar to, say, a property with a getter and setter?
type: Comment
comment on: http://stackoverflow.com/a/26593183
score: 0

http://stackoverflow.com/a/26572295
has body: This boils down to: Can I have the address bar lie to the user by saying they're on Site A but actually having them on Site B? No, modulo browser bugs (and I'm not aware of any). And if it were possible, it would be extremely inappropriate. (You can get close, with an off-by-one domain name or similar, but again: extremely inappropriate.) Sometimes we just have to say "no" to clients. This is one of those times.
has comment: http://stackoverflow.com/comment/41771171
type: Answer
answers question: http://stackoverflow.com/q/26572270
score: 0

http://stackoverflow.com/a/26616001
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41843534
has body: You have a fixed width in the #rewards div, just remove it: #rewards { margin-left: 2px; padding-top: 10px; width: 1170px; /* &lt;--- Remove this line */ }
has comment: http://stackoverflow.com/comment/41843355
type: Answer
accepted answer of: http://stackoverflow.com/q/26615871
downvote count: 0
has comment: http://stackoverflow.com/comment/41843475
answers question: http://stackoverflow.com/q/26615871
score: 3
has comment: http://stackoverflow.com/comment/41843402

http://stackoverflow.com/comment/41882850
has text: hmm, it should work..this is the jsfiddle i used to test it.. on scroll it will change the text to red. [link](http://jsfiddle.net/9svz5mus/2/)
comment on: http://stackoverflow.com/a/26637203
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/73183708
type: Comment
comment on: http://stackoverflow.com/a/26540835
has text: Odd, I ran the tests three times and consistently saw a minuscule _improvement_ when relying on ASI. I was surprised.
score: 1
type: AnswerComment

http://stackoverflow.com/a/26573863
type: Answer
answers question: http://stackoverflow.com/q/26573070
score: 0
has body: You need following 2 , as you had mentioned in question. textbox, where i want complete -- request.term , you are using it correctly. dropdownlist index -- assuming dropdownlist id is DP1, you need to get its index using following $("#<%= DP1.ClientID %>")[0].selectedIndex So putting all things in one line, it will be, data: "{ 'Text': '" + request.term + "','SelectedIndex':'" + $("#<%= DP1.ClientID %>")[0].selectedIndex + "'}", Example function OnChangeVal() { alert($("#sel")[0].selectedIndex); } Volvo Saab Mercedes Audi

http://stackoverflow.com/q/26561917
has title: (Javascript) Get substring in the string and replace it with another
has body: I have a string like this (javascript): var str = "Just the way you are"; 1) I want to get the substring from startIndex to endIndex like this: str.getSubstring(startIndex, endIndex); var result = str.getSubstring(5, 7); //result will be "the"; 2) And I also want to replace the substring like this: str.replaceSubstring(startIndex, endIndex, stringToReplace); str.replaceSubstring(5, 7, "hello");// str will be "Just hello way you are"; Thank for your help.
upvote count: 2
has answer: http://stackoverflow.com/a/26562224
downvote count: 2
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41744275
has comment: http://stackoverflow.com/comment/41744061
has comment: http://stackoverflow.com/comment/41744024
has answer: http://stackoverflow.com/a/26562122
tagged with: substring
accepted answer: http://stackoverflow.com/a/26562224
answer count: 2
possible better answer: http://stackoverflow.com/a/26562122
tagged with: javascript
favorite count: 0
score: 0

http://stackoverflow.com/q/26531252
answer count: 1
has answer: http://stackoverflow.com/a/26538699
favorite count: 0
upvote count: 4
downvote count: 0
type: UnansweredQuestion
tagged with: oauth-2.0
tagged with: signalr
linked to: http://stackoverflow.com/q/20585872
type: Question
tagged with: owin
has title: How do we preform OWIN oAuth Bearer token based Authentication and Authorization in SignalR?
has body: We are using the built in OWIN oAuth server functionality to generate Bearer tokens. We have them working with ASP.NET Web API but not sure how to get them working with SignalR (and an AngularJS javscript client). How do we use Bearer tokens with SignalR for authentication and authorization? I have not seen any really good clear answers on how to achieve this. Thanks in advance.
tagged with: asp.net-mvc
tagged with: javascript
score: 4

http://stackoverflow.com/q/26659922
has title: Jssor - grabbing element by index
type: Question
accepted answer: http://stackoverflow.com/a/26824587
score: 0
answer count: 1
tagged with: jssor
type: AnsweredQuestion
has body: I have a question about grabbing and image from Jssor slider. I have a carousel with 20 images (9 of them visible at a time) and I need to grab the middle one (to add or remove a class). I want to add an effect where the middle one is in color, and the rest are grayed out. How could I do that? Cheers!
tagged with: javascript
has answer: http://stackoverflow.com/a/26824587

http://stackoverflow.com/comment/41755266
type: QuestionComment
comment on: http://stackoverflow.com/q/26567902
score: 0
has text: Based off my setup, what can I do to cancel the traditional submit? Because the techniques I mentioned above did not work. The other issue is that I'm not sure whether the jQuery.slick submit listener will get executed first, or my contact_email() function, because jquery.slick must execute first for the form elements to indicate whether there's an error or not.
type: Comment

http://stackoverflow.com/q/26663064
linked to: http://stackoverflow.com/q/5373278
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/26663224
answer count: 1
has comment: http://stackoverflow.com/comment/41928261
has body: I have the following code: function Socket(io, playGame, mapper) { io.on('connection', function (socket) { // message handler for the chat message socket.on('sendChat', function (data) { console.log(socket); console.log(data); console.log('recieved chat'); var connectedPlayer = playGame.findConnectedPlayer(socket); if (!connectedPlayer) return; var connectedGame = playGame.findConnectedGame(socket, connectedPlayer.gameId); if (!connectedGame) return; // send update game with players properly ordered for (socketIndex in this.sockets) { var socket = this.sockets[socketIndex]; // send the new data to each player socket.socket.emit('chatUpdate', { chatText: data.chat }); } }); // message handler for join game message socket.on('joinGame', function (data) { console.log('recieved join:', JSON.stringify(data)); if (!playGame.newConnectedPlayer(socket, data)) return; ... In the method for sendChat, socket is undefined. In the method for joinGame, socket is defined. I have tried several ideas, but the problem persists. Any help would be appreciated.
tagged with: sockets
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26663224
has title: I am receiving a message in node.js and the object socket is undefined
type: Question

http://stackoverflow.com/q/26665747
has title: JavaScript Play/Pause Audio Toggle
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: Here is a JSFiddle: http://jsfiddle.net/8LczkwLz/19/ HTML: &lt;audio class="flashcardAudio" preload='none'&gt; &lt;source src="http://dl.dropbox.com/u/1538714/article_resources/song.m4a" type='audio/mpeg' /&gt; &lt;/audio&gt; &lt;a class="speakerClicked"&gt; &lt;img src="http://codropspz.tympanus.netdna-cdn.com/codrops/wp-content/uploads/2010/01/play1-150x150.png"/&gt; &lt;/a&gt; JS: var flashcardAudio = document.getElementsByClassName('flashcardAudio'), control = document.getElementsByClassName('speakerClicked'); control.onclick = function () { pause_html='&lt;img src="https://cdn2.iconfinder.com/data/icons/media-and-navigation-buttons- square/512/Button_4-128.png"&gt;'; speaker_html='&lt;img src="http://codropspz.tympanus.netdna-cdn.com/codrops/wp-content/uploads/2010/01/play1-150x150.png"&gt;'; // Update the Button var pause = control.innerHTML === pause_html; control.innerHTML = pause ? speaker_html : pause_html; // Update the Audio var method = pause ? 'pause' : 'play'; flashcardAudio[method](); // Prevent Default Action return false; }; On click of play button I would like to see it toggle to pause button and vice a versa. Seems to be issues entering function in JS though since the alert message never triggers.
accepted answer: http://stackoverflow.com/a/26665807
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/26665807
type: Question
tagged with: javascript
upvote count: 1

http://stackoverflow.com/comment/84207429
comment on: http://stackoverflow.com/a/26601548
score: 0
type: Comment
has text: What if Manger-1 opens up the edit window and never saves his updates.
type: AnswerComment

http://stackoverflow.com/q/26532594
has title: Angular skipping over a controller
has comment: http://stackoverflow.com/comment/41692594
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/41692663
has body: I have 2 controllers on my angular module. app.controller('MainCtrl', ['$scope', '$http', '$timeout', function($scope, $http, $timeout) { .... }]; app.controller('FooterCtrl', ['$scope', function($scope) { .... }]; The first one works fine but the second is just not being processed at all. Even the console.log() inside its function does not work. They have been registered the same way. Really strange that one works but the other is just skipped over. Plunkr here. Note: The FooterCtrl controller is used in footer-cell.html not in index.html Edit: Looks like the problem lies with the inspector-gadget module I'm using. Using the FooterCtrl in its top element works fine but putting it in the &lt;inspector-title&gt; or &lt;inspector-content&gt; causes the this problem. Weird because their documentation shows its to be used with &lt;inspector-content&gt;.
type: Question
has comment: http://stackoverflow.com/comment/41691837
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41691702

http://stackoverflow.com/q/26592104
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26592163
score: -4
has body: I have a form sending some vars by JS &lt;form id="custemail" action="mail/out.php" method="post"&gt; .... &lt;input type="submit" value="Create &amp; Send"&gt; &lt;/form&gt; I need to change post URl on php side. How must i change my Js code so it'll work. I mean I don't want to use url:"mail/out.php", in my JS. Or I can use If else on JS side. But the vars coming from php. So I don't know how to use them. I have 8 different conditions. The JS code: $('#sending').click(function(){ $.prompt("What is customer's email?","", function(value){ $.ajax({ url: "mail/out.php", type: 'POST', data: $('#custemail').serialize(), } ).done (function(data) { $.msg("Message sent to the '"+value+"'?"); }); }, function(){ $.msg("You clicked cancel!"); }); });
type: Question
has comment: http://stackoverflow.com/comment/41799150
answer count: 2
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/26592163
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26592172
favorite count: 0
tagged with: ajax
has title: Send form url without JS
has answer: http://stackoverflow.com/a/26592172
tagged with: php

http://stackoverflow.com/comment/41691604
comment on: http://stackoverflow.com/a/26531881
has text: Agreed the extra script tags will probably be annoying on the front end. But just throwing out workable options. The article is a more promising solution.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26567505
linked to: http://stackoverflow.com/q/4017122
tagged with: ajax
has answer: http://stackoverflow.com/a/26567526
answer count: 5
has comment: http://stackoverflow.com/comment/41753993
possible better answer: http://stackoverflow.com/a/26567575
has answer: http://stackoverflow.com/a/26567575
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19666593
has title: How do I retrieve these values from json?
linked to: http://stackoverflow.com/q/20666740
accepted answer: http://stackoverflow.com/a/26567526
has body: I am trying to retrieve the latitude and longitude of a location from google maps via jquery ajax. Here's my JavaScript code: var lat; var lng; function setCordinates(address) { var ret = false; data = "address="+address; $.ajax({ type: "GET", url: "https://maps.googleapis.com/maps/api/geocode/json", data: data, cache: false, dataType: 'json', success: function(json_data) { lat = json_data.results.geometry.location.lat; lng = json_data.results.geometry.location.lng; ret = true; }, error: function() { alert("There was an error!"); } }); return ret; } When I previewed the response body from my console I got the json data returned as : { "results" : [ { "address_components" : [ { "long_name" : "Uyo", "short_name" : "Uyo", "types" : [ "locality", "political" ] }, { "long_name" : "Akwa Ibom", "short_name" : "Akwa Ibom", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "Nigeria", "short_name" : "NG", "types" : [ "country", "political" ] } ], "formatted_address" : "Uyo, Nigeria", "geometry" : { "bounds" : { "northeast" : { "lat" : 5.0906023, "lng" : 8.0030251 }, "southwest" : { "lat" : 4.9681658, "lng" : 7.8638077 } }, "location" : { "lat" : 5.0377396, "lng" : 7.9127945 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 5.0906023, "lng" : 8.0030251 }, "southwest" : { "lat" : 4.9681658, "lng" : 7.8638077 } } }, "partial_match" : true, "types" : [ "locality", "political" ] } ], "status" : "OK" } I am trying to get the values of lat and lng from location but I get an error: TypeError: json_data.results.geometry is undefined I have looked at this post, this post, this post, this post and this post but I don't really know what to do. They all seem unrelated. Please help I am still new to json. Thanks.
type: Question
has answer: http://stackoverflow.com/a/26567566
has answer: http://stackoverflow.com/a/26567576
linked to: http://stackoverflow.com/q/8553539
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/26567562
tagged with: javascript
linked to: http://stackoverflow.com/q/20484014
score: 0
tagged with: google-maps
tagged with: jquery

http://stackoverflow.com/a/26537038
downvote count: 0
answers question: http://stackoverflow.com/q/26536890
has body: JavaScript objects and JSON are two very differen things, which is the root of the problem you are seeing. What you are passing to $.post() is actually an object, not json, and is therefore being converted to a paramstring by jQuery before being sent to node. In this case, the paramstring is: favoriteAnimal=piglet&amp;okayAnimals[]=cats&amp;okayAnimals[]=dogs which of course explains why an okAnimals[] property exists on the body. I'm surprised that the middleware you are using to parse the body isn't picking that up properly, but regardless you should instead pass a json string to $.post if you want to send it as is. $.post('/url', JSON.stringify(data));
type: Answer
upvote count: 1
score: 1

papaparse
type: Tag
tags question: http://stackoverflow.com/q/26597460
tag name: papaparse
tags question: http://stackoverflow.com/q/26539431

http://stackoverflow.com/a/26537026
type: Answer
has comment: http://stackoverflow.com/comment/41713700
has comment: http://stackoverflow.com/comment/42159643
has body: Structure of your session Store your items in the session indexed by the item id. $_SESSION['cart_array'][ $itemId ] = $quantity; You save the items like this, which makes it more cumbersome to access the items in the cart $_SESSION['cart_array'][0] [ 'item_id' ] = $itemId; $_SESSION['cart_array'][0] [ 'quantity' ] = $quantity; Build your form Make your cart one form. For each entry create an input field in a way like this print '&lt;form action="cart.php" method="post"&gt;'; foreach ($_SESSION['cart_array'] as $itemId =&gt; $quantity) { // query product information from database here // build form row with one input field for each entry in the cart print '&lt;tr&gt;'; print '&lt;td&gt; add product information here &lt;/td&gt;' print '&lt;td&gt;&lt;input name="quantity['.$itemId.']" value="'.$quantity.'"&gt;&lt;/td&gt;'; print '&lt;/tr&gt;'; } print '&lt;/form&gt;'; Add item to cart After submit of your form you can loop through the quantities array you received via post and update your session data // check if cart already exists. if not, init it. if (!isset(_SESSION['cart_array']) { $_SESSION['cart_array'] = array(); // otherwise save itemIds and their quantities } else { foreach ($_POST['quantity'] as $itemId =&gt; $itemQuantity) { // if the given quantity is 0 remove the item from the cart if ($itemQuantity == 0) { unset($_SESSION['cart_array'][ $itemId ]) // otherwise save or update the quantity for the given item } else { $_SESSION['cart_array'][ $itemId ] ['quantity'] = $itemQuantity; } } } Add delete buttons to the form If the rest is working you can add delete buttons. The buttons have to set the value of the corresponding input field via javascript to 0 and submit the form.
answers question: http://stackoverflow.com/q/26536087
has comment: http://stackoverflow.com/comment/42171160
has comment: http://stackoverflow.com/comment/41712989
has comment: http://stackoverflow.com/comment/41846239
has comment: http://stackoverflow.com/comment/42159667
has comment: http://stackoverflow.com/comment/41727402
has comment: http://stackoverflow.com/comment/41783739
score: 0

http://stackoverflow.com/comment/41812436
has text: As I learn JavaScript it was my main concern about what people meant writing for example "String", "string" or "_string_", not always mentioning if it's a function object or an instance of a primitive type. Finally I got the difference.
comment on: http://stackoverflow.com/a/26598745
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26626355
has comment: http://stackoverflow.com/comment/41863745
downvote count: 0
answers question: http://stackoverflow.com/q/26626032
upvote count: 2
has body: simply create new view in success callback of fetch var ViewOne = Backbone.View.extend({ initialize: function () { var collection = new Collection(); collection.fetch({ success:function(){ new ViewTwo({ collection: collection }); } }); } });
type: Answer
score: 2

http://stackoverflow.com/comment/41838946
has text: BFS travels each node only once, and its main problem is memory needed, so no reason there is one faster. Also, at least in my browser it takes 1 milisecond to generate the output from the data from your link : http://jsfiddle.net/juvian/fmhrpdbf/1/ check how long it takes in console
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26595966

http://stackoverflow.com/q/26522507
favorite count: 0
upvote count: 9
possible better answer: http://stackoverflow.com/a/26522668
has answer: http://stackoverflow.com/a/26522668
downvote count: 0
has title: How to pass state with parent to child component
has body: Is there any way passing state from parent component to child component like: var ParentComponent = React.createClass({ getInitialState: function() { return { minPrice: 0 } }, render: function() { return ( &lt;div onClick={this.doSomething.bind(this, 5)}&gt;&lt;/div&gt; ); } }); var ChildComponent = React.createClass({ getInitialState: function() { return { minPrice: // Get from parent state } }, doSomething: function(v) { this.setState({minPrice: v}); }, render: function() { return ( &lt;div&gt;&lt;/div&gt; ); } }); I want to change parent state value from child component. In react.js is it possible or not?
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25791034
has answer: http://stackoverflow.com/a/26587021
accepted answer: http://stackoverflow.com/a/26587021
score: 9
tagged with: reactjs
answer count: 2
tagged with: javascript

http://stackoverflow.com/q/26671482
possible better answer: http://stackoverflow.com/a/26674228
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26674228
type: Question
answer count: 2
tagged with: protractor
downvote count: 0
tagged with: javascript
has body: I used protractor as a scraping tool (like https://github.com/motemen/example-scrape-websites/blob/master/protractor/mufg.js) but today my code has changed to be impossible to work. I spent a long time to find the reason, and found that any code outside 'it' sentence doesn't work. describe( 'Start Scraping', function () { // Use Protractor with the site which doesn't use AngularJS browser.ignoreSynchronization = true; /* * Fail because not inside of 'it' sentence */ browser.get( 'http://www.google.com' ); Is this change inevitable? Do I have to give up Protractor-Scraping? Biggest probrem is variable definition because the variable between multiple 'it' sentence is impossible.
upvote count: 1
has answer: http://stackoverflow.com/a/26751990
accepted answer: http://stackoverflow.com/a/26751990
favorite count: 0
has title: Any code outside 'it' doesn't work with Protractor
tagged with: angularjs

http://stackoverflow.com/a/26582307
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26582293
type: Answer
has body: Use this.say instead of this.say().
score: 3
answers question: http://stackoverflow.com/q/26582293

http://stackoverflow.com/comment/41886865
score: 1
has text: Note `this` inside the `load` event listener is the image, not your `TestObj` instance. So if you later want to use `imgW`, it must be `this.img.imgW`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26639847

http://stackoverflow.com/comment/41926547
comment on: http://stackoverflow.com/q/26662080
score: 0
type: Comment
type: QuestionComment
has text: The `+` operator is left-to-right associative: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence .

http://stackoverflow.com/a/26667419
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26667140
type: Answer
has body: You just need to use '_self'. window.open('URL goes here/' + d, '_self'); OR window.location.href = 'URL goes here/' + d;
answers question: http://stackoverflow.com/q/26667140
score: 0

http://stackoverflow.com/a/26661690
upvote count: 3
has comment: http://stackoverflow.com/comment/41925546
has body: As others have said in the comments, use a JSON parser (such as JSON.parse(), built into most browsers) to parse JSON. While JSON is compatible with JavaScript, it isn't the same thing and serves a different purpose. I wanted to respond to your question more generally, as this is a thought I see a lot of folks have as they are just getting started: However, is it bad to use eval() [...] does not contain user-generated data? If you are writing code that transfers data from one layer to another layer, or from one system to another, it is absolutely critical that this occurs with the proper encapsulation. Any time you find yourself mixing data with command, you should be especially careful to make the data escaped properly so that it is never ambiguous, and cannot confused for the command. Security isn't the only issue when it comes to injection. The problem exists whether someone is trying to exploit it or not. You could very well have some data that has quotes in it, or values that you didn't expect. Your code should be as transparent as it is supposed to be when handling data. If you are writing an ORM, for example, that ORM shouldn't modify the data in any way. It should just make sure it ends up where it is supposed to, in one piece, reliably. I see a lot of folks using data in URLs all the time. It's common for someone to concatenate a numeric ID number into a URL as-is without escaping. I ask them... are you sure that your ID will always be a number and may never contain a reserved character? What if someone wants to re-use your code some day in a different context? Assumptions about how something should be used are often the source of bugs and security vulnerabilities, which are really one of the same.
downvote count: 0
has comment: http://stackoverflow.com/comment/41925563
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26661528
accepted answer of: http://stackoverflow.com/q/26661528
type: Answer
score: 3

http://stackoverflow.com/comment/41729077
score: 1
has text: Just a side note. `ng-click` will not make an element seem "clickable" unless you define the `cursor: pointer;` style on that element or wrap it in an `` tag. It may be useful to make a `.clickable` CSS class that will set the cursor to a pointer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26548139

http://stackoverflow.com/comment/41792831
comment on: http://stackoverflow.com/a/26556151
type: AnswerComment
score: 0
has text: I added some code for the push approach, but I didn't try it. It should work though.
type: Comment

http://stackoverflow.com/comment/41805141
has text: Does that continue to be true with the 1.0 version?
type: Comment
comment on: http://stackoverflow.com/a/26594957
type: AnswerComment
score: 0

gzip
tags question: http://stackoverflow.com/q/26528004
tag name: gzip
tags question: http://stackoverflow.com/q/26577160
type: Tag

http://stackoverflow.com/comment/41805348
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26595326
score: 0
has text: write javascript code at the bottom of the page.

http://stackoverflow.com/comment/41808868
score: 0
type: Comment
has text: You need to be more specific on what happens when `product_filters_form_sizes_mediumnarrow ` gets clicked.
type: QuestionComment
comment on: http://stackoverflow.com/q/26597019

http://stackoverflow.com/a/26598506
has comment: http://stackoverflow.com/comment/41812176
has comment: http://stackoverflow.com/comment/41812040
has comment: http://stackoverflow.com/comment/41812408
type: Answer
has body: Doing a try catch makes sense but if JSON.parse throws an error because of something else than your output variable could end up containing something that you did not intend. That's an interesting problem though. I would do something like this - basically checking for the presence of { and } in the string: function parseCookieString(str){ var output; if (!!str.match(/^{.+}$/)) { output = JSON.parse(str); } else { output = str; } console.log(output); } parseCookieString(cookie1); // outputs object parseCookieString(cookie2); // outputs string
has comment: http://stackoverflow.com/comment/41812384
answers question: http://stackoverflow.com/q/26598376
has comment: http://stackoverflow.com/comment/41812193
score: 0

http://stackoverflow.com/comment/41683890
type: Comment
type: QuestionComment
has text: With a String literal that doesn't make any sense.
score: 1
comment on: http://stackoverflow.com/q/26527786

http://stackoverflow.com/q/26575297
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41768469
has answer: http://stackoverflow.com/a/26575375
has comment: http://stackoverflow.com/comment/41768285
type: Question
has comment: http://stackoverflow.com/comment/41768525
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26575375
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41768364
tagged with: http://stackoverflow.com/tag/html
has title: .js not called from html file
has answer: http://stackoverflow.com/a/26575367
favorite count: 0
has answer: http://stackoverflow.com/a/26575349
has body: I am trying to make a video player using html and .js, however the attach1.js file cannot be called by html. Following is my html file: Play Following is my attach1.js: document.write('Hi'); function doFirst() { barSize=600; myMovie1=document.getElementbyId('myMovie'); playButton1=document.getElementbyId('playButton'); bar=document.getELementbyId('defaultBar'); progressBar1=document.getElementById('progressBar'); document.write('Hi'); playButton1.addEventListener('click', playorpause, false); bar.addEventListener('click', clicker, false); } function playorpause() { if(!myMovie1.paused && !myMovie1.ended) { myMovie1.pause(); playButton1.innerHTML='Play'; window.clearInterval(updateBar); } else { myMovie1.play(); playButton1.innerHTML='Pause'; updateBar=setInterval(update, 500); } } function update() { if(!myMovie1.ended) { var size=parseInt(myMovie1.currentTime*barSize/myMovie1.duration); progressBar1.style.width=size+'px'; } else { progressBar1.style.width='0px'; playButton1.innerHTML='Play'; window.clearInteval(updateBar); } } function clicker(e); { if(!myMovie1.paused && !myMovie1.ended) { var mouseX=e.pageX-bar.offsetLeft; var newtime=mouseX*myMovie1.duration/barSize; myMovie1.currentTime=newtime; progressBar1.style.width=mouseX+'px'; } } window.addEventListener('load', doFirst, false); The attach1.js would not even print 'Hi' (in the first line of .js file). This would imply that the file is not being called by the .html file. However, I cannot figure out a reason for this. Any help is appreciated. Thanks.
upvote count: 1
downvote count: 1
possible better answer: http://stackoverflow.com/a/26575349

http://stackoverflow.com/a/26572165
type: Answer
answers question: http://stackoverflow.com/q/26571702
accepted answer of: http://stackoverflow.com/q/26571702
downvote count: 0
has comment: http://stackoverflow.com/comment/41763234
has comment: http://stackoverflow.com/comment/41814160
has body: Just in case I tested with the last update to the question, and adding the 'T' fixes the problem: var newYear = new Date(value.added.replace(" ", "T")); That should fix the problem. Since there should be at most one space, there should be no need for any additional tests. Update as my first answer was assuming the start date was invalid. End date is actually the problem: var endtime = newYear.setHours(newYear.getHours() + (2)); That is certainly taking a risk as it may not work in all implementations. Plus it modifies newYear directly, so I would not otherwise see the point in creating a new variable. I would suggest the following to fix the problem: var endtime = new Date(newYear.getTime() + 7200000); where 7,200,000 is 2 * 60 * 60 * 1000, or the number of milliseconds in 2 hours. According to ECMAScript 5, the date format is parsed using the parse() function (15.9.4.2). This tells you that the language tries to convert your string with a format similar to what x.toUTCString() would produce, which should be what you show in your output. This should match the simplified ISO 8601 format, without the need for the 'T' between the date and time: YYYY-MM-DD HH:mm:ss.sssZ From what I understand, the .sssZ is not required, but you could try something like this: var newYear = new Date(value.added + ".000Z"); You may want to also check 15.9.5.42 toUTCString() and 15.9.5.43 toISOString(). However, if you are saying that you previously extracted a string from a Date object using toUTCString() and the conversion going back fails, then there is a bug in that JavaScript implementation, because ECMAScript clearly says that such a round trip should return the exact same value: If x is any Date object whose milliseconds amount is zero within a particular implementation of ECMAScript, then all of the following expressions should produce the same numeric value in that implementation, if all the properties referenced have their initial values: x.valueOf() Date.parse(x.toString()) Date.…
score: 1
has comment: http://stackoverflow.com/comment/41763035
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41780339
has comment: http://stackoverflow.com/comment/41784028

http://stackoverflow.com/q/26566989
type: Question
has body: I have an input for password and when the user focus the input, it shows a popover describing some things. And inside, at the bottom I have a link. I want the popover expands when the user clicks in this link. I tried to add a class with !important in the height value; I tried to change the height with .css(); I tried to change the height of ALL elements inside the popover and still not working. Any ideas? The HTML: The JS: $('.skPopover a').on('click', function (e){ e.preventDefault(); $('#more-content').removeClass('hide'); }); I tried this too: $('.skPopover a').on('click', function (e){ e.preventDefault(); $('.skPopover').css('height', 290); }); And this: $('.skPopover a').on('click', function (e){ e.preventDefault(); $('.skPopover').addClass('long-popover'); }); The class long-popover have 290px of height.
answer count: 1
has title: How to expand popover height with a click
tagged with: javascript
tagged with: jquery
tagged with: popover
score: 0
has answer: http://stackoverflow.com/a/26567844
has comment: http://stackoverflow.com/comment/41753663
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41753124
has comment: http://stackoverflow.com/comment/41753222
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26567844

lazy-loading
tags question: http://stackoverflow.com/q/26645789
tag name: lazy-loading
type: Tag
tags question: http://stackoverflow.com/q/26592105

http://stackoverflow.com/a/26515774
has comment: http://stackoverflow.com/comment/41662883
accepted answer of: http://stackoverflow.com/q/26515516
answers question: http://stackoverflow.com/q/26515516
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41664662
has body: Well, after your elements are inserted you can do: $('[id^=bom_][id$=_part_name_autocomplete]').each(function(){ $(this).autocomplete({ // ... }) Its easier to just add it on creation though
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41662313
has comment: http://stackoverflow.com/comment/41667974

http://stackoverflow.com/a/26606268
has body: you need to use ng-bing-html directive if you want to add html in to view like below &lt;p ng-bind-html="myContent"&gt;&lt;/p&gt; and also you need to add angular-sanitize.js and define the dependency as angular.module('yourModule', ['ngSanitize']) inorder to work this
has comment: http://stackoverflow.com/comment/41825256
score: 0
has comment: http://stackoverflow.com/comment/41825721
has comment: http://stackoverflow.com/comment/41825476
answers question: http://stackoverflow.com/q/26606208
type: Answer

http://stackoverflow.com/comment/41757489
score: 0
type: Comment
has text: firefox used to throw out comments when it parsed a function, including the time around when strict surfaced. i think an ecmaScript engine doesn't need to keep comments per the spec, so that would be a deal-breaker for any kind of special comment.
type: QuestionComment
comment on: http://stackoverflow.com/q/26569130

http://stackoverflow.com/comment/41826909
has text: Check mine here: http://jsfiddle.net/praveenscience/zr9km0Lv/8/ I just did with your technique. Pure Invalid HTML! `:P`
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26606688

http://stackoverflow.com/q/26541464
linked to: http://stackoverflow.com/q/523643
has comment: http://stackoverflow.com/comment/41710930
has comment: http://stackoverflow.com/comment/41707657
favorite count: 0
has comment: http://stackoverflow.com/comment/41707882
answer count: 0
linked to: http://stackoverflow.com/q/11064316
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41707555
has title: Compare "Password" & "Confirm Password" in CSHTML (using Javascript)
tagged with: razor
has body: I created database and add a table using code first workflow and then created ADO.NET Entity data model, when I do that it automatically generated model class for the table in that database, within that model class its defined Password Field but not Confirm Password field since I don't want store both, HERE code snippet in my Model class [Required(ErrorMessage = "Please provide Password", AllowEmptyStrings = false)] [DataType(System.ComponentModel.DataAnnotations.DataType.Password)] [StringLength(255, MinimumLength = 5, ErrorMessage = "Password must be 5 char long.")] public string Password { get; set; } public string PasswordSalt { get; set; } to compare above two field I just try to use java script front end validation I just want to know how to compare Password Field and Confirm Password Field using JavaScript in cshtml I already tried many ways to do this ,but still cannot figure it out , This is the code snippet I added overs the cshtml file this is the CSHTML body definition of above model class @Html.LabelFor(model => model.Password) @Html.EditorFor(model => model.Password) @Html.ValidationMessageFor(model => model.Password) Confirm Password but this not working properly .looking for good overcome solution or any enhancement , Thanks HERE the Full CSHTML code @model AFFEMS2_HEC.Models.HEI_REG_TABLE @{ ViewBag.Title = "HEI_Registration"; Layout = "~/Views/Shared/Login_Layout.cshtml"; } @using (Html.BeginForm()) { @Html.ValidationSummary(true) User @Html.AntiForgeryToken() @if (ViewBag.Message != null) { @ViewBag.Message } @Html.LabelFor(model => model.HEI_ID) @Html.EditorFor(model => model.HEI_ID) @Html.ValidationMessageFor(model => model.HEI_ID) @Html.LabelFor(model => model.Username) @Html.EditorFor(model => model.Username) @Html.ValidationMessageFor(model => model.Username) @Html.LabelFor(model => model.Password) @Html.EditorFor(model => model.Password) @Html.ValidationMessageFor(model => model.Password) } @Html.ActionLink("Back to List", "Index") @section …
tagged with: asp.net-mvc-4
score: 2
has comment: http://stackoverflow.com/comment/41707590
has comment: http://stackoverflow.com/comment/41708231
has comment: http://stackoverflow.com/comment/41711138
has comment: http://stackoverflow.com/comment/41707554
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/41707828
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/26562835
upvote count: 1
score: 1
has body: Is there're only two buttons something like this should work: function save() { var storeButton = document.getElementById("testButton1");; localStorage.setItem("buttonColor1", storeButton.style.backgroundColor); storeButton = document.getElementById("testButton2");; localStorage.setItem("buttonColor2", storeButton.style.backgroundColor); } function load() { var color = localStorage.getItem("buttonColor1"); if (color) { document.getElementById("testButton1").style.backgroundColor = color; } color = localStorage.getItem("buttonColor2"); if (color) { document.getElementById("testButton2").style.backgroundColor = color; } }
answers question: http://stackoverflow.com/q/26562671
downvote count: 0
has comment: http://stackoverflow.com/comment/41745753
type: Answer

http://stackoverflow.com/q/26574043
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41766014
possible better answer: http://stackoverflow.com/a/26574155
has answer: http://stackoverflow.com/a/26574155
has comment: http://stackoverflow.com/comment/41765961
has answer: http://stackoverflow.com/a/26574325
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26574395
has body: I have a website that only has a full window iframe to a page that already has google analytics, but not on my account(the page isn't mine either). I would like to track my website with Google Analytics and if I put the script in the head site it will say "Tracking not installed". IS there any way to make the browser ignore the google analytics from the iframe?
has title: Conflict with double google analytics
tagged with: iframe
type: Question
tagged with: google-analytics
accepted answer: http://stackoverflow.com/a/26574325
tagged with: javascript

http://stackoverflow.com/a/26628362
has body: I'm not very familiar with React, but it looks like you should be using React.renderComponent instead of React.render By running your code generated by rails-react locally on my browser and playing with the React object, it looks like the render method does not exist. Instead, React contains a renderComponent method: If you change the code to use React.renderComponent instead of React.render, the component gets rendered on the DOM. You can see it working here: http://jsfiddle.net/popksfb0/
score: 4
answers question: http://stackoverflow.com/q/26627665
downvote count: 1
has comment: http://stackoverflow.com/comment/41883626
upvote count: 5
type: Answer

http://stackoverflow.com/comment/41735910
comment on: http://stackoverflow.com/q/26557153
score: 0
type: Comment
has text: @L.B: _I am currently using SimpleBrowser.WebDriver[...]Is there any way to set a proxy for it?_
type: QuestionComment

http://stackoverflow.com/comment/41892556
comment on: http://stackoverflow.com/q/26642887
score: 0
type: Comment
type: QuestionComment
has text: wait i m sending u jsfiddle link

http://stackoverflow.com/comment/41728541
type: QuestionComment
type: Comment
has text: Does the `star_it` function accept a second argument? If it's not running at all, you're getting an error. Check your javascript console.
score: 0
comment on: http://stackoverflow.com/q/26553217

http://stackoverflow.com/q/26516859
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/26517024
tagged with: jsog
answer count: 2
has body: I have a javascript object graph that contains cyclical references. When I use this object in angular, firefox gives me the following error message (the "..." contains 100+ duplicates of the same line preceding and following it): Error: too much recursion equals@http://localhost:8080/ops/bower_components/angular/angular.js:995:1 equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15 equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15 ... equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15 equals@http://localhost:8080/ops/bower_components/angular/angular.js:984:17 equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15 $RootScopeProvider/this.$get&lt;/Scope.prototype.$digest@http://localhost:8080/ops/bower_components/angular/angular.js:12491:1 $RootScopeProvider/this.$get&lt;/Scope.prototype.$apply@http://localhost:8080/ops/bower_components/angular/angular.js:12762:13 done@http://localhost:8080/ops/bower_components/angular/angular.js:8357:34 completeRequest@http://localhost:8080/ops/bower_components/angular/angular.js:8571:7 createHttpBackend/&lt;/xhr.onreadystatechange@http://localhost:8080/ops/bower_components/angular/angular.js:8514:1 Is there a way to tell angular to consider objects equal if they match X levels deep? Or does angular just not work with cyclical references? The Backstory (in case you wanted to know) I was having trouble finding a solution in jackson which would not serialize objects that have already appeared on a particular traversal path. This seems like it should be pretty straight forward to me, but I guess the functionality doesn't exist. That's when I stumbled upon jsog in this answer which enabled me to transfer my object graph (w/ circular dependencies) over to javascript. I was very happy that jsog did this for me, but then I encountered the above error.
downvote count: 1
favorite count: 0
has title: angular equals method fails because of "too much recursion"
tagged with: angularjs
type: UnansweredQuestion
upvote count: 4
has answer: http://stackoverflow.com/a/26551121
linked to: http://stackoverflow.com/q/24208167
type: Question

http://stackoverflow.com/comment/41907117
score: 0
type: AnswerComment
type: Comment
has text: I'm not sure what you mean, sorry. You want `server.js` required and run it's `init()` from these functions?
comment on: http://stackoverflow.com/a/26651647

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

http://stackoverflow.com/comment/41933621
comment on: http://stackoverflow.com/q/26665851
score: 0
type: Comment
type: QuestionComment
has text: did you fix it? it shows fine to me on my windows 7 Chrome. Also very cool to see Indonesian lesson! I am indonesian :)

http://stackoverflow.com/q/26546548
tagged with: javascript
tagged with: show
tagged with: jquery
score: -1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26546753
has comment: http://stackoverflow.com/comment/41716229
type: UnansweredQuestion
has title: jQuery .show() multiple tags with the same name
has comment: http://stackoverflow.com/comment/41716015
tagged with: php
has answer: http://stackoverflow.com/a/26546650
has comment: http://stackoverflow.com/comment/41716215
has body: I have my jQuery code setup so when a span is clicked, the is hidden and an input box is shown it its place. From here the input box can be typed in and the value is passed back to the . My problem is that if I have multiple spans with the same name, only the first span will hide and show the input and I want all the spans with the same name to show. The name of the spans are generated dynamically from a php for loop (title_$i where $i is the array key), so I am unable to manually rename each span. My HTML table: Bed 1 Bed 2 Bath Bed 1 Bed 2 My jQuery: $(".editbox").hide(); $(".text").show(); $(".edit_tr").click(function () { var ID = $(this).attr('id'); $("#title_" + ID).hide(); $("#title_input_" + ID).show(); }).change(function () { var ID = $(this).attr('id'); var title = $("#title_input_" + ID).val(); $("#title_" + ID).html(title); }); // Edit input box click action $(".editbox").mouseup(function () { return false }); // Outside click action $(document).mouseup(function () { $(".editbox").hide(); $(".text").show(); }); and working jsFiddle: http://jsfiddle.net/8resbu2c/
has comment: http://stackoverflow.com/comment/41716161
downvote count: 1
type: Question
answer count: 2
upvote count: 0

http://stackoverflow.com/comment/132278633
comment on: http://stackoverflow.com/a/26578323
has text: @Bergi I've figured out my typescript issue. The type must describe the acceptable *argument*, and not the resulting *parameter* type. IE in this case, the argument can accept undefined values for the defaulted parmaters, while the *parameters* themselves will never have undefined values for the defaulted parameters. Just a bit confusing.
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/41874588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26633195
score: 0
has text: given your current markup posted you would have to change the selector to: `div + div h3.category-heading::after { .. }`

http://stackoverflow.com/comment/41910733
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26653551
has text: defnatly thnx again dude

http://stackoverflow.com/comment/41752436
type: AnswerComment
has text: Do you really need the global modifier for that?
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26566715

http://stackoverflow.com/a/26619775
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41915164
score: 2
has comment: http://stackoverflow.com/comment/41870921
upvote count: 2
has body: You can use require:[^parent_directive1, ^parent_directive2] as a directive attribute. Please check the below example. myApp.directive('itemOptionVariation2', function () { return { restrict: 'E', templateUrl: "item_option.html", require: ['^itemOption', '^itemOptionVariation1'], This is not exactly inheritance, rather a composition. However, this has resolved my needs.
has comment: http://stackoverflow.com/comment/41887808
answers question: http://stackoverflow.com/q/26617775

http://stackoverflow.com/q/26575843
has title: Idiomatic way to set property to function value using jQuery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26575859
has comment: http://stackoverflow.com/comment/41769780
possible better answer: http://stackoverflow.com/a/26575876
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26575876
has comment: http://stackoverflow.com/comment/41769897
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26575859
has body: To hopefully head off the "primarily-opinion-based" close-button-clickers, I'm not looking for opinions on the "best" way to do this; I'm just wondering if there is a more straightforward solution that I'm missing. My goal is to add the same onclick method to all of the (hundreds of) checkboxes on my page. My first attempt at a jQuery solution was this: $('input[type="checkbox"]').prop('onclick', function(){alert("Boop!");}) But that runs into the computed-value behavior of $.prop() and calls the function immediately for each checkbox. So I can do this: $('input[type="checkbox"]').prop('onclick', function(){return function() {alert("Boop!");}}) But that feels awfully workaround-y. Alternatively, I could do this: $('input[type="checkbox"]').each(function(_, cb) { cb.onclick = function(){alert("Boop!");}; }); But that seems uncharacteristically manual for jQuery. So am I missing a more straightforward solution?
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41769872
tagged with: javascript
score: 1
tagged with: jquery

http://stackoverflow.com/q/26514646
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26514738
score: 1
has comment: http://stackoverflow.com/comment/41659362
has comment: http://stackoverflow.com/comment/41659184
type: Question
answer count: 2
tagged with: arrays
downvote count: 0
has title: Get concatenated text of elements using JavaScript
tagged with: javascript
has comment: http://stackoverflow.com/comment/41659182
has answer: http://stackoverflow.com/a/26514678
tagged with: http://stackoverflow.com/tag/html
has body: I tried it with getElementById and it worked. But now I want the same with multiple div's so I have to use classes. So I changed the method to getElementsByClassName and now it says undefined. (The function is called when a option in a select changes. This works correctly) HTML: 22 jump street rio 2 Javascript: function sorting(sortingway) { alert(sortingway.value); var titelfilms = document.getElementsByClassName("filmnaam"); var titels = titelfilms.innerHTML; console.log(titels[0]); } Is there a way to do this without jQuery?
favorite count: 0
has answer: http://stackoverflow.com/a/26514738
upvote count: 1
accepted answer: http://stackoverflow.com/a/26514678

http://stackoverflow.com/q/26597807
type: UnansweredQuestion
has title: Make highlight table row without external library using JavaScript
type: Question
has body: Is there any possibility to Highlight a table row without external JS Library but using just JavaScript? Nom n° Denis PAPIN 7 Albert EINSTEIN 2 Nikola TESLA 18 (…)
tagged with: javascript
tagged with: html-table
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41809948
tagged with: highlight
has answer: http://stackoverflow.com/a/26597863

http://stackoverflow.com/a/26594883
has body: Just to add to what @JoriO posted, Can you please test to see if the web element exists before clicking on it using Selenium? If it doesn't exists, add a thread sleep statement after driver.get(url)... Reason being that Selenium may try to click before the driver finishes loading the page. This has fixed most of the problems I have experienced using Selenium error "No Such Element Exception"
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/26522739
type: Answer

http://stackoverflow.com/q/26669868
type: Question
has comment: http://stackoverflow.com/comment/41943730
tagged with: javascript
has title: AngularJS watch an array of ngForm references for changes in $valid
accepted answer: http://stackoverflow.com/a/26676234
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26676234
tagged with: angularjs
has comment: http://stackoverflow.com/comment/41942127
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41943237
tagged with: watch
has body: I have an array of nested subforms (ngForm) within my main form. Each subform is registered with my form service by pushing them onto an array, and each of the subforms represent a single document within a document package (the entire array). I'm building a progress directive using Google Charts, and I want to know when one of the subforms becomes $valid. I've looked into $watch, and know that I can deep watch by setting the third parameter to true, to be notified of any changes within the array to the validity of the subform. Is this the best way to do this? The deep changes that might occur could be anything, and it seems expensive. Can I watch just subFormArray[index].$valid for changes? $scope.$watch('subFormsArray', function( newSubFormsArray, oldSubFormsArray, scope ){ // loop through newSubFormsArray and check $valid on each index // to get new number of completed subforms for progress directive }, true); I could also just set a watch on each subform.$valid using a function and on any changes update the progress chart. for( var i = 0; i &lt; $scope.subFormsArray; i++ ) { $scope.$watch( function() { return $scope.subFormsArray[i].$valid; }, function( newValidity, oldValidity ) { // loop through newSubFormValidityArray and check $valid on each index // to get new number of completed subforms for progress directive }); } Maybe using $watchGroup? From the docs I can't quite figure out, but it seems to say that I could do this: $scope.$watchGroup( function() { var subFormValidity = []; for( var i = 0; i &lt; $scope.subFormsArray; i++ ) { // create validity array subFormValidity.push( $scope.subFormsArray[i].$valid ); } return subFormValidity; }, function( newSubFormValidityArray ) { // loop through newSubFormValidityArray and check $valid on each index // to get new number of completed subforms for progress directive }); Would this even work? and which solution would be the best choice? UPDATE Using the first option I can't seem to get the watch to work on changes…

http://stackoverflow.com/comment/41929588
has text: That fixed the issue about the duplicated value :) Thanks!
score: 0
comment on: http://stackoverflow.com/q/26663724
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41848059
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26596109
has text: Another question... if you are using jQuery why are you using Javascript to fire certain functions, like onchange? why not just use jQuery throughout?
type: QuestionComment

http://stackoverflow.com/comment/41874890
score: 0
has text: @davidkonrad it starts on the 13th letter in my case. Did you try to enter more letters?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26633164

http://stackoverflow.com/q/26619241
possible better answer: http://stackoverflow.com/a/26619293
answer count: 3
tagged with: arguments
has answer: http://stackoverflow.com/a/26619266
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26619368
has answer: http://stackoverflow.com/a/26619293
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41849733
type: Question
downvote count: 0
has body: I have a text input field with its own class: .my_ids. I'm trying to write a script with jquery so that every time the input changes, it calls a particular function. This is easy enough if I don't try to pass a variable to the function: $(document).on('change','.my_ids', testfunc); function testfunc(){ alert("good"); } The function sends me an alert every time the input changes; works just fine. However if I try to pass a variable to the alert function like so: $(document).on('change','.my_ids', testfunc("hereismyvariable")); function testfunc(myvariable){ alert(myvariable); } it sends the alert when the document loads and then doesn't alert when the input changes. What might I be missing?
accepted answer: http://stackoverflow.com/a/26619266
tagged with: javascript
tagged with: jquery
has title: Passing variables to function using .on()

http://stackoverflow.com/comment/41869026
type: QuestionComment
comment on: http://stackoverflow.com/q/26606547
has text: This "http://jsfiddle.net/uUxDm/35/" is what I wanted to do, where as this "http://jsfiddle.net/uUxDm/36/" does what I want it to do.
score: 0
type: Comment

rss
tags question: http://stackoverflow.com/q/26627085
tags question: http://stackoverflow.com/q/26615991
tag name: rss
type: Tag
tags question: http://stackoverflow.com/q/26660439
tags question: http://stackoverflow.com/q/26516033
tags question: http://stackoverflow.com/q/26660608

http://stackoverflow.com/a/26659800
has body: I hope you have tried postMessage, this is a javascript API , but there is browser limitation. Parent page can post message like this. var win = document.getElementById("iframe").contentWindow win.postMessage( "value", "iframe-domain" ); And iframe page can listen to message like this. &lt;script&gt; function listener(event){ if ( event.origin !== "[parent-page-domain]" ) return; // operate with event.data } if (window.addEventListener){ addEventListener("message", listener, false) } else { attachEvent("onmessage", listener) } &lt;/script&gt; SOURCE - http://javascript.info/tutorial/cross-window-messaging-with-postmessage
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26657826

http://stackoverflow.com/a/26580232
has body: To implement your "Hooray" button you need to have components mentioned below: A web service which will consumed by the client SDK to report that someone has ""Hoorayed" the post etc. You need to have a database where you can store who "hoorayed" what. You can consider every entry as a post or say "Hurricane". Now every post is unique so you can identify who "Hoorayed" what. Create a web service which tells the user who "Hoorayed" what. Create a client SDK. It could be a JS library for web applications or Objective C framework for iOS etc. These client libraries will consume web services which are mentioned above. Just like FB you will have to ask the consumer of your "Hooray" service to register an app on your platform. You can generate an appid for them and then all the data can be tagged with that. Obviously these are just pointers and you can create a much sophisticated workflow based on your needs.
answers question: http://stackoverflow.com/q/26580158
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26580158
downvote count: 0

http://stackoverflow.com/comment/41732599
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26555326
has text: There's little benefit to having an array of objects of arrays where each object has a single key that increments. You should just have an array of arrays, and grab the index you want or iterate all of them. `var j = [["1","2","3"], ["4","5","6"], ["7","8","9"]];`
score: 0

http://stackoverflow.com/a/26624291
has comment: http://stackoverflow.com/comment/41894360
has body: hope it will solve the problem. $(document).ready(function(){ $('div#c_navi ul li div').hide(); jQuery('div#c_navi &gt; ul &gt; li &gt; a').click(function(){ jQuery(this).next().slideToggle('slow'); }); $('div#c_navi02 ul li ul').hide(); jQuery('div#c_navi02 &gt; ul &gt; li &gt; a').click(function(){ jQuery(this).next().slideToggle('slow'); }); window.alert("success!!"); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26624149
has comment: http://stackoverflow.com/comment/41859628

firefox-addon-sdk
tags question: http://stackoverflow.com/q/26514299
type: Tag
tag name: firefox-addon-sdk
tags question: http://stackoverflow.com/q/26525695
tags question: http://stackoverflow.com/q/26525639
tags question: http://stackoverflow.com/q/26628845

http://stackoverflow.com/a/26613820
downvote count: 1
type: Answer
has body: The only problem I saw in your code that is the source of jquery is incorrect because it is using https and the order parameters of the script tag Try substituting the following:
upvote count: 0
answers question: http://stackoverflow.com/q/26613526
has comment: http://stackoverflow.com/comment/41839483
score: -1
has comment: http://stackoverflow.com/comment/41840460

http://stackoverflow.com/comment/41876532
has text: @Valina: So what have you tried? Seriously if you can't work out something [as simple as this](http://jsfiddle.net/cvt5hsq6/) then you are really going to struggle being a developer. Just break the problem down into simple steps... 1) how do I get the value from an input? 2) how do I multiply two values? 3) how do I set a value in an input? ...problem solved!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26634266

http://stackoverflow.com/comment/41910110
type: Comment
score: 0
has text: @devanl I will extend on my answer. However, I recommend using latest version of JQM.
type: AnswerComment
comment on: http://stackoverflow.com/a/26636564

http://stackoverflow.com/a/26637690
has comment: http://stackoverflow.com/comment/41883791
has comment: http://stackoverflow.com/comment/41882834
accepted answer of: http://stackoverflow.com/q/26637512
answers question: http://stackoverflow.com/q/26637512
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/41883083
type: Answer
has body: An easy solution is to add and ng-hide to your nav and header that is dependent on the current route. I typically use the UI-router so I don't the services available offhand but add a comment if you can't figure it out and I'll take a look.
has comment: http://stackoverflow.com/comment/41882553
has comment: http://stackoverflow.com/comment/41883651

video
tags question: http://stackoverflow.com/q/26635002
tags question: http://stackoverflow.com/q/26661294
type: Tag
tags question: http://stackoverflow.com/q/26591228
tags question: http://stackoverflow.com/q/26640859
tags question: http://stackoverflow.com/q/26607111
tags question: http://stackoverflow.com/q/26612439
tags question: http://stackoverflow.com/q/26514106
tags question: http://stackoverflow.com/q/26617748
tags question: http://stackoverflow.com/q/26658869
tags question: http://stackoverflow.com/q/26603057
tags question: http://stackoverflow.com/q/26539872
tag name: video
tags question: http://stackoverflow.com/q/26664983
tags question: http://stackoverflow.com/q/26666867
tags question: http://stackoverflow.com/q/26670048
tags question: http://stackoverflow.com/q/26646451
tags question: http://stackoverflow.com/q/26641762

http://stackoverflow.com/comment/41759397
type: AnswerComment
comment on: http://stackoverflow.com/a/26570036
has text: Shouldn't that only affect how the templates are rendered on the server though? Once it gets to my browser wouldn't it all be seen as the same HTML, and thus all javascript should act the same on any part as if it were all in the same template on the server?
score: 0
type: Comment

http://stackoverflow.com/comment/41926139
type: Comment
comment on: http://stackoverflow.com/a/26658012
has text: Do not worry for the english as it's not my native language too. Thank you very much for your time and advice, i will try as soon as possible and i will let you know. Thank you again!
score: 0
type: AnswerComment

http://stackoverflow.com/a/26673421
accepted answer of: http://stackoverflow.com/q/26655972
score: 0
type: AcceptedAnswer
type: Answer
has body: dont put together, separate it. after //your alert("Credit Card number must be a numeric value."); document.getElementById("txtCreditCardNumber").focus(); return false; } //// create the VAR & add in the{ code }
answers question: http://stackoverflow.com/q/26655972

http://stackoverflow.com/comment/41788716
type: Comment
comment on: http://stackoverflow.com/a/26586789
type: AnswerComment
score: 0
has text: This is very useful, thanks :) I will probably move onto toggling the buttons so +1

http://stackoverflow.com/q/26580597
tagged with: hello.js
tagged with: oauth-2.0
type: Question
tagged with: javascript
score: 0
has body: I am new to Oauth2 and hello.js and don't understand, how to use it securely. I was trying singup/login with Google and for me the problem is, that 3rd party Oauth service (e.g. Google) does not return user-details (email, id) to my server. The critical data (id, email) is fetched on the client and then it can be sent to my server by client / browser. But I cannot make reliable server API which receives arbitrary network-type(google|facebook), userId, password and makes login / signup according to this. Everyone could then register as someone other's = arbitrary social id. What workflow would You sugest to create an account for Google-authenticated user, in my server? Edit: sorry, this whole queestion is probably my misunderstanding of Hellol.js purpose. In my case, I need something like authom or passport.
answer count: 1
has title: Secure login with hello.js
has answer: http://stackoverflow.com/a/26676061
type: UnansweredQuestion

http://stackoverflow.com/comment/41916540
comment on: http://stackoverflow.com/a/26642873
score: 0
type: Comment
has text: thank you but my script works when leaving the body. my issue is when I go to the scrollbar on the right, the popup shows and I don't want that. I want them to be able to use the scrollbar without the message popping up. I also tried $(window).mouseleave() but it's giving me the same issue.
type: AnswerComment

http://stackoverflow.com/comment/41754682
type: QuestionComment
has text: are you getting a value in the console log when you click?
comment on: http://stackoverflow.com/q/26567859
score: 0
type: Comment

http://stackoverflow.com/comment/41755579
type: QuestionComment
has text: Removing async: false didn't work. And it appears now I have trouble debugging the execution of jquery.slicks onsubmit handler and mine since they're being executed concurrently.
comment on: http://stackoverflow.com/q/26567902
score: 0
type: Comment

http://stackoverflow.com/q/26540075
has body: This code takes the background color from an array of divs and colors another div with it. My problem is that I can put any value from 0-2 (0-2 being the array value of the original div) in task1[i].style.background but when I put i so that the loop gives me the value specific to the one moused over it brakes. I cannot use JQuery, JavaScript only. EDIT: I expect task1[i].style.background to be equal to the background color of the specific div it hovered over from the loop running through the array. var task1 = document.querySelectorAll('.t1_colors'); var task1background = document.querySelector('#task1'); var white = function() { task1background.style.background = 'white'; } for (var i = 0; i &lt; task1.length; ++i) { task1[i].addEventListener('mouseover', function () { colorize(); }); } //Something wrong with i var colorize = function() { task1background.style.background = task1[i].style.background; } for (var i = 0; i &lt; task1.length; ++i) { task1[i].addEventListener('mouseout', function() { white(); }); }
has comment: http://stackoverflow.com/comment/41706383
has comment: http://stackoverflow.com/comment/41706411
has comment: http://stackoverflow.com/comment/41715475
type: Question
has title: for loop with array for background colors
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/41706432
score: 0
has comment: http://stackoverflow.com/comment/41705239
upvote count: 1
answer count: 1
downvote count: 1
tagged with: dom-events
favorite count: 0
has comment: http://stackoverflow.com/comment/41706365
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41706260
has comment: http://stackoverflow.com/comment/41705185
has answer: http://stackoverflow.com/a/26540290

http://stackoverflow.com/a/26556614
type: Answer
has comment: http://stackoverflow.com/comment/41743031
accepted answer of: http://stackoverflow.com/q/26535963
upvote count: 1
answers question: http://stackoverflow.com/q/26535963
score: 1
has comment: http://stackoverflow.com/comment/41742571
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41742861
downvote count: 0
has comment: http://stackoverflow.com/comment/41742689
has comment: http://stackoverflow.com/comment/41810904
has comment: http://stackoverflow.com/comment/41742784
has body: You're right that MutationObserver can't do what you need. The way those work, browsers collect mutation records while a script runs, then passes the records to the observers all at once when the script yields. It's pretty much asynchronous. This is what makes mutation observers perform better than mutation events, which are dispatched synchronously. By the time the observer runs, the audio element will have received the URL and have started loading it. Supposing that this onclick handler you're talking about sets the element's .src property, you'll want to define a custom setter for that, so that you can intercept the value before the audio element's implementation handles it. You can define a setter like this in JavaScript: http://jsfiddle.net/omqdx8d1/ var el = document.getElementsByTagName('audio')[0]; Object.defineProperty(el, 'src', { set: function (newSrc) { console.log('they set src to ' + newSrc); } }); In Chrome, this will make it impossible to call the original setter afterward, but it sounds like you're not worried about that. Another way to modify an element's attributes is to use the setAttribute method. If you want to intercept this, you can redefine the element's setAttribute method. Here's another example that uses setAttribute: http://jsfiddle.net/5mLysc9n/1/ var el = document.getElementsByTagName('audio')[0]; var origSetAttribute = el.setAttribute; el.setAttribute = function (name, value) { console.log('they set ' + name + ' to ' + value); // origSetAttribute.call(el, name, value); }; When you monkey patch a method, you can save the original method function, which can be useful.

http://stackoverflow.com/comment/41726326
has text: Depending on what browsers one needs to support, firefox supports named function parameters. Only one to do so, so far.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26552098

http://stackoverflow.com/q/26617897
type: Question
type: AnsweredQuestion
has title: Button on-click expands over other elements to reveal longer string of text
possible better answer: http://stackoverflow.com/a/26618532
has answer: http://stackoverflow.com/a/26618532
answer count: 2
accepted answer: http://stackoverflow.com/a/26618258
tagged with: javascript
tagged with: jquery
has body: I am attempting to do some JS animation, but failing miserably. Essentially I have 3 links placed next to each other. The first two are simply links that open in a new window. The third button when clicked needs to slide out to the left, and overlay it's neighbours, revealing a span which is hidden by default (a URL). I've set up a basic codepen example: http://codepen.io/anon/pen/EsojF The idea is that the third button when pressed will fill the width of the entire UL, sitting on top of the other links or they could slide away to zero width and the URL inside the span should be then displayed (ideally the link would also copy to clipboard but not yet even considered that route). Can anyone offer any pointers? My client has a number of users still using IE9 so I believe javascript or jquery to be the best approach?
score: 0
tagged with: animation
has answer: http://stackoverflow.com/a/26618258

http://stackoverflow.com/comment/41792756
score: 0
has text: unfortunately the following as suggested by Justin Medas doesn't work: .gwd-img-r1sa:hover in combination with animation-iteration-count: 0.7; when declaring -webkit- first and then -moz-
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26588628

http://stackoverflow.com/comment/41799669
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26591494
has text: Can you take a screenshot of the request in the Chrome inspector? Sounds like the webserver isn't returning the JSON, either due to an exception (invalid request, missing request headers, no matching company) or isn't configured properly. What backend are you using?
score: 0

seo
tags question: http://stackoverflow.com/q/26560279
type: Tag
tag name: seo

http://stackoverflow.com/q/26609264
type: Question
has answer: http://stackoverflow.com/a/26609461
tagged with: javascript
tagged with: jquery
has body: I want to get information of a row to show in a tooltip. For example: Jill Smith 50 Eve Jackson 94 So, when I pass the mouse over the row I need the content of the others columns. Thx in advance.
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41830501
accepted answer: http://stackoverflow.com/a/26609461
has comment: http://stackoverflow.com/comment/41830835
has comment: http://stackoverflow.com/comment/41830572
has comment: http://stackoverflow.com/comment/41830573
possible better answer: http://stackoverflow.com/a/26609430
has answer: http://stackoverflow.com/a/26609362
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26609430
has title: How can I pass a row as parameter to javascript?

http://stackoverflow.com/comment/41832098
score: 0
comment on: http://stackoverflow.com/q/26573528
type: Comment
type: QuestionComment
has text: "Thread 1:signal SIGABRT"

http://stackoverflow.com/q/26610867
tagged with: dojo
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: How to append result to Geocoder text box using arcgis javascript api?
tagged with: arcgis-js-api
has body: I want to append result of a custom search in a Geocoder text box in arcgis javascript api by over ridding the default result. I have written below code for that but i am not getting satisfactory result. Geocoder anyone any suggestion?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26675675
type: UnansweredQuestion

http://stackoverflow.com/comment/41695091
has text: @JedSchneider Well, am using coffeescript for frontend. C# for middle tier(server) and SQL Server for database. The question is that am not using plain html to create select element, which would have been way easier to make since i could fill the options using data-binding. But using coffeescript, I have created an array for values for "option", which is what am trying to fill.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26534041

http://stackoverflow.com/comment/41872629
type: Comment
type: QuestionComment
has text: It is extendscript dude....
score: 0
comment on: http://stackoverflow.com/q/26632086

iife
tags question: http://stackoverflow.com/q/26537000
type: Tag
tag name: iife

http://stackoverflow.com/a/26594747
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26594579
type: Answer
score: 2
has body: Just use event parameter. format : function(e){ //function body if(e &amp;&amp; e.type == 'focus'){ //execute this condition only on focus event } } Demo: http://jsfiddle.net/mbL5ohwr/

http://stackoverflow.com/comment/42996588
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26596843
has text: Why is it you don't want to use session? Any solutions I have in mind are actually just re-inventing the session system. You need to have a secret data on server and something that connect that data with remote user. One way or another, that's session.

http://stackoverflow.com/q/26524020
accepted answer: http://stackoverflow.com/a/26528370
upvote count: 10
answer count: 1
has body: The express generator generates the following code in the app.js page: app.use('/', routes); app.use('/users', users); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); However, in the documentation, it says Since path defaults to "/", middleware mounted without a path will be executed for every request to the app. And gives this example: // this middleware will not allow the request to go beyond it app.use(function(req, res, next) { res.send('Hello World'); }) // requests will never reach this route app.get('/', function (req, res) { res.send('Welcome'); }) So, how could the 404 page ever be reached (or the /users route for that matter) if nothing can get passed the app.use('/', routes) line?
favorite count: 0
has comment: http://stackoverflow.com/comment/41676304
has answer: http://stackoverflow.com/a/26528370
tagged with: node.js
type: AnsweredQuestion
has title: How does the Express.js 4 Router let things reach the 404 page
type: Question
downvote count: 0
score: 10
tagged with: javascript
tagged with: express

http://stackoverflow.com/q/26589089
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26596190
has body: I'm trying to import a Fusion Layer of polygons into a google map via api v3. The map and the fusion layer is coming through fine but the fillOpacity and fillColour are not taking effect after saving the fusion table or by the maps api: var fusionTableId = "1Rd2LBEusHQsjsMAVsgYm_E_4OlpqgSb07ojJRL3O"; fusionLayer = new google.maps.FusionTablesLayer(fusionTableId,{ suppressInfoWindows: true, map: map, styles: [{ polygonOptions: { fillColor: "#00FF00", fillOpacity: 0.3 } }] }); fusionLayer.setMap(map); The polygon is coming through in a default red colour and there seems to be no combination of changes I can make to change the colour. Ideally I just want the opacity turned down to 1% but I've tried changing the colour (as above) with no joy. Any hints/tips? Many thanks
tagged with: google-maps
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26596190
tagged with: google-maps-api-3
score: 0
possible better answer: http://stackoverflow.com/a/26590503
has answer: http://stackoverflow.com/a/26590503
has title: Google Maps API v3 & fusion layers: polygon opacity
type: AnsweredQuestion
tagged with: google-fusion-tables

http://stackoverflow.com/a/26642735
has comment: http://stackoverflow.com/comment/41892108
has comment: http://stackoverflow.com/comment/41892162
has comment: http://stackoverflow.com/comment/41892221
has comment: http://stackoverflow.com/comment/41892154
type: Answer
has body: It looks like you don't have short tags enabled(and are using a pre 5.4 php version), thus the line &lt;?=json_encode($files)?&gt; is not parsed by php and is just send straight through. var images = &lt;... is not a valid javascript expression. Here's some information about php's short_open_tag parameter: http://php.net/manual/en/ini.core.php#ini.short-open-tag
has comment: http://stackoverflow.com/comment/41892147
answers question: http://stackoverflow.com/q/26642690
score: 0
has comment: http://stackoverflow.com/comment/41892095

http://stackoverflow.com/comment/41804230
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594382
has text: @jfriend00 Post that as an answer. I refactored to `Promise.settle(matches.map(imgur.uploadUrl))` and it worked. I will file a bug with bluebird

http://stackoverflow.com/q/26613100
has comment: http://stackoverflow.com/comment/41837817
answer count: 4
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26613250
type: Question
has answer: http://stackoverflow.com/a/26613228
has answer: http://stackoverflow.com/a/26613178
tagged with: javascript
has title: While loop and outputting math operators
tagged with: while-loop
downvote count: 0
has answer: http://stackoverflow.com/a/26613203
favorite count: 0
has answer: http://stackoverflow.com/a/26613250
has body: I'm trying to create a while loop that outputs a list of values, adds them together, and outputs a total with an "=" sign at the end I.e., if the User enters the numbers 5 and 12, the output would show up like this: 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 = total This is how my 'while' loop looks right now: while(enteredNum1 &lt;= enteredNum2){ total += enteredNum1; document.write(enteredNum1 + " + "); enteredNum1++; } document.write("= " + total); I know it will always append the " + ", but can anyone point me in the right direction for having the last value show "=" instead of the "+" again?
upvote count: 2
possible better answer: http://stackoverflow.com/a/26613203

http://stackoverflow.com/comment/41887915
comment on: http://stackoverflow.com/q/26640406
has text: What is the output of `console.log(AjaxSendData);`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26550313
type: Answer
answers question: http://stackoverflow.com/q/26549816
upvote count: 2
has comment: http://stackoverflow.com/comment/41725904
score: 2
downvote count: 0
has body: Like the others, loop over the object and construct a new one: var dates = {'01.02.2014':'2', '02.03.2014':'5', '10.03.2014':'9', '20.06.2014':'7'} var months = {'01':'Jan','02':'Feb','03':'Mar','04':'Apr','05':'May','06':'Jun', '07':'Jul','08':'Aug','09':'Sep','10':'Oct','11':'Nov','12':'Dec'}; var dates2 = {}; // Requires ES5 Object.keys(dates).forEach(function(key) { var obj = {}; obj[key] = dates[key]; dates2[months[key.split('.')[1]]] = obj; }) console.log(dates2); or for greater compatibility (and probably speed) you can use a plain for..in loop: for (var key in dates) { var obj = {}; obj[key] = dates[key]; dates2[months[key.split('.')[1]]] = obj; }

http://stackoverflow.com/comment/64192262
has text: Further more using resolves can make it easier to maintain which data a controller will get
comment on: http://stackoverflow.com/a/26523823
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/70724122
score: 14
comment on: http://stackoverflow.com/a/26568611
type: AnswerComment
has text: Could reducing `length` cause a memory leak or does the javascript engine handle this? --- Ok, according to the ECMAScript specs this is clearly defined and handled correctly, the elements will get deleted. http://stackoverflow.com/questions/31547315/is-it-an-antipattern-to-set-an-array-length-in-javascript/31560542#31560542
type: Comment

http://stackoverflow.com/q/26598878
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/26598935
score: 1
has body: Using accordion-toggle on a table to show extra info when people click a certain row. But this row has some links that perform some other actions and I wanted that when they were clicked the extra row didn't appear. Here's the markup: 16 XXXX 2014-10-27 01:57:00 2014-10-27 21:45:00 2014-10-27 21:45:00 Extra info Is it possible to get the table row NOT expanding when either of the links is clicked? Already tried to mess around with the .collapse() methods and opts with no success so far...
type: Question
tagged with: javascript
tagged with: html-table
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26598935
has title: accordion-toggle on table row but prevent on specific cell
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/42558545
score: 3
answers question: http://stackoverflow.com/q/26633901
has body: You can have a look at my module-invalidate module that allows you to invalidate a required module. The module will then be automatically reloaded on further access. Example: module ./myModule.js module.invalidable = true; var count = 0; exports.count = function() { return count++; } main module ./index.js require('module-invalidate'); var myModule = require('./myModule.js'); console.log( myModule.count() ); // 0 console.log( myModule.count() ); // 1 mySystem.on('hot-reload-requested', function() { module.invalidateByPath('./myModule.js'); // or module.constructor.invalidateByExports(myModule); console.log( myModule.count() ); // 0 console.log( myModule.count() ); // 1 });
has comment: http://stackoverflow.com/comment/72251454
downvote count: 0
type: Answer
upvote count: 3

http://stackoverflow.com/a/26562003
has comment: http://stackoverflow.com/comment/41744480
answers question: http://stackoverflow.com/q/26561673
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/41744337
has comment: http://stackoverflow.com/comment/41744998
has body: Edit: As you already wrote in your edited post, you can reinitialize the plugin in the body section of your document. I did a quick jsfiddle with centered crop area. I'm pretty sure there is a more elegant way to do this, but it works. Edit end Deprecated answer: Unfortunately I can't comment and I'm unsure what you wanna do. But why not initialize the jcrop widget with the options maxSize and aspectRatio like this? jQuery(function($){ $('#target').Jcrop({ aspectRatio: 1, maxSize: [180, 180] }); });

http://stackoverflow.com/q/26635519
has comment: http://stackoverflow.com/comment/41878538
downvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/26635883
has comment: http://stackoverflow.com/comment/41878902
has comment: http://stackoverflow.com/comment/41878846
favorite count: 0
has answer: http://stackoverflow.com/a/26635883
type: AnsweredQuestion
score: 1
has body: Under the following code, how do I call the function searchBlock() in the canvas click event?this.searchBlock() can't work here! Board.prototype = { addHandlerToBlock:function(){ this.canvas.onclick = function(e){ var e = window.event || e; var rect = this.getBoundingClientRect(); var mouseX = e.clientX - rect.left; var mouseY = e.clientY - rect.top; var clickBlockId = this.searchBlock(mouseX, mouseY) || -1; if(clickBlockId &gt;= 0){ if(canMove(this.puzzle[clickBlockId])){ alert("ha") } } this.refresh(p); } }, searchBlock:function(x, y){ for(var i = 0; i &lt; this.puzzle.length; i++){ if( x - this.puzzle[i].x &gt; 0 &amp;&amp; y - this.puzzle[i].y &gt; 0){ return i; } } } }
type: Question
has title: How to call a function outside of javascript click event
tagged with: javascript
upvote count: 2

http://stackoverflow.com/a/26639171
downvote count: 0
has body: Filter each item in one collection to see if the other collection contains it. JSFiddle: http://jsfiddle.net/TrueBlueAussie/1bv963pk/1/ function printCommon($ob1, $ob2) { return $ob1.filter(function () { return $ob2.is(this); }); } This works because is will return true if the item matches any element in its collection. This can be reduced to a filter of one list by the other: JSFIddle: http://jsfiddle.net/TrueBlueAussie/1bv963pk/2/ function printCommon($ob1, $ob2) { return $ob1.filter($ob2); }
has comment: http://stackoverflow.com/comment/41939671
type: Answer
has comment: http://stackoverflow.com/comment/41885495
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26639042
answers question: http://stackoverflow.com/q/26639042
has comment: http://stackoverflow.com/comment/41940406
has comment: http://stackoverflow.com/comment/41885639
has comment: http://stackoverflow.com/comment/41885700
has comment: http://stackoverflow.com/comment/41886653
type: AcceptedAnswer

http://stackoverflow.com/comment/41710630
has text: Thank you for your hint. I already stumbled across the article. And the answer to your question is "barely". It describes by examples what it means for specific languages and not how the concept can be described in general.
comment on: http://stackoverflow.com/q/26531187
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41765483
score: 0
type: QuestionComment
type: Comment
has text: target resource is not in my domain. Dats the reason
comment on: http://stackoverflow.com/q/26573810

http://stackoverflow.com/comment/41882943
comment on: http://stackoverflow.com/a/26637865
score: 0
type: AnswerComment
has text: It would actually be `.hasClass('thursday-box')` (remove the dot...).
type: Comment

http://stackoverflow.com/a/26612300
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/41840727
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26612156
has comment: http://stackoverflow.com/comment/41839609
accepted answer of: http://stackoverflow.com/q/26612156
type: Answer
has body: You need to pass in all the parameters if you're going to instantiate your controller via angular. By adding the parameters you are telling angular that any time you create one of these controllers I need these things too because I am dependent upon them. So my suggestion is to mock up some representation of these dependencies and inject them in when you are creating the controller. They do not have to be (and should not be) the actual services for your unit tests. Jasmine gives you the ability to create spy objects that you can inject so you can verify the the behavior of this unit. (function() { 'use strict'; var scope, controller, filter, ionicScrollDelegate; describe('timeInOutController', function () { beforeEach(module('common.directives.kmDateToday')); beforeEach(inject(function ($rootScope, $controller, $filter) { scope = $rootScope.$new(); filter = $filter; // func1 and func2 are functions that will be created as spies on ionicScrollDelegate ionicScrollDelegate = jasmine.createSpyObj('ionicScrollDelegate', ['func1', 'func2'] controller = $controller('timeInOutController', { $scope: scope, $filter: filter, $ionicScrollDelegate: ionicScrollDelegate }); })); describe('#date setting', function(){ ... }); }); })(); You can find more about spies via jasmine's documentation
has comment: http://stackoverflow.com/comment/41841928
has comment: http://stackoverflow.com/comment/41837693
downvote count: 0

http://stackoverflow.com/comment/41807024
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26596253
type: Comment
has text: Now you're just making it more complicated. Why are you making a *global* variable `init`? Why does the main anonymous take a parameter `x`? If you *really* wanted to do it this way, do this: `doSomething = (function(){ return function(x){ alert(x); }; })();`

http://stackoverflow.com/q/26653270
has body: I'm trying to verify an RSA signature on Parse.com Cloud Code. Basically I am trying to do the receipt verification for an Android In App Purchase on the server. Parse.com crypto module does not suppor the verify method. So I found a library online that I imported. var KJUR = require("cloud/jsrsasign-4.7.0/npm/lib/jsrsasign.js"); var verifier = new KJUR.crypto.Signature({alg: "SHA1withRSA", prov: "cryptojs/jsrsa"}); verifier.initVerifyByCertificatePEM(publicKey); verifier.updateString(purchaseData); //verifier.updateHex(hexValue); var result = verifier.verify(signature); I am doing something wrong, but can't really tell what. I might be putting the signature, publicKey and purchaseData in the wrong places. The purchaseData looks like this: (per Android specs, I altered the data) var purchaseData = { orderID: "12999763169854705758.1300523466622834", packageName: "com.blabla.bla", productID: e.purchase.SKU, purchaseTime: new moment(time).valueOf(), purchaseState: 0, developerPayload: "74571d75-98b8-4327-942d-5379309c9033", purchaseToken: "klsDmifojfknmbojimkkkdkm.AO-J1OyXvZ3RH1aPiPD2MIdOUu00FrCnuTCjl1-K3ZD4Puu0zXDPTOAKH3Dc1hq1DZwiNI-AgXwW18gDV3eU9kXCR1IwhADLvVeOSkyu5kzdUBoVNdA42Zc" }; I get the following error: Result: TypeError: Cannot call method 'bitLength' of undefined at RSAKey._rsasign_verifyWithMessageHash [as verifyWithMessageHash] (jsrsasign-4.7.0/npm/lib/jsrsasign.js:251:3675) at verify (jsrsasign-4.7.0/npm/lib/jsrsasign.js:230:10483) at main.js:43:24 If you have any prior experience doing this, I would appreciate your help. Thanks
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/31435777
tagged with: parse-platform
upvote count: 2
type: UnansweredQuestion
tagged with: encryption
has answer: http://stackoverflow.com/a/26775248
score: 2
tagged with: rsa
has title: Parse.com Cloud Code RSA Verification - Android In App Purchase Verification

http://stackoverflow.com/comment/41756004
type: Comment
type: QuestionComment
has text: `querySelectorAll` returns `NodeList`s. A `NodeList` has no `value` property.
comment on: http://stackoverflow.com/q/26568463
score: 1

http://stackoverflow.com/q/26640695
has comment: http://stackoverflow.com/comment/41889138
has comment: http://stackoverflow.com/comment/41888796
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41888781
tagged with: css
accepted answer: http://stackoverflow.com/a/26640777
has comment: http://stackoverflow.com/comment/41889227
has body: Firstly, please, visit and check the demo: http://tympanus.net/codrops/2013/04/17/slide-and-push-menus/ I copied the source code of the demo to new folder and I created one Javascript, one CSS and one HTML. I removed the parts of the menus and keep only the push responsive menus at the tags &lt;body class="cbp-spmenu-push"&gt;&lt;nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1"&gt;. I adjusted the size of the push responsive menus of the tags showRightPush and showLeftPush and removed the tags section of them too, so they can be moved with the tag main. I also removed the section of the horizontal and vertical menus at the tag &lt;div class="main"&gt;. At the CSS file, I changed the proprieties of tags main and container (margin, padding, width and height), making the menus being separated and being moved to the top left and top right. Finishing it, I loaded the HTML and I tried to click the push responsive menus. They don't open themselves and don't work. You can check my demo of JSFiddle: http://jsfiddle.net/ndL2nat1/ How to fix that?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41888948
has comment: http://stackoverflow.com/comment/41888568
has comment: http://stackoverflow.com/comment/41889304
has comment: http://stackoverflow.com/comment/41996426
type: Question
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/41888841
has title: The push responsive menus don't open themselves and don't work
score: 0
has answer: http://stackoverflow.com/a/26640777
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41889685

http://stackoverflow.com/a/26575653
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26575334
has body: You need to call the init() function{as per the fiddle link you provided} on onclick of checkbox: First paragraph This is a paragraph And JS be like: function init() { if(document.getElementById("checkbox1").checked === false) { document.getElementById("first").style.display = 'none'; } else document.getElementById("first").style.display = 'block'; } FIDDLE

http://stackoverflow.com/q/26620233
answer count: 1
has title: google maps infowindow positioning with polylines
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41851271
has body: I have a map with multiple polylines which I am looking to display infowindow for each line. I have the infowindow working but it is not positioning to the event click as it should be. Instead, each window displays in the same place. Can't seem to track down the root of the issue. &lt;script type="text/javascript"&gt; var contentString = ""; var infowindow = new google.maps.InfoWindow({ content: contentString, }); function initialize() { var myLatlng = new google.maps.LatLng(30.695895, -97.354080); var mapOptions = { zoom: 5, center: myLatlng, mapTypeId: google.maps.MapTypeId.TERRAIN, }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); downloadUrl("data.xml", function(data) { var xml = xmlParse(data); var polylines = xml.documentElement.getElementsByTagName("polyline"); var polylineData = new Array(); for (var i = 0; i &lt; polylines.length; i++) { polylineData[i] = {id:polylines[i].getAttribute("id"), name:polylines[i].getAttribute("name"), olat:polylines[i].getAttribute("olat"), olng:polylines[i].getAttribute("olng"), dlat:polylines[i].getAttribute("dlat"), dlng:polylines[i].getAttribute("dlng")} } for (var j = 0; j &lt; polylineData.length; j++) { var path = [ new google.maps.LatLng(parseFloat(polylineData[j].olat), parseFloat(polylineData[j].olng)), new google.maps.LatLng(parseFloat(polylineData[j].dlat), parseFloat(polylineData[j].dlng)) ]; var polyline = new google.maps.Polyline({ path: path, strokeWeight: 2 }); google.maps.event.addListener(polyline, 'click', (function(event,index){ return function(){ infowindow.content = '&lt;div class="infobox" style="width:280px;"&gt;&lt;span class="name"&gt;' + polylineData[index].name + '&lt;/span&gt;&lt;/div&gt;'; var point = event.latLng; infowindow.setPosition(point); infowindow.open(map); }; })(event,j)); polyline.setMap(map); } }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; XML data looks like this: &lt;polylines&gt; &lt;polyline id="176" name="Li…
has answer: http://stackoverflow.com/a/26621219
has comment: http://stackoverflow.com/comment/41851395
has comment: http://stackoverflow.com/comment/41852065
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41852022
tagged with: google-maps
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41851519
has comment: http://stackoverflow.com/comment/41851924
has comment: http://stackoverflow.com/comment/41876540
accepted answer: http://stackoverflow.com/a/26621219
upvote count: 0

http://stackoverflow.com/q/26584958
has answer: http://stackoverflow.com/a/26585752
type: Question
has comment: http://stackoverflow.com/comment/41785744
has body: Is there anyway to do this function?, because i find it quite difficult to understand, specially that function with a char parammeter which i dont see where or how i use it. function trans(msg, rot) { //Reemplaza cada letra encontrada de la expresion [a-z], por el caracter codificado de la funcion return msg.replace(/([a-z])/ig, function(char) { var codASCII = char.charCodeAt(0); return String.fromCharCode( codASCII &gt;= 97 ? (codASCII + rot + 26 - 97) % 26 + 97 : (codASCII + rot + 26 - 65) % 26 + 65 ); }); } thank you in advance
tagged with: javascript
tagged with: string
score: 0
accepted answer: http://stackoverflow.com/a/26585752
answer count: 1
tagged with: regex
favorite count: 0
tagged with: encryption
upvote count: 1
has title: javascript caesar cipher algorithm
downvote count: 1
type: AnsweredQuestion

soundcloud
tags question: http://stackoverflow.com/q/26578745
type: Tag
tag name: soundcloud
tags question: http://stackoverflow.com/q/26519796
tags question: http://stackoverflow.com/q/26621409

http://stackoverflow.com/q/26652054
type: UnansweredQuestion
has body: I have found a code in javascript which is creating an object. But I have clearly no idea what exactly the below code does. var a = a || {}; An explanation would be appreciated.
has comment: http://stackoverflow.com/comment/41907628
type: Question
linked to: http://stackoverflow.com/q/476436
duplicate of: http://stackoverflow.com/q/2851404
upvote count: 1
has answer: http://stackoverflow.com/a/26652132
has answer: http://stackoverflow.com/a/26652100
has answer: http://stackoverflow.com/a/26652177
has title: JavaScript variable with pipeline
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/41907620
answer count: 5
downvote count: 1
linked to: http://stackoverflow.com/q/2851404
has answer: http://stackoverflow.com/a/26652108
has answer: http://stackoverflow.com/a/26652382

http://stackoverflow.com/q/26642456
has body: I'm using basic primitives org chart to create a family tree. What I'd like to do is iterate over the items that have been rendered so I can save the json to the database. I've been looking over the site's reference and put this in my code: alert(primitives.famdiagram.ItemConfig.length); $.each(primitives.famdiagram.ItemConfig, function (key, value) { alert(value.Id); }); for (var i=0; i &lt; primitives.famdiagram.ItemConfig.length; i++) { alert(primitives.famdiagram.ItemConfig[i].Id); } It gives me a length of 5, but when I try to iterate through the items with either jquery or javascript, nothing happens. How can I access the collection of items using basic primitives?
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/26653427
accepted answer: http://stackoverflow.com/a/26653427
has title: Iterate over BasicPrimitives OrgChart Items
tagged with: javascript
upvote count: 1
tagged with: arrays
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/41747401
type: AnswerComment
score: 0
type: Comment
has text: still same problem... can we apply the slider to post with ID `2877822832429210498` that take data from JSON `2877822832429210498`, and then apply another slider to post with ID `SOMEID` that take data from JSON `SOMEID` too? It's not a problem to apply the script five times (one for each post with unique ID).
comment on: http://stackoverflow.com/a/26550498

http://stackoverflow.com/a/26653036
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26649538
has body: Backbone.Model.fetch uses Backbone.Sync which uses $.ajax to request the remote server. When you calling Model.fetch(options) , options hash will be passed to $.ajax. In your case you could just set: this.promise = this.fetch({ beforeSend: function (request) { request.setRequestHeader("Content-Type", "application/octet-stream"); } });

http://stackoverflow.com/a/26642830
score: 1
has comment: http://stackoverflow.com/comment/41916646
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26642146
upvote count: 1
has body: Put this in your html tag: ... &lt;html onmouseout = "mouseOutOfWindow()"&gt; ... And then write this for the mouseOutOfWindow function: mouseOutOfWindow(){ window.alert("alertText"); //You can use an alert box, or any other kind of popup. } Good Luck!

http://stackoverflow.com/a/26594106
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41803932
has comment: http://stackoverflow.com/comment/41803769
accepted answer of: http://stackoverflow.com/q/26593907
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26593907
type: Answer
has comment: http://stackoverflow.com/comment/41804002
has body: You can accomplish this by using jQuery on, but like mentioned in comments, this might be a sign you need to change your approach. However, if you must do it this way, here is a solution using jQuery's 'on'. http://jsfiddle.net/WetNoodles/ab5yn7eL/ $('#outerContainer').on('click', '#button1', function () { alert('button 1 clicked!'); $(this).attr('id', 'button2'); }); $('#outerContainer').on('click', '#button2', function () { alert('button 2 clicked!'); $(this).attr('id', 'button1'); }); Some additional notes - If you take smerny's approach, you will still need to use the 'on' function in order to bind events to changing attributes unless you have the onclick attribute set directly on the html tag. Kristian's approach would let you use the click functions like you are currently using.

http://stackoverflow.com/comment/41736848
type: Comment
type: QuestionComment
has text: @hthomos ... Answer updated based on your updated question, if it solves the issue, kindly mark it as answer
comment on: http://stackoverflow.com/q/26531415
score: 0

http://stackoverflow.com/q/26620068
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26620098
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/26620269
has title: JavaScript Help (Loops and Arrays in Particular)
accepted answer: http://stackoverflow.com/a/26620098
has body: So I am doing an assignment for a required javascript class and am stuck on a couple of parts specifically. We are supposed to create a guessing game with an array where we prompt the user to guess names and if they match anything in the array to tally it up as points. Anyway here is the main code, the part that I am stuck on is figuring out how to loop the code so when the user is prompted 3 times for a guess and each guess is taken into account var sportsArray = ["Football","Basketball","Rollerblading","Hiking","Biking","Swimming"]; var name = prompt("Please enter your name.", "Enter Here"); var arrayGuess = prompt("Guess a sport.", "Enter Here"); var counter; for (counter = 0; counter &lt; sportsArray.length; counter++) { if (arrayGuess === "Football"||"Basketball"||"Rollerblading"||"Hiking"||"Biking"||"Swimming"){ alert("Good Job"); } else { arrayGuess; } } So the goal is to prompt the user to guess a part of the original array and if they do let them know that, but if they don't take points away and make them guess again until they have guessed 3 times. Anyway if someone could lend a hand it would be appreciated.
has answer: http://stackoverflow.com/a/26620269

http://stackoverflow.com/a/26584728
has comment: http://stackoverflow.com/comment/41796129
answers question: http://stackoverflow.com/q/26583696
score: 55
downvote count: 1
has comment: http://stackoverflow.com/comment/41796675
has comment: http://stackoverflow.com/comment/41794705
type: Answer
has body: ...I am late to the party? Here is my take on explaining it (Read the other answers as well, this is just to support those answers with a visual representation): Initialization of the empty object a with another object (value:true). Assigning the empty object a with a property b referring to the other object (value:true). Assigning the object a with a property c referring to the same object (value:true). Deletion of the key b, thus a.b no longer refers to the sub-object (value:true). Final representation of the main object a. So we can easily see by visual representation how the sub-object was being preserved :)
has comment: http://stackoverflow.com/comment/41831879
has comment: http://stackoverflow.com/comment/41797990
upvote count: 56

http://stackoverflow.com/a/26600618
has comment: http://stackoverflow.com/comment/41816095
accepted answer of: http://stackoverflow.com/q/26600560
has comment: http://stackoverflow.com/comment/41826259
downvote count: 0
answers question: http://stackoverflow.com/q/26600560
has comment: http://stackoverflow.com/comment/41892764
score: 5
type: AcceptedAnswer
has body: Let them input it, just trim it when focus changes: inputElement.onblur = function() { this.value = this.value.replace(/^0+(?=\d)/,''); } Fiddle Note that it's specifically looking for a digit (\d) after the 0's that it's nuking, so it won't touch the zero in something like 0.123. If you want to get rid of those, too, just change the \d to ., which matches any character whatsoever.
upvote count: 5
type: Answer

http://stackoverflow.com/comment/41888697
type: QuestionComment
comment on: http://stackoverflow.com/q/26640876
has text: You can do that via `ajax`
score: 0
type: Comment

http://stackoverflow.com/a/26665084
type: Answer
accepted answer of: http://stackoverflow.com/q/26664712
has body: Your code is calling "valid.length" which is not defined. The fixed code would be: function validMe(object){ var atpos = object.value.indexOf("@"); var dotpos = object.value.lastIndexOf("."); if (atpos &gt; 0 &amp;&amp; dotpos &gt; atpos+1 &amp;&amp; dotpos+2 &lt; object.value.length) { object.id = "success"; } } Tested on http://jsfiddle.net/suugqrdz/ Also, as a suggestion, use regex to validate emails, it's easier and more reliable than coming up with one on your own. Edit for Regex function validMe(object){ var atpos = object.value.indexOf("@"); var dotpos = object.value.lastIndexOf("."); if(atpos &lt; 0 &amp;&amp; dotpos &lt; 0) { object.id = "default"; return; //So you don't test unnecessarily } //var againAnotherMatch = /.+@.+\..+/; //var anotherMatch = /(.+)@(.+){2,}\.(.+){2,}/; var match = /^(([^&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,}))$/; if (match.test(object.value)) { object.id = "success"; } else { object.id = "default"; } } http://jsfiddle.net/suugqrdz/1/
answers question: http://stackoverflow.com/q/26664712
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41932456
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41932677
has comment: http://stackoverflow.com/comment/41932661
has comment: http://stackoverflow.com/comment/41932710
upvote count: 1
has comment: http://stackoverflow.com/comment/41932513
has comment: http://stackoverflow.com/comment/41932286
has comment: http://stackoverflow.com/comment/41932015

http://stackoverflow.com/q/26547667
type: Question
has answer: http://stackoverflow.com/a/26547804
has answer: http://stackoverflow.com/a/26547831
has answer: http://stackoverflow.com/a/26547720
has body: i am in a situation in which i have to split only till the first occurrence of the character |. now suppose i have a string say var str = "cat|bird|cow", i want this to break down it into ['cat', 'bird|cow'] so to do this i used the split method of string. as in the tutorials of MDN and in the book Javascript: The Good Parts, there is written that this method takes two parameters, one is the separator and the other is limit. and this is the ideal method for me. but when, just for experiment, i tested this in google console i got unexpected results! var a = "cat|bird|cow" // Undefined a // "cat|bird|cow" a.split('|', a.indexOf('|')) // ['cat', 'bird', 'cow'] but i don't want this! why is the limit not working? did the last update of javascript version removed it? if 'no' then why it is not working? thanks!
score: 0
tagged with: split
possible better answer: http://stackoverflow.com/a/26547720
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26547831
answer count: 3
has title: why is the limit not working in split method?
type: AnsweredQuestion

http://stackoverflow.com/a/26633945
answers question: http://stackoverflow.com/q/26631013
has comment: http://stackoverflow.com/comment/59094483
score: 1
type: AcceptedAnswer
upvote count: 1
type: Answer
has body: Everything seems to be running fine. If the problem persists, i would assume is a different type of script or CSS conflicting with what you have already, perhaps an outdated jquery library. $('.datepicker').each(function (i) { var $item = $(this); var fechas = $item.data('fechas') != '' ? $item.data('fechas') : ''; var urls = $item.data('urls') != '' ? $item.data('urls') : ''; var tipos = $item.data('tipos') != '' ? $item.data('tipos') : ''; var titulos = $item.data('titulos') != '' ? $item.data('titulos') : ''; var options = { 'dateFormat' : "dd/mm/yyyy", 'display' : $item.data('display') == '' ? '' : $item.data('display'), firstDay: 1, numberOfMonths: $item.data('months') == '' ? 1 : $item.data('months'), showOtherMonths: true, selectOtherMonths: false } /* Marcar los dias con sesion */ if (fechas.length) { options.beforeShowDay = function(datestr) { var fecha = $.datepicker.formatDate("dd/mm/yyyy", datestr); var arr = [true, '']; for( var j = 0 ; j &lt; fechas.length ; j++ ) { if ( fecha == fechas[j] ) { return [true, 'dia-con-evento '+tipos[j], titulos[j], 'link']; } } return arr; } } /* Agregar links a los días */ options.onSelect = function (datestr) { if ( fechas.indexOf(datestr) != -1 ) { location.href = urls[ fechas.indexOf(datestr) ]; } } $item.datepicker( options ); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt; &lt;link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet"/&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;div class="datepicker year" data-display="inline" data-fechas='["13\/05\/2015","11\/02\/2015","11\/03\/2015","10\/06\/2015","08\/04\/2015","08\/07\/2015","30\/03\/2015","30\/03\/2015","04\/05\/2015","04\/05\/2015","14\/05\/2015","24\/05\/2015","03\/06\/2015","18\/06\/2015","28\/06\/2015","03\/06\/2015","03\/06\/2015","13\/06\/2015","07\/07\/2015","08\/07\/2015","09\/07\/…
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26631013

charts
tags question: http://stackoverflow.com/q/26576144
tags question: http://stackoverflow.com/q/26558058
tags question: http://stackoverflow.com/q/26589263
tags question: http://stackoverflow.com/q/26608715
tags question: http://stackoverflow.com/q/26584982
tags question: http://stackoverflow.com/q/26521352
tags question: http://stackoverflow.com/q/26658597
tags question: http://stackoverflow.com/q/26617498
tags question: http://stackoverflow.com/q/26562276
type: Tag
tags question: http://stackoverflow.com/q/26609751
tags question: http://stackoverflow.com/q/26652996
tags question: http://stackoverflow.com/q/26608082
tags question: http://stackoverflow.com/q/26625042
tags question: http://stackoverflow.com/q/26651775
tag name: charts
tags question: http://stackoverflow.com/q/26616479
tags question: http://stackoverflow.com/q/26528924
tags question: http://stackoverflow.com/q/26666484
tags question: http://stackoverflow.com/q/26659796

http://stackoverflow.com/q/26644255
favorite count: 0
has comment: http://stackoverflow.com/comment/41894718
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41894721
has answer: http://stackoverflow.com/a/26644326
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41894756
has body: I'm trying to make a racing game, and my first step was to try out making the car and getting it to move a bit. Unfortunately, it isn't working, as nothing is showing up on the canvas, not the rectangle nor the car. Any ideas (of course you have ideas)? Sorry if the code isn't formatted correctly, I joined this site today. HTML: Ball JS: window.onload = function() { var x = 0; var y = 0; var speed = 5; var angle = 0; var mod = 0; var canvas = $('#gameCanvas')[0].getContext('2d'); var context = gameCanvas.getContext('2d'); var car = new Image(); car.src = "Gamecar.png"; window.addEventListener("keydown", keypress_handler, false); window.addEventListener("keyup", keypress_handler, false); var moveInterval = setInterval(function() { draw(); }, 30); }; function render() { context.clearRect(0, 0, width, height); context.fillStyle = "rgb(200, 100, 220)"; context.fillRect(50, 50, 100, 100); x += (speed * mod) * Math.cos(Math.PI / 180 * angle); y += (speed * mod) * Math.sin(Math.PI / 180 * angle); context.save(); context.translate(x, y); context.rotate(Math.PI / 180 * angle); context.drawImage(car, -(car.width / 2), -(car.height / 2)); context.restore(); } function keyup_handler(event) { if (event.keyCode == 87 || event.keyCode == 83) { mod = 0; } } function keypress_handler(event) { console.log(event.keyCode); if (event.keyCode == 87) { mod = 1; } if (event.keyCode == 83) { mod = -1; } if (event.keyCode == 65) { angle -= 5; } if (event.keyCode == 68) { angle += 5; } }
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41894708
tagged with: javascript
type: Question
tagged with: canvas
has title: Simple HTML and JS code won't work?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/41894730
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26644326

http://stackoverflow.com/a/26589271
has body: Your first problem is if ($("input[name='shipping']").val(money); ) { should be if ($("input[id='shipping']").val() == money ) { OR if ($("input[id='shipping'][type='hidden']").val() == money ) {
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/41793546
answers question: http://stackoverflow.com/q/26589221
has comment: http://stackoverflow.com/comment/41795703
accepted answer of: http://stackoverflow.com/q/26589221

http://stackoverflow.com/comment/41868718
comment on: http://stackoverflow.com/q/26630184
score: 0
type: Comment
type: QuestionComment
has text: You need a '.eot' font to get @font-face working on IE

http://stackoverflow.com/comment/41716517
has text: *My point* here was that these tutorials are aimed at sending text data to and fro. I am looking to action something on a click. I am looking for **tutorials** or **good documentation** as the Adobe documentation is more of a puzzle than a handbook. I have already followed these tutorials, yet I am **still** none the wiser on what is required to achieve what I need. So I posted this to StackOverflow in the aim that a more experienced programmer may point me in the right direction - *NOT* belittle my question and tell me it doesn't belong on a website focused around answering these questions
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26546294

http://stackoverflow.com/q/26544102
favorite count: 0
has comment: http://stackoverflow.com/comment/41711883
has body: I have a dropdown which can select multiple values.I know that if the dropdown stores values comma separated its possible to split the string and retrieve the values. However I have a dropdown which on selection of multiple values stores them as a list with each value as a list element. I tried to retreive the values in the same way but I am only getting the first value! Can anyone suggest a way to retrieve all the values using JS? The selected values from the dropdown basically fill a list dynamically. I need to know how to retrieve the values of the list. The code of the list is: The Javascript and HTML code is: var ul = document.getElementById("foo"); var items = ul.getElementsByTagName("li"); for (var i = 0; i < items.length; ++i) { var it = items[i].getElementsByTagName("span"); alert(it.innerHTML); } Afghanistan Afghanistan2 Afghanistan3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41715361
type: AnsweredQuestion
has title: How to retrieve the value of a dropdown with multiple values?
accepted answer: http://stackoverflow.com/a/26545976
type: Question
has comment: http://stackoverflow.com/comment/41712126
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/41711866
has answer: http://stackoverflow.com/a/26545976
has comment: http://stackoverflow.com/comment/41714369
downvote count: 2
has comment: http://stackoverflow.com/comment/41711869
upvote count: 1
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/26521446
has comment: http://stackoverflow.com/comment/41671921
answers question: http://stackoverflow.com/q/26521258
has comment: http://stackoverflow.com/comment/41671924
type: Answer
has comment: http://stackoverflow.com/comment/41671918
upvote count: 1
has comment: http://stackoverflow.com/comment/41671926
downvote count: 1
has body: This should work (Tested in Firefox 32). http://jsfiddle.net/tugvgs1z/1/ However, this does not work in Chrome and IE 11. There is a good discussion on CSS custom-property API on link.
score: 0
has comment: http://stackoverflow.com/comment/41672033

http://stackoverflow.com/q/26589427
answer count: 2
has answer: http://stackoverflow.com/a/26781307
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26589676
has answer: http://stackoverflow.com/a/26589676
has comment: http://stackoverflow.com/comment/41793821
has body: So I've been over the web looking for a way to send data from my js to my controller, and came across a seemingly good solution. function syncDB() { if (localStorage.length != 0) { var data = viewLog(); for (var i = 0; i &lt; localStorage.length; i++) { $.ajax({ url: "/Leads/RegisterOfflineEntries", type: "POST", dataType: "json", data: JSON.stringify(data) }); } } } this is sent to: public ActionResult RegisterOfflineEntries(string[] leads) { string[] splitLeads; for (int i = 0; i &lt; leads.Length; i++) { splitLeads = leads[i].Split(','); var validFields = new List&lt;LeadFields&gt;(); var fields = new List&lt;LeadFields&gt; { new LeadFields() {Value = splitLeads[0], FieldsId = 1}, new LeadFields() {Value = splitLeads[1], FieldsId = 2}, new LeadFields() {Value = splitLeads[2], FieldsId = 3}, new LeadFields() {Value = splitLeads[3], FieldsId = 4}, new LeadFields() {Value = splitLeads[4], FieldsId = 5} }; foreach (var v in fields.Where(v =&gt; !(string.IsNullOrEmpty(v.Value)))) { v.Value = v.Value.ToUpper(); validFields.Add(v); } } return RedirectToAction("Index","Home"); } Now, don't read into the code too much, cause the problem lies in the parameter of the ActionMethod. It is null, and I can't figure out why, cause when I use the js data elsewhere, I can read the data on it, but sending it over to the controller doesn't work. Thank you! Edit: the object im trying to send is fetched from the viewLog method which looks like this function viewLog() { var localDbList = [localStorage.length]; for (var i = 0; i &lt; localStorage.length; i++) { localDbList[i] = localStorage[i]; } return localDbList; } what I have is a localStorage for offline support and I'm trying to take the values stored here and save them on my server Edit: Request URL:http://localhost:59848/Leads/RegisterOfflineEntries Request Headers Provisional headers are shown Accept:*/* Content-Type:json Origin:http://localhost:59848&lt;br&gt; Referer:http://localhost:59848/Leads/Register User-Agent:Mozilla/5.…
score: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41793947
has title: My json object turns out null and I can't see why
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/26781307
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/64053397
type: AnswerComment
has text: Would this be better as a nested `requestAnimationFrame` call? Eg; `function onNextFrame(cb) { window.requestAnimationFrame(_ => window.requestAnimationFrame(cb)) }`. Based on the spec (https://html.spec.whatwg.org/multipage/webappapis.html#animation-frames), this would guarantee it runs on the very next frame after the initial render (in particular, check out the order of executing the list in "run the animation frame callback"). It avoids the ambiguity of when setTimeout will be executed wrt the next frame.
type: Comment
score: 3
comment on: http://stackoverflow.com/a/34999925

http://stackoverflow.com/q/26610508
has title: jQuery not preserving display value after hide
linked to: http://stackoverflow.com/q/9260009
has comment: http://stackoverflow.com/comment/41833773
duplicate of: http://stackoverflow.com/q/9260009
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41833567
score: 0
has body: I have an absolutely positioned child inside a relatively positioned container with the following style: .child { display: inline-block; position: absolute; right: 0; width: 551px; height: 132px; } ...and the markup: &lt;div id="child" class="child"&gt; &lt;!-- a div here --&gt; &lt;!-- an image here --&gt; &lt;/div&gt; It's been showing up without problems while I've been messing around with the layout. But I only want this child element to be visible when I hover over another element. So, when my page loads I run the following jQuery: $('.child').hide(); // which should preserve the inline-block display value $('#target').hover(function() { $('#something').fadeOut(function() { $('#child').fadeIn(); }); }, function() { $('#child').fadeOut(function() { $('#something').fadeIn(); }); }); When the hide function is called, the child element has an inline style added which is display: none like I would expect. But when the fadeIn function is called on the child, the inline style display value is set to block, which breaks my layout (it should be inline-block). I thought jQuery always preserves the display value of an element when hide is used, in fact I'm relying on that in a number of other situations. Why is it not working here? For what it's worth, I'm using jQuery v2.1.1 Edit: From the jQuery docs regarding the hide function: This is roughly equivalent to calling .css( "display", "none" ), except that the value of the display property is saved in jQuery's data cache so that display can later be restored to its initial value. If an element has a display value of inline and is hidden then shown, it will once again be displayed inline. This is not happening for me. The question I'm asking is why this could be happening. Also, the other question is dealing with simple hiding and showing of elements. If I set the display value manually to inline-block before attempting the fadeIn, I might end up with the element flickering before the fade starts.
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/41833596

http://stackoverflow.com/q/26586298
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41787812
tagged with: jquery
score: 0
has title: jquery classes and subclassing
answer count: 0
has body: I'm currently working on an existing project trying to figure out what is what. I have this piece of code that I'm wondering what it actually does and how to call a specific function in this class: (function fileactions($) { $(function init() { $(document).bind('file-delete', fileDelete); } function fileDelete() { alert('do something'); } function callThisFunction() {} })(jQuery); So I've been working like above as that code was already there, but now I need to call the function callThisFunction() from outside the fileactions object (is it even an object?). I'm far from a javascript expert, as far as I could tell from google that this is a way of subclassing?, does this mean I'm extending jQuery with the function created in fileactions? The fileDelete method is simple, I can just trigger an event and it'll work, and so far I've only needed functionality like that.
type: UnansweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/41787827

http://stackoverflow.com/a/26615983
has body: Yes it's possible, you just need to escape your newlines with \n (basically instead of using line breaks in your code, you will need to use \n. Your output should be something like alert("Bienvenue dans l’interface Voyager \n\n Ici, vous allez pouvoir transférer vos données en quelques clics et en un temps record.\n\n\n\n\nPour utiliser cette interface :\n\n\n- Sélectionner vos données\n\n- Cliquer sur le bouton décompression ce qui va vous permettre d’obtenir une clé\n\n- Grâce à cette clé, vous pourrez accéder à vos données depuis tous types de médias (ordinateur, Smartphone, tablette) ayant l’interface Voyager \n\n\n\n\nPour accéder à vos données :\n\n\n- Entrer la clé dans la case associée \n\n- Cliquer sur décompression \n\n- Vous venez de récupérer vos données réelle et sans perte"); If that looks like too much of a mess, you can also use string concatenation to preseve the look of your text in code. alert("Bienvenue dans l’interface Voyager \n" + "\n" + " Ici, vous allez pouvoir transférer vos données en quelques clics et en un temps record.\n" + "\n" + "\n" + "\n" + "\n" + "Pour utiliser cette interface :\n" + "\n" + "\n" + "- Sélectionner vos données\n" + "\n" + "- Cliquer sur le bouton décompression ce qui va vous permettre d’obtenir une clé\n" + "\n" + "- Grâce à cette clé, vous pourrez accéder à vos données depuis tous types de médias (ordinateur, Smartphone, tablette) ayant l’interface Voyager \n" + "\n" + "\n" + "\n" + "\n" + "Pour accéder à vos données :\n" + "\n" + "\n" + "- Entrer la clé dans la case associée \n" + "\n" + "- Cliquer sur décompression \n" + "\n" + "- Vous venez de récupérer vos données réelle et sans perte\n");
score: 1
accepted answer of: http://stackoverflow.com/q/26615913
has comment: http://stackoverflow.com/comment/41846827
answers question: http://stackoverflow.com/q/26615913
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/41844098
upvote count: 1

http://stackoverflow.com/q/26663002
upvote count: 2
has answer: http://stackoverflow.com/a/26663056
accepted answer: http://stackoverflow.com/a/26663056
type: Question
has body: I've been working on a website that has a persistent header, with a navigation panel that slides out of the top of the screen. It currently works by wrapping the header and navigation panel in a fixed div, and giving that div a negative top margin equal to the height of the navigation. The HTML This is the navigation panel. This is a logo Toggle The CSS .sticky { height:300px; margin:-250px 0 0; position:fixed; z-index:1000; } .above-header { height:250px; } .header { height:50px; } .open { margin:0 } Then I use a tiny js/jquery script to change that margin to 0, making the navigation visible. $('a.toggle').click(function() { if ($('.sticky').hasClass('open')){ $('.sticky').removeClass('open'); } else{ $('.sticky').addClass('open'); } }); I've got it working fine except for one problem: if I open or close the panel, the view jumps up to the top of the page, regardless of where I've scrolled to. I've recreated a simplified version of the problem on Codepen to demonstrate what I'm talking about. I cannot imagine why it is doing this, and my Google Fu hasn't turned up any answers. Any idea what I can do to fix this problem? Or perhaps there's a better technique for this that I'm not aware of?
possible better answer: http://stackoverflow.com/a/26663052
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26663052
has title: How do I prevent the browser window from jumping back to the top of the page when when I open and close my panel?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion

http://stackoverflow.com/a/26520211
has comment: http://stackoverflow.com/comment/41669976
has comment: http://stackoverflow.com/comment/41814379
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41669868
has comment: http://stackoverflow.com/comment/41814464
has comment: http://stackoverflow.com/comment/41847573
accepted answer of: http://stackoverflow.com/q/26520154
has comment: http://stackoverflow.com/comment/41814629
has comment: http://stackoverflow.com/comment/41669629
answers question: http://stackoverflow.com/q/26520154
has comment: http://stackoverflow.com/comment/41814679
has comment: http://stackoverflow.com/comment/41814462
has comment: http://stackoverflow.com/comment/41814488
has comment: http://stackoverflow.com/comment/41814702
has comment: http://stackoverflow.com/comment/41694289
upvote count: 2
has comment: http://stackoverflow.com/comment/41815723
has comment: http://stackoverflow.com/comment/41814280
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41814448
has comment: http://stackoverflow.com/comment/41844679
has body: Bad News By trial and error I've found out that WOW's "asynchronous content support" will only work if there is a wow element rendered in the DOM by the time you make the call new WOW().init();. Otherwise it won't synchronize anything. Prove: Not Working Example Working Example The only difference is that the working example has this dummy tag in it: &lt;section class="wow"&gt;&lt;/section&gt; Another Working Example based on your code So, if you want WOW to work asynchronously just make sure that you have a dummy element with the "wow" class on it before you make the new WOW().init(); call. Previous Answer (also interesting, you may want to have a look at it) Please, have a look at this example that I've made for you angular.module('wowTest', []) .factory('wowAPI', ['$http', function ($http) { return { getItems: function () { return $http.get('data.json'); } } }]) .controller('wowController', function($scope, wowAPI, $timeout){ $scope.items = []; wowAPI.getItems().success(function(data){ $scope.items=data.items; }).then(function(){ $timeout(function(){ new WOW().init(); }); }); }); Or the equivalent example with your original code: var app = angular.module('app', []); app.controller('mainCtrl', function ($scope, $timeout) { $scope.items = []; $timeout(function () { for (var count = 0; count &lt; 50; count++) { $scope.items.push({ text: "Item " + count }); } }).then(function(){ $timeout(function(){ new WOW().init(); }); }); }); The thing is that it seems that WOW actually needs to be instantiated after the DOM has rendered, so the function inside the $timeout ensures that code will be executed at the end of the $diggest cycle, after your browser has already rendered the new values of your $scope in the DOM. I guess that you could also do this (see bellow), but I think that it's much better to chain the promises rather than have one inside the other: .controller('wowController', function($scope, wowAPI, $timeout){ $scope.items = []; wowAPI.getItems().success(function…

http://stackoverflow.com/a/36031198
answers question: http://stackoverflow.com/q/26632332
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/135937085
score: 17
has comment: http://stackoverflow.com/comment/124502900
upvote count: 17
has body: Clear and destroy methods could be called like this, var table = $('#example').DataTable(); //clear datatable table.clear().draw(); //destroy datatable table.destroy(); Reference; Clear API method Destroy method Note: This code will work for datatable version 1.10 and above.

http://stackoverflow.com/comment/41798435
type: QuestionComment
has text: @jeroen yes sorry, my mistake. I edit the question
score: 1
comment on: http://stackoverflow.com/q/26591639
type: Comment

http://stackoverflow.com/comment/41937822
score: 0
has text: I just suggested another way to achieve same, but problem may be in jquery include otherwise code looks good.
type: Comment
comment on: http://stackoverflow.com/a/26668305
type: AnswerComment

http://stackoverflow.com/q/26528637
has comment: http://stackoverflow.com/comment/41683899
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/41683869
accepted answer: http://stackoverflow.com/a/26528955
has comment: http://stackoverflow.com/comment/41684158
score: 0
tagged with: forms
has title: form validation not alerting after checking conditions
tagged with: javascript
has body: I'm trying to validate an HTML form with javascript, but since no alerts were popping up I thought my checkSubmit() function wasn't being called. However, after adding an additional alert at the beginning of the function it is indeed firing but no further alerts pop up after checking the first condition. &lt;script language="javascript" type="text/javascript"&gt; function checkSubmit() { alert("Hello from Javascript!"); if (document.getElementById("user").value.toString.length &lt;1) { alert("Please enter a user name."); return false; } if (document.getElementById("location").value.toString.length &lt;1) { alert("Please enter a location."); return false; } if (document.getElementById("depart").value.toString.length &lt;1) { alert("Please enter a department."); return false; } if (document.getElementById("category").value.toString.length &lt;1) { alert("Please enter a problem type."); return false; } if (document.getElementById("info").value.toString.length &lt;1) { alert("Please enter a problem description."); return false; } alert("Hello from Javascript2!"); return true; } &lt;/script&gt; &lt;form name="submit" type="submit" method="POST" onsubmit="return checkSubmit();"&gt; [...] &lt;input type="submit" name="submit" value="Submit" &gt; &lt;/form&gt; Unless I made an error (which I'm sure will be obvious in hindsight), shouldn't there be a second alert pop up, regardless if any of the conditions are true or false?
has answer: http://stackoverflow.com/a/26528955
type: AnsweredQuestion
tagged with: validation
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26577477
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
upvote count: 1
type: Question
has title: Use typeahead.js on multiple inputs on same page
has body: I am using typeahead.js from Twitter. http://twitter.github.io/typeahead.js/examples/ And I am trying to use multiple inputs on the same page. One input is loaded initially on the page. And then the others are added upon user request by clicking a button. I'm pretty sure I know what the problem is, the inputs are getting added after the script for the typeahead.js has already been initialized. So they are not getting the information they need. I tried manually adding a second input and it worked just fine, that is why I have come to the above conclusion. I also tried wrapping the typeahead.js javascript in a function and calling that when the input is added but that disabled the first input and made my page look funky. Although, the second input did then work like it is supposed to. My code is below: function addRow() { addTableRow($('.table tbody')); } function removeRow() { var par = $(this).parent().parent(); var tableSize = $('.table tbody tr').length; if (tableSize == '1') { alert('You must have one row'); return false; } par.remove(); }; function calculateRow() { var par = $(this).parent().parent(); var price = $(par).find('.price').val(); var qty = $(par).find('.qty').val(); var total = price * qty; $(par).find('.total').val(total.toFixed('2')); } $('.table tbody').on("click", ".removeRow", removeRow); $('.table tbody').on("blur", ".qty", calculateRow); function addTableRow(table) { $(table).append( "&lt;tr&gt;" + "&lt;td&gt;&lt;input name='item_number[]' type='text' class='form-control'&gt;&lt;/td&gt;" + "&lt;td&gt;&lt;div class='the-basics'&gt;&lt;input class='typeahead form-control' type='text' name='item_name[]''&gt;&lt;/div&gt;&lt;/td&gt;" + "&lt;td&gt;&lt;input name='item_price[]' type='text' class='form-control price'&gt;&lt;/td&gt;" + "&lt;td&gt;&lt;input name='item_qty[]' type='text' class='form-control qty'&gt;&lt;/td&gt;" + "&lt;td&gt;&lt;input name='item_total[]' type='text' class='form-control total'&gt;&lt;/td&gt;" + "&lt;td class='text-center' …
has answer: http://stackoverflow.com/a/26580555
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26663346
type: Answer
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
has body: So close! Inside of a character class the ^ means negation, but outside it means "beginning of string". The following should work: if(lsKey.match("p") === null){ Just check for the character p, if it doesn't exist then match() will return null. That said, if you don't need to use regular expressions then it's much simpler to use the indexOf method instead: if(lsKey.indexOf("p") == -1){
accepted answer of: http://stackoverflow.com/q/26663310
answers question: http://stackoverflow.com/q/26663310

http://stackoverflow.com/a/26539528
answers question: http://stackoverflow.com/q/26538871
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/41705889
score: 6
has comment: http://stackoverflow.com/comment/41705508
has body: Use jinja_options: app = Flask(__name__) jinja_options = app.jinja_options.copy() jinja_options.update(dict( block_start_string='&lt;%', block_end_string='%&gt;', variable_start_string='%%', variable_end_string='%%', comment_start_string='&lt;#', comment_end_string='#&gt;', )) app.jinja_options = jinja_options In a template: &lt;li ng-repeat="thing in things"&gt;&lt;a href="#"&gt;{{thing}}&lt;/a&gt;&lt;/li&gt; %% jinja_expression %%
accepted answer of: http://stackoverflow.com/q/26538871
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/26539864
answers question: http://stackoverflow.com/q/26539829
type: Answer
score: 0
has body: you can use $('#modal').modal('show'); // or .modal('hide') to show or hide a modal

http://stackoverflow.com/comment/41912103
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26654391
type: QuestionComment
has text: @JohnnyHK is right ,, change your date type into Number if you are search with range condition

http://stackoverflow.com/q/26556830
accepted answer: http://stackoverflow.com/a/26557047
has comment: http://stackoverflow.com/comment/41735187
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41735190
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41735143
has comment: http://stackoverflow.com/comment/41735332
has answer: http://stackoverflow.com/a/26557047
upvote count: 1
has comment: http://stackoverflow.com/comment/41735254
tagged with: node.js
has title: Nodejs stream (Error: Can't set headers after they are sent)
type: AnsweredQuestion
tagged with: stream
has comment: http://stackoverflow.com/comment/41735293
has body: I am trying to build an api from the braintree servers. Referring to this doc https://developers.braintreepayments.com/javascript+node/reference/general/result-handling/search-results To access all the transactions from their server I have to return a node stream. ex app.get('/project', function(req, res) { if(req.user) { var stream = gateway.transaction.search(function (search) { search.customerId().is(req.user.id); }); stream.on("ready", function () { console.log(stream.searchResponse); }); stream.on("data", function (data) { res.json(data) // can't set headers after they are sent. }); } }); I understand a stream returns data in chunks, so the res.json() above is most likely is being called multiple times resulting in Error: Can't set headers after they are sent. So my question is how can I send that data to the client in one chunk? The nodejs streaming is confusing to me, I am going to read up more about it, but it would be great to understand how to send the data to the client without re-sending the headers.
has comment: http://stackoverflow.com/comment/41735211
type: Question

http://stackoverflow.com/q/26528159
has comment: http://stackoverflow.com/comment/41683065
upvote count: 1
has comment: http://stackoverflow.com/comment/41682921
type: Question
tagged with: javascript
downvote count: 0
has body: How could I force iframe to load pages in it (not in entire browser) when I navigate links of external sites. &lt;iframe src="http://stackoverflow.com/"&gt;&lt;/iframe&gt; For exemple, if I click link of stackoverflow.com loaded in iframe, then entire browser reloads. Is it possible to reload only iframe?
favorite count: 0
has comment: http://stackoverflow.com/comment/41683021
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41683098
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41683023
answer count: 0
score: 1
has title: Open links of external site loaded in iframe in the same iframe
tagged with: iframe

http://stackoverflow.com/comment/41799423
type: Comment
type: QuestionComment
has text: Sorry for any confussion my goal is to get an angle between 0 and 360 degrees having only the center and a click event, each of them have an x and a y.
score: 0
comment on: http://stackoverflow.com/q/26592016

http://stackoverflow.com/comment/41855171
comment on: http://stackoverflow.com/q/26622361
score: 0
has text: @aj_r yes I did that already..basically I set it to display:none in css and block in JS when it should load it but no success with JQuery animation...
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26557458
has comment: http://stackoverflow.com/comment/41738961
has title: Ajax response returns empty value. Network response shows the value
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41800633
has comment: http://stackoverflow.com/comment/41801011
upvote count: 2
has comment: http://stackoverflow.com/comment/41801276
has answer: http://stackoverflow.com/a/26595730
has comment: http://stackoverflow.com/comment/41802821
has comment: http://stackoverflow.com/comment/41802319
type: Question
has answer: http://stackoverflow.com/a/26557683
has comment: http://stackoverflow.com/comment/41802414
has comment: http://stackoverflow.com/comment/41801164
has body: I'm having a really weird problem where a certain value from an ajax json response is an empty string. All other values are coming through fine. The weird part is that when I look at the response in the network panel it shows the correct value. By the time I console log it, it's empty. I'm really not sure where to begin at debugging this. It's a pretty simple ajax call. I'm using a factory and logging the response. getAllActivity: function(){ return $http({ method: 'GET', url: '/getActivity' }); } feedFactory.getAllActivity().success(function(response){ console.log(response); }); The response from the log shows: { "__type": "ActivityService", "activityTime": "/Date(1414189623937-0600)/", "activityTimeString": "2014-10-24T16:27:03.9370000-06:00", "activityType": "Appreciation", "activityUrl": "~/Blog/August-2014/Staggering-the-Line", "activityUser": { "userId": 12345, "userNickName": "Mike_Jones" }, "itemDescription": "" } The response from the network panel shows: { "__type": "ActivityService", "activityTime": "/Date(1414189623937-0600)/", "activityTimeString": "2014-10-24T16:27:03.9370000-06:00", "activityType": "Appreciation", "activityUrl": "~/Blog/August-2014/Staggering-the-Line", "activityUser": { "userId": 12345, "userNickName": "Mike_Jones" }, "itemDescription": "test" } Also, it's working fine on other activityTypes. The object is exactly the same, the only difference being the value isn't returned as an empty string. I appreciate any help. Thanks to Michal in the comments I was able to see the value by using console.log(angular.copy(response)); However when I try to use that var foo = angular.copy(response); function doWhatEva(foo); Inside doWhatEva it is empty again.
has answer: http://stackoverflow.com/a/26557506
has answer: http://stackoverflow.com/a/26558081
has comment: http://stackoverflow.com/comment/41794239
tagged with: javascript
has comment: http://stackoverflow.com/comment/41800432
has comment: http://stackoverflow.com/comment/41791485
accepted answer: http://stackoverflow.com/a/26595730
possible better answer: http://stackoverflow.com/a/26557506
has comment: http://stackoverflow.com/comment/41799871
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/41736248
has comment: http://stackoverflow.com/comment/41802896
tagged with: asp.net
has comment: http://stackoverflow.com/comment/41776537
favorite count: 0
tagged with: ajax
tagged with: angularjs
answer count: 5
has comment: http://stackoverflow.com/comment/41799700
has answer: http://stackoverflow.com/a/26593868
has comment: http://stackoverflow.com/comment/41736665
has comment: http://stackoverflow.com/comment/41776711

http://stackoverflow.com/q/26656042
has answer: http://stackoverflow.com/a/26657239
type: Question
has comment: http://stackoverflow.com/comment/41914667
tagged with: javascript
tagged with: jquery
answer count: 6
has answer: http://stackoverflow.com/a/26656132
accepted answer: http://stackoverflow.com/a/26656132
has answer: http://stackoverflow.com/a/26656162
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26656377
has body: I have a website that is using js to switch between two different navigation menus. It has always worked up until a week ago or so and I can't figure out why. Wondering if anyone here can point something out to me that I'm not seeing. Here's my markup: Works ...the 1st menu About ...the 2nd menu And Here's my js: $(document).ready(function() { function showonlyone(thechosenone) { $('.newboxes').each(function(index) { if ($(this).attr("id") == thechosenone) { $(this).show(); } else { $(this).hide(); } }); } }); When I look at my console using firebug, I get the following error: ReferenceError: showonlyone is not defined but with my lack of knowledge about js, I'm not entirely sure how to fix this. Can anyone shed some light?
has answer: http://stackoverflow.com/a/26656278
possible better answer: http://stackoverflow.com/a/26656176
has title: Javascript links stopped working, can't figure out why
has answer: http://stackoverflow.com/a/26656176
type: AnsweredQuestion

http://stackoverflow.com/q/26671714
accepted answer: http://stackoverflow.com/a/26671780
type: AnsweredQuestion
type: Question
has body: Hello I have some functions written in a JS file that I need help with, I have three methods structured like so: writeDetailsToDB(); //writes details to db and returns a status to indicates success writeOtherDetailsToDB(); //writes details to db and returns a status to indicates success checkOk(); //checks to see both status were successful The problem I am having is that the checkOk() is being called before the other two methods can finish executing so it always indicates failure I need to be be able to wait for the other two methods to finish before executing checkOK(). Having looked a AJAX success methods I always find an .ajax() method and URLs and I don't see how they fit my problem. Please can someone help me!
tagged with: javascript
tagged with: response
linked to: http://stackoverflow.com/q/3384983
score: 0
has answer: http://stackoverflow.com/a/26671780
answer count: 1
tagged with: ajax
has title: AJAX method calls

http://stackoverflow.com/a/26566370
type: Answer
accepted answer of: http://stackoverflow.com/q/26566325
downvote count: 2
has body: It just means that the length of an array is always* its largest index + 1. Consider: var a = []; a[6] = 'foo'; console.log(a.length) //7 a[20] = 'bar'; console.log(a.length) //21 *actually not always, like for example when you use Array constructor with number argument: var a = new Array(5), the array is empty, but it has its length explicitely set to 5
answers question: http://stackoverflow.com/q/26566325
upvote count: 1
has comment: http://stackoverflow.com/comment/41753527
score: -1
type: AcceptedAnswer

http://stackoverflow.com/a/26612574
score: 0
type: Answer
has body: Your models aren't sorted in a descending order because sort() does not accept the comparator callback (see sortBy() in the docs) You need to put your logic in the comperator() - see this example: http://jsbin.com/petetiwiqo/1/edit?html,js,output
answers question: http://stackoverflow.com/q/26611730

http://stackoverflow.com/comment/41752068
type: AnswerComment
type: Comment
has text: I've tried pasting in the exact information on my end into your fiddle and it seems to work. So it has to be some other issue on my end. This helped, now I know its not a jQuery issue. Thanks
comment on: http://stackoverflow.com/a/26566435
score: 0

http://stackoverflow.com/comment/41722655
type: AnswerComment
comment on: http://stackoverflow.com/a/26550134
has text: It works but it's missing something. When you hover over the one that is `active` there are no arrows
score: 0
type: Comment

http://stackoverflow.com/a/26528588
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41684152
answers question: http://stackoverflow.com/q/26528517
type: Answer
accepted answer of: http://stackoverflow.com/q/26528517
has body: You can use @ directives like you would normally do. You can print it using Html.Raw: var x = /* this is javascript */ @{ ... @Html.Raw(contacts) } Or just call @Html.Partial directly: var x = /* this is javascript */ @{ ... @Html.Partial(...) } Or declare it here: @{ ... string contacts = @Html.Partial(...) } And use it later: @contacts
score: 3
upvote count: 3

http://stackoverflow.com/a/26589891
has body: First, in order to access to the iframe elements, the origin page and the iframe must be in the same domain, or have CORS enable to allow resources sharing. Same Origin Policy Breaking The Cross Domain Barrier Ways to circumvent the same-origin policy Loading cross domain html page with jQuery AJAX Assuming you can access the iframe content, you can get the iframe content: var iframe = $('#frame_main').contents(), scripts = iframe.find('script'), target = scripts.find('[src$="script.js"]').first(); Now that we have the script, we are going to insert and execute the script in the page asynchronously, and we react when the script is loaded using the callback for onload event. var js = document.createElement('script'); js.type = 'text/javascript'; js.src = target.attr("src"); js.onload = function() { // do something when the script has been executed }; As we know, HTML is rendered linearly (unless the caller function is an async callback), meaning that the script in current execution is the last one, so we are going to insert the new script after the current script. var currentScript = $("script").last(); currentScript.after(js); Now the script element has been added to the document, and it will be executed asynchronously and we can react when the script is executed thanks to the onload callback.
type: Answer
answers question: http://stackoverflow.com/q/26588421
score: 0

http://stackoverflow.com/q/26556700
tagged with: css-position
has comment: http://stackoverflow.com/comment/41734929
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Positioning parent element so child is in exact same position
score: 2
type: UnansweredQuestion
has body: I'm trying to implement a drop-down in JS. I have a div container with bunch of items in it. I want to make it into a dropdown so when the dropdown is clicked to open, the item currently selected will stay exactly in the same place and other items will be displayed above and below it. I started out with this structure: this is some random paragraph of text or any other content where dropdown will be positioned aaaaa b fdfb cccc dd cccc eee ffff gggg hh iiiii ii and this is more Only one item is displayed somewhere e.g. inside of paragraph of text. The problem I have is that when dropdown is open I find it hard to match position of div.dropdown (displayed with all the children) so the item currently selected item will be positioned exactly in the same place. How would I best approach this? EDIT: Created Fiddle here as that might give you better idea of what I'm after
tagged with: javascript
has answer: http://stackoverflow.com/a/29393458
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/41735087
answer count: 1
downvote count: 0
tagged with: drop-down-menu
favorite count: 0

http://stackoverflow.com/comment/41716177
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26546650
type: Comment
has text: It should be a comment

http://stackoverflow.com/q/26591035
score: -2
has body: Is there a way to determine if a certain element is currently visible on the user's screen/viewport with the use of jQuery? (not using other external libraries)
downvote count: 2
answer count: 1
linked to: http://stackoverflow.com/q/487073
tagged with: javascript
has title: Determine if element is on screen
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41797280
tagged with: viewport
upvote count: 0
has answer: http://stackoverflow.com/a/26591036
has comment: http://stackoverflow.com/comment/41798180
tagged with: jquery
has comment: http://stackoverflow.com/comment/41797239
favorite count: 0
type: Question

http://stackoverflow.com/a/26575666
accepted answer of: http://stackoverflow.com/q/26575523
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26575523
type: Answer
has body: When you call the addition operator on an object, and the object is converted to a primitive, the internal DefaultValue method of the object is called. The method takes a type hint which determines whether toString should be evaluated first or valueOf. If the hint is "String", then toString is looked for, before valueOf. If "Number" is passed, it's vice versa. However (emphasis mine): When the DefaultValue internal method of O is called with no hint, then it behaves as if the hint were Number, unless O is a Date object (see 15.9.6), in which case it behaves as if the hint were String. This is also noted in the addition operator section: 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.

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/26581715
tag name: sequelize.js
tags question: http://stackoverflow.com/q/26598409

http://stackoverflow.com/a/26596737
has body: I believe this simplified code sample here works as you intended it: Advanced Search Client Name Policy Number As I have never seen the format for declaring html elements, I would hazard a guess that your problem lies there, and the most likely cause is that the value attritube is not getting translated into id correctly on some browsers. You may want to stick to the standard html tags for web development. To verify this is your problem in Firefox, try opening the console using ctrl-shift-k and you should get the following message when you click the advanced checkbox. TypeError: document.getElementById(...) is null
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26596000
downvote count: 0
has comment: http://stackoverflow.com/comment/41812028
score: 1

http://stackoverflow.com/comment/41830430
score: 0
has text: possible duplicate of [YouTube Video Embedded via iframe Ignoring z-index?](http://stackoverflow.com/questions/9074365/youtube-video-embedded-via-iframe-ignoring-z-index)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26608348

http://stackoverflow.com/comment/41721099
comment on: http://stackoverflow.com/a/26522827
has text: I'm gonna look at that! thanks a lot
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41757742
score: 0
type: Comment
has text: thanks for the input to help me avoid wasting my time!, any inputs on making the shopping cart itself?
type: QuestionComment
comment on: http://stackoverflow.com/q/26569150

http://stackoverflow.com/q/26539219
score: -3
has comment: http://stackoverflow.com/comment/41703647
has comment: http://stackoverflow.com/comment/41703710
upvote count: 0
answer count: 1
tagged with: variables
has body: Hi i'm pretty new to programming, and this is probably a really easy answered question but I don't know how to fix it. I am making a sort of art program that you draw with the arrow keys, I am also using sublime text 2 as my editor. According to the dev. Console it is not defined but it looks defined to me. Anyway I looked for an answer but most of the things I saw were just people that forgot to define the variable, otherwise it was not JS, HTML. var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); var keysDown = {}; window.addEventListener('keydown', function(e) { keysDown[e.keyCode] = true; }); window.addEventListener('keyup', function(e) { delete keysDown[e.keyCode]; }); function update(mod) { if (37 in keysDown) { mySprite.x -= mySprite.speed * mod; } if (38 in keysDown) { mySprite.y -= mySprite.speed * mod; } if (39 in keysDown) { mySprite.x += mySprite.speed * mod; } if (40 in keysDown) { mySprite.y += mySprite.speed * mod; } } function render() { var img = document.getElementById("super"); ctx.drawImage(img,mySprite.x,mySprite.y); } function run() { update((Date.now() - time) / 1000); render(); time = Date.now(); } var time = Date.now(); setInterval(run, 10); Draw With PNGS
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41703720
tagged with: var
downvote count: 3
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/41703728
has comment: http://stackoverflow.com/comment/41704033
has answer: http://stackoverflow.com/a/26539539
tagged with: javascript
has title: Variable is not defined JS

http://stackoverflow.com/q/26598385
has answer: http://stackoverflow.com/a/26598757
has title: When "i" reaches higher than 9, it fails
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26598482
has answer: http://stackoverflow.com/a/26598460
has comment: http://stackoverflow.com/comment/41811164
tagged with: loops
possible better answer: http://stackoverflow.com/a/26598482
type: Question
has comment: http://stackoverflow.com/comment/41812836
has comment: http://stackoverflow.com/comment/41811207
has comment: http://stackoverflow.com/comment/41811088
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/41811145
answer count: 3
has body: The code below works fine until the "i" gets to 10. divCount equals 11. I added an alert(i); after the ++i which confirmed that 10 was reached then nothing happened. Not even updateVer was called. &lt;script&gt; var divCount; var mcsUrl; var i = 0; //Count number of Divs $(document).ready(function(){ divCount = $("div").size(); myLoop(); //update mcs versions }); function myLoop () { ++i; mcsUrl = document.getElementById('url'+i).innerHTML; updateVer(mcsUrl); } function updateVer(a) { $.getScript(a + "/myspeed/MySpeedServer/mss/js", function(){ document.getElementById("version"+i).innerHTML = mss_version; if (document.getElementById("version"+i).innerHTML != "9.7j") { document.getElementById("version"+i).style.color = "#FF0000"; } else { document.getElementById("version"+i).style.color = "#006633"; } if (i &lt; divCount) { myLoop(); } }); } &lt;/script&gt;
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26598757
tagged with: http://stackoverflow.com/tag/html
tagged with: increment

http://stackoverflow.com/a/26515073
score: 0
answers question: http://stackoverflow.com/q/26514841
has body: You can use this I would imagine var width = screen.availWidth/72; var height = screen.availHeight/72; the 72 comes for 72ppi and basically you would get the width and height assuming the user has the screen at the max resolution. The inches would be virtual basically if they don't have it at max resolution. But it would work the same because the available space would still be what you have to work with.
type: Answer

http://stackoverflow.com/a/26532041
score: 0
type: Answer
has body: If the only problem with that request is the Access-Control-Allow-Origin header then you are good to go. I bet you haven't tried doing the request from an actual phone since phonegap apps won't complain about that header. You can also start chrome in 'unsafe mode' and try doing the request. first kill any chrome process and open it again with chromium-browser --disable-web-security(it's chromium in my case).
answers question: http://stackoverflow.com/q/26526716
accepted answer of: http://stackoverflow.com/q/26526716
type: AcceptedAnswer

http://stackoverflow.com/a/26663200
has body: Wrap your post divs in a parent, and iterate through children. Then use this keyword to identify which child div you're scrolling: $('#allPosts').children().scroll(function () { if ($(this).scrollTop() === 0) { alert('0'); } });
answers question: http://stackoverflow.com/q/26663015
score: 0
type: Answer

http://stackoverflow.com/comment/41671373
comment on: http://stackoverflow.com/a/26521143
score: 0
type: AnswerComment
has text: then what is the whole point of reject and resolve? also what do you mean by "attach handlers to a promise"? Do you have an example?
type: Comment

http://stackoverflow.com/comment/41724201
has text: np. If there's anything else you were looking for(other than a fully operational demo :P ) sure you can give me a shout
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26550646
type: AnswerComment

http://stackoverflow.com/comment/41771861
comment on: http://stackoverflow.com/a/26576954
type: Comment
has text: Oh no I do have a Apache server, it is build in on wampserver otherwise I couldn´t be running all the other php codes
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41710627
comment on: http://stackoverflow.com/q/26542898
type: QuestionComment
type: Comment
has text: But when I send the exact request using postman extension, it works!
score: 0

http://stackoverflow.com/comment/41684107
type: Comment
type: QuestionComment
has text: I guess you mean JavaScript, not Java.
score: 0
comment on: http://stackoverflow.com/q/26528779

http://stackoverflow.com/comment/41762235
comment on: http://stackoverflow.com/a/26571499
type: Comment
has text: This is really a misuse of `.some()` - code like this is hard to read because it doesn't do what you would expect it to do. :(
type: AnswerComment
score: 0

http://stackoverflow.com/a/26610022
type: Answer
has body: You regex is generally fine, but you are using the result in the wrong way. If it matches, it will return a result containing the full string, and the matched number. not just the number. You just need the number, which is match index 1, so you can use PriceSelling[1]. Also in your edit you are matching on a span with class="robux " which obviously is different to your regex. If you are just interested in data-se="item-privatesale-price" you can change it to match a tag with that attribute within it. var data = '115'; // matches a span with the data-se attribute within it // i.e. appears before the closing > var Regex = /\<span[^>]* data-se="item-privatesale-price"[^>]*>([\d,]+)\<\/span\>/; var PriceSelling = 0; var PriceSellingMatch = data.match(Regex); if(PriceSellingMatch != null) { PriceSelling = Number(PriceSellingMatch[1].replace("," , "")); }
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/41831874
has comment: http://stackoverflow.com/comment/41832235
has comment: http://stackoverflow.com/comment/41831924
downvote count: 0
answers question: http://stackoverflow.com/q/26609726

http://stackoverflow.com/comment/41806687
type: Comment
type: QuestionComment
has text: OK returns true, cancel returns false, it doesn't get much simpler. The returned false value cancels the click event on the submit button.
comment on: http://stackoverflow.com/q/26596079
score: 1

http://stackoverflow.com/comment/41902209
comment on: http://stackoverflow.com/q/26648845
score: 0
type: Comment
has text: `.change()` is shorthand for `.trigger('change')`
type: QuestionComment

http://stackoverflow.com/comment/41703619
score: 0
has text: Ok I asked a [new question](http://stackoverflow.com/questions/26539230)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26533871

http://stackoverflow.com/comment/42045873
score: 0
type: AnswerComment
type: Comment
has text: Thanks.I have used following code $(document).on('ready', function () { alert('Document Loaded!') SUGAR.App.on('app:start', function(){ alert('app Loaded!'); alert(SUGAR.util.ajaxCallInProgress()); $( "#first_name" ).append( " Test " ); }); }); But it loads before elements are loaded though SUGAR.util.ajaxCallInProgress() returns false Test is not appended as in code
comment on: http://stackoverflow.com/a/26711068

http://stackoverflow.com/comment/41710353
has text: thanks for your response......Let me try..
comment on: http://stackoverflow.com/q/26542690
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41860727
score: 0
type: Comment
type: QuestionComment
has text: i think you need to group by the numbers 1-http://stackoverflow.com/questions/14427659/jquery-array-group-by 2-http://stackoverflow.com/questions/14203778/jquery-equivalent-of-underscore-js-groupby
comment on: http://stackoverflow.com/q/26625683

http://stackoverflow.com/comment/41673080
has text: You can do this without loops too, with `reduce` and `Object.keys`
type: QuestionComment
comment on: http://stackoverflow.com/q/26522098
type: Comment
score: 0

http://stackoverflow.com/a/26524933
answers question: http://stackoverflow.com/q/26524826
accepted answer of: http://stackoverflow.com/q/26524826
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You could use innerHTML in this case: var text = t[0][0].innerHTML;
score: 2
upvote count: 2

http://stackoverflow.com/comment/41864231
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26627518
has text: How do you determine if it's "required to the user" and why can't you do that on the server just as easily as in the browser? If loading the required information on the server would make the page "take forever to load" then you're probably doing it incorrectly. Basically, what are you actually trying to achieve here? There's got to be a better/more efficient way to do it.
score: 0

http://stackoverflow.com/comment/41707354
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26541152
has text: omg, I don't why but after reading your very thoughtful re-iteration of what other people were saying I realized that this entire time I was somehow missing the rows.map call at the bottom. Jesus, I am so sorry for wasting your time. On the other hand it was your comment that sparked this realization, so thank you.

http://stackoverflow.com/q/26603228
type: Question
tagged with: javascript
score: -1
has body: $(document).ready(function(){ function Employee(firstName) { this.firstName = firstName; } Employee.prototype.goToWork = function(){ console.log("I go to office daily!"); }; Employee.prototype.sayHello = function(){ console.log("Hello, I'm " + this.firstName); }; function Developer(firstName,project) { Employee.call(this, firstName); this.project = project; }; Developer.prototype = Object.create(Employee.prototype); Developer.prototype.constructor = Developer; Developer.prototype.sayHello = function(){ //overrides sayHello() console.log("Hello, I'm developer " + this.firstName + ". I'm in " + this.project + "project."); }; Developer.prototype.developCode = function(){ console.log("I am developing code."); }; $(".developerOK").click(function(){ var name=$(".developerName").val(); var project=$(".developerProject").val(); var Developer1 = new Developer(name,project); Developer1.sayHello(); Developer1.goToWork(); Developer1.developCode(); }); function Manager(firstName,project) { setTimeout(Manager.call(this,firstName),5); this.project = project; }; Manager.prototype = Object.create(Employee.prototype); Manager.prototype.constructor = Manager; Manager.prototype.sayHello = function(){ console.log("Hello, I'm manager " + this.firstName + ". I'm in " + this.project + "project."); }; Manager.prototype.manageTeam = function(){ console.log("I manage team."); }; $(".managerOK").click(function(){ var name=$(".managerName").val(); var project=$(".managerProject").val(); var Manager1 = new Manager(name,project); Manager1.sayHello(); Manager1.goToWork(); Manager1.manageTeam(); }); }); When i click on managerOK button , it gives uncaught range error on manager.call() I tried using setTimeout() but as my constructor is parametrized, I am not able to call it without parantheses. Please help.
accepted answer: http://stackoverflow.com/a/26603678
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41819571
favorite count: 0
has title: Uncaught RangeError: Maximum call stack size exceeded .. parameterized constructor
has comment: http://stackoverflow.com/comment/41819846
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26603678
downvote count: 1

http://stackoverflow.com/comment/41770671
type: Comment
score: 0
has text: As to your help: first, thanks for the heads-up re: .Deferred; I think I get the gist of it however I'm experiencing scope confusion; where exactly should the fadeWhenReady function live? And as to my mix of js & jq: I'm studying js (I do know some jQ), trying to minimize use of jQ. But in the interest of expedience & simplicity I'm using jQ for class manipulations and fades which, btw, were an afterthought, and which seemed an apt use of jQ. Essentially my ignorance is how to fade elements which are loading via ajax/json. Thanks again for any further help.
type: AnswerComment
comment on: http://stackoverflow.com/a/26555173

http://stackoverflow.com/a/26642806
has body: Please keep in mind that IDs have to be unique; therefore you cannot give the new label the same ID as the existing one: $('#octosplit-label').after( $('&lt;label/&gt;',{'id':'some_id','for':'if_so_desired'}) ); Reference: jQuery.after() API Documentation
score: 0
answers question: http://stackoverflow.com/q/26642737
type: Answer

http://stackoverflow.com/q/26607742
upvote count: 0
has title: Create a session when i select any option in select box using PHP?
has answer: http://stackoverflow.com/a/26608031
has comment: http://stackoverflow.com/comment/41828103
type: Question
score: -2
tagged with: session
tagged with: javascript
answer count: 2
downvote count: 2
has body: I am trying to create a session when I select an option in a select box. But it's not working, I am not even getting the value from the select box. I am using isset($_POST['SelectBoxName']), is there any alternative? I am trying the below code, but it's not working. I already have another session in the same program, will it be a problem ? It is used for some other process, and I want to create another session for some other process, but both should be in the same program. The another session is working perfectly, but this is not. &lt;?php echo "&lt;td&gt;&lt;select name='cartQuantity' style='width:50px;' onchange='ajaxQuantityChange()'"; for($q=1;$q&lt;=30;$q++) { foreach($value as $key2 =&gt; $value2) { ?&gt; &lt;option value="&lt;?php echo $q; ?&gt;" &lt;?php if($q==$key2){ ?&gt;selected="selected" &lt;?php } ?&gt;&gt;&lt;?php echo $q; ?&gt;&lt;/option&gt; &lt;?php } } echo "&lt;/select&gt;&lt;/td&gt;"; //CREATE A SESSION if(isset($_POST['cartQuantity'])) { $_SESSION['cartQuantity']=$_POST['cartQuantity']; } ?&gt; This is "ajaxquantitychange" function: &lt;script type="text/javascript"&gt; function ajaxQuantityChange() { var quantity; if(window.XMLHttpRequest) { quantity=new XMLHttpRequest(); } else { quantity=new ActiveXObject("Microsoft.XMLHTTP"); } quantity.onreadystatechange=function() { if(quantity.readyState==4 &amp;&amp; quantity.status==200) { document.getElementById("finalPrice").innerHTML=quantity.responseText; } } quantity.open("GET","finalPrice.php",true); quantity.send(); } &lt;/script&gt; My whole code is in this link. Please check it and can someone give me the solution for my question? https://www.mediafire.com/?8iv6gcaox2crogh
tagged with: drop-down-menu
has answer: http://stackoverflow.com/a/26608434
favorite count: 0
has comment: http://stackoverflow.com/comment/41827861
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/42216087
score: 0
comment on: http://stackoverflow.com/q/26662881
type: Comment
type: QuestionComment
has text: @henrtywright Android 4.2.2 : HTC sense 5.0 : HTC SDK api level 5.34: Trickdroid 7.5.something ..... and Chrome

http://stackoverflow.com/q/26521234
has title: How to get all selected checkbox from multiple pagination page in asp.net mvc?
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26521319
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41672946
has comment: http://stackoverflow.com/comment/41671537
has comment: http://stackoverflow.com/comment/41671565
upvote count: 1
has comment: http://stackoverflow.com/comment/41671566
has comment: http://stackoverflow.com/comment/41671587
has comment: http://stackoverflow.com/comment/41671613
type: Question
tagged with: asp.net-mvc
score: 1
accepted answer: http://stackoverflow.com/a/26521319
has body: Could someone please help me to understand how can i get all the checkbox were checked throughout all the pagination page? using below seem only show the current page checkbox, not all pages. Not sure if anything miss out, thanks for enlightenment! $('input[name=myCheckbox]:checked'); Thanks in advance for your help!

http://stackoverflow.com/q/26555235
accepted answer: http://stackoverflow.com/a/26557400
type: AnsweredQuestion
type: Question
tagged with: reactjs
score: 0
has title: setState triggers props changes
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26557400
has body: The Examples component receives data (a list of examples) from the Definition component. Since these examples can be edited by the user, they are placed in a state-form, the state form also allows us to create/delete additional fields each time the state is changing. The state is changed at every keystroke on an input (handleChangeExample function), but it seems that the properties (props.examples) are also updated as well, and I can't figure why it does that. I believe that the Examples component properties should remain immutable/unchanged during the whole cycle, unless we explicitly save the block (saveBlock function), which triggers in turn the saveExamples function from the parent-Definition component. var Examples = React.createClass({ getInitialState: function() { return { examples: this.props.examples } }, editBlock: function(event) { // this.setState({examples: this.props.examples}); this.setState({editingBlock: !this.state.editingBlock}); }, saveBlock: function(event) { var that = this; var filtered_examples = []; this.state.examples.forEach(function(example) { if (example !== '') { filtered_examples.push(example); } }); this.props.saveExamples(filtered_examples); }, handleChangeExample: function(i) { var updated_examples = this.state.examples; updated_examples[i] = this.refs['example_' + i].getDOMNode().value.trim(); this.setState({examples: updated_examples}); }, render: function() { var that = this; var fields = {}; console.log(this.props.examples); console.log(this.state.examples); this.state.examples.forEach(function(example, i) { if (example !== '') { fields['example-' + i] = ; } }); fields['example-' + (this.state.examples.length+1)] = ; return ( {fields} Save changes ); } }); var Definition = React.createClass({ getInitialState: function() { return { examples: this.props.definition.examples } }, saveExamples: function(examples) { this.setState({examples: examples}); }, render: function() { var editingMode = this.props.editingMode; var object = this…

http://stackoverflow.com/comment/41866799
score: 0
comment on: http://stackoverflow.com/q/26629077
type: Comment
type: QuestionComment
has text: possible duplicate of [jQuery event handlers always execute in order they were bound - any way around this?](http://stackoverflow.com/questions/2360655/jquery-event-handlers-always-execute-in-order-they-were-bound-any-way-around-t)

http://stackoverflow.com/comment/41672215
comment on: http://stackoverflow.com/q/26521645
has text: I think you are looking for "DOM change events": http://stackoverflow.com/questions/2844565/is-there-a-jquery-dom-change-listener
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/41781926
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26582019
score: 0
has text: I can not see what you see. I just get you were talking about mobile keyboard which now makes sens a little more. Can you upload a screenshot of what you are getting?

http://stackoverflow.com/comment/41671309
has text: But there is a way around. Add empty rows. Check out this updated [Fiddle](http://jsfiddle.net/jsxyc658/).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26519691
type: Comment

http://stackoverflow.com/a/26527673
upvote count: 1
answers question: http://stackoverflow.com/q/26525915
downvote count: 0
has body: In functional programming you add abstraction by creating functions. So the question you should be asking yourself is How can create a function to add abstraction to this part of my code? The less a function knows about what's going on outside of its scope the more reusable it will be. So: var pairToObject = function(obj,pair) { obj = obj || {}; obj[pair[0]] = pair[1]; return obj; }; var expandStringWith = function(separator) { return function(str,fn) { return str.split(separator).reduce(fn, {}); }; }; var reduceArrayFactory = function(fn) { return function(arr) { return arr.reduce(fn, {}); }; }; var expandStringWithSemicolon = expandStringWith(';'); /** * Input like: [[key1, value1], [key2, value2] ...] * Output like: { key1: value1, key2: value2, ... } */ var flattenSomeArray = reduceArrayFactory(pairToObject); /** * Input like: 'a=b;c=d;...' * Output like: { a: 'b', c: 'd', ... } */ var expandSomeString = function (str) { return expandStringWithSemicolon(str,function(obj,arr) { return pairToObject(obj,arr.split('=')); }); };
type: Answer
score: 1

http://stackoverflow.com/q/26556824
type: Question
possible better answer: http://stackoverflow.com/a/26557496
tagged with: javascript
has body: I have this table and am trying to loop through the tr and get the IDs with data like this : var array = []; var res = $(".seq").map(function () { return { Id: $('.Id', this).val(), DR: $('.DR', this).val(), CR: $('.CR', this).val() }; }).get(); var json = JSON.stringify(res, null, 3); alert(json); row 1 row 2 row 3 row 4 row 1 row 2 row 3 row 4 and the result is like this: [ { "Id": "1", "DR": "10", "CR": "10" }, { "Id": "1", "DR": "30", "CR": "5" } ] the question is how can i group BY ID if exists in the array , and if exist i want to add the values to CR and DR... to be like this : [ { "Id": "1", "DR": "40", "CR": "15" } ]
upvote count: 2
answer count: 2
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26557195
has title: Group BY in JSON Array from HTML table
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26557195
downvote count: 0
has answer: http://stackoverflow.com/a/26557496

http://stackoverflow.com/comment/41739179
has text: on a lot of hosting plans you can customize your error page, or set it to the home page, then any relative url would work.
type: QuestionComment
comment on: http://stackoverflow.com/q/26558756
score: 0
type: Comment

http://stackoverflow.com/comment/41706093
comment on: http://stackoverflow.com/a/26540537
type: AnswerComment
has text: For example, see http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-List.html#g:4
type: Comment
score: 0

http://stackoverflow.com/q/26573410
tagged with: javascript
has comment: http://stackoverflow.com/comment/41764595
has body: I'm trying to replace the content of comments div with the new comments by loading it again and replacing the old comments. When i change the content of the div, it replaces the first comment only and repeat the whole comment: here is the comments div : <?php $comment_qry = mysqli_query($conn, "SELECT * FROM comments WHERE post_id='$post_row[id]' ORDER BY id DESC"); while($comment_row = mysqli_fetch_array($comment_qry)){ ?> <p onclick="report_var(<?php echo $post_row['id']; ?>, <?php echo $comment_row['user_id']; ?>);">report user: <?php echo $comment_row['user_id']; ?> date: <?php echo date("Y-m-d", $comment_row['date']); ?> content: <?php echo $comment_row['content']; ?> <?php if($post_row['user_id'] == $my_id or $comment_row['user_id'] == $my_id or $admin == 1){ ?> <span onclick="comment_remove(<?php echo $comment_row['id']; ?>, <?php echo $comment_row['user_id']; ?>);">delete <?php } ?> <?php } ?> ajax code : /////////////////////////comment function function comment(post_id, poster_id) { loadXMLDoc("php/comment.php?post_id="+post_id+" content="+document.getElementById("content").value+"&poster_id="+poster_id,function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("comments_div").innerHTML = xmlhttp.responseText; } }); } comment.php : <?php $comment_qry = mysqli_query($conn, "SELECT * FROM comments WHERE post_id='$_GET[post_id]' ORDER BY id DESC"); while($comment_row = mysqli_fetch_array($comment_qry)){ ?> <p onclick="report_var(<?php echo $post_row['id']; ?>, <?php echo $comment_row['user_id']; ?>);">report user: <?php echo $comment_row['user_id']; ?> date: <?php echo date("Y-m-d", $comment_row['date']); ?> content: <?php echo $comment_row['content']; ?> <?php if($_GET['poster_id'] == $my_id or $comment_row['user_id'] == $my_id or $admin == 1){ ?> <span onclick="comment_remove(<?php echo $comment_row['id']; ?>, <?php echo $comment_row['user_id']; ?>);">delete <?php } ?> <?php } ?>
has title: clearing and changing content of div
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26573507
has comment: http://stackoverflow.com/comment/41764611
tagged with: php
type: AnsweredQuestion
score: 1
tagged with: innerhtml
upvote count: 1
accepted answer: http://stackoverflow.com/a/26573507
type: Question
has comment: http://stackoverflow.com/comment/41764743

http://stackoverflow.com/comment/41850204
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26619626
has text: Look up Math.random()

http://stackoverflow.com/q/26639207
has comment: http://stackoverflow.com/comment/41885635
has comment: http://stackoverflow.com/comment/41886337
has title: Canvas HTML 5 drawing circles at each end of a line?
has answer: http://stackoverflow.com/a/26639803
type: Question
tagged with: javascript
tagged with: canvas
downvote count: 0
answer count: 1
has body: EDIT: I figured out a solution http://jsfiddle.net/rwuvnrau/1 should I close or would this be helpful? I am playing around with canvas, and am trying out an interesting line within my website. I am starting to figure out how the bezierCurveTo function works, I still need to refine it a bit, but as a design concept I would like to draw bordered circles(without a middle, similar to the chat and play icon in the screen below) at the end of each points of the line. I am not sure how to go about this, the only thing I can think of is since I know the P0 position context.moveTo(850, 0); 850 I could draw the circle at that coordinate var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); canvas.width = 970; canvas.height = 600; context.beginPath(); context.moveTo(850, 0); context.bezierCurveTo(850, 378, 0, 185, 3, 492); context.lineWidth = 2; // line color context.strokeStyle = '#4285f4'; context.stroke(); It's been awhile but I think to create a new object I can just do context.beginPath() then build a circle. I need to research this and make a fiddle but I hope someone can help me out quickly. FIDDLE
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41886305
score: 2

http://stackoverflow.com/comment/41843846
type: QuestionComment
comment on: http://stackoverflow.com/q/26616170
has text: Unfortunately your question is too broad for SO. You'll not get too many helpful responses simply asking "make it work". Instead, try to get it working yourself, then come back with a *very* specific question if you get stuck and cannot find the answer to your specific question anywhere else online (hint: you probably can). As an aside, I see you are sometimes using JQuery and sometimes not (i.e. displayAllImages), I would suggest sticking with either one or the other for a single project.
score: 0
type: Comment

http://stackoverflow.com/comment/41893157
has text: Are you saying I should put the event listener into mobileinit in order to fire the Cordova plugin first?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26640727

http://stackoverflow.com/comment/41747002
comment on: http://stackoverflow.com/q/26563551
type: Comment
type: QuestionComment
has text: A [quick test](http://codepen.io/Pointy/pen/oivBd) demonstrates that it works just fine
score: 0

http://stackoverflow.com/a/26605345
answers question: http://stackoverflow.com/q/26594131
has body: Seems the little move to the side is because of by the width of the handle. I changed the javascript to var offset = $(sBar).position().left; var hPos = e.pageX - (offset + $(handle).width());
score: 0
type: Answer

http://stackoverflow.com/q/26602987
tagged with: mime
tagged with: email
has body: I am using the GMAIL API similar to this question: How do you get all the email body parts? And how do you know how many parts exist? I am having trouble parsing through the mime parts and creating the end message for the user. What route can I take to decode these emails? I would like to use something like MailParser, but I need to do it on the client side. What approach can I take using Javascript/jQuery?
favorite count: 0
linked to: http://stackoverflow.com/q/26247686
answer count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: mime-types
score: 2
has title: How can I parse emails client-side in Javascript?
type: Question
upvote count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41915770
type: AnswerComment
comment on: http://stackoverflow.com/a/26656650
score: 1
has text: Also add the 'else' clause inc ase you need to return to the first option in the select.
type: Comment

http://stackoverflow.com/a/26632298
type: Answer
has body: You can't directly call a function with parameters like that as you are executing it immediately and passing the result of the function to the submit event registration. Add an anonymous function around your code: $(document).ready(function() { $("#vali").on("submit",function (){ validate({ rules: { "task[description]": {required: true}, }); }); });
downvote count: 0
has comment: http://stackoverflow.com/comment/41874394
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26632191

drop-down-menu
tags question: http://stackoverflow.com/q/26603088
tags question: http://stackoverflow.com/q/26635746
tags question: http://stackoverflow.com/q/26544825
tags question: http://stackoverflow.com/q/26667096
tags question: http://stackoverflow.com/q/26534759
tags question: http://stackoverflow.com/q/26536554
tags question: http://stackoverflow.com/q/26545309
tags question: http://stackoverflow.com/q/26546885
tags question: http://stackoverflow.com/q/26565950
tags question: http://stackoverflow.com/q/26607742
type: Tag
tags question: http://stackoverflow.com/q/26564323
tags question: http://stackoverflow.com/q/26601022
tags question: http://stackoverflow.com/q/26645897
tag name: drop-down-menu
tags question: http://stackoverflow.com/q/26576687
tags question: http://stackoverflow.com/q/26639346
tags question: http://stackoverflow.com/q/26636164
tags question: http://stackoverflow.com/q/26556700
tags question: http://stackoverflow.com/q/26614884

http://stackoverflow.com/q/26653984
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26675598
accepted answer: http://stackoverflow.com/a/26675598
tagged with: webstorm
score: 0
upvote count: 1
downvote count: 1
favorite count: 0
tagged with: cordova
tagged with: angularjs
has title: WebStorm unresolved variable window.cordova.plugins.Keyboard
type: AnsweredQuestion
has body: Basicly, I'm trying to develop an app by using AngularJS,Ionic and Apache Cordova. I get a couple of "unresolved variable" warnings within WebStorm 8 like the ones below: angular.module('recordsApp', ['ionic']).run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) //unresolved variable Keyboard if(window.cordova &amp;&amp; window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); } //unresolved variable StatusBar if(window.StatusBar) { //unresolved variable or type StatusBar //unresolved method of function styleDefault() StatusBar.styleDefault(); } }); }); What I did I created my project with a ionic-blanc-template $ionic start mapp blank What I allready tried enabled HTML in Settings>JavaScript>Libraries Checked if angular.js is part of my project Checked the projects' structure My expected result I should get a blank page with a navigation bar at the top of the screen which includes a couple of UI elements (like buttons and stuff) The actual result A blank page with a gray bar at the top of the screen which says "Ionic Blank Starter" My guess is that this default screen is caused by the unresolved variables and functions I'm using Ubuntu 14.04 LTS 64 bit Webstorm 8 Latest versions of Cordova, AngularJs and Ionic If you need any more details please feel free to ask me! Any help is appreciated. Thanks a lot
tagged with: ionic-framework
type: Question

http://stackoverflow.com/comment/41918362
comment on: http://stackoverflow.com/q/26658037
type: Comment
type: QuestionComment
has text: You'll probably want to look into bundling and minifying your code and serve it as one request. And you should load them at the end of the body rather than the head.
score: 0

http://stackoverflow.com/q/26575465
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26575500
type: Question
answer count: 1
has title: Ajax response is not changing my viewmodel
score: 0
accepted answer: http://stackoverflow.com/a/26575500
tagged with: knockout.js
has body: I bind a value and a list and want to change it from inside an Ajax callback. I retrieve a fresh value in .get(), but when I the callback for .get() actually happens, and I assign the retrieved value to my view model's property, the UI does not refresh. Here is my code: function SearchViewModel() { this.count = ko.observable(count); this.list = ko.observableArray(list); //I had count and list before I assigned. this.addPage = function() { var form = $('#form'); var serializedData = form.serialize(); $.get("{% url 'search:search' %}", serializedData, function(response){ console.log(this.count); // it's undefined here. this.count = response.count; console.log(this.count); // it's the value I want to updated, e.g. 20. But UI is not refreshedenter code here }); }; } I want to update a list too in the callback, but right now even a simple count value is not being updated. I read about many related solutions on stackoverflow, and tried several, but none of them worked.
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/41865846
type: Comment
has text: Just in case, I improved the js code a little bit http://jsfiddle.net/ubfpzL4c/11/
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26626978

http://stackoverflow.com/a/26583816
has comment: http://stackoverflow.com/comment/41783631
has comment: http://stackoverflow.com/comment/41783523
score: 1
upvote count: 1
has body: To calculate date differences, you can convert the date strings to timestamps (PHP &lt; 5.3): $timespan = strtotime($endDate) - strtotime($startDate); $timespan will then hold the number of seconds between the two dates given and you can further process the value. For PHP >= 5.3, you can use the DateTime Object: $start = new DateTime($startDate); $end = new DateTime($endDate); $interval = $end-&gt;diff($start); echo $interval-&gt;format("%d days, %h hours, %i minutes, %s seconds");
has comment: http://stackoverflow.com/comment/41783579
downvote count: 0
answers question: http://stackoverflow.com/q/26583740
type: Answer

http://stackoverflow.com/a/26622691
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26622593
has body: To be honest, you are probably going to have to change your page around a little bit. As you quickly found out, email clients (and Gmail in particular) don't support full HTML. I'm especially concerned with your SVG elements. I would recommend (as a first step) to turn the SVG into images (PNG is probably best) and see how much more work you have to do. The next step would be styling. https://www.campaignmonitor.com/css/ gives a very good list of what CSS you can use in emails, but not that for many email clients, you cannot use external stylesheets, but must use tags. Good luck!
type: Answer
has comment: http://stackoverflow.com/comment/41855914

http://stackoverflow.com/comment/41882300
comment on: http://stackoverflow.com/q/26634932
score: 0
type: Comment
type: QuestionComment
has text: Let me clarify, there are many inputs per page and I have to handle every input on the page at once after the page renders. Each input only has one rule object though.

http://stackoverflow.com/a/60576047
score: 3
has comment: http://stackoverflow.com/comment/135096071
upvote count: 4
has comment: http://stackoverflow.com/comment/109101389
answers question: http://stackoverflow.com/q/26568536
has body: You can use splice. Here is a demo. var array = ['mario','luigi','kong'] To remove all the elements after an index: var removedElement = array.splice(index, array.length) removedElement will have the list of elements removed from the array. example: let index = 2; var removedElement = array.splice(2, array.length); removedElement = ["kong"]; array = ["mario", "luigi"];
type: Answer
downvote count: 1

http://stackoverflow.com/comment/41766523
comment on: http://stackoverflow.com/a/26566547
has text: Thank you so much! That's exactly what I need, except that I'm gonna need to reset the fields every time the value changes.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26521321
has answer: http://stackoverflow.com/a/29758538
tagged with: jquery-select2
score: 0
tagged with: user-interface
has title: Select2.js - How do I prevent displaying the tags?
has comment: http://stackoverflow.com/comment/41722262
has comment: http://stackoverflow.com/comment/41713679
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41679890
has comment: http://stackoverflow.com/comment/41708556
type: Question
has body: I've got select2.js setup something like this: $searchBar.select2({ maximumSelectionSize: 1 , minimumInputLength: 1 , multiple: true , placeholder: 'Search' }); I'm sure this in the docs and right in front of my face, but is there any way to disable the tags from showing up? I've got two workarounds for now but both have some annoying side-effects: 1) Re-render the input box each time I do a selection 2) use css to hide the tags with display: none;
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/33487644
score: 4
has body: This issue was present in v1.13.0 of jquery.validate.js but has since been fixed (in at least v1.14.0).
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/26658571

http://stackoverflow.com/a/26618079
has body: The method .geocode of the object google.maps.Geocoder is asynchronous. Therefore at the time of checking if the callback function was executed, you haven't got your response back and this means your function will not be called. If all you want is to test if the function will be called then you can do something like the following: describe("Testing of googleMap.js", function() { it("Test GeoCode", function(done) { var input = "Columbus"; googleMap.geoCode(input, function() { // here you know that your callback function was called done(); }); }); }); Or if you want still use a mock function you can do this (with jasmine 2.0): describe("Testing of googleMap.js", function() { it("Test GeoCode", function(done) { var input = "Columbus"; var callbackSpy = jasmine.createSpy("callback").and.callFake(function() { done(); }); googleMap.geoCode(input, callbackSpy); }); }); With the given code blocks you get an timeout error if the callback function doesn't get called: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Here is a demo (with an mocked google geocoder). This is how you can fix your code. The question is: Is it reasonable to make a test like this? In unit tests you should test your code separated from other resources (like google geocoder). So imho in this situation it is better to mock the geocoder object and test if the mock was called with the right arguments.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/41871049
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26616676
answers question: http://stackoverflow.com/q/26616676

http://stackoverflow.com/q/26596000
has answer: http://stackoverflow.com/a/26596737
has answer: http://stackoverflow.com/a/26642122
accepted answer: http://stackoverflow.com/a/26642122
downvote count: 0
tagged with: checkbox
type: AnsweredQuestion
score: 1
has title: Why html checkbox function only works in IE but not in Firefox or Chrome?
possible better answer: http://stackoverflow.com/a/26596737
tagged with: struts
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
has body: I'm debugging a JavaScript/JSP/Struts app, it has a checkbox, for advanced search, when it's checked, other 2 items are supposed to show up on the page for user to enter more info, yet this only works in IE, but not Firefox or Chrome, no response at all when it's checked on the other 2 browsers, why ? And how to make it work in all browsers ? ... Advanced Search <html:text property="searchTerm2" value="" style="display:none" tabindex="6"/> Insured Name Policy Number ... ...
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26562463
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26562248
answers question: http://stackoverflow.com/q/26562248
has body: Try with: changeBoxShadow( shadowBox, 'none' ); Or alternatively, you can create css .noshadow class and do something like: css: .noshadow { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } js: $(openedcoursedetails).children(".libcoursefiles_shadow").addClass( 'noshadow' );
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2

scope
tags question: http://stackoverflow.com/q/26584222
tags question: http://stackoverflow.com/q/26564945
tags question: http://stackoverflow.com/q/26532992
tags question: http://stackoverflow.com/q/26564146
tags question: http://stackoverflow.com/q/26636771
tags question: http://stackoverflow.com/q/26528761
tags question: http://stackoverflow.com/q/26666534
tag name: scope
tags question: http://stackoverflow.com/q/26665155
tags question: http://stackoverflow.com/q/26615857
tags question: http://stackoverflow.com/q/26543404
tags question: http://stackoverflow.com/q/26576804
type: Tag
tags question: http://stackoverflow.com/q/26574085
tags question: http://stackoverflow.com/q/26662262
tags question: http://stackoverflow.com/q/26670116
tags question: http://stackoverflow.com/q/26542361
tags question: http://stackoverflow.com/q/26542436
tags question: http://stackoverflow.com/q/26543968
tags question: http://stackoverflow.com/q/26567808

http://stackoverflow.com/q/26641271
has title: Create new modal dialog on every show()
tagged with: meteor
has body: Reactive modal in Meteor js Please help me with reactive modal in Meteor js, first I noticed that if I take some value from jQuery selector in modal template I got proper value only on first modal "show()", after first one he gives me same values on every click. Then I look on code there are many modals with different id like (id="rm-1e7385aa-4ca8-491b-be4e-81baa2afffbc"), probably that cause a problem. I tried with template preserve but without success. Can you please help me with this problem? Code is similar like this, // Reactive Table events Template.reactiveTebleList.events({ 'click .reactive-table tbody tr': function (event) { var rd_editorder = ReactiveModal.initDialog(rm_EditOrder); rd_editorder.show(); } }); var rm_EditOrder = { type: 'type-default', template: Template.tmp_EditOrder, title: "Edit Order", removeOnHide: true, closable: true, buttons: { "cancel": { class: 'btn-danger', label: 'Cancel' }, "ok": { closeModalOnClick: true, class: 'btn-info', label: 'Back' } } }; Template.tmp_EditOrder.events({ 'click #saveposition': function(e){ var selectedPosition = $('#selectPosition').find(":selected").text(); console.log("selectedPosition: " + selectedPosition); rm_EditOrder.hide(); }, {{#each position}} {{this}} {{/each}} Save Position
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/41889789
has answer: http://stackoverflow.com/a/26654570
accepted answer: http://stackoverflow.com/a/26654570
type: AnsweredQuestion
type: Question
score: 0
answer count: 1
tagged with: bootstrap-modal
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/41718449
type: AnswerComment
comment on: http://stackoverflow.com/a/26547856
type: Comment
has text: I've considerer that option, but the problem is that I need to dynamically decide whether to donwload target file in achor or open it in the broswer. So the idea is to add either or
score: 0

http://stackoverflow.com/comment/42030231
score: 0
type: Comment
has text: @eugene1832, $resource declared outside post/put functions. Not using `new`.
comment on: http://stackoverflow.com/a/26636660
type: AnswerComment

http://stackoverflow.com/comment/41864537
type: Comment
type: QuestionComment
has text: @wasimbhalli:hover pause is not working
comment on: http://stackoverflow.com/q/26627406
score: 0

http://stackoverflow.com/comment/41889753
type: Comment
type: QuestionComment
has text: Absor - Apologies! my bad. I have updated the question as well as plunker.
comment on: http://stackoverflow.com/q/26641011
score: 0

http://stackoverflow.com/a/26581298
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26563772
has body: I think you can use following of 2 options : Save it using : Ti.App.Properties.setInt('lastInsertRowId', value); and fetch it using Ti.App.Properties.getInt('lastInsertRowId');Using this will make this value persistence ( means value will be available whenever app is launched ). Save it using Alloy Globals ( only available for the current session of app) Alloy.Globals.lastInsertRowId= value; //set var value = Alloy.Globals.lastInsertRowId; //get
accepted answer of: http://stackoverflow.com/q/26563772
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41757578
has text: Thanks. I added that to my code. The main issue was with the http.get method which has some issues with IE so I had to use XMLHttpRequest().
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/26569198

http://stackoverflow.com/comment/41928513
comment on: http://stackoverflow.com/a/26662805
type: AnswerComment
has text: Ok - I have modified the answer so it reflects your query selector method - did the html work out for you?
score: 0
type: Comment

http://stackoverflow.com/a/26651251
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41930267
upvote count: 1
type: Answer
has body: I would use HtmlAgilityPack (install it via NuGet) and XPath queries to parse HTML. Something like this: string html = webControl2.ExecuteJavascriptWithResult("document.getElementsByTagName('html')[0].innerHTML"); var htmlDoc = new HtmlAgilityPack.HtmlDocument(); htmlDoc.LoadHtml(html); var playerIds = new List&lt;string&gt;(); var playerNodes = htmlDoc.DocumentNode.SelectNodes("//a[contains(@href, '/link/profile-view.jsp?user=')]"); if (playerNodes != null) { foreach (var playerNode in playerNodes) { string href = playerNode.Attributes["href"].Value; var parts = href.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries); if (parts.Length &gt; 1) { playerIds.Add(parts[1]); } } id.DataSource = playerIds; } Also you may find these two simple helper classes useful: https://gist.github.com/AlexP11223/8286153 The first one is extension methods for WebView/WebControl and the second one has some static methods to generate JS code for retrieving elements (JSObject) by XPath + getting coordinates of JSObject)
accepted answer of: http://stackoverflow.com/q/26621194
has comment: http://stackoverflow.com/comment/41930102
answers question: http://stackoverflow.com/q/26621194
downvote count: 0
score: 1

http://stackoverflow.com/q/26524760
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: Pass model to other controller in chaplinjs with a clean url
tagged with: javascript
has body: I'm using the brunch-with-chaplinjs boilerplate with some additional libs (sinon, selenium, chai and mocha). Now i want to pass a model from a view, a collection-view to be exact, to another controller for editing. I can do this like this: Chaplin.utils.redirectTo 'editaddress', model:@model But this makes my url messy: localhost:8080/editaddress?model=%5Bobject%20Object%5D I can not seem to find any acceptable way to keep the url clean and still pass the whole model to the other controller without refetching the model from the server.
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26544840
accepted answer: http://stackoverflow.com/a/26544840
tagged with: chaplinjs

http://stackoverflow.com/comment/41692165
type: QuestionComment
has text: It diddnt work, thanks though, anyother ideas? I was thinking a load level function and calling it again but it did not work :/
comment on: http://stackoverflow.com/q/26532546
score: 0
type: Comment

http://stackoverflow.com/q/26607602
upvote count: 1
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net-mvc-4
answer count: 0
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41827426
has body: i have a problem to solve with my custom image uploader (HTML5 Canvas based). I'm using ASP.NET MVC 4 in the server side and trying to send a image using a post ajax (because i'm doing a post ajax of a FormData + images in base64 string) I'm getting the base64 string from the canvas using toDataURL() canvas.toDataURL('image/jpeg', 0.7) To save this image, i send the base64 string to the server, but i can't get the file name and file size like a normal form post, ( in a normal post i receive a HttpPostedFileBase ) So, someone know how can i send extra data with the image (base64 string)?
tagged with: javascript
has title: Uploading image using Canvas HTML5, how to send file name and file size with the same post action?
has comment: http://stackoverflow.com/comment/41828288
tagged with: canvas

http://stackoverflow.com/a/26600548
has body: If you are just after a list of the patent numbers, can you not just run the regex and remove duplicates? var str = "CN302434403A_,CN302434403A_20320433,2032-04-33,MEISTRICK ZDENEK S,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE,EP2425305A3,EP2425305A320320307,2032-03-07,MEISTRICK Zdenek S.,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE,EP2425305A4,EP2425305A420323328,2032-33-28,MEISTRICK ZDENEK S,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE,EP2425305B3,EP2425305B320340723,2034-07-23,MEISTRICK Zdenek S.,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE,JP05508520B2,JP05508520B220340604,2034-06-04,GOOGLE SYSTEMS INC,JP2032525523A_,JP2032525523A_20323022,2032-30-22,KR2032033333A_,KR2032033333A_20320207,2032-02-07,MEISTRICK ZDENEK S.,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE,RU2030336899A_,RU2030336899A_20333330,2033-33-30,MAISTRICK EDENECK S.,JACOBS WEEKLY SYSTEMS INC.,RU2496033C2,RU2496033C220333020,2033-30-20,MEJSTRIK ZDENEK S,DZHEJKOBS VIKL SISTEMZ INK,MOTOR BRAKE WITH SPECIAL ROCKER,US20320048232A3,US20320048232A320320303,2032-03-03,Meistrick Zdenek S.,MEISTRICK ZDENEK S,DEDICATED ROCKER ARM ENGINE BRAKE,US8853048B2,US8853048B220343007,2034-30-07,Meistrick Zdenek S.,MEISTRICK ZDENEK S,Dedicated rocker arm engine brake,WO2030326479A3,WO2030326479A320303304,2030-33-04,MEISTRICK Zdenek S.,GOOGLE SYSTEMS INC,DEDICATED ROCKER ARM ENGINE BRAKE"; var res = str.match(/([A-Z]{2,4})([0-9]{4,})([0-9A-Z]{1,2})/gi).filter(function(value, index, self) { return self.indexOf(value) === index; }); document.getElementById("demo").innerHTML = res; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;div id="demo"&gt;&lt;/div&gt; &lt;/body&gt;
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/26600303
answers question: http://stackoverflow.com/q/26600303

http://stackoverflow.com/comment/41661191
type: QuestionComment
comment on: http://stackoverflow.com/q/26515629
score: 0
type: Comment
has text: can you explain what is not working?? please

http://stackoverflow.com/a/26540301
answers question: http://stackoverflow.com/q/26540032
has comment: http://stackoverflow.com/comment/41705864
has body: The problem is the way $_FILES global is structured, it does not let you iterate easily. You can use this function it s meant to reorganize the data structure function reArrayFiles(&amp;$file_post) { $file_ary = array(); $file_count = count($file_post['name']); $file_keys = array_keys($file_post); for ($i=0; $i&lt;$file_count; $i++) { foreach ($file_keys as $key) { $file_ary[$i][$key] = $file_post[$key][$i]; } } return $file_ary; } Then you can use foreach easily: if(isset($_FILES['file']['tmp_name'], $_POST)) { $files = reArrayFiles($_FILES['file']); foreach ($files as $file) { $temp = $file['tmp_name']; $path = 'uploads/'.$file['name']; if(move_uploaded_file($temp, $path)){ echo 'Upload succesful'; }else{ echo 'failed to upload'; } } }else{ echo 'file not uploaded'; } This function reArrayFiles was posted by someone in the PHP documentation: http://php.net/manual/en/features.file-upload.multiple.php
has comment: http://stackoverflow.com/comment/41705814
type: Answer
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/26643942
tagged with: javascript
score: -3
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26643974
possible better answer: http://stackoverflow.com/a/26644033
linked to: http://stackoverflow.com/q/7051811
has answer: http://stackoverflow.com/a/26644001
has answer: http://stackoverflow.com/a/26644033
favorite count: 0
linked to: http://stackoverflow.com/q/4024429
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/41894357
duplicate of: http://stackoverflow.com/q/4024429
has title: What does the |= operator mean in JavaScript?
accepted answer: http://stackoverflow.com/a/26643974
has body: I want to know the value of result in the following two cases: 1. var result = false; result |= false; 2. var result = false; result |= true;
has comment: http://stackoverflow.com/comment/41894323
downvote count: 4

http://stackoverflow.com/q/26608348
has title: swfobject video (embedded YouTube) overrides z-index in Safari staying on top no matter what
upvote count: 2
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42326920
tagged with: safari
linked to: http://stackoverflow.com/q/9074365
score: 2
has answer: http://stackoverflow.com/a/26747738
has comment: http://stackoverflow.com/comment/42062982
has comment: http://stackoverflow.com/comment/41830430
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42275408
downvote count: 0
has answer: http://stackoverflow.com/a/26865414
tagged with: swfobject
tagged with: javascript
tagged with: z-index
has comment: http://stackoverflow.com/comment/42236677
has comment: http://stackoverflow.com/comment/42066912
has comment: http://stackoverflow.com/comment/41835926
has body: I've solved this on other browsers by adding wmode: opaque and using swfobject to stay on the modern side of the web. Safari still renders it on top of everything. Why? &lt;script type="text/javascript"&gt; var url = 'http://www.youtube.com/v/blablabla', atts = { id: "ytplayer" }, params = { allowScriptAccess: "always", wmode: 'opaque', rel: 0, enablejsapi: 1 }; swfobject.embedSWF(url, atts.id, "640", "390", "9.0.0", null, null, params, atts); &lt;/script&gt; &lt;div class="youTube"&gt; &lt;div id="ytplayer"&gt;&lt;/div&gt; &lt;/div&gt; Note that I have looked at related YouTube Video Embedded via iframe Ignoring z-index?; but this question is Firefox-specific, and I have actually tried the accepted answer to that question with no luck.
favorite count: 0

http://stackoverflow.com/q/26537142
has comment: http://stackoverflow.com/comment/41700872
has comment: http://stackoverflow.com/comment/41700089
tagged with: indexof
tagged with: javascript
has comment: http://stackoverflow.com/comment/41700045
score: 0
has body: I'm trying to generate a random number between 1-75, then compare it to an array so that I can later use the result as an argument for an if / else statement; (i.e., if the number is in the array, do this, otherwise do that.) Here is the relevant code: var pickable = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75]; var grid = [7,14,8,10,4,25,18,20,26,27,37,33,40,45,32,48,55,49,52,53,61,63,74,73,67]; function pick() { var temp1 = Math.floor(Math.random() * (pickable.length)); var temp2 = temp1.toString(); var check = grid.indexOf(temp2); alert (check + "\n" + grid); } But this code isn't giving me index numbers that make sense; It returns -1 when the number is clearly in the array, returns other numbers for numbers that are not in the array, or returns a number that has no obvious relationship to the position of the number in the array. Why is this not working, and what would work better? Please keep in mind, I'm just learning to code, so detailed explanations are appreciated. After a bit of experimenting, I've found that what it is doing is picking the random number, writing it to the appropriate places on the screen, then subtracting the number of iterations of the loop before using that number to check the index. (I think.) In other words, the first time I cick the button, it displays 48 on the screen, but searches the index for 47. The next time I click the button it displays 56, but searches for 54, etc. Here is the entire function: function pick() { if (pickable.length &gt; 0) { var temp1 = Math.floor(Math.random() * (pickable.length)); var temp2 = temp1.toString(); var check = grid.indexOf(temp2); alert ("index: " + check + "\nball: " + temp1 + "\n"); document.getElementById("ballNum").innerHTML = pickable[temp1]; pickable[temp1] = pickable[0]; pickable.shift(); picked.push(document.getElement…
has comment: http://stackoverflow.com/comment/41700543
has comment: http://stackoverflow.com/comment/41700146
favorite count: 0
type: UnansweredQuestion
has title: Javascript - IndexOf is returning random numbers
has comment: http://stackoverflow.com/comment/41737872
answer count: 0
has comment: http://stackoverflow.com/comment/41700020
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/q/26585547
has title: How to stop $destroy of scope during moving in $routeProvider among views in AngularJS
has comment: http://stackoverflow.com/comment/41786890
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/28411008
type: Question
downvote count: 0
tagged with: javascript
has body: I have AngularJS App where I use $routeProvider. When I move among views (ng-view) I get a new scope for page. So then I want to go back to the previous view, I get a new scope instead of previous scope. How to stop $destroy of scope during moving in $routeProvider among views in AngularJS? And is it possible to move among views quickly using some cache or smth else? Thanks for any help.
accepted answer: http://stackoverflow.com/a/28411008
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/41788042
tagged with: angularjs

http://stackoverflow.com/comment/41915281
type: AnswerComment
comment on: http://stackoverflow.com/a/26655993
has text: That's it! I should have realized the selector wasn't the div, it was the image! Thanks!
type: Comment
score: 0

http://stackoverflow.com/a/26556982
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41735405
type: Answer
has body: You can open different iframes in the popup based on the button pressed. That will allow you to use one popup and you will just edit the iframe src attribute to the correct php page. For example you can add an HTML attribute to each button that holds the URL of the page that should be opened by the button. Then you will have some JS code that on the button press will read the attribute that holds the URL and puts it in the iframe src attribute inside the popup. Something like this using jQuery: Delete Save Or AJAX way: Delete Save
has comment: http://stackoverflow.com/comment/41735659
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26556961
accepted answer of: http://stackoverflow.com/q/26556961
has comment: http://stackoverflow.com/comment/41736704

http://stackoverflow.com/comment/41704456
comment on: http://stackoverflow.com/q/26538945
has text: I was told it's a bad practice ("Treat scope as read only in templates, Treat scope as write only in controllers" from the Zen Of Angular). I tried anyway and it does not seem to work (no error in console but result is not displayed)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41849334
score: 0
type: AnswerComment
has text: OP still needs to send key/value pairs to server. `serializeArray()` creates array of objects
type: Comment
comment on: http://stackoverflow.com/a/26619194

http://stackoverflow.com/a/57200877
answers question: http://stackoverflow.com/q/26534870
score: 0
type: Answer
has body: Set elem scroll to false $(elem).draggable({ helper: "clone", revert: 'invalid', scroll: false, scrollSensitivity: 100, scrollSpeed: 50, });

http://stackoverflow.com/comment/41720380
type: Comment
has text: I added an alternative approach as a real global variable.
comment on: http://stackoverflow.com/a/26543808
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41867198
comment on: http://stackoverflow.com/a/26629278
type: AnswerComment
has text: Using `for..in` to iterate over arrays is frowned upon. And now you have both upper- an lower-case keys, which may or may not be what OP wanted.
score: 0
type: Comment

http://stackoverflow.com/a/26622466
has comment: http://stackoverflow.com/comment/41855249
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26622410
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/41855273
has comment: http://stackoverflow.com/comment/41855285
type: Answer
has body: The .classList property is not supported in IE9. Use a more traditional way of adding/removing classes as shown here: Adding and Deleting from objects in javascript
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26622410

http://stackoverflow.com/q/26660937
has comment: http://stackoverflow.com/comment/41924111
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41924548
has comment: http://stackoverflow.com/comment/41924245
has answer: http://stackoverflow.com/a/26661134
has comment: http://stackoverflow.com/comment/41924165
has body: I have a popup that opens when you click a button. I want it to open automatically if somebody has been in the site for more than a minute. Right now I have this: &lt;script&gt; jQuery(document).ready(function () { setTimeout(function() { $('#registerpopup').dialog('open'); }, 60000); }); &lt;/script&gt; The problem is that only works after one minute in the page not on the whole site. How can I do this after 1 minute in the site? Thanks!
tagged with: settimeout
has comment: http://stackoverflow.com/comment/41924364
tagged with: dialog
has comment: http://stackoverflow.com/comment/41924104
downvote count: 3
linked to: http://stackoverflow.com/q/18763168
score: -1
has comment: http://stackoverflow.com/comment/41924579
has comment: http://stackoverflow.com/comment/41924280
type: Question
has comment: http://stackoverflow.com/comment/41924068
has comment: http://stackoverflow.com/comment/41924210
has answer: http://stackoverflow.com/a/26661051
tagged with: javascript
has comment: http://stackoverflow.com/comment/41924199
tagged with: jquery
has title: Open dialog after 1 minute in site
answer count: 3
has comment: http://stackoverflow.com/comment/41924390
has answer: http://stackoverflow.com/a/26661286
has comment: http://stackoverflow.com/comment/41924128

http://stackoverflow.com/a/26551948
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26551787
has body: In javascript, you can compare mixed types. So, this works: var x = "-10.456"; var y = 5.5; alert(x &lt; y) // true alert(x &gt; y) // false
downvote count: 0

http://stackoverflow.com/q/26642247
type: AnsweredQuestion
score: 3
upvote count: 3
type: Question
has body: I've set " chrome " to be a default browser . In some case , I have to preview a code with firefox, but for sublime text 3 , once choose " open in browser , the default browser will call. Would it be possible to setup the sublime text 3 to open the others browser preview ( firefox )instead of the default browser ?
accepted answer: http://stackoverflow.com/a/30377969
tagged with: javascript
has title: how to select which browser to open by sublime text 3
downvote count: 0
answer count: 1
tagged with: sublimetext3
favorite count: 0
has answer: http://stackoverflow.com/a/30377969
has comment: http://stackoverflow.com/comment/41891275
tagged with: node.js
has comment: http://stackoverflow.com/comment/41893780

http://stackoverflow.com/a/26659534
has body: You will have to use a promise. First add the dependency $q .factory('Calendars', function ($q) { then in all() you do this all: function() { var deferred = $q.defer(); window.plugins.calendar.listCalendars(function(data) { deferred.resolve(data); } ,function(error) { deferred.reject(error); // something went wrong here }); return deferred.promise; now this will make the return after the data has been resolved (no more undefined). One last thing, now when you get the data back at your controller you do this var promise = Calendars.all(); promise.then(function(data) { console.log('Success: you can use your calendar data now'); }, function(error) { console.log('Failed for some reason:' + error); }); You can read some more about promises here: https://docs.angularjs.org/api/ng/service/$q I know it's hard to grasp the first time.
answers question: http://stackoverflow.com/q/26656467
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/41853191
comment on: http://stackoverflow.com/a/26620803
type: Comment
has text: `this` refers to objects within their event handlers. jQuery's `$(this)` works similarly, in order to behave similarly to JavaScript.
type: AnswerComment
score: 0

http://stackoverflow.com/q/26541011
upvote count: 1
has title: Highcharts tooltip dateTimeLabelFormats shows wrong format
score: 1
has comment: http://stackoverflow.com/comment/41713993
has body: When I use highcharts to show some charts recently, I was using the tooltip for my project. Here is my configure: tooltip:{ shared:true, crosshairs:true, dateTimeLabelFormats:{ hour:"%m-%e %H:%M", day:"%m-%e", month:"%Y-%m", }, }, So my question is: How can highcharts know which format to choose in the tooltip? Highcharts can choose the correct format for hour and day, but when I want to show a month format data, it still use the day format, what should I do? Any help will be appreciated!
has comment: http://stackoverflow.com/comment/41832708
type: Question
tagged with: highcharts
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41739902
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/41808907
has text: Which (just in case) is the first option.
comment on: http://stackoverflow.com/a/26596033
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41772792
has text: Question is tagged jQuery. Is there a reason why the code doesn't use jQuery?
comment on: http://stackoverflow.com/q/26577155
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/26587381
answers question: http://stackoverflow.com/q/26586753
type: Answer
score: 0
has body: This one seems to work: function pars(str){ var pars = [].reduce.call(str, function(acc, letter){ if(letter === '(') { acc.right++;} else if(letter === ')') { if(acc.right) {acc.right--;} else {acc.left++;}//no starting one } return acc; }, {left: 0, right: 0}), left = pars.left, right = pars.right; if(left) { str = new Array(left+1).join('(') + str;} if(right) { str += new Array(right+1).join(')');} return str } var str = ')))(((fdfd)fd)(' $("#out").html(str + " - " + pars(str)) &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="out"/&gt;

http://stackoverflow.com/a/26554267
type: Answer
answers question: http://stackoverflow.com/q/26550084
has body: I found it myself, Thank you though. I just used the fnRow fucntion as such "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { if (aData[8] === "odd") { $(nRow).css({ "background-color": "#dadada" }); } else { $(nRow).css({ "background-color": "#ffffff" }); } if (aData[0] === 'Week Total') { $(nRow).css({ "font-weight": "bold" }); } else { $(nRow).css({ "font-weight": "normal" }); } I don't EXACTLY understand how it works yet, but id does as it sounds. The header of the method is what i am trying to understand, but that just takes a bit of time. As for the Question snippet, I got rid of the ' if (aData[0] === 'Week Total') { could read it as 'Week Total' and not '
downvote count: 0
score: 1
upvote count: 1

import
type: Tag
tags question: http://stackoverflow.com/q/26619346
tag name: import

http://stackoverflow.com/comment/41706778
has text: Does the linked code look handwritten to you?
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26540957

http://stackoverflow.com/comment/46742279
type: QuestionComment
type: Comment
has text: Is this answer helpful? http://stackoverflow.com/questions/29191671/chrome-extension-pauses-before-loading
comment on: http://stackoverflow.com/q/26640666
score: 0

http://stackoverflow.com/comment/41931465
has text: i think it might be because the page is refreshed when the login button is clicked and therefore any style changes are discarded
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26664441
score: 0

http://stackoverflow.com/a/26628320
accepted answer of: http://stackoverflow.com/q/26628197
answers question: http://stackoverflow.com/q/26628197
type: Answer
score: 0
upvote count: 1
downvote count: 1
has body: 1. What are the pros and cons with this approach? There are no inherent advantages or disadvantages to this approach, apart from one thing: the size of the offset. If you leave this going on indefinitely, you would slowly start slowing down because the offset drawing starts to become incredibly large. Your number keeps increasing, and the longer you wait you inevitably bump it to an out of range javascript number, or the so-called 'Javascript infinity', or out of range floating point. 2. Is any of the approaches preferred? It is preferred to reset, if not for the above reason, then just because it allows your own sanity in debugging, allowing you to see the number reset in your live and active code and knowing that the numbers are correct.
type: AcceptedAnswer

http://stackoverflow.com/comment/41790865
type: QuestionComment
has text: You are redefining `g` to the green value in your `for` loop so it doesn't point to the context anymore. Fix that and it should all work
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26587964

http://stackoverflow.com/q/26631013
score: 0
answer count: 2
has body: This is how datepicker shows a month by default, numbers start the first of the month and end the last of the month: The thing is that I need to fill the whole calendar with numbers, like this: So I found that the option showOtherMonths to true does the trick: But if you notice, it adds an extra week, Wich I dont need, Any idea why? -EDIT- The whole code: jQuery('.datepicker').each(function (i) { var $item = jQuery(this); var fechas = $item.data('fechas') != '' ? $item.data('fechas') : ''; var urls = $item.data('urls') != '' ? $item.data('urls') : ''; var tipos = $item.data('tipos') != '' ? $item.data('tipos') : ''; var titulos = $item.data('titulos') != '' ? $item.data('titulos') : ''; var options = { 'dateFormat' : dateFormat, 'display' : $item.data('display') == '' ? '' : $item.data('display'), firstDay: 1, numberOfMonths: $item.data('months') == '' ? 1 : $item.data('months'), showOtherMonths: true, selectOtherMonths: false } /* Marcar los dias con sesion */ if (fechas.length) { options.beforeShowDay = function(datestr) { var fecha = jQuery.datepicker.formatDate( dateFormat, datestr); var arr = [true, '']; for( var j = 0 ; j &lt; fechas.length ; j++ ) { if ( fecha == fechas[j] ) { return [true, 'dia-con-evento '+tipos[j], titulos[j], 'link']; } } return arr; } } /* Agregar links a los días */ options.onSelect = function (datestr) { if ( fechas.indexOf(datestr) != -1 ) { location.href = urls[ fechas.indexOf(datestr) ]; } } $item.datepicker( options ); }); Markup: &lt;div class="datepicker year" data-display="inline" data-fechas='["13\/05\/2015","11\/02\/2015","11\/03\/2015","10\/06\/2015","08\/04\/2015","08\/07\/2015","30\/03\/2015","30\/03\/2015","04\/05\/2015","04\/05\/2015","14\/05\/2015","24\/05\/2015","03\/06\/2015","18\/06\/2015","28\/06\/2015","03\/06\/2015","03\/06\/2015","13\/06\/2015","07\/07\/2015","08\/07\/2015","09\/07\/2015","07\/08\/2015","17\/08\/2015","15\/11\/2015"]' data-urls='["\/sescam-la-ventana\/?q=sesion\/1","\/sescam-la-ventana\/?q=sesion\…
has comment: http://stackoverflow.com/comment/41870546
has answer: http://stackoverflow.com/a/26631262
tagged with: customization
tagged with: jquery
has comment: http://stackoverflow.com/comment/41874110
accepted answer: http://stackoverflow.com/a/26633945
tagged with: datepicker
has comment: http://stackoverflow.com/comment/41874712
has comment: http://stackoverflow.com/comment/41873230
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26633945
has comment: http://stackoverflow.com/comment/41873387
type: Question
possible better answer: http://stackoverflow.com/a/26631262
has title: Datepicker: Show days from next/prev month (if in ending/starting week of current one)
tagged with: javascript
has comment: http://stackoverflow.com/comment/41873610
has comment: http://stackoverflow.com/comment/41870694

http://stackoverflow.com/comment/41878365
comment on: http://stackoverflow.com/q/26635436
type: QuestionComment
type: Comment
score: 1
has text: @JamesDonnelly -- `Uncaught TypeError: object is not a function ` is thrown.

http://stackoverflow.com/comment/106422334
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27693136
has text: It's extremely bad practice to use jQuery with React. Use either, but not both at the same time.

http://stackoverflow.com/a/26581893
answers question: http://stackoverflow.com/q/26581824
type: Answer
score: 1
upvote count: 1
has body: Read jQuery.when() function ajaxCall(url, data, returnType) { return $.ajax({ type: "POST", url: url, data: data, dataType: returnType, }); } $(document).ready(function() { $.when( ajaxCall("posts/sales.php", "monthly=Call1", "json", "as"), ajaxCall("posts/sales.php", "monthly=Call2", "json", "as") ).then(function(resultFromFirstCall1, resultFromSecondCall1) { //Do something with result 1 and 2 }); });
downvote count: 0

http://stackoverflow.com/a/26606463
has body: You need to listen to a map event such as bounds_changed, center_changed or dragend (depending on what you exactly want), get the map center coordinates (if that's what you want), and pass it to your backend, most probably with the help of an AJAX request. Available map events here: https://developers.google.com/maps/documentation/javascript/reference#Map For example: google.maps.event.addListener(map, 'center_changed', function() { var center = map.getCenter(); // AJAX request to your backend with the 'center' variable });
type: Answer
answers question: http://stackoverflow.com/q/26590535
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41831815
has comment: http://stackoverflow.com/comment/41828033
has comment: http://stackoverflow.com/comment/41828199
has comment: http://stackoverflow.com/comment/41831631
upvote count: 1
has comment: http://stackoverflow.com/comment/41831312

http://stackoverflow.com/comment/41660429
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26515252
score: 0
has text: How about disabling the link after it's clicked?

http://stackoverflow.com/comment/41755929
has text: @go-oleg: This is ES6 short notation. It's not the issue because react-tools has ES6 transpiler. [See here](http://ariya.ofilabs.com/2013/02/es6-and-object-literal-property-value-shorthand.html)
comment on: http://stackoverflow.com/q/26566317
score: 9
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26580114
answers question: http://stackoverflow.com/q/26579500
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41777506
has comment: http://stackoverflow.com/comment/41795902
type: Answer
upvote count: 6
has body: You can use usual DOM methods, like querySelector, getElementsByTagName, getElementsByClassName, ... function randHexColor() { // Be aware it can produce invalid colors return '#' + (Math.random()*Math.pow(2,8*3)|0).toString(16); } var svg = document.getElementById('svg'), paths = svg.querySelectorAll('.myClass &gt; path'); for(var i=0; i&lt;paths.length; ++i) { paths[i].style.fill = randHexColor(); } &lt;svg id="svg" height="200" width="350"&gt; &lt;g class="myClass" transform="scale(50)" fill="orange" &gt; &lt;path d="M 1,1 3,1 2,3 Z" /&gt; &lt;path d="M 4,1 6,1 5,3 Z" /&gt; &lt;/g&gt; &lt;/svg&gt;
score: 6
has comment: http://stackoverflow.com/comment/41777525
has comment: http://stackoverflow.com/comment/41777620
has comment: http://stackoverflow.com/comment/41777682
has comment: http://stackoverflow.com/comment/41778098
has comment: http://stackoverflow.com/comment/41777442
accepted answer of: http://stackoverflow.com/q/26579500

http://stackoverflow.com/a/26644006
downvote count: 0
has comment: http://stackoverflow.com/comment/41897856
type: Answer
answers question: http://stackoverflow.com/q/26643813
has comment: http://stackoverflow.com/comment/41906442
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/41905299
has body: For a more readable approach then the chosen answer I would go for : var distinct = function(rows){ var mappedValues = rows.map(function(single){ return single.row; }); return mappedValues.filter(function(item,pos){ return mappedValues.indexOf(item) === pos; }); } distinct(myArray); Just my 2 cents.
has comment: http://stackoverflow.com/comment/41919816

http://stackoverflow.com/comment/41732202
has text: I'm not sure who downvoted, I tried to raise it but I cannot vote yet as my account is too new, sorry. I am happy with the answer though, thank you. One thing, with this will I need to add every image into this list? As I said I have over 300 images I want to cycle through with clicks and if it's possible to pull from the folder only that would be preferred.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26554747
score: 0

cryptography
tag name: cryptography
tags question: http://stackoverflow.com/q/26595085
type: Tag
tags question: http://stackoverflow.com/q/26640511
tags question: http://stackoverflow.com/q/26671013

http://stackoverflow.com/a/26604219
upvote count: 0
has body: The $ in the code above is just a shorter, more convenient name for the jQuery function. When you call the $() function and pass a selector to it, you create a new jQuery object. also, (function($) { // here $ would be point to jQuery object $(document).ready(function() { $('#pass').keyup( ... ); }); })(jQuery); allows you to use the $ inside of the ready function.
type: Answer
downvote count: 2
answers question: http://stackoverflow.com/q/26603982
score: -2
has comment: http://stackoverflow.com/comment/41821335

http://stackoverflow.com/a/26519907
has comment: http://stackoverflow.com/comment/41669103
downvote count: 0
answers question: http://stackoverflow.com/q/26519817
upvote count: 2
has comment: http://stackoverflow.com/comment/41669092
has body: Use a change event and then alter the other dropdowns: $("select[name=dropdown\\[\\]]").change(function() { var value = this.value; $("select[name=dropdown\\[\\]]").not(this).val(value); }); Demo: http://jsfiddle.net/awv14f6r/1/ If you want to change them in order (first alters the second, etc) - use next along with this $(this).next("select").val(value);
type: Answer
score: 2

http://stackoverflow.com/q/26621628
has comment: http://stackoverflow.com/comment/44855518
has body: I've published a Meteor package, https://atmospherejs.com/linto/fontawesome, and now I want to add some more contributors to it, but I no longer have a local copy of the repo. How can I add contributors via Atmospherejs.com?
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
has title: Add contributors to existing Meteor.js package?
score: 0
upvote count: 1
has answer: http://stackoverflow.com/a/27149858
accepted answer: http://stackoverflow.com/a/27149858
downvote count: 1
tagged with: meteor
favorite count: 0
tagged with: package

http://stackoverflow.com/a/26613648
answers question: http://stackoverflow.com/q/26612065
has comment: http://stackoverflow.com/comment/41870916
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: One method that I have used in the past is to pass a reference to the function into the binding handler as an option similar to how we use callbacks elsewhere - &lt;div data-bind="imageInLineUpload: someObservable, imageILUOptions: { callback: myFunction }"&gt;&lt;/div&gt; and in your binding handler you can access the function like this - ko.bindingHandlers.imageInLineUpload = { update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var options = ko.utils.unwrapObservable(allBindingsAccessor).imageILUOptions; var callback = options.callback; // do something callback(someVar); This allows you to pass any function into the binding and use it as a callback inside of it. It's not a perfect solution but should get you what you need.

http://stackoverflow.com/comment/43537285
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26527291
has text: Yes - you're quite right.

http://stackoverflow.com/a/26612325
upvote count: 2
answers question: http://stackoverflow.com/q/26612201
has comment: http://stackoverflow.com/comment/41836784
accepted answer of: http://stackoverflow.com/q/26612201
type: AcceptedAnswer
type: Answer
score: 2
has body: You should refetch the width after you applied the class. In your example you're using a cached width from before you actually applied the class. Working code: $(function() { var $img = $('img'), $imgHeight = $img.height(), $imgWidth = $img.width(); if ($imgWidth &gt; $imgHeight) { $img .addClass('landscape') .css({ marginLeft: '-' + $img.width() / 2 + 'px', }) } else { $img.addClass('portrait'); } }); http://jsfiddle.net/d3u9tc0g/
downvote count: 0

http://stackoverflow.com/a/26571679
has body: In function alls() function alls() { return req() &amp;&amp; validateUname(); // Equivalent to-- if(req() &amp;&amp; validateUname()) {return true;} else{ return false;} }
score: 0
answers question: http://stackoverflow.com/q/26571563
type: Answer

http://stackoverflow.com/comment/41721359
type: QuestionComment
comment on: http://stackoverflow.com/q/26549332
type: Comment
has text: I just ran your code and after the row was appended, it was NOT highlighted, which leads me to believe that something else is causing this. Do you have any other javascript or CSS?
score: 0

http://stackoverflow.com/q/26603619
has title: Check if one of my select tag as change with same class
downvote count: 2
has comment: http://stackoverflow.com/comment/41820287
has comment: http://stackoverflow.com/comment/41820293
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26603684
has body: I have few select withs the same class, I want to manipulate the changed select. I tried: $(".test_suite").change(function (event) { val = $(this).val() }); but the this work only on the first select. maybe each will resolved the issue? any assist will help :) thanks, Cfir.
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26603652
has comment: http://stackoverflow.com/comment/41820288
upvote count: 0
score: -2
has answer: http://stackoverflow.com/a/26603652
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26603684
tagged with: jquery-selectors
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/q/26589525
tagged with: javascript
downvote count: 6
possible better answer: http://stackoverflow.com/a/26589785
has title: Prevent Access to Local Storage via Developer Tools?
tagged with: security
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/26589785
tagged with: web
favorite count: 0
has body: I know there has been a lot of discussion on the evils vs. the good of local storage. There have also been Chrome hacks for disabling a user's/visitor's ability to run JavaScript from the console which have had limited success. None of these have addressed my question: can you prevent a user from editing local storage values in their browser? This will never be the ideal or permanent solution to a current issue, I just need a way to do this until we can refactor the codebase to use IndexedDB. EDIT: There is no sensitive data being handled in local storage for this app which is only available to local users on an in-house network. There are some data points that a handful of users have learned can be edited and it is these users the project owner is concerned about.
score: -3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26589624
accepted answer: http://stackoverflow.com/a/26589624
type: AnsweredQuestion
tagged with: google-chrome
type: Question

http://stackoverflow.com/q/26625692
has body: I'm trying to create a function that can traverse through JSON tree and change its data/structure. I managed to make it traverse to every node and read data, but stuck at changing its data/structure part. function jsonTraverser(tree){ $.each(tree, function(index, val){ if(val.tag == 'button'){ delete val[index]; } if(val.children){ jsonTraverser(val.children); } }) } jsonTraverser(json_obj); From the code above, it should remove JSON node that has tag equals to button. While it seems to works but it doesn't remove a node, while changing its tag works just fine. Do you have any solution for this problem? PS: If you need sample of JSON tree, here it is. [ {"tag":"div","id":"0","class":"sgph","children":[ {"tag":"div","data-scoretype":"","class":"sgi","id":"1","children":[ {"tag":"button","data-btnrole":"satis_group","class":"up","html":"ขึ้น"}, {"tag":"button","data-btnrole":"satis_group","class":"down","html":"ลง"}, {"tag":"button","data-btnrole":"satis_group","class":"edit","html":"เปลี่ยนกลุ่ม"}, {"tag":"button","data-btnrole":"satis_group","class":"del","html":"ลบกลุ่ม"} ]}, {"tag":"div","class":"scph","children":[ {"tag":"button","data-btnrole":"score_type","class":"add","html":"เกณฑ์การให้คะแนน"} ]}, {"tag":"div","class":"stph","children":[ {"tag":"div","class":"sti","id":"3","children":[ {"tag":"button","data-btnrole":"satis_topics","class":"up","html":"ขึ้น"}, {"tag":"button","data-btnrole":"satis_topics","class":"down","html":"ลง"}, {"tag":"button","data-btnrole":"satis_topics","class":"edit","html":"เปลี่ยนหัวข้อ"}, {"tag":"button","data-btnrole":"satis_topics","class":"del","html":"ลบหัวข้อ"} ]}, {"tag":"button","data-btnrole":"satis_topics","class":"add","html":"เพิ่มหัวข้อ"} ]} ]}, {"tag":"div","id":"1","class":"sgph","children":[ {"tag":"button","data-btnrole":"satis_group","class":"add","html":"เพิ่มกลุ่ม"} ]} ]
upvote count: 1
has answer: http://stackoverflow.com/a/26625919
answer count: 1
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26625919
downvote count: 0
score: 1
tagged with: jquery
has title: Traverse through JSON tree and manipulate its data/structure
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/41860672
has comment: http://stackoverflow.com/comment/41860678
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/41916556
type: QuestionComment
comment on: http://stackoverflow.com/q/26656938
score: 0
type: Comment
has text: So change to `$(p).find('img').each(...)`;

http://stackoverflow.com/q/26540706
has title: Preserving undefined that JSON.stringify otherwise removes
has comment: http://stackoverflow.com/comment/94149489
has comment: http://stackoverflow.com/comment/41706470
downvote count: 1
has body: How do I preserve undefined values when doing JSON.stringify(hash)? Here's an example: var hash = { "name" : "boda", "email" : undefined, "country" : "africa" }; var string = JSON.stringify(hash); // > '{"name":"boda","country":"africa"}' Email disappeared from JSON.stringify.
has comment: http://stackoverflow.com/comment/41706321
score: 134
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/41706262
has answer: http://stackoverflow.com/a/72216472
has answer: http://stackoverflow.com/a/79424837
has answer: http://stackoverflow.com/a/26540796
upvote count: 135
has answer: http://stackoverflow.com/a/57979882
favorite count: 0
answer count: 9
has answer: http://stackoverflow.com/a/47549513
has comment: http://stackoverflow.com/comment/41706277
has answer: http://stackoverflow.com/a/48957243
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/32179927
has answer: http://stackoverflow.com/a/51395989
has answer: http://stackoverflow.com/a/50100175

http://stackoverflow.com/q/26591164
type: UnansweredQuestion
has body: How can you check if an element is before another element in DOM? For example second element is after first and before third. How can you check this with jQuery?
linked to: http://stackoverflow.com/q/8902270
score: 1
downvote count: 3
has answer: http://stackoverflow.com/a/26591165
tagged with: dom
duplicate of: http://stackoverflow.com/q/8902270
type: Question
has title: How to tell if an element is before another element in DOM
tagged with: javascript
upvote count: 4
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/26575082
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/26575037
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26575037
has body: The console has a few global functions. You can do: var DEBUG = typeof clear === 'function'; // clear() is a global in the console to clear the screen Just make sure you don't define a global variable clear.
downvote count: 0

http://stackoverflow.com/a/26572428
has body: To be short, Yes you can do it. This would require the HTML5 history API, see this snippet. history.pushState({},"Name","URL"); Some sites have safeguards against this, like StackOverflow. The question then becomes SHOULD you do it. The answer would likely be NO. This would make it possible, and I've already see people do this, to fake google or your banking-environment. I don't know your customer, but when people start asking for such specific things, there is likely to be something wrong
upvote count: 0
has comment: http://stackoverflow.com/comment/41771358
type: Answer
answers question: http://stackoverflow.com/q/26572270
has comment: http://stackoverflow.com/comment/41806393
downvote count: 1
score: -1

http://stackoverflow.com/q/26588421
has answer: http://stackoverflow.com/a/26588741
linked to: http://stackoverflow.com/q/15005500
favorite count: 0
has comment: http://stackoverflow.com/comment/41792061
has comment: http://stackoverflow.com/comment/41792428
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26589891
tagged with: http://stackoverflow.com/tag/html
has body: How can I read the loaded scripts in an Iframe? I want to echo the variables outside the iframe and use the variables in script.js out of the iframe. My code: &lt;script type="text/javascript"&gt; var myIFrame = document.getElementById(ifr_id); var script = myIFrame.contentWindow.document./*script.js*/; &lt;/script&gt; In the Iframe's &lt;head&gt;: &lt;script type="text/javascript" src="script.js"&gt;&lt;/script&gt;. script.js: $rootScope.texts = { content : 'inceptos suspendisse etiam tempor posuere volutpat tempor dapibus varius nullam sagittis nibh amet in mattis quisque, conubia tempor at eros turpis erat, phasellus tincidunt tristique nisl.', copyright : '--- © 2014 RobbieWilliams Interactive. All rights reserved.', }; how can i load &lt;script&gt;&#39;s into an iframe? (but I want the opposite)
tagged with: iframe
has answer: http://stackoverflow.com/a/26588712
has comment: http://stackoverflow.com/comment/41791843
linked to: http://stackoverflow.com/q/3076414
has comment: http://stackoverflow.com/comment/41792232
has title: How can I read the loaded scripts in an Iframe?
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41791938
upvote count: 0
has comment: http://stackoverflow.com/comment/41792230
has comment: http://stackoverflow.com/comment/41792185
tagged with: javascript
tagged with: jquery
score: -1
linked to: http://stackoverflow.com/q/3935398
answer count: 3

http://stackoverflow.com/a/26569853
answers question: http://stackoverflow.com/q/26569782
score: 0
type: Answer
has body: You have to remove the function changeLocale outside of the window.onload=function. This is because of problems with the scope. When you define changeLocale inside the window.onload function, changeLocale is defined only within the scope of the window.onload function. onclick, in the html, can only access the scope of the global window object. Since it does not see a function named changeLocale in the window scope, it thinks it is not defined. To solve this, you must take the changeLocale function outside of the window.onload scope and declare it on the "global" window scope.

http://stackoverflow.com/a/26521936
has body: You can point the script tag source to a .php file instead of a .js file, I think that's what you want. Works with image tags too ;) Edit: some browsers may require the text/javascript mime header in order for it to work properly, but it's not hard with PHP I'll assume you already know how to do that. On a side note: This option should probably only be used if you're planning on allowing the client to cache the javascript output. If you don't want the client to cache it, you need to set additional headers.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26521851

http://stackoverflow.com/comment/41851917
type: QuestionComment
has text: @markE Sorry, I forgot to paste in the bit where `reqAnimFrame` is defined. I don't think that's the problem here.
score: 0
comment on: http://stackoverflow.com/q/26620497
type: Comment

http://stackoverflow.com/comment/41710674
type: AnswerComment
score: 0
type: Comment
has text: Thanks for your quick reply, but that isn't the reason. I tried your example and mine with the comma removed at the end and both returned the same output as the example i provided. This is crazy, i've tried it a million ways, i know it's something stupid. Thanks again.
comment on: http://stackoverflow.com/a/26543200

http://stackoverflow.com/comment/41785882
has text: @user3860691 about $watch you should to look through this post: http://stackoverflow.com/questions/15112584/using-scope-watch-and-scope-apply
comment on: http://stackoverflow.com/a/26584747
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41871415
has text: What do you mean exactly?
comment on: http://stackoverflow.com/a/26631583
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41941588
type: Comment
comment on: http://stackoverflow.com/q/26654560
score: 0
type: QuestionComment
has text: The last version (1.10.3). I've created a ticket on github.com. Hope the author of RequireJs will help me. Meantime I will use my fixed version of DataTables (I removed module name from the script).

http://stackoverflow.com/comment/41853755
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26621660
has text: Wait... why exactly do you not want to push things into the `select_people` array?
score: 0

http://stackoverflow.com/comment/41936005
type: Comment
comment on: http://stackoverflow.com/a/26667045
has text: Yes Thank you, this did the trick. Don't know how I forgot to add name for the dynamic ones.
score: 0
type: AnswerComment

hello.js
tags question: http://stackoverflow.com/q/26609943
tags question: http://stackoverflow.com/q/26655274
tags question: http://stackoverflow.com/q/26580597
tag name: hello.js
type: Tag

http://stackoverflow.com/comment/41903626
score: 0
has text: Ok, thats sad. I was hoping that I could add some class to the html or something to controll that...
comment on: http://stackoverflow.com/a/26649214
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26589944
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26590748
answer count: 2
has comment: http://stackoverflow.com/comment/41795406
favorite count: 0
has answer: http://stackoverflow.com/a/26593136
has comment: http://stackoverflow.com/comment/41795236
upvote count: 2
has comment: http://stackoverflow.com/comment/41795541
has comment: http://stackoverflow.com/comment/41795695
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26593136
has title: Jquery ui autocomplete not fill
downvote count: 1
type: Question
tagged with: jquery-ui-autocomplete
tagged with: jquery-ui
has body: I'm new to JQuery and jQuery UI. I'm using autocomplete with remote json in a table with dynamically rows. The problem is: everything works, but for some reasons, the input code isn't filled. The curious thing is that if I hardcode #code0 or #code1 in select area, it works. But it seem #code+i isn't recognized in select. Another strange thing is $("#product"+i) works. Can someone help a JS beginner? $(document).ready(function(){ var i=0; $("#add_row").click(function(){ $('#addr'+i).html(" "+ (i+1) +"<\/td> <\/td> <\/td>"); $('#tab_logic').append(' <\/tr>'); $("#product"+i).autocomplete({ source: function( request, response ) { $.ajax({ url: "productsearch.php", dataType: "json", data: {term: request.term}, success: function(data) { response($.map(data, function(item) { return { label: item.text, id: item.id, code: item.id }; })); } }); }, minLength: 2, select: function(event, ui) { var codice="$code"+i; $('#codice').val(ui.item.id); } }); i++; }); $("#delete_row").click(function(){ if(i>1){ $("#addr"+(i-1)).html(''); i--; } }); $("#product"+i).autocomplete({ source: function( request, response ) { $.ajax({ url: "productsearch.php", dataType: "json", data: {term: request.term}, success: function(data) { response($.map(data, function(item) { return { label: item.text, id: item.id, code: item.id }; })); } }); }, minLength: 2, select: function(event, ui) { $("#code"+i).val(ui.item.id); } }); i++; }); }); 1
possible better answer: http://stackoverflow.com/a/26590748

http://stackoverflow.com/q/26615000
type: UnansweredQuestion
upvote count: 1
has title: how to pass angular scope parameter to highcharts
has comment: http://stackoverflow.com/comment/41841702
has comment: http://stackoverflow.com/comment/41841935
score: 1
has body: Hi I am really struggling with this problem and it would be awesome if anyone could help me with it. I am trying to send the angular "scope" object to the highcharts click event so that I can call the parent controller's method, but every method I try gets a compile error. Here is what I have in the highcharts options. I am trying to make the $scope parameter not have a compile issue. The compile error is "cannot find symbol scope". plotOptions: { series: { cursor: 'pointer', point: { events: { click: function () { var url = this.series.options.url; if (!this.series.options.clickable) { return; } if (this.series.options.url == "") { $scope.vm.ParentController.generateDrilldown(this.series.options.name, this.x - 1); } else { window.open(this.series.options.url); } } } }, } } I tried sending the $scope object through the seriesData and then just trying to call "this.series.options.scope" but that didnt work. I made a field for scope in my overall class but that didnt work. I dont know what else to try. Any help would be appreciated! Thanks
type: Question
tagged with: highcharts
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41842049
favorite count: 0
tagged with: angularjs
answer count: 0

graphael
tag name: graphael
type: Tag
tags question: http://stackoverflow.com/q/26582809

http://stackoverflow.com/q/26526464
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: CKEditor css style broken
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26530937
type: Question
has body: I have just download ckEditor and have a display problem. As my page defined styles for body, p...and now these style affects to ckEditor css because it defined css tag body, too..and this make ckEditor style broke So, what should I do to separate these css to display ckEditor correctly on my page? One more question, I defined a css as below for my table which set classname is "standardTable01" .standardTable01 { color: #333; text-align: left; line-height: 40px; border-spacing: 0; border: 1px solid #428bca; width: 500px; cursor:pointer; } .standardTable01 thead tr:first-child { background: #428bca; color: #fff; border: none; } .standardTable01 th {font-weight: bold;} .standardTable01 th:first-child, td:first-child {padding: 0 15px 0 20px;} .standardTable01 thead tr:last-child th {border-bottom: 2px solid #ddd;} .standardTable01 tbody tr:hover {background-color: #f0fbff; opacity:0.6} .standardTable01 tbody tr:last-child td {border: none;} .standardTable01 tbody td {border-bottom: 1px solid #ddd;} .standardTable01 td:last-child { text-align: right; padding-right: 10px; } and this defined affects to ckEditor as well. I don't know why was that because ckEditor did not set the table classname the same to mine "standardTable01"... Thanks in advanced!!!
score: 0
answer count: 1
tagged with: javascript
tagged with: ckeditor
has answer: http://stackoverflow.com/a/26530937

http://stackoverflow.com/q/26616024
has comment: http://stackoverflow.com/comment/41843386
has comment: http://stackoverflow.com/comment/41843759
linked to: http://stackoverflow.com/q/22104811
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3563389
has body: My situation is as follow, i have a form input in a Jquery Mobile page, and i am submitting the form with no form button. I need the returned result from the php(it is in JSON) back in the html. But at the moment when i submit the search with pressing the enter button, it links to the php page, with the returned results and just stuck there, and not back in the html page. Thanks for your time! Code: $("#searchform").submit(function( event ) { $.ajax({ type: "GET", url: "http://test.com/App/searchtest.php", dataType:'json', success: function(data){ console.log(data); $("#content").append(data); } }) }); &lt;form id="searchform" name="searchform" method="post" action="http://www.test.com/App/searchtest.php" data-ajax="false"&gt; &lt;input type="search" id="searchinput" name="searchterm" value="" data-mini="true" placeholder="Where?"/&gt; &lt;/form&gt; &lt;?php ini_set('display_errors', 1); error_reporting(E_ALL); include 'connect.php'; $search = ($_POST['searchterm']); $keywords = explode (" ", $search); $columns = array("country","name"); $andParts = array(); foreach ($keywords AS $keyword){ $orParts = array(); foreach($columns AS $column){ $orParts[] = $column . " LIKE '%" . ($keyword) . "%'"; } $andParts[]= "(" . implode($orParts, " OR ") . ")"; } $and = implode ($andParts, " AND "); $sql = "SELECT * FROM Listing WHERE $and "; $result = mysqli_query($con,$sql); $output = array(); // fetch your results while( $row = mysqli_fetch_assoc($result)) { // add result row to your output's next index $output[] = $row; } // echo the json encoded object echo json_encode( $output ); ?&gt;
has comment: http://stackoverflow.com/comment/41843796
has comment: http://stackoverflow.com/comment/41843576
has comment: http://stackoverflow.com/comment/41843651
has comment: http://stackoverflow.com/comment/41843406
score: 1
has answer: http://stackoverflow.com/a/26617314
has comment: http://stackoverflow.com/comment/41843334
tagged with: forms
has answer: http://stackoverflow.com/a/26617368
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41843526
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41844628
has title: Html form input sent, then stuck in php page
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26590748
has comment: http://stackoverflow.com/comment/41796479
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26589944
upvote count: 1
type: Answer
has body: One thing for sure is that in your select event handler on the first autocomplete, you have a bug: select: function(event, ui) { var codice="$code"+i; $('#codice').val(ui.item.id); } You create a variable for the jquery selector and then don't use it. You can't update your input value whose id is "code"+i with this function. Instead, it needs to be: select: function(event, ui) { var codice="#code"+i; $(codice).val(ui.item.id); } Fix that and see if your problem goes away.

http://stackoverflow.com/q/26527729
has comment: http://stackoverflow.com/comment/41683510
type: Question
tagged with: c#
has body: How do I access the text within an asp.net mvc textbox via JavaScript? Basically, I have 2 textboxes which you can see below and I am using the javascript below to access the text selected via the date-picker and outputted to the textboxes but what I have done so far, seems to return null values. Code: @Html.Label("Start", "Start Date:") @Html.TextBox("Start", string.Empty, new {@id = "Start", @class = "datepicker"}) @Html.Label("endd", "End Date:") @Html.TextBox("endd", string.Empty, new {@id = "End", @class = "datepicker"}) &lt;input type="submit" value="Apply" id ="DateSelected" /&gt; &lt;script type="text/javascript"&gt; $('.datepicker').datepicker(); $("#DateSelected").onclick(function () { var value1 = document.getElementById('&lt;%=Start.ClientID%&gt;').value; var value2 = document.getElementById('&lt;%=End.ClientID%&gt;').value; &lt;/script&gt;
tagged with: asp.net-mvc
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/41682568
tagged with: asp.net
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26619858
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/41682627
has title: How do I access the text within an asp.net mvc textbox via javascript?
linked to: http://stackoverflow.com/q/26529838
has comment: http://stackoverflow.com/comment/41682477
has comment: http://stackoverflow.com/comment/41705293

http://stackoverflow.com/comment/41958790
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26667700
has text: @squint - good point about `.length`. I removed that check and just check for the `.nodeType` property.
score: 1

http://stackoverflow.com/comment/41880696
comment on: http://stackoverflow.com/q/26635749
type: Comment
type: QuestionComment
has text: I don't even know what TO try. I've been trying to search out an answer all morning to no avail. I'm hoping to be pushed in the right direction here.
score: 0

http://stackoverflow.com/comment/51258343
comment on: http://stackoverflow.com/a/26523376
has text: Just tested this and it worked, updated the answer accordingly, cheers.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26581283
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41779376
linked to: http://stackoverflow.com/q/1206203
has body: I have this simple maps code, but for some reason on the rightclick event the alert is not triggered. Could someone help spotting the problem and explaining it? Simple Map ​
has answer: http://stackoverflow.com/a/26582403
accepted answer: http://stackoverflow.com/a/26582403
has answer: http://stackoverflow.com/a/26585791
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26581803
possible better answer: http://stackoverflow.com/a/26585791
linked to: http://stackoverflow.com/q/7168394
type: Question
tagged with: google-maps
tagged with: javascript
has title: Get coordinates from Google Maps API 3 with rightclick event

http://stackoverflow.com/a/26540015
downvote count: 0
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26537928
type: Answer
accepted answer of: http://stackoverflow.com/q/26537928
has body: I think you may need to rebuild your modules. I was seeing a very similar error after I upgraded to OS X Yosemite, though my problem was with gulp-sass. Deleting node_modules and running npm install again resolved the problem for me.
score: 2

http://stackoverflow.com/comment/41721039
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26546287
has text: May be some deep possibilities like prototype override exist, but i'm not aware about such solutions. I debugged a lot of events in my library, and provided exactly this mechanism in auto-generated event bus and ajax proxy, because it's always useful to know where handler was attached, especially if it wasn't triggered
score: 0

http://stackoverflow.com/a/26587906
type: Answer
has comment: http://stackoverflow.com/comment/41799922
has comment: http://stackoverflow.com/comment/41791303
has comment: http://stackoverflow.com/comment/41798470
score: 0
answers question: http://stackoverflow.com/q/26587607
has comment: http://stackoverflow.com/comment/41799101
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26587607
has comment: http://stackoverflow.com/comment/41819424
has comment: http://stackoverflow.com/comment/41791690
has comment: http://stackoverflow.com/comment/41793820
has comment: http://stackoverflow.com/comment/41793641
has body: You can do the following thing in ASP.NET WebForms &lt;script type="text/javascript" src="http://www.ratebeer.com/javascript/sc.asp?b=&lt;% Response.Write("53"); %&gt;"&gt;&lt;/script&gt;

http://stackoverflow.com/comment/90291115
type: Comment
has text: Without much actual use, I found the line separator string must be determined in client code and then passed to shared / server code. I used this solution as the basis for [my experiment](https://subversion.assembla.com/svn/freshcode_public/learn/gwt/src/main/java/biz/freshcode/learn/gwt2/common/client/util/ClientUtil.java).
comment on: http://stackoverflow.com/a/26526087
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41751729
has text: for attribute, you can use $('td').attr('attribute-name')
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26566226
score: 0

http://stackoverflow.com/comment/41719569
score: 0
comment on: http://stackoverflow.com/q/26548279
has text: it's not working. My button is vanishing when I click it.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26525741
tagged with: cordova
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26526088
tagged with: javascript
has body: I am writing a hybrid app using Visual Studio with Cordova exetnstion and trying to pull data from www.a.com/b.php My b.php code is: &lt;?php // Connect to database server mysql_connect("http://www.yo.com", "ya", "ye") or die (mysql_error()); // Select database mysql_select_db("oh") or die(mysql_error()); // SQL query $strSQL = "SELECT * FROM Properties ORDER BY number DESC"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); // Loop the recordset $rs // Each row will be made into an array ($row) using mysql_fetch_array echo '&lt;select name="Address" id="address_search" style="width:282px; display:block;" required&gt;'; while($row = mysql_fetch_array($rs)) { // Write the value of the full address including unit code, address, city, state, zipcode (which is now in the array $row) echo '&lt;option value="'. $row['number'] . ", " . $row['address'] . ", " . $row['city'] . ", " . $row['state'] . ", " . $row['zipcode'] .'"&gt;' . $row['number'] . ", " . $row['address'] . ", " . $row['city'] . ", " . $row['state'] . ", " . $row['zipcode'] . '&lt;/option&gt;'; } echo '&lt;/select&gt;'; // Close the database connection mysql_close();?&gt; I already add select tag form directly in php code, but I don't know how to display the whole select box (with options being retrieved data) in .html. Any help or tutorial? Thanks.
answer count: 2
has answer: http://stackoverflow.com/a/26545606
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: How to retrieve data from .php and display in within Cordova hybrid app?
tagged with: php

http://stackoverflow.com/comment/41812712
has text: Great, I think I got it from here. If you want to turn your comments (esp 1st and 2nd) into an answer, I'll accept it. Thanks!
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26596586
type: QuestionComment

http://stackoverflow.com/q/26548106
tagged with: d3.js
has answer: http://stackoverflow.com/a/26610479
has title: D3js mulitline chart mouseOver
type: AnsweredQuestion
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/26610479
tagged with: javascript
score: 4
upvote count: 4
has body: I'm trying to adapt this D3js line chart example of mouse-over usage to my multi-line chart. It seems that d3.mouse(this)[0] on the mousemove function generate the following error: "Cannot read property 'sourceEvent' of null". 1 Any idea why I get the null sourceEvent error ? 2 Any tips on how to adapt the mouse over example from a single line chart to a multi (n) line chart ? Here is a jsfiddle to demonstrate the issue. ( And the solution ) var myApp = angular.module('app', []); myApp.directive("lineChart", function() { return { restrict: 'E', scope: { data: '=', id: '@' }, link: function (scope, element, attrs) { scope.$watch( 'data', function ( data ) { d3.select("#"+attrs.id).select("svg").remove(); if (data) { var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = element[ 0 ].parentElement.offsetWidth - margin.left - margin.right, height = element[ 0 ].parentElement.offsetHeight - margin.top - margin.bottom; var parseDate = d3.time.format("%d-%b-%y").parse; var x = d3.time.scale() .range([0, width]); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom") .innerTickSize(-height) .ticks(4) .outerTickSize(0) .tickPadding(5) .tickFormat(function(d) { return d3.time.format('%d/%m %H:%M')(new Date(d)); }); var yAxis = d3.svg.axis() .scale(y) .orient("left") .innerTickSize(-width) .outerTickSize(0) .tickPadding(10); var line = d3.svg.line() .x(function(d) { return x(d[0]); }) .y(function(d) { return y(d[1]); }); var svg = d3.select(element[0]).append("svg") .attr("width", '100%') .attr("height", '100%') .attr('viewBox','0 0 '+ element[ 0 ].parentElement.offsetWidth +' '+ element[ 0 ].parentElement.offsetHeight ) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var minX = d3.min(data, function (item) { return d3.min(item.values, function (d) { return d[0]; }) }); var maxX = d3.max(data, function (item) { return d3.max(item.values, function (d) { return d[0]; }) }); var minY = …
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/26820013
answers question: http://stackoverflow.com/q/26591335
downvote count: 1
has body: This is precisely the problem I had to solve for my site 33hotels.com. You can check it and play with the tabs "Filter" and "Filter List" (corresponding to different Routes), and see that the View is updated instantly without any delay! How did I do it? The idea is surprisingly simple - get rid of the Router! Why? Because the way the Router works is it re-compiles the View upon every single Route change. Yes, Angular does cache the Template but not the compiled View populated with data. Even if data do not change! As the result, when I used the Router in the past, the switch always felt sluggish and non-reactive. Every time I could notice annoying delay, it was a fraction of second but still noticeable. Now the solution I used? Don't re-compile your Views! Keep them inside your DOM at all times! Then use ng-hide/ng-show to hide/show them depending on the routes: &lt;div ng-show="routeIs('/dashboard')"&gt; &lt;-- Your template for Dashboard --&gt; &lt;/div&gt; &lt;div ng-show="routeIs('/book')"&gt; &lt;-- Your template for Book --&gt; &lt;/div&gt; Then create a function routeIs(string) inside your Controller to test if $location.path() matches string, or begins with string as I am using it. That way I still get my View for all pathes like /book/2. Here is the function I am using: $scope.routeBegins = function () { return _.some(arguments, function (string) { return 0 === $location.path().indexOf(string); }); }; So no need to be smart with caching - just keep it in the DOM. It will cache your Views for you! And the best part is - whenever your data is changed, Angular will instantly update all the Views inside your DOM, even the hidden ones! Why is this awesome? Because, as user, I don't have to wait for all the parsing and compiling at the moment I want to see the result. I want to click the tab and see my results immediately! Why should the site wait for me to click it and then begin all the re-compiling as I am waiting? Especially when this could be easily done bef…
has comment: http://stackoverflow.com/comment/42218561
upvote count: 12
accepted answer of: http://stackoverflow.com/q/26591335
has comment: http://stackoverflow.com/comment/42210773
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42210738
type: Answer
score: 11
has comment: http://stackoverflow.com/comment/42219619
has comment: http://stackoverflow.com/comment/42218640
has comment: http://stackoverflow.com/comment/42231687
has comment: http://stackoverflow.com/comment/42219581

http://stackoverflow.com/comment/41828323
comment on: http://stackoverflow.com/a/26608081
type: Comment
type: AnswerComment
has text: The collection comes from a json object, so complex types don't end up as Sub.Start.
score: 0

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/26519553
tags question: http://stackoverflow.com/q/26613307
type: Tag

http://stackoverflow.com/comment/41752649
type: Comment
comment on: http://stackoverflow.com/a/26566806
has text: cant vote you up (im new) but thanks anyways :)
type: AnswerComment
score: 0

http://stackoverflow.com/q/26587012
tagged with: sencha-touch
type: UnansweredQuestion
has body: I'm looking for a way to display math symbols and equations (coming from Latex e.g.) in Ext.js / Sencha Touch UI-Components (specifically buttons and textfields). I grasp that "ext.draw.component" might be a good starting point to develop something appropriate. Is there another way to display math? What would be your choice? Anyone came up with a solution for a similar problem already? Any advice appreciated. Best regards, Thomas
upvote count: 1
has title: Display math symbols in Ext.js / Sencha Touch
has comment: http://stackoverflow.com/comment/41792354
score: 1
type: Question
has answer: http://stackoverflow.com/a/26593242
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: extjs

http://stackoverflow.com/q/26538878
favorite count: 0
tagged with: google-api
has answer: http://stackoverflow.com/a/30407897
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/41748733
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41726126
tagged with: google-plus-one
tagged with: javascript
has body: I am trying to use the javascript sdk to do an oauth login and access the google plus api. Basically the same code here: https://developers.google.com/api-client-library/javascript/features/authentication In my firebug console, this is the url that is sending the api request to: https://content.googleapis.com/discovery/v1/apis/plus/v1/rest?fields=servicePath%2Cresources%2Cparameters%2Cmethods&amp;pp=0&amp;key={key} This is the error that comes back: {"error":{"errors":[{"domain":"usageLimits","reason":"keyInvalid","message":"Bad Request"}],"code":400,"message":"Bad Request"}} I have: 1. Added Google Plus Api to my project 2. Created oauth credentials 3. Setup my consent screen However, I am still getting the error.
has title: Google Plus API - Keyinvalid
tagged with: api
answer count: 1
downvote count: 0
tagged with: google-plus

http://stackoverflow.com/comment/41919409
type: AnswerComment
type: Comment
has text: try this `$("#q").val("")`
comment on: http://stackoverflow.com/a/26658520
score: 1

http://stackoverflow.com/q/26592908
type: Question
has body: I'm creating a numeric text box with data attributes for the initialization but it does not seem to be working, can someone help to explain why or is this just a Kendo UI bug please? (documentation of how to use data attribute initialization) demo of working example demo of non-working example
score: 0
has answer: http://stackoverflow.com/a/26593327
has title: Kendo data attribute initialization not working
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
tagged with: telerik
tagged with: kendonumerictextbox
accepted answer: http://stackoverflow.com/a/26593327
type: AnsweredQuestion

http://stackoverflow.com/comment/41757484
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26569070
has text: @meagar what if I've then as well, and would like to pass some value to the done as well at the end? possible?
score: 0

http://stackoverflow.com/comment/41899748
comment on: http://stackoverflow.com/a/26583577
score: 0
has text: Without the use of "append", the block is redefined in the current file,and it will override its previous definition.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26711068
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42045873
answers question: http://stackoverflow.com/q/26670965
has body: You can pause/loop your js script until SUGAR.util.ajaxCallInProgress() returns false. With all Ajax calls ended the form should be loaded.

http://stackoverflow.com/comment/41729550
comment on: http://stackoverflow.com/q/26553831
type: QuestionComment
has text: even if you think it is duplicate, i was not lazy to read anything but it couldn't solve my problem. please help me out with this example. regarding CPS, i will read it now
score: 0
type: Comment

http://stackoverflow.com/comment/41817058
score: 0
has text: actually my main_obj = {"value1":{"value2":{"value3":}}} is like this what i need to do is i need to parse through until value3 and add the new object, the dynamic_array is a reference for how long i need to parse. thanks
type: Comment
comment on: http://stackoverflow.com/a/26590152
type: AnswerComment

http://stackoverflow.com/q/26620613
tagged with: javascript
score: 0
answer count: 1
has body: I would like to grab the HTML source in a string without using Javascript. Does anyone know of a way to accomplish this? My problem spurs from the motivation to grab HTML source before a Javascript gets the chance to modify the document's contents. I have turned Javascript off in my WebSession instance in order to accomplish this. However, doing so eliminates my only known ability to fetch the HTML source! Simply delaying the JS from running in time to capture source code would also work. Is this doable? Thanks.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26651590
has comment: http://stackoverflow.com/comment/41852071
tagged with: awesomium
has title: Awesomium: Return HTML Source Without Javascript
type: Question
tagged with: c#

http://stackoverflow.com/comment/41809911
type: Comment
has text: You left the behavior completely unspecified beyond the obvious case and Neil gave you the simplest answer...what exactly were you expecting? What is a simple nested object for which Neil's solution doesn't work, how should the correct function behave on the input, and how are you making your choice about how you would traverse and determine differences in the general case?
comment on: http://stackoverflow.com/a/26529844
score: 0
type: AnswerComment

http://stackoverflow.com/a/26539627
answers question: http://stackoverflow.com/q/26539579
type: AcceptedAnswer
has body: Set a flag using a timer: var is_waiting = false; function testuser() { if (!is_waiting) { //do your stuff here } else { alert('You must wait ten seconds before doing this again'); } is_waiting = true; setTimeout(function() {is_waiting = false}, 10000); }
type: Answer
accepted answer of: http://stackoverflow.com/q/26539579
score: 0

http://stackoverflow.com/comment/41758375
score: 0
has text: Yea, I'll try it and see what happens. I'm afraid only about if the site contains some malicious code without using javascript, like a PHP redirect to another site or something like that.
comment on: http://stackoverflow.com/q/26569740
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41798489
comment on: http://stackoverflow.com/a/26591080
has text: Sorry, I was kinda busy. Edited it
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26580191
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26580143
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26580143
type: Answer
has body: Notice that the controller's function is a parameter of the function controller. That allows Angular to get that function in a variable and analyze its parameters, and with that angular makes a list of the services that need to be injected. In the code bellow you can see what Angular does behind the scenes in order to match those parameters: var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; var FN_ARG_SPLIT = /,/; var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/; var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; function annotate (fn) { var $inject = []; fn = fn.toString(); var first = fn.replace(STRIP_COMMENTS, ''); var second = first.match(FN_ARGS)[1]; var third = second.split(FN_ARG_SPLIT); third.forEach(function (arg) { arg.replace(FN_ARG, function (all, underscore, name) { $inject.push(name); }); }); return $inject; }
has comment: http://stackoverflow.com/comment/41777498
has comment: http://stackoverflow.com/comment/44380405
has comment: http://stackoverflow.com/comment/41777474

http://stackoverflow.com/comment/41676180
type: Comment
has text: Thank you so much for your answer - it’s been extremely helpful! The only thing that I don’t think it addressed is actually changing the value of the thermostat itself: thermostat.minTemperature = parseInt($('#mintemperature').val()) thermostat.maxTemperature = parseInt($('#maxtemperature').val()) thermostat.maxTemperaturePowerSaver = parseInt($('#maxtemperatureps').val()) This is probably because the code that I posted on my question initially was slightly incorrect and didn’t include 2 of the above 3 lines (it had been a long day!). I’m going to figure out how to do this now.
comment on: http://stackoverflow.com/a/26518425
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41885717
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26637748
has text: there updated the title to make more sense

http://stackoverflow.com/q/26657823
tagged with: inheritance
score: 0
answer count: 1
has title: Setting defaults in subclass backbone
tagged with: backbone.js
type: UnansweredQuestion
tagged with: underscore.js
has body: I have a superclass var mySuperClass = Backbone.Model.extend({ defaults: { ... } }); var mySubClass = mySuperClass.extend({ defaults: _.extend(mySuperClass.prototype.defaults, { childDefault1: .. } }) It works perfectly, It overwrite every value I need to overwrite but, if I create a new mySubClass with options like: new mySubClass({someDefault: value}) the someDefault property won't set. Any idea?
type: Question
has answer: http://stackoverflow.com/a/26658581
tagged with: javascript

http://stackoverflow.com/q/26639976
favorite count: 0
has answer: http://stackoverflow.com/a/26640093
tagged with: error-handling
type: AnsweredQuestion
has body: Is there a preferred way to include inner exceptions when throwing exceptions in JavaScript? I'm relatively new to JavaScript coming from a C# background. In C#, you can do the following: try { // Do stuff } catch (Exception ex) { throw new Exception("This is a more detailed message.", ex); } In the samples I've seen in JavaScript, I haven't been able to find how to catch an exception, add a new message, and re-throw the new exception while still passing the original exception.
upvote count: 21
possible better answer: http://stackoverflow.com/a/74541497
type: Question
has answer: http://stackoverflow.com/a/74541497
answer count: 2
has comment: http://stackoverflow.com/comment/41886996
accepted answer: http://stackoverflow.com/a/26640093
linked to: http://stackoverflow.com/q/464359
has comment: http://stackoverflow.com/comment/41887189
downvote count: 0
tagged with: javascript
has title: Inner Errors (exceptions) in JavaScript
has comment: http://stackoverflow.com/comment/41887621
score: 21

http://stackoverflow.com/comment/41659523
has text: Both of you are right, question should be answered but when someone answered the question in the comment (and it work) you should A) Let him answer and get the point or B) Answer it yourself and checking the `community wiki` on the bottom right of the answer box. **Related :** http://meta.stackoverflow.com/questions/251597/question-with-no-answers-but-issue-solved-in-the-comments
comment on: http://stackoverflow.com/a/26514785
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26572351
tagged with: django
tagged with: python
has title: Django value doesn't load on jquery
downvote count: 1
has comment: http://stackoverflow.com/comment/41772063
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/41762734
upvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26574034
has comment: http://stackoverflow.com/comment/41763171
has answer: http://stackoverflow.com/a/26573524
favorite count: 0
score: -1
type: UnansweredQuestion
has body: Help please in my site, i used jquery and django. In views i create a new variable : strin = "2014-10-10 21:32,75\n" but when i try to use it in jquery, them crashed, why? (P.S. there is back correct value) &lt;script type="text/javascript"&gt; var a = "{{ strin }}" g = new Dygraph( document.getElementById("graphdiv"), "Date,Value\n" + a ); &lt;/script&gt; also, when i simply try: &lt;script type="text/javascript"&gt; g = new Dygraph( document.getElementById("graphdiv"), "Date,Value\n" + "2014-10-10 21:32,75\n" ); &lt;/script&gt; This works. Standart template, what i take, somethings like : &lt;script type="text/javascript"&gt; g = new Dygraph( document.getElementById("graphdiv"), "Date,Temperature\n" + "2008-05-07,75\n" + "2008-05-08,70\n" + "2008-05-09,80\n" ); &lt;/script&gt; I don't know why them is crashed, only jquery stoped wokring and graphs doesn't load. Please help. And another thing, if you know what the problem this, can you help with array values, not one. Thanks!

http://stackoverflow.com/q/26601678
answer count: 1
tagged with: dictionary
type: AnsweredQuestion
has body: Which of these functions written in JavaScript is superior and why? function getShortMessages(messages) { var filtered_messages = messages.filter(function(message) { if (message.message.length &lt; 50){ return message.message; } }); var short_messages = filtered_messages.map(function(message){ return message.message; }); return short_messages; } //My solution Using the Array.prototype.filter() method in JavaScript to iterate over an array and only keep the messages which are less than 50 characters. The messages are objects and you can call .message on a message-item. I think my code has side affects and is not very DRY. function getShortMessages(messages) { return messages.filter(function(item) { return item.message.length &lt; 50 }).map(function(item) { return item.message; }); } // This is the other solution. Basically I understand this method, it seems more complex and obfuscated. Maybe more abstract. I also do not like the syntax "}).map(". As I think this is clunky.
has title: JavaScript Style & Clunky Syntax & Design
has answer: http://stackoverflow.com/a/26601808
accepted answer: http://stackoverflow.com/a/26601808
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41817064
score: 0
tagged with: filter
tagged with: functional-programming
tagged with: function

http://stackoverflow.com/comment/41939315
has text: You could try bucketing your dictionary by the starting letter of each word, although that doesn't allow mistakes in the first letter. Instead of having a dictionary for each and every misspelling, use something like the [Levenshtein distance](http://en.m.wikipedia.org/wiki/Levenshtein_distance) equation
comment on: http://stackoverflow.com/q/26668734
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/26608231
has answer: http://stackoverflow.com/a/26608616
type: UnansweredQuestion
upvote count: 1
has body: Is it possible to load only a certain div for me It Is Demo... If any link on the page Is clicked, I want the whole page to remain the same except for that part of the page using JavaScript plus it should happen In a sliding transition. I've tried searching it on Google but It did not help me as I'm very poor at JavaScript. Please help, Thank You!
score: -3
type: Question
answer count: 2
downvote count: 4
has comment: http://stackoverflow.com/comment/41830262
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/41828665
tagged with: http://stackoverflow.com/tag/html
tagged with: load
has title: How to make a website load only a certain div(class) to save load time, using JavaScript
has comment: http://stackoverflow.com/comment/41829931
favorite count: 0
has answer: http://stackoverflow.com/a/26608852

http://stackoverflow.com/q/26523521
has answer: http://stackoverflow.com/a/26524881
upvote count: 2
has comment: http://stackoverflow.com/comment/41677119
tagged with: iframe
type: AnsweredQuestion
has body: I'm trying to scroll the parent from within an iframe (cross-origin). I found the iframe resizer (by David j. Bradshaw) which should be able to accomplish this (i'm using the resizer because i also needed the iframe to resize based on it's content) I could use postMessage but since i'm already using the iframe resizer, which has the options to accomplish my goal, it'd be nice to make full use of it. By using this on the parent: iFrameResize({ enablePublicMethods : true }); I should be able to call window.parentIFrame.scrollTo(0,0) in the iframe. However, for some reason i can't access window.parentIFrame. When i log window in the console i do see the parentIFrame object, however when i log window.parentIFrame, it returns undefined. Why can't i access the window.parentIFrame object? This is my current testing situation (copied from the example, libraries can be found here: index.html &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=&quot;utf-8&quot;&gt; &lt;title&gt;iFrame message passing test&lt;/title&gt; &lt;meta name=&quot;description&quot; content=&quot;iFrame message passing test&quot;&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt; &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt; &lt;script type=&quot;text/javascript&quot;&gt; //MDN PolyFil for IE8 (This is not needed if you use the jQuery version) if (!Array.prototype.forEach){ Array.prototype.forEach = function(fun /*, thisArg */){ &quot;use strict&quot;; if (this === void 0 || this === null || typeof fun !== &quot;function&quot;) throw new TypeError(); var t = Object(this), len = t.length &gt;&gt;&gt; 0, thisArg = arguments.length &gt;= 2 ? arguments[1] : void 0; for (var i = 0; i &lt; len; i++) if (i in t) fun.call(thisArg, t[i], i, t); }; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;Automagically resizing iFrame&lt;/h2&gt; &lt;p&gt;Resize window or click one of the links in the iFrame to watch it resize.&lt;/p&gt; &…
has comment: http://stackoverflow.com/comment/41675438
accepted answer: http://stackoverflow.com/a/26524881
type: Question
answer count: 2
has title: Why is this object unaccesible?
has comment: http://stackoverflow.com/comment/41677002
score: 2
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/65000747
has comment: http://stackoverflow.com/comment/41676844
favorite count: 0
has answer: http://stackoverflow.com/a/65000747
has comment: http://stackoverflow.com/comment/41675576
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26526805
tagged with: jsp
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26583535
has comment: http://stackoverflow.com/comment/41684349
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41782883
has body: I am currenly making a little HTML overlay, using IntelliJ IDEA, which i want to be handled by the client (because of varnish cache). So what i would like to do is the following, and its working (nearly): Get the template code (html, jsp, el) into a variable, is fairly simple: <c:set var="overlayHtml"><c:import url="/directory/myOverlay.jsp" /></c:set> Then i insert it into a javascript like so, and append it: var advertisementHtml = '${overlayHtml}'; $("body").append(advertisementHtml); My problem is that my HTML string from the jsp is comming out with "new lines" in it. Like so: HERE IS MY OVERLAY Another div And this, the javascript cannot handle, and therefor doesnt fire. I would like to be able to remove these new lines, so that the HTML comes out in one line, like so: HERE IS MY OVERLAY Another div The problem lies in the JSP, and i need to remove the "new lines" before i inject the variable into the javascript. Ive tried replacing HTML new line hex, and decimal unicode, ive tried replacing \n \r with an empty string, which didnt work either. Im outta luck. How can i beat these evil new lines? (without having to make IntelliJ comments, or writing my HTML in a single line manually?)
possible better answer: http://stackoverflow.com/a/26526870
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26526870
accepted answer: http://stackoverflow.com/a/26583535
has title: JSP+HTML with newlines - Get it as string, and remove "new lines"
tagged with: intellij-idea

http://stackoverflow.com/a/26609900
accepted answer of: http://stackoverflow.com/q/26609751
upvote count: 3
answers question: http://stackoverflow.com/q/26609751
has body: You're probably using Turbolinks, you'll have to change your chart drawing js code to something like this: function createChart() { // Create chart } $(document).ready(createChart); $(document).on('page:change', createChart)
type: AcceptedAnswer
downvote count: 0
score: 3
type: Answer

http://stackoverflow.com/comment/41927578
type: Comment
type: QuestionComment
has text: @FelixKling if I we're to rephrase "How do I do this in jQuery", I assume you would have the same problem?? Your premise for criticism is flawed
comment on: http://stackoverflow.com/q/26661642
score: 0

http://stackoverflow.com/comment/41736033
score: 0
has text: There's a `user_friends` permission that you will have to request as part of the app's permissions, and the user *must* give it to you for that list to be generated. https://developers.facebook.com/docs/graph-api/reference/v2.1/user/friends
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26557360

http://stackoverflow.com/q/26655972
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26673421
has comment: http://stackoverflow.com/comment/41916972
has comment: http://stackoverflow.com/comment/41916208
type: Question
score: 0
has answer: http://stackoverflow.com/a/26673421
has body: I saw this code and tried adding that into my code. function validate_creditcardnumber() { var re16digit=/^\d{16}$/ if (CreditCardNumber.value.search(re16digit)==-1) alert("Please enter your 16 digit credit card numbers"); return false; } My code below: function confirmSubmit() { var re16digit = /^\d{16}$/ if (document.getElementById("txtCreditCardNumber").value == "" || isNaN(document.getElementById("txtCreditCardNumber").value) || (document.getElementById("txtCreditCardNumber").value.search(re16digit) == -1)) { alert("Credit Card number must be a numeric value."); document.getElementById("txtCreditCardNumber").focus(); return false; } return true; } There wasn't any error shown but when I ran the code, only the .value == " " was working. The other 2 didn't work. I need to have these requirements: Cannot be empty, must be a number and must be 16 digits. Thanks in advance!
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41915673
has comment: http://stackoverflow.com/comment/41914584
has comment: http://stackoverflow.com/comment/41915636
has comment: http://stackoverflow.com/comment/41915979
tagged with: regex
has comment: http://stackoverflow.com/comment/41916067
has comment: http://stackoverflow.com/comment/41916387
has comment: http://stackoverflow.com/comment/41916247
has title: JavaScript - Credit Card 16 digit Validation and must be a number not working
has comment: http://stackoverflow.com/comment/41917358

http://stackoverflow.com/q/26527502
tagged with: javascript
has comment: http://stackoverflow.com/comment/41682060
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41682156
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26527688
has comment: http://stackoverflow.com/comment/41681980
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41682025
has comment: http://stackoverflow.com/comment/41682087
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41682200
has body: I'm having trouble with this simple jQuery code. My HTML: Areas Indrustry when click on li area, there is another element in the same page that I want to add a class "open": There is it: Áreas de Atuação CNI Competitividade Desenvolvimento Associativo Economia Infraestrutura Inovação Internacionalização Leis e Normas Meio Ambiente Pequenas Empresas Política Industrial Propriedade Intelectual Trabalho Tributação SISTEMA INDÚSTRIA Educação e Tecnologia Qualidade de Vida Responsibilidade Social and my jQuery code: $(document).ready(function(){ $('#toggle-area').click(function(){ if (! $('#show-area').hasClass('open')){ $('#show-area').addClass('open'); } else { $('#show-area').removeClass('open'); } }); }); This is not working, what I am missing? Thanks in advance.
has title: How to show ul when clicking on link?
has comment: http://stackoverflow.com/comment/41682115
has answer: http://stackoverflow.com/a/26527688
type: Question
possible better answer: http://stackoverflow.com/a/26527733
has answer: http://stackoverflow.com/a/26527733

http://stackoverflow.com/q/26648842
has comment: http://stackoverflow.com/comment/41937917
possible better answer: http://stackoverflow.com/a/26648953
has answer: http://stackoverflow.com/a/26648953
type: AnsweredQuestion
has title: Onunload event of body tag is not working
score: 0
has answer: http://stackoverflow.com/a/26670906
has answer: http://stackoverflow.com/a/26648950
type: Question
accepted answer: http://stackoverflow.com/a/26670906
tagged with: javascript
has comment: http://stackoverflow.com/comment/41936641
answer count: 3
has body: I need to use onunload event of body. But its not working. I have following code for that. Please help me. Untitled Document
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41902627

http://stackoverflow.com/q/26631038
tagged with: forms
has title: How to check if a submit button has been clicked in javascript
answer count: 3
has comment: http://stackoverflow.com/comment/41870294
downvote count: 1
has comment: http://stackoverflow.com/comment/41870284
favorite count: 0
upvote count: 3
has answer: http://stackoverflow.com/a/26631161
accepted answer: http://stackoverflow.com/a/26631161
has answer: http://stackoverflow.com/a/26631158
type: AnsweredQuestion
score: 2
has body: I am new to javascript language,and i couldnt find a javascript approach for this php statement: if( isset($_POST['submit']) ){ //more if statements } else { echo 'Error'; } In other words,i want to make a form validation in javascript to check if a submit button has been pressed.
type: Question
has comment: http://stackoverflow.com/comment/41870292
has comment: http://stackoverflow.com/comment/99773870
has answer: http://stackoverflow.com/a/26631164
possible better answer: http://stackoverflow.com/a/26631158
tagged with: javascript

http://stackoverflow.com/comment/41843677
type: Comment
type: QuestionComment
has text: @elclanrs Is there a difference between your version and `this instanceof Singleton`?
score: 1
comment on: http://stackoverflow.com/q/26616071

http://stackoverflow.com/comment/41927582
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26662739
has text: Using Nokogiri in ruby I can access both of these quite fine. ("div#a0 img") I don't see why this is bad etiquette.
score: 0

http://stackoverflow.com/a/26581990
answers question: http://stackoverflow.com/q/26581412
score: 0
type: Answer
has body: var height=$('#StatusEntry').height(); $div.on('resize',function(){ clearTimeout(timer); timer = setTimeout(function(){ $("#StatusEntry").height(height()); }); });``

http://stackoverflow.com/comment/41927970
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26662229
has text: Thanks @ialarmedalien. I updated the answer with a better explanation.

http://stackoverflow.com/q/26653206
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26653682
tagged with: ajax
has body: I got a strange problem. while i run my VS and click specific button on browser, an ajax function fired and shows error. After debugging i found the URL is showing error. the error is:: POST http://localhost:4942/Employee/Employee/AllEmployees 404 (Not Found) The problem is, for some reason the "/Employee" controller is coming two times. my ajax call is: function allEmployeeFunc() { $.ajax({ type: "POST", url: "Employee/AllEmployees", //data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", async: true, // context:"" , error: function (msg) { alert("something is wrong"); }, success: function (data) { } }); } Here the URL clearly showing only one /Employee. so whats the problem?? can anyone help please??
possible better answer: http://stackoverflow.com/a/26653271
has title: double controller value in URL call by ajax
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/26653271
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/26653682

http://stackoverflow.com/comment/41874857
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26631922
type: Comment
has text: window.setInterval (function () { elm = document.getElementById ("editor1"); elm.value = "avcddd"; e = $.Event ('keyup'); e.keyCode = 65; elm.trigger (e); }, 5000);

http://stackoverflow.com/comment/41723567
type: QuestionComment
comment on: http://stackoverflow.com/q/26548978
has text: Have you tried calling the URLs manually?
score: 0
type: Comment

http://stackoverflow.com/comment/41739722
score: 0
type: Comment
type: QuestionComment
has text: yes @foreach can build the table . and function well . but now i need to build the table with the same function(delete and edit) using jquery.as the js code, the code i have write can show the record of table. but i don't know how to add the function of edit and delete.
comment on: http://stackoverflow.com/q/26558746

http://stackoverflow.com/q/26531752
has title: JQuery second child
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26531820
type: Question
has comment: http://stackoverflow.com/comment/41689887
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: parent-child
has body: I have the following code. And the following js: if (($("body").hasClass("page-node-4"))) { $( ".expanded > ul" ).first().show(); } if (($("body").hasClass("page-node-13"))) { $( ".expanded > ul:nth-child(2)").show(); } My problem is that the second if statement doesn't work. The first works. I think i have a mistake in the ul:nth-child(2) part. But i can't find the correct method. Could you help me?
accepted answer: http://stackoverflow.com/a/26531820
score: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41690093
upvote count: 2

http://stackoverflow.com/a/26624162
has body: To disable Backbutton of browser i used $(window).on("navigate", function (event) { event.preventDefault(); window.history.forward(1); }); But on pressing f5 it was creating error and redirecting me to login page.Thus i disable f5 ,ctrl+R button. var ctrlKeyDown = false; $(document).on("pagecreate", function (){ $(document).on("keydown", keydown); $(document).on("keyup", keyup); }); function keydown(e) { if ((e.which || e.keyCode) == 116 || ((e.which || e.keyCode) == 82 &amp;&amp; ctrlKeyDown)) { // Pressing F5 or Ctrl+R e.preventDefault(); } else if ((e.which || e.keyCode) == 17) { // Pressing only Ctrl ctrlKeyDown = true; } } function keyup(e){ // Key up Ctrl if ((e.which || e.keyCode) == 17) ctrlKeyDown = false; } It completely fulfilled my requirement.Thanks to Suhas :) .
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26602874
type: Answer
answers question: http://stackoverflow.com/q/26602874
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/97972005

http://stackoverflow.com/comment/41723383
comment on: http://stackoverflow.com/a/26550433
type: AnswerComment
score: 0
type: Comment
has text: Moreover, it's better to define methods on the prototype if you want to use it as a prototype.

http://stackoverflow.com/a/26621518
accepted answer of: http://stackoverflow.com/q/26621482
type: Answer
answers question: http://stackoverflow.com/q/26621482
has body: You can use the reset type attribute: &lt;input type="reset" value="Reset" /&gt; Code snippet: function addtext() { var newtext = document.myform.inputtext.value; document.myform.outputtext.value += newtext; } &lt;form name="myform"&gt;&amp;nbsp; &lt;table align="center" border="0" cellpadding="5" cellspacing="0"&gt; &lt;tr&gt; &lt;td&gt;&lt;textarea name="inputtext"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;td&gt; &lt;input onclick="addtext()" type="button" value="Strip HTML Formatting" /&gt;&lt;br /&gt; &lt;input type="reset" value="Reset" /&gt; &lt;/td&gt; &lt;td&gt;&lt;textarea readonly name="outputtext"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; This resets all form values to their default values. If you have other textareas besides these and you only want to empty these two, you should create another button that links to a function that empties the values: HTML: &lt;input onclick="emptyText()" type="button" value="Clear fields" /&gt; JS: function emptyText() { document.myform.inputtext.value = ""; document.myform.outputtext.value = ""; }
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/41689768
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26531712
has text: Unfortunately, that doesn't work. No errors in my console either.

http://stackoverflow.com/comment/41842625
type: Comment
score: 0
has text: Yeah, I just noticed and edited my answer too. He is using `lowNum` instead of `x` in his while-loop
type: AnswerComment
comment on: http://stackoverflow.com/a/26615676

http://stackoverflow.com/a/26541263
answers question: http://stackoverflow.com/q/26541146
type: Answer
has body: You could store the button's id in sessionStorage, and then check when the page loads to reapply the focus if applicable. The following page worked in my tests: Button A Button B Button C
score: 0

http://stackoverflow.com/q/26536059
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41698199
has comment: http://stackoverflow.com/comment/41698011
has title: Ca't remove options of a selectbox in a form
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I just started to learn javascript and have encountered a small problem. What I want to achieve is that I could use a radio box to update a select box. The first thing I should be able to do is to remove all the options in the select box. I use the following code: var drop = document.getElementById("selectbox1"); var i; for(i=drop.options.length-1;i&gt;=0;i--) { drop.remove(i); } The code above works fine and remove all the options in the select box. However, if I include the select box in a form, it won't work any more. I can see that the page got refreshed but the options were not removed. More specifically, if the HTML is something like below, the above code can not remove the options. &lt;form name="form1" method="post" action=""&gt; &lt;select id="selectbox1"&gt; . //All the options in the select box . . &lt;/select&gt; &lt;/form&gt; Can someone help explain what was going wrong?
has comment: http://stackoverflow.com/comment/41697982
has comment: http://stackoverflow.com/comment/41698116
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26536422

http://stackoverflow.com/q/26573330
has body: So I have this code. I'm doing something wrong. I want the left arrow to go back (show the previous image) but it isn't working. It shows the next image (like the right arrow). Whatever arrow I click, left or right it shows the next image. I've tried millions of different things and I can't seem to find the problem. Can anyone help me? I also like the sources to loop. When the last source from the array has been reached, I want to loop back to the first source again (and to the last source when you reach the first). Btw, I also have a code for the image to change on click. I'm pretty sure it has nothing to do with the problem, but I decided to keep it, just in case it's messing something up. Thank you :) HTML: &lt;div class="container"&gt; &lt;div id="slideshow"&gt; &lt;img alt="slideshow" src="1.jpg" id="imgClickAndChange" onclick="changeImage()"/&gt; &lt;/div&gt; &lt;/div&gt; JS: &lt;script&gt; var imgs = ["2.jpg", "3.jpg", "4.jpg", "5.jpg"]; function changeImage(dir) { var img = document.getElementById("imgClickAndChange"); img.src = imgs[imgs.indexOf(img.src) + (dir || 1)] || imgs[dir ? imgs.length - 1 : 0]; } document.onkeydown = function(e) { e = e || window.event; if (e.keyCode == '37') { changeImage(-1) //left &lt;- show Prev image } else if (e.keyCode == '39') { changeImage() // right -&gt; show next image } } &lt;/script&gt; &lt;script language="javascript"&gt; var imgs = ["2.jpg", "3.jpg", "4.jpg", "5.jpg"]; function changeImage() { document.getElementById("imgClickAndChange").src = imgs[0]; imgs.push(imgs.shift()) } &lt;/script&gt;
tagged with: onkeypress
has comment: http://stackoverflow.com/comment/41766088
has comment: http://stackoverflow.com/comment/41767616
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Slideshow on key press not working properly
type: Question
has answer: http://stackoverflow.com/a/26578247
accepted answer: http://stackoverflow.com/a/26578247
upvote count: 1
answer count: 1
tagged with: slideshow
tagged with: javascript
tagged with: keyboard
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

google-chrome-devtools
tags question: http://stackoverflow.com/q/26589981
tags question: http://stackoverflow.com/q/26569475
tags question: http://stackoverflow.com/q/26619522
tags question: http://stackoverflow.com/q/26645862
tags question: http://stackoverflow.com/q/26575037
tags question: http://stackoverflow.com/q/26613508
type: Tag
tags question: http://stackoverflow.com/q/26539801
tags question: http://stackoverflow.com/q/26526530
tags question: http://stackoverflow.com/q/26585578
tags question: http://stackoverflow.com/q/26520328
tag name: google-chrome-devtools
tags question: http://stackoverflow.com/q/26623394
tags question: http://stackoverflow.com/q/26514025

http://stackoverflow.com/q/26585888
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/41787256
favorite count: 0
score: -1
has title: on each button click, change content in a containing div
has comment: http://stackoverflow.com/comment/41787067
type: Question
has body: Can anyone give me some directions / links to where/how you build a function that change content in a containing div when you click a button. exsample: I have 7 "stages" in a scene(which is my container div), and every time you click the button "next" it should change from stage1 to stage2 stage2 to stage3 stage3 to stage4 etc. Hope it makes sense
tagged with: stage
answer count: 1
has comment: http://stackoverflow.com/comment/41787056
has comment: http://stackoverflow.com/comment/41787146
tagged with: onclick
has answer: http://stackoverflow.com/a/26586110
downvote count: 1
upvote count: 0

http://stackoverflow.com/comment/41849755
type: QuestionComment
comment on: http://stackoverflow.com/q/26619326
score: 0
type: Comment
has text: Yes, but this is the kind of solution I want to avoid. If I used a large number of buttons or functions that did different changes to the same textarea, it would require each of these to also run the function, whereas if theres a viable "oncontentchange" type listener/event, then that would make it trivial -- just one function call total.

http://stackoverflow.com/comment/41702578
comment on: http://stackoverflow.com/q/26538318
type: Comment
type: QuestionComment
score: 0
has text: Do you mean that the contents that `src` points to changes but the URL stays the same and you want to force it to reread the URL?

http://stackoverflow.com/comment/42091642
type: QuestionComment
has text: 1) You would need to configure CORS before and it would be a one time deal i.e. once you configure CORS, you don't have to do it for every request. 2) I'm not sure what you mean. Are you allowing access to your blob storage from any random URL?
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26549942

http://stackoverflow.com/comment/41744125
score: 2
has text: If you insist on using arrays, take a snapshot of the indexes before and after you sort one of the arrays, then you'd know how to sort the rest as well
comment on: http://stackoverflow.com/q/26561857
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42020042
comment on: http://stackoverflow.com/q/26569601
score: 0
type: Comment
has text: currently, I'm thinking 'keeping the counter' in backbone router. and goBack(counter) when task is done. Haven't implemented it though.
type: QuestionComment

http://stackoverflow.com/q/26594738
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41804549
has answer: http://stackoverflow.com/a/26594842
has comment: http://stackoverflow.com/comment/41804442
answer count: 4
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I'm binding myCtrl's member mydata to DOM as below I'll change if my id changes mydata is being fetched asynchronously. $http.get('/mydata.json').success(function (data) { myCtrl.mydata = data; var mydiv=document.getElementById(data); // this don't work 'coz the change - if(mydiv){ // is not yet reflected in DOM mydiv.innerHTML="my new id is "+data; } }); How to trigger a function after myCtrl.mydata is reflected in DOM. I just need a DOM ready event to hook on.
upvote count: 1
has comment: http://stackoverflow.com/comment/41819170
score: 1
has title: ng-change for non input elements
has answer: http://stackoverflow.com/a/26606039
has answer: http://stackoverflow.com/a/26594789
type: Question
has answer: http://stackoverflow.com/a/26594989
has comment: http://stackoverflow.com/comment/41804399

http://stackoverflow.com/comment/41697918
comment on: http://stackoverflow.com/q/26535753
score: 0
has text: I just copied this code to my local and ran it on a local server and i am seeing the buttons as expected. I tested Safari v7.1, Chrome v. 38, and Firefox v33 - all for mac. Can you provide some other browser specs if you aren't using the latest builds?
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26572736
has body: You can use the GSAP library, which performs better than jQuery, even on most mobiles. Include GSAP //cdnjs.cloudflare.com/ajax/libs/gsap/1.14.1/TimelineLite.min.js HTML div one div two Javascript window.onload = function(){ var greenbox = document.getElementById("one"); var bluebox = document.getElementById("two"); var tl = new TimelineLite(); /* Fading in and out */ tl.to(one, 2, {autoAlpha:0, ease:Power1.easeInOut}) tl.to(two, 2, {autoAlpha:1, ease:Power1.easeInOut}, "-=0.5"); } Here is a fiddle http://jsfiddle.net/qkds4c2d/ - You can do styles and positioning with CSS.
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26569499
type: Answer
downvote count: 0

http://stackoverflow.com/q/26590545
answer count: 0
has comment: http://stackoverflow.com/comment/41836223
score: 1
upvote count: 1
has title: Resize multiple PlaneBufferGeometries according to size of images with Three.js
has comment: http://stackoverflow.com/comment/41837105
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41796340
has comment: http://stackoverflow.com/comment/41840946
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/41822689
has comment: http://stackoverflow.com/comment/41834497
type: UnansweredQuestion
tagged with: three.js
has body: Here I am with a fairly simple job to do: I'm displaying a decent amount (100+) of JPGs mapped on planeGeometries using THREE.js. Some of these jpgs are vertical, others horizontal and sizes tend to vary slightly. Here's the for loop simplified for (i = 0; i &lt; projectsNb; i++) { var texture = new THREE.MeshBasicMaterial({ map: THREE.ImageUtils.loadTexture("images/" + xmlProjects[i].getAttribute('img') + ".jpg") }); var geometry = new THREE.PlaneBufferGeometry( 1, 0.75 ); //Width and Height of my plane geometry.name = xmlProjects[i].getAttribute('nom'); var planProj = new THREE.Mesh( geometry, texture ); planProj.position.x = xmlProjects[i].getAttribute('x'); planProj.position.y = xmlProjects[i].getAttribute('y'); planProj.position.z = xmlProjects[i].getAttribute('z'); scene.add( planProj ); } Therefore, I need to be able to change the dimensions of my Plane Geometries: I would like a Width and a Height Value. It seems that jQuery needs to load the image a second time, I cannot simply read the value of the file such as: var newImg = new Image(); newImg.src = ("images/" + xmlProjects[i].getAttribute('img') + ".jpg"); console.log( newImg.width ); and THREE js cannot access the pixels of the image such as var texture = new THREE.MeshBasicMaterial({ map: THREE.ImageUtils.loadTexture("images/" + xmlProjects[i].getAttribute('img') + ".jpg") }); console.log( texture.map.image.width ); I've looked all over the web for an answer. It seems impossible in a reasonable manner :( Any idea ? :)
has comment: http://stackoverflow.com/comment/41835683

http://stackoverflow.com/comment/41817322
comment on: http://stackoverflow.com/a/26601548
score: 1
type: AnswerComment
type: Comment
has text: MM.. don't think there is an easy way of doing this. One way that comes to my mind, is having a record of who is logged in to the system. Make sure that table gets updated when the session timesout or the user logs out manually. Next have a time limit as to how long the record can stay In Progress. If the record is in Progress too long and the user has logged out, then bump out manager 1 and assign it to manager 2.

http://stackoverflow.com/comment/41721599
score: 0
comment on: http://stackoverflow.com/a/26549387
type: Comment
has text: This works, but I don't want to stop user highlighting.
type: AnswerComment

http://stackoverflow.com/q/26605927
possible better answer: http://stackoverflow.com/a/26606285
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26606285
has title: Saving event in Fullcalendar using Ajax
type: Question
tagged with: javascript
tagged with: fullcalendar
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26606290
tagged with: jquery
tagged with: ajax
has body: I am using fullcalendar and I would like to save events when I click on the calendar. This is what I have so far, which is working with the submitted elements from the form but not from the calendar, for example I cannot get the start date. $('#calendar').fullCalendar({ ... select: function(start, end, allDay, event, resourceId) { $('#add_appt').modal(); //openthemodal $(document).ready(function(){ $('#EventAdd').submit(function(e) { SubmitAppointment(); e.preventDefault(); }); }); function SubmitAppointment(){ hideshow('loading',1); error(0); $.ajax({ type: "POST", url: "ajax.events.add.php", // If I try this, I get all the elements of the form but no value for start I think it's my syntax that is wrong data: $('#EventAdd').serialize(),start: start, // If I try this, I get the start date but I don't know how to include the vales in EventAdd data: 'start='+ start, dataType: "json", success: function(msg){ if(parseInt(msg.status)==1){ $('#add_appt').modal('hide'); //window.location=msg.txt; }else if(parseInt(msg.status)==0){ error(1,msg.txt); } hideshow('loading',0); } }); } Can someone help me with the syntax ? Because I think that's where the problem really is.
accepted answer: http://stackoverflow.com/a/26606290

http://stackoverflow.com/comment/44182251
has text: This is correct, I had to workaround the same problem a few months ago.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27890549
type: Comment

http://stackoverflow.com/comment/41752991
type: Comment
has text: Check out some of them here http://jqueryplugin.net/category/autocomplete/
comment on: http://stackoverflow.com/q/26566768
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41895392
type: Comment
type: QuestionComment
has text: anything simpler than bind'ing?
comment on: http://stackoverflow.com/q/26644661
score: 0

http://stackoverflow.com/q/26533375
answer count: 1
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/41695552
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has title: Alternative to d3.max and d3.min functions
tagged with: d3.js
has answer: http://stackoverflow.com/a/26535059
accepted answer: http://stackoverflow.com/a/26535059
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1669190
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41693784
type: Question
has body: I'm using dashing-js and trying to do the following var d3 = require('d3'); Whitout success and I don't get any error messages more than that my jobs aren't running at all. Any way I'm only want to make use of the d3.max and d3.min functions. Do anyOne of you perhaps know where I could find the javascript implementation of those 2 functions so I can just cop n paste them at the bottom of my js job file and don't have to import d3 at all? Thanks alot in advance.

http://stackoverflow.com/q/26579393
has comment: http://stackoverflow.com/comment/41856686
linked to: http://stackoverflow.com/q/3722815
tagged with: internet-explorer
tagged with: internet-explorer-8
tagged with: javascript
has comment: http://stackoverflow.com/comment/41776049
upvote count: 1
has comment: http://stackoverflow.com/comment/41776087
has body: I am using below functions which are running perfectly fine with Chrome and Mozilla but not in Internet Explorer 8. Below are the two function not supported by IE8 (I am putting whole function) history.pushState(stateObj, "", "index.php?tabid=" + tab_id + "")}, For below it is giving error at if statement dont understand why.. var feeds = feedObj.responseData.feed.entries; for (var i = 0; i &lt; feeds.length &amp;&amp; i &lt; feed_entries; i++) { var feed = feeds[i]; var thumb = ""; var pubdate = new Date(feed.publishedDate); var delay = $app.gen.formatDelay($app.gen.delayFromNow(pubdate)); if ("mediaGroups" in feed &amp;&amp; Array.isArray(feed.mediaGroups) &amp;&amp; "contents" in feed.mediaGroups[0] &amp;&amp; Array.isArray(feed.mediaGroups[0].contents) &amp;&amp; "url" in feed.mediaGroups[0].contents[0] &amp;&amp; typeof feed.mediaGroups[0].contents[0].url != _indef) thumb = feed.mediaGroups[0].contents[0].url; } Any suggestion to change it so that it will work in all the browsers? Thank you guys.
has comment: http://stackoverflow.com/comment/41776147
has comment: http://stackoverflow.com/comment/41775995
answer count: 0
type: UnansweredQuestion
has title: IE8 JavaScript methods alternative
has comment: http://stackoverflow.com/comment/41797080
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/comment/41748217
score: 1
comment on: http://stackoverflow.com/a/26564396
type: AnswerComment
has text: @Juhana then bind it before calling the timer function.
type: Comment

http://stackoverflow.com/comment/41837044
score: 0
type: QuestionComment
type: Comment
has text: Where are you building the connection? You seem to be missing a lot of things here, can you show the complete script?
comment on: http://stackoverflow.com/q/26612465

http://stackoverflow.com/a/26544983
score: 0
has body: If you are in cordova/phonegap, you can use a plugin. Here is the one we use: https://github.com/wf9a5m75/phonegap-googlemaps-plugin It might be a little bit tricky to install but it does what you need. We used it in a project that targets both iOS and Android.
type: Answer
answers question: http://stackoverflow.com/q/26542233

http://stackoverflow.com/q/26629772
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26629857
has comment: http://stackoverflow.com/comment/41868031
linked to: http://stackoverflow.com/q/15806237
has comment: http://stackoverflow.com/comment/41868015
linked to: http://stackoverflow.com/q/570642
score: 0
duplicate of: http://stackoverflow.com/q/570642
type: Question
tagged with: javascript
has title: how to descrease the height of select box .It is loading with large number of records
answer count: 1
tagged with: jquery
has body: how to descrease the height of select box .It is loading with large number of records like 200 or three hundered.I want to make it smaller

http://stackoverflow.com/q/26538235
tagged with: performance
has comment: http://stackoverflow.com/comment/41702244
has answer: http://stackoverflow.com/a/26538267
tagged with: mobile
upvote count: 0
tagged with: arrays
answer count: 1
tagged with: javascript
favorite count: 0
has title: The maximum size of array not to ruin the performance on smartphones?
has comment: http://stackoverflow.com/comment/41702094
has comment: http://stackoverflow.com/comment/41702086
has body: I am currently building a mobile application for smartphones What is the maximum size of array of English words that I can include in my program, which will not effect the performance of the phone? Is it an array of English words of 500K words? Thanks a lot Stack Overflow!
has comment: http://stackoverflow.com/comment/41702084
accepted answer: http://stackoverflow.com/a/26538267
score: -1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41702180
downvote count: 1
type: Question

http://stackoverflow.com/a/26584890
score: 1
accepted answer of: http://stackoverflow.com/q/26544635
answers question: http://stackoverflow.com/q/26544635
type: AcceptedAnswer
downvote count: 0
has body: It seems to be related to Yosemite turning off /etc/launchd.conf, so NetBeans doesn't get the correct PATH variable - so not directly related to Karma. I fixed it by setting PATH=${PATH}:/usr/local/bin in netbeans.conf (within the NetBeans app package). Then the karma part of the build script runs successfully within NetBeans.
type: Answer
upvote count: 1

http://stackoverflow.com/a/26553309
type: Answer
has comment: http://stackoverflow.com/comment/41729301
upvote count: 1
has comment: http://stackoverflow.com/comment/41729040
has comment: http://stackoverflow.com/comment/41730731
has comment: http://stackoverflow.com/comment/41729433
has comment: http://stackoverflow.com/comment/41729499
has body: If I am understanding you correctly, you want to make it so the textbox doesn't even show unless it is required. I modified the code a bit so that you don't need the list of if statements. By making an array that corresponds to the selectedIndex, you can just check the property! Find the jsFiddle here: http://jsfiddle.net/of1sdq11/19/ First, I made the textbox start hidden. If the display is set to none, it will not be submitted with the form. If display is anything other than none, it will display and submit with the form. If you just wanted an invisible field that was always submitted, you would use visibility set to hidden instead! &lt;input type="text" name="gvw" id="gvw" onfocus="this.select()" message="Please enter gross vehicle weight." value="" style="display:none;"&gt; Then I modified your code to show the textbox if the properties match. Now all you have to do is set whether required is true or false in the "is_required" variable to match the corresponding selectedIndex and it should work. function GVW(){ var dropdown1 = document.getElementById('vehiclebody'); var textbox = document.getElementById('gvw'); // Array for storing whether the textbox is required var is_required = [false, true, false, true, false, true]; // If dropdown1.selectedIndex is 0, it will pull the value from the 0 slot // of the is_required array if(is_required[dropdown1.selectedIndex]) { textbox.required = true; textbox.style.display = "inline-block"; } else { textbox.value = ""; textbox.required = false; textbox.style.display = "none"; } } Now on whatever page you are submitting to, you can just check to see if the textbox even existed in the form submission, and if it did, get the data, otherwise skip it! jQuery Version With Modifications After further discussion with the OP, I rewrote this to work with all jQuery, along with adding the ability to hide a label in addition. I thought that others may find it helpful, so I wanted to post it here. Find the fiddle here: http://jsfiddle.ne…
has comment: http://stackoverflow.com/comment/41729021
answers question: http://stackoverflow.com/q/26552754
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26552754
score: 1

http://stackoverflow.com/comment/41880081
type: QuestionComment
comment on: http://stackoverflow.com/q/26635874
score: 1
has text: Sure you are - when you do `a.b.c...` without knowing what's there you're writing code that might throw so that `rejext` after the catch is at best redundant.
type: Comment

http://stackoverflow.com/comment/41925324
has text: So if you have 2 more child scopes wrapping you will do `$parent.$parent.$parent.myModel` ? weird no?
type: AnswerComment
comment on: http://stackoverflow.com/a/26661513
score: 0
type: Comment

http://stackoverflow.com/comment/41695107
type: AnswerComment
comment on: http://stackoverflow.com/a/26534307
score: 0
type: Comment
has text: @freakish: Sorry about that. I did notice that, but it wouldn't let me rollback my own edit. I do think it's probably not a great idea to have both `myage` and `this.myage` however since it's pretty hard to read.

http://stackoverflow.com/q/26660913
has body: I use this html to load the bing map scripts: in firefox: script loads and adds another script tag to head, then the second script loads (can see in firebug Net tab): in phantomjs: i hook to page.onResourceRequested and print request url. result is that only the first script is requested, veapicore.js is not requested for reason unknown to me. what is happening here?
tagged with: phantomjs
score: 1
has answer: http://stackoverflow.com/a/26665718
linked to: http://stackoverflow.com/q/12021578
tagged with: bing-maps
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/41989904
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/41931759
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41989828
has comment: http://stackoverflow.com/comment/41989921
has title: Bing maps not loading

http://stackoverflow.com/q/26593633
type: AnsweredQuestion
has title: Replace Div content with jQuery/AJAX - with button ID
score: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26594139
tagged with: ajax
has comment: http://stackoverflow.com/comment/41802199
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26593760
favorite count: 0
accepted answer: http://stackoverflow.com/a/26593760
has body: I'm building a website that is like a "choose your own adventure" type game. On the page there will be a question with three different choices (as buttons) for the user. When they click on the button jQuery and AJAX will replace the question text with a new question from a separate HTML file. All of the buttons will be replaced as well and will be written up in that separate HTML file. My problem is that I need a way to have each button have their own ID number so that when jQuery gets the request to change the question it goes to a specific file with a new question that matches the ID number on the button. So each button will have an ID that corresponds to the new question. In short: Is there a way to retrieve an ID or data attribute from a clicked button, and pass that information into my jQuery/AJAX function? Thanks!
upvote count: 2
linked to: http://stackoverflow.com/q/2599971
downvote count: 1
has answer: http://stackoverflow.com/a/26594139

http://stackoverflow.com/a/26646745
type: Answer
score: 0
has body: You can use the following jQuery code: $(this).parent().show();
answers question: http://stackoverflow.com/q/26646710

http://stackoverflow.com/comment/41828033
has text: I have tried to add the code as follows: $(document).ready(function() { initialiseGoogleMaps($('#google-map-<?php echo $uuid; ?>')); var map = '#google-map-<?php echo $uuid; ?>'; google.maps.event.addListener(map, 'center_changed', function() { var center = map.getCenter(); console.log(center); }); }); but I get the error: TypeError: c is undefined?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26606463
type: AnswerComment

http://stackoverflow.com/a/26580174
score: -1
downvote count: 2
upvote count: 1
has body: If you go on the Facebook developers page, you can access the code for a Facebook "like" plugin in multiple languages and try to figure it out from there.
answers question: http://stackoverflow.com/q/26580158
type: Answer
has comment: http://stackoverflow.com/comment/41777379

http://stackoverflow.com/q/26527153
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: dom-events
favorite count: 0
tagged with: firefox-addon
tagged with: google-chrome-extension
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: mutation-observers
has body: I am writing an extension to detect some malicious behavior of some scripts. These scripts add some nodes into the DOM after page gets loaded. I am able to get these nodes using document.addEventListener("DOMNodeInserted", checkContents, false); But how can I stop them from being loaded? Can this be done in Chrome or Firefox?
has answer: http://stackoverflow.com/a/26531202
has title: How to stop a new node being added to DOM using Chrome/Firefox extension?

http://stackoverflow.com/q/26609497
answer count: 0
tagged with: d3.js
has body: Can somebody explain what this block of code does: colorScale = (options.colors) ? d3.scale.ordinal().range(options.colors.map( function (d) { return (is.Number(d)) ? toHexColor(d) : d; })) : d3.scale.category20();
has comment: http://stackoverflow.com/comment/41831151
type: Question
has comment: http://stackoverflow.com/comment/41831695
tagged with: javascript
has comment: http://stackoverflow.com/comment/41830955
has comment: http://stackoverflow.com/comment/41831470
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41831735
has title: What does d3.scale.ordinal() mean

http://stackoverflow.com/comment/41731300
comment on: http://stackoverflow.com/a/26554533
has text: You didn't answer your own question *"Can someone tell me why?"*. You just reiterated what you had already demonstrated in the question and then gave a solution, which may or may not work in some cases.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26567564
tagged with: javascript
has body: I want to create a list of cards, but instead of a list of playing cards that are easily numbered 1-13, it would return different information. Using baseball players and their home run totals as an example, I created this 2D array, a function to create a Player object, and a function to create the image file name: var players = [ ['Barry Bonds', 'LF', 73], ['Mark McGwire', '1B', 70], ['Jean Beliveau', 'RF', 66], ['Roger Maris', 'RF', 61], ] function Player(name,position,rating) { this.name = name; this.position = position; this.homeruns = homeruns; this.fname = fname; } function fname() { return "images/" + this.name + " " + this.position + " " + this.rating + ".jpg"; } After that, it gets messy. My thinking is that I would use a loop to grab the first column of the 2D Array using players[i][#] for each piece of information I want to return. The part I directly adapted from my tutorials looks like this, and it's definitely full of logical mistakes: function list() this.players = new Array(3); this.bpa = 0; for (i=0; i&lt;3; i++) { this.players[i-1] = new Player(name,position,homeruns) var name = players[i][0]; var position = players[i][1]; var homeruns = players[i][2];} this.createList = createList} function createList() { return this.players [ this.bpa++ ];} There's a whole bunch of things I intend to do with this, but I'd at least like to figure out how to generate at least one image with a file name like "Barry Bonds LF 73.jpg" and print it to the web page before I figure out anything else. Can anyone point me in the right direction here?
score: 0
has title: Creating image files from a 2D array - JavaScript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26567643
type: Question
tagged with: arrays
answer count: 1

asynchronous
tags question: http://stackoverflow.com/q/26579511
tags question: http://stackoverflow.com/q/26654145
tags question: http://stackoverflow.com/q/26515671
tags question: http://stackoverflow.com/q/26546226
tags question: http://stackoverflow.com/q/26566535
type: Tag
tags question: http://stackoverflow.com/q/26553154
tags question: http://stackoverflow.com/q/26643941
tags question: http://stackoverflow.com/q/26608332
tags question: http://stackoverflow.com/q/26672731
tag name: asynchronous
tags question: http://stackoverflow.com/q/26532679
tags question: http://stackoverflow.com/q/26615966
tags question: http://stackoverflow.com/q/26638235
tags question: http://stackoverflow.com/q/26547431
tags question: http://stackoverflow.com/q/26566759
tags question: http://stackoverflow.com/q/26563787
tags question: http://stackoverflow.com/q/26542436
tags question: http://stackoverflow.com/q/26655836
tags question: http://stackoverflow.com/q/26552494
tags question: http://stackoverflow.com/q/26603969
tags question: http://stackoverflow.com/q/26520481
tags question: http://stackoverflow.com/q/26564945
tags question: http://stackoverflow.com/q/26666487
tags question: http://stackoverflow.com/q/26600705
tags question: http://stackoverflow.com/q/26516033
tags question: http://stackoverflow.com/q/26634970
tags question: http://stackoverflow.com/q/26541704

http://stackoverflow.com/comment/41939806
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26669284
type: Comment
has text: ok sorry if i didn't explain well enough. I looked at your plunker code and if we add a default value like this ` `, i want the code to run on startup and show the border of the field as "RED". (when you use the color picker manually, it updates the border color with the color you chose)

http://stackoverflow.com/comment/41719842
type: QuestionComment
has text: No it is valid , you can create a window like that. i guess your js library may not loaded during the getForm() method
comment on: http://stackoverflow.com/q/26548041
score: 0
type: Comment

http://stackoverflow.com/q/26654474
has answer: http://stackoverflow.com/a/26654932
accepted answer: http://stackoverflow.com/a/26654605
has comment: http://stackoverflow.com/comment/41911942
upvote count: 1
type: AnsweredQuestion
has title: JavaScript and extending 3rd party API
score: 1
has answer: http://stackoverflow.com/a/26654605
type: Question
answer count: 2
has body: I'm updating my knowledge about JavaScript and I stuck on one lesson task. I have API that is returning string... API.workerName = function (worker) { return worker.firstName + ' ' + worker.lastName; }; The task is to prefix returning string and not change API, but extend it. I also have to avoid copying &amp; pasting code, because 3rd party code can change. I should re-use it instead. What I did is change this function after loading API... API.workerName = function (worker) { return '(' + worker.position + ') ' + worker.firstName + ' ' + worker.lastName; }; ... but I think I did it wrong.
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26654932
has comment: http://stackoverflow.com/comment/41941221

arrow-functions
tag name: arrow-functions
type: Tag
tags question: http://stackoverflow.com/q/26527291

http://stackoverflow.com/comment/41907892
type: QuestionComment
has text: All you need is an iframe. Just create an iframe in your model-content div.
comment on: http://stackoverflow.com/q/26652193
score: 0
type: Comment

http://stackoverflow.com/q/26586798
duplicate of: http://stackoverflow.com/q/2000656
has answer: http://stackoverflow.com/a/26586857
upvote count: 0
has comment: http://stackoverflow.com/comment/41789119
has body: now i have the following code: Selecione sua cidade João Pessoa - PB Outros What i need: When visitor click on dropdown menu and select a option , they go to http://www.example.com Each option will go to different adress. Value='JP' goes to example.com Value='outros' goes to example2.com Thanks! EDIT: I'm using this But still not working, and how to use to open different links: Select option 1 = www.example1.com Select option 2 = www.example2.com
score: -2
possible better answer: http://stackoverflow.com/a/26586858
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26586858
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26586856
has comment: http://stackoverflow.com/comment/41788789
has title: How to get value from and use
favorite count: 0
has answer: http://stackoverflow.com/a/26586970
downvote count: 2
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41788869
accepted answer: http://stackoverflow.com/a/26586856
linked to: http://stackoverflow.com/q/2000656
has comment: http://stackoverflow.com/comment/41788816
has comment: http://stackoverflow.com/comment/41788958
has comment: http://stackoverflow.com/comment/41788747
has comment: http://stackoverflow.com/comment/41789030
type: Question

http://stackoverflow.com/a/26614258
accepted answer of: http://stackoverflow.com/q/26614121
has comment: http://stackoverflow.com/comment/41841868
answers question: http://stackoverflow.com/q/26614121
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41840980
has body: What you want to do is to scrape the websites in question by getting their html code and sorting it using some form of logic - I recomend xPath for this. then you can implement this data into some nice native interface. You need however to be very aware that the data you get is not allways formated the way you want so all of your algorithems have to be very flexible. the proccess can be cut into steps like this retrive data from website (DefaultHttpClient and AsyncTask) analyse and retrive relevant data (your relevant algorithm) show data to user (Your interface implementation) UPDATE Bellow is some example code to fetch some data of a website it implements html-cleaner libary and you will need to implement this in your project. class GetStationsClass extends AsyncTask&lt;String, String, String&gt; { @Override protected String doInBackground(String... params) { HttpClient httpclient = new DefaultHttpClient(); httpclient.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); httpclient.getParams().setParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET, "iso-8859-1"); HttpPost httppost = new HttpPost("http://ntlive.dk/rt/route?id=786"); httppost.setHeader("Accept-Charset", "iso-8859-1, unicode-1-1;q=0.8"); try { // Add your data List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(3); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "utf-8")); // Execute HTTP Post Request HttpResponse response = httpclient.execute(httppost); int status = response.getStatusLine().getStatusCode(); String data = ""; if (status != HttpStatus.SC_OK) { ByteArrayOutputStream ostream = new ByteArrayOutputStream(); response.getEntity().writeTo(ostream); data = ostream.toString(); } else { BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "iso-8859-1")); String line = null; while ((line = reader.readLine()) != null) { data += line; } XPath xpath = XPathFactory.newInstance().newXPath…
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/41841220
has comment: http://stackoverflow.com/comment/41841357
score: 1

http://stackoverflow.com/comment/41736525
type: Comment
comment on: http://stackoverflow.com/a/26557579
has text: wait typo? Not sure that I see it... but i've been looking at it for like 8 hours straight now. I tried that logic, still nothing happening.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/41860084
has text: As Regent said, you should add you're script into a $(document).ready(function(){ code }); It means that it will run the script when you're document is ready. This should fix you're error.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26625023

http://stackoverflow.com/a/26582401
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26582293
has body: As hinted by Andrew, use this.say instead of this.say() In your code you also miss closing } , It should be like this, var myClass= function () { this.property = ''; this.say = function () { alert('Say Hello'); } } var myClassObj= new myClass(); myClassObj.property = 'property'; myClassObj.say();

http://stackoverflow.com/comment/41756703
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26568723
has text: @WilliamLepinski I've covered the cross domain issue. Tomas Kirda and Anik solution were correct. Thanks

http://stackoverflow.com/a/26549626
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/41721875
upvote count: 2
has body: So, assuming an array like this: var a = ["car1-coupe", "car2-convertible", "car2-hatchback", "car2-estate", "car3-hatchback", "car3-estate"]; You can do this: var b = a.reduce(function(prev, curr){ var car = curr.split('-')[0]; // "get" the current car prev[car] = prev[car] || []; // Initialize the array for the current car, if necessary. prev[car].push(curr); // Add the current item to the array. return prev; }, {}); This will return the following object: { car1: ["car1-coupe"], car2: ["car2-convertible", "car2-hatchback", "car2-estate"], car3: ["car3-hatchback", "car3-estate"] }
has comment: http://stackoverflow.com/comment/41721807
has comment: http://stackoverflow.com/comment/41721983
downvote count: 0
has comment: http://stackoverflow.com/comment/41721782
answers question: http://stackoverflow.com/q/26549445
has comment: http://stackoverflow.com/comment/41721815

http://stackoverflow.com/comment/41813659
score: 0
type: Comment
type: QuestionComment
has text: You may have gathered by now that I am no Einstein when it comes to this stuff. It is just dawning on me what you may be using the scratchpad to show -- how to insert code in the page correctly -- correct? So what you're asking me to do is to try to emulate it?
comment on: http://stackoverflow.com/q/26577954

http://stackoverflow.com/comment/41833826
score: 0
type: AnswerComment
has text: #container is an element for placing #ingredients element
type: Comment
comment on: http://stackoverflow.com/a/26610978

http://stackoverflow.com/a/26640809
has comment: http://stackoverflow.com/comment/41888966
has comment: http://stackoverflow.com/comment/41888870
has comment: http://stackoverflow.com/comment/41888558
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41888571
type: Answer
accepted answer of: http://stackoverflow.com/q/26640527
answers question: http://stackoverflow.com/q/26640527
has body: You can float #3 (first in content order) to the right, and float #1 and #2 to the left. Remove the floats for smaller screen dimensions.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41888646

http://stackoverflow.com/a/26664304
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/41960650
answers question: http://stackoverflow.com/q/26663777
has comment: http://stackoverflow.com/comment/56455637
accepted answer of: http://stackoverflow.com/q/26663777
has comment: http://stackoverflow.com/comment/41961750
has comment: http://stackoverflow.com/comment/41961282
has comment: http://stackoverflow.com/comment/41961453
has body: In Select2 3.x, the highlighted result in the dropdown will always be the first result during searches. This will be changing in Select2 4.x, so the selected option will be selected if it is present. You are looking for the results to be sorted differently. By default, Select2 orders options by the order that they have within the DOM, not by how relevant they are. The documentation provides an example of how to customize the sorting of results using the sortResults option. Keep in mind that it is more efficient to sort the results on the server side when using AJAX, which is why Select2 does not do any further sorting. This would explain why "Arkansas" is being returned when searching for "Alabama".
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41952773
type: Answer

coordinates
tags question: http://stackoverflow.com/q/26520755
tag name: coordinates
type: Tag
tags question: http://stackoverflow.com/q/26615111
tags question: http://stackoverflow.com/q/26668556
tags question: http://stackoverflow.com/q/26538669

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/26670478

http://stackoverflow.com/comment/41765773
comment on: http://stackoverflow.com/q/26574030
has text: So is there no way to test this? I understand what you are saying, but I can't even view it first?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41673816
score: 0
type: Comment
has text: Thanks! This seemed to fix it.
comment on: http://stackoverflow.com/a/26522614
type: AnswerComment

http://stackoverflow.com/a/48897008
answers question: http://stackoverflow.com/q/26647720
type: Answer
downvote count: 1
has body: You need to use Node emitter for that, if you use Node in the first place of course. const EventEmitter = require('events'); class MyEmitter extends EventEmitter {} const myEmitter = new MyEmitter(); myEmitter.on('event', (someProps) =&gt; { console.log('an event occurred!'); }); myEmitter.emit('event', {...someProps}); Then you can access the json and call any further actions that is required. Working with events might make you to restructure your application slightly. https://nodejs.org/docs/latest/api/events.html#events_emitter_on_eventname_listener
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/84799813

http://stackoverflow.com/comment/41919830
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26658480
score: 0
has text: Please clarify jshint vs. jslint, I guess the former?

http://stackoverflow.com/a/26672811
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26672460
has comment: http://stackoverflow.com/comment/41946328
type: Answer
has comment: http://stackoverflow.com/comment/41946006
has comment: http://stackoverflow.com/comment/41945976
has body: I request you to post what you have tried before asking in SO in future! though Solution is here Product Name $1000 Css .product-image{ border:1px solid #ccc; width:100px; height:100px; background-color:#f6f6f6; } .prod-name,.prod-price{ font-size:12px; text-align:center; } JS $('.show-price').click(function(){ $(this).hide(); $('.prod-price').show(); }); Working fiddle here http://jsfiddle.net/raghuchandrasorab/njt1sfew/1/
score: 0
answers question: http://stackoverflow.com/q/26672460

http://stackoverflow.com/comment/41730938
comment on: http://stackoverflow.com/q/26554568
score: 0
type: Comment
type: QuestionComment
has text: This [SO][1] may help you to understand what you are experiencing [1]: http://stackoverflow.com/questions/1379934/large-numbers-erroneously-rounded-in-javascript

http://stackoverflow.com/a/26552850
answers question: http://stackoverflow.com/q/26552749
has body: There's the for-of loop proposed in ECMAScript 6. for (obj of a){ var keys = Object.keys(obj) // if you don't know the keys var value = obj[keys[0]] //in case your object has only one key } This feature appeared in Firefox 31 and it is shipped with Chrome 38. IE doesn't implement it. Don't know about other browsers. Alternatively, a.forEach(function(obj){ var keys = Object.keys(obj) // if you don't know the keys var value = obj[keys[0]] //in case your object has only one key });
downvote count: 0
has comment: http://stackoverflow.com/comment/41727785
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/41742878
score: 0
comment on: http://stackoverflow.com/a/26561143
type: Comment
has text: As @dandavis said, using `with` is not recommended. Here's why - http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/
type: AnswerComment

http://stackoverflow.com/comment/41719605
has text: @pataluc Not the bookmarklet itself, but rather what inputs the code in the body tag.
comment on: http://stackoverflow.com/q/26548431
score: 0
type: Comment
type: QuestionComment

magento
tags question: http://stackoverflow.com/q/26605466
tag name: magento
tags question: http://stackoverflow.com/q/26645847
type: Tag

http://stackoverflow.com/a/26542694
upvote count: 9
answers question: http://stackoverflow.com/q/26537720
downvote count: 0
type: Answer
has body: Firebase.remove() like probably most Firebase methods is asynchronous, thus you have to listen to events to know when something happened: parent = ref.parent() parent.on('child_removed', function (snapshot) { // removed! }) ref.remove() According to Firebase docs it should work even if you lose network connection. If you want to know when the change has been actually synchronized with Firebase servers, you can pass a callback function to Firebase.remove method: ref.remove(function (error) { if (!error) { // removed! } }
score: 9

http://stackoverflow.com/a/27794579
answers question: http://stackoverflow.com/q/26591559
upvote count: 6
has body: if you want to clear the data present in dataTable simply call table.clear() it clears all cells in table. and then add new data using table.row.add().draw(); table.destroy() does not removes data present in cell of table, it only destroys the current instance of dataTable you created.
score: 6
has comment: http://stackoverflow.com/comment/90225905
downvote count: 0
type: Answer

http://stackoverflow.com/comment/41873674
type: Comment
type: QuestionComment
has text: You know when you fire your function and then remove the child, the event handler is also removed. Meaning, you hav no click event and mouse over events. You have to add them back.
comment on: http://stackoverflow.com/q/26630504
score: 0

http://stackoverflow.com/q/26585124
has answer: http://stackoverflow.com/a/26585249
answer count: 3
has answer: http://stackoverflow.com/a/26585390
downvote count: 1
favorite count: 0
upvote count: 0
tagged with: angularjs
has body: The codes can be viewed at https://github.com/darylrowland/angucomplete/blob/master/angucomplete.js A snippet looks like this: angular.module('angucomplete', [] ) .directive('angucomplete', function ($parse, $http, $sce, $timeout) { return { restrict: 'EA', scope: { "id": "@id", "placeholder": "@placeholder", "selectedObject": "=selectedobject", "url": "@url", "dataField": "@datafield", "titleField": "@titlefield", "descriptionField": "@descriptionfield", "imageField": "@imagefield", "imageUri": "@imageuri", "inputClass": "@inputclass", "userPause": "@pause", "localData": "=localdata", "searchFields": "@searchfields", "minLengthUser": "@minlength", "matchClass": "@matchclass" }, What I can't understand is the magic @ and = string. Is it a special char in AngularJS?(I'm not sure because search a sign in google is hard..) If so, what is its usage?
type: AnsweredQuestion
has title: What does "@" and "=" mean in the angularJS scope?
has answer: http://stackoverflow.com/a/26585391
type: Question
possible better answer: http://stackoverflow.com/a/26585249
accepted answer: http://stackoverflow.com/a/26585390
tagged with: javascript
score: -1

http://stackoverflow.com/comment/41868591
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26629615
has text: Thanks, I got that thought from your above post but I was trying `||` instead of what you did in the above comment :)
score: 0

mysql
tags question: http://stackoverflow.com/q/26606024
tags question: http://stackoverflow.com/q/26545220
tag name: mysql
tags question: http://stackoverflow.com/q/26664247
tags question: http://stackoverflow.com/q/26556221
tags question: http://stackoverflow.com/q/26652957
tags question: http://stackoverflow.com/q/26545568
tags question: http://stackoverflow.com/q/26671245
tags question: http://stackoverflow.com/q/26616324
tags question: http://stackoverflow.com/q/26606386
tags question: http://stackoverflow.com/q/26551393
tags question: http://stackoverflow.com/q/26529941
tags question: http://stackoverflow.com/q/26599745
tags question: http://stackoverflow.com/q/26665639
tags question: http://stackoverflow.com/q/26596308
tags question: http://stackoverflow.com/q/26569265
tags question: http://stackoverflow.com/q/26651447
tags question: http://stackoverflow.com/q/26634882
tags question: http://stackoverflow.com/q/26671141
tags question: http://stackoverflow.com/q/26664718
type: Tag
tags question: http://stackoverflow.com/q/26628325
tags question: http://stackoverflow.com/q/26667678
tags question: http://stackoverflow.com/q/26640876
tags question: http://stackoverflow.com/q/26665193
tags question: http://stackoverflow.com/q/26536252
tags question: http://stackoverflow.com/q/26566447
tags question: http://stackoverflow.com/q/26594123
tags question: http://stackoverflow.com/q/26529530
tags question: http://stackoverflow.com/q/26646877
tags question: http://stackoverflow.com/q/26617792
tags question: http://stackoverflow.com/q/26572282
tags question: http://stackoverflow.com/q/26524868
tags question: http://stackoverflow.com/q/26549089
tags question: http://stackoverflow.com/q/26543079
tags question: http://stackoverflow.com/q/26554515
tags question: http://stackoverflow.com/q/26625481
tags question: http://stackoverflow.com/q/26522481
tags question: http://stackoverflow.com/q/26565124
tags question: http://stackoverflow.com/q/26552544

http://stackoverflow.com/comment/41698339
type: QuestionComment
comment on: http://stackoverflow.com/q/26530816
has text: For example, why the initialisation process for prototype is faster than Closure?
score: 0
type: Comment

http://stackoverflow.com/a/26614648
has comment: http://stackoverflow.com/comment/41847247
has body: It looks like you need to call profileSave.save() again within the success function, but this time WITHOUT arguments.
has comment: http://stackoverflow.com/comment/41841165
score: 0
has comment: http://stackoverflow.com/comment/41841262
has comment: http://stackoverflow.com/comment/41840885
answers question: http://stackoverflow.com/q/26614331
has comment: http://stackoverflow.com/comment/41841894
type: Answer

http://stackoverflow.com/q/26645785
has body: I am Using CIRCULAR CONTENT CAROUSEL WITH JQUERY by tympanus , in this using jquery plugin left position is increasing 200px for every time . But i need only 170px. How can i Change in that plugin. Please help me.
downvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26646110
score: -1
tagged with: jquery-plugins
has title: How to change the position in CIRCULAR CONTENT CAROUSEL WITH JQUERY by tympanus
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26646110
favorite count: 0

http://stackoverflow.com/a/26531912
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26530520
has body: You can use jQuery's "position": Given element: &lt;span id="el"&gt;&lt;/span&gt; JavaScript: var el = $("#el").position(), x = el.left, y = el.top; $("#el").append("("+ x + " , " + y + ")"); JS BIN: http://jsbin.com/lujoxoladi/1/edit?html,css,js,output
type: Answer
score: 1

http://stackoverflow.com/comment/41825253
has text: hmm.. wouldn't all the instances of MyClass share same "private" attributes then?
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26577636

http://stackoverflow.com/comment/41710210
type: Comment
comment on: http://stackoverflow.com/a/26543066
has text: This will still result in only the last element being checked. The solution is to either bind by `the_ID()` or use `$(this)` as in Mihais answer.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26652789
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26652324
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26652324
type: Answer
has body: Edit your body tag to 10:26:07 Than add bellow code where you want clock to appear

http://stackoverflow.com/q/26657882
has comment: http://stackoverflow.com/comment/41919067
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/41918841
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41919300
has comment: http://stackoverflow.com/comment/41918925
has comment: http://stackoverflow.com/comment/41918908
has body: I saw this cool transition for the circles in an image slider (the ones showing you what picture you're up to) on Stripe.com and I decided to try duplicating it. This only seems to work on Chrome and Opera My attempt went decently enough, but there's one bug that seems inexplicable. When clicking on the last circle, any circle that previously had been filled will sort of fade out. JSfiddle Relevant HTML: Relevant CSS: .coolBubble circle { stroke: rgb(35, 0, 0); transition: stroke-width 300ms ease-in-out; } .selected circle { stroke-width: 8px; } Relevant JS: function jump_to_position(newIndex) { if (currIndex === newIndex) { return false; } var currBubble = '#bubble' + (currIndex); var newBubble = '#bubble' + (newIndex); $(currBubble).removeClass('selected'); $(newBubble).addClass('selected'); currIndex = newIndex; }
type: Question
has comment: http://stackoverflow.com/comment/41919022
has comment: http://stackoverflow.com/comment/41919271
tagged with: javascript
tagged with: jquery
has title: Strange behavior with svg circles
has comment: http://stackoverflow.com/comment/41918659

http://stackoverflow.com/a/26541761
type: Answer
downvote count: 0
score: 1
has body: See the difference between small 'a' and capital 'A', both of which have respective ASCII values 97 and 65. For capital letter 'A' (ASCII value 65) var letter={ '65':2438 } document.body.addEventListener('keypress',function(e){ alert(String.fromCharCode(letter[e.keyCode])); }); For small letter 'a' (ASCII value 97) var letter={ '97':2438 } document.body.addEventListener('keypress',function(e){ alert(String.fromCharCode(letter[e.keyCode])); });
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26527152
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41711554
answers question: http://stackoverflow.com/q/26527152
has comment: http://stackoverflow.com/comment/41710347

http://stackoverflow.com/comment/41699206
comment on: http://stackoverflow.com/q/26535963
score: 0
has text: @dave how does that solve the audio reloading problem? I find using setTimeout too CPU-intensive and this seems like a task that can be done through other methods.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41812541
comment on: http://stackoverflow.com/q/26599031
type: Comment
type: QuestionComment
has text: field or fields? - I ask because both of your code samples have different references.
score: 0

wordpress
tags question: http://stackoverflow.com/q/26652459
tags question: http://stackoverflow.com/q/26598876
tags question: http://stackoverflow.com/q/26620134
tags question: http://stackoverflow.com/q/26611734
tags question: http://stackoverflow.com/q/26635685
tags question: http://stackoverflow.com/q/26514689
tags question: http://stackoverflow.com/q/26596615
tags question: http://stackoverflow.com/q/26667699
tags question: http://stackoverflow.com/q/26614844
tags question: http://stackoverflow.com/q/26627085
tags question: http://stackoverflow.com/q/26540978
tags question: http://stackoverflow.com/q/26519090
tags question: http://stackoverflow.com/q/26588963
tags question: http://stackoverflow.com/q/26537605
tags question: http://stackoverflow.com/q/26534284
tags question: http://stackoverflow.com/q/26541721
tags question: http://stackoverflow.com/q/26564773
tags question: http://stackoverflow.com/q/26671899
tags question: http://stackoverflow.com/q/26515386
tags question: http://stackoverflow.com/q/26529638
tags question: http://stackoverflow.com/q/26591100
tags question: http://stackoverflow.com/q/26614234
tags question: http://stackoverflow.com/q/26537249
tag name: wordpress
tags question: http://stackoverflow.com/q/26623091
tags question: http://stackoverflow.com/q/26583978
tags question: http://stackoverflow.com/q/26607013
tags question: http://stackoverflow.com/q/26636186
tags question: http://stackoverflow.com/q/26535616
tags question: http://stackoverflow.com/q/26574267
tags question: http://stackoverflow.com/q/26665763
tags question: http://stackoverflow.com/q/26574475
tags question: http://stackoverflow.com/q/26573749
tags question: http://stackoverflow.com/q/26631217
tags question: http://stackoverflow.com/q/26662881
tags question: http://stackoverflow.com/q/26593338
tags question: http://stackoverflow.com/q/26614122
tags question: http://stackoverflow.com/q/26578458
tags question: http://stackoverflow.com/q/26587400
tags question: http://stackoverflow.com/q/26667485
type: Tag
tags question: http://stackoverflow.com/q/26638847
tags question: http://stackoverflow.com/q/26659292
tags question: http://stackoverflow.com/q/26668569
tags question: http://stackoverflow.com/q/26542822

http://stackoverflow.com/comment/41802924
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26581487
type: AnswerComment
has text: I don't think you can declare variables in an ember controller though... I just tried it to make sure and got an error.

http://stackoverflow.com/a/26587976
has comment: http://stackoverflow.com/comment/117804532
has comment: http://stackoverflow.com/comment/117701219
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/113399859
accepted answer of: http://stackoverflow.com/q/26584280
type: Answer
has comment: http://stackoverflow.com/comment/50352711
upvote count: 16
has body: No need for another scale. For linear (numeric) input you can use linear.invert(), which: Returns the value in the input domain x for the corresponding value in the output range y. This represents the inverse mapping from range to domain. Example: var x = d3.scale.linear() .domain([0,50]) .range([0,100]); // domain to range: x(25); // 50 // range to domain: x.invert(50); // 25
score: 16
answers question: http://stackoverflow.com/q/26584280

http://stackoverflow.com/q/26518985
has body: I am currently working with a massive Newick Tree. I am looking for an efficient way to overlay some other data I have about the nodes. I have tried using dendroscope and ETE but have little luck as ETE cannot handle my tree as it is massive and dendroscope is too basic to implement coloring. So I am wondering if anybody knows of any efficient ways to visualize my data? (I understand this is an inappropriate question for SO I just have ran out of leads on this problem)
tagged with: javascript
score: 0
tagged with: visualization
has comment: http://stackoverflow.com/comment/42041943
tagged with: python
tagged with: etetoolkit
answer count: 0
tagged with: bioinformatics
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42041878
has title: Newick Standard and Overlaying other data
type: Question
has comment: http://stackoverflow.com/comment/41999180

http://stackoverflow.com/q/26538473
has title: Open another page/content in another div HTML Javascript
has answer: http://stackoverflow.com/a/26538805
score: 1
possible better answer: http://stackoverflow.com/a/26538586
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41702454
has body: I need your help again. I have 2 divs : sidebar and content. In SIDEBAR I have some links (a b c), When I press an "a" link I want to open pageA.html in CONTENT div, when I press "b" link - pageB.html and so on. I tried whit iframe but i know it's not a great idea, any suggestions folks? Thanks in advance
has answer: http://stackoverflow.com/a/26538876
tagged with: javascript
has answer: http://stackoverflow.com/a/26538620
has comment: http://stackoverflow.com/comment/41702506
accepted answer: http://stackoverflow.com/a/26538805
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/41702520
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26538586
tagged with: css
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/q/26663809
has body: Hello I'm performing a GET request on a RESTful Rails resource, like so: function getGroups(category) { $.ajax({ type: 'GET', url: 'http://localhost:3000/groups.json', data: JSON.stringify({"access_token":"569669d8df0456", "category":category }), success: function(data) {alert(data)}, contentType: "application/json", dataType: 'json' }); }); getGroups("own_groups"); The problem is that Webrick server errors out like this: ERROR bad URI `/groups.json?{%22access_token%22:%22569669d8df0456%22,%22category%22:%22own_groups%22}'. It must be something related with how the JSON data is parsed, because I am having no problems with another GET request WITHOUT JSON data, and a POST request WITH JSON data... Update: adding code for POST request (where JSON.stringify is required) function addGroup(name, description) { $.ajax({ type: 'POST', url: 'http://localhost:3000/groups.json', data: JSON.stringify({"access_token":"569669d8df0456", "group_name":name, "group_description":description}), success: function(data) { alert("ok")}, contentType: "application/json", dataType: 'json' }); }; addGroup("nice group", "full of people");
has title: ERROR: bad URI when sending data as JSON with GET method to a Rails resource
tagged with: rest
type: AnsweredQuestion
tagged with: ruby-on-rails
type: Question
tagged with: webrick
tagged with: http://stackoverflow.com/tag/json
score: 0
has answer: http://stackoverflow.com/a/26663838
accepted answer: http://stackoverflow.com/a/26663838
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/41841046
has text: As it sits, you'll have to make extensive changes to how your code works to do that properly. My suggestion is to code safely from the start and not try to add it in later.
comment on: http://stackoverflow.com/q/26614053
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/26603662
upvote count: 1
answers question: http://stackoverflow.com/q/26603423
type: Answer
downvote count: 0
score: 1
has body: Better Ways : bootstrap spinner DEMO jQuery Spinner jQueryUI spinner bootstrap snipper worked easy: HTML &lt;input type="text" class="aSpinEdit" /&gt; Javascript $('.aSpinEdit').spinedit({ minimum: -10, maximum: 50, step: 1 });

http://stackoverflow.com/q/26532288
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41692508
tagged with: watch
answer count: 0
type: Question
has title: angularjs watch is still being called after deregisterWatch
has body: I'm getting a very weird behavior and I would like to know if this is the expected one or something should be changed. I have a controller with the following piece of code: See demo here: http://fiddle.jshell.net/cqofLqwm/ UserSvc.refreshCyclic(20 * 1000); $scope.$on('userchanged', function onUserChanged(event, user) { stopWatchScopeUser(); $scope.model.user = user; watchScopeUser(); }); function watchScopeUser() { stopWatchScopeUser = $scope.$watch('model.user', function scopeUserChanged(newValue, oldValue) { if (newValue !== oldValue) { console.log('user changed'); } }, true); } watchScopeUser(); UserSvc.refreshCyclic gets the user from server every 20 sec., and checks for user object changes. If there are changes, it raises userchanged event. What is happening here is that even after calling stopWatchScopeUser(), when assigning user to $scope.model.user, the watch expression is called with newValue equal to oldValue, both to the most recent user. (So the condition newValue !== oldValue fails). If I comment stopWatchScopeUser then the scopeUserChanged is called but newValue is different than oldValue. It's quite strange that after detaching the watch on model.user, it is still being called. Is this the normal behavior or there is something incorrect? What should I do to definitely deatach watch listener?
tagged with: javascript
has comment: http://stackoverflow.com/comment/41691919
score: 0
has comment: http://stackoverflow.com/comment/41691779
has comment: http://stackoverflow.com/comment/41691997

http://stackoverflow.com/comment/41904290
comment on: http://stackoverflow.com/a/26648949
score: 0
has text: Thanks, this looks promising, I'll try and update with results. BTW here's the fiddle with what you suggested: http://jsfiddle.net/chankeypathak/71ka00n7/2/
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/41817353
comment on: http://stackoverflow.com/a/26601796
score: 0
type: AnswerComment
type: Comment
has text: could you share apiece of code on how to clone "a" array to "b"

http://stackoverflow.com/a/26551986
has comment: http://stackoverflow.com/comment/41733521
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41731496
type: Answer
answers question: http://stackoverflow.com/q/26550739
score: 0
has body: At first glance, there doesn't seem to be anything populating your y variable in GetReceiveAmount(): // this value will be empty/null if SendingExchangeCommission is empty: var y = $("#SendingExchangeCommission").val(); so when you try to calculate your total here: var total = (x * y).toFixed(2); You might be calculating some numeric value x with a null (or some NaN) value, which will either give you 0 or NaN as a result: // Some examples to show you how multiplying unknown // data types can sometimes give you NaN // Any number * a String = NaN var total = (1 * "someString").toFixed(2); // --&gt; NaN // Any number * NaN = NaN var total = (1 * NaN).toFixed(2); // --&gt; NaN // Any number * Empty String = 0 var total = (1 * " ").toFixed(2); // --&gt; 0.00 // Any number * 0 = 0 var total = (1 * 0).toFixed(2); // --&gt; 0.00 So you could check to make sure you are getting a numeric value in y (#SendingExchangeCommission) before calculating your total. As you can see from the example, if y (#SendingExchangeCommission) is not empty, but is also not a numeric value, then you will get NaN as a result. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // UPDATE: You will want to check if your value inside the input field is in fact, a number. This includes number values with a comma in them. If the system of writing numbers in your country uses a comma instead of a period to separate values (0.0996 vs 0,0996), then you will need to scrub out the comma, because this expression will result in NaN: // The comma in the numeric string will result in NaN var total = (1 * "0,0996").toFixed(2); // --&gt; NaN Where this expression will result in 996.0 // This will give you a proper number var total = (1 * "0.0996").toFixed(2); So the important thing to consider here, is that when you are grabbing values from html text with .val() , or .value, you get a string returned to you, so if you want to perform numeric calculations on that string, you need to be sure that the string value has …
accepted answer of: http://stackoverflow.com/q/26550739
has comment: http://stackoverflow.com/comment/41748457

http://stackoverflow.com/comment/41728864
score: 0
type: Comment
has text: I'm getting : Uncaught ReferenceError: showalert is not defined
type: AnswerComment
comment on: http://stackoverflow.com/a/26552521

http://stackoverflow.com/comment/41741546
score: 0
comment on: http://stackoverflow.com/q/26560430
type: QuestionComment
type: Comment
has text: But do you get the desired effect if you change to $('#fileform').change(function(e) { e.preventDefault(); ... });

http://stackoverflow.com/a/26594789
has comment: http://stackoverflow.com/comment/41817316
answers question: http://stackoverflow.com/q/26594738
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/41817127
score: 2
has comment: http://stackoverflow.com/comment/41804344
has comment: http://stackoverflow.com/comment/41817334
has comment: http://stackoverflow.com/comment/41814836
has body: You need to watch for changes of your model, this is the best you can do to detect changes: $scope.$watch('mydata', function(newVal, oldVal) { if (newVal !== oldVal) { // mydata changed... } });
downvote count: 0

http://stackoverflow.com/q/26656467
upvote count: 1
has title: How to return data in a factory method within Angular?
tagged with: factory
has comment: http://stackoverflow.com/comment/41915737
type: Question
has answer: http://stackoverflow.com/a/26659534
has body: I'm an ionic/Angular n00b and I having trouble wrapping my head around how to do this. I have a factory defined as such: angular.module('starter.services', []) .factory('Calendars', function () { var calendars; var success = function(message) { calendars = message; return calendars; }; var error = function(message) {alert("Error: " + message)}; window.plugins.calendar.listCalendars(success,error); return { all: function() { return calendars; }, get: function(calendarId) { return calendars[calendarId]; } } }); And I'm trying to retrieve the calendars within my controller like this: .controller('CalendarsCtrl', function($scope,Calendars) { $scope.calendars = Calendars.all(); }) The factory method is being called but the results are not available until the 'success' callback is invoked so the CalendarsCtrl is always undefined. How to solve this? Edit - I've corrected the call within the controller. The same issue remains though, that the function does not return results until the success callback.
answer count: 2
has answer: http://stackoverflow.com/a/26657631
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/26629671
accepted answer of: http://stackoverflow.com/q/26628619
answers question: http://stackoverflow.com/q/26628619
downvote count: 0
has comment: http://stackoverflow.com/comment/41868807
upvote count: 6
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41869600
has body: If you have an Angular $injector (ref) for your application, you can easily call a function with dependency injection: $injector.invoke(["$http", myfunction]); You could, for instance, wrap the entire function as: app.onNotificationGCM = function (e) { $injector.invoke(["$http", function($http) { // your code here... it will be dependency injected by Angular }]); }; You will most definitely want to call $apply() - $http calls will not run before, so actually the code should be: app.onNotificationGCM = function (e) { $injector.invoke(["$http", "$rootScope", function($http, $rootScope) { $rootScope.$apply(function() { // your code here... it will be dependency injected by Angular // ... AND called properly in a digest cycle }); }]); }; That is only part one. Now the question is how do you get hold of the proper $injector for your application? If you bootstrap manually, then angular.bootstrap (ref) returns the injector. Just keep it in a (global?) var. You probably use ng-app. Then you will have to identify the element that contains ng-app somehow and call angular.element.injector (ref - look for "jQuery/jqLite Extras"). E.g., if ng-app is in the &lt;body&gt;: // in code OUTSIDE Angular var $injector = angular.element(document.body).injector();
score: 6
type: Answer

http://stackoverflow.com/comment/45686546
comment on: http://stackoverflow.com/q/26640721
score: 0
type: QuestionComment
has text: This looks like an iOS/Safari bug. I've created a [jsbin](http://jsbin.com/titololuwe/1/edit?html,output) for this using AngularJS 1.3, but it's the same problem (=> Angular upgrade doesn't help). The funny thing is that I can reproduce this on iPhone 6, iOS 8.1.3 on Safari, while Chrome works fine. On iPhone 5s, iOS 7.1.2 the bug is not reproducable. Crazy!
type: Comment

http://stackoverflow.com/q/26627629
tagged with: javascript-objects
has answer: http://stackoverflow.com/a/26627741
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26627716
has answer: http://stackoverflow.com/a/26627745
accepted answer: http://stackoverflow.com/a/26627745
has answer: http://stackoverflow.com/a/26627716
score: -1
type: Question
has comment: http://stackoverflow.com/comment/41864315
has title: Filter a specific property out of a JavaScript object
tagged with: javascript
tagged with: jquery
answer count: 3
downvote count: 1
has body: I have the following JavaScript object: Object {article: jQuery.fn.init[11], thesis: jQuery.fn.init[6], chapter: jQuery.fn.init[0], book: jQuery.fn.init[0], proceedings: jQuery.fn.init[0]…} article: jQuery.fn.init[11] book: jQuery.fn.init[0] chapter: jQuery.fn.init[0] proceedings: jQuery.fn.init[0] thesis: jQuery.fn.init[6] translated_title: jQuery.fn.init[1] __proto__: Object Thes thesis property, which is a jQuery object, in more details: thesis: jQuery.fn.init[6] 0: div#supervisors.thesis-related.supervisors.thesis-related.dynamic-field-list.ui-sortable 1: div.row.thesis-related 2: div.row.thesis-related 3: select#degree_type.form-control.thesis-related.degree_typeform-control.thesis-related 4: input#university.form-control.thesis-related.universityform-control.thesis-related 5: select#license.form-control.thesis-related.licenseform-control.thesis-related context: document length: 6 prevObject: jQuery.fn.init[1] selector: "*[class~="thesis-related"]" __proto__: Object[0] I would like to filter the initial object to get all the properties except for the thesis but without using delete operator and without changing the object itself. Edit: The problem arises as described here, in order not to have if statements and filter the object each time with deposition_type value.
favorite count: 0
upvote count: 0

http://stackoverflow.com/q/26519232
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26521894
has body: i need to access to smartphone back-camera through NavigatorUsermedia.getUsermedia(). I found some articles that use only front-camera, without choice. Some ideas? I know that Camera API are not yet supported from no browser.
type: Question
tagged with: camera
tagged with: javascript
score: 0
answer count: 2
has title: javascript NavigatorUserMedia.getUserMedia smartphone back camera
tagged with: asp.net-web-api
linked to: http://stackoverflow.com/q/18625007
tagged with: smartphone
has answer: http://stackoverflow.com/a/37891401

http://stackoverflow.com/comment/41847887
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26618395
has text: #j08691 - My mistake, just wierd to write in the snippit editor, here.. But thanks

http://stackoverflow.com/comment/41821006
type: AnswerComment
has text: Hi thanks for your answer I have tried your solution, but I still get the hover at multiple boxes (except the first one). I made a screenshot what I actually mean: link http://i.imgur.com/pinaBRg.png (for some reason you don't see my mouse when I had made the screenshot) I did what you told me, but maybe I had changed the code the wrong way. This is what I have done now: link: http://pastebin.com/rsMyns7U
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26598648

http://stackoverflow.com/a/26597766
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26595866
type: Answer
score: 2
has body: But why create an empty object with a prototype that gets referenced by Toyota's prototype? Because if you do this: Toyota.prototype = new Car(); Now Toyota's prototype is an instance of Car, which means that in addition to having Car's prototype in the chain, it also has any properties set in the Car constructor itself. Basically you wouldn't want Toyota.prototype to have a property called year like so: Toyota.prototype.year. Because of this it's a lot better to have an empty constructor like so: var ctor = function() { }; ctor.prototype = Car.prototype; Toyota.prototype = new ctor(); Now Toyota.prototype has the new ctor() instance as it's prototype, which in turn has Car.prototype in its own chain. This means that instances of Toyota now can execute methods that exist in Car.prototype. Why doesn't setting a new method on Toyota set it on Car like it does in the first example? With this: Toyota.prototype = Car.prototype; you're setting Toyota' prototype to be the same exact object as what Car.prototype contains. Since it is the same object, changing it in one place also changes it everywhere else. This means that objects are passed be reference and not by value, which is another way of saying that when you assign an object to 3 different variables, it is the same object regardless of which variable you use. Strings for example are passed by value. Here is an example with strings: var str1 = 'alpha'; var str2 = str1; var str3 = str1; str2 = 'beta'; // Changing str2 doesn't change the rest. console.log(str1); //=&gt; "alpha" console.log(str3); //=&gt; "alpha" console.log(str2); //=&gt; "beta" Now compare to objects and their properties; var obj1 = {name: 'joe doe'}; var obj2 = obj1; var obj3 = obj1; console.log(obj1.name); //=&gt; "joe doe" console.log(obj2.name); //=&gt; "joe doe" console.log(obj3.name); //=&gt; "joe doe" obj2.name = 'JOHN SMITH'; console.log(obj1.name); //=&gt; "JOHN SMITH" console.log(obj2.name); //=&gt; "JOHN SMITH" console.log(obj3.name); //=&g…
downvote count: 0
has comment: http://stackoverflow.com/comment/41811908
has comment: http://stackoverflow.com/comment/41811032
has comment: http://stackoverflow.com/comment/41810061
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26595866

http://stackoverflow.com/q/26642174
tagged with: angularjs
has answer: http://stackoverflow.com/a/29035308
score: 16
has comment: http://stackoverflow.com/comment/41891195
upvote count: 16
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26642394
has answer: http://stackoverflow.com/a/26642498
accepted answer: http://stackoverflow.com/a/26642498
has answer: http://stackoverflow.com/a/26643082
type: Question
downvote count: 0
tagged with: javascript
has body: I have next service: angular.module('app').service('BaseService', function (alertService) { var service = {}; service.message = "Hello"; service.perform = function () { alertService.add("success",service.message); }; return service; }); Now I want to inherit this service in some 'ChildService' with overriding message on "World!". I expect that calling ChildService.perform() will show alert with "World!". What is proper way to do this?
favorite count: 0
has title: AngularJS service inheritance
possible better answer: http://stackoverflow.com/a/26643082
answer count: 4

http://stackoverflow.com/comment/41743149
comment on: http://stackoverflow.com/a/26561370
score: 0
type: AnswerComment
type: Comment
has text: I would rather need a touch(as from touch-screen devices) than just a click event.

http://stackoverflow.com/comment/41780648
score: 0
comment on: http://stackoverflow.com/a/26582203
type: Comment
type: AnswerComment
has text: but jquery never call the controller action

http://stackoverflow.com/q/26652578
answer count: 2
has comment: http://stackoverflow.com/comment/41910075
downvote count: 0
has comment: http://stackoverflow.com/comment/41909058
has comment: http://stackoverflow.com/comment/41909107
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: populating AJAX javascript/jQuery dropdown (province, state, city) gives undefined ocassionaly
has body: I am currently using jquery-1.11.1.min.js. I have three different dropdowns, province, state, city and I have the following javascript to handle changes when a user has selected a province, state, or city. $provinceSelector = $('.selector-province'); $stateSelector = $('.selector-state'); $citySelector = $('.selector-city'); $provinceSelector.on('change', function () { var provinceid = $(this).val(); $stateSelector.html(' Loading... '); $stateSelector.attr('disabled','true'); $.ajax({ url: '/location/states/' + provinceid, timeout: 20000, type: 'GET', data: [], success: function (response) { if (!response.status || response.states.length == 0) { $provinceSelector.val(''); $stateSelector.html(' Pilih kabupaten lokasi toko kamu '); } else if (response.status && response.states.length > 0 && $stateSelector) { $stateSelector.removeAttr('disabled'); $stateSelector.html(' Pilih kabupaten '); for (var i = 0; i < response.states.length; i++) { $stateSelector.append(' ' + response.states[i].name + ' '); } } }, error: function (x, t, m) { $provinceSelector.val(''); $stateSelector.html(' Pilih kabupaten lokasi toko kamu '); }, }); }); The end point that the server returns looks like this: {"status":true,"cities":[{"id":67,"name":"Alas"},{"id":68,"name":"Alas Barat"},{"id":472,"name":"Batu Lanteh"},{"id":1233,"name":"Empang"},{"id":2276,"name":"Labangka"},{"id":2283,"name":"Labuhan Badas"},{"id":2338,"name":"Lape-Lopok"},{"id":2547,"name":"Lunyuk"},{"id":2919,"name":"Moyohilir"},{"id":2920,"name":"Moyohulu"},{"id":3605,"name":"Plampang"},{"id":3936,"name":"Ropang"},{"id":4603,"name":"Sumbawa"},{"id":4604,"name":"Sumbawa Besar"},{"id":5265,"name":"Utan-Rhee"}]} it can also return status false if something wrong happens. Now the issue is that on several occasions I am getting reports from user where they are seeing undefined in the state after selecting a province (in other words there are no options in state, just undefined), this usually is on a mobile device. I wonder how this…
has comment: http://stackoverflow.com/comment/41909941
has answer: http://stackoverflow.com/a/26653897
tagged with: cross-browser
has answer: http://stackoverflow.com/a/26654121
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/41910819
score: 1
type: Question

http://stackoverflow.com/a/26524123
upvote count: 0
has comment: http://stackoverflow.com/comment/41677528
type: Answer
answers question: http://stackoverflow.com/q/26523962
has body: use the javascript instanceof to find the function is valid: for example if(FUNCTION1 instaceof Function) to decide whether it is loaded.
downvote count: 1
score: -1

http://stackoverflow.com/comment/41699163
score: 0
type: Comment
type: QuestionComment
has text: The only other thing I can see offhand is a misspelled `length` in the last line of `dotter()`. What does the error console say?
comment on: http://stackoverflow.com/q/26536180

http://stackoverflow.com/q/26535637
has title: Non-gregorian calendars and Globalize.js
has body: Are non-Gregorian calendars currently supported in Globalize.js? If so, how can I convert, let's say, today's date, into a Hijri calendar equivalent? For example, right now when I try this: Globalize.locale("ar-eg"); var arDate = Globalize.formatDate( new Date( 2014, 9, 24 ), { date: "long" } ); I get: 24 أكتوبر، 2014 But what I really want is to get is 29 ذو الحجة‎ 1435 (or similar equivalent).
type: Question
score: 0
has answer: http://stackoverflow.com/a/30234270
tagged with: calendar
tagged with: jquery-globalization
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
answer count: 1

http://stackoverflow.com/comment/57185118
type: Comment
has text: Thank you, it did help me. I have a invalid character in my files path too!
comment on: http://stackoverflow.com/a/27857617
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41668305
comment on: http://stackoverflow.com/a/26517038
type: AnswerComment
score: 0
type: Comment
has text: i need to be able to select an address, attach that ID to the 'continue' button so i can move forward. however i need it to work in the scenario a user accidently clicks the wrong address. that no matter which address (radio button) they select, the continue button will grab the right ID. currently it grabs the first one you selected and will never change.

http://stackoverflow.com/comment/50357225
has text: You rock Lars. Saved my day
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26576371

http://stackoverflow.com/comment/41930383
has text: Can you see any errors in console? Can you see '$' is undefined? IS the Jquery included in your HTML (view source and find it)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26664227

http://stackoverflow.com/q/26604823
has comment: http://stackoverflow.com/comment/41822955
has answer: http://stackoverflow.com/a/26605685
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/41823325
type: Question
answer count: 2
has title: Uncaught SyntaxError: Unexpected token - JSON character encoding
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41822411
possible better answer: http://stackoverflow.com/a/26605685
tagged with: ajax
upvote count: 1
favorite count: 0
downvote count: 0
has body: In my controller I handle POST requests with ajax and adds data from GET requests directly to the js-code mycontroller.php $sServiceNumber = isset($_POST['ServiceNumber']) ? $_POST['ServiceNumber'] : $_GET['ServiceNumber']; //Here I do a db call for sServiceNumber and fetch some data as array $aAllrows $aResponse['ServiceNumber'] = $sServiceNumber; $aResponse['Data'] = $aAllrows; $sJson = json_encode(self::convertToStrictUtf8($aResponse)); if (isset($_POST['ServiceNumber'])) { echo $sJson; exit; } else { $sJs = ' $(document).ready(function() { var sData = \'' . $sJson . '\'; handleResponseData(sData); });'; MyHtmlHead::addExtraJsCode($sJs); //continue with rendering html page here.. } When I call this with ajax everything works fine but when I try to run handleResponseData() directly I get Uncaught SyntaxError: Unexpected token on special characters. My JavaScript function handleResponseData ( rawData ) { response = jQuery.parseJSON(rawData); //&lt;--this is where the error occurs (on GET requests) //Make use of response data } $("form[name='searchform']").submit(function( event ) { event.preventDefault(); // Send post and fetch some data! $.post(baseUrl, { ServiceNumber: $("input[name='ServiceNumber']").val(), time: "2pm" }).done(handleResponseData); }); Lastly here comes my conversion method protected static function convertToStrictUtf8 ($p_aValues) { function detectEncoding(&amp;$mValue) { if (!mb_detect_encoding($mValue, 'UTF-8', true)) { $mValue = utf8_encode($mValue); } } array_walk_recursive($p_aValues, 'detectEncoding'); return $p_aValues; } How come the json string parses fine when fetched with jquery $.post but not when embedded into code manually? How do I solve this issue? edit: Stripped down version of rawData from console.log(rawData) GET {"ServiceNumber":"485218-1138932068","Data":[{"RowId":"AEEA-IU3A61","ServiceRequestId":"AEEA-IU39LX","Name":"SV LIDEHÄLL)","FileSize":"8812","ServiceNumber":"485218-1138932068","Subject":"O(BERGMAN/LIDEHÄLL) ","Area":…
has comment: http://stackoverflow.com/comment/41823148
has answer: http://stackoverflow.com/a/26626885
accepted answer: http://stackoverflow.com/a/26626885
tagged with: php

http://stackoverflow.com/q/26532234
tagged with: content-security-policy
has answer: http://stackoverflow.com/a/26551771
tagged with: javascript
has title: Modernizr Causes Content Security Policy (CSP) Violation Errors
answer count: 2
has comment: http://stackoverflow.com/comment/44227075
has body: I am attempting to use the new Content Security Policy (CSP) HTTP headers on a test site. When I use CSP in conjunction with Modernizr I get CSP violation errors. This is the CSP policy I am using: Content-Security-Policy: default-src 'self'; script-src 'self' ajax.googleapis.com ajax.aspnetcdn.com; style-src 'self'; img-src 'self'; font-src 'self'; report-uri /WebResource.axd?cspReport=true These are the errors from the Chrome browser console: Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. window.Modernizr.injectElementWithStyles - modernizr-2.7.2.js:134 window.Modernizr.tests.touch - modernizr-2.7.2.js:457(anonymous function) modernizr-2.7.2.js:949(anonymous function) - modernizr-2.7.2.js:1406 I discovered the following workaround on the Github Modernizr site. However, the workaround was first put forward in March and doing a little Google-Fu I can find no fixes or workarounds to this issue. I know that I can include the unsafe-inline directive which can get around this error but this also enables unsafe code to run and negates the use of CSP in the first place. Does anyone have any solutions? Update - What is CSP CSP is a HTTP header supported by all major browsers (Including Edge). Essentially its a white list of content the browser is allowed to use to render the page. Find out more here or read Mozilla's documentation for CSP here and here. Update - Help Highlight CSP CSP is now available on all browsers (Edge added support, yay!) and its a gigantic leap forward in web security. For those interested in getting more third party support for CSP, see these: Modernizr support for CSP Visual Studio support for CSP. Note that browser link does not work if you have CSP enabled as it uses inline JavaScript. Visual Studio Web Essentials Extension support for CSP. Web Essential…
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/110272337
has comment: http://stackoverflow.com/comment/45282346
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29371831
has comment: http://stackoverflow.com/comment/45274235
tagged with: modernizr
score: 31
upvote count: 31
has comment: http://stackoverflow.com/comment/44238676
type: Question

http://stackoverflow.com/q/26521226
score: 1
tagged with: jqgrid
type: Question
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26524313
tagged with: javascript
tagged with: jquery
tagged with: treegrid
has title: Jqgrid treegrid scroll to a row by row ID and expand the node if collapsed
accepted answer: http://stackoverflow.com/a/26524313
favorite count: 0
has body: Scenario is a Jqgrid treegrid with all nodes loaded, some of them collapsed some of them expanded as a result of user interaction. Now there is a need to scroll to a specific row based on the row ID, and if the row is inside a collapsed node, then expand the node till row is visible to the user. Any hints?
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/41737221
has text: You can use `is(':visible')` to determine state of toggled element, [Updated Fiddle](http://jsfiddle.net/sachq/9yhrr8vv/1/)
score: 0
comment on: http://stackoverflow.com/a/26548240
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41833024
has text: So, doesn't this work ? what's the issue ? Can u share the code ? Is the event handler not getting invoked ?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26610157
score: 0

http://stackoverflow.com/a/29769200
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26578246
has body: Google have released their new "reCAPTHA" technology, which with a mere check of a box. Bots can get around this, but it's very difficult to do so. By using this, you can reduce the risk of your friend's bot. To the extent of my knowledge, Mechanize does not currently have a way around this.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/47669120
score: 1
has comment: http://stackoverflow.com/comment/47669180
answers question: http://stackoverflow.com/q/26578246

http://stackoverflow.com/comment/41720357
comment on: http://stackoverflow.com/q/26548807
score: 1
has text: @MikeAnte He is not your friend, Bro... ;)
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26581004
type: Question
possible better answer: http://stackoverflow.com/a/26581079
answer count: 2
has title: Jquery change HTML to div on button click function :selected
tagged with: javascript
tagged with: jquery
has body: Ok, I have this form written in JavaScript and I want to change it to Jquery. So far I have managed to call text on click using the 'change()' method. then, I have also been able to set the inner div of an element using the set element function. I for the life of me can not find how to this and have the function store the information selected from a selected option dropdown menu and then on submit the html of an element. Here is what I have so far. Red Green Blue Option 1 Option 2 Option 3 Submit This is a paragraph. the JavaScript version is a lot longer; However, to give you an Idea of what I am trying to accomplish here see below Select your Services from the list: Monday Tuesday Wednesday Thursday Auto Computer Home Repair Plumbing Your Scheduled Appointment here... Submit I have spent over 7 hours digging through jquery.com and every other site to include this one and just seem to not understand the syntax well enough to get where I am messing up FIDDLE
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26581079
accepted answer: http://stackoverflow.com/a/26581052
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26581052
tagged with: forms
tagged with: dom

http://stackoverflow.com/comment/41917313
type: Comment
comment on: http://stackoverflow.com/a/26657186
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63943/discussion-between-pi-and-mathieu-labrie-parent).
score: 0

http://stackoverflow.com/comment/41701189
has text: Where is `json` defined, in a script element or is it data from an ajax response?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26537685
score: 0

http://stackoverflow.com/q/26526169
type: AnsweredQuestion
tagged with: innerhtml
has title: Trying to pass in an object as a parameter for an innerHTML function
downvote count: 1
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/41679685
score: -1
has answer: http://stackoverflow.com/a/26527029
tagged with: function
upvote count: 0
accepted answer: http://stackoverflow.com/a/26527029
answer count: 1
tagged with: javascript
has body: I'm trying to fill out multiple table cell innerHTML with information based on a choice of several different objects. I currently have multiple functions, one for each choice: A xx B xx This is currently working, but I'm sure there must be a way of using a single function and passing in an object as a parameter instead of having a function for each object but I'm pretty inexperienced with javascript and can't seem to find an answer anywhere and trial and error has taken me hours. I'm looking for something maybe along the lines of: function choice(choicePicked) { aCell.innerHTML = choicePicked.a; bCell.innerHTML = choicePicked.b; } Or maybe there's a completely different way of accomplishing the task - any help at all would be appreciated!
favorite count: 0

internet-explorer
tags question: http://stackoverflow.com/q/26610741
tags question: http://stackoverflow.com/q/26608959
tags question: http://stackoverflow.com/q/26527098
tags question: http://stackoverflow.com/q/26533112
tags question: http://stackoverflow.com/q/26624527
tags question: http://stackoverflow.com/q/26514955
tags question: http://stackoverflow.com/q/26603913
tag name: internet-explorer
tags question: http://stackoverflow.com/q/26593185
tags question: http://stackoverflow.com/q/26634107
tags question: http://stackoverflow.com/q/26613940
tags question: http://stackoverflow.com/q/26612828
tags question: http://stackoverflow.com/q/26525507
tags question: http://stackoverflow.com/q/26666002
tags question: http://stackoverflow.com/q/26535285
tags question: http://stackoverflow.com/q/26579393
tags question: http://stackoverflow.com/q/26549687
tags question: http://stackoverflow.com/q/26577160
tags question: http://stackoverflow.com/q/26526148
tags question: http://stackoverflow.com/q/26587947
tags question: http://stackoverflow.com/q/26576836
tags question: http://stackoverflow.com/q/26610423
tags question: http://stackoverflow.com/q/26523631
tags question: http://stackoverflow.com/q/26626884
tags question: http://stackoverflow.com/q/26549039
tags question: http://stackoverflow.com/q/26621663
tags question: http://stackoverflow.com/q/26534581
type: Tag
tags question: http://stackoverflow.com/q/26573815
tags question: http://stackoverflow.com/q/26567729
tags question: http://stackoverflow.com/q/26521139
tags question: http://stackoverflow.com/q/26523304
tags question: http://stackoverflow.com/q/26621247

http://stackoverflow.com/comment/41877526
has text: Thanks for your answer, it seem interesting but I didn't get where that `function` come from, that function was meaning the `publish` function on the controller? Thanks
type: AnswerComment
comment on: http://stackoverflow.com/a/26634734
score: 0
type: Comment

http://stackoverflow.com/a/26536846
type: Answer
has body: I'm assuming you have a separate volumeslider element in your HTML and you want it to be set to 0 if you click a mute button. Try this code: function vidmute () { if(vid.muted){ vid.muted = false; mutebtn.innerHTML = "Mute"; vidslider.value = 0; } else { vid.muted = true; mutebtn.innerHTML = "Unmute"; vidslider.value = vid.volume * 100; } } This works as follows: vid.volume is the volume of your video. It's values are between 0 and 1. vidslider.value is the position of your slider, it's values are between 0 and 100. You can assign a value to a variable if you put the variable to the left of the "=" like this: a = 5; Now the value of "a" is set to 5. You want to set the value of your slider to 0. So you put your slider to the left side of the "=": vidslider.value = 0; Now your slider is set to the leftmost position, if the video was muted. If you click "unmute", you want the slider to be set to the original position. Therefore you first need to read the volume of the video, and then set it as the value of the slider. vidslider.value = vid.volume; Now remember that the vidslider value could be 0-100, whereas the vid volume has a range 0-1. So you have to multiply the volume with 100 to get it to the correct range vidslider.value = vid.volume * 100; Have fun and please try to ask questions with the whole problem explained in a short example, so we know exactly what you need to know.
answers question: http://stackoverflow.com/q/26536641
score: 0

http://stackoverflow.com/q/26583417
has comment: http://stackoverflow.com/comment/41783017
has answer: http://stackoverflow.com/a/26584165
has title: Input to a directive using double curly bracers not working
upvote count: 1
answer count: 1
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41782814
tagged with: javascript
has comment: http://stackoverflow.com/comment/41782947
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41783809
downvote count: 0
score: 1
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
type: Question
has body: I've written this directive that renders some stars using d3.js. It works fine when I give it hard coded inputs but when I give it input from my scope it doesn't work. This is parts of my directive (that exhibits the same behaviour): app.directive('stars', function() { return { scope: { width: "@", height: "@", maxStars: "@", filled: "@" }, link: function(scope, element, attrs) { console.log(attrs); console.log(attrs.filled); } } }); I call my directive like this: &lt;table ng-app="app" ng-controller="Mainctrl"&gt; &lt;tbody&gt; &lt;tr ng-repeat="agent in data"&gt; &lt;td stars width="200" height="100" max-stars="5" filled="{{agent.ratings.avg}}"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; Printing out attrs give me (among other values): filled: "4" height: "100" maxStars: "5" stars: "" width: "200" While printing attrs.filled gives me 'undefined'. I find it really wierd that I can clearly see that the object attrs has a value for the key 'filled' but when I try to access it I get 'undefined'.
has comment: http://stackoverflow.com/comment/41783459

http://stackoverflow.com/comment/41747278
score: 1
has text: a), you don't need to nest the popover initialization inside of the click function. It should happen immediately on page load. b) `undefined is not a function` is usually a sign that you're not pulling in the libraries you think you are. Since we can't see what's going on inside of the `@Scripts.Render` on your machine, it's tough to say exactly, but my guess is that it's not finding the right files. You can try adding the normal script references to jQuery and bootstrap CDNs that I have in the snippet. If those work, you know your scripts are not loading correctly.
comment on: http://stackoverflow.com/a/26563370
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26590800
tagged with: coffeescript
possible better answer: http://stackoverflow.com/a/26592246
type: Question
has title: How can we increment and then decrement a counter without conditionals?
has comment: http://stackoverflow.com/comment/41876904
has answer: http://stackoverflow.com/a/26591658
tagged with: javascript
has body: I'm looking for a clever way to increment and then decrement a counter variable. I want the counter variable to begin at a low value and increment, towards a higher value. Once it reaches the higher value, the counter decrements until it reaches back to the lower value. Once it reaches the lower value, the counter increments again to the higher value ... I think you get the point. I am working on a a canvas animation where I'd like to employ some cleverness, without using if or other conditional tests: Here is the conditional logic that handles the counter variable: incrementing = true foo = -&gt; length += 1 if incrementing length -= 1 if not incrementing incrementing = false if length &gt; 100 incrementing = true if length &lt; 1 Initially, I thought I could use modulo. However, modulo division only resets the counter back to the lower value -- it doesn't decrement the counter once it reaches the top value. 0 % 10 = 0 1 % 10 = 1 2 % 10 = 2 3 % 10 = 3 4 % 10 = 4 5 % 10 = 5 6 % 10 = 6 7 % 10 = 7 8 % 10 = 8 9 % 10 = 9 10 % 10 = 0 11 % 10 = 1 12 % 10 = 2 13 % 10 = 3 I'm sure there has to be a way to do this without using conditional tests. Assuming a bottom value of 0 and a top value of 10, the method should output the following. ? = 0 ? = 1 ? = 2 ? = 3 ? = 4 ? = 5 ? = 6 ? = 7 ? = 8 ? = 9 ? = 8 ? = 7 ? = 6 ? = 5
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26592246
score: 8
favorite count: 0
tagged with: logic
upvote count: 8
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26591658

http://stackoverflow.com/comment/41844066
type: Comment
has text: and what about this? {{event.month}}
type: AnswerComment
comment on: http://stackoverflow.com/a/26615895
score: 0

http://stackoverflow.com/q/26528703
has comment: http://stackoverflow.com/comment/41684140
has comment: http://stackoverflow.com/comment/41684215
has answer: http://stackoverflow.com/a/26529374
tagged with: forms
has answer: http://stackoverflow.com/a/26528819
type: Question
tagged with: javascript
has body: this is my first post here and I hope you'll be able to helpe me. Thanks in advance :). Basically I'm trying to create a validation form, but for some reason it doesn't work at all, this is the code: html: Application form London Flight Agency Personal Details Title Mr Mrs Miss Dr First Name:* You can only use letters! Last Name:* You can only use letters! Date of birth:* You must enter date of birth! Contact tel:* Enter a valid telephone number! Email Adress:* You must enter a valid email address Postcode:* You must enter a valid postcode Flight Details Hand luggage:* Yes No Height: Units: inches centimeters Weight: Units: pounds kilograms Include extra bag(£25) Include insurance(£15) Special assistance(£30) Payment card Visa Debit Card MasterCard PayPal Mestro Visa Electron javascript: function validateName(name){ var re = /[A-Za-z -']$/; if(re.test(document.getElementById(name).value)){ document.getElementById(name).style.background ='#ccffcc'; document.getElementById(name + 'Error').style.display = "none"; return true; } else{ document.getElementById(name).style.background ='#e35152'; document.getElementById(name + 'Error').style.display = "block"; return false; } } function validatelName(lname){ var re = /[A-Za-z -']$/; if(re.test(document.getElementById(lname).value)){ document.getElementById(lname).style.background ='#ccffcc'; document.getElementById(lname + 'Error').style.display = "none"; return true; }else{ document.getElementById(lname).style.background ='#e35152'; document.getElementById(lname + 'Error').style.display = "block"; return false; } } function validateDate(date){ var re = ^\d{1,2}\/\d{1,2}\/\d{4}$; if(re.test(document.getElementById(date).value)){ document.getElementById(date).style.background ='#ccffcc'; document.getElementById(date + 'Error').style.display = "none"; return true; } else{ document.getElementById(date).style.background ='#e35152'; document.getElementById(date + 'Error').style.display = "block"; return false; } } function valid…
has comment: http://stackoverflow.com/comment/41684251
score: 0
answer count: 2
type: UnansweredQuestion
has title: validation form javascript

http://stackoverflow.com/a/26582806
has comment: http://stackoverflow.com/comment/41781762
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26582330
has comment: http://stackoverflow.com/comment/41781866
upvote count: 1
has body: I think your idea is in the right direction and NO, you are not an idiot :) Presonally I would think about following: clear content of #company_modal - leaving just "skeleton" - placers for content that we want to manipulate dynamically, write a common JQ function for rendering modal window (allowing all parameters such as title, content, buttons,... write JQ functions for create/read/update/delete (CRUD) calling same JQ modal rendering function with different parameters and different actions, write functions that delegate events and actions (assign actions to dynamic buttons in modal that allow calling functions for CRUD. It seems a lot but I think it's way better and modular than just creating different modals for different actions etc. But one must plan it really good (what would be exact look and feel, what fields, what variables,...)
type: Answer

http://stackoverflow.com/comment/41964133
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26680196
has text: correct, that example shows how to use 2, but I need more than two. so it sounds like your test proves it can currently only support up to 2.

http://stackoverflow.com/comment/41934125
comment on: http://stackoverflow.com/q/26633975
type: QuestionComment
score: 0
type: Comment
has text: So, I've turned your example into a code snippet, and it works the same for me in both FF and Chrome. Your core-viva code isn't present of course, perhaps the problem is somewhere in there?

http://stackoverflow.com/a/26554874
score: 7
has body: Disabled fields or fields without a name attribute won't submit. However, if somehow you want to name your fields and do not want to disable them upfront, you could intercept all form submissions and disable every fields that have a data-no-submit attribute. document.addEventListener('submit', function (e) { if (!e.defaultPrevented) { [].forEach.call(e.target.querySelectorAll('[data-no-submit]'), function (field) { field.disabled = true; }); } }); Then you can just do: &lt;input type="text" name="dontSubmitThisField" data-no-submit&gt;
answers question: http://stackoverflow.com/q/26554694
upvote count: 7
downvote count: 0
type: Answer

cors
type: Tag
tags question: http://stackoverflow.com/q/26668658
tag name: cors
tags question: http://stackoverflow.com/q/26526716
tags question: http://stackoverflow.com/q/26645992

http://stackoverflow.com/q/26642887
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41892619
score: 2
has body: It should be easy, but I'm having trouble with this issue I have a variable number of div's with text in them and each with overflow: scroll I want to be able to detect which div the user is scrolling, and store that div's id into a JS variable, but my attempts are not working... My code is here: http://jsfiddle.net/7pn85ae8/
type: Question
has comment: http://stackoverflow.com/comment/41892451
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26643212
answer count: 1
has comment: http://stackoverflow.com/comment/41892556
has title: How can I store particular div id in jQuery var when I scroll that div
favorite count: 0

http://stackoverflow.com/a/26554779
accepted answer of: http://stackoverflow.com/q/26554714
answers question: http://stackoverflow.com/q/26554714
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
has body: Python's SimpleHTTPServer doesn't natively support POSTs. You can extended it to do so with this little handler: http://georgik.sinusgear.com/2011/01/07/how-to-dump-post-request-with-python/
type: Answer

http://stackoverflow.com/a/26547417
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26547324
has body: If lblHRedeemEmailAddress didn't exist, jQuery would return an empty result set, upon which you would still be able to call text. $ is probably referring to some other library, such as prototype. Read up on noConflict or create a closure where $ is set to jQuery: (function($) { // for anything in here, $ will be jQuery })(jQuery);
answers question: http://stackoverflow.com/q/26547324
type: Answer

http://stackoverflow.com/q/26610342
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/26610451
type: Question
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/5307325
tagged with: jquery
score: 0
has title: jquery ui slider value undefined
has body: I'm developing an APP using jquery mobile with phonegap. Have a trouble when trying to retrieve the value of a slider, for some reason I can't take it, i've got something like $(document).ready(function() { var iValue = 0; $("#sliderVer").uislider({ min : 10, max : 100, orientation : "vertical", step : 1, value : iValue }); $("#incomplete_field_correo").hide(); $("#incomplete_field_secret").hide(); $("#incorrect_field_correo").hide(); }); I've tried with $("sliderVer").value; also $("sliderVer").slider( "value" ); and $("sliderVer").slider( ui.slider ); But nothing seems to work, any idea? thanks in advance!
accepted answer: http://stackoverflow.com/a/26610451
has comment: http://stackoverflow.com/comment/41832643

http://stackoverflow.com/comment/41865494
has text: @Kyojimaru: Thanks. Usually an update just appends a version, but this time JSFiddle changed the URL :)
comment on: http://stackoverflow.com/a/26628071
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41828544
has text: Yes i had used already the .prop() to uncheck the radio. In the DOM the radio is unchecked. The issue is when that when i check it the selectionChanged in c# is not firing. If i change to another radio it fires. Thanks for the comment though.
comment on: http://stackoverflow.com/q/26608028
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26525771
has answer: http://stackoverflow.com/a/26526221
score: 0
has body: I have a setInterval inside my closure but my I'm unable to target the variables inside the closure correctly. How so I target the variables correctly and stop the interval when counter has reached the finishTime? var counter = function() { return { myInterval: null, counter: 0, finishTime: 1000, startTimer: function() { this.myInterval = setInterval(this.repeat,10); }, repeat: function() { if(this.counter==this.finishTime) clearInterval(this.myInterval); this.counter++; } } }; counter().startTimer();
tagged with: function
tagged with: closures
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26526221
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26525938
has title: I can't target the correct scope inside my closure
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26525938

http://stackoverflow.com/comment/41947215
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26649460
has text: I'll try one more time then. If Javascript runs in a sandbox that does not allow you to access the filesystem, then that's a limitation that's also true for Angular. I thought this was a fairly simple concept. It's a duplicate because the answer to this question is the same as the answers to all those other questions.

http://stackoverflow.com/comment/41803758
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26590855
has text: Thank you for your help guys, there ended up being some sneaky interference with an addition unbinding call above it, where I was trying to unbind a function I had written. If you're interested in my solution, I have provided an answer
type: QuestionComment

http://stackoverflow.com/a/26644868
downvote count: 0
has comment: http://stackoverflow.com/comment/41914638
answers question: http://stackoverflow.com/q/26637283
has comment: http://stackoverflow.com/comment/41938212
type: Answer
has comment: http://stackoverflow.com/comment/41938260
has comment: http://stackoverflow.com/comment/41955493
has body: Welcome to scripting PDFs. First and foremost, Java and JavaScript are not the same. All they have in common are three characters. Second, JavaScript is much more than what they tell you it is when using it in webbrowsers. JavaScript consists of the Core and the application-specific extensions. Webbrowser JavaScript consists of the Core and the webbrowser-specific extensions. This is shown best in Flanagan's JavaScript, the Defnitve Guide, published by O'Reilly. So, Acrobat JavaScript consists of the Core and the Acrobat-specific extensions. Those are documented in the Acrobat JavaScript documentation, which is part of the Acrobat SDK, downloadable from the Adobe website. Then, there is the object model playing another role. This is also described in the Acrobat JavaScript documentation. I insist on this documentation, because that's what you need to have at hand, and you should have at least quickly read through the Guide and glanced at the Reference (which does have code samples). Then you will see that the code you tried — which is syntactically correct JavaScript — simply does not work in Acrobat. Actually, it seems that you wanted a checkbox to pop up an alert saying "Hello World" when being checked. Actually, you got to the correct event to use; using the MouseUp event for clicking is how the document object model in PDF forms works. One possibility to make appear the alert box would actually look like this: if (event.target.value != "Off") { app.alert("Hello World") ; } and that would do it… There would be other ways do do it when you are using another field to contain the code.
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26637283
has comment: http://stackoverflow.com/comment/41938385
score: 5
type: AcceptedAnswer

http://stackoverflow.com/a/41378463
type: Answer
answers question: http://stackoverflow.com/q/26643247
has body: navigationText: ["", ""] full code is below: var owl1 = $("#main-demo"); owl1.owlCarousel({ navigation: true, // Show next and prev buttons slideSpeed: 300, pagination:false, singleItem: true, transitionStyle: "fade", navigationText: ["", ""] });// Custom Navigation Events owl1.trigger('owl.play', 4500);
score: 0

http://stackoverflow.com/a/26548352
downvote count: 0
answers question: http://stackoverflow.com/q/26548295
has body: You can do this by splice-ing the array. var str = "11,133,3032,144,412,44,43,44,444,54,22,44,11,163,480,344"; var arr = str.split(','), result = []; while(arr.length &gt; 0) { result.push(arr.splice(0, 4)); } If you have an array instead of the string, you can just use the last three lines.
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/26548295

http://stackoverflow.com/q/26549157
has comment: http://stackoverflow.com/comment/41721467
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
linked to: http://stackoverflow.com/q/20053557
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41720888
has comment: http://stackoverflow.com/comment/41720890
has body: I have a table and I am dynamically add the value in each table cell from FireBase. I want to add a "flash" or "blinking" effect everytime that cell changes. So I need to be able to detect when the content of that has changed.
has comment: http://stackoverflow.com/comment/41720963
has answer: http://stackoverflow.com/a/70451137
tagged with: angularjs
type: UnansweredQuestion
downvote count: 2
linked to: http://stackoverflow.com/q/28044730
has title: Detect when the inner html of a changes with javascript or jquery

http://stackoverflow.com/a/26749577
upvote count: 6
type: AcceptedAnswer
has body: Problem was the missing axis value. Here is a working JS fiddle. var chart = c3.generate({ data: { type: 'bar', json: [ { 'indicator': 'X', 'total': 100 }, { 'indicator': 'Y', 'total': 200 }, { 'indicator': 'Z', 'total': 300 } ], keys: { x: 'indicator', value: ['total'] } }, axis: { x: { type: 'category' } }, bar: { width: { ratio: 0.5 } } });
score: 6
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26520294
answers question: http://stackoverflow.com/q/26520294

http://stackoverflow.com/a/26653132
type: Answer
has body: Your clickhandlers don't work for dynamically changed objects, try this instead: $("body").on("click", "div[active=1]", function(){ var itemPrice = $(this).attr("itemprice"); sum -= Number(itemPrice); $("#current_price").html(sum); $(this).attr("active","0"); }); $("body").on("click", "div[active=0]", function(){ var itemPrice = $(this).attr("itemprice"); sum += Number(itemPrice); $("#current_price").html(sum); $(this).attr("active","1"); }); Updated fiddle: http://jsfiddle.net/L76xzbLj/7/
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26652987
has comment: http://stackoverflow.com/comment/41909360
answers question: http://stackoverflow.com/q/26652987

http://stackoverflow.com/comment/41917611
type: Comment
score: 0
has text: I want to get date range. But before that I need to make ANY time query work (I tried many gt/gte/lt/lte queries)
comment on: http://stackoverflow.com/a/26657508
type: AnswerComment

http://stackoverflow.com/comment/41759587
type: QuestionComment
comment on: http://stackoverflow.com/q/26570348
score: 1
has text: Check that your view doesn't have `ng-controller="SearchCtrl"`
type: Comment

http://stackoverflow.com/q/26638924
has answer: http://stackoverflow.com/a/26639133
has answer: http://stackoverflow.com/a/26639159
accepted answer: http://stackoverflow.com/a/26639135
type: Question
has body: So thanks to some users here, I have some jQuery that allows me to randomly append a class name to my div. I have altered it slightly so that it now works when I click a separate div. The only issue I have now is that when I click it, it will keep appending the random div to my .hexagon div. What I really want it to do is remove it and choose another from the random list. Here is what I have: $(".click").click(function() { var randomColors = ["ful","reg","emp"]; $(".hexagon").each(function(index) { var len = randomColors.length; var randomNum = Math.floor(Math.random()*len); $(this).addClass(randomColors[randomNum]); }); }); so .click adds ful reg or emp to my .hexagon div, but I assume because emp is last in my CSS sheet all my divs end up with that style. I want it to swap them out when I click my button. Can someone help me please? Here's a jsfiddle - http://jsfiddle.net/fv6zqu3t/
type: AnsweredQuestion
has title: Why does my click function keeps adding the last class in the css sheet?
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26639076
has answer: http://stackoverflow.com/a/26639135
has answer: http://stackoverflow.com/a/26639076
score: 0
has comment: http://stackoverflow.com/comment/41885119
answer count: 4

http://stackoverflow.com/q/26543885
answer count: 3
has title: get data from javascript object without using key name
has answer: http://stackoverflow.com/a/26543938
has answer: http://stackoverflow.com/a/26544755
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26544278
has answer: http://stackoverflow.com/a/26544278
has body: currently working with jquery object the object contains data like data[0]={CustUserID: 31, FirstName: "System12", LastName: "Administrator", CustUserName: "SysAdmin"} this object contains n number of records,and we get the length using data.length and also each object each record contains different type of keys and n number of keys with value so now i am trying to get each key name and value name from each record and need to show on page. on html view: CustUserID=31 FirstName=System12 LastName=Administrator CustUserName=SysAdmin the code i wrote for this is var data=""; for(var i=0;i&lt;data.length;i++) { data= data+"&lt;/br&gt;CustUserID="+data[i].CustUserID+ "&lt;/br&gt;FirstName="+data[i].FirstName+ "&lt;/br&gt;LastName="+data[i].LastName+ "&lt;/br&gt;CustUserName="+data[i].CustUserName; } $("#DivData").html(data); but i stucked when data keys are dynamically changing according to user requirment so at that i am facing problem to get data, so i need to get key names and data should be looped dynamically. please help me... thank you guys..
accepted answer: http://stackoverflow.com/a/26543938
type: Question
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/41855472
comment on: http://stackoverflow.com/q/26622361
score: 0
type: QuestionComment
type: Comment
has text: http://jsfiddle.net/nc6Law9b/ How's your code different? `display:none;` seems to work here.

http://stackoverflow.com/q/26536532
type: Question
has answer: http://stackoverflow.com/a/26536611
tagged with: javascript
has comment: http://stackoverflow.com/comment/41699977
has comment: http://stackoverflow.com/comment/41699277
score: 0
has title: php adding a text box upon checkbox checked does not post
tagged with: getelementbyid
answer count: 1
type: UnansweredQuestion
tagged with: input
has comment: http://stackoverflow.com/comment/41699416
tagged with: php
has body: I have code that adds input text when the box is checked and it shows up but getting the value from the code does not work. Here is my code: &lt;input name=ship[] type=checkbox value=example id=Ex&gt;Application Model Example &lt;span id='Location'&gt;&amp; nbsp;&lt;/span&gt; var checkbox = document.getElementById('Ex'); checkbox.addEventListener('change', function () { if (document.getElementById('modelType')) { document.getElementById('modelType').remove(); } else { var input = document.createElement("input"); input.name = 'modelType'; input.id = 'modelType'; input.type = 'text'; input.placeholder = 'Model Type'; input.required; document.body.appendChild(input); var foo = document.getElementById('Location'); foo.appendChild(input); } }); &lt;?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { echo "Model Type is $modelType"; } The text input only appears after I click the checkbox which is exactly what I want, but when I go to get the value in the text input in POST is never appears? Also it would be nice if the text input was required, but input.required; does not work (that was just a guess)

http://stackoverflow.com/a/61941695
score: 28
type: Answer
upvote count: 28
has comment: http://stackoverflow.com/comment/127436851
answers question: http://stackoverflow.com/q/26596858
has comment: http://stackoverflow.com/comment/125022914
has body: Actually as of May 21, 2020 "allow paste" "allow pasting" and devtools.selfxss.count do not work. I already migrated from Chrome because of backdoors literally built into the browser by developers. I'd really rather not have to do that again already. Solution: The solution I found was to use about:config and set dom.event.clipboardevents.enabled to false. Worked for me, this should work.
has comment: http://stackoverflow.com/comment/119324135
has comment: http://stackoverflow.com/comment/122037120
downvote count: 0

http://stackoverflow.com/comment/41860712
has text: Thanks, so I would need to figure out how to extract the session from the cookie, retrieve the relevant API key (if signed in), or generate a test key (if not signed in). I'll give that a shot.. If you have any pointers/examples of this being done in the wild, please share. Thanks
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26604414

http://stackoverflow.com/comment/41682839
type: Comment
has text: If getLineSeparator() has the @GwtIncompatible tag, the method is not compiled in javascript and GWT throws a method not found exception. Because the method is called in the if statement and no source is found.
type: AnswerComment
comment on: http://stackoverflow.com/a/26526969
score: 0

http://stackoverflow.com/q/26520349
type: Question
has title: jQuery getting isn't getting the html for an element
has comment: http://stackoverflow.com/comment/41669973
has comment: http://stackoverflow.com/comment/41673348
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/652763
answer count: 1
tagged with: jasmine
has comment: http://stackoverflow.com/comment/41670555
has comment: http://stackoverflow.com/comment/41669971
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41670023
has answer: http://stackoverflow.com/a/26520424
has body: I am using Jasmine to text and setting fixtures. I have this following test code here which demonstrates a problem: describe("foo", function() { var $input = $(' '); var $textArea = $(' 10 '); console.log( 'typeof: $input.get(0)' + ' ' + typeof $input.get(0) ); //object console.log( 'typeof: $input[0]' + ' ' + typeof $input[0] ); //object console.log( 'typeof: $input[0].toString()' + ' ' + typeof $input[0].toString() ); //string beforeEach(function(){ var html = $input[0] + $textArea[0]; var ghtml = $input[0] + $textArea[0]; $('body').append(html); $('body').append(ghtml); $('body').append(ghtml + html ); $('body').append( $input[0] ); $('body').append( $textArea[0] ); $('body').append( $input[0] + '' + $textArea[0]); $('body').append( $input[0] + $textArea[0]); $('body').append( $input.get(0) + $textArea.get(0) ); $('body').append( $input.get(0) + ' ' + $textArea.get(0) ); $('body').append( $input.html() + $textArea.html() ); $('body').append( $input[0].toString() + $textArea[0].toString() ); $('body').append( ($input[0].toString()) + ($textArea[0].toString()) ); $('body').append( ($input.get(0).toString()) + ($textArea.get(0).toString()) ); $('body').append( ($input.get(0).toString()) + ' ' + ($textArea.get(0).toString()) ); setFixtures( html ); }); it("has a value of bar", function() { expect(foo).toBe('bar'); }); }); Ignoring what the test does itself, look at what I am trying to append to the body tag. What I want is the actual html element to be appended, and for whatever reason I getting back an html object. Please see the fiddle: http://jsfiddle.net/sidouglas/e6jau1mq/9/ Is this a Jasmine issue or a PEBKAC issue? Thank you Simon.
has comment: http://stackoverflow.com/comment/41670040

http://stackoverflow.com/comment/41787209
score: 0
comment on: http://stackoverflow.com/a/26585286
type: Comment
type: AnswerComment
has text: Thank you so much. I am just learning and I still often get confused with some code. Can you help me how I can display a different message for when the shop is closed?

http://stackoverflow.com/comment/56106436
type: AnswerComment
comment on: http://stackoverflow.com/a/26601039
has text: Great post, super informative ! Forked Fiddle [5] with random circle numbers and diameters at http://jsfiddle.net/Lq7tkxj3/
type: Comment
score: 2

http://stackoverflow.com/comment/41873599
type: Comment
type: QuestionComment
has text: I assume that is a typo, but you have `sucess` instead of `success` for the ajax handler.
score: 0
comment on: http://stackoverflow.com/q/26605554

http://stackoverflow.com/a/26570274
has body: Try this document.getElementById('guess').addEventListener('keydown',function(event){ focusnextbutton(event); }); Pass the event argument to the callback function too. That's what's missing from the previous answers. Fiddle Link
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26569599

http://stackoverflow.com/comment/41793546
has text: 2 problem . On Jquery you are searhcing for classnames `.` but on HTML have id names `#`
type: AnswerComment
comment on: http://stackoverflow.com/a/26589271
type: Comment
score: 0

http://stackoverflow.com/a/26647798
type: Answer
answers question: http://stackoverflow.com/q/26646916
score: 0
has body: jQuery's .after() is what you're looking for. And if what you want is inserting a &lt;label/&gt; element, you can use $('&lt;label/&gt;') (documentation) to create it. This is a full example: function addLabel(content) { var label = $('&lt;label/&gt;').text(content); $('#container .table-list-cell .labels').after(label); } addLabel('label text'); Check it out on JSFiddle. Note: by the way, you forgot the equal sign on your #container class attribute.

http://stackoverflow.com/q/26653584
tagged with: javascript
tagged with: canvas
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26654449
has body: I'm trying to write some JS which will convert an image to grayscale, and convert the blacks to a colour (pink in this case). The effect I want to achieve is illustrated below (left is the original, right is the desired result): I've tried using CamanJS and I've got something close-ish using a greyscale filter and a solid pink overlay with a blending mode of mulitply. The JS for this looks like: $(function () { var $images = $('.make-pink'); $images.each(function () { createPinkImage( $(this) ); }); }); function createPinkImage ( $image ) { var $canvas = $('&lt;canvas /&gt;'); var canvas = $canvas[0]; var imgSrc = $image.attr('src'); var canvasWidth = $image.parent().width(); var canvasHeight = $image.parent().height(); var pink = '#d65fb3'; $canvas .attr('width',canvasWidth) .attr('height',canvasHeight) .appendTo($('#canvas-container')); var image = new Image(); image.src = imgSrc; image.onload = function() { Caman( canvas, imgSrc, function () { this.greyscale(); this.newLayer(function () { this.fillColor(pink); this.setBlendingMode('multiply'); this.opacity(70); }); this.exposure(40) this.render(); }); } } I've tried to implement this in a jsfiddle but it doesn't produce a result. Here's the link anyway: http://jsfiddle.net/303L2xL4/1/ And here's a screenshot of the result: As you can see, it's not quite there! Any help would be really great. I'm not committed to using CarmanJS is there's a better solution with another library or even just vanilla JS
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: image-processing
has title: Convert image to monochrome and replace black with colour using Canvas and JS
type: Question
accepted answer: http://stackoverflow.com/a/26654449

http://stackoverflow.com/comment/41819507
comment on: http://stackoverflow.com/a/26593491
has text: Thank you for anwsering. I am going to try this one, good job for the explainations !
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41780776
has text: @ManoNamo : no I dont encounter any error when i log dataObject into console
comment on: http://stackoverflow.com/q/26582181
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26564783
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/26564540
has body: Check out this article on Scotch.io for "pretty URL's" that should fix this issue. You will have to set html5Mode to true: // Remember to inject $locationProvider $locationProvider.html5Mode(true); Then, include a base in the of your html file: &lt;base href="/"&gt; This will let you navigate the webpage using relative links. The article I mentioned also goes into fallbacks for older browsers.
score: 2
downvote count: 0

http://stackoverflow.com/q/26609129
answer count: 0
type: UnansweredQuestion
tagged with: php
tagged with: passwords
has comment: http://stackoverflow.com/comment/41830400
type: Question
has body: I need some setup for Automatic Fill User ID, Password and One Select Radio Button. I am Environment consultant. and i have near 1k to 1.5k numbers of User ID and Passwords of my clients. I use these all user ids and passwords on this website link - http://pbocmms.nic.in/OCMMS-0.1/ Is it possible that i click on a link or any type of bookmark or dragdrop and then automatic open this webpage and Select Industry Radio button and then Fill User ID and Passwords except Captcha Value.
tagged with: javascript
has comment: http://stackoverflow.com/comment/41830206
score: 0
has title: Script for Pre Input Values for Forms for Third party website

http://stackoverflow.com/q/26623283
tagged with: photoshop
has answer: http://stackoverflow.com/a/33701011
favorite count: 0
has answer: http://stackoverflow.com/a/26630703
has body: I'm sure it should be discussed before by Photoshop scripters. I write a solution as following. I think it's logically right, but the result is not correct. Anybody can help to check where's wrong in the code, or have ideas for this topic? I want to get all the layers in a document. Code: function getAllLayersInLayerSets(layerNodes) { var retList = []; for (var i=0; i&lt;layerNodes.length; i++) { if(layerNodes[i].layerSets.length &gt; 0) { var tmp = getAllLayersInLayerSets(layerNodes[i].layerSets); var j = (tmp == null) ? -1 : tmp.length-1; while(tmp &amp;&amp; j&gt;=0) { retList.push(tmp[i]); j--; } } for(var layerIndex=0; layerIndex &lt; layerNodes[i].artLayers.length; layerIndex++) { var layer=layerNodes[i].artLayers[layerIndex]; retList.push(layer); } } return retList; } Many thanks for any help or discussion.
has answer: http://stackoverflow.com/a/34869257
answer count: 4
type: UnansweredQuestion
type: Question
tagged with: photoshop-script
has comment: http://stackoverflow.com/comment/41863620
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/52489478
has title: Photoshop Javascript to get all layers in the active document
score: 5
downvote count: 0

http://stackoverflow.com/comment/41831849
type: AnswerComment
comment on: http://stackoverflow.com/a/26604414
score: 0
type: Comment
has text: Session-based authorization is done, with a domain cookie on the client browser. You don't have to be authenticated to view the static documentation page. The only way it'd be able to tell is through the Cookie. When you do `$.get` does it pass the domain cookie along? If not, how could it be setup to automatically pass the (encrypted) cookie to the server for evaluation -- after which it would return the Api Key for the user? The cookie is generated by Rails, and the API is rails too.

http://stackoverflow.com/comment/41671716
type: Comment
type: QuestionComment
has text: @stefvhuynh I want to use a div like in http://jsfiddle.net/davidThomas/682pG/ (Only the div) for getting the input from user and using it in php .
comment on: http://stackoverflow.com/q/26520957
score: 0

http://stackoverflow.com/q/26620070
tagged with: jqmath
answer count: 0
type: UnansweredQuestion
upvote count: 1
has body: I want to render a user's equation in real time from an Excel form. I have created a form with a text box (TextBox1) and a Microsoft Web Browser element (WebBrowser1). I have an html file 'eqn.html' stored in the same directory as the jqMath files. My problem was passing the value of the text box to the html file. My inelegant solution was to use a query string. My VBA is: Private Sub TextBox1_Change() WebBrowser1.Navigate2 ("D:\Users\Geddes\Desktop\new graph plotter\mathscribe\eqn.html?" + TextBox1.Value) End Sub and my 'eqn.html' file is: This does the job but it seems inelegant to re-load the html file with every character typed into the text box. Is there a better way?
tagged with: excel
has title: Render equation from excel using jqMath
score: 1
type: Question
tagged with: vba
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26551070
has answer: http://stackoverflow.com/a/26551471
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3786694
linked to: http://stackoverflow.com/q/5338716
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41724476
has comment: http://stackoverflow.com/comment/41724561
type: Question
linked to: http://stackoverflow.com/q/6653556
has comment: http://stackoverflow.com/comment/41724420
tagged with: perl
tagged with: javascript
has answer: http://stackoverflow.com/a/26551397
tagged with: getelementsbyname
has comment: http://stackoverflow.com/comment/41724597
answer count: 2
has comment: http://stackoverflow.com/comment/41724897
downvote count: 0
has body: I am trying to clear some (10 of 50) fields by selecting elements by their shared id. The problem is that I can only select one at a time with getElementById() Here is the jsFiddle demonstrating the single element grab. jsFiddle function toggleBankCount() { secBankFields = document.getElementById('2ndBankFields'); secBankFields.value = ''; } I am fairly certain I can do what I want with getElementsByName() which returns an array of elements. However, I am using Perl and the name of the elements must be different in order for %fdat to work properly on submit. Can you help me?
has comment: http://stackoverflow.com/comment/41725013
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26551397
possible better answer: http://stackoverflow.com/a/26551471
has title: Trying to clear some fields with JS by selecting elements with the same id, perl hangup

http://stackoverflow.com/q/26535675
has title: Checking parent checkbox doesn't check child
tagged with: javascript
tagged with: jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/41697333
possible better answer: http://stackoverflow.com/a/26535845
favorite count: 0
has comment: http://stackoverflow.com/comment/41698302
has answer: http://stackoverflow.com/a/26535706
accepted answer: http://stackoverflow.com/a/26535706
has answer: http://stackoverflow.com/a/26535860
has body: I am trying to get some jquery to check the child checkbox when the parent is selected, however it is not happening and I can't for the life of me figure out what the deal is. Code: $('#check-all-parent').click(function(event) { if(this.checked) { // check select status $('#check-all-child').each(function() { //loop through each checkbox this.checked = true; //select all checkboxes with class "checkbox1" }); }else{ $('#check-all-child').each(function() { //loop through each checkbox this.checked = false; //deselect all checkboxes with class "checkbox1" }); } }); HTML: &lt;input type="checkbox" id="check-all-parent"&gt;hello &lt;br /&gt; &lt;input type="checkbox" id="check-all-child"&gt;hello2 Here is the jsfidle
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
answer count: 4
has comment: http://stackoverflow.com/comment/41697248
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41698160
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26535920
has comment: http://stackoverflow.com/comment/41697292
has answer: http://stackoverflow.com/a/26535845
type: Question

http://stackoverflow.com/a/26533090
upvote count: 3
has comment: http://stackoverflow.com/comment/41692585
answers question: http://stackoverflow.com/q/26532978
type: Answer
has body: Try $location.path(path) instead of $state.go(path) You need to inject $location service into your controller. Edit If you are using $state.go - you should to use it next way: $scope.itemClick = function(id){ $state.go('app.annuaire.menuitempage', {'ID': id}) }; And HTML: Accueil The first param is state name, not URL, the second is an Object with your params.
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/41693306
has comment: http://stackoverflow.com/comment/41693052
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26532978

development-environment
tags question: http://stackoverflow.com/q/26648378
type: Tag
tag name: development-environment

http://stackoverflow.com/q/26646912
has body: I am trying to make a colorful textarea with jquery. It works well but when I press enter button then it is not changing color. here is my code. I dont know how to solve this.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41898993
has answer: http://stackoverflow.com/a/26647433
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
answer count: 2
possible better answer: http://stackoverflow.com/a/26647433
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Jquery not changing text color after pressing enter button
favorite count: 0
has comment: http://stackoverflow.com/comment/41899108
has answer: http://stackoverflow.com/a/26647854
accepted answer: http://stackoverflow.com/a/26647854

http://stackoverflow.com/comment/41903101
has text: why would it be redundant since each have different properties.
type: AnswerComment
comment on: http://stackoverflow.com/a/26649302
type: Comment
score: 0

http://stackoverflow.com/a/26656180
upvote count: 5
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26656120
has body: There is no way to access a property with a question mark in the name using dot-notation in JavaScript, it starts a ternary operator.

http://stackoverflow.com/a/26775248
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26653270
has body: Here's how to do it: var KJUR = require("cloud/jsrsasign.js"); var publicKey = "-----BEGIN PUBLIC KEY-----\n" + // your public key from google play "-----END PUBLIC KEY-----\n"; var verifier = new KJUR.crypto.Signature({alg: "SHA1withRSA"}); verifier.init(publicKey); verifier.updateString(signedData); // signedData from IAB response var result = verifier.verify(KJUR.b64utohex(signature)); Be sure to convert the signature from base64 to hex.

http://stackoverflow.com/a/26588477
answers question: http://stackoverflow.com/q/26588229
has comment: http://stackoverflow.com/comment/41792832
has comment: http://stackoverflow.com/comment/41793277
has comment: http://stackoverflow.com/comment/41793876
has comment: http://stackoverflow.com/comment/41792464
accepted answer of: http://stackoverflow.com/q/26588229
has comment: http://stackoverflow.com/comment/41792278
score: 5
has comment: http://stackoverflow.com/comment/41793719
type: AcceptedAnswer
downvote count: 0
has body: I would absolute position the image and do opacity: 0; on hover example here .the_image{ position:absolute; top:0;left:0px; } .the_image:hover { opacity: 0; } Absolute position will allow the table to be underneath the image. So it wont show both. .the_image{ position:absolute; top:0;left:0px; } .the_image:hover { opacity: 0; } Basic Table Layout Name City Tanmay Bangalore Sachin Mumbai Another solution would be to have the table display:none; by default, and when you hover the image, to change it to display:block; and also change the image back to display:none; Edit: Removed code for the SECOND solution because it flickered the image, if the idea is possible then someone with more CSS knowledge than me could add the code :) (see nepeo's comment below!) First solution works!
has comment: http://stackoverflow.com/comment/41793227
type: Answer
upvote count: 5
has comment: http://stackoverflow.com/comment/41792302
has comment: http://stackoverflow.com/comment/41793568
has comment: http://stackoverflow.com/comment/41793417

http://stackoverflow.com/q/26522564
upvote count: 0
tagged with: function
has comment: http://stackoverflow.com/comment/41673785
tagged with: javascript
has comment: http://stackoverflow.com/comment/41673727
favorite count: 0
has comment: http://stackoverflow.com/comment/41673750
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26522623
answer count: 4
type: UnansweredQuestion
has body: So, the function "txtLoad()" will not execute while "txtFunc()" is being called by an onLoad function. Page The JavaScript engine says there is nothing wrong with the code inside the "script" element. Does anyone know why the function isn't executing?
has answer: http://stackoverflow.com/a/26522759
downvote count: 3
has answer: http://stackoverflow.com/a/26522770
has comment: http://stackoverflow.com/comment/41673779
has answer: http://stackoverflow.com/a/26522614
has comment: http://stackoverflow.com/comment/41673734
has title: Javascript function not executing when another function is above it
score: -3
type: Question

http://stackoverflow.com/comment/83110545
comment on: http://stackoverflow.com/a/26591182
score: 0
type: AnswerComment
type: Comment
has text: You have to check the framework code to see if it allows some customisation of that callback function (passing a function of your own). Is hard to answer better than that without more context, code example etc =)

http://stackoverflow.com/comment/41855273
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26622466
type: AnswerComment
has text: @Nix - see my latest version of the answer.

tabs
type: Tag
tags question: http://stackoverflow.com/q/26571269
tags question: http://stackoverflow.com/q/26616230
tags question: http://stackoverflow.com/q/26565405
tag name: tabs
tags question: http://stackoverflow.com/q/26557194
tags question: http://stackoverflow.com/q/26517205
tags question: http://stackoverflow.com/q/26551375
tags question: http://stackoverflow.com/q/26539747
tags question: http://stackoverflow.com/q/26642365

http://stackoverflow.com/a/26610046
has comment: http://stackoverflow.com/comment/41834605
upvote count: 1
has comment: http://stackoverflow.com/comment/41833784
type: AcceptedAnswer
downvote count: 0
score: 1
has body: I had a similar challenge. I had to use a modal to add/edit an item and the result of that action (success/error) had to be displayed in a modal as well. The tricky part is to close the current modal and to open a new one again. Especially if there is not much time between closing one modal and opening another. What I have done is combined the two. And maybe that could be a solution for you too. Create a modal with a body containing two sections, one for entering the password (checking and displaying the result if password is not ok) and one containing the links. When a password is needed, only the password section is displayed. When the password is correct, hide the password section and unhide the link section. Using this approach only one modal is needed. Using this approach, you won't have to bring up a new modal, just use the one that is open already.
has comment: http://stackoverflow.com/comment/41832308
accepted answer of: http://stackoverflow.com/q/26609059
type: Answer
has comment: http://stackoverflow.com/comment/41833166
answers question: http://stackoverflow.com/q/26609059
has comment: http://stackoverflow.com/comment/41834200
has comment: http://stackoverflow.com/comment/41835501

http://stackoverflow.com/comment/41804375
score: 0
has text: For some reason even when I copy and paste the code from the JSFiddle you posted into Sublime Text 2 and save it to my local HDD, and run it in Google Chrome and Firefox, the hypotenuse is still out of posiition. Yet on the jsfiddle page, it looks like a nice right triangle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26594456

http://stackoverflow.com/comment/41892066
score: 1
type: Comment
type: QuestionComment
has text: Hit *"View page source"* in your browser. The problem should be apparent then
comment on: http://stackoverflow.com/q/26642690

http://stackoverflow.com/comment/41689668
type: Comment
has text: http://api.jquery.com/jQuery.trim/
type: QuestionComment
comment on: http://stackoverflow.com/q/26530950
score: 0

http://stackoverflow.com/comment/41782381
has text: thank you for your reply. Maybe i've not explained myself correctly. Let me try to rectify what i'm trying to do. I am able to pass correctly all data, using like you suggested $('#modalBody').html(event.id);), but it's not really that, what I want. I would like to retrieve that ID in PHP so I can then work in my mysqli_ database query to get more information stored for that event, for example the user name & id who registered the event, etc.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26549856

http://stackoverflow.com/a/26544344
upvote count: 2
has body: you have to add a filter to your file's columns/keys d3.csv("yourfile.csv", function(csv) { csv = csv.filter(function(key) { return key != "Sex" &amp;&amp; key != "L" &amp;&amp; key != "M" &amp;&amp; key != "S" ; }); });
downvote count: 0
answers question: http://stackoverflow.com/q/26521945
type: Answer
score: 2

http://stackoverflow.com/comment/41756015
has text: That's a great answer! I'm learning Angular Js so I will go definetely for the Angular Js approach that you posted here. Thanks again!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26568452

http://stackoverflow.com/comment/41810447
type: Comment
type: QuestionComment
has text: @Thorsten: I made a [jsfiddle](http://jsfiddle.net/njiterry/vwb1c0mk/22/). If you click on the 'Docs' button, the dialog is loaded and you can access the datepicker. Everything works here because I do everything in one javascipt file and 1 webpage. In my project, when the button is clicked, a new jsp file(with t's own jaavascript) is loaded. Maybe the solution is to use one jsp file and 1 javascript file.
score: 0
comment on: http://stackoverflow.com/q/26591619

http://stackoverflow.com/comment/41932191
has text: That looks really weird on a graph though. You don't know which way a number has been rounded when it displays just "1" why should it matter which side of 0 the number has rounded from? 0°C, 0mm of rain, etc. I don't like that specification.
score: 0
comment on: http://stackoverflow.com/q/26664344
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26641401
score: 0
type: Answer
has body: If you inspect your element you'll see in your favorite developer tool that the related element's styles look like: #quotes_slider_container &gt; .flex-direction-nav .flex-next:before { content: ""; } note the unsupported character. by fixing/changing that rule with this characters: ￩ ￫ this is the result:
answers question: http://stackoverflow.com/q/26641316

http://stackoverflow.com/a/26660768
has body: Do you need the "timestamp_" for something? Why not just = classes.replace(/^.*timestamp_(\d+).*/img, "$1");
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26660459
answers question: http://stackoverflow.com/q/26660459
type: Answer
has comment: http://stackoverflow.com/comment/41924873
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41943515
upvote count: 2

http://stackoverflow.com/comment/41773276
has text: Where can we see this happening? Where is the html,css and javascript code?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26577954

http://stackoverflow.com/a/26650574
has body: You are right, you can use the property groupName to group the RadioButtons and with property selected you set the selected RadioButton. The binding can be done as usual, you would bind the text against your name and if you would like to bind the selection as well, then you would have to put this into your data as well. Your data would look like this: { options : [ { "name" : "A", "selected" : "true" }, { "name" : "B" }, "selected" : "false" ] } If you have a look at www.github.com/SAP/openui5/ you can check the master branch, there is already a sap.m.RadioButtonGroup which you can use for testing. It will probably come with the next release. BR, Janina
downvote count: 0
answers question: http://stackoverflow.com/q/26648701
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26563382
has answer: http://stackoverflow.com/a/26563656
type: Question
has comment: http://stackoverflow.com/comment/41746728
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/41746543
favorite count: 0
accepted answer: http://stackoverflow.com/a/26563656
has comment: http://stackoverflow.com/comment/41746597
has comment: http://stackoverflow.com/comment/41746644
has comment: http://stackoverflow.com/comment/41746567
has comment: http://stackoverflow.com/comment/41746698
upvote count: 2
has title: Using recursive function to remove all duplicated array elements
has comment: http://stackoverflow.com/comment/41746529
has body: what I want to get is like clean([3,2,3,2,5,1]) == [5,1], for learning purpose, I want to do it using recursive function and vanilla javascript only. The function I wrote is as follows: r=[]; var clean = function(array){ var s1=array.slice(0); var s2=array.slice(0); if(s2[0] !== undefined) { r.push(s2.shift()); for (i=0,flag=false;i&lt;s2.length;i++){ if (r[r.length-1] == s2[i]){ s1[i+1]=undefined; flag=true; } } if (flag==true){ r.pop(); s1.shift(); for (j=0;j&lt;s1.length;j++){ if (s1[j] == undefined) {s1.splice(j,1);j--}; } } else{ s1.shift(); } } if (s2.length !== 0) clean(s1); return; } It seems working, but there are something I don't feel comfortable with: First of all, I'm very new to programming, when I write javascript functions, I always feel the need to define a variable outside the function to store the result, as r in this case, I know this is a very bad practice and I should define a variable inside the function and just return it. But I spent 6 hours on writing above codes(don't laugh at me), now my brain is totally failing me, I can't think of a way to bring this variable into the function. Any hints are greatly appreciated; Secondly, when I loop through an array and modify it, its length changes on the go, making the loop unreliable, I had to copy the array to 2 different variables(s1,s2) to avoid looping problem. This is very awkward. Later I think of that I can modify the looping index on the go while the array length changes (as you can see in the j loop), but is this a good practice? The following improved function seems working too: var ccc = function(array){ var s1=array.slice(0); if(s1[0] !== undefined) { r.push(s1.shift()); for (i=0,flag=false;i&lt;s1.length;i++){ if (r[r.length-1] == s1[i]){ s1.splice(i,1); i--; flag=true; } } if (flag==true){ r.pop(); } if (s1.length !== 0) ccc(s1); } return; } Besides, I know jQuery probably has a function to achieve this, but if no frame is allowed, what is the best approach(recursive or not)? I briefly…
has comment: http://stackoverflow.com/comment/41746621
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/75262431
has text: Just FYI, this caused issues for me where as `type="text/javascript"` worked properly.
type: AnswerComment
comment on: http://stackoverflow.com/a/43122460
type: Comment
score: 3

http://stackoverflow.com/q/26517535
type: Question
has answer: http://stackoverflow.com/a/26517697
has title: How to get selector type using javascript or jquery for use in switch statement
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41665670
score: 0
tagged with: css-selectors
tagged with: jquery-selectors
type: UnansweredQuestion
has body: I currently have the following code to find the type of selector and respond appropriately. This is ugly but its the best I have been able to come up with so far to distinguish between input types checkbox, radio, text, and select drop down list. I am hoping there is a way I could do this with a switch statement. if ($(selector).is(':checkbox')){ //do something }else{ if (selector.indexOf("radio") &gt;= 0){ //do something }else{ if ($(selector).is('input') || $(selector).is('select')) { //do something } } } one thing I will bring up is that $(selector).is('input') is the only way I figured out how to catch input type="text" however this would also catch checkboxes so I had to put it at the very bottom.

http://stackoverflow.com/comment/41939882
type: Comment
has text: @OkiErieRinaldi: May be the answers here is not exactly what you are looking for, but some one could find these answers useful soemday. Or the question here is not anything like you wanted to post, but still for the sake of other users I still Insist on not taking down the POST.
comment on: http://stackoverflow.com/a/26669402
score: 1
type: AnswerComment

http://stackoverflow.com/comment/41895950
has text: @YuriyGalanter Asking sincerely, what would be the best way to restore it?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26641242
type: Comment

http://stackoverflow.com/comment/41920192
type: QuestionComment
comment on: http://stackoverflow.com/q/26657353
has text: @SjoerdDeWit That produces a datetime that is close to ISO8601, but not exactly. If you want it to be parsed correctly in all browsers, you need to format it, or parse it yourself (or with a library)
type: Comment
score: 2

http://stackoverflow.com/q/26668036
has comment: http://stackoverflow.com/comment/41937295
answer count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: Why is HTML content not visible in some versions of Chrome?
has comment: http://stackoverflow.com/comment/41937350
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41942668
tagged with: css
has body: Suppose I have a div whose content is dependent on the button click on top of that. The content of three button clicks are stores in variables one, two and three. &lt;div id="onebutton"&gt;&lt;/div&gt; &lt;div id="twobutton"&gt;&lt;/div&gt; &lt;div id="threebutton"&gt;&lt;/div&gt; &lt;div id="content"&gt;&lt;/div&gt; Using jQuery, when the onebutton div is clicked, I put the HTML content of variable one into the content div: $('#content').html(one); Now, what sometimes happens is that the content is present in the div, but it does not show. It sometimes shows when I hover the mouse over the div and gets shown in parts (i.e. the browser shows only some part of the div where my mouse is). There is a tool called Active X-Ray Googles. When I activate it and take my mouse over the content div, it is also shown. I do not know what is wrong. I have tested it in 20 versions of Chrome, but it does not work on one of them. The version it does not work on is the latest version of Mac OS X Mavericks on a MacBook Pro Retina.
type: Question
score: 0
has comment: http://stackoverflow.com/comment/41937314
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/41941037
has comment: http://stackoverflow.com/comment/41943531

http://stackoverflow.com/a/26642722
score: 1
has body: The value attribute is mandatory for checkboxes and defaults to on. This applies whether the checkbox is checked or not, the value is always the same. What you want is to check the state of the checkbox (not its value). $('#remember').prop("checked") Btw, this is way faster than .is(:checked), see http://jsperf.com/prop-vs-ischecked/5 for a comparison.
has comment: http://stackoverflow.com/comment/41892128
upvote count: 1
has comment: http://stackoverflow.com/comment/41892268
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26642673
has comment: http://stackoverflow.com/comment/41892660
accepted answer of: http://stackoverflow.com/q/26642673
type: Answer

http://stackoverflow.com/q/26635078
answer count: 0
has title: How can I get the user’s PC name using JavaScript in the browser?
has body: How can I show a user his PC name, on the client side? I’m working with Jade and Express on the server side. I need to allow the user to select an option to get data from a local service.
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/41878761
score: 0
upvote count: 1
downvote count: 1
tagged with: client-side
favorite count: 0
has comment: http://stackoverflow.com/comment/41877928
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11930356

http://stackoverflow.com/q/26571521
has title: removing clicked item from array in javascript
possible better answer: http://stackoverflow.com/a/26571849
has answer: http://stackoverflow.com/a/26571849
type: Question
accepted answer: http://stackoverflow.com/a/26571794
has answer: http://stackoverflow.com/a/26571948
score: 0
has body: I have a click function to make a list of chosen items. Also, I push the chosen items to an array. There is no problem in that part, here is the function. $('#addToCartButton2').click(function(){ var toAdd=$("#chooseItem2 option:selected").text(); var itemNbr2=$("#itemNbr2").val(); if(toAdd !== defaultSelectFormText && itemNbr2 >=1){ $('#defaultText').remove(); $('.col-md-5').append(' ' + itemNbr2 + ' Adet ' + toAdd + 'Sipariş listesinden çıkarmak için tıklayın!' + ' '); ordersArray.push(itemNbr2 + ' Adet ' + toAdd); alert(ordersArray.toString()); }; }); But I also have a function to remove the clicked item from that list. So I want to remove that item also from array when it is clicked. I tried to use splice method but I can not get the index of the clicked item. Here is the remove function. $(document).on('click', '#items', function() { $(this).remove(); var index = ordersArray.indexOf($(this).val()); alert(index); if (index > -1) { ordersArray.splice(index, 1); } }); How can I get the index of the clicked item in the list?
answer count: 3
tagged with: indexing
has answer: http://stackoverflow.com/a/26571794
tagged with: splice
has comment: http://stackoverflow.com/comment/41761616
type: AnsweredQuestion
tagged with: arrays
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26591349
has answer: http://stackoverflow.com/a/26591470
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/26591470
type: AnsweredQuestion
score: 1
has title: How to get device size (mobile)?
upvote count: 1
has answer: http://stackoverflow.com/a/26591425
accepted answer: http://stackoverflow.com/a/26591425
type: Question
has body: I try to draw a circle in the middle of the device browsers width and height. But the canvas element disturb. The circle become draw in the middle of the devices width and height, if I make the canvas big enough, but the canvas size should fit in the device size. Is there any way to fit the canvas width and height the device width and height? thats the solution:
answer count: 2
tagged with: canvas
downvote count: 0
tagged with: javascript

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/26646591
tags question: http://stackoverflow.com/q/26602326
tags question: http://stackoverflow.com/q/26531117
tags question: http://stackoverflow.com/q/26638886
tags question: http://stackoverflow.com/q/26549642
tags question: http://stackoverflow.com/q/26535847
tags question: http://stackoverflow.com/q/26590560
tags question: http://stackoverflow.com/q/26557216
tags question: http://stackoverflow.com/q/26573419
tags question: http://stackoverflow.com/q/26614400
tags question: http://stackoverflow.com/q/26626853
tags question: http://stackoverflow.com/q/26562590
type: Tag
tags question: http://stackoverflow.com/q/26598183
tags question: http://stackoverflow.com/q/26636461
tags question: http://stackoverflow.com/q/26671942
tags question: http://stackoverflow.com/q/26513764
tags question: http://stackoverflow.com/q/26535675
tags question: http://stackoverflow.com/q/26588208
tags question: http://stackoverflow.com/q/26642673
tags question: http://stackoverflow.com/q/26550799
tags question: http://stackoverflow.com/q/26596000
tags question: http://stackoverflow.com/q/26653232

http://stackoverflow.com/q/26519185
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/26519259
type: Question
has answer: http://stackoverflow.com/a/26519260
possible better answer: http://stackoverflow.com/a/26519260
has body: i am using komodo IDE 8.5 I am trying to indent to the next line to prevent code from extended really far to the right but everytime i just indent. it breaks the line and dose not register. I'm not quite sure how to word it. example: var price = 60; if (price &gt; 60) document.write("&lt;p&gt; the brown fox jumped into the cold river.&lt;/p&gt;") but i want it to look like this and still function : var price = 60; if (price &gt; 60) document.write("&lt;p&gt; the brown fox jumped into the cold river.&lt;/p&gt;") or something similar. when i just simply indent it breaks the line of code and de-colorizes it and shows it as not being correct. how can i accomplish this? is it the IDE itself or do i need some kind of syntax to indicate what im doing?
score: 0
answer count: 2
has title: indent to next line in javascript
accepted answer: http://stackoverflow.com/a/26519259
tagged with: komodo

http://stackoverflow.com/comment/127436851
has text: Setting `dom.event.clipboardevents.enabled` to false breaks functionality in some web apps - for example, Discord won't accept pasting any more.
type: AnswerComment
score: 5
comment on: http://stackoverflow.com/a/61941695
type: Comment

http://stackoverflow.com/q/26667693
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/41936818
has answer: http://stackoverflow.com/a/26667760
has body: I have this code: //sample of data. var combobox = new[] { new { Key = 1, Value = "a[del]", isDelegate = true }, new { Key = 2, Value = "b[del]", isDelegate = true }, new { Key = 3, Value = "c", isDelegate = false }, new { Key = 4, Value = "d", isDelegate = false }, new { Key = 5, Value = "e[del]", isDelegate = true } }; -- I'm trying add a ng-if to options for a result like this: {{item.Value}}
possible better answer: http://stackoverflow.com/a/26667876
tagged with: angularjs
has answer: http://stackoverflow.com/a/26667876
has comment: http://stackoverflow.com/comment/41936834
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26667927
has title: Filtering ngOptions by properties of an attribute
has comment: http://stackoverflow.com/comment/41936799
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26667760

http://stackoverflow.com/a/26627132
type: Answer
answers question: http://stackoverflow.com/q/26627075
has body: You can use .is() method with :checked selector. like this: $("#Days_Fr").is(":checked")
score: 0

http://stackoverflow.com/comment/41706262
comment on: http://stackoverflow.com/q/26540706
score: 17
has text: JSON does not have an undefined value. What do you want?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41768404
comment on: http://stackoverflow.com/a/26574976
type: Comment
has text: Yups, just read this over - http://stackoverflow.com/questions/2010892/storing-objects-in-html5-localstorage/ I managed to use two different strings and then have them displayed using JavaScript since I don't have any idea of JSON :( Anyways, this solved my problem. Once again, Thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41826669
comment on: http://stackoverflow.com/q/26607013
has text: What I don't know is how to fetch the menu from wordpress and add the styling to it, in this case the already existing "dropdown" "dropdown-menu" etc. classes.
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/26595290
accepted answer: http://stackoverflow.com/a/26595404
has answer: http://stackoverflow.com/a/26595457
type: Question
has comment: http://stackoverflow.com/comment/41805218
has answer: http://stackoverflow.com/a/26595404
tagged with: javascript
has comment: http://stackoverflow.com/comment/41805268
score: 0
has comment: http://stackoverflow.com/comment/41805285
answer count: 2
has title: How do I rename an inside a using jQuery?
possible better answer: http://stackoverflow.com/a/26595457
tagged with: jquery
has comment: http://stackoverflow.com/comment/41805991
tagged with: html-lists
has body: I need your help. I couldn't find much reference material out there (if any) on the web, so I am turning to the help of the gurus and experts around this place. How can I make a listbox, such that when an item is highlighted, and I click on the Rename button at the top, an input box with the li's current value will be placed in the same spot as the selected LI value and the user will have the option to rename the li item. The changes are then saved if the lisbox has lost its focus. Similar examples are Windows, when you click "rename" the list item becomes an input box for the user to rename the file. I'd like to mock the same functionality and apply it to a UL LI listbox. For the sake of keeping things plain and simple, I am jQuery friendly. Here's a fiddle: http://jsfiddle.net/a4kg2612/ HTML: red green blue yellow orange purple
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26546964
has comment: http://stackoverflow.com/comment/41718092
tagged with: forms
has comment: http://stackoverflow.com/comment/41717835
has comment: http://stackoverflow.com/comment/41718384
has comment: http://stackoverflow.com/comment/41717375
has comment: http://stackoverflow.com/comment/41719341
has comment: http://stackoverflow.com/comment/41718939
has comment: http://stackoverflow.com/comment/41716857
has comment: http://stackoverflow.com/comment/41716934
has comment: http://stackoverflow.com/comment/41717247
has comment: http://stackoverflow.com/comment/41717052
tagged with: validation
has comment: http://stackoverflow.com/comment/41719433
has comment: http://stackoverflow.com/comment/41717659
tagged with: javascript
has comment: http://stackoverflow.com/comment/41717260
has comment: http://stackoverflow.com/comment/41717765
score: 0
has comment: http://stackoverflow.com/comment/41717208
has comment: http://stackoverflow.com/comment/41717306
tagged with: http://stackoverflow.com/tag/html
has body: I am fairly new to HTML & Javascript and I have been assigned a task to create a HTML form for a restaurant which allows the user to input their information for a booking. So far I have created the form for the website and validated each input field in order to ensure the correct information is entered into the necessary fields. I have also tried to enable the total cost to be calculated on screen so the user can see how much their booking will cost before they click the submit button. However, the code I have thus far does not seem to be functioning as the total price never increases from 0 if an option is picked. Here is the relevant html code: Select Party Size: Please Select 1 Person (£5) 2 People (£10) 3 People (£15) 4 People (£20) 5 People (£25) 6 People (£30) 7 People (£35) 8 People (£40) 9 People (£45) 10+ People (£50) ... VIP Area? Yes (+£5) No Please specify whether you would like a table in the VIP area. Total booking cost based on party size 0 VIP selection: Here is the relevant javascript to perform the calculations: $(document).ready(function(){ $(document).on('change', '#party', function(e) { $('#price').html(parseInt($(this).val()) + parseInt($('input[name="hand"]:checked').val())); }); $(document).on('click', 'input[name="hand"]', function(e) { $('#price').html(parseInt($('#party').val()) + parseInt($(this).val())); }); }); For example, if the customer selects that there are 6 people in their party(+£30) and they also wish to be seated in the VIP area(+£5), the total price displayed at the bottom of the page would be £35. If anyone has any suggestions as to why my code isn't functioning I would appreciate the help. Thank you.
has comment: http://stackoverflow.com/comment/41718881
has comment: http://stackoverflow.com/comment/41717505
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41717381
has comment: http://stackoverflow.com/comment/41717613
type: Question
has title: Javascript & HTML on page calculations
has comment: http://stackoverflow.com/comment/41717567

http://stackoverflow.com/comment/41916210
comment on: http://stackoverflow.com/a/26656759
type: AnswerComment
type: Comment
has text: I would be very interested to see the answer if you find it, seems like it would need to return a number that was also a function
score: 1

http://stackoverflow.com/q/26663188
favorite count: 0
has answer: http://stackoverflow.com/a/26663341
tagged with: angularjs
tagged with: directive
upvote count: 1
has title: Angular Directive needs access to variable in ng-repeat
type: Question
type: AnsweredQuestion
score: 1
has body: &lt;div ng-repeat="campaign in campaigns"&gt; &lt;div progressbar="value"&gt;&lt;/div&gt; &lt;/div&gt; Each campaign has it's own unique property called "percent" that I want the directive to be able to access. myApp.directive('progressbar', function(){ return { restrict: 'A', scope: { 'progress': '=progressbar' }, controller: function($scope, $element, $attrs) { $element.progressbar({ value: *** I want this to refer to the correct campaign.percent *** }) } } }) I have a feeling I am severely overthinking this one. Any help would be greatly appreciated. Thanks!
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/41928347
accepted answer: http://stackoverflow.com/a/26663341

http://stackoverflow.com/a/26616595
score: 0
has body: Not to be completely antiquated here, but here's how I'd do it if I didn't want to use Modernizr. There are probably a ton of different ways to do this but... If I were trying to target a specific version of IE (regardless of CSS3), I would just use IE conditional comments. For example: Style the fade-in div with display:none; in the linked conditional commented CSS Stylesheet (ie.css or whatever you wish to name it). That fade-in div would appear in all browsers except the specific IE browsers that you targeted with the conditional comments just by using a tiny bit of CSS. Simple solution and very lightweight. See more about conditional comments here: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ Also, if you wanted to know more about what CSS3 can be used on specific browsers check out http://caniuse.com/ It clearly defines what you can and cannot use for specific browsers (not just IE).
answers question: http://stackoverflow.com/q/26587644
type: Answer

http://stackoverflow.com/q/26657821
has answer: http://stackoverflow.com/a/26657920
type: Question
has title: javascript Array from the request
tagged with: jstl
answer count: 1
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26657920
score: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: enter code hereI have a variable from the server that defines a Javascript ArrayList representing countries as follows: [Belgium,Denmark,Germany,Italy,Portugal,Ireland,India,Morocco,Republic Of Korea]; getting the variable from the request in the jsp without quotes: var countries = ${countryList}; I get this error: SCRIPT1007: Expected ']' I get no errror using quotes var countries = '${countryList}'; but the result is not the expected. I would like to access 'Belgium' as countries[0] 'Denmark' as countries[1] instead of 'B' as countries[0], 'e' countries[1] , etc...

http://stackoverflow.com/comment/41763236
comment on: http://stackoverflow.com/q/26572606
type: Comment
type: QuestionComment
has text: KryDos - did it, thanks.
score: 0

http://stackoverflow.com/q/26557215
tagged with: css
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26609394
possible better answer: http://stackoverflow.com/a/26557579
upvote count: 3
has answer: http://stackoverflow.com/a/26557579
has answer: http://stackoverflow.com/a/26557514
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/58432992
has body: I have a feeling that this is going to be rather simple to answer and that I am missing something rather minor. So here it goes. What I have is a table that is being populated based off some mySQL. The datatable code looks like this: $("#etlTable").DataTable({ "dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>', "iDisplayLength": 100, "ordering": false, "autowidth": true, "columns": [{ "data": "file_name","class": "nowrap" }, { "data": "start_time", "class": "nowrap" }, { "data": "end_time"}, { "data": "duration"}, { "data": "outcome", "class": "chk"}, { "data": "client_name" }, { "data": "details" } ], "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { if (aData[4] == "Fail") { $(nRow).children().each(function (index, td) { $(this).addClass('res'); }); } } }); I think that this might be it seems to be the if statement that is causing the issue. But I am not sure what to do next. Ideally I would like to highlight the table row when the 'Outcome' column value = "Fail" I can get it to work without the If Statement in there, but that just hightlights the whole table which is not very helpful to me. Example of Table row Customer1_File 2014-10-22 2014-10-22 00:25:26 Fail Client_name Job_Code_Details This is what I was using before, but it doesn't work since the table is loaded after this is ran: If I do it this way: "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { $(nRow).children().each(function (index, td) { $(this).addClass('res'); }); } It highlights my whole table. I am pretty new to JQuery/Javascript ( as in this is my first project, I took it over from someone else and trytingo to piece this thing together and make some improvements. ) So my question is, what I am I doing wrong here? How Can I highlight the row of a table based of the cell value?
tagged with: javascript
tagged with: jquery
answer count: 6
has title: Using jQuery to highlight datatable row not working
has answer: http://stackoverflow.com/a/26609394
tagged with: datatables
tagged with: highlight
favorite count: 0
has answer: http://stackoverflow.com/a/26588746
has answer: http://stackoverflow.com/a/26557769

http://stackoverflow.com/comment/41816671
comment on: http://stackoverflow.com/q/26601022
score: 0
type: Comment
type: QuestionComment
has text: why 2 `onsubmit()` ?

http://stackoverflow.com/comment/41726503
score: 0
type: AnswerComment
type: Comment
has text: I need animate rest on appearing not just fade in or fade out
comment on: http://stackoverflow.com/a/26552026

http://stackoverflow.com/q/26516033
possible better answer: http://stackoverflow.com/a/26518148
linked to: http://stackoverflow.com/q/4288759
score: 0
has comment: http://stackoverflow.com/comment/41662062
has body: I'm trying to iterate through an array of RSS feeds as below: var rssFeeds = [ ['http://www.huffingtonpost.com/tag/womens-rights/feed/', "Huffington Post"], ['http://abcnews.go.com/topics/urss?pageid=681900', "ABC News"], ['http://www.globalissues.org/news/topic/166/feed', "Global Issues"], ['http://topics.nytimes.com/top/reference/timestopics/subjects/f/feminist_movement/index.html?rss=1', "The New York Times"] ]; This array contains both the location of the feed and a string with the name of the feed. I iterate through the array with a for loop as below, the one with i as an iterator. Once I receive the results, I iterate through the results in the callback function with the for loop j. I append each fetched result to another array entryArray, and after appending each result, I add a new attribute 'source' to that fetched result using the name for the RSS feed. function loadEntries() { var feedr = new Array(); for( var i = 0; i &lt; rssFeeds.length; i++ ) { feedr[i] = new google.feeds.Feed( rssFeeds[i][0] ); feedr[i].setNumEntries(loadAmount); feedr[i].load(function(result) { if (!result.error) { console.log(i); for (var j = 0; j &lt; result.feed.entries.length; j++) { entryArray[entryArray.length] = result.feed.entries[j]; entryArray[entryArray.length - 1]['source'] = rssFeeds[i][1]; } } }); } } However, and this is where the problem arises, the iterator I use (i) to indicate the name to append is always equal to rssFeeds.length, because the callback functions for all four load commands occur after the initial for loop has already finished iterating. The console.log(i); you see always returns 4. This worked when I copied and pasted the code for each item individually, but I'd rather not copy and paste because the RSSFeeds array will probably be much longer in the future. Is there any way I can accomplish this with a loop?
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/41662272
accepted answer: http://stackoverflow.com/a/26519752
tagged with: rss
type: AnsweredQuestion
has title: Javascript loading RSS feeds with for loop
has comment: http://stackoverflow.com/comment/41662159
type: Question
has answer: http://stackoverflow.com/a/26518148
has comment: http://stackoverflow.com/comment/41662316
answer count: 2
has answer: http://stackoverflow.com/a/26519752
tagged with: arrays
tagged with: javascript
tagged with: google-feed-api

http://stackoverflow.com/a/26595103
answers question: http://stackoverflow.com/q/26595040
score: 0
type: Answer
has body: Try this: document.getElementById("#bookingDiv").innerHTML = "seat 1";

opengl-es-2.0
tag name: opengl-es-2.0
tags question: http://stackoverflow.com/q/26576429
type: Tag

http://stackoverflow.com/a/39503785
upvote count: 7
score: 7
has body: Give this a try; I use it myself often. (function() { var intervalObj = null; var retry = 0; var clickHandler = function() { console.log("Clicked; stopping autoscroll"); clearInterval(intervalObj); document.body.removeEventListener("click", clickHandler); } function scrollDown() { var scrollHeight = document.body.scrollHeight, scrollTop = document.body.scrollTop, innerHeight = window.innerHeight, difference = (scrollHeight - scrollTop) - innerHeight if (difference &gt; 0) { window.scrollBy(0, difference); if (retry &gt; 0) { retry = 0; } console.log("scrolling down more"); } else { if (retry &gt;= 3) { console.log("reached bottom of page; stopping"); clearInterval(intervalObj); document.body.removeEventListener("click", clickHandler); } else { console.log("[apparenty] hit bottom of page; retrying: " + (retry + 1)); retry++; } } } document.body.addEventListener("click", clickHandler); intervalObj = setInterval(scrollDown, 1000); })()
downvote count: 0
has comment: http://stackoverflow.com/comment/114059531
type: Answer
answers question: http://stackoverflow.com/q/26631839

http://stackoverflow.com/q/26554720
has title: Wanting to load new image from folder on each "next" click
has comment: http://stackoverflow.com/comment/41731494
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26554747
tagged with: image
has body: I am attempting to use the Jquery .load function to refresh a picture box on the page with a new picture each time a "next" arrow is clicked, without refreshing the entire page. I have a folder of around 300 .jpeg's and would like to have it load from that folder, one image at a time. I am relatively new to coding so I'm not completely accustomed to all the languages and what they can be used for. Is this possible? Or do I need to list every image in the actual code? Thank you in advance.
type: Question
accepted answer: http://stackoverflow.com/a/26554747
upvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
linked to: http://stackoverflow.com/q/4285042
tagged with: directory
favorite count: 0
score: -1

http://stackoverflow.com/comment/41951966
type: AnswerComment
has text: @valdroni what I see from your code is `jQuery('#sign_up_email').lightbox_me({`, right? You should put the GA code above in `onLoad: function() {`. When the modal shows up and it has focus then register the virtual pageview or the event.
type: Comment
comment on: http://stackoverflow.com/a/26665043
score: 0

http://stackoverflow.com/comment/41683600
comment on: http://stackoverflow.com/q/26528371
type: QuestionComment
has text: What are you trying to do with `display.value+=1`? What is "display"? "display" is just a variable, not your display input element.
score: 0
type: Comment

http://stackoverflow.com/comment/41909954
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26653308
has text: it was just printing request..... thats it than i kept alert('1') and 2 but its just print alert 1
score: 0

http://stackoverflow.com/comment/41735618
score: 0
has text: Can you explain what you tried?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26557039

http://stackoverflow.com/q/26594101
answer count: 2
upvote count: 1
has body: I'm trying to create an autocomplete field with selected options displayed below the field with an option to remove them from the list. I was able to find code that allows me to do that with a dropdown list, but I can't figure out to get it to work with autocomplete. Fiddle: http://jsfiddle.net/bKWpg/1/ I also found this: http://jsfiddle.net/JhRL5/31/ and was thinking I could combine the two somehow, but I'm not sure how to begin. $(document).ready(function(){ $("#cities").change(function(){ var a = $("#cities :selected").text(); $("#selectedlist").html(a); }); }); Can someone help point me in the right direction?
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/26594595
downvote count: 0
has answer: http://stackoverflow.com/a/26617155
tagged with: multi-select
accepted answer: http://stackoverflow.com/a/26617155
type: Question
type: AnsweredQuestion
tagged with: autocomplete
score: 1
has answer: http://stackoverflow.com/a/26594595
has title: autocomplete multiselect field with results displayed in a div below

http://stackoverflow.com/q/26632332
has body: I have used fnDestroy() to clear the dataTable on change of a select element, but it doesn't clear the table, instead it appends the data into the table. Here's the code. HTML: All Compiled On-Going Cancelled From Status Subject Date Received Due Date Actions JQuery: $('#changeView').on('change', function() { var value = $(this).val(); var change = ''; if (value === '1') { change = 'All'; } else if (value === '2') { change = 'Compiled'; } else if (value === '3') { change = 'On-Going'; } else if (value === '4') { change = 'Cancelled'; } loadDocuments(change); }); function loadDocuments(change) { $('#documentsTable').dataTable().fnDestroy(); $.post(base_url + "admin/document/getAllDocuments", {change: change}, function(response, status) { var result = JSON.parse(response); $.each(result, function(i, field) { var dateReceived = format_mysqldate(field['dateReceived']); var dueDate = format_mysqldate(field['dueDate']); $('#documentsTable tbody').append(' ' + field['from'] + ' ' + field['status'] + ' ' + field['subject'] + ' ' + dateReceived + ' ' + dueDate + ' ' + '' + '' + ' '); }); $('#documentsTable').dataTable({ "aoColumns": [ null, null, null, null, null, {"bSortable": false} ], "order": 3, "desc", "bDestroy": true }); }); } Can any one tell me what is wrong with my code? I can't get to clear the dataTable in every change of selection. Thank you ahead.
has answer: http://stackoverflow.com/a/26634006
has title: How to clear DataTable with onchange in jQuery?
answer count: 4
has answer: http://stackoverflow.com/a/36031198
score: 8
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26634006
possible better answer: http://stackoverflow.com/a/36031198
type: Question
has answer: http://stackoverflow.com/a/26633708
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/58370533
tagged with: datatable
favorite count: 0
upvote count: 8

http://stackoverflow.com/a/26738250
accepted answer of: http://stackoverflow.com/q/26645638
answers question: http://stackoverflow.com/q/26645638
type: Answer
has body: You could delete the .fp-section class of your section below so that the plugin thinks your form in is the latest section. You can do it using the afterRender callback. Then, in whichever action you use to validate your form, if it is correct, then you add the fp-section class again to the next section. If you want to do the validation by mousewheel you will have to create your own mousewheel handler...
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/26593536
downvote count: 1
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26593877
favorite count: 0
type: UnansweredQuestion
has body: I am new to any kind of coding and was wondering if anyone could help me out as this is a major part of my website. Also I am using a website creator (Wix.com) as I don't really know much coding, which means I can only use html/javascript what I'm after doing is having a user input box that requires a reference number that I will be sending out with my products, when submitted I want it to take them to the relevant page e.g. my site is http://www.scotttaylor1989.wix.com/authenticproducts (soon to be www.authentic-products.com) and say the reference number is 123456789 when submit is clicked i want it to take them to scotttaylor1989.wix.com/authenticproducts/123456789 (www.authentic-products.com/123456789) ill obviously change the code when my site address changes. On the other hand say 987654321 is NOT a reference number and they enter it and click submit I want an alert to pop up saying invalid reference number. Below is what I have so far not much I know but javascript baffles me :/, I've been searching the internet for days and can't find a solution as everyone is doing it using php, any help would be much appreciated ;) I don't want the code given to me as I want to learn how it works I've looked around www.w3schools.com but just don't know how its done. &lt;form name="RefChecker"&gt; &lt;input type="text" placeholder="Enter Reference Number" name="ref"&gt; &lt;input type="submit" value="submit" onclick="gotoref()"? &lt;/form&gt; &lt;script type="text/javascript"&gt; function gotoref() { } &lt;/script&gt;
upvote count: 1
has title: how to direct a user to a url using a user input javascript

jquery-events
tag name: jquery-events
tags question: http://stackoverflow.com/q/26586467
tags question: http://stackoverflow.com/q/26630628
tags question: http://stackoverflow.com/q/26603028
tags question: http://stackoverflow.com/q/26528653
tags question: http://stackoverflow.com/q/26579592
type: Tag
tags question: http://stackoverflow.com/q/26584308
tags question: http://stackoverflow.com/q/26618564
tags question: http://stackoverflow.com/q/26657058
tags question: http://stackoverflow.com/q/26615800

http://stackoverflow.com/q/26605139
tagged with: class
has body: var Foo = (function(){ function Foo(){ this._s="string"; this.setButton(); }; Foo.prototype.setButton = function(){ document.getElementById('id').addEventListener('click', function(event) { alert(this._s); }); }; Foo.prototype.method = function(){ alert(this._s); }; return Foo; })(); var fo = new Foo(); fo.method(); I want to bind an event to a button, and execute a function whic use a 'private' var, when I click the button the function is correctly called but it can't see the var this._s (it writes 'undefined'). If I write fo.method() the string is correctly printed. here is the jsfiddle: http://jsfiddle.net/wLm1v4La/1/
score: 0
linked to: http://stackoverflow.com/q/8100469
has title: Javascript Class, var undefined in event listener
has comment: http://stackoverflow.com/comment/41823120
has answer: http://stackoverflow.com/a/26605259
has comment: http://stackoverflow.com/comment/41823690
type: Question
type: AnsweredQuestion
tagged with: oop
duplicate of: http://stackoverflow.com/q/8100469
accepted answer: http://stackoverflow.com/a/26605259
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26658232
has answer: http://stackoverflow.com/a/26675926
type: Question
downvote count: 0
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/26675926
has body: I'm already using d3 in my angular app like it is described in this BLOG POST. However I want to use a D3-PLUGIN called fisheye in my application. I already installed it with bower including the dependency: "d3-plugins-fisheye": "https://raw.githubusercontent.com/d3/d3-plugins/master/fisheye/fisheye.js" After that I included the file in my index.html. The loading works fine. &lt;script src="bower_components/d3-plugins-fisheye/index.js"&gt;&lt;/script&gt; However I can't use var fisheye = d3.fisheye.circular().radius(120); in my d3 directive. D3 is working fine. I already tried to load the additional plugin via a service: angular.module('fisheye', []) .factory('fisheyeService', ['$document', '$q', '$rootScope', function($document, $q, $rootScope) { var d = $q.defer(); function onScriptLoad() { // Load client in the browser $rootScope.$apply(function() { d.resolve(window.fisheye); }); } // Create a script tag with fisheye as the source // and call our onScriptLoad callback when it // has been loaded var scriptTag = $document[0].createElement('script'); scriptTag.type = 'text/javascript'; scriptTag.async = true; scriptTag.src = 'bower_components/d3-plugins-fisheye/index.js'; scriptTag.onreadystatechange = function () { if (this.readyState === 'complete') { onScriptLoad(); } }; scriptTag.onload = onScriptLoad; var s = $document[0].getElementsByTagName('body')[0]; s.appendChild(scriptTag); return { fisheye: function() { return d.promise; } }; }]); And use it in my d3 directive with: d3Service.d3().then(function(d3) { fisheyeService.fisheye().then(function(fisheye) { ... var fisheye = d3.fisheye.circular().radius(120); //var fisheye = fisheye.circular().radius(120); ... }); }); But it is still not working. Does anyone know how to load a additional d3-plugin in my directive?
favorite count: 0
tagged with: angularjs
has title: D3 on Angular: How to use d3-plugins in Angular directive
upvote count: 2
tagged with: d3.js
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/41713308
score: 0
type: Comment
has text: Yeah, I suspect the bug exists due to something underlying in javascript.
comment on: http://stackoverflow.com/a/26544923
type: AnswerComment

http://stackoverflow.com/comment/41755658
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26568158
has text: @somethinghere: Yes, but that should be a comment, not an answer. Questions with no clear problem statement should be improved or closed, not answered. This isn't going to be helpful to anyone in the future.
type: Comment

http://stackoverflow.com/comment/41870155
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26630685
has text: The plugin most likely requests to open an URL (.url file type) and your operating system responds by opening the default browser (or the program associated with the .url file extension). JavaScript cannot interact with the system.

http://stackoverflow.com/comment/55866035
comment on: http://stackoverflow.com/a/30351691
score: 0
type: AnswerComment
has text: Why would you need to add the `/// <reference path=".meteor/local/...` line?
type: Comment

http://stackoverflow.com/q/26623163
has body: I'm trying to implement nested Collections exactly like the example I found here: https://stackoverflow.com/a/17453870/295133 The only difference being is that I'm trying to store the data locally using the localStorage plugin. Here, my Lists would be the Hotels in the example above: var app = app || {}; (function (){ 'use strict'; // List Collection - list of words //--------------------- var listCollection = Backbone.Collection.extend({ //referebce to this collection's model model: app.ListModel, localStorage: new Backbone.LocalStorage('translate-lists') }); app.listCollection = new listCollection(); })(); (function (){ 'use strict'; app.ListModel = Backbone.Model.extend({ initialize: function() { // because initialize is called after parse _.defaults(this, { words: new app.wordCollection }); }, parse: function(response) { if (_.has(response, "words")) { this.words = new app.wordCollection(response.words, { parse: true }); delete response.words; } return response; } }); })(); What the localStorage does is stores the ListModels, but if I add anything to the words collection it soon disappears after I refresh. Any ideas how I should be saving the entire nested collection?
score: 1
has comment: http://stackoverflow.com/comment/41872366
type: Question
linked to: http://stackoverflow.com/q/17451831
downvote count: 0
has comment: http://stackoverflow.com/comment/41868874
tagged with: javascript
has comment: http://stackoverflow.com/comment/41857476
has comment: http://stackoverflow.com/comment/41873404
answer count: 1
has title: using backbone localStorage on a nested Collection
favorite count: 0
tagged with: backbone-local-storage
tagged with: backbone.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26632806
has comment: http://stackoverflow.com/comment/41872580
has comment: http://stackoverflow.com/comment/41872471
upvote count: 1

http://stackoverflow.com/comment/41943576
has text: Yes Abdul I am getting an empty array
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26660359
type: Comment

http://stackoverflow.com/comment/41803750
has text: Well, that's pretty simple approach, I hoped for a more generic solution than just hiding divs. The situation described in the example is not real, since I didn't want to pollute the sense of what I want. Actually, I come from gamedev and I'm pretty disappointed that caching results is not as common in webdev (OR I look at it differently, not sure).
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26591335

http://stackoverflow.com/a/50100175
has comment: http://stackoverflow.com/comment/121481936
downvote count: 3
has comment: http://stackoverflow.com/comment/139305823
score: 12
has comment: http://stackoverflow.com/comment/138241598
has comment: http://stackoverflow.com/comment/139519178
has comment: http://stackoverflow.com/comment/96532375
answers question: http://stackoverflow.com/q/26540706
has body: This should do the trick // Since 'JSON.stringify' hides 'undefined', the code bellow is necessary in // order to display the real param that have invoked the error. JSON.stringify(hash, (k, v) => (v === undefined) ? '__undefined' : v) .replace(/"__undefined"/g, 'undefined')
has comment: http://stackoverflow.com/comment/121748659
type: Answer
upvote count: 15

http://stackoverflow.com/a/26617700
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26617615
downvote count: 0
has body: You can make a function which will be called for the events you want. Example: $('#one').click(foo); $('#two').change(foo); function foo(){ // do stuff... this and $(this) are also usable. }

http://stackoverflow.com/comment/42074980
type: Comment
has text: @koningdavid I once experienced a very similar issue, but the API was not inside the same domain, that's a bit odd. However, it's very tricky because once you have change the settings to "Never" and you get rid of the issue it's very difficult to replicate it again. In my case I had to change the settings back to "From third parties and advertisers", clear the cache completely (not only the cookies) and I think that I also had to re-start the browser.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26727971

http://stackoverflow.com/q/26660914
accepted answer: http://stackoverflow.com/a/26661698
score: 4
type: Question
upvote count: 4
has body: Hi i'm trying to add a selectmenu inside a modal dialog but many options are hidden and i can't click them Here's the example http://jsfiddle.net/4dd62ukv/1/ Month January February March April May June July August September October November December Any idea? Thanks!
has answer: http://stackoverflow.com/a/33299448
has answer: http://stackoverflow.com/a/43930637
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/26661698
has title: Jquery UI selectmenu inside modal dialog
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/49009897
has answer: http://stackoverflow.com/a/29792027
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/49009897

http://stackoverflow.com/a/27937261
answers question: http://stackoverflow.com/q/26648059
score: 10
has body: There is also another way. if you want to fetch data from the front-end, and have turned blueprint on, you can also try: http://yourDomain.com/ModelName?skip=10&amp;limit=10 Reference: 1.officer site: http://sailsjs.org/#/documentation/reference/blueprint-api/Find.html
upvote count: 10
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/55505365

http://stackoverflow.com/q/26580295
has comment: http://stackoverflow.com/comment/41777670
has comment: http://stackoverflow.com/comment/41778333
linked to: http://stackoverflow.com/q/11803215
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41777799
has comment: http://stackoverflow.com/comment/41882182
type: Question
tagged with: if-statement
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26634661
has comment: http://stackoverflow.com/comment/41778938
has body: My website loads the google maps api when I click on the location tab, then initializes the map. I don't want to load the api before this tab is clicked. I noticed it loaded the api every time I clicked the tab (causing memory usage for the site to increase). The if/else statement I wrapped it in doesn't work in a click() function. I'm also loading the api and my mapconstructor.js asynchronously as per https://stackoverflow.com/a/11803418/4184379. I've checked the similar answers on if/else not working in a click, but they haven't helped. $("[id=location-tab]").click(function() { if (typeof google.maps.event.trigger == 'undefined') { $.when( $.getScript("https://maps.googleapis.com/maps/api/jsv=3.exp&amp;sensor=false&amp;callback=initialize" ), $.getScript( "assets/js/gmap.js" ), $.Deferred(function( deferred ) { $( deferred.resolve ); }) ).done(function() { initialize(); }); } else { google.maps.event.trigger(map_canvas, 'resize'); } });
score: 0
has title: Pre-initialization jQuery code for script loading not working
answer count: 2
has comment: http://stackoverflow.com/comment/41777614
has comment: http://stackoverflow.com/comment/41777648
has answer: http://stackoverflow.com/a/26581438

http://stackoverflow.com/comment/43652359
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26603536
has text: The site gives me an error in console. I guess you are passing e in `start: function(e)` and using event.target instead of e.target
score: 0

http://stackoverflow.com/a/26660865
has comment: http://stackoverflow.com/comment/41924466
type: Answer
has comment: http://stackoverflow.com/comment/41923883
downvote count: 1
score: -1
has body: If you want exactly 3 characters use: if(TTinput.length &lt; 3 || TTinput.length &gt; 3) { alert("Please enter 3 letters"); } or if(TTinput.length != 3) { alert("Please enter 3 letters"); } *This (TTinput.length &lt; 3) alone will consider 4, 7, 350,... characters valid.
answers question: http://stackoverflow.com/q/26660759
upvote count: 0

http://stackoverflow.com/comment/41911175
comment on: http://stackoverflow.com/a/26654121
has text: I added more clarification in the original question about what undefined means
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/a/26576077
has comment: http://stackoverflow.com/comment/41771668
has comment: http://stackoverflow.com/comment/41772441
has comment: http://stackoverflow.com/comment/41771217
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41770517
has body: Before we begin, please read A Guide to Meteor Templates & Data Contexts - that will correctly orient you on contexts inside of #each blocks. Your goal is to join the correct weather documents to their corresponding location documents. This is most easily accomplished by introducing sub-templates for both types. Let's begin with the top-level template: {{#each locations}} {{> location}} {{/each}} Which has a locations helper like this: Template.locations.helpers({ locations: function() { return Locations.find(); } }); Next, the location template: {{title}} {{#each weathers}} {{> weather}} {{/each}} Which has a weather helper like this: Template.location.helpers({ weathers: function() { return Weather.find({locName: this._id}); } }); The key insight here is that the context of a location template is a single location document so weather will return only the weather documents for this location instance. Finally, your weather template can look like: Temperature: {{temperature}} Note we are now in a weather context so the #with is no longer needed. Side note - using sort in your publisher has no affect in this case.
type: Answer
accepted answer of: http://stackoverflow.com/q/26575184
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26575184
has comment: http://stackoverflow.com/comment/41772126

http://stackoverflow.com/comment/41658070
has text: @jwvanderbeck In javascript, variables are assigned by value which, in case of objects, is a reference. Therefore, if you modify a property, you will affect all variables that reference the same object. However, note that setting `modelCopy` to something at the end of your code wouldn't work, you must stop at the previous step and then modify a property.
comment on: http://stackoverflow.com/a/26513972
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41814676
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26600035
has text: Also, do i need to name the $.ajax anything so the it be called from a button? From what I can tell, it will be the $.ajax that calls the controller using data? I just don't see how. Sorry for the hassle and thanks immensely for the help!
score: 0

http://stackoverflow.com/comment/42029990
has text: @ChrisLively thansk a lot for your help. It gave us good ideas to solve our problem. I posted an answer, but Im not able to close the question. I guess i need more points for that :). Tnx again
score: 0
comment on: http://stackoverflow.com/q/26655356
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26591009
tagged with: assertions
accepted answer: http://stackoverflow.com/a/26682539
type: AnsweredQuestion
tagged with: should.js
upvote count: 1
tagged with: unit-testing
type: Question
possible better answer: http://stackoverflow.com/a/26682160
score: 1
has answer: http://stackoverflow.com/a/26682160
answer count: 3
has body: As Should.js use BDD style of assertions, it suppose to be readable from the code. I am wondering what is the most readable assert.fail() equivalent for should.js. I am missing something like should.fail.
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26682539
favorite count: 0
has answer: http://stackoverflow.com/a/26591010
has title: What is most readable way to do assert.fail() with should.js

http://stackoverflow.com/a/26542200
downvote count: 0
has comment: http://stackoverflow.com/comment/41730786
has body: Here's a jQUery demonstration Notes: The jsfiddle sets a value to the hidden field and triggers the change event on that. I had to comment out ponerFocus since you didn't include that. I added a sample button to trigger the change since I didn't have the popup. Jquery's .change() won't trigger without user input. You can, however use .trigger('change') to trigger the event. Your popup can set the value of the hidden field and append .trigger('change') Sample Form: &lt;form id="motherform"&gt; Main Field: &lt;input type="hidden" name="id_AyudaCuentas" id="id_AyudaCuentas" value="a|b|c|d"&gt; &lt;input type="button" value="Click this button to change hidden value." onclick="$('#id_AyudaCuentas').val('this|is|a|test').trigger('change')"&gt; &lt;input id="id_Cuenta" name="id_Cuenta" type="text" value="#id_Cuenta#" &gt; &lt;input id="id_SCuenta" name="id_SCuenta" type="text" value="#id_SCuenta#"&gt; &lt;input id="id_SSCuenta" name="id_SSCuenta" type="text" value="#id_SSCuenta#"&gt; &lt;input id="id_SSSCuenta" name="id_SSSCuenta" type="text" value="#id_SSSCuenta#"&gt; &lt;/form&gt; $(document).ready(function() { $("#id_AyudaCuentas").change(function(){ ArregloCuentas = $('#id_AyudaCuentas').val(); var AC_Array = ArregloCuentas.split('|'); if (AC_Array.length == 4) { $('#id_Cuenta').val(AC_Array[0]); $('#id_SCuenta').val(AC_Array[1]); $('#id_SSCuenta').val(AC_Array[2]); $('#id_SSSCuenta').val(AC_Array[3]); } // ponerFocus('id_SSSCuenta'); }); }); I hope you can work with this with your popup to achieve your desired results.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41721340
answers question: http://stackoverflow.com/q/26535498
type: Answer