http://stackoverflow.com/comment/40554039
comment on: http://stackoverflow.com/q/25909135
score: 0
has text: did you already try something else instead of an alert? Like `console.log('17);` I thought I had a similar issue once but looking at the code again I found the problem was in fact not related to the `alert();` but to the input's values on page (re-)load. I made a mistake with a selector.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26020745
type: Answer
has body: By creating the polygon first, then creating the polyline, I get the expected output: http://jsfiddle.net/Lrs6ngm5/ var prect = CreateSvgElement('rect', { 'x': 0, 'y': 0, 'width': 200, 'height': 200, 'stroke': 'black', 'fill-opacity': 0, 'appendTo': parent }); var polyConfig = { 'points': '0,0 500,500', 'id': 'pLine', 'fill': 'red', 'stroke': 'red', 'stroke-width': 2, 'appendTo': parent }; var pLine = CreateSvgElement('polyline', polyConfig);
has comment: http://stackoverflow.com/comment/40756996
has comment: http://stackoverflow.com/comment/40788529
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40756641
has comment: http://stackoverflow.com/comment/40757540
answers question: http://stackoverflow.com/q/26017864

http://stackoverflow.com/comment/56596010
comment on: http://stackoverflow.com/a/25990113
has text: @AayushKumarSingha, it's just a conceptual service that one could build to return the currently logged in user, for example, by calling a REST API. It's not something that Angular provides.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40508370
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25884013
has text: check your console log

http://stackoverflow.com/comment/40753372
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26019447
has text: Yea, please file a bug at https://github.com/polymer/paper-menu-button/issues for this.
type: Comment

http://stackoverflow.com/q/26010963
tagged with: forms
has answer: http://stackoverflow.com/a/26011005
type: Question
accepted answer: http://stackoverflow.com/a/26011039
tagged with: javascript
answer count: 3
tagged with: angularjs
has answer: http://stackoverflow.com/a/26011039
has title: $watch on form element
has answer: http://stackoverflow.com/a/26011144
type: AnsweredQuestion
has body: I'm trying to implement real time search so i have a search for including many input fields so each and every time when user update input fields search function should be triggered. i have came up with $watch to track model changes on form field $scope.$watch('filters.site', function () { $scope.$broadcast('updateDataTable'); }); $scope.$watch('filters.fname', function () { $scope.$broadcast('updateDataTable'); }); $scope.$watch('filters.lname', function () { $scope.$broadcast('updateDataTable'); }); but i'm just wondered is there anyway to get whole form value changes my form look like FIRST NAME LAST NAME SITE thanks
score: 0
possible better answer: http://stackoverflow.com/a/26011005

http://stackoverflow.com/comment/40709351
score: 0
has text: http://jsfiddle.net/mana5tLg/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25995448

http://stackoverflow.com/comment/40765513
type: Comment
has text: @tymeJV: Tried both ways. made no difference.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26024488

http://stackoverflow.com/a/25896358
answers question: http://stackoverflow.com/q/25894876
has body: I agree with Dr.Molle get img and use img.naturalWidth and img.naturalHeight. But there is also another way: set style after grabbing natural dimensions: &lt;script&gt; function grabNatDims(im) { console.log(im.width, im.height); im.style.maxHeight = '50%'; im.style.maxWidth = '50%'; } &lt;/script&gt; &lt;img onload="grabNatDims(this)" src="1.png"&gt;
score: 0
type: Answer

http://stackoverflow.com/comment/43333738
type: QuestionComment
comment on: http://stackoverflow.com/q/25917529
has text: @janfoeh http://codereview.stackexchange.com/questions/67458/custom-javascript-validation-using-the-factory-module-patterns
score: 0
type: Comment

http://stackoverflow.com/a/26029790
downvote count: 0
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40784992
has body: Hey just a few notes for yea. You should start using your browser console to check for error message's you have a few going on. if your using firefox or chrome hit CTRL + Shift + J then click console. CubeGeometry has been changed to BoxGeometry. Also I changed up your controls a bit. J and K now slide the thing back and forth. Here's the link to the new Codepen with working collision detection. http://codepen.io/anon/pen/GHofz?editors=001 function collision() { var originPoint = paddle.position.clone(); for (var vertexIndex = 0; vertexIndex &lt; paddle.geometry.vertices.length; vertexIndex++) { var ray = new THREE.Raycaster( paddle.position, paddle.geometry.vertices[vertexIndex] ); var collisionResults = ray.intersectObjects( collidableMeshList ); if ( collisionResults.length &gt; 0) { hit = true; } } } Let me know if you have any questions.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26000272
answers question: http://stackoverflow.com/q/26000272
type: Answer

http://stackoverflow.com/q/25923319
has comment: http://stackoverflow.com/comment/40581090
has comment: http://stackoverflow.com/comment/40580569
upvote count: 0
has comment: http://stackoverflow.com/comment/40580842
tagged with: javascript
has comment: http://stackoverflow.com/comment/40580640
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40580570
has comment: http://stackoverflow.com/comment/40581106
has comment: http://stackoverflow.com/comment/40580477
type: Question
has body: Okay, so here is my Javascript code in which I cannot troubleshoot why this is not working. Basically, I will have multiple drop-down menus all with the class of 'dropdown' and I want to change a particular dropdown (show contents of the division) when an image is clicked. I have already confirmed that the Javascript is properly linked to the JS and CSS files. I have also confirmed that the onClick methos is working properly for the image buttons that control the dropdown menus. When the image is clicked, it will send a parameter to a function that regulates the drop down. Here is the JS: var current; var get = function(name) { current = document.getElementsByClassName(name); } var show = function(menu) { get('image'); if(current[menu].src === 'plus.png') { current[menu].src = 'minus.png'; get('dropdown'); current[menu].style.display = 'block'; } else { current[menu].src = 'plus.png'; get('dropdown'); current[menu].style.display = 'none'; } } Edit Here is the full HTML: Gwiddle - Site Creator Gwiddle Site Creator Tools Options Code Test CSS: * { font-family:Verdana; } body { padding:0; margin:0; } img { display:inline; margin-left:.3em; width:.8em; height:.8em; } .center { width:100%; text-align:center; } .center > p { font-size:1.4em; } .dropdown { display:none; width:100%; margin:1em 0 1em 0; } #banner { font-size:2em; color:white; width:100%; background-color:#3399FF; margin-bottom:1em; text-align:center; box-shadow:0 2px 5px 2px #CCCCCC; padding:.5em 0 .5em 0; } #banner p { margin:0; } #tools { color:red; }
has comment: http://stackoverflow.com/comment/40581165
has comment: http://stackoverflow.com/comment/40580517
has comment: http://stackoverflow.com/comment/40580605
has comment: http://stackoverflow.com/comment/40580692
favorite count: 0
has comment: http://stackoverflow.com/comment/40580726
has comment: http://stackoverflow.com/comment/40580679
score: -1
has comment: http://stackoverflow.com/comment/40581216
has comment: http://stackoverflow.com/comment/40580644
answer count: 1
has answer: http://stackoverflow.com/a/25923652
downvote count: 1
has comment: http://stackoverflow.com/comment/40581139
has comment: http://stackoverflow.com/comment/40580983
has comment: http://stackoverflow.com/comment/40581265
has title: Javascript GetElementsByClassName Not Working
has comment: http://stackoverflow.com/comment/40581094
has comment: http://stackoverflow.com/comment/40580566
has comment: http://stackoverflow.com/comment/40581069

http://stackoverflow.com/comment/40747432
type: QuestionComment
has text: Thought that the script has to be after initializing the DIV?
comment on: http://stackoverflow.com/q/26016562
score: 0
type: Comment

http://stackoverflow.com/a/25933425
score: 0
has body: You call your server to get html and you want to inject it on your web page ? Useful doc : https://docs.angularjs.org/api/ng/service/$compile Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together. You have to compile "data.html" in your success function so you can bind a model to your input balise. (If it does not fit you, please give us more informations about your problem)
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25932546
answers question: http://stackoverflow.com/q/25932546

http://stackoverflow.com/a/25977032
type: Answer
has comment: http://stackoverflow.com/comment/40675923
accepted answer of: http://stackoverflow.com/q/25976800
answers question: http://stackoverflow.com/q/25976800
has comment: http://stackoverflow.com/comment/40675849
has body: You are passing GET parameters: xmlhttp.open("POST","loginme.php?userid="+userid+"&amp;pass="+pass,true); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... thus you need to fetch them from $_GET, not $_POST: $username=$_GET['userid']; $password=$_GET['pass']; You possibly want to use the send() method instead to send your data. Right now, your payload is empty: xmlhttp.send();
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/26012516
type: Answer
answers question: http://stackoverflow.com/q/26012306
has comment: http://stackoverflow.com/comment/40741757
accepted answer of: http://stackoverflow.com/q/26012306
has body: Update #total_div text in addNumber function as, function addNumbers() { var val1 = parseInt(document.getElementById("my_value_1").value); var val2 = parseInt(document.getElementById("my_value_2").value); var ansD = document.getElementById("total"); ansD.value = val1 + val2; $('#total_div').text(ansD.value); } Demo
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25891947
answers question: http://stackoverflow.com/q/25891768
has comment: http://stackoverflow.com/comment/40523283
has body: app.set('views', __dirname + './views'); should probably be app.set('views', __dirname + '/views');
score: 0
type: Answer

http://stackoverflow.com/comment/40677763
comment on: http://stackoverflow.com/a/25978040
has text: This is great if you want to store data, but doesn't work too well with a function.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/26025443
has comment: http://stackoverflow.com/comment/40764511
type: Question
has title: On load, how to check against multiple values in condition, in the form of an array
has comment: http://stackoverflow.com/comment/40764478
has comment: http://stackoverflow.com/comment/40764540
tagged with: javascript
has comment: http://stackoverflow.com/comment/40764756
tagged with: jquery
has comment: http://stackoverflow.com/comment/40764961
has comment: http://stackoverflow.com/comment/40764567
has comment: http://stackoverflow.com/comment/40764523
has comment: http://stackoverflow.com/comment/40764666
has answer: http://stackoverflow.com/a/26025595
score: 0
accepted answer: http://stackoverflow.com/a/26025595
has answer: http://stackoverflow.com/a/26025560
has comment: http://stackoverflow.com/comment/40764767
has body: I am storing a page title into a JavaScript variable every time a page is loaded. This is what I have so far var msubpagetitle = $('#content-titlebanner h1').text().trim(); console.log(msubpagetitle); For example, this will produce a result of... Support How can I say... If this variable is "not" About or Contact or Bio, then perform the following condition(...) Thanks!
answer count: 4
has answer: http://stackoverflow.com/a/26025590
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26025510
possible better answer: http://stackoverflow.com/a/26025560
linked to: http://stackoverflow.com/q/17597550

http://stackoverflow.com/q/25917021
accepted answer: http://stackoverflow.com/a/25917130
type: Question
answer count: 2
has title: asp.net hidden field value not getting on form load event
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40568608
score: 0
has answer: http://stackoverflow.com/a/25917130
possible better answer: http://stackoverflow.com/a/25917094
has answer: http://stackoverflow.com/a/25917094
type: AnsweredQuestion
has body: on body load i am calling this function &lt;body onload="lotclick('1');"&gt; in this function i am assigning value to hidden field function lotclick(lotid) { var dt = new Date(); document.getElementById("lblindTime").value = dt.toString(); and in code behind file on form load event i am trying to get value of that hidden field.but i am unable to get that value. protected void Page_Load(object sender, EventArgs e) { string sfsf = lblindTime.Value.ToString(); } but i am not getting any value. but on button click i am getting value. what will be the issue.??

http://stackoverflow.com/q/26000097
type: AnsweredQuestion
type: Question
has title: Using & bindings in nested AngularJS directives
accepted answer: http://stackoverflow.com/a/26001958
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/26001958
has body: I'm trying to bind to ng-change on an element created by a directive up through two other directives that wrap it to a method on the controller using & bindings in an isolate scope, but I can't figure out how to get arguments to pass all the way through. Here's a plunk that demonstrates the problem. In short, I have an HTML structure like this: Call Function Directly The controller: var app = angular.module('ExampleApp', []); app.controller('Controller', ['$scope', function($scope) { $scope.doSomething = function(one, two, three) { console.log(arguments); }; } ]); The outer directive: app.directive('outer', function($compile) { return { restrict: 'E', scope: { outerModelChanged: '&onOuterModelChanged' }, link: function(scope, element, attrs) { var innerElement = angular.element(' '); innerElement.attr('on-inner-model-changed', 'outerModelChanged(\'Called from Outer\')'); element.after(innerElement); $compile(innerElement)(scope); console.log(arguments); } } }); And the inner directive that the outer directive creates: app.directive('inner', function() { return { scope: { innerModelChanged: '&onInnerModelChanged' }, restrict: 'E', template: ' Call from Inner ' } }); I understand that I'm getting the output ["Called from Outer in HTML"] because this is hardcoded into the tag. What I don't understand is how to pass arguments all the way up from the inner directive.

http://stackoverflow.com/comment/40684911
type: AnswerComment
score: 0
type: Comment
has text: It says that no products match my description, when I know for a fact there is at least one product that does.
comment on: http://stackoverflow.com/a/25981772

http://stackoverflow.com/a/26011898
has body: remove the quotes on the phpcode just use like this otherwise it takes the value as string. var mapOptions = { center: new google.maps.LatLng(&lt;?php echo $lat ;?&gt;, &lt;?php echo $lng ;?&gt;), population: 14856, zoom: 11, mapTypeId: google.maps.MapTypeId.TERRAIN }
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26011694
type: Answer
has comment: http://stackoverflow.com/comment/41949962
answers question: http://stackoverflow.com/q/26011694

http://stackoverflow.com/q/25930417
has answer: http://stackoverflow.com/a/25930453
has answer: http://stackoverflow.com/a/25931132
has comment: http://stackoverflow.com/comment/40592951
tagged with: javascript
tagged with: string
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25933253
tagged with: regex
answer count: 5
type: UnansweredQuestion
upvote count: 7
has body: Say I have the following url: http://example.com/api How can I create a regex that will match any url starting with that url segment above? For example: http://example.com/api/auth (should match) http://example.com/api/orders (should match) http://example.com/api/products (should match) http://example.com/auth (should not match) http://examples.com/api/auth (should not match) https://example.com/api/auth (should not match) Yes, obviously I could just call string.indexOf(url) == 0 to do a "starts with" check, but I specifically need a regular expression because I have to provide one to a third-party library.
downvote count: 3
has answer: http://stackoverflow.com/a/25930512
type: Question
tagged with: startswith
has answer: http://stackoverflow.com/a/25930658
has title: URL "starts with" using regex?
tagged with: contains

http://stackoverflow.com/comment/45638355
type: Comment
comment on: http://stackoverflow.com/a/28655391
has text: Really nice approach :) Didn't knew/noticed this property on the `overflow` css style. Thanks =D
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40535717
type: Comment
score: 0
has text: I did not get any method to remove "headers" I'll try again later.
type: AnswerComment
comment on: http://stackoverflow.com/a/25898101

http://stackoverflow.com/q/26020664
type: Question
answer count: 2
has body: I'm defining an intercom event in my rails controller like so: object_controller.rb @object.save @intercom_event = 'object-saved' In a partial that exists in my application.html.erb I am trying to run this script: &lt;script&gt; Intercom('trackEvent', '&lt;%= @intercom_event %&gt;'); &lt;/script&gt; The script runs and sends the event up to Intercom like its supposed to. I thought I am placing the ruby variable into the &lt;script&gt; tag correctly except the output for @intercom_event is: &lt;%= @intercom_event %&gt; when it should be: object-saved. Additionally if I were to wrap this &lt;script&gt; tag in an if statement (so that it doesn't send an event every time the page is reloaded) like so: &lt;% if @intercom_event.present? %&gt; &lt;script&gt; Intercom('trackEvent', '&lt;%= @intercom_event %&gt;'); &lt;/script&gt; &lt;% end %&gt; It ignores the script altogether, even when @intercom_event is defined.
has answer: http://stackoverflow.com/a/26020805
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ruby
accepted answer: http://stackoverflow.com/a/26515931
upvote count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/26515931
possible better answer: http://stackoverflow.com/a/26020805
has title: Using Ruby Variable in Script Tag

http://stackoverflow.com/comment/40651051
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25963121
type: Comment
has text: this still go down one line but i can live with that thx alot :) sry for the bad english/explanation

http://stackoverflow.com/comment/116803144
comment on: http://stackoverflow.com/a/39019537
type: AnswerComment
score: 0
type: Comment
has text: @mikemaccana This can be done purely on compile-time. [I created a Babel plugin](https://github.com/ugultopu/babel-plugin-dedent-template-literals) that does not require putting any tag (function name) before the template literal, preserves newlines but gets rid of the leading whitespace at compile-time. It preserves empty lines as well. Maybe it would better suit your needs? [More details are on my answer](https://stackoverflow.com/a/66056105/3395831).

http://stackoverflow.com/a/25898300
has body: toFixed returns a string, so this.guaranteedEoy() + value, performs string concatenation. If you just want to round the value to two decimal places, see Round to at most 2 decimal places (only if necessary).
score: 1
downvote count: 0
upvote count: 1
answers question: http://stackoverflow.com/q/25898059
type: Answer

http://stackoverflow.com/a/26026892
has comment: http://stackoverflow.com/comment/40789577
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26026357
accepted answer of: http://stackoverflow.com/q/26026357
type: AcceptedAnswer
has body: You should probably use a parser for this, but here's a quick and dirty solution that's kind of like a mini-parser: var src = "gw43g: (-95.147, 38.5818) .... "; var re = /(\w+:\s*\()|(\);?)|((?:(?!\w+:\s*\(|\);?).)+)/g; var output = []; var match; var stackCount = 0; while ((match = re.exec(src))) { if (match[1]) { if (stackCount == 0) output.push(''); stackCount++; } else if (match[2]) { stackCount--; } output[output.length-1] += match[0]; } console.log(output); jsFiddle The regular expression splits tokens into three categories, a stack opener, a stack closer, or neutral. If it finds a stack starter and there is nothing on the stack it adds a new array item, if it finds a closer it brings the stack down by one. Until the stack is at zero, it will keep appending to the current array item. I couldn't help it, so I went ahead and just finished the simple parser, so that the string is output as an tree where the root properties are the keys (gw43g), and each either has an X, Y value, or it is a branch on the tree. function parseBody(str) { // rey: http://rey.gimenez.biz/s/fxd02f var re = /\s+|(\w+)\s*:\s*\(|(\);?)|(([\-+]?\s*(?:\d*\.\d*|\d+))\s*,\s*([\-+]?\s*(?:\d*\.\d*|\d+)))/g; var output = []; var match; var newObj; var root = { children: { } } var branch = root; while ((match = re.exec(str))) { // key and open if (match[1]) { newObj = { parent: branch, children: { } }; branch.children[match[1]] = newObj; // new stack branch = newObj; } // else if (match[2]) { // move up stack branch = branch.parent; } else if (match[3]) { branch.X = parseFloat(match[4]); branch.Y = parseFloat(match[5]); } } return root; } jsFiddle Regular Expression
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40806352

http://stackoverflow.com/a/25971300
type: Answer
answers question: http://stackoverflow.com/q/25971141
has body: jQuery(document).ready(function(){ jQuery('#content-button').live('click', function(event) { if(jQuery('#content').is(":hidden")){ jQuery(this).text("Hide Content"); jQuery('#content').show(); } else{ jQuery(this).text("Show Content"); jQuery('#content').hide(); } }); });
score: 0

http://stackoverflow.com/comment/40739367
type: QuestionComment
score: 2
has text: It's not an operator, they are just quotationmarks.
comment on: http://stackoverflow.com/q/26011983
type: Comment

http://stackoverflow.com/q/25949234
type: AnsweredQuestion
upvote count: 2
has body: I use the following javascript to make a 'sticky' navigation, which makes the nav fixed to the top of the screen when the user has scrolled past it. This code works fine, although when the element is made sticky and the position of the element is set to 'fixed', the position of all of the following elements in the body 'jump up' to occupy the gap created from changing the element from relative to fixed, and makes a slight 'jolting' effect. To counter this, I have tried adding an offset to the scroll y position when the element is changed to fixed, but this causes a loop by triggering the scroll function again, and the page scrolls to the bottom of the page. So my question is - how in the function below can I add an offset to the scroll position? ie, how can I set the scroll position in the $(window).scroll function, without triggering the $(window).scroll function into a loop? $(window).scroll(function (event) { var y = $(this).scrollTop(); var top = $('#main-navigation').offset().top; if (y &gt;= top) { $('#navigation').addClass('fixed'); } else { $('#navigation').removeClass('fixed'); } }); Any help is very much appreciated
type: Question
has answer: http://stackoverflow.com/a/25950047
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25950047
answer count: 2
score: 2
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/50308631
has answer: http://stackoverflow.com/a/50308631
has comment: http://stackoverflow.com/comment/40625558
has title: JQuery scroll without triggering on scroll

http://stackoverflow.com/q/25904820
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
tagged with: extjs
accepted answer: http://stackoverflow.com/a/25990903
has comment: http://stackoverflow.com/comment/40701797
answer count: 1
has title: Extjs accordion close all panel dynamically
favorite count: 0
tagged with: accordion
has body: I am using Extjs 5.0.0 I have an accordion with a number of panels. Here my requirement is to expand and collapse panel by clicking on the title. On the first click it expanded, that's fine. while again clicking on the same title i want to collapse all the panels. Here its opening the very next panel. I just tried by expanding a hidden panel. But here both hidden panel and the next panel to the clicked panel get expanded. listeners:{ afterrender: function(panel){ panel.header.el.on('click', function() { if (panel.collapsed) { Ext.getCmp('hiddenpanel').collapse(); } else { Ext.getCmp('hiddenpanel').expand(); } }); } } Is there any solution to solve this problem ? Thanks
tagged with: expand
has comment: http://stackoverflow.com/comment/40703098
has comment: http://stackoverflow.com/comment/40703353
has comment: http://stackoverflow.com/comment/40813245
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25990903
type: Question
has comment: http://stackoverflow.com/comment/40702589

http://stackoverflow.com/comment/40515956
score: 0
type: Comment
type: QuestionComment
has text: well I'm looking for some way to accomplish it.. not sure how to call it.. tool, workaround, framework, trick, dunno.
comment on: http://stackoverflow.com/q/25888324

http://stackoverflow.com/comment/40507760
type: QuestionComment
has text: Did you try to bind to submit event instead of click? Like $("#utsDetails").submit(function() ... instead of $("#calc").click(function() {
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25883611

http://stackoverflow.com/comment/40660496
has text: by the way `labels.phones`contains multiple set of phone numbers? If so I need to redo my code a little bit
comment on: http://stackoverflow.com/a/25968381
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26000903
has comment: http://stackoverflow.com/comment/40719704
has answer: http://stackoverflow.com/a/26001126
answer count: 1
tagged with: node.js
has body: I'm having an issue downloading complete data from a website. I am doing the following request({url: 'http://somehost/somefile.txt'}, function (error, response, body) { if (!error &amp;&amp; response.statusCode == 200) { console.log(response.headers); console.log(body.length) } }); The length is 64,472 bytes when downloaded above. Content-Length is 65,536. The file is malformed. If I use wget to obtain the file, the resulting length is 65,536 and is a proper file. Any ideas how to get Node to duplicate the results of wget? I tried changing the User-Agent to wget in case that was it. Thanks!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40719533
accepted answer: http://stackoverflow.com/a/26001126
tagged with: javascript
has title: Node HTTP request not returning all data
type: Question
score: 0

http://stackoverflow.com/q/25879515
has comment: http://stackoverflow.com/comment/40501326
favorite count: 0
has comment: http://stackoverflow.com/comment/40532249
has comment: http://stackoverflow.com/comment/40502177
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40552082
has title: How to create a packaged app on Firefox OS capable of getting data from external webpage
tagged with: xmlhttprequest
score: 2
tagged with: firefox-os
linked to: http://stackoverflow.com/q/13873025
has body: I am trying to create a packaged app for Firefox OS which would allow the user to search for a specific content (pictures in this case) from different webpages, and simply see them without having to go into each webpage. My question is, how can I access (and get data) from an external webpage (like www.google.com for example) using a packaged app (without PHP, just with Javascript, HTML and CSS) ? PS : What I want is just to reach the text that the webpage provides. For example, if the webpages is only providing a div and a img object with a simple link, I just need that link and nothing more.
type: Question
has comment: http://stackoverflow.com/comment/40536685
answer count: 2
has answer: http://stackoverflow.com/a/26022413
has comment: http://stackoverflow.com/comment/40526437
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25879616
tagged with: cross-domain

http://stackoverflow.com/comment/40676133
score: 0
type: AnswerComment
has text: Sorry updated for nothing, your comment/statement about JSON.stringify is wrong and while doing some test, inserted the error. Your answer is valid tho. Sorry for removing the validity.
type: Comment
comment on: http://stackoverflow.com/a/25938713

http://stackoverflow.com/q/25960499
tagged with: html5-video
has comment: http://stackoverflow.com/comment/40678149
tagged with: visualization
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26041189
downvote count: 0
tagged with: web-audio-api
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/21877155
tagged with: html5-audio
upvote count: 2
has answer: http://stackoverflow.com/a/26041189
answer count: 1
has title: How can I access the audio samples for the upcoming 5+ seconds from a as it's playing?
linked to: http://stackoverflow.com/q/25836447
tagged with: javascript
has body: I'm working on a subtitle creation tool and would like to add a feature that displays the next 5 or so seconds of the audio waveform as the video plays. I believe having a visual preview of the upcoming audio will allow the user to more accurately place in points for subtitles. I found this method using an analyzer but it limits the audio samples to 2048 (about 1/24th of a second) which is too small to useful a preview. I also found this method by catching "audioprocess" events but is still limited to about 16k of samples or 1/3 of a second. Again, not long enough to be useful. I did a quick test to see how long it would take to visualize 5 seconds worth of samples it's averaging in the low 20ms. So I think it's doable to process it in realtime provided I can access the buffer. I might have to lower the FPS but I think even at 15fps it should still be useful to the user. Is there a method where I can access say the next 240,000 samples (5 seconds of audio) as the video is playing? &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body id="body"&gt; &lt;canvas id="canvas" width="1000" height="200"&gt;&lt;/canvas&gt; &lt;script&gt; var count=0; var samples=new Int32Array(48000*5); var CANVAS_HEIGHT=200; var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); function processSamples() { var start = new Date().getTime(); ctx.clearRect(0, 0, 1000, 200); for (var i=0; i &lt; samples.length; i++) { samples[i]=parseInt(Math.random() * CANVAS_HEIGHT); } // We can't display each sample on it's own line... So take the average sample and display it // 1000 pixels for 5 second preview. So 200px per second. 48,000 samples per second / 200px = 240 samples per pixel var sample; for (var i=0; i &lt; samples.length/240; i++) { sample=0; for (var j=0; j &lt; 240; j++) { sample += samples[i*240+j]; } sample=parseInt(sample/240); ctx.fillRect(i, 0, 1, sample); } if (count &lt; 10) setTimeout(processSamples, 1000); count++; var end = new Date().getTime(); var time = end -…

http://stackoverflow.com/comment/40730968
score: 1
has text: Firebug should have shown you that `id='full'` became `style='display:none;'`. There's no Element to click on.
comment on: http://stackoverflow.com/q/26006982
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40743400
type: Comment
has text: @Suraj Verma, ok see my answer.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26014018

css
tags question: http://stackoverflow.com/q/25934885
tags question: http://stackoverflow.com/q/25900479
tags question: http://stackoverflow.com/q/25960726
tags question: http://stackoverflow.com/q/25904946
tags question: http://stackoverflow.com/q/26023359
tags question: http://stackoverflow.com/q/25984979
tags question: http://stackoverflow.com/q/25895007
tags question: http://stackoverflow.com/q/25964902
tags question: http://stackoverflow.com/q/25981538
tags question: http://stackoverflow.com/q/25997355
tags question: http://stackoverflow.com/q/26003525
tags question: http://stackoverflow.com/q/25968832
tags question: http://stackoverflow.com/q/25924623
tags question: http://stackoverflow.com/q/25921788
tags question: http://stackoverflow.com/q/26017891
tags question: http://stackoverflow.com/q/25926711
tags question: http://stackoverflow.com/q/25924292
tags question: http://stackoverflow.com/q/25958942
tags question: http://stackoverflow.com/q/26023019
tags question: http://stackoverflow.com/q/25918876
tags question: http://stackoverflow.com/q/25949788
tags question: http://stackoverflow.com/q/25996276
tags question: http://stackoverflow.com/q/25986064
tags question: http://stackoverflow.com/q/25960680
tags question: http://stackoverflow.com/q/25982453
tags question: http://stackoverflow.com/q/25934907
tags question: http://stackoverflow.com/q/26012482
tags question: http://stackoverflow.com/q/25987241
tags question: http://stackoverflow.com/q/25923202
tags question: http://stackoverflow.com/q/26002703
tags question: http://stackoverflow.com/q/25987338
tags question: http://stackoverflow.com/q/26022597
tags question: http://stackoverflow.com/q/25931534
tags question: http://stackoverflow.com/q/26011214
tags question: http://stackoverflow.com/q/25920553
tags question: http://stackoverflow.com/q/25876410
tags question: http://stackoverflow.com/q/25942730
tags question: http://stackoverflow.com/q/25924873
tags question: http://stackoverflow.com/q/26008571
tags question: http://stackoverflow.com/q/25908492
tags question: http://stackoverflow.com/q/26001486
tags question: http://stackoverflow.com/q/25974510
tags question: http://stackoverflow.com/q/26029306
tags question: http://stackoverflow.com/q/25997208
tags question: http://stackoverflow.com/q/25910063
tags question: http://stackoverflow.com/q/26026558
tags question: http://stackoverflow.com/q/25942058
tags question: http://stackoverflow.com/q/25998341
tags question: http://stackoverflow.com/q/25923550
tags question: http://stackoverflow.com/q/25966541
tags question: http://stackoverflow.com/q/25973546
tags question: http://stackoverflow.com/q/25967071
tags question: http://stackoverflow.com/q/26027787
tags question: http://stackoverflow.com/q/26011507
tags question: http://stackoverflow.com/q/25889468
tags question: http://stackoverflow.com/q/26013793
tags question: http://stackoverflow.com/q/25953444
tags question: http://stackoverflow.com/q/25891556
tags question: http://stackoverflow.com/q/26003895
tags question: http://stackoverflow.com/q/25914858
tags question: http://stackoverflow.com/q/26025978
tags question: http://stackoverflow.com/q/25966698
tags question: http://stackoverflow.com/q/26003490
tags question: http://stackoverflow.com/q/26013792
tags question: http://stackoverflow.com/q/25934416
tags question: http://stackoverflow.com/q/25921606
tags question: http://stackoverflow.com/q/25947938
tags question: http://stackoverflow.com/q/25993704
tags question: http://stackoverflow.com/q/26031086
tags question: http://stackoverflow.com/q/25880274
tags question: http://stackoverflow.com/q/25899000
tags question: http://stackoverflow.com/q/25907733
tags question: http://stackoverflow.com/q/25930874
tags question: http://stackoverflow.com/q/25892070
tags question: http://stackoverflow.com/q/25947629
tags question: http://stackoverflow.com/q/26018756
tags question: http://stackoverflow.com/q/25889296
tags question: http://stackoverflow.com/q/26021814
tags question: http://stackoverflow.com/q/25940853
tags question: http://stackoverflow.com/q/25909239

http://stackoverflow.com/q/25949554
downvote count: 0
favorite count: 0
type: Question
has body: I have make a CasperJS script to grab all the images from many links. When I run it, it works for several minutes and after it throws me this error. And I don't know how to solve this problem. My CasperJS script: casper.repeat(200, function() { casper.thenOpen('http://google.fr/', function() { // Get a new page res = this.evaluate(function(wsurl) { return JSON.parse(__utils__.sendAJAX(wsurl, 'POST', null, false)); }, {wsurl: ajax_url}); }); casper.then(function(){ this.wait(1000); }) casper.then(function(){ this.open(res.source); // Open it }); casper.then(function(){ this.wait(1000); }); casper.then(function(){ arr_img = this.getElementsAttribute('img', 'src'); }); casper.then(function(){ arr_img.forEach(function(value, key){ // Grab the images var img = new Image(); img.src = value; if(img.width &gt;= 337){ temp = {}; temp['image'] = value; temp['width'] = img.width; temp['height'] = img.height; arr.push(temp); } delete window.img; }); }); casper.then(function(){ require('utils').dump(arr); // Save the array }); casper.then(function(){ this.clear(); }); }); My error: QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files 2014-09-20T15:37:27 [FATAL] QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe Abort trap: 6
linked to: http://stackoverflow.com/q/15005830
tagged with: casperjs
has comment: http://stackoverflow.com/comment/40626609
upvote count: 2
tagged with: error-handling
tagged with: phantomjs
tagged with: javascript
type: UnansweredQuestion
score: 2
has title: Unable to create thread pipe: Too many open files on CasperJS
answer count: 0

http://stackoverflow.com/a/25963362
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40655354
has body: Looking at the source code for three.js suggests a solution. Here's the code for three.js font creation: FontUtils.js. It says right at the top: /* * For Text operations in three.js (See TextGeometry) * * It uses techniques used in: * * typeface.js and canvastext * For converting fonts and rendering with javascript * https://gero3.github.io/facetype.js/ * * Triangulation ported from AS3 * Simple Polygon Triangulation * http://actionsnippet.com/?p=1462 * * A Method to triangulate shapes with holes * https://web.archive.org/web/20121018020533/https://www.sakri.net/blog/2009/06/12/an-approach-to-triangulating-polygons-with-holes/ */ Typeface.js provides the font data and there's an online form to convert truetype fonts. Other solutions: Render the text to your bitmaps at a higher resolution and draw them at that resolution or smaller. Use a curve renderer: Rendering Vector Art on the GPU.
score: 5
has comment: http://stackoverflow.com/comment/57780736
answers question: http://stackoverflow.com/q/25956272
upvote count: 5

http://stackoverflow.com/q/25917497
tagged with: jquery
has comment: http://stackoverflow.com/comment/40569521
favorite count: 0
has answer: http://stackoverflow.com/a/25917532
has answer: http://stackoverflow.com/a/25917683
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40569407
downvote count: 1
linked to: http://stackoverflow.com/q/426258
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40569418
answer count: 2
has title: How to check a checkbox?
upvote count: 0
has body: Here is my input: &lt;input name="my_checkbox" type="checkbox" value="1"&gt; I'm trying to check/uncheck it via jquery: this._holder.find('checkbox').prop('checked', true); But this fails to work. I know this._holder.find is working as I am able to set this: this._holder.find('input').val('whatever'); Where am I going wrong?

http://stackoverflow.com/q/26003591
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/55759917
accepted answer: http://stackoverflow.com/a/27180464
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
upvote count: 11
has answer: http://stackoverflow.com/a/48421164
has answer: http://stackoverflow.com/a/47852752
possible better answer: http://stackoverflow.com/a/28121093
tagged with: c3.js
has answer: http://stackoverflow.com/a/47432796
has body: I am using the C3 JavaScript library for the display of graph data. When my page initially loads, the graphs are hidden. It isn't until a "tab" on the page is selected that the graphs display. The trouble I am seeing is that my first graph doesn't fit its containing div tag when first loaded. I can change the date range I'm viewing data for by clicking a button, at which time the graphs will be correctly sized. Here is the relevant HTML that I'm using for the graphs (notice that I am using AngularJS, in case that helps/hinders things at all): Data A Data B Data Breakdown{{percentageOfSubstance}}% GOAL: 20% The initial, incorrect display (the first graph stretches the entire way across): And the correct result after loading new data, after the first result (above) has been displayed: Is there a good solution to this problem?
has answer: http://stackoverflow.com/a/28121093
has answer: http://stackoverflow.com/a/28192642
score: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26026849
type: Question
answer count: 8
has title: C3 chart sizing is too big when initially loaded
has answer: http://stackoverflow.com/a/27180464

http://stackoverflow.com/a/26002781
answers question: http://stackoverflow.com/q/26002219
downvote count: 1
has body: Why not try something like this: $(document).ready(function (e) { $(".ToolTipClass").click(function (e) { ConfirmOK("ToolTip", $(this).prop("alt")); }); function ConfirmOK(Title, Message) { $('&lt;div style="padding:10px;max-width:500px;word-wrap:break-word;"&gt;' + Message + '&lt;/div&gt;').dialog({ draggable: false, modal: true, resizable: false, title: Title, minHeight: 75, closeOnEscape: false, buttons: { OK: function () { $(this).dialog("destroy"); } } }); } }); Stick the above code in your masterpage's document.ready event handler, then all you need to use it is set the class of anything to 'ToolTipClass' and set its alt property to whatever text you want to display in your dialog box. You can use this code on anything, but I prefer to use "info" icons, since they're universally recognizeable. The amount of code required for this is very minimal - and you still have the title attribute freed up for your SEO concerns.
score: -1
upvote count: 0
type: Answer

http://stackoverflow.com/comment/40669296
type: Comment
has text: hide parameters /index/page:id
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25970653

http://stackoverflow.com/q/25974141
has comment: http://stackoverflow.com/comment/40692644
score: 1
has comment: http://stackoverflow.com/comment/40685412
upvote count: 1
type: Question
has body: I am writing unit tests for my angularjs solution using jasmine and chutzpah and I keep getting a ReferenceError saying the it cant find a variable module... this are the error messages I keep getting: Test Name: appControllersTest encountered a declaration exception Test FullName: ..\scripts_references.js::appcontrollerstest::encountered a declaration exception Test Source: ..\scripts_references.js : line 0 Test Outcome: Failed Test Duration: 0:00:00.001 Result Message: ReferenceError: Can't find variable: module in file:../scripts/unittest/controllerstest.js:20 Test Name: appControllersTest encountered a declaration exception Test FullName: ..\scripts\unittest\controllerstest.js::appcontrollerstest::encountered a declaration exception Test Source: ..\scripts\unittest\controllerstest.js : line 16 Test Outcome: Failed Test Duration: 0:00:00.001 Result Message: ReferenceError: Can't find variable: module in file:../scripts/unittest/controllerstest.js:20 this is my unit test: /// &lt;reference path="../_references.js" /&gt; /// &lt;reference path="../AngularJSApp/controllers.js" /&gt; describe("appControllersTest", function () { var $scope; beforeEach(module("appMain")); describe("RRCtrl", function () { beforeEach(inject(function ($controller) { $scope = {}; $controller("RRCtrl", { $scope: $scope }); })); it("JavaTestTest", function ($controller) { expect(scope.$root.title).toBe(""); }); }); }); Has anyone encountered this kind of error and how do you fix it?
tagged with: javascript
has answer: http://stackoverflow.com/a/25993718
answer count: 1
downvote count: 0
tagged with: jasmine
favorite count: 0
has title: Javascript Reference Error in Unit Test
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40691375
type: UnansweredQuestion
tagged with: chutzpah
has comment: http://stackoverflow.com/comment/40691129

javascript
tags question: http://stackoverflow.com/q/25954510
tags question: http://stackoverflow.com/q/25883246
tags question: http://stackoverflow.com/q/25949427
tags question: http://stackoverflow.com/q/25931764
tags question: http://stackoverflow.com/q/25987987
tags question: http://stackoverflow.com/q/26009685
tags question: http://stackoverflow.com/q/26029449
tags question: http://stackoverflow.com/q/26002998
tags question: http://stackoverflow.com/q/25879164
tags question: http://stackoverflow.com/q/25998392
tags question: http://stackoverflow.com/q/25982317
tags question: http://stackoverflow.com/q/25879112
tags question: http://stackoverflow.com/q/26029851
tags question: http://stackoverflow.com/q/25885280
tags question: http://stackoverflow.com/q/25977095
tags question: http://stackoverflow.com/q/25912429
tags question: http://stackoverflow.com/q/25886193
tags question: http://stackoverflow.com/q/25979658
tags question: http://stackoverflow.com/q/26027307
tags question: http://stackoverflow.com/q/25900658
tags question: http://stackoverflow.com/q/26006595
tags question: http://stackoverflow.com/q/25917281
tags question: http://stackoverflow.com/q/25885499
tags question: http://stackoverflow.com/q/26012075
tags question: http://stackoverflow.com/q/25909457
tags question: http://stackoverflow.com/q/25909471
tags question: http://stackoverflow.com/q/26027039
tags question: http://stackoverflow.com/q/25930953
tags question: http://stackoverflow.com/q/25902560
tags question: http://stackoverflow.com/q/26003992
tags question: http://stackoverflow.com/q/25893026
tags question: http://stackoverflow.com/q/25926529
tags question: http://stackoverflow.com/q/25892187
tags question: http://stackoverflow.com/q/25922757
tags question: http://stackoverflow.com/q/26001869
tags question: http://stackoverflow.com/q/25996231
tags question: http://stackoverflow.com/q/25999235
tags question: http://stackoverflow.com/q/25910242
tags question: http://stackoverflow.com/q/25881102
tags question: http://stackoverflow.com/q/26030209
tags question: http://stackoverflow.com/q/25945593
tags question: http://stackoverflow.com/q/25915563
tags question: http://stackoverflow.com/q/26026451
tags question: http://stackoverflow.com/q/25882489
tags question: http://stackoverflow.com/q/25987393
tags question: http://stackoverflow.com/q/26006734
tags question: http://stackoverflow.com/q/25952902
tags question: http://stackoverflow.com/q/25972158
tags question: http://stackoverflow.com/q/25889271
tags question: http://stackoverflow.com/q/25945149
tags question: http://stackoverflow.com/q/25955016
tags question: http://stackoverflow.com/q/25950527
tags question: http://stackoverflow.com/q/25991469
tags question: http://stackoverflow.com/q/25947651
tags question: http://stackoverflow.com/q/25956136
tags question: http://stackoverflow.com/q/25915922
tags question: http://stackoverflow.com/q/25979402
tags question: http://stackoverflow.com/q/25936705
tags question: http://stackoverflow.com/q/26007713
tags question: http://stackoverflow.com/q/25915395
tags question: http://stackoverflow.com/q/25909242
tags question: http://stackoverflow.com/q/26025789
tags question: http://stackoverflow.com/q/25914339
tags question: http://stackoverflow.com/q/25969321
tags question: http://stackoverflow.com/q/26016673
tags question: http://stackoverflow.com/q/26007187
tags question: http://stackoverflow.com/q/26008535
tags question: http://stackoverflow.com/q/25951746
tags question: http://stackoverflow.com/q/25911524
tags question: http://stackoverflow.com/q/26005406
tags question: http://stackoverflow.com/q/25934817
tags question: http://stackoverflow.com/q/26021415
tags question: http://stackoverflow.com/q/25965899
tags question: http://stackoverflow.com/q/25900468
tags question: http://stackoverflow.com/q/25975569
tags question: http://stackoverflow.com/q/25986391
tags question: http://stackoverflow.com/q/25978376
tags question: http://stackoverflow.com/q/26008980
tags question: http://stackoverflow.com/q/26005234
tags question: http://stackoverflow.com/q/25919487

http://stackoverflow.com/q/25931810
tagged with: variables
score: 27
accepted answer: http://stackoverflow.com/a/25931928
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40595407
linked to: http://stackoverflow.com/q/3434278
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40595405
has answer: http://stackoverflow.com/a/25931928
has body: 1) Question 1 The following example works without using "document.getElementById('myId')". Why is that and is it OK to skip "document.getElementById('myId')"? Javascript question Make this color red. 2) Question 2 I usually store browser-objects to reduce DOM traversal (see example below). Will it be more DOM traversal if I dont store the ID in a variable or is it some how already a variable? window.onload = function(){ var myId = document.getElementById('myId'); /* stored ID that will be used multiple times */ myId.style.color = 'red'; } Thanks!
duplicate of: http://stackoverflow.com/q/3434278
has title: Why is document.getElementById not needed?
type: Question
upvote count: 27
tagged with: javascript

http://stackoverflow.com/a/25955755
has body: Just add the spans in your string: document.querySelector('#output').innerHTML = 'Hi &lt;span&gt;' + name + '&lt;/span&gt;';
type: AcceptedAnswer
type: Answer
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25955732
answers question: http://stackoverflow.com/q/25955732
has comment: http://stackoverflow.com/comment/40636888
score: 5

http://stackoverflow.com/comment/40516946
type: QuestionComment
comment on: http://stackoverflow.com/q/25888963
has text: You assume that every on know how those functions work. It would help to add a link to description of this funcs. Add more details please.
score: 0
type: Comment

jquery
tags question: http://stackoverflow.com/q/25992118
tags question: http://stackoverflow.com/q/25992444
tags question: http://stackoverflow.com/q/25914024
tags question: http://stackoverflow.com/q/25927852
tags question: http://stackoverflow.com/q/25959896
tags question: http://stackoverflow.com/q/25906553
tags question: http://stackoverflow.com/q/25910697
tags question: http://stackoverflow.com/q/26019892
tags question: http://stackoverflow.com/q/26004720
tags question: http://stackoverflow.com/q/26024809
tags question: http://stackoverflow.com/q/25983105
tags question: http://stackoverflow.com/q/25997208
tags question: http://stackoverflow.com/q/26012270
tags question: http://stackoverflow.com/q/26017837
tags question: http://stackoverflow.com/q/26008740
tags question: http://stackoverflow.com/q/25947113
tags question: http://stackoverflow.com/q/25894585
tags question: http://stackoverflow.com/q/25996868
tags question: http://stackoverflow.com/q/25922470
tags question: http://stackoverflow.com/q/26013170
tags question: http://stackoverflow.com/q/25954354
tags question: http://stackoverflow.com/q/25909484
tags question: http://stackoverflow.com/q/26016007
tags question: http://stackoverflow.com/q/25993418
tags question: http://stackoverflow.com/q/25961713
tags question: http://stackoverflow.com/q/25898288
tags question: http://stackoverflow.com/q/26027489
tags question: http://stackoverflow.com/q/26006232
tags question: http://stackoverflow.com/q/25985378
tags question: http://stackoverflow.com/q/25883732
tags question: http://stackoverflow.com/q/25882228
tags question: http://stackoverflow.com/q/25896352
tags question: http://stackoverflow.com/q/25976993
tags question: http://stackoverflow.com/q/25955871
tags question: http://stackoverflow.com/q/26032884
tags question: http://stackoverflow.com/q/25895466
tags question: http://stackoverflow.com/q/25965817
tags question: http://stackoverflow.com/q/25974439
tags question: http://stackoverflow.com/q/25944871
tags question: http://stackoverflow.com/q/25904866
tags question: http://stackoverflow.com/q/25951831
tags question: http://stackoverflow.com/q/25978236
tags question: http://stackoverflow.com/q/25937742
tags question: http://stackoverflow.com/q/26023464
tags question: http://stackoverflow.com/q/25913683
tags question: http://stackoverflow.com/q/25895555
tags question: http://stackoverflow.com/q/25976982
tags question: http://stackoverflow.com/q/25921985
tags question: http://stackoverflow.com/q/25874171
tags question: http://stackoverflow.com/q/25917079
tags question: http://stackoverflow.com/q/26016280
tags question: http://stackoverflow.com/q/25919955
tags question: http://stackoverflow.com/q/25875578
tags question: http://stackoverflow.com/q/25886992
tags question: http://stackoverflow.com/q/25916403
tags question: http://stackoverflow.com/q/26011731
tags question: http://stackoverflow.com/q/25936089
tags question: http://stackoverflow.com/q/25980903
tags question: http://stackoverflow.com/q/26022950
tags question: http://stackoverflow.com/q/25994476
tags question: http://stackoverflow.com/q/26015402
tags question: http://stackoverflow.com/q/26010090
tags question: http://stackoverflow.com/q/25892437
tags question: http://stackoverflow.com/q/25949234
tags question: http://stackoverflow.com/q/25971493
tags question: http://stackoverflow.com/q/25898719
tags question: http://stackoverflow.com/q/25998790
tags question: http://stackoverflow.com/q/26027790
tags question: http://stackoverflow.com/q/26000367
tags question: http://stackoverflow.com/q/25955477
tags question: http://stackoverflow.com/q/26023029
tags question: http://stackoverflow.com/q/25885388
tags question: http://stackoverflow.com/q/26001397
tags question: http://stackoverflow.com/q/25899805
tags question: http://stackoverflow.com/q/25906826
tags question: http://stackoverflow.com/q/25998825
tags question: http://stackoverflow.com/q/25948031
tags question: http://stackoverflow.com/q/25970368
tags question: http://stackoverflow.com/q/26007243
tags question: http://stackoverflow.com/q/25897847

http://stackoverflow.com/a/26126748
has body: OK, here is what I have found. The Pan functions in V2 is broken in IE9 and IE10. I got around it using setCenter function instead which still works in IE too. Sure you will not get the smooth transition from point A to point B with this function but it will not snap back like the Panto and Pandirection functions.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25975569
answers question: http://stackoverflow.com/q/25975569
score: 0

http://stackoverflow.com/comment/40604258
type: QuestionComment
comment on: http://stackoverflow.com/q/25929338
has text: @11684 That's also super-easy to circumvent. ` `. Point is, don't bother trying to implement this sort of XSS protection yourself. The *only* effective solution is to use proper escaping of user input, and then whitelist the tags you want to allow. (I won't go into detail, this topic has already been covered quite thoroughly elsewhere.)
score: 1
type: Comment

http://stackoverflow.com/a/50469375
score: 2
upvote count: 3
downvote count: 1
has body: To make it work properly you needed to do the following Do not display Availability . . Doing it witht data-parsley-min="1". would make your required message say something stupid like min value has to be at least 1 (even if you override it with the required message attribute) Hope this helps any other person...
answers question: http://stackoverflow.com/q/25927730
type: Answer

http://stackoverflow.com/q/25876592
type: Question
has comment: http://stackoverflow.com/comment/40495138
tagged with: javascript
has body: I am working on this simple site, and I want to be able to take the information from these fields in a form, and save them to a plain text file (like on the desktop or something). Here is the form I have so far: Submit Clear I know about $POST for after the submit button is pressed but I figured this would be a bit different since it is going to a file. Probably JS I assume, would that be just like saving to a text file in a Java program?
has comment: http://stackoverflow.com/comment/40495116
score: 0
has title: Take input from a form and save locally
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/13405129
answer count: 0
type: UnansweredQuestion
tagged with: forms

http://stackoverflow.com/q/25884284
has title: Jssor add/remove slide dynamically
upvote count: 1
tagged with: jssor
has comment: http://stackoverflow.com/comment/40618428
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40508939
has body: I have a slider already rendered and then the user makes a change on a drop down causing an ajax request. Based on the result I need to remove the current slides and add new ones. Can be more or can be less. Any ideas on how to achieve this? I would like to avoid removing the entire slider and creating it again, seems like an overload to me. I also have bullet navigation and will expect them to be refreshed too. Regards, Sergio
tagged with: slider
favorite count: 0
has comment: http://stackoverflow.com/comment/40508915
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40687918
comment on: http://stackoverflow.com/a/25982690
type: AnswerComment
has text: What do you mean by trying button input? If you are asking is button input submits the form correctly, it does, but I need submitting a form without redirection anywhere.
score: 0
type: Comment

http://stackoverflow.com/a/25877172
accepted answer of: http://stackoverflow.com/q/25877026
score: 1
downvote count: 1
has body: You can give your mixin a "constructor" as well. It needs to be called from every class that implements the mixin, just like you need to call $super in subclasses: var HasElementsMixin = { initializeElements: function() { this.elements = []; }, addElement: function(){…}, removeElement: function(){…} }; var Page = Class.create(MyBaseClass, HasElementsMixin, { initialize: function($super){ $super(); this.initializeElements(); }, render: function(){…} });
type: AcceptedAnswer
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25877026

http://stackoverflow.com/a/25985303
type: Answer
answers question: http://stackoverflow.com/q/25920314
upvote count: 6
score: 6
has body: After a lot of research I could find some ways to test Controllers that use Kendo Datasource. Kendo has its own way to make the Ajax calls to fetch data and don’t use regular Angular $http to do that, so it’s a little bit tricky to test using Angular tools (angular-mocks). Let’s go to the options: 1 – Use regular Angular way to do the Ajax calls. Kendo lets us change the way it fetches data, so instead of doing: dataSource: new kendo.data.DataSource({ transport: { read: { url: "/devices, dataType: "json" } }, change: function(){ var view = this.view(); $scope.devices = []; $.each(view, function(i, v) { $scope.devices.push({id: v.id, description: v.name, status: v.status == 0 ? "failure" : "success"}); }); $scope.$apply(); } }); We would change to: dataSource: new kendo.data.DataSource({ transport: { read: function(options){ $http.get("/devices").then(function(response){ options.success(response.data); $scope.devices = []; response.data.forEach(function(v){ $scope.devices.push({id: v.id, description: v.name, status: v.status == 0 ? "failure" : "success"}); }); }); } } }); Then we can use regular $httpBackend.expectGET(url) to mock the Ajax call. I personally like this approach because we have more control. Ps.: using the variable “options” inside the function we have access to the Grid filter, sorting and paging values. 2 – Mock the Kendo Ajax Call. In this way we change almost nothing at the Controller, the only changed needed is to create a new Datasource using new kendo.data.DataSource({}) instead of just passing the options. This needed that because we call the read function inside the test case. I tried different ways to mock this Ajax request, but the only one I could make it work was using a tool called Jasmine-Ajax. And in the test case we would wrote something like: var request = jasmine.Ajax.requests.mostRecent(); request.response(MockData); I hope this can help other people.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25920314

http://stackoverflow.com/q/25994649
has comment: http://stackoverflow.com/comment/40708833
downvote count: 0
answer count: 1
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/40707418
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40709062
tagged with: http://stackoverflow.com/tag/html
tagged with: datatables
has title: How to resize table columns spanning across two HTML table using JavaScript/Jquery
has comment: http://stackoverflow.com/comment/40707814
type: UnansweredQuestion
upvote count: 1
has body: I want to add column resize functionality to my html table. User should be able to resize column at runtime. I looked at various examples and plugins but they all work when you have a single table. Where Table header and table body both are part of same table tag, like this: header header cell cell cell cell I am using Jquery DataTable which renders table in two parts. Column Header is part of one table and body is part of another table. See the attached image for more information. How can I add column resize functionality in such case? Icing on the cake : I need to support IE 8.
has comment: http://stackoverflow.com/comment/40709282
has comment: http://stackoverflow.com/comment/40708093
type: Question
tagged with: internet-explorer-8
linked to: http://stackoverflow.com/q/3043094
has answer: http://stackoverflow.com/a/25995072
has comment: http://stackoverflow.com/comment/40709148
linked to: http://stackoverflow.com/q/2905857

http://stackoverflow.com/q/25934277
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15480252
type: Question
downvote count: 4
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/15926105
has body: I am looking for HTML/JavaScript code to open a new window with only a "close" option; users should not able to maximize or minimize the window. This is similar to the window which we get in Internet Explorer in Tools -&gt; About Internet Explorer. Below is the code which I tried; however, I can increase/decrease the width of the window using mouse or by using the maximize/minimize buttons. How can I disable those options? &lt;SCRIPT&gt; &lt;!-- window.open ('titlepage.html', 'newwindow', config='height=100,width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no') --&gt; &lt;/SCRIPT&gt;
duplicate of: http://stackoverflow.com/q/15926105
tagged with: http://stackoverflow.com/tag/html
score: -2
has title: open a new window without address bar
favorite count: 0
has comment: http://stackoverflow.com/comment/40600113
upvote count: 2
has answer: http://stackoverflow.com/a/25935035

http://stackoverflow.com/a/55890194
has body: const matrix = [ [1,2,3], [4,5,6], [7,8,9] ]; const rotateMatrix = (arr, col) =&gt; arr.map( row =&gt; row[col]); /* matrix[0] - is to check on the column length for any N * N rotation */ const clockWise = matrix[0].map((row,i) =&gt; { return rotateMatrix(matrix, i).reverse(); }); console.log('CLOCK WISE'); console.log(clockWise); console.log('**********************************'); const antiClockWise = matrix.map((row,i) =&gt; { return rotateMatrix(matrix, matrix.length -1 -i).reverse(); }); console.log('ANTI CLOCK WISE'); console.log(antiClockWise);
score: 0
answers question: http://stackoverflow.com/q/26001192
type: Answer

http://stackoverflow.com/q/25942296
has comment: http://stackoverflow.com/comment/40615161
score: -1
has comment: http://stackoverflow.com/comment/40615542
answer count: 2
has comment: http://stackoverflow.com/comment/40615245
has title: setTimeOut/setInterval runs just once
upvote count: 0
has body: I use function App.loadTo to load some data in any place. I need a delay before displaying any content (used form-styler plugin, redrawing form). I tried setTimeout and setInterval functions, but they run just once, i.e. 1) Called App.loadTo( params ) - delay works 2) Called App.loadTo( params ) with the same params - delay doesnt work I tried the following with no success tmp = setInterval(function() { console.log('I show all invisible!', params.where); $(params.where).css({ 'visibility': 'visible' }); $('#preloader').remove(); clearInterval(tmp); }, 110); Where did I make a mistake? App.loadTo = function loadTo(params) { $.ajax({ url: '/' + params.controller + '/' + params.action + '', type: 'POST', dataType: 'json', data: params.sentData, success: function(server_answer, textStatus) { if (server_answer.result == 'success') { if (params.hasOwnProperty('parseHtml')) { // Data parsing var html = $(server_answer.html); html = $(html).find(params.parseBlock); } else { var html = $(server_answer.html); } // Inserting data $(params.where).empty().html(html).css({ 'visibility': 'hidden' }).before('&lt;div id="preloader" style="width: 100%; background: url(&amp;quot;i/preloader.gif&amp;quot;) no-repeat scroll 50% center transparent; min-height: 140px; height: 100%;"&gt;&lt;/div&gt;'); // Delay before display setTimeout(function() { console.log('I show all invisible!', params.where); $(params.where).css({ 'visibility': 'visible' }); $('#preloader').remove(); }, 110); } else { alert_jq_ui(server_answer.error_txt); } }, error: function(xhr, errmsg, err) { alert_jq_ui(xhr, errmsg, err); } }); };
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25942723
has comment: http://stackoverflow.com/comment/40615360
has comment: http://stackoverflow.com/comment/40615519
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40615144
tagged with: settimeout
has answer: http://stackoverflow.com/a/25943595
has comment: http://stackoverflow.com/comment/40615821
has comment: http://stackoverflow.com/comment/40615470
has comment: http://stackoverflow.com/comment/40615058
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40615069
has comment: http://stackoverflow.com/comment/40614941
has comment: http://stackoverflow.com/comment/40615242
has comment: http://stackoverflow.com/comment/40615922
tagged with: javascript

http://stackoverflow.com/comment/40672108
has text: Multiple inheritance is rarely a good idea even in languages where it is possible. And in Javascript it isn't.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25974977
score: 0

http://stackoverflow.com/comment/40574695
comment on: http://stackoverflow.com/a/25920129
type: AnswerComment
score: 0
type: Comment
has text: Then paste or create a short version of the explanation and put it here. If the link is broken one day then there will be no explanation

http://stackoverflow.com/q/25947039
has answer: http://stackoverflow.com/a/25947846
favorite count: 0
has title: AngularJS routing views properly but stylesheets broken
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/40622958
upvote count: 2
linked to: http://stackoverflow.com/q/15193492
type: Question
has body: I'm building an AngularJS application with routed views and to be clear the routing is working, as in the template pages in my /views/ folder are asynchronously loading into the view div on my index.html page. The problem: These used to be seperate pages linked together the old fashioned way. Index.html, deal.html, and merchant.html. They all rendered perfectly in all browsers at that point but when I added this AngularJS routes feature, the same code is being dropped into the index.html file but the pages are not rendering properly. A lot of the styles are there... just misaligned. I can't wrap my head around it. I've looked everywhere and nobody seems to have documented this issue. Here's what I've got so far: head: The file system: index.html app.js /views/main.html /views/merchant.html /views/deal.html assets/css/ img/ index.html: My app.js: var appName = angular.module('adamApp', ['ngRoute']); // configure routes appName.config(function($routeProvider) { $routeProvider.when('/', { templateUrl : 'partials/home.html', controller : 'mainController' }); $routeProvider.when('/merchant', { templateUrl : 'partials/merchant.html', controller : 'merchantController' }); $routeProvider.when('/deal', { templateUrl : 'partials/deal.html', controller : 'dealController' }); $routeProvider.otherwise({ redirectTo: "/" }); }); Screenshot of old version of site without Angular routes: Screenshot of Angular routes version with broken stylesheet: Any ideas on what's going on?
has answer: http://stackoverflow.com/a/25947730
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40642132
comment on: http://stackoverflow.com/a/25953224
type: AnswerComment
has text: Thank you! it makes sense to use the `$(this).find` code! I am aware of the fact that I need to add the other table elements as well, and need to `hide()` parts of the grid view when the user clicks the list style button.
score: 0
type: Comment

http://stackoverflow.com/q/25988195
has body: Following situation: Gallery-menu has 2 title-images and 7 sub-images. 3 sub-images are linked to title-image 1; 4 sub-images are linked to title-image 2. The sub-images are jumbled (not adjacent according to title). all images are wrapped in an "a"-tag; a title-image and its sub-images all link to the same page. What I am trying to do is to link multiple hover-instances in an asymmetrical way: - when you hover over a title-image, this image + all sub-images that belong to that title change to their hover image state; - when you hover over a sub-image, this image + the title image that it belongs to change to their hover state (but not the rest of the set); I hope I'm making sense with this :-) Frankly I've tried any way I could possibly find to code this with CSS, but I think it's just not possible. JQuery seems an obvious solution, but I'm not very experienced. Can anyone help me in the right direction? .galleryitem:hover img.off { display: none; } .galleryitem img.on { display: none; } .galleryitem:hover img.on { display: inline-block; } .float { float: left; }
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/26001742
has comment: http://stackoverflow.com/comment/40719679
tagged with: css
has comment: http://stackoverflow.com/comment/40696436
has answer: http://stackoverflow.com/a/26001742
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40720051
has title: Assymmetrical hover structure of multiple divs
type: Question
has comment: http://stackoverflow.com/comment/40719765

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/25887730
tags question: http://stackoverflow.com/q/25934399
tags question: http://stackoverflow.com/q/25913014
tags question: http://stackoverflow.com/q/25909484
type: Tag

http://stackoverflow.com/q/25968262
has comment: http://stackoverflow.com/comment/40660094
has comment: http://stackoverflow.com/comment/40660187
has body: I made some 'warning' layer to use instead of 'alert()'. code : warning = document.getElementById('warning'); // This line is what exactly I want to make functional. the code out side of warning(); This line runs before 'elem:div#warning' is made by warning(). function warning() { a = document.createElement('div'); document.body.appendChild(a); a.id = 'warning'; a.className= 'warning'; } But I don't know how to access that newly created and added element by javascript. I think css works fine with newly added elements. But js is not. I searched google, and found some methods register newly created element automatically using prototype, but it was hard to understand to me... So, what I trying to do is, access to newly created element 'a' by javascript which executed before that 'a' was created. I tried this method : if(document.getElementById('warning')) {alert('asdf')}; But it was useless...
has comment: http://stackoverflow.com/comment/40660092
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25968500
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40660142
has title: How to access newly created elements by pure js?
answer count: 1
has comment: http://stackoverflow.com/comment/40660271
has comment: http://stackoverflow.com/comment/40660322

http://stackoverflow.com/comment/40635415
type: Comment
comment on: http://stackoverflow.com/a/25955033
score: 0
type: AnswerComment
has text: I've always used `this.id`, but for some reason it works without the object reference, which I have to say confuses me a bit.

http://stackoverflow.com/comment/101822646
type: Comment
has text: Thank you for your detailed description of this problem and the solution. I managed to fix the issue using your solution except that I also had to add a 200 response to requests from user agents containing 'ms-office'. Like this: `if ($http_user_agent ~* "(ms-office)") { return 200; }`.
comment on: http://stackoverflow.com/a/25897529
type: AnswerComment
score: 0

angularjs
tags question: http://stackoverflow.com/q/25953559
tags question: http://stackoverflow.com/q/25908638
tags question: http://stackoverflow.com/q/25959831
tags question: http://stackoverflow.com/q/25877092
tags question: http://stackoverflow.com/q/25999200
tags question: http://stackoverflow.com/q/26015452
tags question: http://stackoverflow.com/q/25921103
tags question: http://stackoverflow.com/q/25958212
tags question: http://stackoverflow.com/q/25914071
tags question: http://stackoverflow.com/q/25899668
tags question: http://stackoverflow.com/q/26025152
tags question: http://stackoverflow.com/q/25974495
tags question: http://stackoverflow.com/q/25924270
tags question: http://stackoverflow.com/q/25985309
tags question: http://stackoverflow.com/q/25956768
tags question: http://stackoverflow.com/q/25998459
tags question: http://stackoverflow.com/q/25885341
tags question: http://stackoverflow.com/q/25990936
tags question: http://stackoverflow.com/q/26004916
tags question: http://stackoverflow.com/q/25874731
tags question: http://stackoverflow.com/q/26015248
tags question: http://stackoverflow.com/q/25966790
tags question: http://stackoverflow.com/q/25926845
tags question: http://stackoverflow.com/q/25919177
tags question: http://stackoverflow.com/q/25927929
tags question: http://stackoverflow.com/q/25943118
tags question: http://stackoverflow.com/q/26027623
tags question: http://stackoverflow.com/q/25941342
tags question: http://stackoverflow.com/q/25980615
tags question: http://stackoverflow.com/q/26020250
tags question: http://stackoverflow.com/q/26008405
tags question: http://stackoverflow.com/q/26006931
tags question: http://stackoverflow.com/q/25926932
tags question: http://stackoverflow.com/q/26006736
tags question: http://stackoverflow.com/q/25977505
tags question: http://stackoverflow.com/q/25902007
tags question: http://stackoverflow.com/q/25938952
tags question: http://stackoverflow.com/q/25983279
tags question: http://stackoverflow.com/q/25950302
tags question: http://stackoverflow.com/q/25932546
tags question: http://stackoverflow.com/q/25952158
tags question: http://stackoverflow.com/q/26025370
tags question: http://stackoverflow.com/q/25952701
tags question: http://stackoverflow.com/q/25893371
tags question: http://stackoverflow.com/q/25974049
tags question: http://stackoverflow.com/q/25900800
tags question: http://stackoverflow.com/q/25973465
tags question: http://stackoverflow.com/q/25978451
tags question: http://stackoverflow.com/q/25900884
tags question: http://stackoverflow.com/q/25919813
tags question: http://stackoverflow.com/q/25917616
tags question: http://stackoverflow.com/q/26022695
tags question: http://stackoverflow.com/q/26000097
tags question: http://stackoverflow.com/q/25921084
tags question: http://stackoverflow.com/q/25954352
tags question: http://stackoverflow.com/q/25985530
tags question: http://stackoverflow.com/q/25987554
tags question: http://stackoverflow.com/q/25994799
tags question: http://stackoverflow.com/q/26033619
tags question: http://stackoverflow.com/q/25984449
tags question: http://stackoverflow.com/q/25955320
tags question: http://stackoverflow.com/q/25933003
type: Tag
tags question: http://stackoverflow.com/q/25958509
tags question: http://stackoverflow.com/q/25876429
tags question: http://stackoverflow.com/q/25914588
tags question: http://stackoverflow.com/q/25877943
tags question: http://stackoverflow.com/q/26027059
tags question: http://stackoverflow.com/q/25927254
tags question: http://stackoverflow.com/q/25880987
tags question: http://stackoverflow.com/q/26006808
tags question: http://stackoverflow.com/q/25960151
tags question: http://stackoverflow.com/q/26024219
tags question: http://stackoverflow.com/q/26013995
tags question: http://stackoverflow.com/q/25991077
tags question: http://stackoverflow.com/q/25894963
tags question: http://stackoverflow.com/q/26026344
tags question: http://stackoverflow.com/q/25992102
tags question: http://stackoverflow.com/q/25953245
tags question: http://stackoverflow.com/q/26015844

http://stackoverflow.com/q/25972305
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25972445
has comment: http://stackoverflow.com/comment/40673289
has comment: http://stackoverflow.com/comment/40671748
has title: use .html() method to set javascript
type: Question
answer count: 1
score: 0
tagged with: methods
has body: I'm trying to create a "mini html editor" using a textarea that sets the html in an iframeusing this function: $(document).ready(function(){ $('#outputtxt').keyup(function(){ var tval = $('#outputtxt').val(); $("#frameid").contents().find("body").html(tval); }); }); Works fine for simple html and styling. Doesn't seem to be working for class or id css and doesn't seem to be working for scripts. can the .html() method be used for that?

http://stackoverflow.com/comment/40681442
type: QuestionComment
has text: Define "stop this code". Check to see if it's 25 or above?
comment on: http://stackoverflow.com/q/25980034
score: 0
type: Comment

http://stackoverflow.com/a/50127124
answers question: http://stackoverflow.com/q/25937369
has body: I was going through same issue in React-Native where API response &amp; reject weren't updating states apiCall().then(function(resp) { this.setState({data: resp}) // wasn't updating } I solved the problem by changing function with the arrow function apiCall().then((resp) =&gt; { this.setState({data: resp}) // rendering the view as expected } For me, it was a binding issue. Using arrow functions solved it because arrow function doesn't create its's own this, its always bounded to its outer context where it comes from
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/103921159
score: 1
upvote count: 1

http://stackoverflow.com/comment/40542520
type: QuestionComment
has text: @dandavis, it would be expensive to send everyone unrelated data. socket.io has a simple way of sending to specific sockets, how do I do it with Pusher?
comment on: http://stackoverflow.com/q/25902616
score: 0
type: Comment

http://stackoverflow.com/a/25894183
type: Answer
has body: You need to return the string: $('#data').html( function(index, oldHtml) { return oldHtml.replace('{count}', '1'); }); Using your method, instead of the params that are passed in by default: $('#data').html(function () { return $(this).html().replace('{count}', '1'); } Updated JSBin
score: 3
accepted answer of: http://stackoverflow.com/q/25894137
upvote count: 3
has comment: http://stackoverflow.com/comment/40526869
answers question: http://stackoverflow.com/q/25894137
has comment: http://stackoverflow.com/comment/40526836
has comment: http://stackoverflow.com/comment/40526935
downvote count: 0
has comment: http://stackoverflow.com/comment/40526796
has comment: http://stackoverflow.com/comment/40526824
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40527537

http://stackoverflow.com/comment/40532790
comment on: http://stackoverflow.com/q/25897406
type: QuestionComment
type: Comment
has text: See this updated version: http://jsfiddle.net/5yn78jhz/2/
score: 1

http://stackoverflow.com/a/25963947
score: 1
has comment: http://stackoverflow.com/comment/40652391
accepted answer of: http://stackoverflow.com/q/25963560
has body: Here's to javascript code: <?php $ht=" test1 test2 test3 test4 LIT test5 test6 test7 test8 test9 test10 "; echo $ht.' '; ?> And this one with jQuery: <?php $ht=" test1 test2 test3 test4 LIT test5 test6 test7 test8 test9 test10 "; echo $ht.' '; ?>
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40652082
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25963560
downvote count: 0

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/25918495
tags question: http://stackoverflow.com/q/26020085
tags question: http://stackoverflow.com/q/25967316
tags question: http://stackoverflow.com/q/26016688
tags question: http://stackoverflow.com/q/25980189
tags question: http://stackoverflow.com/q/25886389
tags question: http://stackoverflow.com/q/25914858
tags question: http://stackoverflow.com/q/25958880
tags question: http://stackoverflow.com/q/25953643
tags question: http://stackoverflow.com/q/26025136
tags question: http://stackoverflow.com/q/26023015
tags question: http://stackoverflow.com/q/26033638
tags question: http://stackoverflow.com/q/26025978
tags question: http://stackoverflow.com/q/25963856
tags question: http://stackoverflow.com/q/26003739
tags question: http://stackoverflow.com/q/25960707
tags question: http://stackoverflow.com/q/25969424
tags question: http://stackoverflow.com/q/25986404
tags question: http://stackoverflow.com/q/25912677
tags question: http://stackoverflow.com/q/26003490
tags question: http://stackoverflow.com/q/26013792
tags question: http://stackoverflow.com/q/25934416
tags question: http://stackoverflow.com/q/26015765
tags question: http://stackoverflow.com/q/25921606
tags question: http://stackoverflow.com/q/26029846
tags question: http://stackoverflow.com/q/25987983
tags question: http://stackoverflow.com/q/25882009
tags question: http://stackoverflow.com/q/25965723
tags question: http://stackoverflow.com/q/25895959
tags question: http://stackoverflow.com/q/25880274
tags question: http://stackoverflow.com/q/25905103
tags question: http://stackoverflow.com/q/25990695
tags question: http://stackoverflow.com/q/25975700
tags question: http://stackoverflow.com/q/25908635
tags question: http://stackoverflow.com/q/25911632
tags question: http://stackoverflow.com/q/26001625
tags question: http://stackoverflow.com/q/25930874
tags question: http://stackoverflow.com/q/25987157
tags question: http://stackoverflow.com/q/25966841
tags question: http://stackoverflow.com/q/25924772
tags question: http://stackoverflow.com/q/25914340
tags question: http://stackoverflow.com/q/26013446
tags question: http://stackoverflow.com/q/25878572
tags question: http://stackoverflow.com/q/25873666
tags question: http://stackoverflow.com/q/25981198
tags question: http://stackoverflow.com/q/25940853
tags question: http://stackoverflow.com/q/25991558
tags question: http://stackoverflow.com/q/25909239
tags question: http://stackoverflow.com/q/25881620
tags question: http://stackoverflow.com/q/25928830
tags question: http://stackoverflow.com/q/25911625
tags question: http://stackoverflow.com/q/25873599
tags question: http://stackoverflow.com/q/26016679
tags question: http://stackoverflow.com/q/25890820
tags question: http://stackoverflow.com/q/25974135
tags question: http://stackoverflow.com/q/25947486
tags question: http://stackoverflow.com/q/25897910
tags question: http://stackoverflow.com/q/25926315
tags question: http://stackoverflow.com/q/26018351
tags question: http://stackoverflow.com/q/25959123
tags question: http://stackoverflow.com/q/25930774
tags question: http://stackoverflow.com/q/26023962
tags question: http://stackoverflow.com/q/25940361
tags question: http://stackoverflow.com/q/25972808
tags question: http://stackoverflow.com/q/26007544
tags question: http://stackoverflow.com/q/26027531
tags question: http://stackoverflow.com/q/26011223
tags question: http://stackoverflow.com/q/26021134
tags question: http://stackoverflow.com/q/25998563
tags question: http://stackoverflow.com/q/25938845
tags question: http://stackoverflow.com/q/25993057
tags question: http://stackoverflow.com/q/25995294
tags question: http://stackoverflow.com/q/26030463
tags question: http://stackoverflow.com/q/26013459
tags question: http://stackoverflow.com/q/25999747
tags question: http://stackoverflow.com/q/26022088
tags question: http://stackoverflow.com/q/26002748
tags question: http://stackoverflow.com/q/25967865
tags question: http://stackoverflow.com/q/26033007
tags question: http://stackoverflow.com/q/25933569

http://stackoverflow.com/comment/40568011
type: Comment
has text: Im not sure what you mean by that, but I am accessing the controller anyway because I am using it to display a database table
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25916611

http://stackoverflow.com/a/27332117
has comment: http://stackoverflow.com/comment/43122053
has comment: http://stackoverflow.com/comment/43360542
has comment: http://stackoverflow.com/comment/43360681
has comment: http://stackoverflow.com/comment/43121898
type: Answer
has comment: http://stackoverflow.com/comment/43410578
upvote count: 1
has comment: http://stackoverflow.com/comment/43415539
has comment: http://stackoverflow.com/comment/43414108
has comment: http://stackoverflow.com/comment/43121958
accepted answer of: http://stackoverflow.com/q/26005656
has body: I would do that by extending the prototype of Backbone.Model and then call the constructor function of THREE.Object3D. This could happen by doing : var Object3DModel = Backbone.Model.extend({ initialize: function() { _(this.prototype).extend(THREE.Object3D.prototype); THREE.Object3D.apply(this, arguments); } }); I'm using underscore extend for extending the prototype here. You can see working jsbin. Edit I just played around more and it seems that a better approach would be : // Start with a constructor, calling the two constructors of the classes var Object3DModel = function() { THREE.Object3D.apply(this, arguments); Backbone.Model.apply(this, arguments); }; // Copy Object3D Prototype Object3DModel.prototype = new THREE.Object3D(); // Append Backbone.Model prototype var ref = new Backbone.Model(); for ( var name in ref ) { Object3DModel.prototype[name] = ref[name]; } Because THREE library is using getters and setters, so the correct way to inherit them would be this one. Anyway I created a JsBin which has the basic functionality tested.
answers question: http://stackoverflow.com/q/26005656
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43122390

http://stackoverflow.com/q/25975612
upvote count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/25976071
type: Question
has answer: http://stackoverflow.com/a/25975692
has comment: http://stackoverflow.com/comment/40673256
tagged with: javascript
score: -1
tagged with: post
tagged with: get
has body: I'm wondering, why are we still using GET method in AJAX requests for example: $.ajax({ type: "GET", url: "SomeController/GetSomething", data: { id: 100} }); GET is handy, when you want to store data in url, when you are querying Google and you want to send that query to friend or whatever else. On the other hand, we have security gaps. They are not big (I'd say they are obstacles), but it'd be slightly better to use POST when you don't want to show form data. Moreover, POST can store any type of data, control data size and hide somehow passing variables. Is it a good solution to always use GET in places, which are not "public" (search bars, article page, user profile, ...) and use POST everywhere else? With this approach, all AJAX queries should be send using POST method.
has answer: http://stackoverflow.com/a/25975720
has comment: http://stackoverflow.com/comment/40673223
tagged with: jquery
favorite count: 0
tagged with: ajax
has title: Is GET better than POST in AJAX approach?
has comment: http://stackoverflow.com/comment/78424705
has comment: http://stackoverflow.com/comment/40673201
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/40673139
has answer: http://stackoverflow.com/a/25975906

http://stackoverflow.com/comment/40644264
score: 0
type: Comment
has text: It's useful, but I don't see an alternative for setTimeout that can fire under 10ms, and busy-waiting is not an option.
comment on: http://stackoverflow.com/a/25958446
type: AnswerComment

http://stackoverflow.com/comment/40703154
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25991321
has text: Ok, but i thought issue could be in two libraries of jquery.

http://stackoverflow.com/comment/40566852
has text: A function could be shared by multiple properties, but wouldn't have to be.
type: AnswerComment
comment on: http://stackoverflow.com/a/25916148
score: 0
type: Comment

http://stackoverflow.com/q/25982129
answer count: 1
downvote count: 0
tagged with: carousel
has answer: http://stackoverflow.com/a/35305095
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40712729
has comment: http://stackoverflow.com/comment/40721835
score: 1
has body: I have several instances of the Slick Carousel gallery set up and working properly. However, I cannot successfully call the Methods as described in the documentation. (http://kenwheeler.github.io/slick/) Whenever I try to target an existing instance of the carousel, I get the following error: "Uncaught TypeError: Cannot read property 'changeSlide' of undefined." I'm trying to automatically goto the next slide after the gallery is initiated. I've put together this jsfiddle to replicate the issue: http://jsfiddle.net/d32x7nqp/ var gallery = $('.slick-container'); gallery.slick({ speed:100, dots:true, onInit: function(){ gallery.slickNext(); } }); Error: Uncaught TypeError: Cannot read property 'changeSlide' of undefined Targeting this, $(this), $('.slick-container'), and gallery all produce the same exception. Any help is greatly appreciated, thank you!! EDIT Thanks to Sunand for the fix! For those dealing with the same issue, simply move your method out of the onInit callback. Apparently the slick instance is not fully initialized when onInit is called. Here's the correct code: var gallery = $('.slick-container'); gallery.slick({ speed:100, dots:true, }); gallery.slickNext();
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40686635
tagged with: javascript
tagged with: jquery
has title: Slick Carousel unable to call Methods

http://stackoverflow.com/a/25878657
has comment: http://stackoverflow.com/comment/40500263
answers question: http://stackoverflow.com/q/25877320
has comment: http://stackoverflow.com/comment/40521451
downvote count: 0
has comment: http://stackoverflow.com/comment/49035404
score: 6
has comment: http://stackoverflow.com/comment/40500487
has comment: http://stackoverflow.com/comment/49052596
has comment: http://stackoverflow.com/comment/49073560
upvote count: 6
has comment: http://stackoverflow.com/comment/49035292
has comment: http://stackoverflow.com/comment/40500373
type: AcceptedAnswer
has body: Would you try this? If all the distances are the same, then Parse isn't sorting to the precision that you need. // check Parse for infections around passed GeoPoint Parse.Cloud.define("InfectionCheck_BETA", function(request, response) { var geoPoint = request.params.geoPoint; var query = new Parse.Query("InfectedArea"); query.near("centerPoint", geoPoint); query.limit(10); query.find({ success: function(results) { var distances = []; for (var i = 0; i &lt; results.length; ++i){ distances.push(results[i].kilometersTo(geoPoint)); } response.success(distances); }, error: function(error) { response.error("Error"); } }); }); This results in the ten closest distances. After chatting, it seems that the reason that the distances weren't being sorted is that Parse only sorts with accuracy of a few centimeters. The differences the user was looking at were less than that.
has comment: http://stackoverflow.com/comment/40528279
accepted answer of: http://stackoverflow.com/q/25877320
type: Answer

http://stackoverflow.com/a/25957199
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25945535
has body: You have to pass callbackContext to the DownloadManager class. @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { context=this.cordova.getActivity().getApplicationContext(); String myurl = args.getString(0); if (action.equals("plugin1")) { // Pass callbackContext to your actual code which performing the work. new DownloadManager(callbackContext).execute(myurl); return true; } callbackContext.error("error"); return false; } public class DownloadManager extends AsyncTask&lt;String, String, String&gt; { private CallbackContext callbackContext; public DownloadManager(CallbackContext callbackContext) { this.callbackContext = callbackContext; } @Override public String doInBackground(String... arg0) { downloadapk(arg0[0]); installapk(); this.callbackContext.success(); return null; //Here I want to return to javascript.How can I callback to the javascript function from //async method?? }
answers question: http://stackoverflow.com/q/25945535

http://stackoverflow.com/comment/40561870
type: Comment
comment on: http://stackoverflow.com/a/25912798
type: AnswerComment
has text: complete list [german character](http://homepages.rootsweb.ancestry.com/~george/ansi_ascii_character_chart.html)
score: 0

http://stackoverflow.com/q/25906865
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25907184
tagged with: ajax
score: 0
possible better answer: http://stackoverflow.com/a/25907184
has answer: http://stackoverflow.com/a/25907479
tagged with: django
type: AnsweredQuestion
has title: substitude a variable string from script to ajax
has body: This could be a silly question , please bear with me : I am using ajax to load a json file which then shows data in high charts : code is as follow : $.ajax({ cache: false, dataType: "json", url: "{% static 'money/data/highchartpiesam.json' %}", success: function (json) { console.log("haha i have read the json") console.log('Success', this.url) $('#containerHighChartJSONPie').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: 1, //null, plotShadow: false }, title: { text: 'Expenses per Types of Expenditures' }, tooltip: { pointFormat: '{point.name}: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt;' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '&lt;b&gt;{point.name}&lt;/b&gt;: {point.percentage:.1f} %', style: { color: (Highcharts.theme &amp;&amp; Highcharts.theme.contrastTextColor) || 'black' } } } }, series: [{ type: 'pie', name: 'Type of Expenditure', data: json }] }); } }); This code works great as desired but if you see url in above code its : url: "{% static 'money/data/highchartpiesam.json' %}" file name for user so file for sam is highchartpiesam.json , for ram is highchartpieram.json etc i.e. file name will be different for different user ( as per my django code) and logged in user name will be appended to work highchartpie.json In order to make this work i thought to create a url string and then put that string to url: but that doesnt seems to work :( what i did is changed the above code to following : $(document).ready(function () { console.log("aah document is loaded ") console.log("File Name code"); var a = '{\% static '.concat('\'money/data/highchartpie').concat('{{ user.username }}').concat('.json\'').concat("%}"); console.log("File Name code : Value of initial string is a is ", a); var chartFileName = a; $.ajax({ cache: false, dataType: "json", url: chartFileName, success: function (json) { console.log("haha i have read the json") console.log('Success', this.url) $('#containerHighCha…
accepted answer: http://stackoverflow.com/a/25907479
type: Question
answer count: 2

http://stackoverflow.com/a/25901491
has comment: http://stackoverflow.com/comment/40540419
upvote count: 2
type: Answer
has body: Have you tried setting the text with template markup? {{defaultOptionText}} Working at this jsfiddle: http://jsfiddle.net/udu9byka/2/
score: 2
answers question: http://stackoverflow.com/q/25901457
downvote count: 0
has comment: http://stackoverflow.com/comment/40540311

http://stackoverflow.com/q/25956366
has comment: http://stackoverflow.com/comment/40638505
accepted answer: http://stackoverflow.com/a/25956734
downvote count: 0
score: 1
has title: Parse callback not called on object save
possible better answer: http://stackoverflow.com/a/25956684
has comment: http://stackoverflow.com/comment/40638580
has answer: http://stackoverflow.com/a/25956734
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25956684
tagged with: javascript
has body: I am running cloud code on Parse. I am running a query and for each query, I am doing a subquery. I will modify the results of my subquery. But having modified my subquery objects, I want to modify my query results objects to reflect that I have processed them. Using promises, I can make my initial query, iterate through each result, perform a subquery using that result and modify the new subquery results. However, once I successfully save my subquery results, the save callback isn't called and I can't update my initial query objects. Parse.Cloud.job("processEvents", function(request, status){ Parse.Cloud.useMasterKey(); var query = new Parse.Query("events"); query.equalTo("processed", false); query.limit(10); query.find().then(function(results) { var promise = Parse.Promise.as(); _.each(results, function(eventsRecord) { //EACH var eventData = eventsRecord.get("eventData"); var eventsObject = JSON.parse(eventData); var events = eventsObject["events"]; for (var i = 0; i &lt; events.length; i++) { //FOR var currentEvent = events[i]; if(currentEvent["type"] === "vote"){ var votes = currentEvent["entity"]["votes"]; for (var i = 0; i &lt; votes.length; i++) { var currentVote = votes[i]; promise = promise.then(function() { var EventAssociationObject = Parse.Object.extend("eventAssociation"); var query = new Parse.Query(EventAssociationObject); query.equalTo("voteID", currentVote["id"]); return query.first({ success:function(object){ var partyEntity = currentEvent["entity"]; object.set("entityJSONInformation", JSON.stringify(partyEntity)); //object in the response callback must be the object saved return object.save(object, { success:function(object){ eventsRecord.set("processed", true); return eventsRecord.save(); }, error: function(error){ console.log(error); } }); }, error:function(error){ console.log(error); } }); }); }; } }; //FOR }); //EACH return promise; }).then(function() { status.success("Finished"); }); });
type: Question
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40638190
favorite count: 0
tagged with: promise
tagged with: parse-platform

http://stackoverflow.com/comment/40614941
comment on: http://stackoverflow.com/q/25942296
score: 0
type: QuestionComment
has text: `setTimeout()` runs just once.
type: Comment

http://stackoverflow.com/comment/40711649
comment on: http://stackoverflow.com/a/25991427
score: 0
type: AnswerComment
has text: @max, I have no idea what you meant.
type: Comment

http://stackoverflow.com/a/26046327
score: 0
answers question: http://stackoverflow.com/q/26005547
type: AcceptedAnswer
type: Answer
has body: The solution for me was to set the modal involved to position:absolute; (by default it is position: fixed;) and instead of placing the modal at the bottom of my HTML by appending it to the body, I appended it to the parent element of the button that I clicked to show the modal. I also needed to ensure that the element that I was appending the modal into had a position of relative. CSS .modal.fade.my-special-modal { position: absolute; /* 'top' is not required but I did it for my taste */ top: 15px; } .my-special-modal-container { position: relative; } HTML Show the modal Thanks to @Christina for helping me discover this solution.
accepted answer of: http://stackoverflow.com/q/26005547

http://stackoverflow.com/comment/40490664
has text: I don't see your HTML still.. but try an === instead of match http://jsfiddle.net/13s58xjj/4/
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25874146
type: Comment

http://stackoverflow.com/comment/40542189
has text: You should check out http://stackoverflow.com/questions/7126822/can-i-tell-the-chrome-script-debugger-to-ignore-jquery-js
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25902560

http://stackoverflow.com/q/25975519
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26038531
tagged with: phantomjs
type: AnsweredQuestion
score: 3
upvote count: 3
has title: run multiple js files without starting and stopping server every time
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26038531
has body: I have a grunt configuration running a test suite that, for now, i can't change how it's structured. At some point, i have an array of file paths, and do something like: files.forEach(function(testFile){ grunt.task.run( 'shell:phantomjs:' + testFile ); }); and grunt.initConfig({ phantomjs: { command: function(testFile){ return 'node_modules/phantomjs/bin/phantomjs ' + testFile; } } }); The problem with this approach is SPEED. As i'm running phantomjs for each file, the setup and takedown of the server on each run makes my tests take longer than 4 minutes to run. I am looking for a way of calling phantomjs with a blob path like tests/**/*.js, or even an array of the filenames, or something like that.
downvote count: 0

http://stackoverflow.com/a/25948812
score: 2
has comment: http://stackoverflow.com/comment/40624779
has comment: http://stackoverflow.com/comment/40624788
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25948725
upvote count: 2
has body: Your CSS changes the value of text in the span element not the input value of the text box. Technically speaking, your current code only changes the colour of the "innerHTML" of the span element not the "value" of the input element. Change .wrong{ color:red; } To #email{ color:red; } To get the desired behaviour...

http://stackoverflow.com/comment/62671868
has text: In a event listener on notification click, you get the full notification object and action with event.
type: Comment
comment on: http://stackoverflow.com/a/37566109
score: 0
type: AnswerComment

http://stackoverflow.com/q/26015452
has title: How to persist user data after refreshing the page?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40745549
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26016122
linked to: http://stackoverflow.com/q/12895754
accepted answer: http://stackoverflow.com/a/26015583
type: Question
has comment: http://stackoverflow.com/comment/40745545
has comment: http://stackoverflow.com/comment/40746349
answer count: 2
has body: I have couple of check boxes and input fields. When any of them are checked or any value entered to the input fields, I need to persist these data even after refreshing or URL location change.Can someone help me?
tagged with: javascript
has answer: http://stackoverflow.com/a/26015583
score: 0
tagged with: pug
possible better answer: http://stackoverflow.com/a/26016122

http://stackoverflow.com/q/25966348
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/968642
accepted answer: http://stackoverflow.com/a/25973754
has comment: http://stackoverflow.com/comment/40659024
has comment: http://stackoverflow.com/comment/40661729
has title: Manipulating Images in Javascript
has comment: http://stackoverflow.com/comment/40669883
has answer: http://stackoverflow.com/a/25973754
type: AnsweredQuestion
tagged with: image
type: Question
answer count: 1
has body: I am working on a project that requires me to create a javascript file for a webpage with 4 images and 4 check boxes. Each check box is linked to an image. When a check box is clicked, the image linked to it is supposed to do something. Image 1 is supposed to spin, image 2 is supposed to shrink and grow, image 3 will move up and down, and image 4 should skew left and right. All of these actions are supposed to continue until the check box is un-clicked. I think for me the hardest part is that we aren't allowed to edit the HTML or the CSS, we can only work with the Javacript file. I'm having trouble figuring out how to link the actions of the pictures to the check boxes (like making image 1 spin when the first check box is clicked). Right now, I'm primarily focused on the spinning image since I think if I can figure out how that one works, I should be able to figure out how to make the other 3 work as well. Can anyone point me in the right direction on how to make an image perform a particular action when a check box is clicked? Here is what I have in my Javascript file so far: &lt;script type = "text/javascript"&gt; function spinPic() { rotateAnimation("one",20); } &lt;/script&gt; Here is a jsfiddle I've made with the HTML, CSS, and what little is in my JS file. http://jsfiddle.net/k7bt0u17/
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40762710
type: AnswerComment
comment on: http://stackoverflow.com/a/26024239
score: 0
type: Comment
has text: I've updated my answer with a watch example and a short description. Same thing with `$scope.correct`, as long as you have three states: idle, incorrect and correct. You can pull if off with a boolean (but be careful, use `===` instead of `==` when checking because undefined is falsy) like: undefined, false and true. You're welcome! :)

http://stackoverflow.com/comment/40502535
has text: How can I inject the product id into the directive? I'm getting a 'productID is not defined' error.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25879834
type: Comment

http://stackoverflow.com/comment/40769530
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26014792
has text: My second thought is that I would approach this by first compiling the list of meds as a `RecordArray` (for example by using `this.store.find('medicine', <some-filter>)`. Then I would use `myPatient.set('meds', <RecordArrayFromAbove>)`. Then I would call `serialize()` on my `newPatient` object before saving it to see how Ember intends to serialize it. If you're not seeing the results there, keep using `console.log` until you can narrow down the specific place where something's not happening as you expect.
score: 0

http://stackoverflow.com/comment/109469720
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/25977514
type: Comment
has text: @OnlineCop Well, good thing if you used `\p{L}`, instead of maintaining a hardcoded list yourself, as there is now an uppercase `ẞ`. [Wikipedia](https://en.wikipedia.org/wiki/Capital_%C3%9F) has details.

http://stackoverflow.com/comment/40688592
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25983795
type: AnswerComment
has text: I think I would go with per session, I don't think I want to use cookies for this. so once the page is refreshed, it would be considered a new session I suppose?

http://stackoverflow.com/a/25967237
has body: You just need to scope what you labeled // all my other code here correctly. If you wrap it in a function: function schoolMealPush(school, meal) { // Really all your other code here } Then in your interior for loop just call that function for (var i = 0; i &lt; schoolArray.length; i++) { for (var j = 0; j &lt; mealArray.length; j++) { schoolMealPush(schoolArray[i], mealArray[j]); } } You should be in business. No need for promises..although promises could be used to know when all pushes are complete. Just return the promise created by testItemsQuery.each and store each returned promise in an array. Then using whatever promise lib you can do a .all var promiseArray = []; for (var i = 0; i &lt; schoolArray.length; i++) { for (var j = 0; j &lt; mealArray.length; j++) { promiseArray.push(schoolMealPush(schoolArray[i], mealArray[j])); } } bluebird.all(promiseArray) .spread( function(){ console.log('SendPush called for all values'); });
accepted answer of: http://stackoverflow.com/q/25964180
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25964180
type: Answer

http://stackoverflow.com/comment/40629531
has text: not working, I put it on both mousedown and mouseup and tried 'click' too
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25951898

http://stackoverflow.com/comment/40648447
score: 0
has text: What's a "comparison variable"? Where does `j` get a value?
comment on: http://stackoverflow.com/q/25962013
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40682153
comment on: http://stackoverflow.com/q/25980452
type: QuestionComment
type: Comment
has text: "Jeepers creepers" indeed! That's a painful way to create rows and assign styles and handlers.
score: 0

http://stackoverflow.com/q/26010043
linked to: http://stackoverflow.com/q/19761241
tagged with: javascript
has comment: http://stackoverflow.com/comment/40736102
has answer: http://stackoverflow.com/a/26010334
downvote count: 0
has answer: http://stackoverflow.com/a/26010493
favorite count: 0
type: UnansweredQuestion
has title: window.close() function in javascript
tagged with: http://stackoverflow.com/tag/html
has body: I have a problem with window.close() function. I have a simple HTML script: gmail google I want to open the above url's in different windows. Once the url's are loaded, the windows should close itself without any alerts. The below javascript code lets the url's open in different windows. But it closes only 'google.com' and the html webpage. The 'gmail' website remains open. var submit = document.getElementById("submit"); submit.onclick = function() { var getLinks = document.getElementsByClassName("one"); for(var i=0; i<=(getLinks.length-1); i++) { window.open(getLinks[i]); getLinks[i].onload = window.close(); } } What am I missing in this code. Any help would be appreciated. Note: the links are only for test.
answer count: 4
score: 1
has answer: http://stackoverflow.com/a/26010332
upvote count: 1
has comment: http://stackoverflow.com/comment/40735995
type: Question
has answer: http://stackoverflow.com/a/47879060

http://stackoverflow.com/comment/40764152
type: Comment
comment on: http://stackoverflow.com/a/26024313
has text: From within my User Controller
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40749301
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26016495
has text: i thought of doing it using localstorage in javascript

http://stackoverflow.com/a/25914833
has comment: http://stackoverflow.com/comment/40564163
type: Answer
answers question: http://stackoverflow.com/q/25914123
has body: Looks like I found a way! From FlashDevelop, create a new Haxe project (for JS). Then, add a reference to the library that you wish to compile, either by: Finding it in your Haxe install directory/haxe/lib/name_of_library/version_of_library. Or, simply by adding the library name in your project settings, under Libraries (as shown in the picture below). Third (most important step), add --macro include('your_library_root_packagename') in the Additional Compiler Options (replace with your library's top-level package name, obviously!) I believe that if you have a library consisting of many top-level packages, you would need to enumerate several of those --macro compiler options. In my case I just needed the one. Finally, CTRL+ENTER... wait for it to transcompile and Voila! You have a Library in Javascript format!
score: 0

http://stackoverflow.com/q/25922667
answer count: 1
downvote count: 0
favorite count: 0
has title: How can I tell whether ReactJS is in development mode from JavaScript?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25922668
has body: I'm writing a Mixin for ReactJS. I'd like it to do some validation, but only when ReactJS is being used in development mode. How can I determine from JavaScript whether ReactJS is in development or production mode?
type: Question
upvote count: 9
tagged with: javascript
has comment: http://stackoverflow.com/comment/40609342
score: 9
tagged with: reactjs
has comment: http://stackoverflow.com/comment/40609260
has answer: http://stackoverflow.com/a/25922668
linked to: http://stackoverflow.com/q/22118915

http://stackoverflow.com/a/26005824
answers question: http://stackoverflow.com/q/26005667
score: 0
type: Answer
has body: Your code is working fine. However there is a syntax error here: alert("failure); you are missing the closinh " . Change it to alert("failure"); You can check it here jsfiddle

http://stackoverflow.com/comment/40582279
score: 0
comment on: http://stackoverflow.com/q/25924001
type: QuestionComment
type: Comment
has text: If you're looking for somewhere to test things out, I suggest [plnkr.co](http://plnkr.co/edit/?p=catalogue). It doesn't include Ember.js (why not...), but it does allow you to use several other libraries/frameworks and emulates the "paged" format of a server directory.

http://stackoverflow.com/q/25966841
has comment: http://stackoverflow.com/comment/40661037
has answer: http://stackoverflow.com/a/26044181
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/18425201
favorite count: 0
has title: Change color in middle of circle
tagged with: shader
type: UnansweredQuestion
upvote count: 1
score: 1
has body: I'm new to WebGL and I'm trying to create a black ring in the middle of this green circle without making additional circles. I believe I can do this by making the normal of those triangles go the other way but I'm not sure exactly how to do this. My friend suggested changing the texture coordinates but I don't really understand how this would help. Can anyone shine some light on these ideas and possible intuition? _______HTML File__________ Oops ... your browser doesn't support the HTML5 canvas element _____Javascript File______ var gl; var points; window.onload = function init() { var canvas = document.getElementById( "gl-canvas" ); gl = WebGLUtils.setupWebGL( canvas ); if ( !gl ) { alert( "WebGL isn't available" ); } // The Vertices var pi = 3.14159; var x = 2*pi/100; var y = 2*pi/100; var r = 0.9; points = [ vec2(0.0, 0.0) ]; //establish origin //for loop to push points for(var i = 0; i < 100; i++){ points.push(vec2(r*Math.cos(x*i), r*Math.sin(y*i))); points.push(vec2(r*Math.cos(x*(i+1)), r*Math.sin(y*(i+1)))); } // // Configure WebGL // gl.viewport( 0, 0, canvas.width, canvas.height ); gl.clearColor( 0.3, 0.3, 0.3, 1.0 ); // Load shaders and initialize attribute buffers var program = initShaders( gl, "vertex-shader", "fragment-shader" ); gl.useProgram( program ); // Load the data into the GPU var bufferId = gl.createBuffer(); gl.bindBuffer( gl.ARRAY_BUFFER, bufferId ); gl.bufferData( gl.ARRAY_BUFFER, flatten(points), gl.STATIC_DRAW ); // Associate out shader variables with our data buffer var vPosition = gl.getAttribLocation( program, "vPosition" ); gl.vertexAttribPointer( vPosition, 2, gl.FLOAT, false, 0, 0 ); gl.enableVertexAttribArray( vPosition ); render(); }; function render() { gl.clear( gl.COLOR_BUFFER_BIT ); gl.drawArrays( gl.TRIANGLE_FAN, 0, points.length ); }
tagged with: webgl

http://stackoverflow.com/a/25878269
score: 13
has comment: http://stackoverflow.com/comment/40500039
has body: Try this article. The trick is to put your ad initializing and loading logic in window's onload event: &lt;script&gt; window.onload = function(){ ... }; &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25877461
has comment: http://stackoverflow.com/comment/46908258
has comment: http://stackoverflow.com/comment/99046936
has comment: http://stackoverflow.com/comment/46883504
upvote count: 14
answers question: http://stackoverflow.com/q/25877461
has comment: http://stackoverflow.com/comment/40498750
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/46892085
type: Answer

http://stackoverflow.com/q/25915563
has body: to help teach myself PHP I've tasked myself with updating old mysql_* code with PDO. This has been going great, and as I've been learning I've been able to greatly reduce the amount of code. However my research has ran into a brick wall in a particular area. Currently, we have it so projects are recorded in a list view, with a set of 'actions/options' for each project. Each of these actions links to a PHP file which runs a small amount of code then sends you back to the list view. Here is an example: function projectComplete(id) { location.href = "complete.php?id=" + id; } &lt;button type="button" class="projectComplete" onclick="projectComplete('&lt;?= htmlentities($row['projectid']); ?&gt;')"&gt;&lt;/button&gt; The complete.php file simply contains an SQL update query that sets a column in the record a completed state of '1'. I originally wanted to ask the question 'what is the best practice for handling this type of interaction' however that may attract opinion based answers which I read is not allowed here. Instead I will phrase it like this: Is there a way of having all of these 'actions' run in the same page? (ideally able to use buttons rather than forms, due to difficulty in layout styling of forms) I know that if it used forms, I could simply name each form's submit button differently then run an if statement (the only issue would be passing the id, but I'm sure I could figure that out e.g. if (isset($_POST['exampleAction'])) { Run the code.. } Any links to guides/tutorials/similar questions etc would be very much appreciated. As previously stated, I'm self-learning PHP - I know very few 'best practices' and would like to learn more.
tagged with: php
tagged with: pdo
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40565693
score: 1
has comment: http://stackoverflow.com/comment/40565857
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25916291
tagged with: javascript
has comment: http://stackoverflow.com/comment/40567238
has comment: http://stackoverflow.com/comment/40566873
accepted answer: http://stackoverflow.com/a/25916291
answer count: 1
downvote count: 0
favorite count: 0
has title: Using PHP/JS to perform actions

http://stackoverflow.com/comment/40580097
type: QuestionComment
has text: I want to check if an user entry with that ip is existing and save true of false into a variable wether it is existing or not. I don't got it to work,so i tryed to save the whole ip. Is there any way of doing this.
score: 0
comment on: http://stackoverflow.com/q/25922903
type: Comment

http://stackoverflow.com/q/26034049
score: 0
has comment: http://stackoverflow.com/comment/40781602
has comment: http://stackoverflow.com/comment/40780949
has comment: http://stackoverflow.com/comment/40784120
accepted answer: http://stackoverflow.com/a/26036645
has comment: http://stackoverflow.com/comment/40783883
linked to: http://stackoverflow.com/q/9479046
has comment: http://stackoverflow.com/comment/40786886
has comment: http://stackoverflow.com/comment/40781342
has title: How to Convert JSON to a Class (named object) of Programmatically-Defined Type in the Node.js Environment
has comment: http://stackoverflow.com/comment/40780869
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40781249
has comment: http://stackoverflow.com/comment/40789261
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40780427
has answer: http://stackoverflow.com/a/26036645
has comment: http://stackoverflow.com/comment/40784248
type: Question
has comment: http://stackoverflow.com/comment/40784435
answer count: 2
has answer: http://stackoverflow.com/a/26040646
has comment: http://stackoverflow.com/comment/40781007
has comment: http://stackoverflow.com/comment/40779979
has comment: http://stackoverflow.com/comment/40780457
has comment: http://stackoverflow.com/comment/40783668
has comment: http://stackoverflow.com/comment/40781088
linked to: http://stackoverflow.com/q/8783327
has comment: http://stackoverflow.com/comment/40790021
has comment: http://stackoverflow.com/comment/40780918
has body: I have seen examples of how to do this that rely heavily on the browser environment but not examples that work in the native node.js environment. I need to cast JSON objects to javascript classes of a type that does not yet exist but is given by an input string. I found some nice code on stackoverflow to retype JSON to known class but I have not figured out how to do this when the class type is a string and the class does not exist. In software terms I need to: var className = 'Bar'; console.log(global[className]); // false - class Bar is not defined var jsonIn = '{ "name": "Jason" }'; var retypedJson = retypeJSON(jsonIn, className); console.log(retypedJson instanceof Bar) // true The code for recasting JSON. (Nice as it doesn't call eval or explicitly copy property names.) // define a class var Foo = function(name) { this.name = name; } // make a method Foo.prototype.shout = function() { console.log("I am " + this.name); } // make a simple object from JSON: var x = JSON.parse('{ "name": "Jason" }'); // force its class to be Foo x.__proto__ = Foo.prototype; // the method works x.shout(); console.log(x instanceof Foo); // true Thanks!
has comment: http://stackoverflow.com/comment/40780346
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26040646

http://stackoverflow.com/a/26003873
has comment: http://stackoverflow.com/comment/40725464
score: 0
has comment: http://stackoverflow.com/comment/40725220
answers question: http://stackoverflow.com/q/26003733
type: Answer
has comment: http://stackoverflow.com/comment/40735723
has comment: http://stackoverflow.com/comment/40724968
has comment: http://stackoverflow.com/comment/40727125
has comment: http://stackoverflow.com/comment/40725124
has body: var radio1 = document.getElementByName("0").value; if (answers[0] == radio1) { Probably your error is in this line of code, the id="0" is a div and you are trying to get the value of it, this might result into undefined and the value answer[0] is 1, thus 1 is not equal to radio1, thus it is always getting into the else block.
has comment: http://stackoverflow.com/comment/40725351
has comment: http://stackoverflow.com/comment/40725071
has comment: http://stackoverflow.com/comment/40725186

http://stackoverflow.com/a/25940195
accepted answer of: http://stackoverflow.com/q/25940160
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40610644
has comment: http://stackoverflow.com/comment/40610658
type: Answer
score: 7
has body: It's because you're returning the textNode to element when you should be appending newLI var newLI = document.createElement('li'); newLI.appendChild(document.createTextNode(task)); taskList.appendChild(newLI); FIDDLE
upvote count: 7
answers question: http://stackoverflow.com/q/25940160

http://stackoverflow.com/comment/40703833
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25992078
type: Comment
has text: As 'V2Solutions''s answer there seems to be a bug in IE. Any suggestions other suggestons to have a custom browse button?

http://stackoverflow.com/a/37133518
has body: .cont_edit { outline: 1px solid transparent; }
has comment: http://stackoverflow.com/comment/139116457
has comment: http://stackoverflow.com/comment/61809714
has comment: http://stackoverflow.com/comment/81022746
downvote count: 0
answers question: http://stackoverflow.com/q/25897883
score: 8
upvote count: 8
type: Answer

http://stackoverflow.com/q/25899536
has title: how to set fieldnames in high chart?
has comment: http://stackoverflow.com/comment/40544953
tagged with: javascript
has body: I am a newbie in highcharts. I have used Kendo UI charts before. In Kendo, we can tell the fieldname which we want to plot in the chart as below: series: [{ name: "steps", field: "steps", categoryField: "createddate" }] and we can tell the dataSource as below: dataSource: dSource where dSource is an AJAX URL. I didnt find anywhere in the tutorial something like this. My JSON file is below: [{"ActivitySummaryKey":174000, "id":"kkse2", "activityscore":-, "activitycalories":456, "caloriesBMR":1017, "caloriesOut":1412, "distances":1.57828236, "elevation":0, "fairlyActiveminutes":34, "floors":0, "lightlyActiveMinutes":28, "marginalCalories":334, "sedentaryMinutes":827, "steps":5077, "veryActiveMinutes":26, "trackersteps":0, "trackerdistances":0, "trackerfloors":0, "trackerelevation":0, "trackerActivityCalories":0, "trackerCaloriesOut":0, "trackerMinutesSedentary":0, "trackerminutesLightlyActive":0, "trackerminutesFairlyActive":0, "trackerminutesVeryActive":0, "createddate":"9/17/2014 12:00:00 AM", "distanceunit":"Miles" }] I want to plot steps on y axis and createddate on x axis. How to go about with it?
score: 0
answer count: 1
tagged with: highcharts
has answer: http://stackoverflow.com/a/25913678
accepted answer: http://stackoverflow.com/a/25913678
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/25895932
type: Answer
has body: This is defined in EcmaScript 5.1 Section 15.2.4.2 - Object.prototype.toString(): When the toString method is called, the following steps are taken: If the this value is undefined, return "[object Undefined]". If the this value is null, return "[object Null]". Let O be the result of calling ToObject passing the this value as the argument. Let class be the value of the Class internal property of O. Return the String value that is the result of concatenating the three Strings "[object ", class, and "]". EcmaScript 5 defined it differently: When the toString method is called, the following steps are taken: Let O be the result of calling ToObject passing the this value as the argument. Let class be the value of the Class internal property of O. Return the String value that is the result of concatenating the three Strings "[object ", class, and "]".
answers question: http://stackoverflow.com/q/25895756
score: 5
upvote count: 5
downvote count: 0

http://stackoverflow.com/comment/40769179
has text: Our UI/UX guy has claimed that he has also had success by using a timeout around the c3.generate() call. He is using 100, but he says a value as low as zero (??!!) will work.
type: Comment
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/26026849

http://stackoverflow.com/q/26008243
has comment: http://stackoverflow.com/comment/40733839
possible better answer: http://stackoverflow.com/a/26009026
has answer: http://stackoverflow.com/a/26009026
has body: I'm using JavaScript only, without jQuery. vs document.addEventListener('click', function () { //code here });
accepted answer: http://stackoverflow.com/a/26008770
upvote count: 9
has title: Is it more efficient to use addEventListener, or onclick for performance?
has comment: http://stackoverflow.com/comment/40732951
has comment: http://stackoverflow.com/comment/40733066
tagged with: javascript
answer count: 2
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26008770
score: 9
type: Question
linked to: http://stackoverflow.com/q/6348494

http://stackoverflow.com/comment/40716365
comment on: http://stackoverflow.com/a/25999123
type: Comment
score: 0
has text: Yeah, Thank you @Spencer Wieczorek... you're right, I thought some times it may give error in Chrome like "Max call size exceeded" if we call this in multiple places fn2(fn1())
type: AnswerComment

http://stackoverflow.com/q/25933160
has answer: http://stackoverflow.com/a/25991279
upvote count: 2
tagged with: innerhtml
type: UnansweredQuestion
has body: I have this following code nver+="&lt;SPAN CLASS=focusField&gt;"+text.substring(start,end)+"&lt;/SPAN&gt;"; if(text.length&gt;end) nver+=text.substring(end,text.length); results.innerHTML=nver.replace(/[\n]/g,"&lt;BR&gt;"); so the text variable is tampered with textarea:ABCD"&gt; &lt; img/src='x'onerror=alert('XSS')&gt; First text.substring(start,end) has output 'textarea' and text.substring(end,text.length) has the remaining :ABCD"&gt;&lt; img/src='x'onerror=alert('XSS')&gt; How to counter this XSS? Is there some way I can use createtextnode or some functionality to counter this? If so how do I do it using createtextnode?
has title: Preventing XSS in innerHTML attribute
score: 2
linked to: http://stackoverflow.com/q/5440607
tagged with: dom
type: Question
tagged with: javascript
tagged with: xss
tagged with: security
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/123463448

http://stackoverflow.com/q/26000800
answer count: 1
has comment: http://stackoverflow.com/comment/40719462
has comment: http://stackoverflow.com/comment/40720329
has comment: http://stackoverflow.com/comment/40719583
tagged with: lightbox2
has body: I'm trying to make an image gallery on my site so that I can put screenshots onto blog articles where they will be relevant. After spending several hours working on a custom jquery solution using my own code and getting no help whatsoever from anywhere on the net, I caved and decided to use lightbox. I followed the instructions to set it up on this page however, it still does nothing. Essentially all I've done is put a link to the image on my page... Here's my code as rendered on the page (url below): <!--[if lte IE9]> <![endif]--> Screenshots Image #1 URL http://loganyoung.za.net/error-reporting-in-mvc/ If anyone can tell me what I did wrong, I'd greatly appreciate it.
has comment: http://stackoverflow.com/comment/40719460
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26393519
has comment: http://stackoverflow.com/comment/40761377
accepted answer: http://stackoverflow.com/a/26393519
type: Question
has comment: http://stackoverflow.com/comment/40719376
has title: Everyone recommended lightbox... it still doesn't do what it apparently should
has comment: http://stackoverflow.com/comment/40719529
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40721419
has comment: http://stackoverflow.com/comment/40719855

http://stackoverflow.com/comment/40569735
type: Comment
type: QuestionComment
has text: Can you post some sample code?
score: 0
comment on: http://stackoverflow.com/q/25882276

http://stackoverflow.com/comment/40677721
score: 0
type: Comment
has text: Thank you. It works! Just one question: if I want to know the variable, I have to use 'repl' first, right? However, I find a strange phenomenon: I can get the definition of http (in a different way, much less detailed). How is it this way?
type: AnswerComment
comment on: http://stackoverflow.com/a/25926523

http://stackoverflow.com/q/26005701
accepted answer: http://stackoverflow.com/a/26005729
has title: How can I rebind .click() functions after .load()?
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26005768
type: Question
possible better answer: http://stackoverflow.com/a/26005768
has answer: http://stackoverflow.com/a/26005729
answer count: 2
upvote count: 1
tagged with: javascript
has body: $('a').click(function() { _link = $(this).attr('href'); loadContent(_link); return false; }); function loadContent(href){ $('#content').load(href + ' #content &gt; *) } I have all &lt;a&gt; binded with a .click() that will only change the contents of #content. However, new &lt;a&gt; from the new #content arent working with the previous .click() function. How can I rebind it? Adding the function again after the .load() seems to work function loadContent(href){ $('#content').load(href + ' #content &gt; *); $('a').click(function() { _link = $(this).attr('href'); loadContent(_link); return false; }); } But would this mess up the `s' that were already binded and cause it to run it on a loop?
tagged with: jquery

http://stackoverflow.com/comment/40529149
type: AnswerComment
comment on: http://stackoverflow.com/a/25884667
type: Comment
has text: @Kenneth : It does exist but is a subset of the `helpers` API option. I updated my answer with the correct code and the jsfiddle reference. Thanks
score: 0

http://stackoverflow.com/a/28788231
has body: Here is a working version of what you are trying to do, save the code block as a html file an open it up in your web browser (only tested in ie11). Note you can't call the initializeViz function until after the place holder is loaded. Also you need to ensure your global variables viz, workbook, activeSheet are global. (http://onlinehelp.tableau.com/samples/en-us/js_api/tutorial.js) Tableau 8 Javascrip API Europe Middle East The Americas Oceania Asia Africa
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25901452
upvote count: 1
type: Answer

http://stackoverflow.com/comment/40762999
type: Comment
type: QuestionComment
has text: @geocodezip, thank you for reply. Yes, I should try. I didn't find how to do it with `path`. I'll try to do it in some vector editor which can work with SVG path.
score: 0
comment on: http://stackoverflow.com/q/26024374

http://stackoverflow.com/a/25946045
downvote count: 0
type: Answer
upvote count: 3
score: 3
has body: It's true that the files are joined together into one big file sent to the client, but the code in each file is put into a function directly called: Your file1.js: alert("This is file 1.") Your file2.js: alert("This is file 2.") What is sent to the client: (function(){ alert("This is file 1.") })() (function(){ alert("This is file 2.") })() So local variables in the files wont effect each other, since they're local to the functions.
answers question: http://stackoverflow.com/q/25945720

http://stackoverflow.com/comment/40665093
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/syctdh46/8/
comment on: http://stackoverflow.com/q/25971141
score: 0

http://stackoverflow.com/comment/40529181
comment on: http://stackoverflow.com/q/25895489
score: 0
type: Comment
has text: the problem is div element is from third party. I use mylivechat to show widget div, and i want to force add some elemet in it widget div
type: QuestionComment

http://stackoverflow.com/a/25898914
score: 0
answers question: http://stackoverflow.com/q/25898739
has body: Try the following pattern, each number field has its own capturing group leaving the - characters out. /^(?:(\d{2})\-)?(\d{3})\-(\d{4})\-(\d{3})$/ Eg: match[0] -&gt; xx match[1] -&gt; xxx match[2] -&gt; xxxxx match[3] -&gt; xxx
type: Answer

http://stackoverflow.com/a/25892439
answers question: http://stackoverflow.com/q/25892394
score: 0
type: Answer
has body: Check out the Tampermonkey Extension

http://stackoverflow.com/comment/40557739
comment on: http://stackoverflow.com/q/25911406
has text: You can simply replace all `&` with `&amp;` before processing it. Otherwise use `serialize()`, or a data object with named properties, instead of concatenating strings (which is error prone anyway).
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25988903
has body: Try this: $('#id_inputPassword').on('keydown',function(e){ e.stopPropagation(); if (e.keyCode == 13) { $('#formLogin').submit(); } }); Since you have problems with multiple fires of the event I added the e.stopPropagation, so no more times the event will be fire.
score: 0
has comment: http://stackoverflow.com/comment/40698394
has comment: http://stackoverflow.com/comment/40699419
has comment: http://stackoverflow.com/comment/40698525
has comment: http://stackoverflow.com/comment/40699211
type: Answer
answers question: http://stackoverflow.com/q/25988860
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/40564320
score: 1
comment on: http://stackoverflow.com/q/25914723
type: Comment
type: QuestionComment
has text: Take given date's day, create a new date, subtract the days, there is your start. Add 7 days to get the end.

http://stackoverflow.com/q/26016612
linked to: http://stackoverflow.com/q/1752768
type: Question
has comment: http://stackoverflow.com/comment/40747905
accepted answer: http://stackoverflow.com/a/26016746
has body: On my page I am using HTML5 to upload a file on my browser. The file is a PDF an have to show it in a &lt;input type="text"/&gt; This is my code: var files = evt.target.files; // FileList object // files is a FileList of File objects. List some properties. for (var i = 0, f; f = files[i]; i++) { console.log(f.name); console.log(f.type); console.log(f.size); //Update document info $("#document_filename").find("input").val(f.name); $("#document_mimetype").find("input").val(f.type); var reader = new FileReader(); // Closure to capture the file information. reader.onloadend = (function(theFile) { return function(e) { content = e.target.result.replace(/^data:[^;]*;base64,/, ""); console.log(content.length); $("#document_content").find("input").val(content); a = document.getElementById("document_content").getElementsByTagName("input")[0]; a.value = content; console.log(a.value.length); }; })(f); // Read in the image file as a data URL. reader.readAsDataURL(f); } When I upload a big file 1.5MB, my console is showing: contrat.pdf // The file name application/pdf // The file type 1510788 // The file size 2014384 // The length of the b64 content 524288 // The length of string once inserted in the input box?? Can someone explain to me what I am doing wrong to get this data truncated? Thanks,
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/26016746
answer count: 1
has comment: http://stackoverflow.com/comment/40747773
has title: html value is truncating my string
favorite count: 0
has comment: http://stackoverflow.com/comment/40747666
tagged with: truncate
tagged with: http://stackoverflow.com/tag/html
tagged with: input
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/25888095
score: -2
has body: I have a HTML like this : """&lt;input type="submit" id="continue" value="CRA" name="continue" class="keyboard-enabled" tabindex="7"&gt; &lt;a href="#" id="r1A" role="button" tabindex="-1"&gt; &lt;input type="button" id="r1B" value="Back" role="option" aria-pressed="false" class="keyboard-enabled" tabindex="6"&gt; &lt;/a&gt;""" I want to move my first input down to &lt;a using jquery replace or something like this in JS. How to achieve this ? Expected output : &lt;a href="#" id="r1A" role="button" tabindex="-1"&gt; &lt;input type="button" id="r1B" value="Back" role="option" aria-pressed="false" class="keyboard-enabled" tabindex="6"&gt; &lt;/a&gt; &lt;input type="submit" id="continue" value="CRA" name="continue" class="keyboard-enabled" tabindex="7"&gt;
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25888179
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has title: Realign HTML using javascript
has answer: http://stackoverflow.com/a/25888179
type: AnsweredQuestion
downvote count: 2
type: Question

http://stackoverflow.com/q/25930547
type: Question
has body: I'm trying to calculate the average temperature of one week, but I do not quite know how I would do this. I've tried out some things but the end result would be either 'NaN' or 'Infinity'. Definitely doing something wrong here.. Here's the code I need to work with: var temperatures; temperatures = new Array(); temperatures["monday"] = 23.5; temperatures["tuesday"] = 22.3; temperatures["wednesday"] = 28.5; temperatures["thursday"] = 23.5; temperatures["friday"] = 22.3; temperatures["saturday"] = 28.5; temperatures["sunday"] = 29.5; I got it working when the arrays were like [0], [1] instead of Strings containing the days, but I don't know how to do it like above. Also if you have any suggestions please try to keep the code basic as surprisingly enough 'advanced code' isn't too appreciated in my class for some reason. Thanks for reading.
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25930701
tagged with: arrays
has answer: http://stackoverflow.com/a/25930696
favorite count: 0
has comment: http://stackoverflow.com/comment/40593103
possible better answer: http://stackoverflow.com/a/25930661
has answer: http://stackoverflow.com/a/25930661
answer count: 4
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/40593057
has answer: http://stackoverflow.com/a/25930754
accepted answer: http://stackoverflow.com/a/25930696
downvote count: 3
linked to: http://stackoverflow.com/q/10359907
has title: Calculating the average of object properties in array
has comment: http://stackoverflow.com/comment/40593173
tagged with: average

http://stackoverflow.com/a/26001343
score: 1
answers question: http://stackoverflow.com/q/25992407
upvote count: 1
has comment: http://stackoverflow.com/comment/40752447
has body: The reason you are seeing the User's input is because you are using the CreateSearchChoice option, which allows for users to create their own tags via their input if you want to remove that, remove the createSearchChoice I currently use the createSearchChoice , but i append the text "(New Tag)" on the end so users can see the difference, see code below: createSearchChoice: function (term, data) { if ($(data).filter(function () { return this.text.localeCompare(term) === 0; }).length === 0) { // call $.post() to add this term to the server, receive back id // return {id:id, text:term} // or detect this shiftiness and do it below in the on-change return { id: -1+'/'+term, text: $.trim(term) + ' (new tag)' , isNew: true }; },
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40721630
downvote count: 0
has comment: http://stackoverflow.com/comment/40759152
type: Answer
has comment: http://stackoverflow.com/comment/40721899
accepted answer of: http://stackoverflow.com/q/25992407

http://stackoverflow.com/q/26030759
accepted answer: http://stackoverflow.com/a/26030856
favorite count: 0
possible better answer: http://stackoverflow.com/a/26030842
duplicate of: http://stackoverflow.com/q/1078118
has title: Iterate through dictionaries in javascript and access values?
has answer: http://stackoverflow.com/a/26030856
type: AnsweredQuestion
downvote count: 0
has body: I am not a javascript expert, so I am sure what I am trying to do is pretty straight forward, but, here it is: I have an array that comes down from a database, it looks like this: [{"name":"aName","lastName":"aLastname"},{"name":"bName","lastName":"bLastname"}] I want to iterate through all dictionaries found in the array and access the aName, aLastname etc... so all possible values found in each dictionary, a dictionary at the time. I tried using eval(), I tried to use JSON.parse, but JSON.parse I think was complaining because I think the object was already coming down as JSON. How can I do that in javascript? Thanks So then I tried to do what was suggested by the "duplicate" answer comment... I did this: for(var i=0; i&lt;array.length; i++) { var obj = array[i]; for(var key in obj) { var value = obj[key]; console.log(key+" = "+value); } } Problem is that the log is out of order. I get this: name = aName name = bName lastName = aLastName lastName = bLastName I want to be sure I iterate through the properties and values in order one dictionary at the time. What am missing here?
has answer: http://stackoverflow.com/a/26030842
type: Question
score: 3
linked to: http://stackoverflow.com/q/1078118
has comment: http://stackoverflow.com/comment/40773997
has comment: http://stackoverflow.com/comment/40774016
tagged with: javascript
upvote count: 3
answer count: 2

http://stackoverflow.com/comment/40634371
type: Comment
has text: @StephanMuller I am relatively new with jQuery so I"m trying to learn as much as I can. Right now I'm adjusting a few things, adding a footer, and then I might be done with this project. It has been a great learning experience so far!
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25951250

http://stackoverflow.com/comment/40560661
has text: @AlexInTime Ask another question about your current issue. You'll get a better solution, comments are meant to add suggestions or discuss some issue with a question or answer
type: Comment
comment on: http://stackoverflow.com/a/25887085
score: 0
type: AnswerComment

http://stackoverflow.com/q/25979044
has body: I have a concept of what I’d like to do, but need help putting the pieces together. I am playing around with html2canvas for a feedback form. Its works well for me but my Flickr (cross domain) photograph images don’t work. I am wondering instead of creating an entire proxy server cant I just convert the images to base64 on the client side? Then once converted just do a replace of the “data-image” src with the base64 string? Html &lt;div class='container1'&gt; &lt;div class='box photo col3'&gt; &lt;a data-image='http://farm4.static.flickr.com/3737/1530282_3bc6b9.jpg' data-toggle='lightbox' href='http://www.flickr.com/photos/1773075@N04' target='_blank'&gt;&lt;/a&gt;&lt;/div&gt; ….. &lt;/div&gt; JS (source:SO) function convertImgToBase64(url, callback, outputFormat){ var canvas = document.createElement('CANVAS'), ctx = canvas.getContext('2d'), img = new Image; img.crossOrigin = 'Anonymous'; img.onload = function(){ var dataURL; canvas.height = img.height; canvas.width = img.width; ctx.drawImage(img, 0, 0); dataURL = canvas.toDataURL(outputFormat); callback.call(this, dataURL); canvas = null; }; img.src = url; } Putting it together: Here is where I have the issues. What I am trying to do is a for each data-image in div class container1, replace the src image with a base64 string so its included in my canvas. $( "data-image" ).each( function( index, element ){ convertImgToBase64($( this ).text(), function(base64Img){ replace $(this).attr(‘data-image’) with base64 string }); });
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
upvote count: 2
downvote count: 0
answer count: 1
has title: JQuery replace image with Base64 (html2canvas no proxy)
favorite count: 0
linked to: http://stackoverflow.com/q/6150289
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25979495
type: Question
has answer: http://stackoverflow.com/a/25979495

http://stackoverflow.com/comment/40744552
comment on: http://stackoverflow.com/q/26006062
score: 0
type: Comment
has text: I get the expected result with your fiddle. Did you try also handling the case where `second` is `0` ?
type: QuestionComment

http://stackoverflow.com/a/25884889
answers question: http://stackoverflow.com/q/25884761
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40510213
type: Answer
has comment: http://stackoverflow.com/comment/40510391
downvote count: 0
has body: Unless you have some question which you failed to write, there is nothing wrong with your function or arguments and it's working as it should! See the DEMO here Code quality can be the point of discussion here, as instead of doing contacts = [bob, mary]; you can use contacts.push(bob); contacts.push(mary); So when you need to add another contact it'll be easier this way, what you have done is more static. Also to print all the persons, you can use the loop inside printPerson instead of calling it twice: function printPerson(){ for(var i=0; i&lt;contacts.length; i++) { console.log(contacts[i].firstName + " " + contacts[i].lastName); } In order to pass the test, you will have to do this according to their instructions: function printPerson(person){ console.log( person.firstName + " " + person.lastName ); } printPerson(contacts[0]); printPerson(contacts[1]); They asked you to pass the person object in the function whereas you were passing the index.
score: 1
accepted answer of: http://stackoverflow.com/q/25884761
has comment: http://stackoverflow.com/comment/40510410

http://stackoverflow.com/comment/40665024
has text: You can try, if it's a live sample.
type: Comment
comment on: http://stackoverflow.com/a/25970311
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40517678
type: Comment
comment on: http://stackoverflow.com/q/25889270
type: QuestionComment
score: 0
has text: yes @ChakravarthySM am I missing something?? complete code?

http://stackoverflow.com/comment/40707247
has text: sorry, I editted code. exactly, I pass the argument.
comment on: http://stackoverflow.com/q/25994547
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40517684
score: 0
type: Comment
type: QuestionComment
has text: To me it looks like it's not an array. `contact.first_name` should work fine
comment on: http://stackoverflow.com/q/25889194

http://stackoverflow.com/a/25934972
has body: Instead of setting the length of a jQuery element selection, just set the radio button to be checked manually like this: describe('when the radio is selected', function() { beforeEach(function() { $('#payment_cc').attr('checked', true); }); it('should do something', function() { // Assert that the submission went the way you wanted it to }); });
score: 0
answers question: http://stackoverflow.com/q/25917838
has comment: http://stackoverflow.com/comment/40601317
type: Answer
has comment: http://stackoverflow.com/comment/40609150

http://stackoverflow.com/a/26290176
type: AcceptedAnswer
has body: An easy and practical solution would be to specify your data object beforehand so that it is accessible within the scope of your drawRect() call: var rectData = { w: 300 }; $('canvas').drawRect({ layer: true, data: rectData, fillStyle: '#585', x: 100, y: 100, width: rectData.w, height: 50 });
accepted answer of: http://stackoverflow.com/q/25956436
type: Answer
answers question: http://stackoverflow.com/q/25956436
score: 0

http://stackoverflow.com/comment/40748513
score: 0
comment on: http://stackoverflow.com/q/26016858
type: Comment
type: QuestionComment
has text: @Tariq Yes. If i have no form action then the distance value appears in the text box when i click my submit button.

http://stackoverflow.com/comment/40689210
type: Comment
has text: There could be a lot of reason my friend why he needs to server roundtrip. In the first place he used **java** that goes to say he really needs to call serverlets in the first place
type: AnswerComment
comment on: http://stackoverflow.com/a/25983911
score: 0

http://stackoverflow.com/q/25972657
tagged with: jquery
has answer: http://stackoverflow.com/a/25972941
linked to: http://stackoverflow.com/q/1546981
favorite count: 0
accepted answer: http://stackoverflow.com/a/25972941
has body: Using the jquery cookie plugin I have a very simple function as so : demoPopupInit: function() { // alert($.cookie('modal-popup')); if (! $.cookie('modal-popup')) { $.cookie('modal-popup',1) ; } if ( $.cookie('modal-popup') &lt;= 3 ) { // return; var modal_cookie = $.cookie('modal-popup') ; modal_cookie = modal_cookie++; $("#intro_index").modal({backdrop:true}); $.cookie('modal-popup', modal_cookie ); } }, } I am sure it is a very simple mistake, but my poor JS skills do not allow me to understand why the alert() in the begining always turn 1.. I also tried if (! $.cookie('modal-popup') == NULL) { $.cookie('modal-popup',1) ; But of course ,the problem is not there , and no other error reported in console. My aim is to turn the modal pop-up on only on 3 first visits .
upvote count: 1
has title: Jquery cookie always return 1
type: AnsweredQuestion
tagged with: cookies
score: 1
possible better answer: http://stackoverflow.com/a/25972856
has answer: http://stackoverflow.com/a/25972856
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40728308
score: 1
comment on: http://stackoverflow.com/q/26005594
has text: You don't have a function named `myFunction`. Change `myFunction` to `class`, or change `class` to `myFunction`.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42243009
has text: I have no luck to achieve this. But i am working on a POC and if it succeeded i will share it. Anyway http://www.simoahava.com/ is have great articles about GTM
comment on: http://stackoverflow.com/q/25892634
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25929486
type: Question
score: 5
has comment: http://stackoverflow.com/comment/40591705
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25929661
accepted answer: http://stackoverflow.com/a/25929661
has title: Internet explorer oninput function not working
has comment: http://stackoverflow.com/comment/40591384
upvote count: 5
downvote count: 0
type: AnsweredQuestion
tagged with: internet-explorer
has body: I have a problem with IE. I created form with calculation in JS it use input type range. here is a link to jsfiddle: http://jsfiddle.net/vu378xh9/8/ And html code: Persons 10 Sale per person 21 Javascript: function chckIncome() { var price = 49.9; var regular = 199.9; var form = document.forms.checkincome; var x = parseFloat(form.persons.value); var y = parseFloat(form.starters.value); var z = 2.5; var sum1 = (x * y) * price; var sum2 = ((x * y) * z) * regular; var sum3 = ((sum1 + sum2) * 0.25).toFixed(0); sum3 = sum3.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "); document.getElementById('personsvalue').innerHTML = form.persons.value; document.getElementById('startersvalue').innerHTML = form.starters.value; document.getElementById('resultsvalue').innerHTML = sum3 + " kr"; } It works in all browsers except IE. Can someone have idea how to fix it?

http://stackoverflow.com/q/26012963
has answer: http://stackoverflow.com/a/26013052
has comment: http://stackoverflow.com/comment/40741237
has answer: http://stackoverflow.com/a/26013081
type: Question
has comment: http://stackoverflow.com/comment/40741217
tagged with: arrays
tagged with: javascript
tagged with: sorting
has title: Using search method from string
score: 0
has comment: http://stackoverflow.com/comment/40741193
has answer: http://stackoverflow.com/a/26013044
answer count: 5
type: UnansweredQuestion
has body: I'm trying to count the number of times certain words appear in the strings. Every time I run it I get a uncaught TypeErro: undefined is not a function I just actually need to count the number of times each "major" appears. Below is my code: for(var i = 0; i &lt; sortedarray.length; i++) { if(sortedarray.search("Multimedia") === true) { multimedia += 1; } } console.log(multimedia); Here is my csv file which is stored in a 1d array. "NAME","MAJOR","CLASS STANDING","ENROLLMENT STATUS" "Smith, John A","Computer Science","Senior","E" "Johnson, Brenda B","Computer Science","Senior","E" "Green, Daisy L","Information Technology","Senior","E" "Wilson, Don A","Information Technology","Junior","W" "Brown, Jack J","Multimedia","Senior","E" "Schultz, Doug A","Network Administration","Junior","E" "Webber, Justin","Business Administration","Senior","E" "Alexander, Debbie B","Multimedia","Senior","E" "St. John, Susan G","Information Technology","Junior","D" "Finklestein, Harold W","Multimedia","Freshman","E"
has answer: http://stackoverflow.com/a/26013135
has answer: http://stackoverflow.com/a/26013421
has comment: http://stackoverflow.com/comment/40741232

http://stackoverflow.com/q/25898822
tagged with: document.write
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25899030
tagged with: http-redirect
has body: Basically im trying to make a dynamic variable saved in local storage to be used as a redirect URL. &lt;meta http-equiv="refresh" content="0; url=&lt;script type="text/javascript"&gt; document.write('webpage')&lt;/script&gt;" /&gt; &lt;script type="text/javascript"&gt; function urlsave(){ localStorage.setItem('webpage','http://example.com/'); } /&lt;script&gt; So in theory it would send you to whatever URL is stored in the 'webpage' variable, this case being http://example.com/. This is the idea anyway. Im still fairly new to programing, but am curius if this would work. And if not, how would i MAKE it work? Thanks.
has title: HTML5 and a dynamic local storage url?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25899030
type: Question
answer count: 1
tagged with: url
tagged with: javascript

http://stackoverflow.com/a/25963253
upvote count: 1
has comment: http://stackoverflow.com/comment/40651037
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40650854
has body: As error say nick is treated as undefined variable. It should be seen as string so you need to add quotes: onclick="prof(\'' . addslashes($profuser) . '\')" According to @p.s.w.g, you should use addslashes() to escape quotes from php variable in case there were any;)
answers question: http://stackoverflow.com/q/25963125
has comment: http://stackoverflow.com/comment/40650886
type: Answer
accepted answer of: http://stackoverflow.com/q/25963125

http://stackoverflow.com/a/26032958
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/79718688
has comment: http://stackoverflow.com/comment/79632625
has body: In the code, this refers to the link clicked. this.hash refers to hash of the link. Here's further breakdown of the code: $(function() { // Binding an event handler to all anchors that contain // a hash (#), but not necessarily JUST a hash - like href="#" // which is typically used in JS... $('a[href*=#]:not([href=#])').click(function() { // Two conditional checks // First: // location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') // What we're doing is replacing the first forward slash (/) in the pathname // for the current location and comparing it to the link that's been clicked. // So http://personalsite.com/test/link/src, which normally would have // a pathname of /test/link/src would be test/link/src // The or check (||) is to see if the link matches the current domain // location.hostname == this.hostname // Basically, we want an internal anchor for the page we're on. if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) { // Assigning the variable target, with the hash of the link that's been clicked // which is conveniently enough, a jquery selector for IDs (i.e. #hash) var target = $(this.hash); // We check the target length - basically, does the element exist? // If length equals to 0, we query the DOM by name attribute. Otherwise, we just re-assign target to self. target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); // The rest is self explanatory... (animation using the target's offset) // The return false prevents default behavior if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); }); Hopefully this helps!
answers question: http://stackoverflow.com/q/25987451
accepted answer of: http://stackoverflow.com/q/25987451
type: AcceptedAnswer
downvote count: 0
score: 8

linkedin-api
tags question: http://stackoverflow.com/q/25991863
tag name: linkedin-api
type: Tag

http://stackoverflow.com/a/26963205
downvote count: 0
type: Answer
score: 6
upvote count: 6
has body: I updated your fiddle here: The issue is the TIMEZONE. Amcharts appears to be taking the given time as UTC and converting back to your local time. In the fiddle I modified the first few data points to 2014-08-01T10:00:01 next to 8AM next to 7AM (I am in California) and voila! date appears as expected in the balloons.
answers question: http://stackoverflow.com/q/25893246

http://stackoverflow.com/q/26016935
tagged with: status
upvote count: 1
type: Question
has body: i want to create yammer status using php and javascript. this is my sample code for that- &lt;script type="text/javascript" data-app-id="client-id" src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"&gt;&lt;/script&gt; &lt;span id="yammer-login"&gt;&lt;/span&gt; &lt;script&gt; $(function(){ yam.connect.loginButton('#yammer-login', function (resp) { if (resp.authResponse) { yam.platform.request({ url: "messages.json", method: "POST", data: { "body" : "Message body", "group_id": "4728511", //group id "topic1": "TestTopic1", "og_url": "http://google.com" }, success: function (res) { //print message response information to the console alert("The request was successful."); console.dir(res); yam.platform.request({ url: "https://www.yammer.com/api/v1/search.json", method: "GET", data: { "search" : "TestTopic1" }, success: function (data) { //print message response information to the console alert("The request was successful."); console.dir(data); }, error: function (data) { alert("There was an error with the request."); console.log(data) } }); }, error: function (res) { alert("There was an error with the request."); console.dir(res); } }); } }); The status is updated on yammer but its showing error, also i did not get the topic id. so how can i correct it..?? thanks in advance
score: 1
has title: Yammer REST API for create status with topic and get back the topic Id
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40757131
tagged with: yammer
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26021746

http://stackoverflow.com/comment/67838203
type: Comment
comment on: http://stackoverflow.com/a/40287926
has text: Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26008777
type: AnsweredQuestion
downvote count: 1
type: Question
has title: Looking for more efficiency in Javascript
has answer: http://stackoverflow.com/a/26008973
upvote count: 0
tagged with: javascript
score: -1
answer count: 1
has body: I'm writing a web app/game that has a ton of clickable .png images that glow when you hover over them and change even further momentarily when clicked. The code I have currently does exactly what I want it to do, but I'm noticing that there are a lot of redundancies going out and getting elements by ID. I'm wondering if maybe someone with more javascript savvy than me knows of a better way to write this. Naturally, in the root folder there are 3 .png files for every "button", each representing the pic in different states...(i.e. inventorypic.png, inventorypicglow.png, and inventorypicdown.png would be the image files that get changed in and out of the DOM depending on the status of the "inventorypic" element.) function glowText(element) { var glowPicName = element.id + "glow.png"; element.src = glowPicName; } function normalText(element) { var normalPicName = element.id + ".png"; element.src = normalPicName; } function downText(element) { var downPicName = element.id + "down.png"; element.src = downPicName; } document.getElementById("inventorypic").addEventListener("mouseover", function(){glowText(this)}, false); document.getElementById("inventorypic").addEventListener("mouseout", function(){normalText(this)}, false); document.getElementById("inventorypic").addEventListener("mousedown", function(){downText(this)}, false); document.getElementById("inventorypic").addEventListener("mouseup", function(){glowText(this)}, false); document.getElementById("refinementpic").addEventListener("mouseover", function(){glowText(this)}, false); document.getElementById("refinementpic").addEventListener("mouseout", function(){normalText(this)}, false); document.getElementById("refinementpic").addEventListener("mousedown", function(){downText(this)}, false); document.getElementById("refinementpic").addEventListener("mouseup", function(){glowText(this)}, false); document.getElementById("propertiespic").addEventListener("mouseover", function(){glowText(this)}, false); document.getElemen…
has comment: http://stackoverflow.com/comment/40734025
favorite count: 0
accepted answer: http://stackoverflow.com/a/26008973

http://stackoverflow.com/a/25905032
score: 1
has body: The deals is an array where each element of the array is an object containing the fields for one deal, you should use a loop over data.deals[i] to access the data for the i-th deal.
upvote count: 1
answers question: http://stackoverflow.com/q/25904398
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25904398
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40729899
type: Comment
has text: Ok thanks. But i have audio data and use different sample and bit rates. can i add a prefix byte without creating a new array ?
score: 0
comment on: http://stackoverflow.com/a/26006464
type: AnswerComment

http://stackoverflow.com/q/25915549
has comment: http://stackoverflow.com/comment/40565550
has body: I've been working on a forum based system. With the help of jquery, php, bootstrap, and such I could develop a forum in which a user can post, delete, and edit. I've defined an edit button for the person who sent the post, with click of a mouse, "modal" comes down, and some forms will appear for the user to enter in his/her desired info. I've been searching over internet for the right ajax method to collect the data from server first, and save the changes that user makes to it, but I was unsuccessful to define what i'm looking for. here below is the modal code, &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&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" id="myModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="container"&gt; &lt;form style="width: 550px;" action="" method="post" role="form"&gt; &lt;div class="from-group"&gt; &lt;label for="title"&gt;Title: &lt;/label&gt; &lt;input class="form-control" type="text" name="title" id="title" value="" placeholder="Page Title"&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="from-group"&gt; &lt;label for="label"&gt;Label: &lt;/label&gt; &lt;input class="form-control" type="text" name="label" id="label" value="" placeholder="Page Label"&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="from-group"&gt; &lt;label for="header"&gt;Header: &lt;/label&gt; &lt;input class="form-control" type="text" name="header" id="header" value="" placeholder="Page Header"&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="from-group"&gt; &lt;label for="body"&gt;Body: &lt;/label&gt; &lt;textarea class="form-control editor" name="body" id="body" row="8" placeholder="Page Body"&gt;&lt;/textarea&…
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25915705
accepted answer: http://stackoverflow.com/a/25915705
has comment: http://stackoverflow.com/comment/40565725
has comment: http://stackoverflow.com/comment/40565804
has comment: http://stackoverflow.com/comment/40565656
tagged with: twitter-bootstrap
tagged with: php
has title: Fetching & Updating Data Using ajax and Jquery
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40565729

http://stackoverflow.com/q/26005802
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26006426
tagged with: ng-show
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has title: Window innerWidth size change
has answer: http://stackoverflow.com/a/26006426
answer count: 1
downvote count: 0
has body: I'm using the $watch listener function to check changes on the window inner width with the following code: $scope.$watch(function(){ return $window.innerWidth; }, function(value) { if(value &lt;= 768){ $scope.mobileSize = "mobile"; }else{ $scope.mobileSize = "screen"; } console.log(value); }); it should then act on the DOM with some ng-show conditions like this one for example : &lt;div ng-show="mobileSize == 'screen'"&gt; ... &lt;/div&gt; But it only seems to affect the page when I reload it after resizing it. The console.log(value) also only changes when I refresh the page. Is there any way to make this code work while the window is being resized ?
favorite count: 0

http://stackoverflow.com/a/25951832
type: Answer
has body: i used a containersurface to set the zindex .. it worked .. this.scrollContainer = new ContainerSurface({ size:[undefined,undefined], properties: { overflow: 'hidden', 'z-index': 5 } }); this.scrollContainer.add(this.scrollview); containerSurface we can set properties ..
answers question: http://stackoverflow.com/q/25951130
score: 0

http://stackoverflow.com/comment/40764400
has text: Thanks for responding. I saw that function earlier in my search, but since I see no way to know if it found or had to create the record I decided to implement the functionality I wanted. If the found operation returns true, then I want to update the record with new data.
type: Comment
comment on: http://stackoverflow.com/a/25982946
type: AnswerComment
score: 0

http://stackoverflow.com/q/25939947
has comment: http://stackoverflow.com/comment/40610650
downvote count: 3
has answer: http://stackoverflow.com/a/25940977
has title: _.each function for looping in JS issue
type: Question
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/40610493
upvote count: 0
has comment: http://stackoverflow.com/comment/40610289
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40611184
type: UnansweredQuestion
has body: We are asked to do the following: Write a function called checkValue that searches an array for a value. It takes an array and a value and returns true if the value exists in the array, otherwise it returns false. var helloArr = ['bonjour', 'hello', 'hola']; var checkValue = function(arr, val) { //checks if the val is in arr } Rewrite checkValue using _.each. here is what I have to itterate over helloArr using _.each: var helloArr = ['bonjour', 'hello', 'hola']; var checkValue = function (num) { return num; } checkValue('hola'); var output = us.each(helloArr, function(num){ if (checkValue()) {return true;}}); return output; What am I doing wrong? When I run it with node, theres no errors but no output either. I know you can use _.find to do this but the spec is asking to itterate over the array and find the value using _.each.
score: -3
tagged with: underscore.js

http://stackoverflow.com/comment/40533590
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25897883
has text: try specifying a min-width and min-height. an empty span has a rendered width and height of zero, so it can't really be moused over. by forcing it to have a size of a few pixels, there's something to mouse over.

http://stackoverflow.com/a/25983606
has comment: http://stackoverflow.com/comment/40692766
has comment: http://stackoverflow.com/comment/40763477
has body: Odd -- with the code you provided, I'm seeing the expected behavior: http://jsfiddle.net/DuncanMack/33bwdLqm/ If the items are being loaded dynamically, then make sure you've recalculated the value for option_cat. Without the complete code I can't be sure, but it sounds like you're running this on document.ready() -- which would only calculate for the items already present -- and then dynamically loading additional input values. Easy enough to fix -- just move var option_cat = $('.option_category[name*="option_category_config"]'); into the onClick event.
has comment: http://stackoverflow.com/comment/40689177
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25983439
answers question: http://stackoverflow.com/q/25983439
type: Answer

http://stackoverflow.com/q/25901817
has body: I am quite new to Angular and need some help creating a resuable service or similar for displaying a very simple Yes/No dialog. I am using Kendo UI's window component to display the modal dialog, but I find myself duplicating pretty much identical code / HTML everywhere I need a confirmation dialog: {{ dialog.message }} Yes No Then from some click event or similar, I call a method to open and center the dialog: $scope.showDialog = function(title, message) { $scope.dialog.message = message; $scope.myDialogWindow.title(title); $scope.myDialogWindow.center(); $scope.myDialogWindow.open(); } I would like to minimize code duplication and create something reusable for this. First I was figuring a custom directive would work well, but then I would need to create a two-way bound variable in the isolate scope and put a watch on it to know when to open the dialog + create a couple of method-bindings for when the user clicks on a button. I would also need to put the directive in the HTML. I have been searching for a solution, but the stuff I have found have been way overkill for my modest needs (and I also like to use Kendo UI, for a consistent theme). From what I have found, it seems like an Angular service might be the best approach (inject the dialog into the DOM), with a promise to let me know what was clicked. The service should be very simple to use - something like this: dialogService.display("Some title", "The message").then( function() { // Yes clicked... }, function() { // No clicked... }); Here is a simple plunker that just opens a kendo dialog when the button is clicked: http://plnkr.co/edit/ywCc3ZqFAXl3JEAu9XHW?p=preview To recap: how can I create a service that will display the Yes/No dialog, with a promise to tell me what was clicked? If possible, please update the plunker to demonstrate solution. Of course I am open to suggestions if there is a better approach.
type: UnansweredQuestion
score: 6
downvote count: 0
type: Question
upvote count: 6
tagged with: javascript
has title: Simple modal dialog service using AngularJS & Kendo UI
answer count: 1
has answer: http://stackoverflow.com/a/25918339
favorite count: 0
tagged with: kendo-ui
tagged with: angularjs

http://stackoverflow.com/comment/40763354
score: 0
type: AnswerComment
has text: I hadn't even thought of that. So it would run based on time instead of perpetually. Each user would have the video start based on a running time variable. Thank you very much, that will work much much better than what I was trying.
comment on: http://stackoverflow.com/a/26024598
type: Comment

http://stackoverflow.com/q/25951039
possible better answer: http://stackoverflow.com/a/25951152
type: Question
answer count: 2
tagged with: for-loop
has title: Play audio with setInterval and Loop
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25951199
score: 0
has body: I have this array: var song = ['note1.mp3', 'note2.mp3', 'note3.mp3', 'note4.mp3'] for(i = 0; i &lt; song.length; i++) { setInterval(function() { //play song[i] //or console.log(song[i]); }, 1000); } But this dont work, does anybody has an idea why? I want to play note1.mp3 then note2, note3 and note4. Thanks!
has comment: http://stackoverflow.com/comment/40628125
has answer: http://stackoverflow.com/a/25951199
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25951152
has comment: http://stackoverflow.com/comment/40628090
tagged with: loops

http://stackoverflow.com/q/25902647
favorite count: 0
has title: Get form action with button named action
score: 2
type: AnsweredQuestion
downvote count: 0
has body: Background Using VanillaJS to obtain an HTML form's action attribute value. Code Here is the code and the fiddle: Load Problem The dialog shows [object HTMLButtonElement] where http://google.com/q was expected (using Firefox 32). Question How can the form's action attribute value be retrieved? Update The following question might be relevant: Retrieve form's "name" attribute in Javascript whereas an input exists with name "name"
possible better answer: http://stackoverflow.com/a/25902795
linked to: http://stackoverflow.com/q/3937888
tagged with: forms
type: Question
upvote count: 2
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25902702
has answer: http://stackoverflow.com/a/25902795
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25902702

http://stackoverflow.com/comment/40614919
score: 0
type: Comment
type: QuestionComment
has text: // res.header('X-Powered-By', 'Sails <sailsjs.org>'); https://github.com/balderdashy/sails/blob/master/lib/hooks/http/middleware/defaults.js#L175
comment on: http://stackoverflow.com/q/25941227

http://stackoverflow.com/q/25993466
score: 1
type: Question
has title: search using a search bar by a button click in typeahead?
tagged with: javascript
has body: Here is my Form.. div.form(name='customerFrm') label.fa.fa-search.search-icon(data-ng-click= "customer(obj._id)", typeahead-match) input.form-control.search(type='text', ng-model='selected', typeahead-on-select= "customerSearch()") and this is the plugin that I am using for Angular Bootstrap .. First file.. a(tabindex='-1', bind-html-unsafe='match.model.name | typeaheadHighlight:query', ng-href='account.html#!/abc/{{match.model._id}}') and this is the second file .. ul.dropdown-menu(aria-hidden='', role='listbox', style='display: block;', ng-style='{top: position.top+"px", left: position.left+"px"}', ng-if='isOpen()') li(role='option', ng-click='selectMatch($index)', ng-mouseenter='selectActive($index)', ng-class='{active: isActive($index) }', ng-repeat='match in matches track by $index') div(template-url='templateUrl', query='query', match='match', index='$index', typeahead-match='') using first file it returns me ... href="account.html#!/abc/ path but not with it's id. So please give me a solution how to redirect to the page with it's id.
tagged with: pug
upvote count: 1
tagged with: angularjs-bootstrap
favorite count: 0
tagged with: angularjs
answer count: 0
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40586674
comment on: http://stackoverflow.com/q/25925880
score: 0
has text: @Seano666 I tried this `alert(str); { oSession.fullUrl = str.replace( "q=","q="+sAppend); }` it says"variable `alert` has not been declared"
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26009023
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26011167
has answer: http://stackoverflow.com/a/26013470
tagged with: angularjs
type: Question
answer count: 2
has body: I have a form with server-side validation. and if server returns validation errors I want to show them in the form, but only until user edited anything. Ideally I want to have something like: Some field Error! How to achieve this behavior? I really want to avoid to put this logic in a controller, and want to come up with some smart reusable directive. UPDATE Main thing here is how to implement ng-show-until-changed functionality. The logic of it must be "if an element is shown and target is changed - hide it". And the questions here: if target will be just some scope variable, like MyForm.my_field.serverSideError - will I need to manually launch $digest when it may be changed? For example after AJAX request will be completed, and so probably some errors can arrive from the server? How to properly watch for these server-side errors changes ? What is a proper way to hide/show some element in a custom directive in a same way as ng-show directive does that? is there some built-in utilites for that?
score: 0
has title: How to show error message until input is changed?
tagged with: javascript

http://stackoverflow.com/a/25914932
score: 1
downvote count: 0
has body: Javascript doesn't have block scope, so this: function foo() { // some code for (var i = 0; i &lt; a.length etc is the same as: function foo() { var i; // some code for (i = 0; i &lt; a.length etc JSLint thinks that you might not be aware of JS scoping rules and suggests that you restructure your source in accordance with how the interpreter actually works - that is, use the second option. I personally never do that, because out-of-context declarations severely reduce readability: function foo() { var i; // what the heck is this for? // some code // more code // even more code for (i = 0; i &lt; a.length // where the heck does this come from? http://c2.com/cgi/wiki?DeclareVariablesAtFirstUse discusses pros and contras of this approach.
type: Answer
answers question: http://stackoverflow.com/q/25913916
upvote count: 1
has comment: http://stackoverflow.com/comment/40564446

http://stackoverflow.com/comment/40708834
comment on: http://stackoverflow.com/a/25995253
score: 1
type: AnswerComment
has text: Much better. :) One more optimization would be to do `$('.grid-items .item').css('z-index', function(i){ return len-i; })` so that you don't need to create a new jQuery object every iteration.
type: Comment

http://stackoverflow.com/q/26025370
possible better answer: http://stackoverflow.com/a/26025507
has answer: http://stackoverflow.com/a/26025434
has answer: http://stackoverflow.com/a/26025507
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26025434
has body: The div's content is being filled up with the content of the attribute sk-placeholder. I have an if statement which will fill up the content of the div with a certain text or an empty string depending on the boolean viewer.building. When the placeholders content changes, an event needs to be fired, to empty the content of the div. I made a new directive called sk-replace that should do that. But the event is not firing. SEK.app.directive("skReplace", function () { return { restrict:'AEC', link: function(scope, elem, attrs) { scope.$watch(attrs.skPlaceholder.value, function(v) { v = attrs.skPlaceholder; if(v.length < 1){ elem.html(''); }; }); } } }); The function is executed on page load. But not when the placeholder's content changed. (this is done by a button btw) Any help?
type: Question
tagged with: angularjs-directive
has title: Watcher on a element attribute to change the elements inner html
tagged with: javascript
tagged with: angularjs-scope
score: 0
answer count: 2
tagged with: angularjs

recursion
type: Tag
tags question: http://stackoverflow.com/q/25938473
tags question: http://stackoverflow.com/q/25996400
tag name: recursion
tags question: http://stackoverflow.com/q/25889950
tags question: http://stackoverflow.com/q/25984540
tags question: http://stackoverflow.com/q/25996046
tags question: http://stackoverflow.com/q/25984122
tags question: http://stackoverflow.com/q/25961429
tags question: http://stackoverflow.com/q/25893371
tags question: http://stackoverflow.com/q/25917921

http://stackoverflow.com/a/25878366
has comment: http://stackoverflow.com/comment/40499118
has comment: http://stackoverflow.com/comment/40499058
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25877990
downvote count: 0
has body: A simple approach (written prior to your appending your HTML in your question) is: function checkForChecked() { // use $.unique() to get the unique values from an array (created within), // gets all inputs of type="radio" with a 'name' attribute, // creates a map of those elements' names, uses 'get()' to make that a // real array var radioGroups = $.unique($('input[type="radio"][name]').map(function () { return this.name; }).get()); // iterates over the array of group names ('a' is the current array element) radioGroups.forEach(function (a) { // caching the radio-inputs of the current name: var sel = $('input[type="radio"][name="' + a + '"]'); // gets the parent elements of those radios (here the 'label' elements), // if there are no radio inputs checked we call the 'addClass' method, // otherwise the 'removeClass' method, and add/remove the 'requiredStill' // class. This can be adjusted to do otherwise as you need. sel.parent()[sel.filter(':checked').length === 0 ? 'addClass' : 'removeClass']('requiredStill'); }); } $('input').on('change', checkForChecked); function checkForChecked() { var radioGroups = $.unique($('input[type="radio"][name]').map(function () { return this.name; }).get()); radioGroups.forEach(function (a) { var sel = $('input[type="radio"][name="' + a + '"]'); sel.parent()[sel.filter(':checked').length === 0 ? 'addClass' : 'removeClass']('requiredStill'); }); } $('input').on('change', checkForChecked); label { display: block; } .requiredStill { border: 1px solid #f00; } a a a b b b c c c References: addClass(). Attribute-equals ([attribute="value"]) selector. get(). $.unique(). map(). parent(). removeClass().
has comment: http://stackoverflow.com/comment/40499051
has comment: http://stackoverflow.com/comment/40498973
score: 1

http://stackoverflow.com/q/25897361
has comment: http://stackoverflow.com/comment/40561546
has body: I cannot make back button on android work after addEventListener. How to make it work? index.html file content. Index Go to page2 page2.html file content Page2 Go to Index page Cordova version is 3.5.0-0.2.7 What i want to do is... 1. Open the app > get alert 'device ready' > tap on back > exit the app. Another step 2. Open the app > get alert 'device ready' > tap on 'Go to page2' > page2 open > tap on back > go back to index page > tap on back again > exit the app. What i got... 1. Open the app > get alert 'device ready' > tap on back > nothing happens. not exit. 2. Open the app > get alert 'device ready' > tap on 'Go to page2' > page2 open > tap on back > nothing happens. not go back.
has title: Cordova cannot make back button work after addEventListener
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40562445
favorite count: 0
has comment: http://stackoverflow.com/comment/40564903
has comment: http://stackoverflow.com/comment/40564832
tagged with: android
tagged with: cordova
answer count: 0
has comment: http://stackoverflow.com/comment/40566962
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40548902

http://stackoverflow.com/a/25966807
score: 0
has comment: http://stackoverflow.com/comment/40657954
answers question: http://stackoverflow.com/q/25966676
type: Answer
has comment: http://stackoverflow.com/comment/40657577
has body: Ah the joys of js scope. Remember that scope is at the function level. So to keep all your request handlers in the correct scope you should declare any variables in a scope that is unique to the the request handler. I suggest pulling the request out into a function and passing in the url and clientname function checkUrl(url, clientName) { request(url, function(error, response, html){ if(!error){ var $ = cheerio.load(html); var json = { client : "", url : "", verified : "", status: ""}; //verify if the google + page is verified local business if ($('.xR.OA.Hlb.d-k-l.NA').length){ $('.xR.OA.Hlb.d-k-l.NA').filter(function(){ var data = $(this); var isValid = data.text(); json.client = clientName; json.url = url; json.verified = isValid; json.status = "Map is verified !"; }) } else { // if not, verify if its the google 404 page if ($('#af-error-container').length){ json.client = clientName; json.url = url; json.verified = "Not verified"; json.status = "MAP DELETED (404) !"; } else { // if not, then the map is there but is not verified anymore json.client = clientName; json.url = url; json.verified = "NOT verified"; json.status = "Somethings wrong, please verify."; } } //endif } //end of if error fs.appendFile('googleMaps.json', JSON.stringify(json, null, 4), function(err){ console.log('File successfully written! - Check your project directory for the googleMaps.json file'); }) }) } Then make the call to the function where you are assigning url and clientname in your current code. checkUrl(rows[key][2], rows[key][1]);

http://stackoverflow.com/a/25959145
has comment: http://stackoverflow.com/comment/40643060
has body: backbone view events can work without dom element specified. If you can't use any element at the view createion (initialization) moment, then you can use it's 'setElement' method, to attach your view to specified dom element. Here is description. Be the way your view render method will not work also without specified 'el'.
type: Answer
has comment: http://stackoverflow.com/comment/40643258
has comment: http://stackoverflow.com/comment/40642994
has comment: http://stackoverflow.com/comment/40643039
answers question: http://stackoverflow.com/q/25952197
score: 0

http://stackoverflow.com/a/25958396
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40641630
type: Answer
has body: In this case, you can use document.getElementsByClassName("timer")[0] instead of getElementById('countdown').
upvote count: 1
has comment: http://stackoverflow.com/comment/40641503
accepted answer of: http://stackoverflow.com/q/25958323
has comment: http://stackoverflow.com/comment/40641943
answers question: http://stackoverflow.com/q/25958323
type: AcceptedAnswer

http://stackoverflow.com/a/25959241
answers question: http://stackoverflow.com/q/25959197
score: 0
has comment: http://stackoverflow.com/comment/113874354
type: AcceptedAnswer
type: Answer
has body: Cookies are the best option for session details involving login, any other persistent storage should use localStorage. This is because cookies will be transferred to the server on each request and therefore can be used to authenticate each call. If your confused about this sort of stuff it can be very dangerous for your site. Try read up on it and try to use whatever the standard is for your language/framework/library.
accepted answer of: http://stackoverflow.com/q/25959197

http://stackoverflow.com/a/25901332
downvote count: 0
type: Answer
has body: Is this what you want? http://jsfiddle.net/0uz19cmu/3/ document.getElementsByTagName('iframe')[0].onmouseenter = function() { alert('vanilla-js not prompt'); }; This will only get the first iframe in the document. If you want to get a specific one, then I would recommend using an id.
answers question: http://stackoverflow.com/q/25901258
upvote count: 2
score: 2

http://stackoverflow.com/comment/40731831
score: 0
type: AnswerComment
has text: Here's a [Fiddle](http://jsfiddle.net/ajfarkas/tnb9rh98/1/) of this in action (sorry it's not pretty).
type: Comment
comment on: http://stackoverflow.com/a/26007557

http://stackoverflow.com/comment/40660074
comment on: http://stackoverflow.com/q/25968240
score: 0
has text: You have some typos, fix them (missing ; and ,)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40581460
type: QuestionComment
has text: have you thought about making the site in php and then using includes the header would be in 1 file that is included onto the page so if you change it in the header file it will then auto be changed on all pages the header is included
comment on: http://stackoverflow.com/q/25924001
type: Comment
score: 1

webgl
tags question: http://stackoverflow.com/q/26008558
tags question: http://stackoverflow.com/q/26029521
tags question: http://stackoverflow.com/q/25900154
tags question: http://stackoverflow.com/q/25956272
tags question: http://stackoverflow.com/q/25966841
tags question: http://stackoverflow.com/q/25957050
tags question: http://stackoverflow.com/q/25942955
tag name: webgl
type: Tag
tags question: http://stackoverflow.com/q/25993742

http://stackoverflow.com/comment/40518346
type: Comment
comment on: http://stackoverflow.com/a/25879097
score: 0
type: AnswerComment
has text: I can't explain the dumping of contents you are describing (at least without seeing it happen), but document.write() only works during the parse state, not after the document has finished loading. Props to [Henry Sivonen](https://twitter.com/hsivonen/status/512205402927534080) for pointing this out.

http://stackoverflow.com/a/25940730
has comment: http://stackoverflow.com/comment/40657246
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25929321
answers question: http://stackoverflow.com/q/25929321
has body: Assuming this points to the app, var that = this; You may create an object that is available anywhere in the app: that._child = child; and you don't have to pass a reference to it as a parameter.

http://stackoverflow.com/comment/40723250
has text: @hawaiianchimp No, you either have to wrap the text, or strip the ``.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26002375

http://stackoverflow.com/comment/40653011
comment on: http://stackoverflow.com/q/25964346
type: QuestionComment
score: 0
type: Comment
has text: Sorry, it doesn't make sense. I have no idea what you're asking

http://stackoverflow.com/comment/50016100
type: Comment
has text: Thank you very much for working on this question. I was very excited to try this out! This solution creates the thumbnail perfectly, but for some reason the urls never seem to work. Are you sure about the fileObj.name()+'[0]' part?
type: AnswerComment
comment on: http://stackoverflow.com/a/30635587
score: 0

http://stackoverflow.com/a/25951412
has body: you need a javascript or php routing, javascript frameworks as angularjs has a route module (codeigniter for php has one too). You need to prevent location href behavior. When you change the location gallery.php/#picture (hash changing event fired) but gallery.php/picture tries to redirect picture directory.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25951286

http://stackoverflow.com/comment/40666671
score: 1
type: Comment
type: QuestionComment
has text: For a guide on writing your own definitions, take a look at [this](https://typescript.codeplex.com/wikipage?title=Writing%20Definition%20%28.d.ts%29%20Files).
comment on: http://stackoverflow.com/q/25972052

http://stackoverflow.com/comment/40537610
comment on: http://stackoverflow.com/q/25899908
has text: why don't you use Ajax? no reload..and handled return call as you want? I have no experience with wordpress but it should be a straight forward..
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25958646
favorite count: 0
downvote count: 3
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Confirm statement w/ if else
has answer: http://stackoverflow.com/a/25958692
answer count: 4
has answer: http://stackoverflow.com/a/25958759
has answer: http://stackoverflow.com/a/25958695
has comment: http://stackoverflow.com/comment/40641984
type: Question
has body: I am trying to make a page where a confirm box pops up 10 seconds after the user enters the page. It says "Do you want to leave this page?" If the user clicks OK, it will teleport the user to Google. If the user clicks Cancel, an alert will pop up saying "OK. You can stay." This is just an exercise. HTML: Something. Info... More... Yet More... JavaScript: function stayonPage(){ var is_sure = window.confirm("Do you want to leave this page?"); } var waittime = window.setTimeout("stayonPage()",10000); if(is_sure=false;) {window.alert("OK. You can stay.");} else {window.location="http://www.google.com";} So far, the web page shows for a second and then goes to Google without the confirm box showing.
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/25958690
upvote count: 1
tagged with: jquery

http://stackoverflow.com/comment/40518804
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25888502
score: 0
has text: Thank you @Justinas. I placed below code, end of my script. Now its working in all browsers. used the blur and focus instead of focusout and focusin. $("#focus_point").attr("tabindex",-1).focus();

http://stackoverflow.com/comment/40634130
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25952902
has text: Please show us how Spring handles the `/server/controller/edit/1/1/laf02.jpg` request.
score: 0

openlayers-3
tags question: http://stackoverflow.com/q/25959598
type: Tag
tags question: http://stackoverflow.com/q/25995334
tag name: openlayers-3
tags question: http://stackoverflow.com/q/25924622
tags question: http://stackoverflow.com/q/26022029
tags question: http://stackoverflow.com/q/25927895

http://stackoverflow.com/a/26019782
has comment: http://stackoverflow.com/comment/65079372
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26019279
has comment: http://stackoverflow.com/comment/40754140
type: Answer
has body: Your users node is just a regular node in Firebase. So the only way to look up items is either by the name of the node or by the priority of the node. If you want to stick to using the uid as the node name, you can set the email address as the priority using setPriority or setWithPriority and then filter using startAt and endAt. // save new user's profile into Firebase so we can // list users, use them in security rules, and show profiles myRef.child('users').child(user.uid).setWithPriority({ displayName: user.displayName, provider: user.provider, provider_id: user.id }, user.email); var userRef = myRef.child('users').startAt(user.email).endAt(user.email); But if you're only using simple email, you might consider simply storing the users by their email address to begin with: myRef.child('users').child(user.email).set({ displayName: user.displayName, provider: user.provider, provider_id: user.id }); var userRef = myRef.child('users').child(user.email); See also: Database-style Queries with Firebase How to query firebase for property with specific value inside all children Top results from Googling "Firebase where query".
has comment: http://stackoverflow.com/comment/40754034
answers question: http://stackoverflow.com/q/26019279
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/65077314

http://stackoverflow.com/q/25891506
accepted answer: http://stackoverflow.com/a/25891802
has title: async.series: variable number of callbacks
tagged with: mongodb
answer count: 1
downvote count: 0
has body: I'm working in Node.js (Express) and MongoDB (mongooseJS). I want to create async functions (one after another, quering DB in proper order); the question is: how can I create variable number of async.series functions, like this: var supply = [0]; async.series([ function(callback) { Model.find({ color: user.color[supply] }).exec(callback); }, ],function(err, results){ res.send('Chosen colors: ' + results); }); and if - lets say - variable supply = [0, 1, 2], then callback function will be tripled with 0, 1 and 2 placed there: var supply = [0, 1, 2]; async.series([ function(callback) { Model.find({ color: user.color[supply] }).exec(callback); // supply = 0 }, function(callback) { Model.find({ color: user.color[supply] }).exec(callback); // supply = 1 }, function(callback) { Model.find({ color: user.color[supply] }).exec(callback); // supply = 2 }, ],function(err, results){ res.send('Chosen colors: ' + results); }); in other words, how can i loop this fragment function(callback) { Model.find({ color: user.color[supply] }).exec(callback); }, so number of functions will be here depending on some variable? Cheers! Mike
favorite count: 0
tagged with: express
tagged with: asynchronous
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25891802
tagged with: javascript

http://stackoverflow.com/a/26021746
has comment: http://stackoverflow.com/comment/40775926
answers question: http://stackoverflow.com/q/26016935
type: Answer
score: 0
has body: It looks like your second call to search.json is the culprit. When using the JS SDK you should be calling the REST resources directly instead of putting in the URL (like: www.yammer.com or api.yammer.com). You've done this successfully with your first call to messages.json, but should update your second call to this: yam.platform.request({ url: "search.json", method: "GET", data: { "search" : "TestTopic1" }, success: function (data) { //print message response information to the console alert("The request was successful."); console.dir(data); }, error: function (data) { alert("There was an error with the request."); console.log(data) } });

http://stackoverflow.com/a/25966786
answers question: http://stackoverflow.com/q/25966676
has body: You're running into a closure problem. Your request() is asynchronous. After it runs, it will take some time to return a result. However, Node doesn't block waiting for it to return-- it will happily continue to the next iteration of the loop. When the loop continues, it changes the values of url and clientName: var url = rows[key][2]; var clientName = rows[key][1]; At some point in the future, request() will finish and invoke its callback. At that time, it will use the values of url and clientName as they are currently defined. So every instance of the anonymous function will execute using the last values in your loop. For more information, check out this SO answer. One of the easiest solutions is to pass any variables you need into a new closure that's redefined for each iteration of the loop. (function(url, clientName) { request(url, function(error, response, html){ ... }); )(url, clientName); Now, url and clientName are locally-scoped to that particular loop iteration, and will maintain their correct values.
has comment: http://stackoverflow.com/comment/40657600
score: 0
type: Answer

http://stackoverflow.com/comment/40509679
type: QuestionComment
has text: @pixelbits no it's not the option value of fred is 0 not 1. It's working as long as I dont send or use the option value of the select list.
comment on: http://stackoverflow.com/q/25884059
score: 0
type: Comment

http://stackoverflow.com/comment/40603169
has text: Unfortunately the function is undefined on my client's webpage, even with the latest jQuery. I think the issue has to do with initialization.
type: Comment
comment on: http://stackoverflow.com/a/25922341
score: 0
type: AnswerComment

http://stackoverflow.com/a/78742041
score: 0
type: Answer
has body: I would suggest using an Array of string literals and then join the Array into a String. This suggestion isn't ideal, imho, due to having to create an Array and then a manipulation, but to me it allows readability which is why I think the original poster desires multiline literal with indentation. Using the original post as an example... var a = dontIndent `This is a template string. Even though each line is indented to keep the code neat and tidy, the white space used to indent is not in the resulting string`; Using Array + join var a = [ `This is a template string.`, `Even though each line is indented to keep the`, `code neat and tidy, the white space used to indent`, `is not in the resulting string`, ].join(&quot; &quot;)
answers question: http://stackoverflow.com/q/25924057

http://stackoverflow.com/comment/40503786
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25881049
has text: I couldn't replicate your problem. Make a http://jsfiddle.net/.
score: 0

http://stackoverflow.com/comment/40739960
type: QuestionComment
has text: thats help thanks a lot.i need be more attentive)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26011985

http://stackoverflow.com/q/25923608
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40581060
has body: I am trying to use ajax to display a list of strings in a div but I am not sure how to parse the data in Ajax. Here is my method in C#: public JsonResult GetRecentEmployeeRecords(string whse) { var recentRecords = _employeeDb.EmployeeMasters.Where(e =&gt; e.Branch == whse).OrderBy(e =&gt; e.CreateDate).Take(10); var list = recentRecords.Select(r =&gt; r.EmployeeNumber + " - " + r.LastName + ", " + r.FirstName).ToList(); var jsonSerialiser = new JavaScriptSerializer(); var json = jsonSerialiser.Serialize(list); return Json(json, JsonRequestBehavior.AllowGet); } Here is my ajax statement: $.ajax( { type: 'GET', url: '../Employee/GetRecentEmployeeRecords', data: { whse: $('#Branch').val(), }, contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (data) { for (var i in data) { $('#recentEmployeeNumbers').val(data[i] + "&lt;br/&gt;"); alert(data[i]); } } }); and it appears that I am getting data back but it appears as it is only giving me single characters at a time. What is the best way to get the entire string at a time and display all ten of them in a div?
has answer: http://stackoverflow.com/a/25923791
type: AnsweredQuestion
has title: Display a List in a DIV with Ajax
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25923791
has answer: http://stackoverflow.com/a/25923797
accepted answer: http://stackoverflow.com/a/25923797
score: 0
answer count: 2

http://stackoverflow.com/a/25976624
accepted answer of: http://stackoverflow.com/q/25976503
has body: You can extract a common function, and use it like bellow var evaentListener = function(obj) { return function() { var current = obj.getFill(); var fill = ""; switch (current) { case "#DDDDDD": fill = "#FFC926"; break; case "#FFC926": fill = "#FF0000"; break; case "#FF0000": fill = "#000000"; break; default: fill= "#DDDDDD"; } obj.setFill(fill); layer.draw(); } } head.on('touchstart, mousedown',evaentListener(this)); neck.on('touchstart, mousedown',evaentListener(this));
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25976503

http://stackoverflow.com/comment/40688435
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25983498
has text: I see, so I do need to understand the plugin code. I guess it will take me a long time! Anyways, the above mentioned website's album looks very nice, I like the feature that you can go forward and backward based on your mouse direction, but really don't know if this is some crazy work out there. Just wanted to see your comments on it.
score: 0

http://stackoverflow.com/comment/40515436
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25885888
has text: I have added a screenshot to my answer, please check.

http://stackoverflow.com/comment/40532251
type: Comment
has text: `dataType:'json'` tells jQuery that you're expecting JSON back from the server. If that's not the case, you should remove it from your ajax call.
comment on: http://stackoverflow.com/a/25897044
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40535711
type: QuestionComment
score: 0
has text: I don't think `toPrecision` will really help because that will just change 1.345 to 1.34500000. JS-wise I cant see an issue - http://jsfiddle.net/e1msyuts/ so I assume its something in the ASMX parameter binding
comment on: http://stackoverflow.com/q/25898769
type: Comment

http://stackoverflow.com/comment/40581257
score: 0
type: AnswerComment
has text: This way? $(this).trim().length > 0 But it returned an error, trim needs an argument, shouldn't it be trim($(this)).length > 0 ?
type: Comment
comment on: http://stackoverflow.com/a/25923830

http://stackoverflow.com/a/48642563
type: Answer
answers question: http://stackoverflow.com/q/25994001
upvote count: 5
has body: The experimental TextEncoder API can be used for this but is not supported by Internet Explorer or Safari: (new TextEncoder()).encode("i ♥ u i ♥ u i ♥ u i ♥ u i ♥ u").length; Another alternative is to URI-encode the string and count characters and %-encoded escape sequences, as in this library: ~-encodeURI("i ♥ u i ♥ u i ♥ u i ♥ u i ♥ u").split(/%..|./).length The github page has a compatibility list which unfortunately does not include IE10, but IE9. Since I can not yet comment, I'll also note here that the solution in the accepted answer does not work for code points consisting of multiple UTF-16 code units.
score: 5
downvote count: 0

glyphicons
tags question: http://stackoverflow.com/q/26022995
tags question: http://stackoverflow.com/q/25948913
type: Tag
tag name: glyphicons

http://stackoverflow.com/q/25874731
type: Question
linked to: http://stackoverflow.com/q/19719540
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25875767
answer count: 1
has comment: http://stackoverflow.com/comment/40492069
tagged with: angularjs
score: 0
has body: I'm trying to get up to speed with AngularJS, coming from a Java background, not Javascript. I'm used to stepping into a debugger with Eclipse, MSDEV, etc, but not so much used to Google Chrome's dev tools or WebStorm (which I intend to use). Occasionally, I've made a mistake that apparently is detected upon startup. I'm guessing it's logged someplace (I hope!), and then silently continues. Then when I go to the page that would use the controller, I get the Argument 'MyController' is not a function, got undefined error. Of course, the attached stack trace isn't very helpful. So the big question is: how do you step into this mess when it actually finds the problem inside the controller, not later when it actually tries to use the controller? I could post today's issue, but I'd rather have the tools to diagnose this myself than just solve the problem for today.
has comment: http://stackoverflow.com/comment/40492152
has comment: http://stackoverflow.com/comment/40491686
has comment: http://stackoverflow.com/comment/40492198
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25875767
has title: How does one diagnose errors in a controller?

http://stackoverflow.com/comment/40681144
score: 0
type: Comment
type: QuestionComment
has text: check this out http://stackoverflow.com/a/12728924/3191896
comment on: http://stackoverflow.com/q/25979540

http://stackoverflow.com/q/25941635
tagged with: javascript
answer count: 3
upvote count: 0
tagged with: function
has comment: http://stackoverflow.com/comment/40613555
favorite count: 0
has comment: http://stackoverflow.com/comment/40613702
has answer: http://stackoverflow.com/a/25941749
has comment: http://stackoverflow.com/comment/40613901
has comment: http://stackoverflow.com/comment/40614067
score: -3
has comment: http://stackoverflow.com/comment/40613531
has comment: http://stackoverflow.com/comment/40613629
type: UnansweredQuestion
has title: Execute javascript function before defining
downvote count: 3
has answer: http://stackoverflow.com/a/25941823
type: Question
has body: I have a simple javascript function that should be place in the section: &lt;script&gt; function b() { } &lt;/script&gt; And this simple one in the section: &lt;script&gt; function a() { b(); } &lt;/script&gt; When trying to call function b from function a I get an undefined function b as it's defined after function a. Is there anyway around this?
has answer: http://stackoverflow.com/a/25941718

http://stackoverflow.com/q/25952916
tagged with: game-physics
has title: How to draw grid into circle using html5
tagged with: math
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25953938
has comment: http://stackoverflow.com/comment/40631630
tagged with: html5-canvas
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40631786
has body: I am trying to draw grid into circle using html5 as shown below using paper js: But I can't understand, what would be right logic for this solution in javascript. Following my script: for (var _q=0,_qmax=(2*Math.PI),_qstep=(Math.PI/20); _q&lt;_qmax; _q+=_qstep) { _sx = x+Math.sin(_q)*_radius; _sy = y+Math.cos(_q)*_radius; var path=new Path(); path.strokeColor='white'; path.strokeWidth=2; path.moveTo(_sx,_sy); path.lineTo(_sy,_sx); }
type: UnansweredQuestion
tagged with: physics
has comment: http://stackoverflow.com/comment/40631561
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/40682862
comment on: http://stackoverflow.com/q/25980842
has text: have you tried jQuery append() to add coloumns ??
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/q/25896604
score: 0
has comment: http://stackoverflow.com/comment/40531371
has title: html radio onchange event does not fires?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40531428
favorite count: 0
has body: I am making custom radio input but it does not fire change event....? $("input:radio[name=glasscationposition]").change(function() { alert("glasscationposition") var value = $(this).val(); }); $("input:radio[name=copyrightposition]").change(function() { alert("copyrightposition") var value = $(this).val(); }); Here is Fiddle
has answer: http://stackoverflow.com/a/25896758
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25896758
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40531442
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40537703
comment on: http://stackoverflow.com/a/25899961
score: 1
type: AnswerComment
has text: I see your point now. But what is the purpose of keeping data in service, for sharing data? I would not do so even this is the case. I would rather store data on controller and if I do want to share data/ put data on service, I just call service's setSharedData(sharedData) method. This makes service code more testable and reusable
type: Comment

http://stackoverflow.com/q/25896352
has answer: http://stackoverflow.com/a/25896458
linked to: http://stackoverflow.com/q/5878201
answer count: 1
has title: Delete a database row using javascript and php
favorite count: 0
accepted answer: http://stackoverflow.com/a/25896458
score: -2
tagged with: php
type: AnsweredQuestion
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/40530859
upvote count: 0
has comment: http://stackoverflow.com/comment/40531077
tagged with: javascript
has body: I am trying to delete a row in a database when a button is clicked. I've been trying to get it running using the answer provided here. This is the Delete js function: function Delete(id, classname){ if (confirm("Are you sure you want to delete this reference?") == true) { window.location="delete"+classname+".php$del="+id; } return false; } The reason I have a different delete page for each class is because I have a delete() function inside the class function. Here Is how I am trying to make the label clickable so that the page will be changed: -Delete- However, the line of html code is giving me an error of Uncaught Syntax Error: Unexpected token } whenever I click it. Apologies in advance as I am not experienced with javascript. Any help would be much appreciated.
tagged with: jquery

http://stackoverflow.com/a/25932847
has body: The select2 when called was not able to find the dropdown list boxes,because they were added dynamically and hence the those were not visible for the jQuery class selector $(".countriesclass").select2();. This type of behaviour can be overcome by referencing the selector from the document element, rather than referring the element directly like above. so the new selector should be like this $(document).find("select.countriesclass").select2(); Also I have done few tunings in your code. Live demo: http://jsfiddle.net/dreamweiver/y6af098z/8/ Note: one more thing, when using jQuery lib make sure you make the most of it, don't use raw JS code instead use the jQuery equivalent syntax for the same, which would be simple and easy to use.
has comment: http://stackoverflow.com/comment/40604011
type: Answer
answers question: http://stackoverflow.com/q/25928753
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40622394
has comment: http://stackoverflow.com/comment/40615600
has comment: http://stackoverflow.com/comment/40640764
has comment: http://stackoverflow.com/comment/40622404

http://stackoverflow.com/a/26014926
answers question: http://stackoverflow.com/q/26014836
score: 0
has body: Response is an experimental jQuery plugin for building websites with responsive content. It can dynamically swap content based on breakpoints and data attributes. a complete explaination about the plugin with the Breakpoint Sets can be found on: http://responsejs.com
type: Answer

http://stackoverflow.com/a/25941422
has body: You have a couple of bugs here - one immediate one, and another that you'll uncover as soon as you fix the first. 'this' is not always what you expect in Javascript. Calling a function doesn't change context (you can use things like call/apply/bind for that) so watch your 'this' pointer. You'll have better results with the standard JS trick: var self = this; Then use 'self' everywhere instead of 'this'. this.forEach does not exist because you're calling it either on your service itself (this) or the caller's context (depending on how you call your service). Don't you mean this.tiles.forEach()? You call GridService.buildStartingPosition(); but you have not defined it. As soon as you fix your forEach, this will throw an exception here.
type: Answer
accepted answer of: http://stackoverflow.com/q/25941009
answers question: http://stackoverflow.com/q/25941009
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40614966

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

http://stackoverflow.com/q/25977716
has answer: http://stackoverflow.com/a/25977741
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40677052
has answer: http://stackoverflow.com/a/25977763
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25977793
type: Question
has title: How can I select specific nested element with Jquery
tagged with: javascript
tagged with: jquery
has body: I have this markup Username Something Something Something Something Something Something John Smith Nickname Address Registerd 10-10-2014 09-11-2014 03-02-2014 How can I select with Jquery the input element with id=user1 ? I have already tried this but doesnt work $("#users tbody tr td input").click(function(){ alert ("success"); }); Any suggestion ?
score: 0
has comment: http://stackoverflow.com/comment/40677100
answer count: 3
tagged with: jquery-selectors
has comment: http://stackoverflow.com/comment/40677081
accepted answer: http://stackoverflow.com/a/25977793
favorite count: 0
possible better answer: http://stackoverflow.com/a/25977741

http://stackoverflow.com/comment/112015046
score: 1
type: AnswerComment
has text: @Pureferret alas this still isn't in the stdlib. I suspect the reason why TC39 doesn't have a dedent (that looks at the starting indent of the multiline string is because doing this (like dedent) is a mix of compile-time and run-time features. However I'll add two additional solutions to the answer above,
comment on: http://stackoverflow.com/a/39019537
type: Comment

http://stackoverflow.com/q/26011731
has answer: http://stackoverflow.com/a/26011775
type: Question
has comment: http://stackoverflow.com/comment/40738965
has body: I have a button inside a division.Both have separate onclick listeners.But since button is a part of the division,the event attached to button is also triggered when clicked.Is there a way to remove it? i tried :not / .not.it dint work. &lt;div id="divson"&gt; &lt;button id="btn"&gt;&lt;/button&gt; &lt;/div&gt; $('#divson').not('#btn').click(function sayHello() { alert('Helo!'); }); $('#btn').click(function sayJello() { alert('Jelo!'); }); http://jsfiddle.net/gw3LqrcL/
tagged with: javascript
has title: Removing onclick listener for a part of division
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/26011874
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40520708
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25876235
has text: @amccormack I'm having the same problem on scope update, but the flickering is only noticable in Linux Google Chrome. Flickering is unnoticable / not present at all in OS X Chrome, Linux Firefox.
score: 0

http://stackoverflow.com/a/25958860
type: Answer
has body: When you apply data-parsley-validate to your form, you don't need to apply javascript to form to stop submit until all validation run. But if you applying javascript return false when parsely() not valid. And just make sure you have include parsley.js code file.
has comment: http://stackoverflow.com/comment/40642608
answers question: http://stackoverflow.com/q/25958507
score: 0
has comment: http://stackoverflow.com/comment/40642843
has comment: http://stackoverflow.com/comment/40642820

http://stackoverflow.com/comment/40505985
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25882489
has text: programmers make mistakes too

http://stackoverflow.com/a/26028808
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26027867
has body: The problem is that plnkr has the 8.0 version of angularfire in their package manager. It works just fine in the latest version. $scope.addTask = function(newTask) { list.$add({ title: newTask.title, $priority: 3 }); };
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/26027867

http://stackoverflow.com/a/26544721
downvote count: 0
has comment: http://stackoverflow.com/comment/45796115
score: 6
has comment: http://stackoverflow.com/comment/41726742
accepted answer of: http://stackoverflow.com/q/25962846
has comment: http://stackoverflow.com/comment/45795583
type: Answer
answers question: http://stackoverflow.com/q/25962846
upvote count: 6
has body: Cropit author here. Hope it's not too late. I'd suggest submitting the cropped image in a base64 encoded format in a hidden input. Regarding your concern about exported image size/quality, cropit provides an option exportZoom, which allows you to specify a ratio between the size you would like an exported image to be and the preview div. Please see the doc for more details (search "exportZoom" in the page).
type: AcceptedAnswer

http://stackoverflow.com/q/25941009
has body: I am going over the 2048 game tutorial from ng-newsletter and I am stuck on my gridservice methods not being defined. Here is the code module that injects the Grid module and its GridService angular.module('Game', ['Grid']) .service('GameManager', ['GridService', function(GridService) { // create a new game this.newGame = function() { GridService.buildEmptyGameBoard(); GridService.buildStartingPosition(); this.reinit(); }; }]); Here is my Grid module and Gridserivce along with the methods angular references as being undefined: angular.module('Grid', []) /** * GridService handles all the conditions of the board */ .service('GridService', ['TileModel', function(TileModel) { return { buildEmptyGameBoard: buildEmptyGameBoard } this.startingTileNumber = 2; // grid array acts the as the board and remains static this.grid = []; // tiles array acts the pieces on the board and will be dynamic this.tiles = []; this.tiles.push(new TileModel({x: 1, y: 1}, 2)); this.tiles.push(new TileModel({x: 1, y: 2}, 2)); // Size of the board this.size = 4; //this.buildEmptyGameBoard = function() { function buildEmptyGameBoard() { var self = this; // Initialize our grid for(var x = 0; x &lt; this.size * this.size; x++) { this.grid[x] = null; } // Initialize our tile array // with a bunch of null objects this.forEach(function(x,y) { self.setCellAt({x:x, y:y}, null); }); } // Run a method for each element in the tiles array this.forEach = function(cb) { var totalSize = this.size * this.size; for(var i = 0; i &lt; totalSize; i++) { var pos = this._positionToCoordinates(i); cb(pos.x, pos.y, this.tiles[i]); } }; // Convert i to x,y // cell position from single dimensional array // converts to x and y coords for pos on game board this._positionToCoordinates = function(i) { var x = i % service.size; y = (i - x) / service.size; return { x: x, y: y }; }; }]) /** * TileModel Factory to define values for our tile directive css positions */ .factory('TileModel', function() { var Tile = function(pos, val…
tagged with: angularjs
tagged with: angular-services
type: AnsweredQuestion
has title: methods in angularjs service are not defined
type: Question
tagged with: dependency-injection
has answer: http://stackoverflow.com/a/25941422
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25941428
has answer: http://stackoverflow.com/a/25941428
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25941422

http://stackoverflow.com/q/26007216
linked to: http://stackoverflow.com/q/60174
answer count: 2
has answer: http://stackoverflow.com/a/26007266
has comment: http://stackoverflow.com/comment/40731587
has comment: http://stackoverflow.com/comment/40731435
has title: Form still submits even with preventDefault
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I don't know what is wrong here. preventDefault should stop the form from submitting but it still proceeds to. I have an ajax call where it verifies if user is valid. If not, prevent from submitting. Else, proceed to login and home page. Form Incorrect Username and/or Password Javascript $('#signIn').submit ( function (e) { var username = $('#username').val(); var password = $('#password').val(); var dataString = "username=" + username + "&password=" + password; $.ajax( { type: "POST", url: "ajaxCheck.php", data: dataString, cache: false, success: function (result) { if (!result) { $('#errorSignIn').removeAttr('hidden'); e.preventDefault(); return false; } } }); }); ajaxCheck.php <?php $username = $_POST['username']; $password = $_POST['password']; $password = md5($password); $dbConnection = mysqli_connect('localhost','root','','onboard'); $query = "SELECT * FROM account WHERE username='$username' AND password='$password'"; $result = mysqli_query($dbConnection,$query); $count = mysqli_num_rows($result); if ($count == 1) { echo true; } else { echo false; }
has answer: http://stackoverflow.com/a/26007239
downvote count: 2
upvote count: 1
tagged with: php
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40731180
score: -1
tagged with: forms
possible better answer: http://stackoverflow.com/a/26007266
accepted answer: http://stackoverflow.com/a/26007239

http://stackoverflow.com/q/26018924
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/26073276
has answer: http://stackoverflow.com/a/26104096
has comment: http://stackoverflow.com/comment/40961140
has body: I have a html table that I'm running at the server level. However, I'm having trouble accessing the data that it is being populated with. I'm populating the table using javascript but I need to access the data using vb.net. I'm using jquery to get the information to the page by using the .html method. Here is my javascript, function ShowProj(strId, qno,ar) { $('#hiddenQno').val(qno); $('#qnoLbl').val(qno); var output = ''; output = "&lt;tr&gt;&lt;th&gt;Product&lt;/th&gt;"; output += "&lt;th&gt;Bond&lt;/th&gt;"; output += "&lt;th&gt;Cut&lt;/th&gt;"; output += "&lt;th&gt;Pack&lt;/th&gt;"; output += "&lt;th&gt;Delivery date&lt;/th&gt;&lt;/tr&gt;"; for (i = 0; i &lt; ar.length; i++) { output += "&lt;tr&gt;"; output += "&lt;td style='width: 40%;'&gt;" + ar[i][0] + "&lt;/td&gt;"; output += "&lt;td style='width: 10%; text-align: center;'&gt;&lt;input type='checkbox' " + (ar[i][1] == 1 ? 'checked' : '') + " /&gt;&lt;/td&gt;"; output += "&lt;td style='width: 10%; text-align: center;'&gt;&lt;input type='checkbox' " + (ar[i][2] == 1 ? 'checked' : '') + " /&gt;&lt;/td&gt;"; output += "&lt;td style='width: 10%; text-align: center;'&gt;&lt;input type='checkbox' " + (ar[i][3] == 1 ? 'checked' : '') + " /&gt;&lt;/td&gt;"; output += "&lt;td style='width: 30%;'&gt;&lt;input type='text' value='" + ar[i][4] + "'/&gt;&lt;input type='hidden' value='" + ar[i][5] + "' /&gt;&lt;/td&gt;"; output += "&lt;/tr&gt;" } $('#projGrid').html(output); } I am passing the information from vb.net using an `ArrayList. Here is my html, &lt;div class="modalPopup" id="projPopup" style="width: 40%;"&gt; &lt;table style="width:100%;"&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;table id="projGrid" runat="server" style="width: 100%;border: 1px solid black; font-size: 16;"&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &amp;nbsp;&lt;/td&gt; &lt;td&gt; &amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;asp:Button ID="projOk" runat="server" Text="Update" /&gt;&lt;/td&gt; &lt;td&gt; &lt;asp…
has comment: http://stackoverflow.com/comment/41044361
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: asp.net
has title: Getting Data in vb.net from dynamic htmlTable
favorite count: 0
has answer: http://stackoverflow.com/a/26086159
type: UnansweredQuestion
tagged with: vb.net
type: Question
upvote count: 4
tagged with: javascript

http://stackoverflow.com/a/25976341
type: Answer
answers question: http://stackoverflow.com/q/25975868
has body: Try this: 3 2 5 7 Name Email
score: 0

http://stackoverflow.com/a/26003677
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40724609
score: 1
has comment: http://stackoverflow.com/comment/40724672
accepted answer of: http://stackoverflow.com/q/26003550
answers question: http://stackoverflow.com/q/26003550
has body: this is what I explained in the comments: DEMO $(function() { function emailInput(elem) { inputData = $.trim(elem.val()); if (inputData == "") { elem.parent().after(' Can Not be Empty '); } else { return inputData; } } $("#exe").on("click",function(){ $(".err").hide(); if (emailInput($('#email1'))){ alert($('#email1').val()); } }); });
upvote count: 1
has comment: http://stackoverflow.com/comment/40724816
type: AcceptedAnswer

http://stackoverflow.com/comment/40523362
score: 1
has text: http://www.chromium.org/developers/design-documents/user-scripts
type: Comment
comment on: http://stackoverflow.com/q/25892394
type: QuestionComment

http://stackoverflow.com/a/25897844
score: 4
accepted answer of: http://stackoverflow.com/q/25884867
upvote count: 4
has comment: http://stackoverflow.com/comment/40612200
has comment: http://stackoverflow.com/comment/45132730
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40545756
has body: I think you are probably looking for some sort of shortcut, but don't think there is one: var Promise = require('bluebird'); var Book = bookshelf.Model.extend({ tableName: 'books' }); var Page = bookshelf.Model.extend({ tableName: 'pages' }); var Pages = bookshelf.Collection.extend({ model: Page }); Book.forge({name: 'Hello', author: 'World'}).save() .then(function(book) { var pages = Pages.forge([ {pagetitle: 'intro', book: book.id}, {pagetitle: 'chatessr1', book: book.id} ]); return pages.invokeThen('save', null); }).then(function(){ // now all the pages and the book should be saved });
type: Answer
answers question: http://stackoverflow.com/q/25884867

http://stackoverflow.com/q/25945379
has comment: http://stackoverflow.com/comment/40619687
has title: Delete Button Not Working
has comment: http://stackoverflow.com/comment/40619713
accepted answer: http://stackoverflow.com/a/25945588
downvote count: 1
type: Question
tagged with: javascript
has body: Hello Dear Programmers, I've defined a forum based system in which a logged-in user is allowed to delete his posts, recently I've had my delete button smooth and going, but after trying to add up some more scripts for my edit button ( button that allows users to edit their posts ), my delete button lost it's functionality, so far the codes makes total sense, I've checked it few times, but the delete is not working as it used it too ...... snippet below is the ajax part of the code; $(".btn-delete").on("click", function() { var selected = $(this).attr("id"); var pageid = selected.split("del_").join(""); var confirmed = confirm("Are You Sure You Want to Delete This Post?!"); if(confirmed == true) { $.get("ajax/pages.php?id="+pageid); console.log('trying to get ajax/pages.php?id='+pageid); $("#page_"+pageid).remove(); } alert(selected); }); and here is is my forum page in which i'm calling it; &lt;a href="#" id="del_&lt;?php echo $list['id']; ?&gt;" class="btn btn-danger btn-delete"&gt;Delete &lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/a&gt; any help is appreciated buddies, thanks in advance.
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40619729
has answer: http://stackoverflow.com/a/25945588
favorite count: 0
tagged with: ajax
tagged with: php
has comment: http://stackoverflow.com/comment/40619659
score: -1
type: AnsweredQuestion

http://stackoverflow.com/a/25891395
downvote count: 0
has body: When you do $('form').submit(function () { return false }); you are attaching an event handler to the submit event. Thus, if this line executes first, then every time you do $('form').submit();, the event handler will be triggered and return false and not submit. If the .Net control is a submit button, you can simply replace the first line with return false (Edit: and change it to OnClientClick="return validateSelection();"), otherwise you can remove it completely.
upvote count: 3
answers question: http://stackoverflow.com/q/25891282
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25891282
type: Answer
has comment: http://stackoverflow.com/comment/40550136
score: 3

http://stackoverflow.com/a/25922939
has comment: http://stackoverflow.com/comment/40591314
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25921809
has comment: http://stackoverflow.com/comment/40594003
has comment: http://stackoverflow.com/comment/40591539
answers question: http://stackoverflow.com/q/25921809
type: Answer
has comment: http://stackoverflow.com/comment/40591522
has body: First I assume, that you want to position all questions at same position, right? Add some CSS as following: #placeholder { position: relative; } #placeholder .question { position: absolute; } I wrapped your question and the according answers in a DIV with class .question. Change your jQuery code to following: [...] // generate questions progress HTML text var questionHTML = ' Question ' + questionNumber + ' of ' + totalQuestions + ''; [...] answersHTML += ' '; [...] console.log(questionHTML); $("#placeholder").html(questionHTML); }); // end foreach }); // end .getJSON callback animate(); }); // end $(document).ready callback function animate(current) { var count = $('#placeholder .question').length; if (isNaN(current)) { current = 0; } console.log(current); animateOne($('#placeholder .question').get(current), function() { animate(++current % count); }); }; function animateOne(el, callback) { $(el).fadeIn(6000).delay(3000).fadeOut(1000, function() { callback(); }); }; Try out the JSFiddle: http://jsfiddle.net/97buosve/7/ Alternative animation You can use this altenative function to maybe see both questions at same time while fading. I just move the callback to fadeIn back from fadeOut... function animateOne(el, callback) { $(el).fadeIn(6000, function() { callback(); }).delay(3000).fadeOut(1000); }; Try out the JSFiddle: http://jsfiddle.net/97buosve/8/ Alternative animation without loop function animate(current) { var count = $('#placeholder .question').length; if (isNaN(current)) { current = 0; } console.log(current); animateOne( $('#placeholder .question').get(current), // question to animate (current +1 < count), // hide it after fadeIn, only if it isn't the last question function() { // callback to animate the next question if (current +1 < count) { // prevent loop, only set callback if it isn't the last question animate(++current % count); } } ); }; function animateOne(el, hideItAfter, callback) { $(el).fadeIn(6000, function() { callback(); }); if (hideItAfter) {…
upvote count: 1
has comment: http://stackoverflow.com/comment/40592457
score: 1
has comment: http://stackoverflow.com/comment/40592804

name-attribute
tag name: name-attribute
type: Tag
tags question: http://stackoverflow.com/q/25926081

http://stackoverflow.com/q/25926257
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40586988
has comment: http://stackoverflow.com/comment/40586554
type: Question
has body: I have a file (in json format) somefile.json on my server which is regularly updated at selected time intervals. I've a nodeJS app which reads the file on a request event listening at port 8080 and sends it out as response How do I get javascript in a html to request for the json data and log it in console? (tried but failed, see below) (Reason for the console.log is to let me know that it has been successfully loaded.) My nodeJS app var http = require('http'), fs = require('fs'), filename = "somefile.json"; var server = http.createServer(); server.on('request', function(request, response) { response.writeHead(200, {'Content-Type': 'application/json'}) fs.readFile(filename, "utf8", function (err, data) { if (err) throw err; response.write(JSON.stringify(data)); response.end(); }); }); server.listen(8080); somefile.json { "message": { "success":"Information inserted successfully.", "update":"Information updated successfully.", "delete":"Information deleted successfully.", }, "Jennifer": { "status":"Active" }, "James": { "status":"Active", "age":56, "count":10, "progress":0.0029857, "bad":0 } } using cURL on my local machine (OSX) gave me the following: $ curl -i -H "Accept: application/json" http://127.0.0.1:8080 HTTP/1.1 200 OK Content-Type: application/json Date: Fri, 19 Sep 2014 03:39:41 GMT Connection: keep-aliveTransfer-Encoding: chunked "{\n \"message\": {\n \"success\":\"Information inserted successfully.\",\n \"update\":\"Information updated successfully.\",\n \"delete\":\"Information deleted successfully.\",\n },\n \"Jennifer\": {\n \"status\":\"Active\"\n },\n \"James\": {\n \"status\":\"Active\",\n \"age\":56,\n \"count\":10,\n \"progress\":0.0029857,\n \"bad\":0\n }\n}\n" my html (not working)
has answer: http://stackoverflow.com/a/25927203
has comment: http://stackoverflow.com/comment/40586438
has title: Requesting JSON data from client through nodejs
accepted answer: http://stackoverflow.com/a/25927203
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40585546
possible better answer: http://stackoverflow.com/a/25926322
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25926322
tagged with: ajax
has comment: http://stackoverflow.com/comment/40586916
linked to: http://stackoverflow.com/q/3839966
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25938952
has comment: http://stackoverflow.com/comment/40610110
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25938987
score: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25938987
has title: Set value of unknown number of inputs in AngularJS
type: AnsweredQuestion
type: Question
has body: I have a webapp dedicated to TV Shows. A controller fetches the registered TV Shows: $http.get('/shows').success(function(data) { $scope.shows = data; var temp = data[0]; $scope.radio-input-shows = temp['name']; }); This is passed to an AngularJS view, which displays them with a radio button. {{ show.name }} Show = What I need now is to pass the name of a show as a value to the radio input. Is this even possible? ================= So I now changed the input to this . And changed this Show = {{tvshow}} . However, it's still not updating if I click on another radio button... `

http://stackoverflow.com/q/26011715
tagged with: service
has body: I would like to ask, how to inject service into app.js file in Angular app ?(In my case service called DialService). angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']) .run(function($ionicPlatform) { $ionicPlatform.ready(function(DialService) { If I'm trying to call service method, for example: DialService.makeCall(jsonObj.phone_number); I got Uncaught TypeError: Cannot call method 'makeCall' of undefined How can i call service method in app.js ? Thanks for any help. Service is following: /** * Service for making calls */ .factory('DialService', function($ionicLoading) { return { makeCall: function(number) { window.cordova.plugins.DirectCallPlugin.call(number, callSuccessCallback, callFailCallback); } }; var callSuccessCallback = function() { console.log("Success call"); }; var callFailCallback = function() { console.log("Fail calll"); $ionicLoading.show({ template: 'Error during call dial', duration: 1000 }); }; });
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26011835
has title: Angular How to inject service into .run(function?
type: Question
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/25942240
has comment: http://stackoverflow.com/comment/40617717
has body: I'm trying to do infinite scrolling for a page, but the condition to test if we're at the bottom of the page is not behaving correctly on Chrome. On Chrome this alert seems to trigger at the top of the page rather than when hitting the bottom. It works correctly on IE11 though. On Chrome $(document).height() equals 0. I have &lt;!DOCTYPE html&gt; html at the top of my page if it matters. Oddly I took this from another example where it worked perfectly from within jsfiddle on Chrome: http://jsfiddle.net/nick_craver/gWD66/ $(window).scroll(function () { if ($(window).scrollTop() + $(window).height() == $(document).height()) { alert("test"); } } }
has comment: http://stackoverflow.com/comment/40615009
accepted answer: http://stackoverflow.com/a/25980989
type: AnsweredQuestion
score: 0
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25980989
has comment: http://stackoverflow.com/comment/40614812
has comment: http://stackoverflow.com/comment/40615317
possible better answer: http://stackoverflow.com/a/25942537
has comment: http://stackoverflow.com/comment/40614865
has answer: http://stackoverflow.com/a/25942537
has title: JavaScript to detect bottom of page does the reverse on Chrome

http://stackoverflow.com/q/25956937
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/31228568
has title: How to build minified and uncompressed bundle with webpack?
has body: Here's my webpack.config.js var webpack = require("webpack"); module.exports = { entry: "./entry.js", devtool: "source-map", output: { path: "./dist", filename: "bundle.min.js" }, plugins: [ new webpack.optimize.UglifyJsPlugin({minimize: true}) ] }; I'm building with $ webpack In my dist folder, I'm only getting bundle.min.js bundle.min.js.map I'd also like to see the uncompressed bundle.js
has answer: http://stackoverflow.com/a/32946206
tagged with: node.js
has answer: http://stackoverflow.com/a/34018909
linked to: http://stackoverflow.com/q/44113359
accepted answer: http://stackoverflow.com/a/34018909
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/37762405
type: Question
upvote count: 271
possible better answer: http://stackoverflow.com/a/31228568
has answer: http://stackoverflow.com/a/26197359
has answer: http://stackoverflow.com/a/40772319
has answer: http://stackoverflow.com/a/56576698
tagged with: webpack
has answer: http://stackoverflow.com/a/37191699
has answer: http://stackoverflow.com/a/41933671
has answer: http://stackoverflow.com/a/46813227
answer count: 14
has answer: http://stackoverflow.com/a/48158360
has answer: http://stackoverflow.com/a/41914146
has answer: http://stackoverflow.com/a/32687741
has answer: http://stackoverflow.com/a/55978987
score: 270
downvote count: 1

http://stackoverflow.com/comment/40634168
score: 0
type: Comment
has text: Even with the float, it's still not showing them side by side. Could you give me an example of code that would make the words side by side?
comment on: http://stackoverflow.com/a/25954179
type: AnswerComment

http://stackoverflow.com/a/25900306
score: 1
type: Answer
upvote count: 1
has body: Try this: $('#cmbBlockID').change(function(){ $("tr").show(); cmbBlkID = $("#cmbBlockID").val(); if (cmbBlkID != 0){ $("a[blockID!='"+cmbBlkID+"']").parent().parent().hide(); // or $("tr").find('a').not('[blockID='"+cmbBlkID+"']').hide(); } });
accepted answer of: http://stackoverflow.com/q/25900237
answers question: http://stackoverflow.com/q/25900237
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40538578

http://stackoverflow.com/comment/40725449
type: QuestionComment
has text: Well, but in practice I think that indexing an array is much faster than accessing an object's field (since the later requires some kind of hashing and the former is really a memory access, provided that the array is not sparse and it's a "real" array (not just an object with numerical fields))
score: 0
comment on: http://stackoverflow.com/q/26003977
type: Comment

http://stackoverflow.com/q/26003978
has body: If I use the session$sendCustomMessage command in my server file and input a list of three things, how do I access the three different things in my message-handler.js file? Say my call looks like this: session$sendCustomMessage(type='testmessage', message=list(pid=pid, cid=cid, query=sql)) In my .js file I want to use pid, cid and query seperately, any ideas on how I do that? Thanks!!
favorite count: 0
upvote count: 9
tagged with: http://stackoverflow.com/tag/r
has answer: http://stackoverflow.com/a/26004253
accepted answer: http://stackoverflow.com/a/26004253
tagged with: shiny
linked to: http://stackoverflow.com/q/18701030
has comment: http://stackoverflow.com/comment/40727018
type: Question
has title: Shiny and JavaScript interaction with session$sendCustomMessage
type: AnsweredQuestion
score: 9
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25942537
upvote count: 1
answers question: http://stackoverflow.com/q/25942240
downvote count: 0
type: Answer
score: 1
has body: What kind of CSS is applied to the page, more so the body element? It could be some padding or margin that is making the $(document).height() equal something more than the combination of $(window).scrollTop() and $(window).height(). The following code will help you determine if you are ever actually meeting the if() criteria. What version of jQuery are you using? $(window).scroll(function() { var scrollPosition = $(window).scrollTop() + $(window).height(); var bodyHeight = $(document).height(); $("#scrollIndex").html( scrollPosition + " / " + bodyHeight ); if( scrollPosition == bodyHeight ) { $("#scrollIndex").html( "BOTTOM!" ); $('body').height( bodyHeight + 200 + "px" ); } }); body{ height:2000px; } #scrollIndex{ position:fixed; top:0px; right:0px; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id='scrollIndex'&gt;&lt;/div&gt;

http://stackoverflow.com/a/25969226
downvote count: 1
answers question: http://stackoverflow.com/q/25969162
type: Answer
score: 1
has body: Note that this is not a multi-dimensional array. It's a simple array of objects. If all of the objects have a kid property, then it's a trivial use of map: var values = theArray.map(function(entry) { return entry.kid; }); If only some of the objects have a kid property, then forEach: var values = []; theArray.forEach(function(entry) { if (entry.hasOwnProperty("kid")) { values.push(entry.kid); } }); Note that both options loop through the array, which is unavoidable.
upvote count: 2

http://stackoverflow.com/a/25925415
downvote count: 0
type: Answer
has body: Live demo Try this regex : '/([^,]+)/' Alternatively, strings in javascript have a split method that can split a string based on a delimeter: s.split(',')
answers question: http://stackoverflow.com/q/25925393
has comment: http://stackoverflow.com/comment/40584154
upvote count: 5
has comment: http://stackoverflow.com/comment/40584127
score: 5

http://stackoverflow.com/q/26015214
type: Question
has comment: http://stackoverflow.com/comment/40748701
type: AnsweredQuestion
tagged with: javascript
tagged with: struts
has title: How to use Struts1 tag in JavaScript?
has answer: http://stackoverflow.com/a/26067764
accepted answer: http://stackoverflow.com/a/26067764
score: 0
answer count: 1
tagged with: jsp
has body: I need to display a form having flowing requirements. The first element is a drop down with four values. Based on the value selected from the first drop down ,I have to display either drop down or text filed (dynamically) as a second element. My project is in Struts 1.1 and view is JSP. I have to use struts text filed and drop down. How do I achieve this? <bean:message key="edec.declaration.permit_detail_key" /> <bean:message key="prompt.selectone" /> <html:options filter="false" collection="<%= option373_userName %>" property="code" labelProperty="<%=code_list_option%>" /> <logic:present name="<%= option374_userName %>" scope="application"> <bean:message key="edec.declaration.permit_detail_value" /> <bean:message key="prompt.selectone" /> <html:options filter="false" collection="<%= option374_userName %>" property="code" labelProperty="<%=code_list_option%>" /> </logic:present> permitDetail.alignControl = function() { var permit_detail_key_selected = document.forms[0].permit_detail_key.value; // alert(permit_detail_key_selected); if (permit_detail_key_selected == "1" || permit_detail_key_selected == "2") { document.getElementById("temp").innerHTML = "" } else { document.getElementById("temp").innerHTML = ""; } } How to make these inner html as struts textbox or conmbobox?
tagged with: struts-1
has comment: http://stackoverflow.com/comment/40748509

http://stackoverflow.com/q/26014792
has body: I'm stuck with this problem for so long that I think that I'm missing something obvious. Here's simplified model of my case: There is Patient that has all meds that he/she takes. And there is Medicine that has all patients who takes it. // Patient model Yo.Patient = DS.Model.extend({ firstName: DS.attr('string'), lastName: DS.attr('string'), meds: DS.hasMany('medicine') }); // Medicine model Yo.Medicine = DS.Model.extend({ title: DS.attr('string'), patients: DS.hasMany('patient') }); I've read official manual and many resources. The last one and closest to my case was this Toptal tutorial. Here's what I do now: Before saving new patient I'm pushing array of Medicine objects to newPatient.meds. Then I save newPatient. After save is done I'm going through array of Medicine objects pushing newPatient to each of them and saving each. newPatient.get('meds').pushObjects(meds); newPatient.save().then(function (p) { for (var i = 0; i &lt; meds.length; i++) { meds[i].get('patients').pushObject(p); meds[i].save(); }; }); But result isn't what it meant to be. Saved patient doesn't have any meds. In POST request to server meds is empty array. Saved meds each has patient id in patients. But it always has null on zero position of array. Also there already was similar question on StackOverflow. But solution is not very usable. And answer is 1.5 years old which is eternity in Ember world. Edit Proposed in comments by Josh RecordArray as I see now cant't be used in my case. Or maybe it can, but I don't know how. I have a form for creating new patient. There's list of meds checkboxes. So I need to push only checked ones to newPatient.meds. What I do now: I get ids of checked checkboxes (which equals to corresponding object id), then get Medicine instance for each id and put it in array. Then I try to push it in `newPatient.meds'.
type: AnsweredQuestion
score: 2
tagged with: many-to-many
downvote count: 0
has comment: http://stackoverflow.com/comment/40782336
type: Question
has answer: http://stackoverflow.com/a/27707041
accepted answer: http://stackoverflow.com/a/27707041
linked to: http://stackoverflow.com/q/15624193
tagged with: ember-data
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/19458335
has title: How to save models with many-to-many relationship in Ember.js?
answer count: 1
has comment: http://stackoverflow.com/comment/40769530
favorite count: 0
tagged with: rest
has comment: http://stackoverflow.com/comment/40769458
tagged with: ember.js

http://stackoverflow.com/q/25933389
tagged with: javascript
tagged with: xss
score: 0
has comment: http://stackoverflow.com/comment/40599210
tagged with: exploit
linked to: http://stackoverflow.com/q/17689005
has body: There is now a UXSS metasploit module for stock Android browsers that it would be great to have a defence against. One such defence is to use X-Frame-Options and additionally be able to know that there is no javascript reference to the window. My question is whether it is possible to determine that no other window holds a reference to the current window object because it was not opened using javascript. This answer is not relevant since in this case no co-operation with the opener exists.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40599780
has comment: http://stackoverflow.com/comment/40611380
has title: Determine if window was opened using javascript
has comment: http://stackoverflow.com/comment/40702408
type: Question
has answer: http://stackoverflow.com/a/25934450
answer count: 1

http://stackoverflow.com/comment/40619785
type: QuestionComment
has text: Thanks for letting me know what StackOverflow is! Now, seriously, no one can share the answer, because this is not a question. This is you letting us know that you want to do something, but that you don't know how to do it. What you want to do can be done in a 1000000 different ways, and you were obviously too lazy to try to figure it out, so you decided to come here and try to get someone to do that for you. Have a look at this: http://stackoverflow.com/tour and read about what to ask and what not to ask and maybe then you will understand why this is not an appropriate question.
comment on: http://stackoverflow.com/q/25945321
score: 0
type: Comment

http://stackoverflow.com/comment/40661635
comment on: http://stackoverflow.com/q/25969162
has text: `array.map(function(x) { return x.whatever })`
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/comment/40773607
comment on: http://stackoverflow.com/q/26030509
score: 0
has text: why not just use two classes?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25888198
has body: = is for assignment ,use == for comparison use if (username.value == "username123") not if (username.value = "username123") for comparison Change 1. if (username.value = "username123") { if (password.value="abc123") 2. document.getElementByid('password'); 3. var x = document.forms["form"]["fname"].value; To 1. if (username.value == "username123")//== for comparison { if (password.value == "abc123") 2. document.getElementById('password'); 3. var x = document.forms["form"].value; DEMO
answers question: http://stackoverflow.com/q/25887965
score: 0
type: Answer

http://stackoverflow.com/a/26022775
upvote count: 1
downvote count: 0
has body: Try looping through the string and replacing until none are left. Replace will only replace first in string. Example: while(y.indexOf("&amp;nbsp;") != -1) { y.replace("&amp;nbsp;", " "); }
type: AcceptedAnswer
score: 1
answers question: http://stackoverflow.com/q/26022757
has comment: http://stackoverflow.com/comment/40760598
accepted answer of: http://stackoverflow.com/q/26022757
type: Answer

chat
tags question: http://stackoverflow.com/q/25929841
tag name: chat
type: Tag

http://stackoverflow.com/comment/40556098
type: Comment
type: QuestionComment
has text: @user3571366 its very simple: var el = $(data); //html from ajax input.append(el);
comment on: http://stackoverflow.com/q/25910174
score: 0

http://stackoverflow.com/q/25970381
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25970722
has comment: http://stackoverflow.com/comment/40663929
type: Question
tagged with: document-body
has body: I have a table with by default 25 rows, when i scroll at the bottom of the table i want to insert 25 more rows etc... everything is working correctly, but in a specific table i want to keep the last row of the first 25 rows and put the 25 next before it. Ex : .... After scrolling i want to have: ... ... So i just want to keep this "row 25" at the bottom of the table So i am trying to do the ajax with function ScrollLoader(){ $.ajax({ url: '../myScrollLoader/scroll.inc.php', type: 'POST', data: $('#formScrollLoader').serialize(), success: function(result) { $("#maintable tbody>tr:last").prev("tr").append(result); $(window).data('ajaxready', true); } } }); } It barely works but the 25 "next" are adding Inside the last TD of the 24 row and not After him (I'm not sure if i'm totaly clear with my english)
has title: Insert rows into table (second last) with ajax
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25970722
tagged with: ajax

http://stackoverflow.com/comment/40600431
has text: Could you show kind of screenshot/mockup what is the expected result? I'm not sure if I understand you correctly.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25910114
score: 0

http://stackoverflow.com/a/25996594
score: 2
has body: Your "button" is not truly a button. You need to approach it differently. Either make it a &lt;button&gt; or in AjaxOnCompleteDisableButton assign it a class that will make it look like it's disabled (say opacity: 0.5) and ignore the triggering events on it.
downvote count: 0
answers question: http://stackoverflow.com/q/25996486
upvote count: 2
type: Answer

http://stackoverflow.com/comment/40568973
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25910903
type: Comment
has text: When mouse button is clicked down, for each mousemove, I use `redraw()` from http://s419743653.onlinehome.fr/things/TextboxesOnClick4%28contenteditable-lotsof1000-simpler%29.html . Basically in this function, there is a loop on all DOM elements, and I change their position : `$(this).offset({ top: newy, left: newx})`

http://stackoverflow.com/q/25928605
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has title: In iOS8 Safari, readonly inputs are handled incorrectly
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25929657
has body: In Safari, iOS8, focusing in a date or a time input opens up the date or time picker and allows editing the content of the readonly input. When focusing in a text input, a toolbar appears at the bottom with previous, next and Done buttons, and not going away until Done is tapped, or another input on the page is tapped. When the input is focused programatically from Javascript, nothing is happening, but: if a touchstart event listener is added to some part of the page, touching anywhere will bring up the date, time picker, or the toolbar, even if the listener is empty. Sample code: &lt;input id="test1" readonly /&gt; &lt;input id="test2" type="date" readonly /&gt; &lt;input id="test3" type="time" readonly /&gt; &lt;script&gt; document.getElementById('test1').focus(); window.addEventListener('touchstart', function () {}); &lt;/script&gt; Live example: http://jsfiddle.net/cw3hump4/embedded/result/ Any ideas or workarounds on how to avoid this? UPDATE: For usability/accessibility reasons I need focus management: tapping on the input opens up a dialog, when the dialog is closed, I put the focus back on the input. The input must be readonly, to prevent soft keyboard / date picker / time picker pop up, but cannot be disabled, so I can set a value, and focus on it.
tagged with: mobile-safari
type: Question
score: 9
has answer: http://stackoverflow.com/a/26928381
tagged with: ios8
upvote count: 9
tagged with: ios
has comment: http://stackoverflow.com/comment/136056933

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

http://stackoverflow.com/comment/40636403
has text: This is generally a Bad Idea because any for...in loops that do not guard with `hasOwnProperty` will iterate over this function you are adding, which is probably not what you will want. As Jesse said, use `Object.keys` if your target platforms support it (basically everything but IE < 9), otherwise consider writing a separate utility function not hung off of `Object.prototype`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955514
score: 0

http://stackoverflow.com/q/25880511
has body: I am creating an Ember application using the Ember CLI. I have a view which invokes a component that I created. I am trying to access the global App variable to create my component and insert it into my layout. The error: Uncaught ReferenceError: App is not defined How do I fix this? app.js import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; Ember.MODEL_FACTORY_INJECTIONS = true; var App = Ember.Application.extend({ modulePrefix: 'client-web', // TODO: loaded via config Resolver: Resolver }); loadInitializers(App, 'client-web'); export default App; item-table.js (This is a view) import Ember from 'ember'; export default Ember.View.extend({ templateName: 'item-table', didInsertElement: function() { // All my other code here App.FreestyleChartComponent.create().appendTo($('#wp-chart td')); // This throws an error. } }); app/components/freestyle-chart.js import Ember from 'ember'; export default Ember.Component.extend({ templateName: 'components/freestyle-chart', didInsertElement: function() { console.log('Inserted the component.'); } });
tagged with: javascript
has answer: http://stackoverflow.com/a/25881076
tagged with: ember.js
downvote count: 0
tagged with: ember-cli
has answer: http://stackoverflow.com/a/25880545
favorite count: 0
has answer: http://stackoverflow.com/a/25896025
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/54963470
has title: How do I access the Ember global 'App' variable in an Ember CLI application?
score: 14
upvote count: 14
has answer: http://stackoverflow.com/a/32509834
type: Question
has comment: http://stackoverflow.com/comment/40540294

http://stackoverflow.com/comment/40602506
has text: Thanks! Removing fieldset did the trick.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25935061
type: Comment

http://stackoverflow.com/a/26028334
upvote count: 1
downvote count: 1
score: 0
type: Answer
has body: var $img = $('#images img'); /* Cache your selector */ $('#nav li').click(function(){ $img.fadeOut().eq( $(this).index() ).stop().fadeIn(); }); #images{ position:relative; } #images img{ position:absolute; left:0; } #images img + img {display:none; } /* hide all but first */ 1 2 3
answers question: http://stackoverflow.com/q/26027787

http://stackoverflow.com/comment/40676269
type: QuestionComment
comment on: http://stackoverflow.com/q/25977155
type: Comment
score: 0
has text: use [jquery](http://api.jquery.com/) to catch the click event, and later use the $('div_with_you_dates').show();

http://stackoverflow.com/comment/40555937
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25890149
score: 0
has text: if you intersect with the object you can trigger an alert or draw text

http://stackoverflow.com/q/26003490
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/26022947
favorite count: 0
upvote count: 2
has body: I'm working on an page that contains a rectangular inner-block inside a container. The inner-block can be dragged and also be scaled when you scroll the mouse. [ See my JSFiddle. ] The center of the screen is the origin point of the zoom transformation, so when the inner-block is centered in the page it appears to simply scale, but when you drag the inner-block about the center origin point, it will scale appropriately around or away from the center point of the screen. I marked the center screen point with a small red dot in the JSFiddle so its easier to see. As the inner-block is dragged around I recalculate the top/left coords of it, and also the difference between that position and the center of the page in order to get the transformation-origin adjustment coords. PROBLEM: It works fine when the inner-block is scale-factor 1, but if you zoom and then drag the object, it unexpectedly jumps position and doesn't zoom back correctly. Are you able to see what I am doing wrong, or what I would need to add to prevent the unexpected behavior? Thanks in advance! //Get center of the page "origin" var originX = $('.block').width()/2; var originY = $('.block').height()/2; //Get center point of the inner-block var blockRX = $('.inner-block').width()/2; var blockRY = $('.inner-block').height()/2; //Set position of the inner-block to match center origin initially $(".inner-block").css({top: originY-blockRY, left: originX-blockRX}); $(".inner-block").draggable(); //Initial Scale 1:1 var scale_system = 1; //Get Top/Left coords of inner-block var blockTop = $('.inner-block').offset().top; var blockLeft = $('.inner-block').offset().left; //Calculate diff between center of page and Top/Left of inner-block var xCalc = (originX-blockLeft); var yCalc = (originY-blockTop); //Set origin of transformations as center of page (in relation to Top/Left) //Using the just calculated values $(".inner-block").css({"-webkit-transform-origin": xCalc+"px "+yCalc+"px"}); //Zoom settings var maxScale…
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26022947
type: Question
score: 2
has title: Dynamically change transform-origin for a scale in jquery after drag
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25876943
score: 2
downvote count: 0
has body: The addon needs another library to work: net.tanesha.recaptcha4j:recaptcha4j:0.0.7 see https://github.com/wbstr/vaadin-recaptcha/blob/master/vaadin-recaptcha/pom.xml
answers question: http://stackoverflow.com/q/25876095
accepted answer of: http://stackoverflow.com/q/25876095
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/25996272
type: Answer
answers question: http://stackoverflow.com/q/25995525
upvote count: 1
score: 1
downvote count: 0
has body: Innovative/Alternative way to show timers using requestAnimationFrame, http://jsfiddle.net/wjtkr95t/4/ wich has less impact to the browser's memory.It also allows you with some minor modifications to have more control over timers,animations ... whatever... var end, now=Date.now, raf=window.requestAnimationFrame, duration=120000,//MS out=document.getElementById('out'); function displayTime(){ var c=end-now(); out.textContent=ms2TimeString(c&gt;0?(raf(displayTime),c):0); } function go(){ end=now()+duration; raf(displayTime); } Ms to timeString function function ms2TimeString(a,k,s,m,h){ return k=a%1e3, s=a/1e3%60|0, m=a/6e4%60|0, h=a/36e5%24|0, (h?(h&lt;10?'0'+h:h)+':':'')+ (m&lt;10?0:'')+m+':'+ (s&lt;10?0:'')+s+'.'+ (k&lt;100?k&lt;10?'00':0:'')+k } https://codereview.stackexchange.com/q/45335/33435 DEMO http://jsfiddle.net/wjtkr95t/ DEMO (change the color) .. only 100ms.. change it http://jsfiddle.net/wjtkr95t/1/ DEMO (change the color after 2 sec) .. only 100ms.. change it http://jsfiddle.net/wjtkr95t/2/ DEMO (change the color after 2 sec with 700ms color animation) http://jsfiddle.net/wjtkr95t/3/ if you have any questions just ask

http://stackoverflow.com/q/25876813
has body: So I have a model in my ember application that looks like this: import DS from 'ember-data'; export default DS.Model.extend({ title: DS.attr("string"), highscore: DS.attr("number"), type: DS.attr("string"), choices: DS.hasMany("word-part"), usedChoices: DS.hasMany("word-part"), controller: DS.attr("string", {defaultValue: "activity"}) }); And I need to be able to pop items out of the choices array, but it seems it's not a mutable array. I've been looking over the docs and I can't find a way to have choices resolve as a MutableArray. Is there something I'm missing here? It appears the choices property of resolved models is readonly, so I can't even overwrite the entire array. Any help would be greatly appreciated.
type: UnansweredQuestion
tagged with: arrays
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: ember.js
has answer: http://stackoverflow.com/a/31919571
has title: Ember data mutable array in hasMany relationship
upvote count: 1
answer count: 1

http://stackoverflow.com/q/25873639
has comment: http://stackoverflow.com/comment/40490227
possible better answer: http://stackoverflow.com/a/25874044
has answer: http://stackoverflow.com/a/25873976
upvote count: 5
has comment: http://stackoverflow.com/comment/40490273
has answer: http://stackoverflow.com/a/25874044
has comment: http://stackoverflow.com/comment/40498267
has answer: http://stackoverflow.com/a/47004636
type: Question
score: 5
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: jQuery onclick not working on mobile
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25873757
answer count: 4
has comment: http://stackoverflow.com/comment/40490001
accepted answer: http://stackoverflow.com/a/25873757
type: AnsweredQuestion
has body: I'm trying to activate a menu with jQuery with a click (touch) on mobile, but it is not working in mobile. When I do the 'window' resize to try the mobile look, it works with the click, but in an emulator or even trying it with my phone, it doesn't work. HTML Markup &lt;img src="i/mobilemenu.jpg" id="mobileMenuButton" style="position:absolute; right:0;"/&gt; CSS: #mobileNavigation {display:none} Javascript Code: &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#mobileMenuButton').on('click touchstart',function(){ if ($('#mobileNavigation').css('display') == 'none') { $('#mobileNavigation').css('display','block'); } else { $('#mobileNavigation').css('display','none'); } }); }); &lt;/script&gt;

http://stackoverflow.com/a/25876545
has body: You have to do it this way in older versions of IE (6-8): styleElement.styleSheet.cssText = "a { color: red; }"; You can do something like this to support multiple browsers/versions: var style = "a { color: red; }"; if(styleElement.styleSheet) styleElement.styleSheet.cssText = style; else styleElement.appendChild(document.createTextNode(style));
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40495124
has comment: http://stackoverflow.com/comment/51606658
accepted answer of: http://stackoverflow.com/q/25876410
type: Answer
answers question: http://stackoverflow.com/q/25876410
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40495734
upvote count: 2

http://stackoverflow.com/q/25921548
has answer: http://stackoverflow.com/a/25948896
tagged with: youtube-javascript-api
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25948896
has title: Why is this if statement in my event handler not working on iOS?
possible better answer: http://stackoverflow.com/a/25922813
type: Question
has answer: http://stackoverflow.com/a/25922813
tagged with: ios
tagged with: javascript
score: 0
answer count: 2
tagged with: marionette
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/40577669
has body: I have an event handler in my Backbone app that listens for when a YouTube video ends, then find the next video and plays it. It works perfectly on desktop, but not on iOS. It recognizes the event and fires the handler, but my if statement doesn't work for some reason. App.Player.addEventListener('onStateChange', function(newState){ // Play / Pause functionality var currentSong = App.Player.getVideoData(); if (theVideoId == currentSong.video_id){ if (newState.data == 1){ $("#play-pause").addClass("playing") } else if (newState.data == 2){ $("#play-pause").removeClass("playing") } }; // When song ends, play the next song in playlist if (newState.data == 0){ for (var i=0; i &lt; App.playList.size(); i++){ if (App.playList.models[i].get("id") == App.nowPlaying.get("id")){ // none of this code executes on iOS, but works fine on desktop var nextVideo = App.playList.models[i+1]; var promise = nextVideo.fetch(); $.when(promise).then(function(){ App.Player.cueVideoById(nextVideo.get("video")).playVideo();; App.nowPlaying = nextVideo; }); } } } }); }, Any idea why this is happening, and how I can fix it?

image
tags question: http://stackoverflow.com/q/26006216
tags question: http://stackoverflow.com/q/25938276
tags question: http://stackoverflow.com/q/25875835
tags question: http://stackoverflow.com/q/25917578
tags question: http://stackoverflow.com/q/26016354
tags question: http://stackoverflow.com/q/25882495
tags question: http://stackoverflow.com/q/25930335
tags question: http://stackoverflow.com/q/25927668
tags question: http://stackoverflow.com/q/25880296
tags question: http://stackoverflow.com/q/25881861
tags question: http://stackoverflow.com/q/26014751
tags question: http://stackoverflow.com/q/25949470
tags question: http://stackoverflow.com/q/25973554
tags question: http://stackoverflow.com/q/26008696
tags question: http://stackoverflow.com/q/25949445
tags question: http://stackoverflow.com/q/25969321
tags question: http://stackoverflow.com/q/25876235
tags question: http://stackoverflow.com/q/25984979
tags question: http://stackoverflow.com/q/25974510
tags question: http://stackoverflow.com/q/25881939
tags question: http://stackoverflow.com/q/25999038
tags question: http://stackoverflow.com/q/25914858
tags question: http://stackoverflow.com/q/25947629
tags question: http://stackoverflow.com/q/25894855
tags question: http://stackoverflow.com/q/25936725
tags question: http://stackoverflow.com/q/26007713
tags question: http://stackoverflow.com/q/26003323
tag name: image
tags question: http://stackoverflow.com/q/25958431
tags question: http://stackoverflow.com/q/26033164
tags question: http://stackoverflow.com/q/25966348
type: Tag
tags question: http://stackoverflow.com/q/25991333
tags question: http://stackoverflow.com/q/25903352

http://stackoverflow.com/q/25956372
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25956489
has body: I have seen a couple of examples where I could detect with jquery if someone is typing in a textarea. However, I have not found a proper solution to my problem. I have two textareas and while I am writing in one, I want to block the other textarea, so the user can't access it. However, if the user decides otherwise and deletes the text I want both textareas to be accessable again for the user. Is there any hint or lead that might help me solve this problem with jquery?
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25956489
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40638066
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25956464
has title: Type in one textarea while blocking the other
possible better answer: http://stackoverflow.com/a/25956464

http://stackoverflow.com/comment/40648779
score: 0
type: Comment
type: QuestionComment
has text: Awfully sorry. I should most likely add comments to my work http://jsfiddle.net/clarinetking/kLy83oxj/17/
comment on: http://stackoverflow.com/q/25962013

http://stackoverflow.com/q/25921095
has body: When connecting the client to the server (the server written in node or one of its frameworks) I am told there are 3 ways this can be accomplished. The first, and most obvious to me, is using AJAX. The second can be done by using socket.io. My question is what is the third? Does anyone know of a good resource that explains these three ways?
tagged with: client-server
answer count: 2
has comment: http://stackoverflow.com/comment/40577041
score: -2
tagged with: javascript
downvote count: 3
upvote count: 1
tagged with: connection
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40578783
tagged with: node.js
has comment: http://stackoverflow.com/comment/40576876
has title: Ways to connect client-side to server-side
has answer: http://stackoverflow.com/a/25921579
has answer: http://stackoverflow.com/a/26016606
type: Question

http://stackoverflow.com/a/73383680
upvote count: 0
has body: You can close the window if it was opened to users by a link like: &lt;А rel='opener' href='test.net '&gt;&lt;/А&gt; pay attention to the tag: rel='opener'
score: -1
answers question: http://stackoverflow.com/q/25937212
downvote count: 1
type: Answer

http://stackoverflow.com/a/25970906
downvote count: 0
answers question: http://stackoverflow.com/q/25970543
type: Answer
score: 1
upvote count: 1
has body: Try this: ^(?![0-9]*$)[a-zA-Z0-9\s_]+$ This expression has a negative lookahead to verify that the string is not only numbers. See it in action with regexr

http://stackoverflow.com/q/25975869
has comment: http://stackoverflow.com/comment/40673534
type: Question
tagged with: javascript
score: 4
possible better answer: http://stackoverflow.com/a/25976113
has title: JavaScript try-catch not working
answer count: 2
has answer: http://stackoverflow.com/a/25976113
has answer: http://stackoverflow.com/a/25975882
accepted answer: http://stackoverflow.com/a/25975882
favorite count: 0
has body: I am new to Java Script. In the below code I am trying to create an error intentionally to learn how try...catch works. But nothing is running. &lt;html&gt; &lt;body&gt; &lt;p id="demo"&gt;&lt;/p&gt; &lt;script&gt; try { adddlert("Hi User!"); } catch(Error e) { document.getElementById("demo").innerHTML = e.message; } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; What I am missing?
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/25959090
type: AnsweredQuestion
score: -2
type: Question
upvote count: 0
tagged with: greasemonkey
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: key
linked to: http://stackoverflow.com/q/3301680
favorite count: 0
has title: How to set a key to change style of a node?
tagged with: http://stackoverflow.com/tag/html
downvote count: 2
has body: I'm doing an userscript of Greasemonkey and I want set a key to change style display:"" of none to block and vice versa of a node by press a key ("Home" in this case). var bluebar = document.getElementById('pagelet_bluebar'); bluebar.style.display = "none"; document.addEventListener("keydown", function (e) { if (e.keyCode == 36) { showhideui(); } }, false); function showhideui() { if (bluebar.style.display = "none") { bluebar.style.display = "block"; } else if (bluebar.style.display = "block") { bluebar.style.display = "none"; } } The solution was add == instead = in the conditions: if (bluebar.style.display == "none") else if (bluebar.style.display == "block")
has answer: http://stackoverflow.com/a/25959553
accepted answer: http://stackoverflow.com/a/25959553

http://stackoverflow.com/q/25900884
has comment: http://stackoverflow.com/comment/40539464
has comment: http://stackoverflow.com/comment/40539386
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25901061
has body: Is there a way to have an ngMaxlength attribute present on an input element but have it have a value of "Infinity" (yes I know I could do this by not having the attribute altogether, but that would require a refactor which I'm trying to avoid)? I've tried setting the ngMaxlength to 0, -1, infinity and Infinity and none of them seem to work. We're on AngularJS 1.0.5 by the way. Per a comment, here's what I'm trying to do: We have a directive that lets our programmers write CRUD-y tables in the following way (this example doesn't show delete and several other features that are irrelevant to my question, in case you were wondering why I say CRUD and not CRU): &lt;crud-table url="api/url-to-perform-get-post-and-put-on"&gt; &lt;crud-table-column title="Title of Column 0" field="fieldThatContainsData0" type="text"&gt;&lt;/row&gt; &lt;crud-table-column title="Title of Column 1" field="fieldThatContainsData1" type="checkbox"&gt;&lt;/row&gt; &lt;crud-table&gt; I'd like to just change the API make maxlength an attribute on &lt;row /&gt; because one of the usages has that requirement. The easiest way to do this with minimal change to existing code is to just interpolate that value to a maxlength attribute above to the input element that is created (not show) by the directive when the type of the row is text. It's just less work if I can have a value that means "Infinity" I can put inside the maxlength attribute instead of having to omit the attribute altogether to convey the same meaning. If the answer to my question is "You can't" I can figure it out; I just didn't want to refactor the crud-table-column directive to not use a template.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40539263
accepted answer: http://stackoverflow.com/a/25901061
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29973653
has title: Is there a way to have an ngMaxlength attribute present on an input element but have it have a value of "Infinity"?
favorite count: 0
has comment: http://stackoverflow.com/comment/40539231
has answer: http://stackoverflow.com/a/29973653

http://stackoverflow.com/comment/84176016
comment on: http://stackoverflow.com/a/26009971
type: Comment
score: 0
type: AnswerComment
has text: Surely there's an easier way to do this with lodash

http://stackoverflow.com/q/25882355
tagged with: button
tagged with: javascript
has answer: http://stackoverflow.com/a/25882416
score: 0
accepted answer: http://stackoverflow.com/a/25882416
tagged with: php
possible better answer: http://stackoverflow.com/a/66031544
has answer: http://stackoverflow.com/a/66031544
type: AnsweredQuestion
tagged with: twitter
has title: adding a twitter share button to my site
has body: I am thinking of adding a twitter share button to my site, I got the code from here, but the problem is that button appears with an image of a bird and the text "tweet", is there a way to have my own button, just want to have a div size 16*16px with img of a bird that does the same thing as the twitter button. for example see how this site does it.
type: Question
answer count: 2

http://stackoverflow.com/q/25912961
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40563523
has comment: http://stackoverflow.com/comment/40561151
has title: extract text from pdf in chrome extensions
score: 1
has comment: http://stackoverflow.com/comment/40564338
downvote count: 1
has comment: http://stackoverflow.com/comment/40567750
type: Question
has answer: http://stackoverflow.com/a/25913568
has comment: http://stackoverflow.com/comment/40591004
has body: I am developing a chrome extensions. What i want to realize is that the popup can display the text from pdf. I have searched the PDF.js and write the following code in backgroud.js of chrome extensions to test: ‘use strict’; var pdf = PDFJS.getDocument('http://www.pacer.gov/documents/pacermanual.pdf'); var pdf = PDFJS.getDocument('pacermanual.pdf'); pdf.then(function(pdf) { var maxPages = pdf.pdfInfo.numPages; for (var j = 1; j <= maxPages; j++) { var page = pdf.getPage(j); // the callback function - we create one per page var processPageText = function processPageText(pageIndex) { return function(pageData, content) { return function(text) { // bidiTexts has a property identifying whether this // text is left-to-right or right-to-left for (var i = 0; i < text.bidiTexts.length; i++) { str += text.bidiTexts[i].str; } if (pageData.pageInfo.pageIndex === maxPages - 1) { // later this will insert into an index console.log(str); } } } }(j); var processPage = function processPage(pageData) { var content = pageData.getTextContent(); content.then(processPageText(pageData, content)); } page.then(processPage); } }); The manifest is shown as follow: { "name": "englishhelper", "version": "0.0.1", "description": "", "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background":{ "script":["background.js","PDF.js"] }, "browser_action":{ "default_icon":"icon_png", "default_popup":"popup.html" }, "manifest_version": 2 } The popup.html is shown as follow: The console shows that "PDFJS is not defined". The "PDF.js" has been included in popup.html. Is it possible that chrome extension use PDF.js?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40561435
has comment: http://stackoverflow.com/comment/40563988
has comment: http://stackoverflow.com/comment/40560966
has comment: http://stackoverflow.com/comment/40591142
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
has comment: http://stackoverflow.com/comment/40561174
favorite count: 0
has comment: http://stackoverflow.com/comment/40583497
has comment: http://stackoverflow.com/comment/40563942
upvote count: 2
has comment: http://stackoverflow.com/comment/40583060

http://stackoverflow.com/q/25994451
has answer: http://stackoverflow.com/a/26045858
linked to: http://stackoverflow.com/q/3243684
linked to: http://stackoverflow.com/q/16707249
type: Question
has body: I want to show alert on only on close tab/window. Right now i have did something as shown bellow, but it fires even on 'F5', back button of browser... but I only want it on tab/window close. I tried so much on this and also checked so many stackoverflow links but didn't get any solution window.onbeforeunload = function(e) { return confirmExit() } function confirmExit() { //my logic return false; } also added following code to prevent onbeforeunload on click of any link in my site $(document).ready(function() { $('a[rel!=ext]').click(function() { window.onbeforeunload = null; }); $('form').submit(function() { window.onbeforeunload = null; }); }); so please help me out.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40733863
score: 4
has comment: http://stackoverflow.com/comment/40707154
upvote count: 4
has comment: http://stackoverflow.com/comment/40707330
linked to: http://stackoverflow.com/q/26011548
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40707069
tagged with: jquery
has comment: http://stackoverflow.com/comment/40739944
has title: fire page unload event only on close tab/window
favorite count: 0
has comment: http://stackoverflow.com/comment/40707671
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40706993
has comment: http://stackoverflow.com/comment/40727814
linked to: http://stackoverflow.com/q/2482059

http://stackoverflow.com/a/25889850
score: 0
has body: It would depend on the code. Generally, if I have a function that is suspicious, I put breakpoints or console.log() at the beginning and end of the function and see if both are executed. Then I follow the logic down to figure out which piece is broken. It really depends on the code though.
answers question: http://stackoverflow.com/q/25889458
type: Answer

http://stackoverflow.com/comment/40510426
type: QuestionComment
has text: could u please attach `fileupload` code ?
score: 1
comment on: http://stackoverflow.com/q/25884734
type: Comment

http://stackoverflow.com/comment/40618493
comment on: http://stackoverflow.com/q/25944436
type: Comment
score: 0
type: QuestionComment
has text: added fiddle http://jsfiddle.net/fg823c3y/

http://stackoverflow.com/q/26022757
type: Question
answer count: 1
tagged with: javascript
has body: I need your help again, It seems that not all ;nbsp's are caught and converted into a proper text space. Why would the replace function catch some of the ;nbsp's and not catch and convert the others. I've attached a pic of the problem. Here's a quick fiddle: http://jsfiddle.net/n6vwrt2v/ I'm beyond puzzled at this one. the code in question: var y = document.getElementById("table1").children[0].children[0].innerHTML //some processing first to replace the &lt;br&gt;'s before the final output y = y.replace(/\s*&lt;br\s*\/?&gt;\s*/g, '\n') y = y.replace('&amp;nbsp;',' ')
tagged with: replace
score: 0
tagged with: string
has comment: http://stackoverflow.com/comment/40759155
tagged with: regex
tagged with: text
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26022775
accepted answer: http://stackoverflow.com/a/26022775
has title: Not all &nbsp;s are being replaced converting text from a table cell to a textarea

http://stackoverflow.com/comment/40694155
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25986733
has text: Using jQuery we can do something like this : $("input:radio").first()

http://stackoverflow.com/comment/40635834
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955061
has text: @KingKing: It's so incredibly simple. If you need to support browsers other than Firefox, then you don't use Firefox-only syntax extensions. Your example of `if FireFox then ... else ...` won't work because if you use Firefox syntax extensions, the entire program will fail to parse unless you use `try/catch`.
score: 0

http://stackoverflow.com/a/25953735
has body: Now working... Turned out to be a very small mistype after all.. the tag was closed improperly.. should be &lt;g id="".. *etc* &gt; // before the graphic elements to be grouped &lt;/g&gt; // after the graphic elements In the desktop version of the code I had: &lt;g id="".. *etc* /&gt; // spot the extra "/" ! &lt;/g&gt;
type: Answer
answers question: http://stackoverflow.com/q/25952647
score: 0

http://stackoverflow.com/a/25966867
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25966686
type: Answer
has comment: http://stackoverflow.com/comment/40678434
downvote count: 0
score: 1
has body: I would guess what's happening is ext only has a single instance of the MessageBox component and it is getting called four times...But you can only see the last one. If you just want some form of feedback I'd go with using console.log instead of Ext.Msg.alert.
answers question: http://stackoverflow.com/q/25966686

http://stackoverflow.com/comment/40545914
type: QuestionComment
comment on: http://stackoverflow.com/q/25904614
score: 1
has text: Yes. The not operator (`!`) always returns a Boolean. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Logical_NOT_.28.21.29
type: Comment

http://stackoverflow.com/q/25930613
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40792901
has title: Convert multiple MediaStreams into 1 stream
accepted answer: http://stackoverflow.com/a/26071732
answer count: 1
downvote count: 0
tagged with: webrtc
score: 1
tagged with: getusermedia
favorite count: 0
has body: I want to convert 2 different MediaStreams into 1 MediaStream. For example: You have a moving text stream and I want to overlay this on a webcam stream. How would I be able to do this? Some things to take into consideration: - I want to 'burn' the moving text on top of the webcam - No multiple videotracks - I'd rather not use toDataURL or render on canvas and then convert to 1 stream since this is a huge CPU hog.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26071732
has comment: http://stackoverflow.com/comment/40800400

http://stackoverflow.com/comment/40642668
comment on: http://stackoverflow.com/a/25954100
score: 0
type: AnswerComment
type: Comment
has text: Functions are objects, but the name property of such an object isn't modifyable. Variables are alias/names referencing objects. Classes don't exist in javascript. It's a prototype based language. The Objects could be cloned. They are actually only key-value stores. A value can be an function/objects/(primitiv value).

http://stackoverflow.com/comment/40730068
has text: if you don't want to stop the event propagation then you can try something like http://jsfiddle.net/arunpjohny/zwpy1oLo/2/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26006566

http://stackoverflow.com/comment/40575403
comment on: http://stackoverflow.com/q/25920541
score: 0
has text: ...what makes you think it matters? If that's what the DOM constructs from well-formed (X)HTML, then what's the problem?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25917738
has comment: http://stackoverflow.com/comment/40575983
has comment: http://stackoverflow.com/comment/40622955
has comment: http://stackoverflow.com/comment/40575579
has comment: http://stackoverflow.com/comment/40615113
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25916009
has comment: http://stackoverflow.com/comment/40615056
answers question: http://stackoverflow.com/q/25916009
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/40575693
has body: Just as you're discovering, Backbone considers itself more of a library than a framework - it leaves a lot of questions and design patterns left to the developer. The term "zombie view" is used to designate views that are still bound to something (and thus alive) when you think they're dead. Usually there's a leftover reference to the view from a model.on call or similar. Basically a specific form of memory leak. To manage the life cycle of the view, you can use a parent view, but it is a common practice to do this from a router. The router is used to remove old views and instantiate new ones upon a route event. Here's a snippet of how I often accomplish this: render: function(){ this.mainView &amp;&amp; this.mainView.remove(); // if there is already a view, remove it this.mainView = new SomeOtherKindOfViewDeterminedBySomeEvent(); // instantiate the new view this.mainView.render(); this.mainView.$el.appendTo( '#main-content' ); // append it } Some things to note: Without explicitly calling remove on a view, your app will be vulnerable to memory leaks. This is because the View's events and properties still exist in the background. For example, if you remove the first line of the example above, I will lose my reference to the former this.mainView, but it's events are still using memory. This will have an effect on your app over time. Note that I'm using appendTo in the last line. When calling remove on a View, it's entire element is removed, as well as it's events. If I had simply done this: this.mainView = new SomeOtherKindOfViewDeterminedBySomeEvent({ el: '#main-content' }) Then after I call remove on this.mainView, #main-content will have been removed from the DOM, so I can no longer use that selector. By appending it, I keep that #main-content around as a placeholder, so I can continue to append views to it. This is what you are seeing when trying to unbind SportsManDetailsView then render it again. As for your questions, this: $('#sportsManDetails').html(this.$el…
upvote count: 7

http://stackoverflow.com/q/25951749
has comment: http://stackoverflow.com/comment/40629284
score: 0
has body: I have an Ajax request that returns lat/lon coordinates that are of type number. For each response, I need to check if each of the returned values is within an array, if not add it. Heres what I have so far: $.each(jqXHR.responseJSON, function (index, value) { if($.inArray([value.loc.coordinates[1],value.loc.coordinates[0]], settings.locations) === -1){ console.log('adding...'); settings.locations.push([value.loc.coordinates[1], value.loc.coordinates[0]]); } else { console.log('already have...'); } }); Testing shows that the comparison always fails, and the value is added even when it is already within seettings.locations. Can anyone advise where there issue lies? UPDATE: OK so thanks to the comments so far I can see that this is incorrect use of inArray. Heres what I have now: $.each(jqXHR.responseJSON, function (index, value) { $.each( settings.locations, function( key, cValue ) { if(value.loc.coordinates[1]+','+value.loc.coordinates[0] !== cValue){ console.log('Adding new coords..') settings.locations.push([value.loc.coordinates[1], value.loc.coordinates[0]]); } else { console.log('Already have: ' +cValue ); } }); }); Again these never evaluate to match and hence it drops in to an unlimited loop.
tagged with: arrays
has title: JavaScript JQuery - implicit comparison between 2 arrays
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: comparison
has answer: http://stackoverflow.com/a/25953732
has answer: http://stackoverflow.com/a/25951872
type: Question
answer count: 2

http://stackoverflow.com/a/25874044
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25873639
type: Answer
has body: Establish a click handler based on the client as such: var clickHandler = ("ontouchstart" in window ? "touchend" : "click") and use it whenever you want to listen to click events: $(".selector").on(clickHandler, function() {...}) This way you can always make sure the proper event is being listened to.
has comment: http://stackoverflow.com/comment/40498197
upvote count: 4

http://stackoverflow.com/comment/40637099
score: 0
comment on: http://stackoverflow.com/q/25955894
has text: If you look at the html output of product.php, does data-idproduto contain the actual id, or not.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26005503
tagged with: angularjs
type: AnsweredQuestion
has body: I'm trying to list out groups of items in angular using ng-repeat and then from those populating the groups items as well. For some reason I can get each group repeating and print out its items with a binding {{ group.items }}, but when i put that inside of a ng-repeat and call it, nothing appears. Inside my directive angular.module('concierge.customer.menuItems', ['concierge.customer.dollars']) .directive('menuItems', [function() { return { restrict: 'E', scope: { groups: '=' }, templateUrl: 'modules/menu_items/menu_items.html' } }]) My View ul.menus.fat li(ng-repeat='group in groups' ng-class-even='alt-row') .menu-group-content .menu-group-items(ng-show='group.items &amp;&amp; group.items.length &gt; 0') {{ group.items }} // This line prints the items correctly li(ng-repeat='item in group.items') {{ item }} // This line Doesn't produce anything An Example group in JSON { "items":[ { "description":"crispy ling cod, cabbage, salsa fresca, chipotle mayo ", "group_id":7, "id":25, "name":"Fish Taco" }, { "description":"pork al pastor, cheddar, monteray jack, crema ", "group_id":7, "id":26, "name":"Pork Gringa" }, { "description":"avocado, radish, green onion, cilantro, black chile oil ", "group_id":7, "id":27, "name":"Chicken Karaage Taco" }, { "description":"salsa, fresca, crema &amp; queso fresco", "group_id":7, "id":28, "name":"Blackbean Taco" } ], "merchant_id":3, "type":"individual", "id":7, "name":"Single Tacos" } Why doesn't the second ng-repeat get populated?
accepted answer: http://stackoverflow.com/a/26005603
type: Question
tagged with: javascript
score: 0
has title: Nested ng-repeat doesn't appear angularjs
answer count: 1
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/26005603

http://stackoverflow.com/q/26019683
downvote count: 0
favorite count: 0
has title: TLS WebSocket Server working with firefox client but not with chrome client
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26021776
tagged with: c++
tagged with: c++11
type: Question
tagged with: javascript
has body: I have a server, created in c++ that accepts TCP connections. We have a few clients that can connect on it (iOS, Android, web). I'm trying to add support for TLS now, but I can't seem to get it right. The TLS connection works when using Firefox, but not when using Chrome. The code to start the connection is pretty simple: var socket = new WebSocket(host); The server side is a bit more complex, it can be found here I inspected what happens with Wireshark. The results for Firefox can be seen here and the results for Chrome can be found here. What is going wrong here? Does Chrome require something special before the TLS connection can be established?
score: 2
answer count: 1

http://stackoverflow.com/a/25899589
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40597316
answers question: http://stackoverflow.com/q/25899517
accepted answer of: http://stackoverflow.com/q/25899517
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40538996
has comment: http://stackoverflow.com/comment/40605898
has body: Here's an example how you can do it:

http://stackoverflow.com/q/25979109
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25982402
has comment: http://stackoverflow.com/comment/40685577
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/25979139
has comment: http://stackoverflow.com/comment/40680882
type: Question
has answer: http://stackoverflow.com/a/25982364
has body: I am working on a quiz project where a user selects a multiple choice answer (radio button) and then click a link to proceed to the next question. If a radio button has not been selected, the link cannot be clicked. Once a radio button is selected and a link clicked, the next question is pulled from a MySQL database using AJAX. The issue I am having is that if a user double clicks the link, a question is skipped. So if you are on question 1 and double click the link, question 3 is loaded instead of 2. Is there a way in jQuery to make an event fire only once, if a link is single or double clicked? Thanks $('#next-question-click').on( "click", function(){ if ($('[name="radio-question"]').is(':checked')){ var answer = $(".question-content ul li input:checked + label").text(); question_number = question_number + 1; if(question_number&lt;100){ next_question(question_number); } } else { $("#error-text").html('Please select an answer.'); } return false; }) .on("dblclick", function(e){ e.preventDefault(); //cancel system double-click event });
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40686013
answer count: 3
downvote count: 0
has title: Double click fires event twice
has comment: http://stackoverflow.com/comment/40680519

http://stackoverflow.com/comment/40520845
has text: you should be using $('#result').text()==="Apartment" in your if condition
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25891122
type: QuestionComment

http://stackoverflow.com/q/25980419
linked to: http://stackoverflow.com/q/283956
has body: I want to create a file in javascript. Before you say that it is impossible, go read this answer. Here is what I have so far : window.open("data:text/json;charset=utf-8," + escape("Ur String Object goes here")); Now, my question is : How do I give a name to this file?
type: Question
has answer: http://stackoverflow.com/a/25980553
duplicate of: http://stackoverflow.com/q/283956
has comment: http://stackoverflow.com/comment/40682261
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40682102
has comment: http://stackoverflow.com/comment/40682083
has title: How to specify the name of file you create in javascript?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7717851
linked to: http://stackoverflow.com/q/8178825
score: 0
has comment: http://stackoverflow.com/comment/40682094

http://stackoverflow.com/comment/40632222
score: 0
type: Comment
has text: http://gyazo.com/e9bc633ee8475ee4b3d2d0b9f6ac267e
type: QuestionComment
comment on: http://stackoverflow.com/q/25952864

http://stackoverflow.com/q/26015368
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26015598
score: 0
answer count: 2
tagged with: arrays
possible better answer: http://stackoverflow.com/a/26016378
tagged with: jquery
has answer: http://stackoverflow.com/a/26016378
has title: Jquery how check if an array string value is in a textarea
accepted answer: http://stackoverflow.com/a/26015598
has body: var SPECIAL_CHARS = Array("\x5B", "\x5C", "\x5D", "\x5E", "\x7B", "\x7C", "\x7D", "\x7E", 8364, 49792, 14844588, '�', '%', '/', '&amp;','�','!','"','(',')','=','[','\\',']','^','{','|','}','~'); var dynamic_variables = Array("${nome}"); function charUsed(el) { var base = el; var count = base.val().length; var chars = base.val().split(""); var numberOfSpecialChars = 0; for (var k=0; k&lt;chars.length; k++) { if ($.inArray(chars[k], SPECIAL_CHARS) &gt; -1) { numberOfSpecialChars++; } } if($.inArray(base.val(),dynamic_variables) != -1) { numberOfSpecialChars = numberOfSpecialChars+40; } return count + numberOfSpecialChars; } // function Basically, I need to count the textarea length and if this contains some special char (array SPECIAL_CHARS) count X 2 (till here, all goes right). Now I need to add some other words (no more chars), like ${nome} Pseudocode: if an element of array is in base.val(), add 40 to the numberOf SpecialChars Of course, my code doesn't function.
type: AnsweredQuestion

http://stackoverflow.com/a/25925185
accepted answer of: http://stackoverflow.com/q/25920941
answers question: http://stackoverflow.com/q/25920941
has comment: http://stackoverflow.com/comment/40618261
has comment: http://stackoverflow.com/comment/40965960
has body: You probably want to use a view model flag to control the modal popup's visibility. //modal module var modal = {} modal.visible = m.prop(false) modal.view = function(body) { return modal.visible() ? m(".modal", body()) : "" } //in your other view var myOtherView = function() { //this button sets the flag to true m("button[type=button]", {onclick: modal.visible.bind(this, true)}, "Show modal"), //include the modal anywhere it makes sense to //its visibility is taken care by the modal itself //positioning is controlled via CSS modal.view(function() { return m("p, "modal content goes here") }) } To make a modal dialog, you can either use the styles from one of the many CSS frameworks out there (e.g. Bootstrap), or style .modal with your own CSS /*really contrived example to get you started*/ .modal { background:#fff; border:1px solid #eee; position:fixed; top:10px; left:100px; width:600px; }
type: Answer
score: 6
downvote count: 0
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/q/25941378
has comment: http://stackoverflow.com/comment/40889265
has comment: http://stackoverflow.com/comment/40714791
has comment: http://stackoverflow.com/comment/40724378
has comment: http://stackoverflow.com/comment/40714768
tagged with: node.js
score: 2
has comment: http://stackoverflow.com/comment/40724644
answer count: 0
has comment: http://stackoverflow.com/comment/40714853
upvote count: 2
has title: Grunt task killing server when complete
has comment: http://stackoverflow.com/comment/40613351
type: Question
has comment: http://stackoverflow.com/comment/40891775
has comment: http://stackoverflow.com/comment/40725980
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/40723639
tagged with: express
has comment: http://stackoverflow.com/comment/40725864
downvote count: 0
has comment: http://stackoverflow.com/comment/40891701
favorite count: 0
has comment: http://stackoverflow.com/comment/40709644
has comment: http://stackoverflow.com/comment/40711943
has body: I am building a app where Grunt compiles a file that is returned back to the user as a download. If I already had a static file, the I could just do: app.post('/', function(req, res){ var pkgFile = __dirname + '/myfile.js'; var filestream = fs.createReadStream(pkgFile); filestream.pipe(res); }); The problem is if the file is compiled by Grunt, called from inside app.post() and when the Grunt task is done it exits my express server. I get a messade "Done, without errors" and with that the process exits. I am running my Grunt task using Grunt.cli and passing a callback to my packager since my Grunt task returns data, no files written. grunt.cli({ gruntfile: __dirname + "/../gruntfile.js", modules: modules, strip: !compat, releaseVersion: version, project: project, noCoreDependencies: !addCoreDependencies, callback: stream }); function stream (data) { var filename = ['MooTools-', project, '-', version, (compat ? '-compat' : '') + (minified ? '-compressed' : ''), '.js'].join(''); if (minified) data = uglify(data); res.setHeader('Content-Type', 'application/javascript'); res.setHeader('Content-disposition', 'attachment; filename=' + filename); res.write(data, 'binary'); res.end(); } This way everything works one time, then I have to re-start the server... Is there a way I can run Grunt.cli as a child process, or in a way that it exits without killing my server, and being able to have that callback as a parameter into grunt options? Or is there a better way to design this? What I am doing is compiling different files from a library into one .js file > uglifying it > providing as download to user. My Gruntfile: "use strict"; module.exports = function(grunt) { require('load-grunt-tasks')(grunt); var cb = grunt.option('callback'), strip = grunt.option('strip'), version = grunt.option('releaseVersion'), modules = grunt.option('modules'), project = grunt.option('project'), noCoreDependencies = grunt.option('noCoreDependencies'); function projectPath(project_, version_){ var ve…
has comment: http://stackoverflow.com/comment/40714969
has comment: http://stackoverflow.com/comment/40899872
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40722208

http://stackoverflow.com/a/25959187
score: 0
has comment: http://stackoverflow.com/comment/40642984
type: Answer
has comment: http://stackoverflow.com/comment/40642951
upvote count: 1
downvote count: 1
has body: You can simply pass it as an additional argument function alertCallback(message) { alert(message); } function ShowPopupWithCallback(url, msg, callbackFunc) { $.post(url, function (data) { $("#myDialog").html(data); callbackFunc(msg); }, "html"); } ShowPopupWithCallback("MyController/Load", "My Message", alertCallback);
answers question: http://stackoverflow.com/q/25959156

http://stackoverflow.com/q/25991493
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I'm trying to simulate multiple button-type clicks with Javascript, the webpage I'm running it on has around 10 of 1 type of button and 1 of the other. I'm wanting the JS to click ALL of the buttons on the webpage that match the markup of the first button, then after that's completed, finally click the other. I've managed to get it to easily click all 10 of the first button, but I'm starting to struggle with the other button. The markup for the first button is this; http://pastebin.com/aRNpjG0n So running this Javascript, I am able to click these buttons with a 2 second delay; window.setInterval( function(){ var inputs = document.getElementsByClassName('x-button-litebutton-wrapper'); for( var i=0; i&lt;inputs.length;i++ ) {inputs[i].click();} }, 2000); The markup for the other button is available here; http://pastebin.com/baw32HjK I'm assuming the ID for the second button is 'x-btn-text', if that's the case, then my issue would simply be how to implament it within my existing Javascipt (Above) Any help at all would be greatly appreciated, since I've not managed to find anything on here about simulating more than 1 button click at a time.
type: Question
has comment: http://stackoverflow.com/comment/40702413
has comment: http://stackoverflow.com/comment/40703476
tagged with: javascript
tagged with: jquery
score: 0
has title: Javascript 'Multiple Click Simulation' issue
has answer: http://stackoverflow.com/a/25992692

http://stackoverflow.com/comment/40668118
comment on: http://stackoverflow.com/a/25972584
has text: @GrégoryVorbe Yes, I was about to suggest that too, but the request returns a whole HTML document, and anyway `getElementsByName` is defined of documents only, not on elements.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40697341
score: 0
comment on: http://stackoverflow.com/q/25984026
has text: Could you perhaps show us the code that you think needs improvement? It's a little hard to understand your problem. You should not run queries synchronously, even if you could.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40615484
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25942552
has text: possible duplicate of [Get the domain name of the subdomain Javascript](http://stackoverflow.com/questions/13367376/get-the-domain-name-of-the-subdomain-javascript)

http://stackoverflow.com/a/26004312
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26003940
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26003940
has body: No it is not possible. Not in any way.

http://stackoverflow.com/a/25973654
answers question: http://stackoverflow.com/q/25972222
upvote count: 0
type: Answer
has body: There is no specific API for this, but if you make your expose your controller on the current scope you can always access the scope data from directive. Inside controller do $scope.controller=this; You can now access this controller in your directive directly or passing it through isolated scope. In fact controller as syntax also does something like this.
downvote count: 2
score: -2

http://stackoverflow.com/q/26001377
has title: Stylus imports styl files from the wrong folder
favorite count: 0
tagged with: npm
has body: I have a file mobile.styl that collects all styl files I need via @import: @import '../../common/styles/colors' @import '../../common/styles/init' @import 'landing' @import 'faq' @import 'vehicle' I have two 'landing' styl files, one is in current folder where mobile.styl is and another is where those two first imported files are ../../common/styles/. If I have the order of imports like shown above, then stylus imports first colors and init files which is fine, but then it loads landing file NOT from current folder where mobile.styl is, but from ../../common/styles/ so I get the wrong styl file, which is for desktop version. Now, if I put those two imports to the end of the file, then it first loads landing, faq, vehicle properly, then those two files from the proper paths as expected. Is this a bug or intended behaviour?
tagged with: node.js
tagged with: stylus
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26001843
accepted answer: http://stackoverflow.com/a/26001843
upvote count: 2
answer count: 1

http://stackoverflow.com/a/25942103
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25942017
has body: You can use or you can use Jquery version Both of them work in this condition however if you want to know the difference between this tow I suggest to see this window.onload vs $(document).ready()

http://stackoverflow.com/q/25916403
has answer: http://stackoverflow.com/a/25916723
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/11374059
answer count: 2
has comment: http://stackoverflow.com/comment/53970835
downvote count: 0
has comment: http://stackoverflow.com/comment/40568342
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 13
upvote count: 13
has title: How to bind click event to object tag?
has comment: http://stackoverflow.com/comment/40567177
has body: I have this code and jquery $(".icon-logo").click(function() { ..... }); but I can't click event.
type: Question
has comment: http://stackoverflow.com/comment/53313936
has answer: http://stackoverflow.com/a/50471248

http://stackoverflow.com/a/25899222
has body: There are different ways of representing angles (degrees or radians). In your calculation you are using degrees, but the function sin expects radians. So you need to convert degrees to radians. function degToRad(deg) { return deg * Math.PI / 180; }
upvote count: 2
has comment: http://stackoverflow.com/comment/40536252
accepted answer of: http://stackoverflow.com/q/25899103
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25899103
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/40687946
type: Comment
comment on: http://stackoverflow.com/q/25983429
score: 0
type: QuestionComment
has text: Can we see the real HTML? This is somewhat difficult to visualize

http://stackoverflow.com/comment/40529864
has text: @tarabyte That's correct. No way to hide it. Even if you could from the application perspective, your USB traffic is easy to capture anyway. http://sourceforge.net/projects/usbsnoop/
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25895720

http://stackoverflow.com/comment/40621373
comment on: http://stackoverflow.com/a/25946515
type: Comment
score: 1
type: AnswerComment
has text: It seems to be working after JSON.parse now. I do not understand why it needs to, but it works. Thank you!

http://stackoverflow.com/comment/40538405
has text: very clever and short. mine has the only advantage to be more readable. don't know about performance.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25900373
type: Comment

http://stackoverflow.com/comment/40509049
score: 1
comment on: http://stackoverflow.com/a/25883054
type: AnswerComment
type: Comment
has text: yes.It is working now.thankz a lot @Chamika Sandamal

http://stackoverflow.com/comment/40610694
type: Comment
type: QuestionComment
score: 0
has text: @Teemu because `$()` is typical jQuery selector syntax.
comment on: http://stackoverflow.com/q/25940160

http://stackoverflow.com/a/26011844
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40759651
has body: It is an UI issue, not coding. On mouseenter() &lt;rect&gt;, outline the box using 4 &lt;line&gt; and overlay it over the &lt;rect&gt;`. Attach mousedown() and mousemove() event listener to all 4 lines, so you can actually click on them and drag them around. Update the &lt;rect&gt; x, y, width AND height values whenever one edge is dragged. On mouseleave(), destroy these 4 lines and remove the event listener. This skips the calculation of which edge is nearest to mouse. Snap SVG or RaphaelJS can be used to implement this UI, saves you some low level coding.
has comment: http://stackoverflow.com/comment/40742728
score: 1
accepted answer of: http://stackoverflow.com/q/25969854
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25969854

http://stackoverflow.com/q/25894518
tagged with: google-maps-markers
has answer: http://stackoverflow.com/a/25904323
downvote count: 0
has answer: http://stackoverflow.com/a/25907996
favorite count: 0
accepted answer: http://stackoverflow.com/a/25907996
has title: Load google map API on click event, the marker doesn't show
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
answer count: 2
tagged with: google-maps
has body: I am trying to load different Google map instances based on clicking different addresses. The event listener works as a charm, but the problem is the Marker doesn't load. Here is my code. I would like the Marker loads for each address onclick event. &lt;div style="float:left;width:100%;"&gt; &lt;div style="float:left;"&gt; &lt;h2&gt;Locations&lt;/h2&gt; &lt;ul class="menu"&gt; &lt;li onclick="loadMap('43.6581859','-79.3906945');"&gt; &lt;a href="#"&gt;Category 1&lt;/a&gt;&lt;/li&gt; &lt;li onclick="loadMap('43.658589','-79.3872499');"&gt; &lt;a href="#"&gt;Category 2&lt;/a&gt;&lt;/li&gt; &lt;li onclick="loadMap('43.6533033','-79.4058543');"&gt; &lt;a href="#"&gt;Category 3&lt;/a&gt;&lt;/li&gt; &lt;/div&gt; &lt;div style="float:left; width: 20px;"&gt;&amp;nbsp;&lt;/div&gt; &lt;div style="width:400px;height:450px; overflow:hidden;"&gt;&lt;h2&gt;Map&lt;/h2&gt; &lt;div id="map_canvas" style="height:400px;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!--Load Map Script --&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script&gt; var map; var home; var markersArray = []; function initialize() { home = new google.maps.LatLng('43.659924','-79.38875'); var opts = { zoom: 15, center: home, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map_canvas'), opts); google.maps.event.addListener(map, "click", function(event) { showMarker(event.latLng); }); } function loadMap(lat,lng) { var location= new google.maps.LatLng(lat, lng); map.setCenter(location); } function showMarker(location) { deleteOverlays(); var marker = new google.maps.Marker({ position: location, map: map }); markersArray.push(marker); } function deleteOverlays() { if (markersArray) { for (i=0; i &lt; markersArray.length; i++) { markersArray[i].setMap(map); } markersArray.length = 0; } } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; Any help is much appreciated!
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25904323

http://stackoverflow.com/q/25935624
has body: I am writing a plugin and have a question. Take these two lines into consideration $('target').myPlugin(); var myVar = $('target').myPlugin(); Since the second target is not yet in the DOM, there is some functions I would have to change in my plugin to achieve my goals. Yet, those changes may cause the plugin to fail on the first target. Simply, I am looking for a way (if it is even possible) to determine in my plugin if the target element is already in the DOM or in a variable. Any help would be appreciated and thank you in advance! UPDATE To expound a bit... Take this example, why does this not work? var wrapper = $('&lt;div/&gt;'); var newInput = $('&lt;input/&gt;').wrap(wrapper); $('#newDiv').append(newInput); Because the input does not actually exist yet...
upvote count: 2
has comment: http://stackoverflow.com/comment/40602120
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/40602017
tagged with: javascript
has comment: http://stackoverflow.com/comment/40602599
linked to: http://stackoverflow.com/q/3086068
tagged with: dom
has comment: http://stackoverflow.com/comment/40602010
score: 2
duplicate of: http://stackoverflow.com/q/3086068
downvote count: 0
has title: Check if jQuery object is a variable or Dom element
tagged with: variables
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40602027
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3426116
has comment: http://stackoverflow.com/comment/40602152
answer count: 0

http://stackoverflow.com/q/25997290
has comment: http://stackoverflow.com/comment/40712995
downvote count: 3
has body: I have an array of items being called by a forEach. I want to get the value of the current item, every time there's an iteration. How can i do that? var bottom_array = [41,42,43,44] bottom_array.forEach(function(){ console.log(*current item*); }) console&gt; 41 console&gt; 42 console&gt; 43 console&gt; 44 Thanks in advance!
possible better answer: http://stackoverflow.com/a/25997311
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40712501
has comment: http://stackoverflow.com/comment/40716181
has answer: http://stackoverflow.com/a/25997311
has comment: http://stackoverflow.com/comment/40712447
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25997354
has title: JS: forEach item in array current value
accepted answer: http://stackoverflow.com/a/25997354
tagged with: foreach
type: AnsweredQuestion

http://stackoverflow.com/comment/40743160
type: Comment
has text: Thank you so much for this informative solution! It works perfect. The inputs I solved myself by removing padding and adding height. This seems to fix that. However, the project is not working to open. I think it might be the same problem. Will try to add something similare to my "openPage"-script.
comment on: http://stackoverflow.com/a/26013969
type: AnswerComment
score: 0

http://stackoverflow.com/a/25930465
type: Answer
has comment: http://stackoverflow.com/comment/40593844
score: 1
answers question: http://stackoverflow.com/q/25926412
upvote count: 1
has body: If you want to persist the status of your checkbox, you'll either need to set the data in a session, or somehow tie it into the ActiveRecord object for your form. I'll detail about the form first... Form Your current setup is that you are using form_tag You must know the difference between form_tag and form_for is that the former has independent data, whilst the latter's data is from an ActiveRecord object. The issue for a lot of people is because they don't know the difference, they will likely be confused with how to implement either method, which could be an issue here. I would recommend using form_for: #app/views/albums/edit.html.erb &lt;%= form_for @album do |f| %&gt; &lt;% @album.audios.each do |audio| %&gt; &lt;%= fields_for 'audio[]', audio do |audio_fields| -%&gt; &lt;%= audio_fields.check_box nil %&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; Great reference here: Syntax for form_for when building an array from checkboxes Another method could be collection_check_boxes: #app/views/albums/edit.html.erb &lt;%= form_for @album do |f| %&gt; &lt;%= f.collection_select_boxes :audio_ids, @album.audios, :id, :name %&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; The important thing to note about this "method" is that since the values of the checkboxes are tied in directly with your @album ActiveRecord object, it gives you the ability to "persist" the data by saving it to the database. I don't know what you're trying to achieve with the current setup, but to persist the data - even between views - you need to ensure you have some place where you can keep the data stored (either the DB or something like a cookie) Sessions Sessions would be a logical choice for this, although as you have not stated what you're looking to achieve, I don't know where they'll fit in. If your form is to be "submitted", you'll be able to set the "session" cookies of your data in the controller action to which you send your request. For example, if you send the reque…
downvote count: 0

http://stackoverflow.com/q/26011911
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26011974
answer count: 2
has comment: http://stackoverflow.com/comment/40739343
upvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40739313
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26011974
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40739328
downvote count: 2
possible better answer: http://stackoverflow.com/a/26012049
has title: Why my function hide/show element base on radio button not work?
has answer: http://stackoverflow.com/a/26012049
type: Question
has body: Why my function hide/show element base on radio button not work ? http://jsfiddle.net/qmzz9x7h/ &lt;script&gt; $(document).ready(function(){ $('input[type="radio"]').click(function(){ if($(#radio_id).attr("value")=="first"){ $("#second_checkbox").hide(); $("#first_checkbox_display").show(); } if($(#radio_id).attr("value")=="second"){ $("#first_checkbox_display").hide(); $("#second_checkbox").show(); } }); }); &lt;/script&gt;

masking
tag name: masking
type: Tag
tags question: http://stackoverflow.com/q/26014751

http://stackoverflow.com/a/25893534
score: 1
answers question: http://stackoverflow.com/q/25891050
has comment: http://stackoverflow.com/comment/40530813
downvote count: 0
type: Answer
has body: One way to do this without writing lots of javascript detection click logic would be to have the advert on the page and the clickable link links back to your site. Updates a counter and then redirects them to the target page. The above is just a different way of thinking about it. Plus it will still work if they don't have javascript enabled.
upvote count: 1

http://stackoverflow.com/a/25994330
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25992046
has body: You are being led up the garden path here by using a browser's inspect element function, in this case Chrome's I suspect, which is giving the browser's best interpretation of the malformed html. In cases like this you should always use View Source to see the raw output. If you do this you'll see that what's output is in fact: Copyrights Filing looking at this, and to be fair on Inspect Element - it probably does help to compare the two, you should be able to spot, as other have pointed out, that onclick attribute's value is not being wrapped in quotes as it needs to be. The quote mark you see in the middle of 'Copyrights" filing' in the Inspect Element view is the result of the browser terminating the onclick value at the first white space, then wrapping it all up in quotes itself.

http://stackoverflow.com/q/25922247
score: 1
has comment: http://stackoverflow.com/comment/40915979
has comment: http://stackoverflow.com/comment/40913867
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40914608
favorite count: 0
has comment: http://stackoverflow.com/comment/40879015
tagged with: pdf.js
has title: How to fix pdf.js find/highlight error or what causes it
has body: I'm using pdf.js and viewer.js to show pdf documents on our web site and find/highlight words. Everything is ok except that when I 'find/highlight all' a word, the highlights are misplaced and they are placed above/under the right words. I attach an image: http://movelex.hu/fenyoapa/pdfjs_highlight_error.jpg it is showing my problem well. The red circles are the right words to highlight. After a lot of debugging finally I tried it with the native ctrl+f and I realized that not my program makes mistake but it is buggy natively. Meanwhile I got familiar with viewer.js and its functions, but I can't resolve this problem. And in some cases (some PDF docs) it is working well, in some not. Here is a live example (open in FireFox): http://movelex.hu/fenyoapa/tori_6_tk_webre.pdf_150.pdf press ctrl+f and type 'az'.
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40915624

http://stackoverflow.com/comment/40528924
type: Comment
comment on: http://stackoverflow.com/a/25895042
has text: I updated my answer by adding link to good architecture which has `delegateEvents` within the child view
score: 0
type: AnswerComment

http://stackoverflow.com/q/25917188
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40569046
type: Question
has body: How do I get a CR/LF when setting textContent? I've tried a couple things (below) but these do not work. The \r\n has no effect, the &lt;br /&gt; is displayed literally. document.getElementById("lbResult").textContent = "\r\nmyID" document.getElementById("lbResult").textContent = "&lt;br /&gt;myID"
has comment: http://stackoverflow.com/comment/40569332
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25917213
score: 0
has comment: http://stackoverflow.com/comment/40568851
accepted answer: http://stackoverflow.com/a/25917213
has comment: http://stackoverflow.com/comment/40568974
linked to: http://stackoverflow.com/q/9330671
has title: How do I get a CR/LF when setting textContent?

http://stackoverflow.com/a/26004741
accepted answer of: http://stackoverflow.com/q/25936533
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25936533
type: Answer
upvote count: 1
score: 1
has body: Scope is tied to HTML elements during compilation. $compile needs a scope to compile an element. Elements could be nested. Some get new scope other inherit. Scope gets destroyed when elements are removed from DOM. To be precise: A $destroy handlers are called on jQuery.cleanData which AngularJS redefines and calls after it does its cleanup - aka acting in destroying the scope. cleanData function is called when an element is removed from the DOM. What is the purpose of jQuery clean and cleanData methods?

http://stackoverflow.com/comment/40800166
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26030835
type: AnswerComment
has text: This solution seems straight-forward enough! Thank you for explaining it clearly, I'll play around with this.

http://stackoverflow.com/comment/40641772
type: QuestionComment
comment on: http://stackoverflow.com/q/25958403
score: 1
has text: anyone else finds bootstrap code so ugly that you don't even want to read?
type: Comment

http://stackoverflow.com/comment/40636847
comment on: http://stackoverflow.com/a/25955758
type: Comment
score: 1
has text: I like the 2nd approach plus
type: AnswerComment

http://stackoverflow.com/comment/40750027
has text: Have you included jQuery? Even if you have, your declaration needs to be inside the `$(document).ready` declaration.
comment on: http://stackoverflow.com/q/26017789
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26026815
upvote count: 1
has comment: http://stackoverflow.com/comment/40791616
has comment: http://stackoverflow.com/comment/40791648
answers question: http://stackoverflow.com/q/26026734
type: Answer
downvote count: 0
score: 1
has body: JQuery's .prop() function does not trigger the change event. You either can 1 - Trigger the event manually jQuery(e).prop('checked', true).trigger('change'); 2 - Use the .click() function that will check the input, and trigger the event as well.. jQuery(e).click();
has comment: http://stackoverflow.com/comment/40790788
has comment: http://stackoverflow.com/comment/40791706

http://stackoverflow.com/comment/40585580
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25926189
score: 0
has text: @Josep yes that is what i mentioned in my comment (unless my wording was wrong :)), watches are registered for dirty checks during the digest cycle and to decide whether there is an update or not, in case of ng-init it does update during the first digest cycle, it is only for initialization there is no need to reevaluate it

asp.net-mvc-4
tags question: http://stackoverflow.com/q/25975554
tags question: http://stackoverflow.com/q/25930389
tag name: asp.net-mvc-4
tags question: http://stackoverflow.com/q/25939422
tags question: http://stackoverflow.com/q/25901173
tags question: http://stackoverflow.com/q/25891122
tags question: http://stackoverflow.com/q/25923572
type: Tag
tags question: http://stackoverflow.com/q/26032205
tags question: http://stackoverflow.com/q/25930255
tags question: http://stackoverflow.com/q/25974979
tags question: http://stackoverflow.com/q/25892629
tags question: http://stackoverflow.com/q/25938361
tags question: http://stackoverflow.com/q/25914588
tags question: http://stackoverflow.com/q/25988093
tags question: http://stackoverflow.com/q/26012104
tags question: http://stackoverflow.com/q/25884396
tags question: http://stackoverflow.com/q/25951419

http://stackoverflow.com/q/25956559
has comment: http://stackoverflow.com/comment/40639400
has comment: http://stackoverflow.com/comment/40656572
tagged with: ajax
score: 0
has body: If I don't use sleep(3). Page refresh and take old file. Or I use timer in js before reload it's help. But I think it's wrong way. I don't understand how return $ajax success after file_put_contents finished finally. class OrderparamController extends FrontEndController { public function actionIndex($typeproduct = OrderService::TypePrintBannerCloth) { $forms = $this-&gt;requireFile('order-forms.php'); $tplParams=array( 'id_order' =&gt; $typeproduct, 'forms' =&gt; $forms ); $this-&gt;render('form',$tplParams); } /** * Require file */ protected function requireFile($file_name){ $configFile = YiiBase::getPathOfAlias('application.cache').'/'.$file_name; $handle = fopen($configFile, "r"); fclose($handle); require $configFile; return $forms; } /* * Удалить параметр */ public function actionDeleteparamoption() { $configFile='order-forms.php'; $forms=$this-&gt;requireFile($configFile); $keyfield = $_POST['keyfield']; $id_order = (int)$_POST['id_order']; $numoption = $_POST['numoption']; unset($forms[$id_order]['fields'][$keyfield]['options'][$numoption]); if ($this-&gt;writeFile($forms,$configFile)) { $answer=array( 'ok' =&gt; true, ); } else { $answer=array( 'ok' =&gt; false, ); } **sleep(3);** echo json_encode($answer); } } I use js for sending ajax $('.js-btn-delete').on('click',function(){ var request ={ keyfield : $(this).data('keyfield'), id_order : Var.id_order, label : $(this).data('label'), numoption : $(this).data('option'), } $.ajax({ url: '/orderparam/deleteparamoption', type: 'POST', data: request, dataType: 'json', async: true, success: deleteOrderParamResult }) }); function deleteOrderParamResult(data){ if (data.ok) { var num=intVal($('.param-option').index($('.param-option:visible'))); document.cookie = "viewOption="+num; location.reload(); } else { alert('ошибка'); } }
has comment: http://stackoverflow.com/comment/40648695
tagged with: time
type: UnansweredQuestion
tagged with: php
has title: php file_put_contents take file longer than script executes
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/q/25906176
type: Question
has body: Is it possible to give access to a bucket in Google Storage with a Google User ID instead of Email? I am working on an application that uploads file from using the Javascript APIs for Google Cloud Storage. I manage the ACLs for the bucket in my own AppEngine backend. I'd like to be able to give access to specific people who I don't have access to their emails but got their Google IDs through Google+ APIs search. Is it possible to do that? If not, what else can I use to give access to a user that haven't authorized my application (yet)? In ACL Insert API documentation there's a reference to user-userId, but I am not sure if that refers to the special user ID for the Cloud Storage or a general Google User ID? If it is the former can an application ask what is the user ID of a user without knowing their email?
has comment: http://stackoverflow.com/comment/40576289
score: 1
tagged with: google-cloud-storage
has comment: http://stackoverflow.com/comment/40589889
upvote count: 1
has comment: http://stackoverflow.com/comment/40557762
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: google-app-engine
has title: Is it possible to give access to a bucket in Google Storage with a Google User ID instead of Email?
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/40612336

http://stackoverflow.com/a/35944665
type: Answer
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/25913726
has body: just enable sandbox is simple way to start with. http://www.w3schools.com/tags/att_iframe_sandbox.asp
upvote count: 7

http://stackoverflow.com/q/25915339
has comment: http://stackoverflow.com/comment/40565201
has comment: http://stackoverflow.com/comment/40565144
has comment: http://stackoverflow.com/comment/40565149
type: Question
has body: Hey guys I am familiar with jQuery but not in javascript. Here I have a jQuery rendered animation which needs to be done using javascript. I am stuck and to be frank I don't known where to start. Here is my WORKING FIDDLE. This example needs to be rendered in pure javascript. Can anyone one assist me how things works on with javascript. MARKUP Click Head CSS .modal { width: 100px; height: 0px; position: absolute; background: orange; bottom: 0; } .clck { position: absolute; padding: 10px 20px; border-radius: 5px; background: red; bottom:0; z-index: 2; margin:auto; cursor: pointer; } .head { border-bottom: 1px solid black; cursor: pointer; text-align: center; padding: 10px; } THANKS IN ADVANCE
answer count: 1
tagged with: javascript
score: 0
has title: How to do pure javascript animation just like the jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40565133
has answer: http://stackoverflow.com/a/25915969

http://stackoverflow.com/q/25972807
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25973083
type: Question
answer count: 2
has title: How to insert javascript variable inside ejs tags
tagged with: javascript
tagged with: jquery
has body: I am doing dynamic filtering ,but i am unable to do if condition check. i want to insert targetOS var inside <%if(data[i].ListNames == targetOS ){%> for the above syntax it is giving "targetOS variable is undefined" Please help on this. $(document).on("change",'.COTSCurrentOSClass', function(e){ var selectedOS = $(this).val(); var targetOS = "OS::From::"+selectedOS; <%for(var i=0;i<data.length;i++){%> <%if(data[i].ListNames == ***targetOS*** ){%> <%for(var j=0;j<data[i].Values.length;j++){%> console.log("options are"); console.log(data[i].Values[j]); <%}}}%> ($(this).parent().parent()).find(".COTSTargetOSClass").append(" Select One "); });
tagged with: ejs
has answer: http://stackoverflow.com/a/25973187

http://stackoverflow.com/q/26007780
has comment: http://stackoverflow.com/comment/41289322
tagged with: javascript
upvote count: 2
tagged with: static-code-analysis
tagged with: lint
has title: Detect commented-out source code (JS)
has comment: http://stackoverflow.com/comment/42546716
favorite count: 0
type: UnansweredQuestion
has body: I need to eliminate the issue working with multiple teams, that developers constantly check in source that contains commented out code. This is a webapp, .html and .js. Unfortunately locked into SVN, so there is nothing preventing the accumulation of code smells in trunk. We use JSHint and JSCS, netiher support this kind of static code analysis check. I only found Java related solutions (e.g. https://stackoverflow.com/questions/1356587/tool-for-detecting-commented-out-code) not JavaScript. What do you think could help? Regexp?
score: 2
answer count: 0
downvote count: 0
type: Question
tagged with: jshint
tagged with: jscs

http://stackoverflow.com/a/26031579
has comment: http://stackoverflow.com/comment/40776697
score: 0
has comment: http://stackoverflow.com/comment/40776881
has comment: http://stackoverflow.com/comment/40775424
has body: change the code to this so that entire div is clickable [POST TITLE] because previously there was link for title only so i changed it now to the full article
has comment: http://stackoverflow.com/comment/40776452
answers question: http://stackoverflow.com/q/26031065
type: Answer
has comment: http://stackoverflow.com/comment/40776121

http://stackoverflow.com/a/25932292
upvote count: 3
has comment: http://stackoverflow.com/comment/40596435
score: 3
has comment: http://stackoverflow.com/comment/40596689
has comment: http://stackoverflow.com/comment/40596292
accepted answer of: http://stackoverflow.com/q/25932151
has body: Use this custom function function log2(val) { return Math.log(val) / Math.LN2; } var valueOne = log2(val1); DEMO
answers question: http://stackoverflow.com/q/25932151
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40596889
type: Answer

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

http://stackoverflow.com/a/25890180
has body: May be: dateTo = moment().format('YYYY-MM-DD'); dateFrom = moment().subtract(7,'d').format('YYYY-MM-DD'); moment#subtract
type: Answer
score: 174
has comment: http://stackoverflow.com/comment/40520825
downvote count: 0
upvote count: 174
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25888182
has comment: http://stackoverflow.com/comment/133113944
answers question: http://stackoverflow.com/q/25888182

http://stackoverflow.com/a/25942061
has comment: http://stackoverflow.com/comment/40614417
has comment: http://stackoverflow.com/comment/40614466
has body: Use
score: 0
answers question: http://stackoverflow.com/q/25942017
type: Answer

http://stackoverflow.com/a/25893242
type: Answer
answers question: http://stackoverflow.com/q/25893066
has body: Have you tried something like this, which doesn't need a lookahead or lookbehind: {([^}]*)} You would probably need to add the global flag, but it seems to work in the regex tester. The real problem is that you need to specify what you want to capture, which you do with capture groups in regular expressions. The part of the matched regular expression inside of parentheses will be the value returned by that capture group. So in order to omit { and } from the results, you just don't include those inside of the parentheses. It is still necessary to match them in your regular expression, however. You can see how to get the value of capture groups in JavaScript here.
score: 0

http://stackoverflow.com/q/26028446
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
answer count: 2
has body: Just starting to look at Handlebars.js today and wanted a clear approach. Assume the following: We don't have control over how the JSON was created (So no server side solutions). JSON will have 1 or more records in it. In each record, there will be a Message_Type name/value pair the value of which would be useful in some function which css class(es) are used in the presentation. ex: message_type: basic, ad, notification, warning, critical. Each message_type will have a css class(es). So critical message type might get classes .msg_box .critical_msg. How should I do this (remember, we can't change the original source).? Option 1: process json data before handlebars and add name/value pair for each that contains the appropriate classes. Option 2: some way in handle bars that is unclear to me.
upvote count: 1
has answer: http://stackoverflow.com/a/26028647
accepted answer: http://stackoverflow.com/a/26028647
favorite count: 0
possible better answer: http://stackoverflow.com/a/26030014
tagged with: handlebars.js
has title: Handlebars.js JSON setting class(es) based on value/pair
tagged with: css
has answer: http://stackoverflow.com/a/26030014
type: AnsweredQuestion
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/8853396

http://stackoverflow.com/q/25884754
has body: In my Rails application my collapse navebar is not changing it style while scrolling and also an error occur in inspect element console which is: TypeError: elem is null elem.classList.add( c ); Classie .js in which error occurs: ( function( window ) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg( className ) { return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); } // classList support for class management // altho to be fair, the api sucks because it won't accept multiple classes at once var hasClass, addClass, removeClass; if ( 'classList' in document.documentElement ) { hasClass = function( elem, c ) { return elem.classList.contains( c ); }; addClass = function( elem, c ) { elem.classList.add( c ); }; removeClass = function( elem, c ) { elem.classList.remove( c ); }; } else { hasClass = function( elem, c ) { return classReg( c ).test( elem.className ); }; addClass = function( elem, c ) { if ( !hasClass( elem, c ) ) { elem.className = elem.className + ' ' + c; } }; removeClass = function( elem, c ) { elem.className = elem.className.replace( classReg( c ), ' ' ); }; } function toggleClass( elem, c ) { var fn = hasClass( elem, c ) ? removeClass : addClass; fn( elem, c ); } var classie = { // full names hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, // short names has: hasClass, add: addClass, remove: removeClass, toggle: toggleClass }; i change the sequence of require library but it not helping. //= require jquery //= require jquery-1.11.0.js //= require classie.js //= require jquery_ujs //= require bootstrap.js //= require bootstrap.min.js //= require agency.js //= require contact_me.js //= require cbpAnimatedHeader.js //= require cbpAnimatedHeader.min.js //= require jqBootstrapValidation.js
has answer: http://stackoverflow.com/a/31640431
tagged with: javascript
tagged with: jquery
score: 4
downvote count: 0
possible better answer: http://stackoverflow.com/a/26197414
favorite count: 0
has answer: http://stackoverflow.com/a/26197414
answer count: 5
has answer: http://stackoverflow.com/a/26154956
has answer: http://stackoverflow.com/a/32893907
tagged with: ruby-on-rails
tagged with: css
has title: Rails Application elem is null in classie.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26933607
type: Question
upvote count: 4
accepted answer: http://stackoverflow.com/a/26154956

http://stackoverflow.com/q/25949470
has comment: http://stackoverflow.com/comment/40625808
has body: I want to load an image file inside of an SVG-. It works well in Firefox and IE but for some reason not in Chrome. svgItem.setAttribute("xlink:href", "http://link/to.png"); Is there some workarround?
type: Question
type: AnsweredQuestion
score: 1
tagged with: image
accepted answer: http://stackoverflow.com/a/25949876
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40625867
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/25949876
has title: Change xlink:href attribute in Google Chrome
has comment: http://stackoverflow.com/comment/40628165
upvote count: 1
tagged with: google-chrome

http://stackoverflow.com/q/25949510
has comment: http://stackoverflow.com/comment/40625875
type: Question
has comment: http://stackoverflow.com/comment/40669904
has comment: http://stackoverflow.com/comment/40800187
tagged with: javascript
has answer: http://stackoverflow.com/a/26443197
has title: Why does jQuery DataTables not understand this basic JSON array?
accepted answer: http://stackoverflow.com/a/26443197
upvote count: 1
tagged with: datatables
answer count: 1
favorite count: 0
has body: I'm currently pulling my hair out trying to get jQuery Datatables to work with a very simple json array. To my mind the output json matches the simple ajax example on the datatables site: "{\"data\":[[\"Row1\",\"0\",\"1\",\"1\",\"2\",\"6\",\"0\",\"1\"],[\"Row2\",\"16\",\"11\",\"13\",\"13\",\"16\",\"2\",\"5\"],[\"Row3\",\"0\",\"1\",\"1\",\"0\",\"1\",\"0\",\"0\"],[\"Row4\",\"14\",\"8\",\"19\",\"16\",\"24\",\"3\",\"0\"],[\"Row5\",\"4\",\"0\",\"2\",\"1\",\"2\",\"2\",\"1\"]]}" The only difference really is the fact that the output from my api is being escaped which I can't really help as it's being generated by JSON.NET. When debugging datatables in chrome I get a 'Uncaught TypeError: Cannot read property 'length' of undefined' exception. Here is my HTML/JavaScript: Worksource Col1 Col2 Col3 Col4 Col5 Col6 Col7 I usually have to use Json.Parse to pass something like this to a jQuery plugin, but as I understand it datatables takes care of that anyway? So my question is can anyone see where I'm going wrong?
has comment: http://stackoverflow.com/comment/40625988
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40644404
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/40630320
type: Comment
type: QuestionComment
has text: Create a directive for this jquery plugin (or search if it exists already)
score: 0
comment on: http://stackoverflow.com/q/25952251

http://stackoverflow.com/q/25943279
upvote count: 0
answer count: 1
has body: I am attempting to use Parse Cloud Code to geocode an address using the Google Maps API v3. Following the suggested code from Google I am using the following: Parse.Cloud.afterSave ('IncidentDetails', function(request, status) { var address = request.object.get("address1"); var geocoder; function initialize () { geocoder = new google.maps.Geocoder(); codeAddress (address); } function codeAddress () { geocoder.geocode( { 'address':address}, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { var lat = results[0].geometry.location.lat(); var lng = results[0].geometry.location.lng() request.object.set("lat", lat); request.object.set("lng", lng); } else { alert('Geocode was not successful for the following reasons: ' + status); } }); } initialize (); }); The code runs fine after a PFObject is saved, but fails on geocoder = new google.maps.Geocoder (); with the error: ReferenceError: google is not defined I see in HTML where a source is defined and api key set, but I don't see the same for pure java script examples. Any help on getting the geocoder variable initialized properly would be appreciated.
favorite count: 0
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/40616805
type: AnsweredQuestion
has title: Error defining geocoder variable while using Google Maps API and Parse Cloud Code
has answer: http://stackoverflow.com/a/26033231
has comment: http://stackoverflow.com/comment/40616683
downvote count: 1
type: Question
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26033231
tagged with: google-maps-api-3

http://stackoverflow.com/a/26029010
upvote count: 1
answers question: http://stackoverflow.com/q/26028909
has body: Seems what you should more or less do some research on is called a Natural Language Processor. Wikipedia defines it as : a field of computer science, artificial intelligence, and linguistics concerned with the interactions between computers and human (natural) languages [source: http://en.wikipedia.org/wiki/Natural_language_processing ]. A reputable library for .Net to do things like this is sharpnlp.. at http://sharpnlp.codeplex.com/ Hope this helps.
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/26004345
has comment: http://stackoverflow.com/comment/40726350
tagged with: jquery
has comment: http://stackoverflow.com/comment/41764292
linked to: http://stackoverflow.com/q/1300994
type: UnansweredQuestion
has body: I have a two phone fields on my form - phone and phone2. Only one of them is required. I have been unable to get the validation to work no matter what I have tried. I have tried callbacks and custom validators and it seems like I just can't get it to work. The way I would like it to work is check each field and if both are empty then display a custom message under each. If either one, or both, has data then go ahead and validate each for correctness. If/when the user clicks submit again, check both fields again and if either or both has status message, remove the message start validation on both all over again. I just cant' seem to get this to work and I don't know if it is as easy as somehow forcing the plugin to revalidate all (or custom selected) fields every time the submit button is hit or what. Hopefully this makes sense. If not please ask for more detail. I've been struggling with this for a while now and have cotton head. Basically, one of the two fields needs to have data and that data needs to be valid. I've seen the post on stackoverflow here: Conditional validation with BootstrapValidator but it looks like the answer was for a different plugin. Here is what I have been trying: .bootstrapValidator({ live: 'disabled', message: 'This value is not valid', fields: { phone: { group: '.col-md-3', validators: { callback: { callback: function(value, validator, $field) { field_name = $($field).attr('name'); if (value.length == 0 &amp;&amp; $('#phone2').val() == '') { return { valid: false, message: 'at least one phone number is required' } } else { if ( $('#phone2') == '' ) { $('#defaultForm') .bootstrapValidator('resetField', $('#phone2') ) //.bootstrapValidator('updateStatus', $('#phone2'), 'NOT_VALIDATED') ; } } value = value.replace(/\D/g, ''); if ( value != '' ) { if ( !((/^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/).test(value) &amp;&amp; (value.length == 10)) ) { //alert("PHONE DID NOT PASS VALIDATION"); return { valid: false, message: 'P…
tagged with: twitter-bootstrap
type: Question
linked to: http://stackoverflow.com/q/21878595
has answer: http://stackoverflow.com/a/54895949
tagged with: javascript
has title: bootstrapvalidator one of two fields required
score: 0
tagged with: validation
answer count: 1

http://stackoverflow.com/comment/40540459
type: Comment
type: QuestionComment
has text: That makes sense! Such a straightforward answer to an overly-convoluted question. Thanks.
comment on: http://stackoverflow.com/q/25892583
score: 0

http://stackoverflow.com/q/25880285
score: 1
tagged with: zurb-foundation
answer count: 1
has answer: http://stackoverflow.com/a/25880415
accepted answer: http://stackoverflow.com/a/25880415
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: checkbox
type: AnsweredQuestion
has title: Foundation checkboxes stop working with jQuery
upvote count: 1
has body: If you go here http://passion4web.co.uk/DigiPics/upload and upload a photo, you'll see it brings up some checkbox options to brighten, distort. etc. I am using jquery to clone #photo-template so I can use it multiple times but the problem I am having is the checkboxes will not change when clicked. This only seems to happen when I add foundation checkboxes to the page using javascript. Here is my method of adding them: var $template = $("#photo-template"); var $addedPhotos = $("#added-photos"); $addedPhotos.html(""); if(response.length &gt; 0) { for(var i in response) { var options = response[i]; var template = $template.clone(); template.find(".photo").attr("src", options['Photo URL']); template.find(".brighten").prop("checked", options['Brighten']); template.find(".sky").prop("checked", options['Sky']); template.find(".grass").prop("checked", options['Grass']); template.find(".distortion").prop("checked", options['Distortion']); template.find(".description").val(options['Description']); $addedPhotos.append(template.html()); } }
type: Question

http://stackoverflow.com/comment/40563938
type: AnswerComment
score: 0
type: Comment
has text: There are times when inline styles are useful, such as injecting custom styles into a webpage when you do not control the original webpage content. As such, this question can still be valid in cases where the solution cannot use CSS stylesheets. This still, however, doesn't change the answer to the question.
comment on: http://stackoverflow.com/a/25914666

http://stackoverflow.com/comment/40679624
type: Comment
has text: Thanks for your attention, but this is happening for `confirmDialog` and `dialog`. Do you know why this don't work like a presented?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25978996

http://stackoverflow.com/q/26016679
has title: sort visible and related hidden rows in a Bootstrap table
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
downvote count: 0
has answer: http://stackoverflow.com/a/26017269
score: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I have a table, made with bootstrap 3. I have 2 kinds of rows, one with 4 td's, I use the first of them to display the following row which is hidden by default. (shows data about the previous row) all of this works fine. BUT, the Bootstrap "sort" function (by clicking on the header rows) doesn't work as expected. It sorts ALL the rows, included the hidden ones, and my system does not work anymore... (when I click then on my main row, the following row is NOT a hidden one... :( ) Does anyone have an idea on how I could solve this problem? HTML: show data name adress buttons my name my adress some buttons THE DATA !!!! JS: $(document).ready(function(){ $('.subRow').hide(); $('body').find('.clickArrow').html(''); $('body').on('click','.clickArrow',function(){ if($(this).html()==''){ $(".clickArrow").html(''); $('.subRow').hide(); $('.mainRow td').css('background-color','#DDDACE'); $(this).parent('tr').find('td').css('background-color','white'); $(this).html(''); $(this).parent('tr').next().slideToggle("slow"); }else{ $(this).html(''); $(this).parent('tr').find('td').css('background-color','#DDDACE'); $(this).parent('tr').next().slideToggle("slow"); } }); }); I don't know what is really going on with the "sort" function from Bootstrap. Maybe the solution is to disable the bootstrap sort system, and implement mine. I'm just wondering if someone already had this problem and found a decent solution to this.
has answer: http://stackoverflow.com/a/48736872
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25875157
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25875018
answers question: http://stackoverflow.com/q/25875018
score: 3
type: Answer
upvote count: 3
has body: You can iterate the prototypes by doing for (var o=inst; o!=null; o=Object.getPrototypeOf(o)) console.log(o); // {} // C.prototype // B.prototype // A.prototype // Object.prototype However, that will only iterate the prototype chain. There is no such thing as a "constructor chain". If you want to access the constructors, you will need to set the .constructor property on the prototypes appropriately when inheriting: function A() {} function B() {} B.prototype = Object.create(A.prototype); B.prototype.constructor = B; function C() {} C.prototype = Object.create(B.prototype); C.prototype.constructor = C; var inst = new C(); for (var c=inst.constructor; c!=null; (c=Object.getPrototypeOf(c.prototype)) &amp;&amp; (c=c.constructor)) console.log(c); // C // B // A // Object which I could then use to instantiate another instance You would only need to know of C for that, not of the "chain". You may access it via inst.constructor if you have set C.prototype.constructor correctly. However, it might be a bad idea to instantiate objects from arbitrary constructors; you don't know the required parameters. I don't know what you actually want to do, but your request might hint at a design flaw.

http://stackoverflow.com/comment/40651912
comment on: http://stackoverflow.com/a/25963503
type: Comment
has text: Updated again. But now I cannot access $scope.weeks outside of that callback. Am I doing something fundamentally incorrect here?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25875809
upvote count: 1
accepted answer: http://stackoverflow.com/a/26315980
has comment: http://stackoverflow.com/comment/40493547
has comment: http://stackoverflow.com/comment/40493475
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40493762
score: 1
type: Question
downvote count: 0
tagged with: javascript
has body: I am trying to display outout of html instead of html tags so I used this regular expression. String(text).replace(/&lt;[^&gt;]+&gt;/gm, ''); To replace the html tags and it removed all the html tags but I still have &amp; # 10; in the text. I guess it is for the new line character . How do I escape it? &amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10;&amp; # 10; Where: Access code: 0164 125 followed by the # sign.&amp; # 10; Review&amp; # 10;- New Template PRE DR template v03.xlsx&amp; # 10;- Information Regarding the change&amp; # 10;- Documentacion description Functionality, incidents and project code.&#10;- Delivery software&#10; - Test&#10;&#10;&#10;&#10;
has comment: http://stackoverflow.com/comment/40495004
has title: how to replace &#10; with empty string
answer count: 1
tagged with: regex
has comment: http://stackoverflow.com/comment/40493755
favorite count: 0
has comment: http://stackoverflow.com/comment/40493567
has answer: http://stackoverflow.com/a/26315980

memory-management
tags question: http://stackoverflow.com/q/25956725
type: Tag
tag name: memory-management

http://stackoverflow.com/a/26018036
answers question: http://stackoverflow.com/q/26017875
has body: If you disable an input the value is not sent up to the server. That would be why there is no value being sent to the server. Either use a hidden input field or do not disable the input.
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/26017875
type: Answer
has comment: http://stackoverflow.com/comment/40750459

http://stackoverflow.com/q/25996377
has answer: http://stackoverflow.com/a/26000699
has comment: http://stackoverflow.com/comment/40712643
has body: How can I filter the list when 1 of the parameters is given (in a different field than the search field). For example, the user specifies the group ="Test" and start searching in the #ContactPerson field. I want only the records where "group":"Test" showing up. ("#ContactPerson").autocomplete({ source: [{"value":"XYZ","name":"ZJL","group":"Test"},...] ... This is what I've tried so far, but it does not work: http://jsfiddle.net/71puvk59/
has comment: http://stackoverflow.com/comment/40715558
type: AnsweredQuestion
tagged with: jquery-ui
linked to: http://stackoverflow.com/q/7734554
type: Question
accepted answer: http://stackoverflow.com/a/26000699
tagged with: jquery-ui-autocomplete
has title: jQuery autocomplete: downsize list on value input field
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40509768
comment on: http://stackoverflow.com/a/25884621
type: Comment
has text: Then I'd suggest putting it in a short timeout.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40507386
has text: ok, thanks. Installing Python can fix that problem but I received an error like this ... http://stackoverflow.com/questions/22681477/not-able-to-install-socket-io-on-windows-server-2012
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25881845
type: Comment

http://stackoverflow.com/q/25934976
favorite count: 0
has body: I have just implemented Stripe for payment processing within my application and everything seems okay, except one issue I just can't understand. I am using the test data listed here. Specifically, I send the following data: The above two sets of data both fail: If I change the month to be 10, 11 or 12, it works okay. This issue holds true for all other test card numbers as well.
has comment: http://stackoverflow.com/comment/40605695
possible better answer: http://stackoverflow.com/a/28422172
has comment: http://stackoverflow.com/comment/40605924
downvote count: 0
type: Question
type: AnsweredQuestion
tagged with: payment-gateway
has answer: http://stackoverflow.com/a/25937834
accepted answer: http://stackoverflow.com/a/25937834
score: 1
answer count: 2
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/28422172
has title: Stripe test data: single digit month failing validation
tagged with: stripe-payments

http://stackoverflow.com/comment/40587440
type: Comment
has text: Thanks for you valuable time @frank.
comment on: http://stackoverflow.com/a/25926859
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40611522
type: AnswerComment
score: 0
type: Comment
has text: Sure thing, it's just saying: (if this is true) ? "assign this" : "else assign this"
comment on: http://stackoverflow.com/a/25940175

http://stackoverflow.com/comment/40687342
score: 0
comment on: http://stackoverflow.com/a/25982977
type: Comment
has text: in your code , what where/how homeModule looks like ?
type: AnswerComment

http://stackoverflow.com/comment/40749421
type: Comment
type: QuestionComment
has text: i have added the sample code. pls check that.
comment on: http://stackoverflow.com/q/26017365
score: 0

http://stackoverflow.com/a/25927037
upvote count: 1
type: Answer
downvote count: 0
has body: You know you can use only the selected Meteor package in your project, you don't have to load the whole platform? In case of check this is pretty simple as it doesn't have many dependencies, so you can just use the package code as a library. See its package.json file: Package.on_use(function (api) { api.use(['underscore', 'ejson'], ['client', 'server']); api.export(['check', 'Match']); api.add_files('match.js', ['client', 'server']); }); The only dependencies are underscore and ejson, and there is only one file. So as long as you have underscore and take care of EJSON, you can just add this file to your project and have check in vanilla JS. The ejson package can be dealt with similarly, or you can just precede the file with EJSON = JSON; and limit your checks to vanilla JSON objects.
answers question: http://stackoverflow.com/q/25917726
score: 1
has comment: http://stackoverflow.com/comment/40651183

forms
tags question: http://stackoverflow.com/q/25875760
tags question: http://stackoverflow.com/q/25944207
tags question: http://stackoverflow.com/q/25978533
tags question: http://stackoverflow.com/q/26013604
tags question: http://stackoverflow.com/q/25924103
tags question: http://stackoverflow.com/q/25934900
tags question: http://stackoverflow.com/q/25925496
tags question: http://stackoverflow.com/q/25877594
tags question: http://stackoverflow.com/q/25890461
tags question: http://stackoverflow.com/q/26014172
tags question: http://stackoverflow.com/q/26022182
tags question: http://stackoverflow.com/q/26004991
tags question: http://stackoverflow.com/q/25958228
type: Tag
tags question: http://stackoverflow.com/q/25985452
tags question: http://stackoverflow.com/q/25876418
tags question: http://stackoverflow.com/q/25980189
tags question: http://stackoverflow.com/q/25883611
tags question: http://stackoverflow.com/q/25899694
tags question: http://stackoverflow.com/q/25902549
tags question: http://stackoverflow.com/q/25920137
tags question: http://stackoverflow.com/q/25912474
tags question: http://stackoverflow.com/q/25934429
tags question: http://stackoverflow.com/q/25928053
tags question: http://stackoverflow.com/q/25946412
tags question: http://stackoverflow.com/q/25991321
tags question: http://stackoverflow.com/q/25882758
tags question: http://stackoverflow.com/q/25910527
tags question: http://stackoverflow.com/q/25996228
tags question: http://stackoverflow.com/q/25881155
tags question: http://stackoverflow.com/q/25876592
tags question: http://stackoverflow.com/q/26031542
tags question: http://stackoverflow.com/q/25967991
tags question: http://stackoverflow.com/q/25927730
tags question: http://stackoverflow.com/q/25900663
tags question: http://stackoverflow.com/q/26003523
tags question: http://stackoverflow.com/q/25969424
tags question: http://stackoverflow.com/q/25886767
tags question: http://stackoverflow.com/q/26019693
tags question: http://stackoverflow.com/q/26010963
tags question: http://stackoverflow.com/q/25919401
tags question: http://stackoverflow.com/q/25982658
tags question: http://stackoverflow.com/q/26023252
tags question: http://stackoverflow.com/q/25898965
tags question: http://stackoverflow.com/q/25982322
tags question: http://stackoverflow.com/q/25977252
tags question: http://stackoverflow.com/q/25899517
tags question: http://stackoverflow.com/q/25874790
tags question: http://stackoverflow.com/q/26026272
tags question: http://stackoverflow.com/q/25875739
tags question: http://stackoverflow.com/q/26015903
tags question: http://stackoverflow.com/q/25953559
tags question: http://stackoverflow.com/q/25894788
tags question: http://stackoverflow.com/q/26018891
tags question: http://stackoverflow.com/q/25981435
tags question: http://stackoverflow.com/q/25918596
tags question: http://stackoverflow.com/q/26017275
tags question: http://stackoverflow.com/q/26009978
tags question: http://stackoverflow.com/q/25966870
tags question: http://stackoverflow.com/q/26028951
tags question: http://stackoverflow.com/q/25924944
tags question: http://stackoverflow.com/q/25991124
tags question: http://stackoverflow.com/q/25890936
tag name: forms
tags question: http://stackoverflow.com/q/25902647
tags question: http://stackoverflow.com/q/25958904
tags question: http://stackoverflow.com/q/25918564
tags question: http://stackoverflow.com/q/25948556
tags question: http://stackoverflow.com/q/25890657
tags question: http://stackoverflow.com/q/25983603
tags question: http://stackoverflow.com/q/25901387
tags question: http://stackoverflow.com/q/25894367
tags question: http://stackoverflow.com/q/25925020
tags question: http://stackoverflow.com/q/25989499
tags question: http://stackoverflow.com/q/25953091
tags question: http://stackoverflow.com/q/25972826
tags question: http://stackoverflow.com/q/26007216
tags question: http://stackoverflow.com/q/26008183
tags question: http://stackoverflow.com/q/25977978
tags question: http://stackoverflow.com/q/25925365

http://stackoverflow.com/comment/40793426
type: AnswerComment
has text: It works for me after I refresh the page, but if I just go straight to tab 3 when the page is loaded nothing is there. :( I've cleared my cache and tried it across all browsers.
type: Comment
comment on: http://stackoverflow.com/a/26027968
score: 0

http://stackoverflow.com/a/25960784
accepted answer of: http://stackoverflow.com/q/25959467
type: Answer
has body: You'll need to fix the UV coordinates of each face in the mesh. UV Coordinates are what tells GL how to map the image onto the face. The top left corner should have UV Coordinate (0,0) and the bottom right should have (1,1). One solution is to just iterate through each face and give it the normalized UV coordinates based on it's position in space, which could work for a simple example like yours. You basically calculate the bounding box of your shape to normalize the vertex coordinates, then create 3 UV Coordinates for each face (since each face is a triangle). Try this: http://jsfiddle.net/MacroMeez/e84y9bbq/1/ remapUVs = (geo) -&gt; geo.computeBoundingBox() min = geo.boundingBox.min max = geo.boundingBox.max offset = new THREE.Vector2(0 - min.x, 0 - min.y) size = new THREE.Vector2(max.x - min.x, max.y - min.y) # Remove the old UVs that were incorrect geo.faceVertexUvs[0] = [] for face, i in geo.faces v1 = geo.vertices[face.a] v2 = geo.vertices[face.b] v3 = geo.vertices[face.c] # Push on a new UV based on its position inside the shape geo.faceVertexUvs[0].push [ new THREE.Vector2((v1.x + offset.x)/size.x, (v1.y + offset.y)/size.y), new THREE.Vector2((v2.x + offset.x)/size.x, (v2.y + offset.y)/size.y), new THREE.Vector2((v3.x + offset.x)/size.x, (v3.y + offset.y)/size.y) ] geo.uvsNeedUpdate = true based off the code found THREE.js generate UV coordinate If you're familiar at all with blender or other 3d software, you can also create and map the mesh there then import it and not deal with this.
upvote count: 5
score: 5
answers question: http://stackoverflow.com/q/25959467
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25894370
accepted answer of: http://stackoverflow.com/q/25883693
answers question: http://stackoverflow.com/q/25883693
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: I figured out my problem. The line in the Ajax where I set the data: data: { username: $('#staff_list').val() } is causing the problem. For some reason it is getting an array, making the line data: { username: $('#staff_list').val()[0] } fixes the problem.
upvote count: 1
has comment: http://stackoverflow.com/comment/40527089

http://stackoverflow.com/comment/40766226
has text: Disabling is NOT just an ui effect. See http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26019675

http://stackoverflow.com/q/25896555
type: Question
accepted answer: http://stackoverflow.com/a/25896746
answer count: 1
tagged with: javascript
tagged with: jquery
has title: save multi checkbox by id
has body: I am working with live checkbox, so when I need to put ON(1) or OFF(0) one checkbox immediately the checkbox update the value in the DB and all is ok...but now I am working with live checkbox in a user list(which I already have right now 100 users)...so the problem is when I try to put someone a ban, the checkbox just only works with the last one and not in the others users... can you please help me? Here is the form: &lt;form class="form-horizontal" method="post" name="ban" id="ban"&gt; &lt;input type="hidden" name="id" value="&lt;?php echo $row['id']; ?&gt;"&gt; &lt;?php if ($row['banned'] == '1') { echo '&lt;input type="checkbox" name="banned" data-no-uniform="true" class="iphone-toggle" value="on" checked&gt;'; } else { echo '&lt;input type="checkbox" name="banned" data-no-uniform="true" class="iphone-toggle" value="off" &gt;'; } ?&gt; &lt;/form&gt; &lt;div id="gif" style="display:none;" align="center"&gt;&lt;img src="img/ajax-loaders/ajax-loader-1.gif" /&gt;&lt;/div&gt; Here the JS: $("#ban").click(function(){ $.ajax({ type:"POST", url:"includes/ban.php?ts=" + new Date().getTime(), dataType:"text", data:$(this).serialize(), beforeSend:function(){ $("#gif").show(); }, success:function(response){ $("#gif").hide(); } }) return false; }); And this is the code to DB: &lt;?php include('con.php'); if($_POST['banned']==on) { try{ $id = $_POST['id']; $banned = '0'; $sql = "UPDATE BANS SET banned = :banned WHERE id= :id"; $stmt = $conn-&gt;prepare($sql); $stmt-&gt;bindParam(':banned', $banned, PDO::PARAM_STR); $stmt-&gt;bindParam(':id', $id, PDO::PARAM_INT); $stmt-&gt;execute(); echo "&lt;div class='alert alert-block alert-success fade in'&gt; &lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;&lt;/button&gt; the ban is off!. &lt;/div&gt;"; }catch(PDOException $exception){ echo "Error: " . $exception-&gt;getMessage(); } } else { try{ $id = $_POST['id']; $banned = '1'; $sql = "UPDATE BANS SET banned = :banned WHERE id= :id"; $stmt…
score: 0
tagged with: checkbox
has answer: http://stackoverflow.com/a/25896746
type: AnsweredQuestion

http://stackoverflow.com/q/25976214
has comment: http://stackoverflow.com/comment/40674233
has body: Sorry to ask such elementary question. I am learning Javascript and jQuery. I have a popup with 3 input fields say ETD, ETA and duration. I am trying to calculate duration on focusout from ETD and ETA and there will be an AjaxCall in which we do the calculation and other stuff. The issue is whenever I press the Tab Key(focusing out of ETD or ETA) the focus will be moved out of popup and will moved to main window. I am trying to set focus forcefully on these input fields on success of ajax call. I am trying to achieve this using flags, for example if focusout happened on ETD then ETDFlag will be true and I'll check this flag on onsuccess of ajax call, so if ETDFlag is true I'll put focus on ETA and so on, but the issue is even if I focusout of the field by clicking out of field the focus will go to next field, so I need to set flags only when Tab Key is pressed. Below is the sample code: $("#ETD").focusout( function (event) { var keyCode=event.keyCode || event.which; if(keyCode == 9){ ETD= true; ETA= false; } calculateDuration(); I am not getting the event object inside as when I tried alert(event); the output was [object Object]. But something like: alert(e.target.id) Will show the id of the field. e.g. ETD Please help and tell me what is wrong. I am new in Javascript so not able to understand. Edited for more clarification The goal is to go to the next input when user presses the Tab button. As mentioned current behaviour is after pressing tab (focusout) an ajax call will happen to calculate the duration field value and focus will move out of popup to main window! So the main purpose of having event object is to get the keycode of the Tab button: var keyCode=event.keyCode || event.which; If(keyCode==9) //tab key code {Then make some flag true} But on press of Tab key it never come inside if condition! Edited for more clarification 2 var keyCode=event.keyCode || event.which; I tried to use above code on a keyup event and "keyCode" is able to capture almost all the k…
tagged with: jquery-focusout
has answer: http://stackoverflow.com/a/25988064
type: Question
has comment: http://stackoverflow.com/comment/40674218
has comment: http://stackoverflow.com/comment/40687541
tagged with: javascript
has title: How to access the Event Object in focusout Event Handler
has comment: http://stackoverflow.com/comment/40687560
has answer: http://stackoverflow.com/a/25976258
has comment: http://stackoverflow.com/comment/40695998
has comment: http://stackoverflow.com/comment/40688324
score: 0
tagged with: jquery-events
answer count: 2
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/q/25986500
has comment: http://stackoverflow.com/comment/40693569
has comment: http://stackoverflow.com/comment/40693648
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25986724
has comment: http://stackoverflow.com/comment/40693580
has body: Let's say I have these spans that contain numbers I am trying to fetch and count ... 9 apples 7 apples 3 apples 6 apples 11 apples How would I call on the browser to fetch the number of apples in each span and then return a total number? I only know basic javascript so I would think Id have to loop through the span elements and find whichever one has the className "apples". Ha, and well ... I don't know what to do after that for this particular situation. Any help is appreciated! Thanks.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40693574
tagged with: count
tagged with: numbers
score: 0
has answer: http://stackoverflow.com/a/25986701
tagged with: loops
has answer: http://stackoverflow.com/a/25986724
has title: How To Loop Through Elements & Count Numbers?
possible better answer: http://stackoverflow.com/a/25986701
tagged with: javascript

http://stackoverflow.com/comment/40672848
comment on: http://stackoverflow.com/q/25975471
type: QuestionComment
score: 1
has text: What are you trying to accomplish with these popups? It's up to the user to decide to close a webpage/browser/popup, not you. This sounds like a bad practice from the start
type: Comment

http://stackoverflow.com/comment/42666385
score: 0
type: QuestionComment
type: Comment
has text: I am facing the same problem. any luck on this?
comment on: http://stackoverflow.com/q/25874547

http://stackoverflow.com/q/25961817
downvote count: 0
tagged with: ios
favorite count: 0
has body: Working on my first phonegap ios app. Trying to incorporate this plugin https://github.com/Wizcorp/phonegap-facebook-plugin/tree/master/platforms/ios/www Basically I just need to alert the users email and first/last name, although I'm a bit stuck on how to do so using this plugin. What I wanted to do was retrieve that information, then pre populate some forms to create a new user to use with Parse. I'm able to get a response from this function that displays a status and an authResponse with tokens and the user ID: var login = function () { if (!window.cordova) { var appId = prompt("Enter FB Application ID", ""); facebookConnectPlugin.browserInit(appId); } facebookConnectPlugin.login( ["email"], function (response) { alert(JSON.stringify(response)) }, function (response) { alert(JSON.stringify(response)) }); } I'm just unsure in terms of next steps on how to go about retrieving the users email and first/lastname..and whther or not I have to dig deeper into facebooks API. any help is appreciated. * UPDATED * Figured it out. I was missing a step that i found over at the facebook api page var login = function() { if (!window.cordova) { facebookConnectPlugin.browserInit('APPID'); facebookConnectPlugin.browserInit(appId); } facebookConnectPlugin.login(["email"], function(response) { if (response.authResponse) { facebookConnectPlugin.api('/me', null, function(response) { alert('Good to see you, ' + response.email + response.name + '.'); }); } }); }
type: UnansweredQuestion
tagged with: facebook
has title: get facebook user email and user first/last name with Phonegap FB Plugin for IOS app
has answer: http://stackoverflow.com/a/25967151
tagged with: cordova
has comment: http://stackoverflow.com/comment/72933727
has comment: http://stackoverflow.com/comment/72933381
upvote count: 7
has comment: http://stackoverflow.com/comment/72933768
type: Question
score: 7
tagged with: javascript
answer count: 1

http://stackoverflow.com/a/25975397
has body: You are posting to the wrong URL; your own data shows the form posts to https://web.iress.com.au/html/logon.aspx but you are posting to /LogonForm.aspx instead. Note that the session object will take care of the cookie for you, do not set the Cookie header yourself. You should avoid setting the Host, Origin and Content-Type headers, and the Cache-Control, Accept* headers and Pragma are not going to have any influence how this works.
accepted answer of: http://stackoverflow.com/q/25975185
has comment: http://stackoverflow.com/comment/40672995
score: 0
answers question: http://stackoverflow.com/q/25975185
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25975100
has answer: http://stackoverflow.com/a/25975216
has title: Is it possible to realize AJAX with some absolute url form same domain?
has comment: http://stackoverflow.com/comment/40672113
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25975216
type: Question
has body: I have: page, which include javaScript code place in URL site.com/index/user but I want to send ajax request to URL: site.com/php/myscript.php, so can I use absolute url for this? Or how can I send request with relative URL?
tagged with: javascript
answer count: 1
tagged with: web
tagged with: ajax

http://stackoverflow.com/comment/56582104
comment on: http://stackoverflow.com/a/25990113
score: 0
type: AnswerComment
has text: What is MyAuth.loggedIN()? Where is it defined/ Sorry, I am very new to it. @NewDev
type: Comment

http://stackoverflow.com/comment/40677614
has text: 3 is a value of the cookie ( times for popup to appear )
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25972856

http://stackoverflow.com/comment/40684913
has text: Thanks, formatting is working. The IF statement is not however. Should be Pass if the average benefit percentage ratio is greater than 55, but it currently says "Fail". I'm having trouble locating the bug.
comment on: http://stackoverflow.com/a/25976787
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25924707
type: Answer
upvote count: 1
score: 1
has body: I think this will give you the same behavior, without spending as much time parsing. var value = parseInt(counter.text(), 10); if(value &gt; 0) { value--; counter.text(value); } if(value &lt; 1) { counter.attr('data-active', true); } Create a variable to hold the result of parsing. This reduces repetition of code, as well as avoiding doing the same work over and over. You were reducing the value found in counter.text() prior to checking the value, so I'm reducing the value of the variable to preserve the same behavior. Note that you probably can improve the performance of your loop even better, but you haven't included your loop in the OP.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40582905
has comment: http://stackoverflow.com/comment/40582822
has comment: http://stackoverflow.com/comment/40583235
has comment: http://stackoverflow.com/comment/40583166
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25924679
answers question: http://stackoverflow.com/q/25924679

http://stackoverflow.com/comment/40499696
comment on: http://stackoverflow.com/a/25878812
score: 0
type: AnswerComment
type: Comment
has text: Your loop is going 1..10 will throw an exception for out of bounds in many cases.

http://stackoverflow.com/q/25921427
tagged with: http://stackoverflow.com/tag/html
upvote count: 17
favorite count: 0
linked to: http://stackoverflow.com/q/17075689
tagged with: angularjs
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/36637426
score: 17
tagged with: ionic-framework
type: Question
tagged with: angularjs-directive
has body: Im using this filter https://github.com/a8m/angular-filter#groupby to order my data like so, and it works great: &lt;div ng-repeat="(key, value) in tags.tags.objects | groupBy:'category.name' "&gt; Now Im trying to keep the order of that groups, by category.order. Is this possible? I tried piping it like so: &lt;div ng-repeat="(key, value) in tags.tags.objects | groupBy:'category.name' | orderBy:'category.order' "&gt; But it does not make any difference
has answer: http://stackoverflow.com/a/35410538
tagged with: javascript
has answer: http://stackoverflow.com/a/25940490
answer count: 3
has title: Angular ng-repeat groupBy and Keep order

http://stackoverflow.com/q/25877003
has comment: http://stackoverflow.com/comment/40496001
downvote count: 0
has title: How to increment a value inside an object variable
type: Question
has answer: http://stackoverflow.com/a/25877067
score: 5
answer count: 3
tagged with: javascript
tagged with: variables
favorite count: 0
has comment: http://stackoverflow.com/comment/40496160
has comment: http://stackoverflow.com/comment/40496054
linked to: http://stackoverflow.com/q/25663030
upvote count: 5
has comment: http://stackoverflow.com/comment/40496085
has body: I have the following. var dataset = {val1 : 0, val2 : 0, val3 : 0}; var person = []; var totalPeople = 10; for(var i = 0; i &lt;totalPeople; i++) { person[i] = dataset; } Why i chose this approach, click here . I'm trying to make one of the values auto increment inside another for loop. I've tried the following approaches to no avail. person[1]{val1 : 0, val2 : 0, val3 : val3 + 1}; person[1]{val1 : 0, val2 : 0, val3 : person[1].val3 + 1}; person[1].val3 = person[1].val3 + 1; any ideas?
has answer: http://stackoverflow.com/a/25877094
has answer: http://stackoverflow.com/a/26449716
accepted answer: http://stackoverflow.com/a/26449716
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25877094

http://stackoverflow.com/a/25952020
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25951702
has body: Something like this should work (if I understand your question). I only changed the jQuery and one line of the CSS (the last line in .box was changed to transition: background 0.4s 0.5s, margin 0.4s;). $(document).ready(function () { $(".textarea").hover( function () { $(this).height($(this).height() + 200); $(".box").css("margin-top", "-200px"); }, function () { $(this).height($(this).height() - 200); $(".box").css("margin-top", ""); } ); }); @charset "UTF-8"; /* CSS Document */ html { background: url(bilder/backnormal.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } body { margin: 0; padding: 0; } .textarea { background: rgba(255,255,255,0.5); width: 100%; float: left; position: relative; -webkit-transition: all 0.3s linear; -moz-transition: all 0.3s linear; -ms-transition: all 0.3s linear; -o-transition: all 0.3s linear; transition: all 0.3s linear; } .box1, .box2 { color: #666; height: 57%; margin-top: 0px; margin-bottom: 0px; margin-right: 0px; text-align: left; padding-left: 350px; transition: background-color 0.5s ease-in-out; float: left; } .box1:hover, .box2:hover { background: rgba(255,255,255,0.2); transition: background-color 0.5s ease-in-out; } /*________*/ .box { width: 300px; height: 400px; position: relative; background: rgba(255,255,255,0); display: inline-block; float: left; margin-top: 10%; margin-bottom: 10%; margin-left: 35%; margin-right: 35%; cursor: default; text-align: center; -webkit-transition: background 0.4s 0.5s; transition: background 0.4s 0.5s, margin 0.4s; } .box:hover { background: rgba(255,255,255,0.2); -webkit-transition-delay: 0s; transition-delay: 0s; } .logo { width: 90%; padding-top: 20%; } hello textexttextextextextexttextextxtxtexetxtextextextetex hello again textext haethaethaethaefgae wordswordswords

http://stackoverflow.com/comment/40545608
score: 0
comment on: http://stackoverflow.com/q/25887972
has text: "Unable to post a form" means submit button is not working after adding image from ckeditor dialog box. In this case, using ckeditor event "dialogDefinition" and add custom attribute in image tag, submit button of form is not working and no javascript error occur.
type: Comment
type: QuestionComment

parse-platform
tags question: http://stackoverflow.com/q/26017249
tags question: http://stackoverflow.com/q/25877088
type: Tag
tags question: http://stackoverflow.com/q/25877320
tags question: http://stackoverflow.com/q/25879403
tags question: http://stackoverflow.com/q/25926293
tags question: http://stackoverflow.com/q/25943279
tags question: http://stackoverflow.com/q/25983100
tags question: http://stackoverflow.com/q/26024052
tags question: http://stackoverflow.com/q/25984026
tags question: http://stackoverflow.com/q/25956366
tags question: http://stackoverflow.com/q/25906751
tags question: http://stackoverflow.com/q/25964180
tags question: http://stackoverflow.com/q/25955405
tags question: http://stackoverflow.com/q/25987595
tags question: http://stackoverflow.com/q/25971966
tags question: http://stackoverflow.com/q/25985611
tags question: http://stackoverflow.com/q/25875210
tags question: http://stackoverflow.com/q/25954790
tags question: http://stackoverflow.com/q/25894744
tags question: http://stackoverflow.com/q/26024135
tags question: http://stackoverflow.com/q/25973972
tags question: http://stackoverflow.com/q/25902263
tags question: http://stackoverflow.com/q/25951591
tags question: http://stackoverflow.com/q/25983484
tags question: http://stackoverflow.com/q/25946198
tags question: http://stackoverflow.com/q/25967425
tags question: http://stackoverflow.com/q/25948412
tags question: http://stackoverflow.com/q/26022096
tag name: parse-platform
tags question: http://stackoverflow.com/q/25948465

http://stackoverflow.com/comment/40569806
type: QuestionComment
comment on: http://stackoverflow.com/q/25917704
score: 0
has text: Excellent! Adding the JavaScript shouldn't be too difficult for you then. Do make some attempts and let us know if you can't get your **JavaScript** code working!
type: Comment

http://stackoverflow.com/comment/40554171
has text: you had nice idea, but you can still display both at the same time. here check it how i solve it. if you want you can post it as answer http://jsfiddle.net/765rzuy3/2/
comment on: http://stackoverflow.com/q/25909011
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25993704
type: UnansweredQuestion
tagged with: css
answer count: 4
has title: Bootstrap tabbed pane doesn't works
has answer: http://stackoverflow.com/a/25993804
type: Question
has answer: http://stackoverflow.com/a/25993929
has body: I'm making a modal tabbed pane in bootstrap according to guide. Here is fiddle and code: $(document).on("click","#tabs a",function(event) { alert("!!!"); event.preventDefault(); $(this).tab('show'); }) This doesn't works (content of tabs isn't shown). What is my mistake? Do I activate tabs wrong or what?
has answer: http://stackoverflow.com/a/25993844
has comment: http://stackoverflow.com/comment/40721229
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25994067
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/40728402
score: 1
comment on: http://stackoverflow.com/q/26005480
has text: @Tom since you mentioned Flash: See [this](https://www.apple.com/hotnews/thoughts-on-flash/) and [this](http://en.wikipedia.org/wiki/Apple_and_Adobe_Flash_controversy)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40808454
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26029172
has text: It should throw a [*DOMException*](http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-184E7107) since "… *this node is of a type that does not allow children of the type of the `newChild node`*" but there you go. :-( But anyway, what I was referring to is that if a P is placed after the closing *body* tag in the markup, it will be moved to inside the body.
score: 0

http://stackoverflow.com/q/25992178
has answer: http://stackoverflow.com/a/25992244
has body: I have an image that is set to refresh every 1000 milliseconds. var int_time = setInterval(function() { var myImageElement = document.getElementById('myImage'); myImageElement.src = 'https://api.evercam.io/v1/cameras/&lt;%= @camera["id"] %&gt;/snapshot.jpg?api_id=&lt;%= current_user.api_id -%&gt;&amp;api_key=&lt;%= current_user.api_key -%&gt;?rand=' + new Date().getTime(); }, 1000); img.onclick = function() { clearInterval(int_time); } I would like to add a stop /start button that prevents it from refreshing on click and restarts its on click like a play pause button would behave. Does anyone know how I would achieve this for refreshing images?
tagged with: onclick
has answer: http://stackoverflow.com/a/25992229
type: Question
tagged with: javascript
has title: Image refresh setInterval with Stop Start button
score: 0
answer count: 2
tagged with: setinterval
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/comment/40695232
has text: Agreed, at least some of the code has been edited in Word or Wordpad resulting in “smartQuotes”. Fixing them is a must though not an answer to the question posed.
type: AnswerComment
comment on: http://stackoverflow.com/a/25983531
score: 0
type: Comment

http://stackoverflow.com/q/25915634
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40570361
upvote count: 279
has body: I've just finished reading the Promises/A+ specification and stumbled upon the terms microtask and macrotask: see http://promisesaplus.com/#notes I've never heard of these terms before, and now I'm curious what the difference could be? I've already tried to find some information on the web, but all I've found is this post from the w3.org Archives (which does not explain the difference to me): http://lists.w3.org/Archives/Public/public-nextweb/2013Jul/0018.html Additionally, I've found an npm module called "macrotask": https://www.npmjs.org/package/macrotask Again, it is not clarified what the difference exactly is. All I know is, that it has something to do with the event loop, as described in https://html.spec.whatwg.org/multipage/webappapis.html#task-queue and https://html.spec.whatwg.org/multipage/webappapis.html#perform-a-microtask-checkpoint I know I should theoretically be able to extract the differences myself, given this WHATWG specification. But I'm sure that others could benefit as well from a short explanation given by an expert.
has answer: http://stackoverflow.com/a/60210808
score: 279
possible better answer: http://stackoverflow.com/a/30910084
type: Question
has answer: http://stackoverflow.com/a/30910084
has answer: http://stackoverflow.com/a/25933985
tagged with: event-loop
has answer: http://stackoverflow.com/a/74700864
has answer: http://stackoverflow.com/a/77018559
downvote count: 0
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/70883212
favorite count: 0
has title: Difference between microtask and macrotask within an event loop context
tagged with: promise
accepted answer: http://stackoverflow.com/a/25933985
has comment: http://stackoverflow.com/comment/103901199

http://stackoverflow.com/a/26015103
has body: var original = $scope.user; when resetting : $scope.user= angular.copy(original); $scope.userForm.$setPristine(); remove type='reset' in &lt;button&gt; here is the Angular Documentation for form controllers.
answers question: http://stackoverflow.com/q/26015010
has comment: http://stackoverflow.com/comment/40745906
has comment: http://stackoverflow.com/comment/40745485
has comment: http://stackoverflow.com/comment/61283164
has comment: http://stackoverflow.com/comment/43386372
upvote count: 41
has comment: http://stackoverflow.com/comment/40745664
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40745739
type: Answer
has comment: http://stackoverflow.com/comment/40745790
score: 41
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26015010

http://stackoverflow.com/a/32609711
score: 1
upvote count: 1
has body: You can add a jquery validation method like shown below jQuery.validator.addMethod("checksize", function (val, element) { var size = element.files[0].size; console.log(size); if (size &gt; 2*1048576)// checks the file more than 1 MB { console.log("returning false"); return false; } else { console.log("returning true"); return true; } }, "File type error"); and use it like below $(document).ready(function(){ $('#form').validate({ rules: { image: { required: true, extension:'jpe?g,png', checksize:true, } } }); }); Try this..
answers question: http://stackoverflow.com/q/25905412
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40649778
has text: ...or just check your browser console
score: 0
comment on: http://stackoverflow.com/q/25962696
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40705457
type: Comment
type: QuestionComment
has text: i was hoping to hide the code and show just the snippet (i do not wanted it to be that big (sorry if i abused the system)
comment on: http://stackoverflow.com/q/25993488
score: 0

http://stackoverflow.com/q/25982435
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25983876
accepted answer: http://stackoverflow.com/a/25983876
tagged with: gsap
tagged with: animation
tagged with: append
type: AnsweredQuestion
has title: Append a new object then animate
has body: I am having trouble getting my animation to fire after I create new slides. I am trying to make a train board that updates from xml data every 20 seconds or so. Create new slides Animate new slides in from above the "slotXX" Futre steps: Change div tag removing the "a" while changing z-index and removing hidden old slide Repeat If anyone can set me on the right direction many thanks will ensue. I don't mind if you just point me to a tutorial that's almost identical or if you want to fork my codepen. Codepen URL: http://codepen.io/Spiderian/pen/HzLqJ function nextSet() { $( '#slot01' ).append( ' 2 XML Data Terminal Y min ' ); $( '#slot02' ).append( ' 3 XML Data Terminal Y min ' ); $( '#slot03' ).append( ' 4 XML Data Terminal Y min ' ); $( '#slot04' ).append( ' 5 XML Data Terminal Y min ' ); } $(document).ready(function () { window.setTimeout(nextSet, 2000); }); function slider() { var rt01a = document.getElementById('rt01a'); var rt02a = document.getElementById('rt02a'); var rt03a = document.getElementById('rt03a'); var rt04a = document.getElementById('rt04a'); TweenMax.from( [rt01a, rt02a, rt03a, rt04a],5, {css: {top: -80}}); }
type: Question
tagged with: javascript

http://stackoverflow.com/q/25927797
has answer: http://stackoverflow.com/a/25936361
accepted answer: http://stackoverflow.com/a/25936361
type: AnsweredQuestion
has body: I want to create a SAPUI TreeTable from a JSON request, currently my output looks like this (as you can see, every node contains an empty row -> I do not know where this is coming from and I do not want to have these empty rows): My Table definition: //Create an instance of the table control var oTreeTable = new sap.ui.table.TreeTable({ columns: [ new sap.ui.table.Column({ label : new sap.ui.commons.Label({ text : "", }), template : new sap.ui.commons.TextView({ text : "{Title}", textAlign : sap.ui.core.TextAlign.Begin, }), }), //new sap.ui.table.Column({label: "Mon01", template: "Mon01"}), //new sap.ui.table.Column({label: "Mon02", template: "Mon02"}), //new sap.ui.table.Column({label: "Mon03", template: "Mon03"}), //new sap.ui.table.Column({label: "Mon04", template: "Mon04"}), ], selectionMode: sap.ui.table.SelectionMode.None, enableColumnReordering: false, expandFirstLevel: false, toggleOpenState: function(oEvent) { } }); My getJSON and convert flat structure to parent/child structure (thanks to yaku) $.getJSON(sServiceUrl, function (data) { // flatten to object with string keys that can be easily referenced later var flat = {}; for (var i = 0; i &lt; data.d.results.length; i++) { var key = 'id' + data.d.results[i].ID; flat[key] = data.d.results[i]; } // add child container array to each node for (var i in flat) { flat[i].children = []; // add children container } // populate the child container arrays for (var i in flat) { var parentkey = 'id' + flat[i].ParentId; if (flat[parentkey]) { flat[parentkey].children.push(flat[i]); } } // find the root nodes (no parent found) and create the hierarchy tree from them var root = []; for (var i in flat) { var parentkey = 'id' + flat[i].ParentId; if (!flat[parentkey]) { root.push(flat[i]); } } // here it is! // console.log(root); // to access the JSON via "/root" in bindRows(), could this be a problem?? var data = { root : root, }; console.log(data); var oTreeModel = new sap.ui.model.json.JSONModel(); oTreeModel.setData(dat…
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: SAPUI5 create JSON for TreeTable / empty rows
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40591802
tagged with: treetable
linked to: http://stackoverflow.com/q/16553072
score: 2
tagged with: data-binding
upvote count: 2
tagged with: sapui5
has comment: http://stackoverflow.com/comment/40590312

http://stackoverflow.com/q/25998995
has answer: http://stackoverflow.com/a/26008021
has comment: http://stackoverflow.com/comment/40729966
type: Question
tagged with: magento
tagged with: highcharts
tagged with: javascript
has body: I'm trying to add highcharts to magento, but I get following error TypeError: N is not a function (highcharts.js line 192) My local.xml <adminhtml_mymodule_show> mymodule/js/highcharts.js mymodule/js/my_charts.js </adminhtml_mymodule_show> my_charts.js document.observe("dom:loaded", function() { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4]}, { name: 'John', data: [5, 7, 3]}] }); }); My view file <?php echo $this->__('Test header') ?> <?php echo $this->test; ?> I checked in Firebug and these files are added inside head tag. I tried also add prototype-adapter.js or using standalone framework but it didn't work- I get every time error from title. Im using magento 1.9 and highcharts 4.0.4. Thanks for any help
score: 0
answer count: 1
type: UnansweredQuestion
has title: Magento: TypeError: N is not a function
has comment: http://stackoverflow.com/comment/40744781

http://stackoverflow.com/a/26019696
has comment: http://stackoverflow.com/comment/40753517
has comment: http://stackoverflow.com/comment/40754102
type: Answer
has comment: http://stackoverflow.com/comment/40755824
has comment: http://stackoverflow.com/comment/40775546
has comment: http://stackoverflow.com/comment/40754873
has comment: http://stackoverflow.com/comment/40756184
has body: Correct me if i am wrong, As per my understanding, you are giving styles based on the 'Id' property of the elements. In order to not repeat the creation of the styles for each and every similar element, try to use class and class selector, as @bhowden pointed out in his comment. so, for example &lt;div&gt; &lt;p class='paragraphStyle'&gt; This is first paragraph &lt;/p&gt; &lt;p class='paragraphStyle'&gt; This is second paragraph &lt;/p&gt; &lt;/div&gt; Add a style like below in your CSS .paragraphStyle { background-color: yellow; } And your jquery selection becomes &lt;script language="javascript" type="text/JavaScript"&gt; $(function () { jQuery(".paragraphStyle"); }) &lt;/script&gt; Let me know in case you need any more information.
answers question: http://stackoverflow.com/q/26019217
score: 0
has comment: http://stackoverflow.com/comment/40756899

http://stackoverflow.com/q/25989512
type: Question
tagged with: javascript
tagged with: jquery
has body: I have an accordion with 17 sections that contains crosslinks to other sections. Pre-Bootstrap, this worked with some paragraph IDs and java to open the item. On clicking a link in one section, the user jumped to another section which expanded. Is it possible to replicate this using Twitter's Bootstrap (3.0)? I've seen a few questions similar to this but with no responses!
has title: Twitter Bootstrap accordion jump to section and open
score: 0
answer count: 1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25989775

http://stackoverflow.com/a/25925605
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25925496
has body: I would recommend jQuery to get the values of the fields you want to display in the title and set it. More info on jQuery can be found at http://jquery.com/ You can use a jQuery selectors to get the values of the fields and concatenate it accordingly. Something like this: document.title = $('textarea').val() + ' - ' + $('select').val();
type: Answer
has comment: http://stackoverflow.com/comment/40584521
answers question: http://stackoverflow.com/q/25925496
score: 0

http://stackoverflow.com/comment/40530812
comment on: http://stackoverflow.com/a/25896214
type: AnswerComment
has text: Wow, I didn't know you can run code and simulate them in answers!
score: 0
type: Comment

http://stackoverflow.com/comment/40572718
has text: You are using split on an array?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25919103

http://stackoverflow.com/a/27331095
answers question: http://stackoverflow.com/q/25942516
has body: You might look at JavaScript Exact Arithmetic. This site implements, among many things, conversion of IEEE Double to ByteArray and ByteArray to IEEE Double. IEEE Double is the representation used by Java. So, a byte array produced by this site will convert to the exact double using Java. I have extracted the underlying code and build up the library JRS (for J R Stockton, the author of the original code). The JRS library offers two methods: doubleToHexString(): converts an IEEE Double to an hexadecimal string hexStringToDouble(): converts an hexadecimal string to an IEEE Double The library is provided below. Please take a look at the Copyright page for fair usage. The JRS library is as follows: /** * A library that allow conversion of double to byteArray and vis versa. * Extracted from "JRS - JavaScript Exact Arithmetic - J R Stockton (See * http://www.merlyn.demon.co.uk/js-exact.htm#DW4 and * http://www.merlyn.demon.co.uk/contents.htm#Copy). */ JRS = function(){ function numberToBinString(number, binStringLength) { var A = [], T = null; // number&gt;=0 while (binStringLength--) { T = number % 2; A[binStringLength] = T; number -= T; number /= 2; } return A.join(""); } function HexFn(fourBitsBinString) { return parseInt(fourBitsBinString, 2).toString(16); } function binStringToHexString(binString) { return binString.replace(/(\d{4})/g, HexFn ); } function hexStringToBinString(hexString) { var binString = ""; for(var i=0; i&lt; hexString.length-1; i+=2) { binString += numberToBinString(parseInt(hexString.substr(i, 2), 16), 8); } return binString; } function SngFwd(Sg, Ex, Mt) { var B = {}; Mt = Math.pow(2, 23) * Mt + 0.5; // round B.a = 0xFF &amp; Mt; B.b = 0xFF &amp; (Mt &gt;&gt; 8); B.c = 0x7F &amp; (Mt &gt;&gt; 16) | (Ex &amp; 1) &lt;&lt; 7; B.d = Sg &lt;&lt; 7 | (Ex &gt;&gt; 1); return B; } function DblFwd(Sg, Ex, Mt) { var B = {}; Mt = Math.pow(2, 52) * Mt; B.a = 0xFFFF &amp; Mt; B.b = 0xFFFF &amp; (Mt &gt;&gt; 16); Mt /= Math.pow(2, 32); // Integers are only 32-b…
type: Answer
score: 0

http://stackoverflow.com/q/25915810
has body: Here is my JSON: $scope.myjson = [ {id: "1", name: "a"}, {id: "2", name: "b"}, {id: "3", name: "c", children: [{id: "4", name: "d"}]} ]; I want to save in javascript the position of object X, for example the position of first object is $scope.myjson[0], but I don't want to save the object itself, I just want the position. On the same way I want to save $scope.myjson[2].children[0] . I must save it a string? How than I use it to get that object in O(1)?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40566246
has answer: http://stackoverflow.com/a/25916324
type: Question
has title: How to save a JSON index position of object, but not the object itself in AngularJS?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40566112
tagged with: arraylist
has comment: http://stackoverflow.com/comment/40566161
score: 0
tagged with: arrays
answer count: 1
accepted answer: http://stackoverflow.com/a/25916324
has comment: http://stackoverflow.com/comment/40566560
has comment: http://stackoverflow.com/comment/40566343
has comment: http://stackoverflow.com/comment/40566412
tagged with: angularjs

http://stackoverflow.com/comment/45795583
comment on: http://stackoverflow.com/a/26544721
type: Comment
has text: How does one put the cropped image data into another field (hidden or otherwise)?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25906584
score: 0
answers question: http://stackoverflow.com/q/25906155
type: Answer
has body: First u need to change on click event for this: onclick="selectme(this)" And then in function: function selectme(oObj){ var d = document.getElementById("ul li div"); d.removeAttribute("class"); oObj.className = oObj.className + " otherclass"; } It should work fine

http://stackoverflow.com/q/25958212
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Polymer's Animated Pages used with Angularjs
score: 3
downvote count: 0
tagged with: material-design
type: Question
tagged with: polymer
has answer: http://stackoverflow.com/a/27107624
tagged with: javascript
has body: I would like to ask if there are any examples related to Polymer's animated pages ( http://www.polymer-project.org/docs/elements/core-elements.html#core-animated-pages ) and how we can build a similar demo using the resources provided in the Angular/material repo (https://github.com/angular/material). I would like to achieve http://www.polymer-project.org/components/core-animated-pages/demos/music.html but I don't want to use Polymer since I would like to use Angular. Can you please provide me some directions in order to start?
upvote count: 3

http://stackoverflow.com/comment/40678273
type: Comment
comment on: http://stackoverflow.com/a/25978261
score: 0
type: AnswerComment
has text: just removed it and looks like its now working fine. if the the if statement is true, how can i stop the form from submitting?

http://stackoverflow.com/q/26025662
has answer: http://stackoverflow.com/a/26025735
favorite count: 0
has title: How to add new class to the existing class in this case
has comment: http://stackoverflow.com/comment/40764989
has answer: http://stackoverflow.com/a/26025782
type: UnansweredQuestion
has body: I am new to Javascript and Jquery so please excuse if this is a dumb question HTML is being constructed dynamically as shown var favoriteresultag = ' '; favoriteresultag += " " + " "+ name + " " + " "; How can i add/concat one more variable to the class ulseWrap lielement ?? I tried this way var classactive = ''; if (some condition) { classactive = 'activeRest'; } else { classactive = ''; } favoriteresultag += " " + " " + name + " " + " ";
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40764976
has comment: http://stackoverflow.com/comment/40764944
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40524136
comment on: http://stackoverflow.com/a/25891756
type: AnswerComment
type: Comment
score: 1
has text: This works great! Looks like on of my problems was that I had the script in my . I moved it to after the table and it is functioning properly. Many thanks!

kineticjs
tags question: http://stackoverflow.com/q/25974109
tags question: http://stackoverflow.com/q/25969331
tags question: http://stackoverflow.com/q/25976503
type: Tag
tags question: http://stackoverflow.com/q/26013548
tag name: kineticjs
tags question: http://stackoverflow.com/q/25882495
tags question: http://stackoverflow.com/q/26014751
tags question: http://stackoverflow.com/q/26020017
tags question: http://stackoverflow.com/q/25974511
tags question: http://stackoverflow.com/q/25934230

http://stackoverflow.com/q/26018851
has comment: http://stackoverflow.com/comment/40786956
has body: Few days before I have read regarding clickjacking attack from http://javascript.info/tutorial/clickjacking . So today I tried with facebook like button. and It seems that i am successful in the experiment. But i am not sure weather i am correct or not? This is the code snippet I have used. Get Free IPOD! I can set the opacity of the iframe to 0 so that user can not see the fb like button when the user will click on the link , the attacker page will be automatically liked. Example Fiddle: http://jsfiddle.net/5e5kvxk4/2/ Am I missing something? or facebook like button is really vulnerable ?
answer count: 1
has answer: http://stackoverflow.com/a/26055554
tagged with: facebook-graph-api
favorite count: 0
linked to: http://stackoverflow.com/q/7328295
tagged with: security
upvote count: 5
type: UnansweredQuestion
tagged with: facebook
has comment: http://stackoverflow.com/comment/40753209
downvote count: 0
has comment: http://stackoverflow.com/comment/40753509
has comment: http://stackoverflow.com/comment/40753997
has comment: http://stackoverflow.com/comment/40753304
has title: Does facebook like button vulnerable to clickjacking?
type: Question
score: 5
linked to: http://stackoverflow.com/q/25236746
tagged with: javascript

http://stackoverflow.com/a/25937655
score: 3
has body: Use absolute positioning: button { position:absolute; bottom:0; } jsFiddle example
answers question: http://stackoverflow.com/q/25937539
upvote count: 3
type: Answer
downvote count: 0

http://stackoverflow.com/a/25994539
upvote count: 3
answers question: http://stackoverflow.com/q/25994509
score: 3
has body: There are couple of ways to do it. you can use prop() for it: var id = $("input:text").prop("id"); or this way: var id = $("input:text")[0].id; or use get(): var id = $("input:text").get(0).id; or you can also use attr(): var id = $("input:text").attr('id')
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40676388
type: Comment
comment on: http://stackoverflow.com/q/25977327
score: 1
type: QuestionComment
has text: http://stackoverflow.com/questions/336859/var-functionname-function-vs-function-functionname

http://stackoverflow.com/comment/40684159
type: QuestionComment
comment on: http://stackoverflow.com/q/25981489
score: 0
type: Comment
has text: Don't you mean to do: `setTimeout(function() { self.close(); }, 1);`? Right now you have a string there instead of a function.

http://stackoverflow.com/q/25916883
tagged with: jquery
score: 0
has title: Synchronization two different slideshow jquery plugins
type: UnansweredQuestion
answer count: 0
has body: please go to this Address: http://pakianco.ir/test/index.php on the above of page i use two different slideshow for displaying company products. these two slideshow must be consonant means that they must be start at same time and images used in two slideshow must be change Simultaneously.But it did not happen. i use two different plugin for that. left slideshow is bootstrap carousel plugin and right slideshow is flux Slider. this code is for right slideshow: $(function(){ window.myFlux = new flux.slider('#slideshow', { autoplay: true, pagination: false, transitions: ['blocks'], delay: 5000 }); }); and this is for left slideshow: $('#slides.carousel').carousel({ 'interval': 5000, 'pause':'false', 'wrap':'false' }); can you help me to doing that
type: Question
has comment: http://stackoverflow.com/comment/40569578
has comment: http://stackoverflow.com/comment/40569946
tagged with: javascript

http://stackoverflow.com/a/25951916
type: Answer
has body: First of all Follow these steps: 1)jquery-1.9.1.min.js ==> here .min is just minified version of jquery. so,don't use both.use only one jquery version normal or minified. your scripts would be like this: 2) Make sure your Path for images is correct. 3)do you have imgaes whose names are numeric numbers.like 1.jpg 4)have your all images have .jpg extension.check it might be .png or any other.
answers question: http://stackoverflow.com/q/25951750
score: 0

http://stackoverflow.com/comment/40659790
score: 0
type: Comment
has text: @Shibbir Can you create fiddle for better answer
comment on: http://stackoverflow.com/a/25968094
type: AnswerComment

http://stackoverflow.com/comment/40671744
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25974939
type: AnswerComment
has text: OP says they have different IDs.

http://stackoverflow.com/comment/40580869
has text: @user2847643: No, the `users.ejs` is going to be loaded when `/users` is called. But I want to call `/users` from the `index.ejs` that uses `ng-app="MyAppFrontEnd"` to `users.ejs` that uses `ng-app="MyAppAdminEnd"`.
comment on: http://stackoverflow.com/q/25922847
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40521122
type: AnswerComment
type: Comment
has text: Please offer official links!
comment on: http://stackoverflow.com/a/25891209
score: 0

http://stackoverflow.com/comment/40725621
score: 1
type: AnswerComment
has text: That's what it's there for.
comment on: http://stackoverflow.com/a/26001848
type: Comment

http://stackoverflow.com/comment/40824895
has text: I have an issue running multiple of these functions at the same time. I gave the functions separate names but the issue still continued
type: Comment
comment on: http://stackoverflow.com/a/25994185
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40761218
type: Comment
has text: Don't use `async:false`
type: QuestionComment
comment on: http://stackoverflow.com/q/26023278
score: 0

http://stackoverflow.com/a/26023191
answers question: http://stackoverflow.com/q/26022976
type: Answer
has body: It's because you call Math.cos twice, for both moving on both the x and y axis. So you'll always be drawing a diagonal line. Change your second call to Math.sin: for(var i=0;i&lt;=r.length-1;i++){ c.lineTo( 100+(100)*Math.cos(r[i]), 100+(100)*Math.sin(r[i]) );}
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/26021571
answers question: http://stackoverflow.com/q/26021493
has comment: http://stackoverflow.com/comment/40757022
type: Answer
has comment: http://stackoverflow.com/comment/40756995
score: 2
has body: Use the shown event $(function(){ $input = $("#letter-change-text").find("input[type='text']"); $input.val($.trim("I am just testing!!")); $('#letter-change-text').on('shown.bs.modal', function (e) { $input.focus(); }).modal('show'); });
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/126017320
has comment: http://stackoverflow.com/comment/126022219
accepted answer of: http://stackoverflow.com/q/26021493

http://stackoverflow.com/q/25954792
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25954853
has comment: http://stackoverflow.com/comment/40635263
has body: I am parsing the following code using a regex (not ideal I know, but that is a story for another day): data:{ url: 'stage-team-stat' }, defaultParams: { stageId : 9155, field: 2, teamId: 26 } }; This is being parsed using the following code (where var is the above code): import re stagematch = re.compile("data:\s*{\s*url:\s*'stage-team-stat'\s*},\s*defaultParams:\s*{\s*(.*?),.*},",re.S) stagematch2 = re.search(stagematch, var) if stagematch2 is not None: stagematch3 = stagematch2.group(1) stageid = int(stagematch3.split(':', 1)[1]) stageid = str(stageid) teamid = int(stagematch3.split(':', 3)[1]) teamid = str(teamid) print stageid print teamid In this example I would expect stageid to be '9155' and teamid to be '32', however they are both coming back as '9155'. Can anyone see what I am doing wrong? Thanks
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40635224
tagged with: python
tagged with: regex
has comment: http://stackoverflow.com/comment/40635271
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40634981
tagged with: web-scraping
tagged with: scrapy
answer count: 1
downvote count: 1
has title: Obtaining correct data using Regex/List
has comment: http://stackoverflow.com/comment/40635237
tagged with: javascript
has answer: http://stackoverflow.com/a/25954853
has comment: http://stackoverflow.com/comment/40635160

http://stackoverflow.com/q/26001666
favorite count: 0
type: Question
tagged with: user-accounts
has body: Hey I'm trying to unit test a method but I'm getting an error "Error: createUser() method does not exist" when I spyOn Accounts.createUser, however when I spyOn Meteor.user, I don't have any problem, here's what I have so far. server/methods/user.js Meteor.methods({ 'registerUser' : function (options) { if(Meteor.user()) throw new Meteor.Error(403, "Account has already been registered, log out to create a new account"); if(options.password.length &lt; 8) throw new Meteor.Error(403, "Password must have at least 8 characters"); var id = Accounts.createUser(options); if(options.type === "b") Roles.addUsersToRoles(id, 'user-b'); else Roles.addUsersToRoles(id, 'user-c'); return 0; } }); Accounts.validateNewUser(function (user) { if (user.emails[0].address &amp;&amp; user.emails[0].address.length &gt;= 5) return true; throw new Meteor.Error(403, "Invalid email address"); }); Accounts.onCreateUser(function(options, user) { if(options.type === "b"){ var key = RegKey.findOne({ key: options.key, valid: true }); if(key) RegKey.update({ _id: key._id },{ valid: false }); else throw new Meteor.Error(403, "Invalid Code"); } return user; }); tests/jasmine/server/unit/user.js "use strict"; describe("User", function () { it("should be able to register with valid email and password", function () { spyOn(Accounts, "createUser").and.returnValue("id"); Meteor.methodMap.registerUser({ email: "john.smith@domain.com", password: "abcd1234" }); expect(Accounts.createUser).toHaveBeenCalledWith({ email: "john.smith@domain.com", password: "abcd1234" }); }); });
upvote count: 1
answer count: 1
tagged with: unit-testing
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26012816
downvote count: 0
score: 1
tagged with: meteor
has title: Unit Testing Register User Method with Jasmine in Meteor
tagged with: jasmine

http://stackoverflow.com/a/26021093
upvote count: 1
answers question: http://stackoverflow.com/q/26019305
downvote count: 0
has body: The browser won't let you do it, and here's an example why: Let's say you run a domain called nefarious-site.com. On the homepage, there is an &lt;iframe&gt; whose src="https://popular-mail-site.com/". Because the mail site is very popular, and because there's a chance the user is logged into to popular-mail-site already, their email will load in the iframe. When everything finishes loading, nefarious-site uses JavaScript to "screenshot" the iframe and send the image via XHR to the nefarious-site server. Boom. Nefarious-site has now stolen information about the user's mailbox without even needing to go through the trouble of cracking the user's password. Granted, there are many cases where this wouldn't work -- if the user wasn't logged in or didn't have an account, nefarious-site would get a useless screenshot of a login form or error text. But sometimes it would work, and that's better than nothing. So yeah, that's why the browser is very conservative about letting you do things like that. (As an aside, it's probably in popular-mail-site's best interest to set an X-Frame-Options header to prevent the content from rendering in the &lt;iframe&gt; in the first place, but that's neither here nor there.)
type: Answer
score: 1

http://stackoverflow.com/q/25973173
tagged with: sencha-touch-2
has title: Button listener stops triggering after packaging
has comment: http://stackoverflow.com/comment/40722903
tagged with: sencha-touch
has comment: http://stackoverflow.com/comment/40790088
type: UnansweredQuestion
has body: I have several buttons that trigger correctly even after packaging, and they are being declared in the exact same way. The only apparent change this button has is that it is placed within a modal. The listeners are being correctly initialized, I can trigger it by doing (getbutton).fireEvent('tap'). The element is correctly on top of all other elements, when I inspect it in devtools, it is the topmost element. The buttons work correctly before packaging, and I tried with both the base Ext.Button class and my custom button class, neither work after packaging. Here is a screenshot of the buttons: Some relevant code Button Declaration: { xtype: 'iconButton' iconCls: 'fa fa-close' listeners: tap:-&gt; @rootView ?= @up('imageEditor') @rootView.cancel() } xtype:'button' doesn't trigger the handler either. And xtype:'button' with handler:-&gt; doesn't trigger it either.
answer count: 0
tagged with: sencha-touch-2.3
type: Question
has comment: http://stackoverflow.com/comment/40789141
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40682681
type: QuestionComment
comment on: http://stackoverflow.com/q/25980693
has text: @NaimRajib haha sorry if I missed out on typing the question. well the question is how do you write the javascript code for putting multiply in the input field and to make it multiply the numbers in the other two input fields.
score: 0
type: Comment

http://stackoverflow.com/comment/40498879
type: QuestionComment
has text: the view im trying to render is under app/assets/templates/production/index.html.erb and the controller is under app/assets/javascripts/controllers/ProductionIndexCtrl.js.coffee
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25878416

http://stackoverflow.com/q/25997208
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40713045
has title: Bootstrap Styling A JQuery/Java Pop-up Box
has comment: http://stackoverflow.com/comment/40735907
type: Question
accepted answer: http://stackoverflow.com/a/25997887
tagged with: javascript
tagged with: jquery
has body: I have a filter box which is displayed when you click a filter icon but this is non-bootstrap styled. I am in the process of upgrading the website using Bootstrap3 HTML5. Currently the filter icon looks like the below But we want it styled as: My code is below which is the old styling but i'm not up to scratch on styling Jquery/Java document.getElementById('&lt;%:cell.ColumnIdentifier%&gt;_link').addEvent('click', function() { if(filterPopUp == null){} else { filterPopUp.hide(); } filterPopUp = new StickyWin.PointyTip(&quot;Add filter for &lt;%:cell.Value %&gt;&quot;, &quot;&lt;%= String.Format(&quot;Values from &lt;input id='{0}_from' name='{0}_from' value='{1}'/&gt; &amp;nbsp;to &lt;input id='{0}_to' name='{0}_to' value='{2}'/&gt;&lt;br/&gt;&lt;div style='text-align:right !important;margin-right:0px;margin-top:5px;'&gt;&lt;input type='button' onclick='SubmitForm(this, \\\&quot;filter\\\&quot;);' id='{0}' name='{0}' value='Apply' style='margin-right:10px;background-color:#CCCCCC;text-align:center !important;' class='greyButton89'/&gt;&lt;input type='button' onclick='SubmitForm(this, \\\&quot;clear\\\&quot;);' id='{0}' name='{0}' value='Clear' class='greyButton89' style='background-color:#CCCCCC;text-align:center !important;'/&gt;&lt;/div&gt;&quot;, cell.ColumnIdentifier, defaultMin, defaultMax)%&gt;&quot;, { point: 'up', pointyOptions: { theme: 'light' }, relativeTo: '&lt;%:cell.ColumnIdentifier%&gt;_img' }); return false; }); The code I used to do the mock is: &lt;div class='col-sm-4 hidden-xs'&gt; &lt;div class='panel panel-default'&gt; &lt;div class='panel-heading'&gt; &lt;h3 class='panel-title'&gt;Add filter for Test&lt;/h3&gt; &lt;/div&gt; &lt;div class='panel-body'&gt; &lt;div class='form-group'&gt; &lt;label class='col-sm-5 control-label'&gt;Amount from&lt;/label&gt; &lt;div class='col-sm-7'&gt; &lt;div class=&quot;input-group&quot;&gt; &lt;span class=&quot;input-group-addon&quot;&gt;£&lt;/span&gt; &lt;input type=&quot;text&quot; class=&quot;form-control&quo…
score: 0
answer count: 1
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25997887

http://stackoverflow.com/a/25929083
type: Answer
downvote count: 0
score: 1
has body: $("input[type='number']").change(function() { var celkom, qtyVal; qtyVal = parseFloat($(".btm-quantity").val()); switch(true) { case (qtyVal &gt;= kolvo[0] &amp;&amp; qtyVal &lt; kolvo[1]): celkom = cena[0]; break; case (qtyVal &gt;= kolvo[1] &amp;&amp; qtyVal &lt; kolvo[2]): celkom = cena[1]; break; case (qtyVal &gt;= kolvo[2] &amp;&amp; qtyVal &lt; kolvo[3]): celkom = cena[2]; break; case ((qtyVal &gt;= kolvo[3]) &amp;&amp; (qtyVal &lt; kolvo[4])): celkom = cena[3]; console.log('cena3', kolvo[3]); break; case (qtyVal &gt;= kolvo[4]): celkom = cena[4]; break; } console.log(celkom); $(".celkom").html((qtyVal*celkom).toFixed(2)); }); http://jsfiddle.net/s7b18r6c/11/
upvote count: 1
answers question: http://stackoverflow.com/q/25927985

http://stackoverflow.com/q/25992544
has comment: http://stackoverflow.com/comment/40704714
linked to: http://stackoverflow.com/q/23792791
answer count: 0
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40708236
tagged with: javascript
has comment: http://stackoverflow.com/comment/40704163
has comment: http://stackoverflow.com/comment/40710124
upvote count: 1
has body: Hi fellow Javascripters, I am using both Angular and D3 in my project (no jQuery, which I intend to keep this way). One thing that I want to support is to enable users to play with 'raw' tabular data. So, data from a CSV is loaded into my app and displayed in a plain old fashioned table (currently with Angulars ng-repeat). However, I now want to be able to animate that columns of the table get reshuffled. So, as a simple example, I would programmatically want to switch column 2 with column 4 and this transition must be D3-like. Furthermore, easily dragging whole columns to other positions should be possible. Since I am not really experienced with working with jqLite inside Angular directives, my preference would go out to a solution based on D3. I can then see two possible solutions: Render all of the data in a regular table using the D3 append functionality. Whenever column order changes, somehow reconstruct the table and create a smooth transition. Simulate a table with div's and css (not looking forward to that though), to enable easy repositioning of data. Since both solutions are far from trivial (I would say), I would really like to have some opinions. Do you see any other solutions for me? And if one of these two solutions seems right for you, how would you go about implementing them? Thanks in advance!
favorite count: 0
has comment: http://stackoverflow.com/comment/40705646
tagged with: angularjs
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40706601
has title: reshuffling table columns with D3 or Angular
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/25959481
has comment: http://stackoverflow.com/comment/40679813
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40699848
tagged with: php
answer count: 0
score: 1
has body: I'm trying to serve a flash file via nginx proxy, but it fails with said error ReferenceError: DetectFlashVer is not defined. I had the same result using a simple PHP proxy (https://github.com/joshdick/miniProxy). Any ideas on what could fix it? The line in reference: var hasProductInstalled = DetectFlashVer(6, 0, 65); The page's code: // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); // Version check based upon the values defined in globals var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
type: Question
tagged with: flash
tagged with: nginx
tagged with: javascript
has comment: http://stackoverflow.com/comment/40679089
has title: "ReferenceError: DetectFlashVer is not defined" when using a proxy
downvote count: 0
has comment: http://stackoverflow.com/comment/40660821
favorite count: 0

http://stackoverflow.com/comment/40562839
type: Comment
has text: Don't forget to change the button's names as well and this should work
comment on: http://stackoverflow.com/a/25913411
score: 0
type: AnswerComment

http://stackoverflow.com/q/26030996
has body: I am using the code bellow for arguments which are using in protractor configuration file protractor: { options: { keepAlive: true, configFile: "test/config.js", args:{ params:{ user:"user1", password:"password1" } } }, and retrieving in protractor conf file as browser.params.user,browser.params.password These are working files. I want to change the user and password values from command. How to change the values?
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27946781
favorite count: 0
has title: Unable to pass arguments from command to grunt file
has answer: http://stackoverflow.com/a/29408036
answer count: 3
tagged with: jasmine
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29409150
score: 3
tagged with: protractor
tagged with: gruntjs

http://stackoverflow.com/comment/40494391
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25875964
has text: Thanks a lot, everyone. Most of the sugeestions below work. ,But I would like to know which is the best option from performance aspect? Using Regex or match or indexOf/substring?
type: Comment

http://stackoverflow.com/q/25940454
answer count: 1
downvote count: 0
tagged with: javascript
has title: grunt and gulp confusions - running a gulp within another project that has gulp
favorite count: 0
has comment: http://stackoverflow.com/comment/40611506
accepted answer: http://stackoverflow.com/a/25944146
has comment: http://stackoverflow.com/comment/40611204
tagged with: gulp
has body: This is probably going to sound stupid as can be, but please bear with me. I am having trouble with it. I am working on a project that uses Grunt to compile and construct its distribution. However, it uses another library known as prism, which you can find at http://prismjs.com Now, prism is a wonderful library, and I do like it. However I am installing it to my application using bower - it's simple enough, bower install prism --save-dev Now the problem I run into is that prism downloads as its own source code - which happens to not have the compiled source I need, but rather a gulpfile.js that creates the compiled source. I'm typically pretty happy with that, I do love me some gulping goodness - but in this situation I'm at a bit of a loss because I've never encountered a situation where I was using grunt to also use gulp. Too Long; Didn't Read The folder structure ends up like this; /-root | - bower_components | - - bootstrap | - - jquery | - - jquery-colorbox | - - prism | - - - components | - - - plugins | - - - themes | - - - vendor | - - - .bower.json | - - - bower.json | - - - components.js | - - - gulpfile.js | - - - package.json | .gitignore | bower.json | Gruntfile.js | package.json | README.md So what I need to do is figure out how to run /bower_components/prism/gulp.js from /gruntfile.js, such that it produces the compiled result, which my gruntfile.js can then use to dispatch out to my /dist folder. I do know that I can just clone the prism repository separately and do it, but I wanted the experience of building my library to be self contained, all in one sort of thing. Is this possible? Or am I just dumb?
upvote count: 1
tagged with: bower
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40611484
score: 1
has answer: http://stackoverflow.com/a/25944146
tagged with: gruntjs
type: Question

http://stackoverflow.com/q/25883246
has title: Dynamic content in Firefox OS App
has answer: http://stackoverflow.com/a/25883430
tagged with: dynamic
tagged with: innerhtml
tagged with: firefox-os
upvote count: 1
tagged with: dom
answer count: 1
has body: I have created a Firefox OS app. When I click on the title, it loads some web content, modifies it and shows it by using div.innerHtml. This works. The dynamic content includes some different paragraphs XXX . Every paragraph has its own id "text0", "text1" and so on. When the user clicks on a paragraph, a JavaScript function should be called. I have googled various websites and tried different ways to add the onclick-Eventhandler to the dynamic content, but none of these seems to work. Could you have a look at my code? I have marked the place, where I want to add the event handler with "====>>>>" in the content.js extract. index.html: FxOS Stub XXX FxOsStub revisited. This is the first page body (aka page 0, usually your splash screen.) Activate the others by pressing the toolbar's items. XXX Cancel content.js: var id_link;// window.addEventListener( "load", function() { document.getElementById('headline').onclick=LoadContent; //document.getElementById('mainpage').onclick=CallPage; id_link = new Object(); } ); function CallPage() { var display = document.getElementById('mainpage'); display.innerHTML = ""; } function LoadContent() { // Cross domain XHR var display = document.getElementById('mainpage'); var xhr = new XMLHttpRequest({mozSystem: true}); xhr.mozSystem = true; xhr.onreadystatechange = function () { if (xhr.status === 200 && xhr.readyState === 4) { //crossDomainXHRDisplay.innerHTML = " Result from Cross-domain XHR " + xhr.response; //crossDomainXHRDisplay.style.display = "block"; var iEnd = 0; var text = xhr.response; var output = ""; // Clear all Returns text = text.replace(/\n/g, ""); text = text.replace(/\r/g, ""); //text = text.replace(/<img.*\/>/g, "image"); // Set HTML header output = " "; output = output + " \n"; output = output + " \n"; output = output + " Spiegel online "; output = output + " \n"; output = output + " \n"; var cnt_it = 0; var text_upper = text; // Search for headlines while(iEnd == 0) { var match = text.match(/\<h2\sclass\=\"articl…
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/q/25917703
has title: jQuery Loop JSON Issue
accepted answer: http://stackoverflow.com/a/25917867
has comment: http://stackoverflow.com/comment/40569942
type: AnsweredQuestion
has body: I tried a few combinations, but I am stuck. Any help is appreciated. How do I read the JSON record here please (is the syntax for the JSON organised well?) I keep getting TypeError: Cannot read property '0' of undefined with the code below and or permutations of it. JSON: { "wty_upgrade":[{ "wty":"Upgrade from 3 to 5 years", "mth":24, "pig":3000 }, { "wty":"Upgrade from 3 to 10 years", "mth":84, "pig":8000 }] } CODE: function LoadWtyUpgPlans(wty) { var WtyRow = ''; var WtyYears = ''; for (var i = 0; i &lt; wty.wty_upgrade[0].length; i++) { WtyYears = wty.wty_upgrade[0].mth[i] / 12; WtyRow +='&lt;tr&gt; \ &lt;td&gt; \ &lt;input type="hidden" class="smg-wty-up-val" value="' + wty.wty_upgrade[0].mth[i] + '"&gt; \ ' + wty.wty_upgrade[0].wty[i] + ' \ &lt;/td&gt; \ &lt;td align="right"&gt;' + WtyYears + '&lt;/td&gt; \ &lt;td align="right"&gt;' + wty.wty_upgrade[0].pig[i] + '&lt;/td&gt; \ &lt;/tr&gt;'; }; };
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25917804
has answer: http://stackoverflow.com/a/25917804
type: Question
has answer: http://stackoverflow.com/a/25917867
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40569862
has answer: http://stackoverflow.com/a/25917843

http://stackoverflow.com/a/25998583
answers question: http://stackoverflow.com/q/25998325
type: Answer
upvote count: 6
downvote count: 0
has comment: http://stackoverflow.com/comment/40715063
type: AcceptedAnswer
has body: There is no storage place in a getter/setter property, you cannot store values on it. You need to store it somewhere else and create a getter for that. Two solutions: Use a second, "hidden" property: MyObject.prototype.specialMethod: function() { /* ... */ }; Object.defineProperty(MyObject.prototype, "someValue", { set: function(value) { this._someValue = value; this.specialMethod(); }, get: function() { return this._someValue; } }); Use a closure variable (typically created on construction of the instance): function MyObject() { var value; Object.defineProperty(this, "someValue", { set: function(v) { value = v; this.specialMethod(); }, get: function() { return value; } }); } MyObject.prototype.specialMethod: function() { /* ... */ };
accepted answer of: http://stackoverflow.com/q/25998325
score: 6

http://stackoverflow.com/q/25947269
accepted answer: http://stackoverflow.com/a/25947411
score: 2
type: AnsweredQuestion
tagged with: angular-ngmodel
downvote count: 0
has answer: http://stackoverflow.com/a/25947411
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25947377
answer count: 2
has comment: http://stackoverflow.com/comment/40622676
tagged with: javascript
has body: I'm using AngularJS in my website. One page on my site is quite large, as in, it has a lot of HTML elements. Imagine something like this: &lt;div id="bronze"&gt; &lt;input ng-model="league.bronze.name"&gt; &lt;input ng-model="league.bronze.title"&gt; &lt;input ng-model="league.bronze.description"&gt; ... about 15 more inputs ... &lt;input ng-model="league.bronze.color1"&gt; &lt;input ng-model="league.bronze.color2"&gt; &lt;/div&gt; &lt;div id="silver"&gt; &lt;input ng-model="league.silver.name"&gt; &lt;input ng-model="league.silver.title"&gt; &lt;input ng-model="league.silver.description"&gt; ... about 15 more inputs ... &lt;input ng-model="league.silver.color1"&gt; &lt;input ng-model="league.silver.color2"&gt; &lt;/div&gt; I also have gold and platinum. A site admin must fill in all these settings. This is not a problem for him. But it is for me as a developer. Everytime I add one or more elements to the "bronze" section then I also have to do the same for every other section. The only difference is the ng-model value. Isn't there a smarter way to do this? Because right now I'm kinda repeating my self everytime an element needs to be added...
favorite count: 0
has comment: http://stackoverflow.com/comment/40622303
has answer: http://stackoverflow.com/a/25947377
has title: Reuse HTML but bind different model
tagged with: angularjs

http://stackoverflow.com/a/25957158
type: Answer
has body: It will need to make P(36,3) = 42840 requests which will take a lots of time. In case you still want to execute this, you can look for permutation calculator like in this question.
answers question: http://stackoverflow.com/q/25956970
score: 0

http://stackoverflow.com/comment/40626248
comment on: http://stackoverflow.com/q/25949796
type: Comment
type: QuestionComment
has text: hi bteres! what type of graph are u using for Dygraph? http://dygraphs.com/gallery/
score: 0

http://stackoverflow.com/q/26007391
tagged with: jquery
has comment: http://stackoverflow.com/comment/40749539
has body: I Have the next script: function validateForm() { var mp = document.forms["local_storage_form"]["mphone"].value; var hp = document.forms["local_storage_form"]["hphone"].value; if (hp == "" &amp;&amp; mp == "") { $('.tooltip2').fadeIn('slow'); return false; } else { localStorage.setItem('submit',1) $('.tooltip2').fadeOut('fast'); $('#vaild').fadeOut('fast', function() { $(this).replaceWith('&lt;img src="images/ajax-loader.gif"&gt;'); $('#vaild').fadeIn("fast"); $("#myPopup").load("ajax.txt"); $('#myPopup').open; }); setTimeout(function() { $.mobile.changePage("#rent"); }, 5000); } } and the function is activated by $(document).on("click") event,but the popup isn't opening, i want the popup will stay for 5 seconds and then $.mobile.changePage will be activated. What's wrong with my Code?
score: 0
answer count: 2
tagged with: events
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26007413
tagged with: popup
has answer: http://stackoverflow.com/a/26007873
type: Question
has title: Jquery Mobile Pop not opening on event
tagged with: jquery-mobile
tagged with: javascript

http://stackoverflow.com/q/26013955
has answer: http://stackoverflow.com/a/26015274
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40743234
has title: display the number of divs dynamically according to the input number given in javascript
type: Question
has comment: http://stackoverflow.com/comment/40743957
answer count: 2
has body: I want the divs to appear according to the number obtained in the input. If input is 3; I want 3 maindiv blocks to appear.If it changes to 1; only 1 maindiv block should appear. Someone suggest the solution? function showTrips(){ var argument = document.getElementById("Number_of_trips"); var value = argument.options[argument.selectedIndex].text; var main = document.getElementById("mainform"); var mains = document.getElementById("maindiv"); var newdiv = document.createElement('div'); newdiv.innerHTML = mains.innerHTML; for (var i = 1; i < value; i++) { main.appendChild(newdiv); } } Number_Of_Trips: 1 2 3 4 5 Trip Details I have attached the html code now.
has answer: http://stackoverflow.com/a/26015279
has comment: http://stackoverflow.com/comment/40750372
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1

http://stackoverflow.com/comment/40640911
score: 0
type: Comment
has text: Uncaught SyntaxError: Unexpected token : jquery-1.9.1.min.map:1 GET http://code.jquery.com/jquery.min.map 404 (Not Found) code.jquery.com/jquery.min.map:1 - error , how to include this file so it will work ? and what to disable so it will start using that .
comment on: http://stackoverflow.com/a/25952153
type: AnswerComment

http://stackoverflow.com/q/25895466
accepted answer: http://stackoverflow.com/a/25895511
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25895511
tagged with: javascript
has title: Removing bold tags on item click of a list javascript
has comment: http://stackoverflow.com/comment/40529253
has body: I have a simple HTML form and a div under it (as a searchbox and autocomplete list). I am dynamically adding a list to the "result" div. When I click on a list item, I am putting that value into the input box. The problem is, when the item in the list is bolded, the text in the input box has the tags around the bolded portion. Search: var search = document.getElementById("searchbar"); search.value= "ap"; document.getElementById("result").innerHTML = " apple application "; $('#result').on('click', 'li', function(event) { search.value = this.innerHTML; }); You can see what I mean here: http://jsfiddle.net/avfyvk2v/41/ Is there a way I can remove the tags in the searchbox? Thanks
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25956205
type: Question
has comment: http://stackoverflow.com/comment/40637681
tagged with: javascript
has answer: http://stackoverflow.com/a/25956223
score: 0
has comment: http://stackoverflow.com/comment/40637706
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40637785
has title: Get the hours difference between two date objects?
has body: Trying to change this function from Get difference between 2 dates in javascript? to return difference in hours instead of days, but no luck so far. =) function dateDiffInDays(scheduled, due) { var _MS_PER_DAY = 1000 * 60 * 60 * 24; var scheduled = new Date(scheduled); var due = new Date(due); var utc1 = Date.UTC(scheduled.getFullYear(), scheduled.getMonth(), scheduled.getDate()); var utc2 = Date.UTC(due.getFullYear(), due.getMonth(), due.getDate()); return Math.floor((utc2 - utc1) / _MS_PER_DAY); } Changed _MS_PER_DAY to 1000 * 60 * 60, but it wont work returning zeros. Please help. EDIT: values of schedule and due in this format: "09/21/2014 09:00:00 am"
accepted answer: http://stackoverflow.com/a/25956223
upvote count: 1
downvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3224834
tagged with: date

http://stackoverflow.com/a/25904958
has body: how far i understand you want to put some logic after the tab is clicked and want to execute some logic over that then first of all you have to declare a global string variable instead of local Boolean variable that hold the id or title of the #tab like the below snippet window.tabclicked = ""; then you have to assign the variable the id of the clicked tab like the following $(function () { $("#tabs").tabs(); $("a[href='#tabs-1']").off("click").on("click", function () { tabclicked = $(this).prop('href'); }); }); then you can use a switch statement for you condition switch (tabclicked) { case "#tab1": { // your logic here break; } default: break; }
type: Answer
answers question: http://stackoverflow.com/q/25902855
score: 0

http://stackoverflow.com/q/25909334
has answer: http://stackoverflow.com/a/25909659
has title: How to embed a text file inside html?
score: 2
has body: I've got an index.html file for use with Jekyll and would like the contents of one paragraph in the HTML file to be called from a text file ("stuff.txt") located in the same directory as the index.html file. Is there a simple HTML command to read in the text, preferably outwith the use of PHP or JavaScript?
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25909659
has comment: http://stackoverflow.com/comment/40554157
has comment: http://stackoverflow.com/comment/40554234
has answer: http://stackoverflow.com/a/25909583
tagged with: http://stackoverflow.com/tag/html
tagged with: jekyll
has answer: http://stackoverflow.com/a/25909806
has comment: http://stackoverflow.com/comment/40554079
favorite count: 0
upvote count: 2
answer count: 5
has answer: http://stackoverflow.com/a/25909469
linked to: http://stackoverflow.com/q/6470567
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25909475
accepted answer: http://stackoverflow.com/a/25909806
type: Question

http://stackoverflow.com/comment/40578814
type: Comment
comment on: http://stackoverflow.com/a/25916148
has text: In that case, there may not be a one-size-fits-all answer. In your example, there are 60 permutations. If each referenced a different function, your `selectPatterns` object strategy may be as good as any. If 30 referenced `foo()` and the other 30 referenced `bar()`, my `indexOf` strategy may be more effective. Anything in the middle may be more subjective, as a balance between speed, memory usage, and ease of maintenance.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25918924
has comment: http://stackoverflow.com/comment/40607963
has comment: http://stackoverflow.com/comment/40609695
has body: If you're wanting uploadaddresses.php to return an HTTP response immediately but continue processing, take a look at pcntl_fork in PHP. Here's the main doc page: http://php.net/manual/en/function.pcntl-fork.php Here's a good example that you might want to follow: http://php.net/manual/en/function.pcntl-fork.php#94338
has comment: http://stackoverflow.com/comment/40608448
has comment: http://stackoverflow.com/comment/40608837
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25918794

http://stackoverflow.com/q/25954510
has answer: http://stackoverflow.com/a/45761818
downvote count: 0
score: 7
has answer: http://stackoverflow.com/a/25954560
accepted answer: http://stackoverflow.com/a/25954560
type: Question
possible better answer: http://stackoverflow.com/a/25958232
has body: I have 2 times for example: 10:00 and 1:00 now i want to check if current time... is between these 2 times in javascript. The problem is that the closing time in this case is a next day so its before the openingstime. How can i do this the proper way for some reason i can not get around this. i hav efound that this could solve it: var start = new Date(2012,6,20,13).getTime(); var now = new Date().getTime(); var end = new Date(2012,6,21,2).getTime(); if( (start &lt; now ) &amp;&amp; (now &lt; end )) { console.log("opened"); } else { console.log("closed"); } but how can i do it with 2 string formats like 10:00 and 2:00 because i do not see a option to put a time alone var d = new Date(); var d = new Date(milliseconds); var d = new Date(dateString); var d = new Date(year, month, day, hours, minutes, seconds, milliseconds);
has answer: http://stackoverflow.com/a/25958232
tagged with: javascript
has title: check if "current time" is between 2 times. But also check for nights as the day before
has answer: http://stackoverflow.com/a/77097799
has comment: http://stackoverflow.com/comment/40634676
upvote count: 7
favorite count: 0
tagged with: angularjs
answer count: 5
tagged with: time
has answer: http://stackoverflow.com/a/25954615
type: AnsweredQuestion

http://stackoverflow.com/comment/40635800
has text: @cookiemonster I cannot understand why you don't get this point. You have a code FireFox understands but other browsers **can't**, so what you do? you have to support many the things like `if FireFox then .... else if Internet Explorer then ...` Anyway that's the most different thing (I hate best) between web programming and **desktop** programming.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955061

http://stackoverflow.com/comment/40602919
type: QuestionComment
has text: `setInterval` was never made to be reliable and smooth. Use `Date.now()` to get the current time.
comment on: http://stackoverflow.com/q/25936096
score: 1
type: Comment

http://stackoverflow.com/comment/40569644
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25917338
has text: This makes sense. I can't find it explicitly written anywhere though. I did find [this other SO answer](http://stackoverflow.com/a/3887590/2407870) which talks about it.
score: 0

http://stackoverflow.com/comment/40578657
comment on: http://stackoverflow.com/q/25921858
has text: What does "min file" mean? Where to find the developer version? I googled, but did not find the one.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40635390
comment on: http://stackoverflow.com/a/25955033
type: AnswerComment
score: 0
type: Comment
has text: Weirdly enough, I thought the same thing. But I opened it using the snippet editor and sure enough, it works.

highcharts
tags question: http://stackoverflow.com/q/25985955
tags question: http://stackoverflow.com/q/26022231
tags question: http://stackoverflow.com/q/25890833
tags question: http://stackoverflow.com/q/25879684
tags question: http://stackoverflow.com/q/25978769
tags question: http://stackoverflow.com/q/25899715
tags question: http://stackoverflow.com/q/25970395
tags question: http://stackoverflow.com/q/25972332
tags question: http://stackoverflow.com/q/25998995
tags question: http://stackoverflow.com/q/25995862
tags question: http://stackoverflow.com/q/25960433
tags question: http://stackoverflow.com/q/25995229
tags question: http://stackoverflow.com/q/25988168
tags question: http://stackoverflow.com/q/25976669
tags question: http://stackoverflow.com/q/25973920
tags question: http://stackoverflow.com/q/25934907
tags question: http://stackoverflow.com/q/25973921
tags question: http://stackoverflow.com/q/25975354
tags question: http://stackoverflow.com/q/25876035
tags question: http://stackoverflow.com/q/25914093
tags question: http://stackoverflow.com/q/26029449
tags question: http://stackoverflow.com/q/25910242
tags question: http://stackoverflow.com/q/25968970
tags question: http://stackoverflow.com/q/25948014
tags question: http://stackoverflow.com/q/25899536
tags question: http://stackoverflow.com/q/25928861
tags question: http://stackoverflow.com/q/25910114
tags question: http://stackoverflow.com/q/25979368
tags question: http://stackoverflow.com/q/26021046
tags question: http://stackoverflow.com/q/25944419
tags question: http://stackoverflow.com/q/25924237
tags question: http://stackoverflow.com/q/26015485
tags question: http://stackoverflow.com/q/25933496
tags question: http://stackoverflow.com/q/25969513
tags question: http://stackoverflow.com/q/25978310
tags question: http://stackoverflow.com/q/26001306
tags question: http://stackoverflow.com/q/25899706
tags question: http://stackoverflow.com/q/25923487
tags question: http://stackoverflow.com/q/25994988
tags question: http://stackoverflow.com/q/26024672
tags question: http://stackoverflow.com/q/25970369
tags question: http://stackoverflow.com/q/25876137
type: Tag
tags question: http://stackoverflow.com/q/25942682
tag name: highcharts
tags question: http://stackoverflow.com/q/25962766

http://stackoverflow.com/comment/40809345
type: Comment
has text: @Kato Thank you. Very much appreciated. Here is the post(the title isn't quite phrased correctly but I didn't want to make a double post). http://stackoverflow.com/questions/26047958/is-it-possible-to-sortcompare-and-reverse-an-array-in-angularfire
comment on: http://stackoverflow.com/q/26029870
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40706363
type: QuestionComment
comment on: http://stackoverflow.com/q/25979401
score: 0
has text: Can't I do that then?
type: Comment

http://stackoverflow.com/comment/40546216
has text: you need to pass function reference to `setInterval()` like `setInterval(askData, 3000);` - in your case you are invoking the `askData()` function and is passing the value returned from it `undefined` as the `setTimeout()` callback
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25904866
type: QuestionComment

http://stackoverflow.com/q/26023464
tagged with: jquery
has answer: http://stackoverflow.com/a/26023771
tagged with: mouseover
has answer: http://stackoverflow.com/a/26023571
has comment: http://stackoverflow.com/comment/40760716
possible better answer: http://stackoverflow.com/a/26023771
tagged with: slide
tagged with: hover
type: AnsweredQuestion
has body: I've been searching for hours already on how to slide down a certain div but it doesn't seem to be working out. What I'm trying to do here is slide down the .permalink when you hover the #entry and the #entry under it slides down with it. The script worked before but what it does is just slide down over the padding and the #entry under it doesn't. Here's the JS: $(document).ready(function () { $("#entry").mouseover(function () { $(".permalink").stop().slideDown("slow"); }); $("#entry").mouseout(function () { $(".permalink").slideUp("slow"); });}); Fiddle It'd be awesome if you guys could help me out with this. Thank you! x EDIT: Here's a link to my blog. I tagged some photosets in there so you'll know what I'm trying to work on. I am using the code that @Csdtesting posted. It worked on the fiddle but not on my blog.
accepted answer: http://stackoverflow.com/a/26023571
type: Question
has title: How can I slide my div on hover without it sliding over the padding?
tagged with: javascript
has answer: http://stackoverflow.com/a/26023846
score: 0
answer count: 3

http://stackoverflow.com/comment/40755720
score: 0
comment on: http://stackoverflow.com/a/26015005
type: AnswerComment
type: Comment
has text: Thanks, wicz, for confirming this and taking the time to throw all this together. I didn't include it in my code above, but I was actually loading the websocket javascript inside document.ready, so I'm still not sure what the problem is. Anyhow, now that I have confirmed code that works, I can start hunting down the differences. Thanks again!

http://stackoverflow.com/comment/40732461
type: Comment
has text: Thanks Luan Nico! @adeneo The answer was explained in plain English and while there is argument over proper terminology of pass-by-whatever, Luan's `So some_obj and another_obj['sometarget'] point to the same place in memory.` remark is self-explanatory.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26003111

http://stackoverflow.com/comment/40645402
has text: And yes, when I created an empty filter that returns the same data the '$promise' wasn't rendered.
comment on: http://stackoverflow.com/q/25960431
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40596332
type: QuestionComment
comment on: http://stackoverflow.com/q/25932324
has text: @user3484799 Perhaps you should put that kind of stuff in the question. Can you show the resulting HTML from your PHP?
score: 0
type: Comment

soap
tags question: http://stackoverflow.com/q/25945506
type: Tag
tags question: http://stackoverflow.com/q/25980417
tag name: soap

http://stackoverflow.com/comment/40614204
type: Comment
comment on: http://stackoverflow.com/q/25936371
type: QuestionComment
has text: If jsPDF supports CSS, why not just add style="page-break-before:always;" to the element(s) in question? Or in the CSS for that class?
score: 0

http://stackoverflow.com/comment/40740202
comment on: http://stackoverflow.com/q/26012282
type: Comment
type: QuestionComment
has text: @James Donnelly - I asked similar question earlier but I did not specify that it doesn't work in IE8. And was advised to ask it in another question, thus, i posted this. Apologies! I was hoping somebody in here experienced a work around.
score: 0

http://stackoverflow.com/comment/40712511
comment on: http://stackoverflow.com/a/25996498
score: 0
type: AnswerComment
has text: yup, you would have to guard the execution of requestAnimationFrame with some stop condition like `if (xPos < canvas.width)` or something like that. And of course than you don't need the rest to zero part.
type: Comment

http://stackoverflow.com/comment/40739892
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26012147
type: QuestionComment
has text: Hi user1093380, please check my edit

http://stackoverflow.com/a/25889240
accepted answer of: http://stackoverflow.com/q/25888769
has body: Try this http://jsfiddle.net/Tushar490/th778nfs/ $('#input2').click(function () { var value=$('#input').val(); console.log($('#para').text(value.split("").reverse().join(""))); });
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25888769

http://stackoverflow.com/q/26025677
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Bootstrap Validator not working on File Input
has answer: http://stackoverflow.com/a/30350212
has comment: http://stackoverflow.com/comment/40909100
downvote count: 0
linked to: http://stackoverflow.com/q/25649867
has answer: http://stackoverflow.com/a/32561716
favorite count: 0
has comment: http://stackoverflow.com/comment/40909014
type: UnansweredQuestion
score: 3
upvote count: 3
has body: I have a form field that should only accept a .jpg or .png image at a certain file size. The validation doesn't seem to be working(tested with invalid file types). This is what I have so far, so what is it I'm missing? I should work like it does here http://bootstrapvalidator.com/validators/file/ jsFiddle: http://jsfiddle.net/933yvfmh/3/ Image Cropper Reset //HIDE CONTROLS UNTIL IMAGE SELECTED// $("#reset, #renderButton, .render").hide(); $("#file").click(function () { $("#reset, #renderButton").show(); }); //ONLY SHOW RENDERED VIEW WHEN RENDER BUTTON CLICKED// $("#renderButton").click(function () { $(".render").fadeIn("slow").animate({ right: '50px' }); $(".render, #result_container").show(); }) //RESET RENDER VIEW// $("#reset").click(function () { $(".imgly-container").empty(); }); $('#fileupload').bootstrapValidator({ live: 'enabled', fields: { fileupload: { validators: { file: { extension: 'jpg, png', type: 'image/jpg, image/png', minSize: 1024 * 1024, message: 'The selected file is not valid, or the size is not large enough!' } } } } });
type: Question

http://stackoverflow.com/comment/40603681
type: Comment
has text: @igorpavlov Have you already tried Xan's answer? I *assumed* that his instructions does not work because it doesn't work on Linux, but I have to admit that I haven't tried it on a Mac yet.
type: AnswerComment
comment on: http://stackoverflow.com/a/25933964
score: 0

http://stackoverflow.com/comment/40676003
comment on: http://stackoverflow.com/q/25976215
score: 0
has text: Sorry. What I mean is that the ng-model is updated by removing all selected options that were hidden with the filter.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25958096
type: AcceptedAnswer
has body: You can use 'on' instead of 'live' but not in the exactly same way when using dynamically generated DOM elements. You will have to bind the selector as well - See, if this works - $(document).ready(function () { var colori = ["AntiqueWhite", "Aquamarine", "BurlyWood", "Chartreuse", "Coral", "DarkSalmon", "DodgerBlue", "GreenYellow", "LightBlue"]; var i = 2; $(this).on("click", "p", function () { $(" Paragraph " + i++ + " Sterge ").insertAfter(this); $(this).next().css("background-color", colori[i]) }); $(this).on("click", "span", function () { $(this).parent().remove(); }); });
accepted answer of: http://stackoverflow.com/q/25957765
type: Answer
answers question: http://stackoverflow.com/q/25957765
score: 0

http://stackoverflow.com/a/26176676
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25978820
has body: Although Joel Lubrano's answer works as intended for preloaded widgets ... it lacks the possibility to work with dynamically generated ones (via JS). Meanwhile, I've managed to work around this issue from inside the component solving both problems by adding one single line. Inside the component's JS locate the picker.show function (around line 1150 depending on version (this in v1.3.1)) ... inside the last else statement of that function, place the following line as the first instruction of that statement. $('.picker-open').hide().removeClass('picker-open'); and that's it. After that you only need to encapsulate the DTP initialization inside a function and call it on document ready and after dynamically generated widgets. function DTPinit(){ $('.dtp').datetimepicker(); } $(function(){ DTPinit(); $('#dtp_gen').on('click', function(){ $('body').append('&lt;div class="form-group"&gt;&lt;div class="input-group dtp date""&gt;&lt;input type="text" class="form-control datetimepicker" /&gt;&lt;span class="input-group-addon"&gt;&lt;span class="glyphicon-calendar glyphicon"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;'); DTPinit(); }); }); Here you have a JSFiddle demonstating what I'm describing above. The BS-DTP component is being loaded inside the fiddle JS container for editing purposes.
answers question: http://stackoverflow.com/q/25978820
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40753338
score: 0
has text: don't update the "this is displayed to the user" image, then. create a new img object that's not part of the dom, do the `.src` stuff on that, confirm it loaded ok, THEN insert that image into the dom. No img gets loaded, you just keep displaying the old/original one.
comment on: http://stackoverflow.com/q/26019568
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25930698
tagged with: javascript
score: 0
answer count: 1
has body: I'm kind of new to AngularJS and promises in JavaScript. I've got a .config which uses a provider to create menus in the application that I'm working on. This provider has an enabled property, in this enabled property I want to check if a user is an admin of an organization. This menu item should only be shown if the user is an admin. Some code: PageMenuProvider .page('organization', 'dashboard', { state: 'organization.dashboard', label: 'SW.ORGANIZATION.DASHBOARD.LABEL', weight: -60, enabled: ['$stateParams', '$rootScope', 'Organization', function ($stateParams, $rootScope, Organization) { return Organization.get({ slug: $stateParams.slug }).$promise .then(function (organization) { return organization.user_role === 'management' || $rootScope.isAdmin }) }] }) The problem is that I get a $promise as return value, and not the desired boolean.
tagged with: angularjs
type: UnansweredQuestion
has title: Return a resolved $Resource
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/25930842
type: Question

http://stackoverflow.com/comment/40572460
comment on: http://stackoverflow.com/q/25918472
score: 0
has text: I think your problem is similar to this one: [Does Android support window.location.replace or any equivalent?][1] [1]: http://stackoverflow.com/questions/15193359/does-android-support-window-location-replace-or-any-equivalent
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26025931
type: AcceptedAnswer
downvote count: 0
has body: Change datatype to dataType. Otherwise jQuery doesn't recognize the option and won't parse the response for you. In your case, data is still a string, which you can verify with console.log(typeof data). data[1] returns "{", and "{".text is undefined. Have a look at the documentation for the correct option names: http://api.jquery.com/jquery.ajax/ Alternatively, you could parse the response yourself. (I posted an answer to prevent other misguiding answers. It's community wiki because I voted to close the question.)
accepted answer of: http://stackoverflow.com/q/26025812
answers question: http://stackoverflow.com/q/26025812
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40765470

http://stackoverflow.com/a/25924358
accepted answer of: http://stackoverflow.com/q/25924299
type: AcceptedAnswer
has body: In firefox you can just input clear(). It well be done. Here's a link to the Developer's website for Javascript console commands: http://msdn.microsoft.com/en-us/library/windows/apps/hh696634.aspx
type: Answer
upvote count: 23
score: 21
downvote count: 2
answers question: http://stackoverflow.com/q/25924299
has comment: http://stackoverflow.com/comment/62092034

http://stackoverflow.com/comment/40689331
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25984133
has text: possible duplicate of [How can I open my extension's pop-up with JavaScript?](http://stackoverflow.com/questions/10479679/how-can-i-open-my-extensions-pop-up-with-javascript)

http://stackoverflow.com/comment/40690086
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25984540
type: Comment
has text: The only case where you don't return anything is if `str.charAt(0) == str.slice(-1)` is true.

http://stackoverflow.com/q/26006712
has comment: http://stackoverflow.com/comment/40730317
has comment: http://stackoverflow.com/comment/40730701
has answer: http://stackoverflow.com/a/26006789
favorite count: 0
has comment: http://stackoverflow.com/comment/40730351
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40730244
has comment: http://stackoverflow.com/comment/40730238
has body: I am having a lot of trouble with my method. The code works fine without it but, fails altogether with it. I want it to determine if either field is blank. If there is a better way to do it other then the If Else, I am certainly open to that. function showPerson ( ) { //method that fails if ( this.firstName != " " &amp;&amp; this.lastName != " ") { document.writeln(this.lastName + "; " + this.firstName); } else if (this.firstName != " " &amp;&amp; this.lastName = " ") { document.writeln( this.firstName); } else if (this.firstName = " " &amp;&amp; this.lastName != " ") { document.writeln(this.lastName); } else { document.writeln("Unknown"); } } var Person = function (firstName, lastName, areaCode, phone) { /objector constructor this.firstName = firstName; this.lastName = lastName; this.areaCode = areaCode; this.phone = phone; this.phoneNumber = "(" + areaCode + ")" + phone; this.show = showPerson; } function getInfo() { //prompts user for info var firstName = prompt("What is your first name: "); var lastName = prompt("What is your last name: "); var areaCode = prompt("What is your area code: "); var phone = prompt("What is your phone number: "); return new Person(firstName, lastName, areaCode, phone); } var user = getInfo(); //create object user.show(); //show object
has comment: http://stackoverflow.com/comment/40730256
downvote count: 1
has answer: http://stackoverflow.com/a/26006996
type: Question
has comment: http://stackoverflow.com/comment/40730344
tagged with: javascript
score: -1
has title: Method causing script to fail
answer count: 2
has comment: http://stackoverflow.com/comment/40730487
has comment: http://stackoverflow.com/comment/40730324
upvote count: 0

http://stackoverflow.com/a/26009068
has comment: http://stackoverflow.com/comment/40734827
type: Answer
has comment: http://stackoverflow.com/comment/40734607
has comment: http://stackoverflow.com/comment/40735005
score: 1
answers question: http://stackoverflow.com/q/26009013
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40734953
has comment: http://stackoverflow.com/comment/40735109
has body: You can use jQuery and its jQuery.ajax function that defined a username and password options. Then, you can store your token in a localStorage.

http://stackoverflow.com/comment/40761408
comment on: http://stackoverflow.com/a/26023760
type: AnswerComment
type: Comment
score: 0
has text: $('.msgBoxBackGround').trigger('click');

http://stackoverflow.com/a/25962930
accepted answer of: http://stackoverflow.com/q/25962366
answers question: http://stackoverflow.com/q/25962366
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40652725
has body: “First, I'ld like to use google CDN jQuery library instead of local jQuery library.” You should research more before asking easy questions, the following is taken from this post and this post. Overall I think it's not worth the extra effort just to rely on a 3rd party. In your theme's local.xml layout file add this. skin_js js/lib/jquery-1.10.2.min.js “As second, how can run my jQuery code?” $j(document).ready(function() { $('#header-cart').hide(); }); Here you know you must use $j instead of $ but you have forgotten that on the 2nd line! There are many ways to change it, Use $j everywhere: $j(document).ready(function() { $j('#header-cart').hide(); }); Rename $j using the function argument: $j(document).ready(function($) { // $ is different inside this function only $('#header-cart').hide(); }); Use Prototype instead: // $j is alias for jQuery $j(document).ready(function() { // $ is Prototype alias for document.getElementById $('header-cart').hide(); });
has comment: http://stackoverflow.com/comment/40654279
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40730430
score: 0
type: Comment
has text: @Adrian.S Updated, try again. That may not be the cleanest solution though.
type: AnswerComment
comment on: http://stackoverflow.com/a/26006508

http://stackoverflow.com/q/25911827
favorite count: 0
accepted answer: http://stackoverflow.com/a/25912288
has body: I have following problem when working with googles Closure-Library. var temp = "ks/ZUl6L5v77y7BHymYrFw===="; //sample string var decoded = goog.crypt.base64.decodeStringToByteArray(temp); var sha512 = new goog.crypt.Sha512(); sha512.update(decoded); //Error: message must be a byte array Changing the string makes the code run: var temp1 = "heyeveryone"; //sample string var decoded1 = goog.crypt.base64.decodeStringToByteArray(temp1); var sha512 = new goog.crypt.Sha512(); sha512.update(decoded1); //fine... When having a look at the 'decoded'and 'decoded1' values, both look like byte arrays to me. decoded [146, 207, 217, 82, 94, 139, 230, 254, 251, 203, 176, 71, 202, 102, 43, 23, 260] decoded1 [133, 236, 158, 189, 234, 242, 162, 119] So, what's the problem here? Why is 'decoded1' valid and 'decoded' not? Thanks!
tagged with: google-closure-library
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40564387
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40559966
has title: Why does goog.crypt.base64.decodeStringToByteArray(string) return a invalid byte array here?
has answer: http://stackoverflow.com/a/25912288
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript
score: 1

http://stackoverflow.com/q/25992785
accepted answer: http://stackoverflow.com/a/25995614
answer count: 1
tagged with: javascript
tagged with: phonegap-plugins
tagged with: android
tagged with: plugins
type: AnsweredQuestion
tagged with: cordova
type: Question
has body: I'm developing a cordova android app and I'm getting an error while using a calendar plugin from github https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin the error is: ..................................... my html file for including JSs my fncs.js file is: var startDate = new Date(2014,8,24,0,0,0,0,0); var endDate = new Date(2014,8,27,0,0,0,0,0); var title = "My nice event"; var location = "Home"; var notes = "Some notes about this event."; var success = function(message) { document.getElementById("developers").innerHTML = "success";}; var error = function(message) { document.getElementById("developers").innerHTML = "failed";}; window.plugins.calendar.createCalendar(calendarName,success,error); and here's my file structure: JS folder >> any help would be greatly appreciated .. thanks !
has answer: http://stackoverflow.com/a/25995614
has title: Error in Assets folder while running Cordova Android App (plugin)
score: 0

http://stackoverflow.com/comment/40626316
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25944899
type: Comment
has text: from the network panel of chrome dev tools, would you please copy the entire response into the question?

http://stackoverflow.com/q/25915143
accepted answer: http://stackoverflow.com/a/25915170
score: 0
has answer: http://stackoverflow.com/a/25915170
possible better answer: http://stackoverflow.com/a/25915291
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25915291
has body: I have few elements like that: text 1 text 2 text 3 And i need to get all elements by id and by data-transformeffect attribute. for example i need to get all element with .id.indexOf('7-interval-') > -1 and with .data.transformeffect() == 'fade'. This is necessary in order to apply different effects to different elements.
type: Question
has comment: http://stackoverflow.com/comment/40564776
linked to: http://stackoverflow.com/q/4146502
has title: Get element by id and custom attribute
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40673669
comment on: http://stackoverflow.com/a/25975713
type: Comment
has text: i see - clever :) But i get the data/ajax from another server, so i guess thats not the solution for me
score: 0
type: AnswerComment

http://stackoverflow.com/a/26000853
has comment: http://stackoverflow.com/comment/40719621
answers question: http://stackoverflow.com/q/25994478
score: 8
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25994478
has body: The problem with an evented approach is that you don't have a guarantee as to which handlers will handle a given event first. So in a very large, complex app, this can turn into a tangled web where you're not really sure what is happening when, which makes dependency management between stores very difficult. The benefits of the callback-based dispatcher are twofold: the order in which stores update themselves is declared in the stores that need this ordering, and it is also guaranteed to work exactly as intended. And this is one of the primary purposes of Flux -- getting the state of an app to be predictable, consistent and stable. In a very small app that is guaranteed to not grow or change over time, I can't argue with what you are suggesting. But small apps have a tendency to grow into large ones, eventually. This often happens before anyone realizes it's happening. There are certainly other approaches to Flux. Quite a few different implementations have been created and they have different approaches to this problem. However, I'm not sure which of these experiments scale well. On the other hand, the dispatcher in Facebook's Flux repo and the approach described in the documentation has scaled to truly gigantic applications and is quite battle tested.
has comment: http://stackoverflow.com/comment/41875827
upvote count: 8
has comment: http://stackoverflow.com/comment/40719491
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40534732
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25896186
has text: I am thinking that as I am adding the "form" through javascript later on a button click it cannot find the submit button for manipulations. If that is the case do you have any suggestions?

http://stackoverflow.com/a/25973403
answers question: http://stackoverflow.com/q/25973300
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/40668885
score: 2
downvote count: 0
has body: I wrote a function to test this : var isModuleDefined = function(moduleName) { var d = moduleName.split("."); var md = d[0]; for (var i = 1, len = d.length; i &lt;= len; i++) { if (eval("typeof " + md) !== "undefined") { md = md + "." + d[i]; continue; } break; } return i === len + 1; }; isModuleDefined("Variables.settings.backend.url"); but i really don't know about the cost-efficiency of that method, using eval. Edit (Without eval..): var isModuleDefined = function(moduleName) { var d = moduleName.split("."); var base = window; for (var i = 0, len = d.length; i &lt; len; i++) { if (typeof base[d[i]] != "undefined") { base = base[d[i]]; continue; } break; } return i === len; };

http://stackoverflow.com/q/25952255
accepted answer: http://stackoverflow.com/a/25953210
tagged with: https
type: Question
has comment: http://stackoverflow.com/comment/101189435
has answer: http://stackoverflow.com/a/25953210
has body: Is there a way to serve two https sites on the same port from node alone (i.e. without something like nginx)? I'm using the https module, for which SSL options (e.g. key/cert/ca) are passed into createServer. I tried creating two https servers, each listening to a different hostname, and each with SSL options specific to that hostname: require('https').createServer(sslOptsForFoo, expressApp).listen(443, 'foo.com'); require('https').createServer(sslOptsForBar, expressApp).listen(443, 'bar.com'); But this throws an error: Error: listen EADDRINUSE Another idea is to create a single server rather than two, and to use different SSL options depending on the request's hostname, but I'm not sure if this is possible.
tagged with: ssl
tagged with: javascript
tagged with: express
upvote count: 2
linked to: http://stackoverflow.com/q/12219639
answer count: 1
favorite count: 0
has title: Serve two https hostnames from single node process & port
tagged with: node.js
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/a/25916001
score: 3
has body: In you Javascript, change el.style.display = 'block'; to el.style.display = 'table-row'; see jsFiddle
upvote count: 3
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25915922

http://stackoverflow.com/q/25934399
has answer: http://stackoverflow.com/a/25934722
tagged with: internet-explorer-9
has answer: http://stackoverflow.com/a/25934770
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40600176
has body: I want to create a portion in the image where when I click, it will alert hi. I know there are many ways to create portion on image, but I want it this way. The opacity property and the cursor property seems that does not work on IE9 because when I mouseOver the area it doesn't display pointer cursor and when I click on that portion it doesn't alert hi too. But that works fine on other browser. Can anybody explain why is this happening? $(window).load(function () { var myImg = document.getElementById("myImg"); var myDiv = document.createElement("div"); myDiv.style.position = "absolute"; myDiv.style.width = "200px"; myDiv.style.height = "200px"; myDiv.style.top = "20px"; myDiv.style.left = "20px"; myDiv.style.position = "absolute"; myDiv.style.cursor = "pointer"; myDiv.style.border = "2px solid red"; myDiv.style.opacity = 0.3; document.body.appendChild(myDiv); myDiv.onclick = function () { alert("hi"); } }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;img id="myImg" src="http://myartzine.com/wp-content/uploads/2013/10/Gtelaviv_05.jpg"&gt;
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40600112
tagged with: css
has title: Why cursor, opacity property and onclick event handler not work on IE9
score: 0
answer count: 2

http://stackoverflow.com/q/25906820
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26634940
has body: This is one topic that is really hard to find any real material on. What does it mean for a templating engine to support top-to-bottom/bottom-to-top inclusion. I only stumble on this when i read books that barely even scratch the surface of templating. In Angular JS Directives, it was used to explain the function of the "Transclude" setting for configuring directives and in Apress Practical NodeJs, it said jade supports it. Anyone know what this means?
score: 1
has comment: http://stackoverflow.com/comment/40633488
type: Question
upvote count: 1
tagged with: pug
answer count: 1
has title: what is top-to-bottom/bottom-to-top inclusion in html templating
tagged with: javascript
tagged with: template-engine
has comment: http://stackoverflow.com/comment/40633463
favorite count: 0
tagged with: node.js

http://stackoverflow.com/comment/40680026
type: Comment
comment on: http://stackoverflow.com/a/25961400
score: 0
type: AnswerComment
has text: i checked now by adding console.log before the callback line inside the anonymous function in the .save. still its the same, no response from server.

http://stackoverflow.com/comment/40639668
type: AnswerComment
type: Comment
score: 0
has text: The code is working, but it autocompletes based on label, not values.
comment on: http://stackoverflow.com/a/25957287

http://stackoverflow.com/q/25897536
tagged with: javascript
answer count: 1
downvote count: 0
has title: open a browser window from an iframe within webview
favorite count: 0
tagged with: cordova
has body: I am designing a jquerymobile/phonegap app and embedding a paythru captcha (areyouahuman captcha). The playthru captcha runs as a javascript embedded in an iframe in my app. The problem is that some external links within the captcha iframe open advertised urls within the same webview and to the enduser it would look like the advertised url is a part of my app. [which it is not and should open in a seperate native browser window] [&amp; I am not supposed to alter the js code of the captcha] I have tried the target as _blank options on the iframe I can't use phone gap config.xml access origin option since the captcha won't function if i restrict the particular domain. &lt;preference name="stay-in-webview" value="false" /&gt; does not work for some reason and i hear it is deprecated can't use window.open since i don't have access to the anchor element dynamically set by the captcha js code JQM Page load events don't seem to work since the target advertise html does not have a data-role as page Is there any way i can cause the iframe links to open in a separate browser window rather than within my app web view. Thanks for any help!
type: UnansweredQuestion
score: 3
tagged with: captcha
upvote count: 3
tagged with: iframe
type: Question
has answer: http://stackoverflow.com/a/25897964
tagged with: jquery-mobile

ajax
tags question: http://stackoverflow.com/q/25948960
tags question: http://stackoverflow.com/q/26028856
tags question: http://stackoverflow.com/q/25996486
tags question: http://stackoverflow.com/q/26008336
tags question: http://stackoverflow.com/q/25955894
tags question: http://stackoverflow.com/q/25972983
tags question: http://stackoverflow.com/q/25995997
tags question: http://stackoverflow.com/q/25958180
tags question: http://stackoverflow.com/q/25886552
tags question: http://stackoverflow.com/q/25914071
tags question: http://stackoverflow.com/q/25945379
tags question: http://stackoverflow.com/q/25936245
tags question: http://stackoverflow.com/q/25877187
tags question: http://stackoverflow.com/q/25885566
tags question: http://stackoverflow.com/q/25999795
tags question: http://stackoverflow.com/q/25927333
tags question: http://stackoverflow.com/q/25880948
tags question: http://stackoverflow.com/q/26027915
tags question: http://stackoverflow.com/q/25925020
tags question: http://stackoverflow.com/q/26031576
tags question: http://stackoverflow.com/q/25937203
tags question: http://stackoverflow.com/q/25928003
tags question: http://stackoverflow.com/q/25876772
tags question: http://stackoverflow.com/q/25956559
tags question: http://stackoverflow.com/q/26006012
tags question: http://stackoverflow.com/q/25996629
tags question: http://stackoverflow.com/q/25899717
tags question: http://stackoverflow.com/q/26030764
tags question: http://stackoverflow.com/q/26007010
tags question: http://stackoverflow.com/q/25928871
tags question: http://stackoverflow.com/q/25966686
tags question: http://stackoverflow.com/q/26007216
tags question: http://stackoverflow.com/q/25892237
tags question: http://stackoverflow.com/q/26021854
tags question: http://stackoverflow.com/q/25950312
tags question: http://stackoverflow.com/q/25898241
tags question: http://stackoverflow.com/q/25879928
type: Tag
tags question: http://stackoverflow.com/q/25955825
tags question: http://stackoverflow.com/q/25943382
tags question: http://stackoverflow.com/q/25953762
tags question: http://stackoverflow.com/q/25882988
tags question: http://stackoverflow.com/q/25911736
tags question: http://stackoverflow.com/q/25898968
tags question: http://stackoverflow.com/q/25976826
tags question: http://stackoverflow.com/q/26006843
tags question: http://stackoverflow.com/q/25951147
tags question: http://stackoverflow.com/q/25969539
tags question: http://stackoverflow.com/q/25950085
tags question: http://stackoverflow.com/q/25897766
tags question: http://stackoverflow.com/q/25984856
tags question: http://stackoverflow.com/q/25908226
tags question: http://stackoverflow.com/q/25923198
tags question: http://stackoverflow.com/q/25981674
tags question: http://stackoverflow.com/q/26030358
tags question: http://stackoverflow.com/q/26006379
tags question: http://stackoverflow.com/q/25988057
tags question: http://stackoverflow.com/q/26001293
tags question: http://stackoverflow.com/q/25885230
tags question: http://stackoverflow.com/q/26013604
tags question: http://stackoverflow.com/q/26004490
tags question: http://stackoverflow.com/q/25934581
tags question: http://stackoverflow.com/q/25876687
tags question: http://stackoverflow.com/q/26003023
tags question: http://stackoverflow.com/q/25911034
tags question: http://stackoverflow.com/q/25916446
tags question: http://stackoverflow.com/q/25976214
tags question: http://stackoverflow.com/q/25970188
tags question: http://stackoverflow.com/q/26011928
tags question: http://stackoverflow.com/q/26031518
tags question: http://stackoverflow.com/q/25956290
tags question: http://stackoverflow.com/q/25975100
tags question: http://stackoverflow.com/q/25879745
tags question: http://stackoverflow.com/q/25984837
tags question: http://stackoverflow.com/q/25923423
tags question: http://stackoverflow.com/q/25905412
tags question: http://stackoverflow.com/q/25939697
tags question: http://stackoverflow.com/q/25875638
tags question: http://stackoverflow.com/q/25882549
tags question: http://stackoverflow.com/q/25947731

http://stackoverflow.com/comment/40635279
type: QuestionComment
score: 0
has text: @rs202 have you taken a gander at my solution below? :-)
comment on: http://stackoverflow.com/q/25954728
type: Comment

http://stackoverflow.com/comment/40526836
has text: Strange Andy, maybe its a jsbin thing?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25894183
type: Comment

http://stackoverflow.com/q/25920511
duplicate of: http://stackoverflow.com/q/21720367
downvote count: 1
has comment: http://stackoverflow.com/comment/40576269
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40575334
type: Question
has answer: http://stackoverflow.com/a/25921160
upvote count: 0
tagged with: pjax
answer count: 1
has body: I'm currently trying to get a pjax:complete event handler to work. Below I've sketched the situation: I'm working on a Chrome extension for GitHub, it does not contain jQuery, and I don't want to include it. I do want to listen for the pjax event, and do something when it happens. However, the example below only seems to work when using jQuery's $.on function. I've also created a simple JSFiddle for this, without using the real pjax events, but simulating it. You can find that here. If you run it, you'll see the jQuery eventhandler called 2 times, but the VanillaJS one only once. $(document).on('pjax:complete', function () { console.log('jQuery pjax event is called'); }); document.addEventListener('pjax:complete', function () { console.log('VanillaJS pjax event is called'); }); document.dispatchEvent((new Event('pjax:complete'))); // This works $(document).trigger('pjax:complete'); // this doesn't (FYI: actual function used can be found [here][1]) The desired result is that the VanillaJS event is called even when it's called from jQuery. 1: https://github.com/defunkt/jquery-pjax/blob/master/jquery.pjax.js#L181
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: addEventListener doesn't work with colon (:) in event name
has comment: http://stackoverflow.com/comment/40575380
tagged with: events
has comment: http://stackoverflow.com/comment/40576317
accepted answer: http://stackoverflow.com/a/25921160
score: -1
linked to: http://stackoverflow.com/q/21720367
has comment: http://stackoverflow.com/comment/40576473
linked to: http://stackoverflow.com/q/24357819

http://stackoverflow.com/a/25897164
has comment: http://stackoverflow.com/comment/40532466
score: 0
has comment: http://stackoverflow.com/comment/40532581
has comment: http://stackoverflow.com/comment/40532560
has body: When dealing with dates in FlotChart, you want return the date in UNIX time stamps multiplied by 1000, by using this ASP code to filter the dates your return to flotchart: DateDiff("s","01/01/1970",MyDate)*1000 This gives it to FlotChart how it wants it, so you can use all the date features it offers. When you do this it will write the dates for you and the month names, etc. Without seeing the JSON data you're feeding flowchart, it's really not easy to understand where your errors may be, but since you're using dates, this must be one of them.
has comment: http://stackoverflow.com/comment/40533097
type: Answer
answers question: http://stackoverflow.com/q/25896833
has comment: http://stackoverflow.com/comment/40533252
has comment: http://stackoverflow.com/comment/40532788
has comment: http://stackoverflow.com/comment/40532747

http://stackoverflow.com/q/26023478
tagged with: firefox
tagged with: javascript
tagged with: asp.net
score: 0
answer count: 0
type: UnansweredQuestion
has body: I'm having a problem with my if statement in firefox. As you can see in the code below, I'm checking if a cookie exists and if it does exist, it writes out some JS for google analytics, and if it doesn't exist it writes a div box with a cookiewarning. It's working in all browsers except firefox. Anybody know why it isn't working in Firefox? if (Request.Cookies["CookieConfirm"] != null) { litHead.Text = puts out my js for google analytics } else { litCookieAlert.Text += puts out the divbox and some links }
has comment: http://stackoverflow.com/comment/40760552
tagged with: c#
has title: Accessing 1st party cookies in Firefox
has comment: http://stackoverflow.com/comment/40760653
tagged with: cookies
type: Question

http://stackoverflow.com/a/36727648
type: Answer
upvote count: 13
answers question: http://stackoverflow.com/q/25877461
score: 13
has body: This is my ultimate Vanilla JS solution:
downvote count: 0
has comment: http://stackoverflow.com/comment/120924226
has comment: http://stackoverflow.com/comment/122952861

http://stackoverflow.com/comment/40588880
type: Comment
score: 1
has text: Eh, no you don't: `var newNumber = Math.pow(number, power);`
type: AnswerComment
comment on: http://stackoverflow.com/a/25928165

http://stackoverflow.com/a/25951068
answers question: http://stackoverflow.com/q/25951014
score: 0
has comment: http://stackoverflow.com/comment/40628594
has body: use $(document).mousemove(function(){ $('.front #main .block-content').animate({opacity : 0.3}, 200); }) instead
type: Answer

http://stackoverflow.com/q/25963616
tagged with: css
has body: I have a HTML page that have an iframe. I want to change style of iframe content but I don't seem to be able to do so. I want to change the font of all content inside the iframe to "Tahoma". This is my code: phpinfo()
linked to: http://stackoverflow.com/q/217776
has title: Change font inside an iframe
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/38452471
has answer: http://stackoverflow.com/a/25963902
tagged with: javascript
duplicate of: http://stackoverflow.com/q/217776
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
score: 8
upvote count: 9
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/q/25901433
type: Question
has body: i've an array with names of city var names = {"john","johnny","nash","roni","ron"}; now i want to use the feature of mysql like with it, just like google does, when suppose user typed j i want to return "john","johnny", how to implement this, what i tried was returning "john" only when i type "john" ` $('#student_name').keyup(function(){ var name = $('#student_name').val(); $('#suggestion').text(findStu(name,names)); }); function findStu(val,obj){ var arr,name; for(var i in obj){ if(typeof obj[i] === "object" &amp;&amp; obj[i] instanceof Array){ arr = obj[i]; arr.forEach(function(a){ if(a === val) name = i; }); } } return name; } `
tagged with: arrays
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25901595
has title: sql "like" search inside javascript array or php array
has comment: http://stackoverflow.com/comment/40540165
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/comment/40669597
has text: a unique token is required to identify who the referer is so I guess then you have to implement it on server side
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25973724
score: 0

http://stackoverflow.com/a/25961273
score: 3
accepted answer of: http://stackoverflow.com/q/25961207
has body: You can try this Add Add
has comment: http://stackoverflow.com/comment/40647259
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40647205
answers question: http://stackoverflow.com/q/25961207
type: Answer
has comment: http://stackoverflow.com/comment/40647192
upvote count: 3

http://stackoverflow.com/q/25978982
has answer: http://stackoverflow.com/a/25979095
has body: I have the following code which is supposed to show the content of a paragraph but it doesn't work: jQuery HTML They say the only thing better. Lorem ipsum CSS .portfolio-hover { display:block; } p.portfolio-excerpt { display:block; height:30px; width:auto; } p.portfolio-text { display:none; } which is not working and I don't know why. Can you help?
has title: jQuery hover function not working and don't know why
has answer: http://stackoverflow.com/a/25979031
tagged with: javascript
has answer: http://stackoverflow.com/a/25979083
answer count: 6
score: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/25979104
accepted answer: http://stackoverflow.com/a/25979100
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40679562
linked to: http://stackoverflow.com/q/2809024
possible better answer: http://stackoverflow.com/a/25979083
has answer: http://stackoverflow.com/a/25979259
has answer: http://stackoverflow.com/a/25979100
type: Question

http://stackoverflow.com/a/25958085
score: 0
has body: After some fiddling, it looks like you need to set the $viewValue explicitly and let angular render it for you as it normally does like so: $scope.onSelect = function($item) { var theInput = angular.element(document.querySelector('#theInput')); var ngModelCtrl = theInput.controller('ngModel'); ngModelCtrl.$setViewValue($item); ngModelCtrl.$render(); }; This code could probably be improved quite a bit - currently, I'm having trouble getting the dropdown to STOP displaying. But it does what you want. Plunkr here.
answers question: http://stackoverflow.com/q/25957266
type: Answer
has comment: http://stackoverflow.com/comment/40682253
has comment: http://stackoverflow.com/comment/40685658

http://stackoverflow.com/a/25932326
answers question: http://stackoverflow.com/q/25906160
accepted answer of: http://stackoverflow.com/q/25906160
score: 0
type: AcceptedAnswer
has body: I try to debug your code with javascript log. And I think your problem is on your custom function called calcRoute(start, end) I try to pass the variable directly without function parameter to be something like below function calcRoute() { var doStart = document.getElementById('start').value; var doFinish = document.getElementById('end').value; var request = { origin: doStart, destination: doFinish, provideRouteAlternatives: true, avoidHighways: true, avoidTolls: true, travelMode: google.maps.TravelMode.DRIVING }; directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { // Resize the map canvas to accomodate // the textual directions panel map_canvas.style.width = '70%'; directionsPanel.style.display = 'inline'; // Request map resize. google.maps.event.trigger(map, "resize"); // display the directions directionsDisplay.setDirections(response); // Display the distance: document.getElementById('distance').innerHTML += response.routes[0].legs[0].distance.value + " Meter"; // Display the duration: document.getElementById('duration').innerHTML += response.routes[0].legs[0].duration.value + " Detik"; And also I did some modification for this function function showDirectionsPanelandCalculate() { if (start.value == 0 || end.value == 0) { return; } calcRoute(start.value, end.value); } Attached for jsfiddle link here
has comment: http://stackoverflow.com/comment/40603226
type: Answer

css-animations
tags question: http://stackoverflow.com/q/26003895
tags question: http://stackoverflow.com/q/25897819
tags question: http://stackoverflow.com/q/25986064
tags question: http://stackoverflow.com/q/25941861
type: Tag
tag name: css-animations

http://stackoverflow.com/q/25963446
type: UnansweredQuestion
has body: Description : I have a div with width: 100% of the body and is sicked to the top of the page. Now when I start scrolling I want the div to hide itself when it is no longer the part of visible page after scrolling e.g slideUp "But" when I start to take my cursor near the top of my page the div should re-appear when the cursor is at certain distance from the top of the page Now I could use the following demo code $(document).on("scrollstart",function(){ alert("Started scrolling!"); }); but then 1) I dont how to detect if the div is out of the visible page after scrolling 2) and how to detect the y-distance of the cursor from the top of the page... any one??
type: Question
has title: hide the div on scrolling and show it when cursor reaches to a certain distance from the top
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25964361
tagged with: jquery

http://stackoverflow.com/comment/40784992
has text: Wow, thanks a lot. You have saved a lot of headache :)
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26029790

http://stackoverflow.com/comment/107226430
has text: @icl7126 Is there a list documenting what restricted domains/pages are?
comment on: http://stackoverflow.com/a/28026191
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/45258898
score: 1
has text: @Adamski: Did you make any progress with connecting Ember to Loopback? I'm considering doing this, wondering what others' experiences were with it...
comment on: http://stackoverflow.com/q/25942688
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26032419
type: Answer
accepted answer of: http://stackoverflow.com/q/26032205
score: 3
has comment: http://stackoverflow.com/comment/40777503
upvote count: 3
has comment: http://stackoverflow.com/comment/40776941
has body: &lt;script&gt; @{ var serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); var json = serializer.Serialize(Model); } var myApp = angular.module('myApp', []); myApp.controller('personController', ['$scope', '$http', function ($scope, $http) { $scope.person = @Html.Raw(json); }]); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40776910
has comment: http://stackoverflow.com/comment/40777700
answers question: http://stackoverflow.com/q/26032205
has comment: http://stackoverflow.com/comment/40777967
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40726256
has text: Hi, I have just tried your method however it isn't functioning on my live site, I've checked the code and everything looks fine. I hate to be cheeky but here is the page if you would be kind enough to have a quick look:http://www.drivencarsales.co.uk/used-cars.php
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26004262

http://stackoverflow.com/q/25947436
tagged with: javascript
has body: I'm trying to port some code that I made in openFrameworks into THREE.JS. The code generates a landscape using perlin noise. I made it so that first a static index array is created, and then the positions of the vertices are placed out in a square grid each displaced by a specified distance. This is so that the positions of the vertices within the array can be shifted (up, down, left or right) so that when the camera moves the landscape can be updated and new strip of landscape generated based on the direction of the camera movement. For each vertex, 6 indices are added to the index array which refer to two adjacent triangles. I didn't want to waste memory storing duplicates of each vertex for each triangle. For example e.g. v12 v11 v10 *----*----* |\ |\ | | \ | \ | | \ | \ | | \| \| *----*----* v02 v01 v00 so e.g. at vertex v00, the indices {v00, v10, v11} and {v00, v11, v01} are added, etc. In my openFrameworks code, this all works perfectly! After a lot of trouble I finally got things working in THREE.js, but have noticed that as soon as I increase the amount of vertices everything starts getting weird - the triangles are connecting (what seems) all over the place, and a large chunk of vertices start to become skipped. At the moment anything up to and including a grid size of 256*256 works fine, but as soon as I increase any higher I start to see all the artefacts. I'm thinking this is probably an issue with offsetting, but I don't really understand what this means, or how to implement it with my code. I've seen other people use it successfully when they define their indices in order (0, 1, 2, 3, ... ) and instead use 3 individual vertices for each triangle (and add each three vertices for each triangle in sequence). I can't seem to get the same kind of thing to work. Any ideas? I've got my code below just in case it helps. You can see the parts where I commented out the ofsetting. var landscape = { size: 0, chunkSize: 21845, distance: 0, geometry: null, mesh: nu…
score: 2
answer count: 1
tagged with: opengl-es
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: three.js
has answer: http://stackoverflow.com/a/25948356
type: Question
has title: BufferGeometry indices issue
tagged with: buffer-geometry
downvote count: 0

http://stackoverflow.com/q/25904636
possible better answer: http://stackoverflow.com/a/25905000
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25904879
has comment: http://stackoverflow.com/comment/40546434
score: 0
has answer: http://stackoverflow.com/a/25905000
tagged with: angularjs
has title: AngularJS conditional class not working
type: AnsweredQuestion
has body: I have a register function in my controller: $scope.register = function() { User.register($scope.user) .success(function(data) { if(data.success) { $scope.stage = false; } else { $scope.message = true; } }); } I then have this HTML: Confirmation Token Typically in jQuery I'd update the DOM by removing the class hidden if data.success. Here I've used ng-class to conditionally apply or remove a class, but it seems it's not working. I want the class to be there by default, and then want it to be removed if data.success What am I doing wrong here?
accepted answer: http://stackoverflow.com/a/25904879

http://stackoverflow.com/a/26000354
accepted answer of: http://stackoverflow.com/q/25999567
has body: Probably you'll have to calculate it. var total = 0; for (var f = 0; f &lt; data.getNumberOfRows(); f++){ total += data.getValue(f, 1); } var selectedItem = chart.getSelection()[0]; if (selectedItem) { var percentage = (data.getValue(selectedItem.row,1)*100/total).toFixed(1); var version = data.getValue(selectedItem.row, 0); alert('The user selected ' + version + ' a ' + percentage + '% of total'); } } http://jsfiddle.net/oaobxych/7/
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25999567
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40745412
has comment: http://stackoverflow.com/comment/40719490

http://stackoverflow.com/q/26019456
answer count: 2
has answer: http://stackoverflow.com/a/38812664
downvote count: 0
has comment: http://stackoverflow.com/comment/40753931
tagged with: templates
has comment: http://stackoverflow.com/comment/40753862
has title: External js in an EJS template
favorite count: 0
has comment: http://stackoverflow.com/comment/40753693
tagged with: node.js
type: AnsweredQuestion
score: 3
has body: I have some trouble using EJS. I would like to use a javascript file in my template, but I can't find the right way to implement it, here is my code so far : game.ejs : D-D-D-Duel !!! // My body Whatever path I try for my script /actions_client.js, the view can't find it while loading in my browser. It's maybe a problem with node.js I also use, I don't know where to put my script in order to make my view find it (what and/or where is the folder localhost:8080/ ?) Regards EDIT : Something that I don't understand neither is how can the view find socket.io/socket.io/js while I don't find it when I search on my computer ? EDIT : Here is my code in my node file by the way : var express = require('express'); var app = express(), server = require('http').createServer(app), io = require('socket.io').listen(server), fs = require('fs'), composants = require('./modules_persos/composants');
accepted answer: http://stackoverflow.com/a/26019917
possible better answer: http://stackoverflow.com/a/38812664
has comment: http://stackoverflow.com/comment/40753590
has comment: http://stackoverflow.com/comment/40753493
type: Question
linked to: http://stackoverflow.com/q/26013675
has answer: http://stackoverflow.com/a/26019917
tagged with: javascript
upvote count: 3
tagged with: ejs

http://stackoverflow.com/q/25916902
has title: Performance Impact when using multiple angular apps in one application
answer count: 1
has answer: http://stackoverflow.com/a/25917045
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25917045
type: Question
tagged with: javascript
has body: I am building a web application using nodejs and angularjs. For each page in the application, I have a .js file containing an angular app for that page. Currently, I have a total of 17 Apps for 17 pages. I want to know if there's any downside to doing this, as opposed to having one large app, and creating controllers for each of the pages? Thanks
score: 0

http://stackoverflow.com/comment/40528690
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25895168
has text: What is `sr`, `jr` ?

http://stackoverflow.com/a/25959264
has body: JSON.parse creates an object where properties (keys) are 1, 2, etc. So you can access the first header with result[1].header or result[1]['header']. You can also access the headers by iterating over the result: for (var index in result) { if (result.hasOwnProperty(index)) { console.log(result[index].header); } } This outputs: First header Second header EDIT: Here is a demo: var json = '{"1":{"header":"First header","content":"First news content"},"2":{"header":"Second header","content":"Second news content"}}'; var result = JSON.parse(json); console.log(result[1].header); for (var index in result) { if (result.hasOwnProperty(index)) { console.log(result[index].header); } }
has comment: http://stackoverflow.com/comment/40643695
accepted answer of: http://stackoverflow.com/q/25959227
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25959227
score: 0
has comment: http://stackoverflow.com/comment/40643657
has comment: http://stackoverflow.com/comment/40643623
type: Answer
has comment: http://stackoverflow.com/comment/40643553

http://stackoverflow.com/a/26003203
score: -1
has body: Use the visibility property. visibility: visible|hidden|collapse|initial|inherit; document.getElementById("myDiv").style.visibility = "hidden";
answers question: http://stackoverflow.com/q/26003053
downvote count: 1
type: Answer
upvote count: 0

http://stackoverflow.com/a/25945231
has comment: http://stackoverflow.com/comment/40672102
has comment: http://stackoverflow.com/comment/48759868
has body: The core to your question is: I understand that I can replace my anonymous functions with names functions, but then I would need to pass arounds variables. How would my inner function access res for instance if the function is defined elsewhere? The answer is to use a function factory. In general, this: function x (a) { do_something(function(){ process(a); }); } can be converted to this: function x (a) { do_something(y_maker(a)); // notice we're calling y_maker, // not passing it in as callback } function y_maker (b) { return function () { process(b); }; } In the code above, y_maker is a function that generates a function (let's call that function's purpose "y"). In my own code, I use the naming convention .._maker or generate_.. to denote that I'm calling a function factory. But that's just me and the convention is in no way standard or widely adopted in the wild. So for your code you can refactor it to: exports.generateUrl = function (req, res) { var id = req.query.someParameter; var query = MyMongooseModel.findOne({'id': id}); query.exec(make_queryHandler(req,res)); }; function make_queryHandler (req, res) { return function (err, mongooseModel) { if(err) { //deal with it } else if (!mongooseModel) { generateUrl(Id,make_urlGeneratorHandler(req,res)); } else { //deal with already exists } }} function make_urlGeneratorHandler (req, res) { return function (err, text, url) { if (err) { res.status(HttpStatus.INTERNAL_SERVER_ERROR).send(err); return; } var newMongooseModel = new AnotherMongooseModel(); newMongooseModel.id = id; newMongooseModel.save(make_modelSaveHandler(req,res)); }} function make_modelSaveHandler (req, res) { return function (err) { if (err) res.status(HttpStatus.INTERNAL_SERVER_ERROR).send(err); else res.send({url: url, text: text}); }} This flattens out the nested callbacks. As an additional benefit, you get to properly name what the function is supposed to do. Which I consider good practice. It also has the added advantage that it is significantly …
score: 10
type: AcceptedAnswer
upvote count: 10
type: Answer
accepted answer of: http://stackoverflow.com/q/25941010
answers question: http://stackoverflow.com/q/25941010
downvote count: 0

http://stackoverflow.com/comment/40666246
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25971806
type: Comment
has text: Even though this code works, it is worth mentioning that `checked` is Boolean attribute, as said in [W3C forms specification](http://www.w3.org/TR/html401/interact/forms.html#h-17.4). So in proper way it should be `prop('checked', true);` and `prop('checked', false);`

http://stackoverflow.com/q/25879744
has title: Simple Dynamic Directive AngularJS
tagged with: templates
tagged with: dynamic
score: 0
has answer: http://stackoverflow.com/a/25879777
answer count: 3
tagged with: angularjs-directive
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25879834
has answer: http://stackoverflow.com/a/25880938
tagged with: javascript
has body: I have an application that uses an independent directive not tied to the application in anyway but can be called with $scope.$emit() from anywhere. I would like it to load an internal dynamic template based off of the product id received from the $scope.$on() function in the controller. Here is a simplified version of what i have so far ... index.html path/to/template.html X Add Product Cancel JS File angular.module('client.quote-app', []) .controller('quoteCtrl', ['$scope', function($scope) { $scope.ifActive = false; $scope.productID = '0000'; $scope.$on('requestQuote', function(event, productID) { $scope.ifActive = true; $scope.productID = productID; //this is coming through okay }); }]) //this loads fine .directive('quoteApplication', function() { return { controller : 'quoteCtrl', templateUrl : 'path/to/template.html' } }) //not sure what to do here ... .directive('product', function() { return { //<!-- I want this to load a template based off of the productID every time $scope.on() gets called --!> templateUrl : 'path/to' + productID + '.html' } })
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/40614183
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25941757
has text: I do not know, I only know the basics of the html5 audio/video stuff. You can always inspect `this` and `HTMLMediaElement` and see what other properties they have.
type: AnswerComment

http://stackoverflow.com/comment/76491024
type: AnswerComment
type: Comment
has text: I believe so, but note you may have problems using $watch when dealing with a ng-model appended to a input with attributes, max, min, step, maxlength. Once you do not follow these attributes (e.g. Input: 20 when the is max="10") the ng-model ends up undefined, and the $watch will stop being triggered, but that's just my experience.
comment on: http://stackoverflow.com/a/37598450
score: 0

http://stackoverflow.com/q/25933863
has answer: http://stackoverflow.com/a/25940742
has body: in a node.js app, let's say i have a app.js like this var express = require('express') var app = express(); var server = http.createServer(app); ... module.exports = { app:app, server:server } also, there is /lib/sockets.js, where all the logic of socket.io should go in. It looks like this: var server = require('../app.js').server; var io = require("socket.io").listen(server); io.sockets.on('connection', function(socket) { socket.on('event', function(msg) { socket.emit('news', msg}); }); }); module.exports = io; Is it good practice to require the server from app.js here? If not, what would be a better solution? thx
tagged with: socket.io
type: Question
has title: architecture for modular socket.io in node.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25940742
answer count: 1
downvote count: 0
favorite count: 0
tagged with: npm
upvote count: 2
tagged with: module
tagged with: node.js
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25910415
has body: We've a .NET 2.0 website that uses Javascript to do a lot of things, such as populating drop down lists and validating pages. users have reported some problems when they use the website with Chrome, Firefox or IE 10 or later. The problem or problems i should say are different some drop down list don't get populated, just empty lists. Labels are not shown, so you see a text box with no labels! anyone had same issue before? Thanks
type: UnansweredQuestion
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/40556268
tagged with: internet-explorer
tagged with: .net
has title: .NET 2.0 compatibility issue with Chrome and IE 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/40556012
score: 0
tagged with: asp.net-2.0
tagged with: .net-2.0

http://stackoverflow.com/comment/40530235
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25896064
has text: Correct, if the developer is using jQuery

http://stackoverflow.com/a/26001583
has body: As Rob. M. pointed out the real problem with your code was the fact you were running the code when it was in the object instead of assigning a reference. And when you tried to assigning the onclick, that had issues too since you are trying to use a function reference when it was a string. To get your code to run, it would be something like function sampleFunc () { alert("clicked"); } var extElementConfig={onClickDo:"sampleFunc()"}; $('#myDiv').append(" Do "); To get rid of this, do not use the sting method to build up the element, instead leverage the power of jQuery. Below is an example where I build a div and pass in some arguments to change the element's text and css when clicked. function sampleFunc(txt, css) { $(this).text(txt).css(css); } var extElementConfig = { onClickDo: sampleFunc, onClickArgs : ["Clicked", {"background-color":"green"}] }; $(' ', { id: 'myDiv2', text: 'Do!' } ).on("click", function() { extElementConfig.onClickDo.apply(this, extElementConfig.onClickArgs); } ).appendTo("#myDiv");
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26001074

http://stackoverflow.com/a/25993249
answers question: http://stackoverflow.com/q/25993057
has body: You could just post the source of the page back to a server-side script. In jQuery you could have a function such as: function postGeneratedSource() { var data = $('body')[0].outerHTML; $.post('/path/to/script', data); } If you didn't want the JS then you could either change body for a relevant container or otherwise strip the script tags on the server side.
score: 0
type: Answer

http://stackoverflow.com/comment/40737216
type: AnswerComment
has text: I have come across but I got more clarity from the [above answer](http://stackoverflow.com/questions/5491605/javascript-empty-array-seems-to-be-true-and-false-at-the-same-time) I mentioned on SO. How I approached it earlier was to check if the array was instanceOf array and then try to check its length == 0. :)
comment on: http://stackoverflow.com/a/26010213
type: Comment
score: 0

http://stackoverflow.com/a/25988718
has body: This are just different ways of binding events. You also need to consider that .on was is not supported in older version of jquery.
score: 0
answers question: http://stackoverflow.com/q/25988656
type: Answer

http://stackoverflow.com/a/25982897
accepted answer of: http://stackoverflow.com/q/25982829
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25982829
has body: Check your use of "sub_array". Once you call it as a function, then you try to push an object to it.
type: AcceptedAnswer

http://stackoverflow.com/q/25978890
tagged with: mysql
tagged with: javascript
type: UnansweredQuestion
has title: jQuery display element that contains certain class strings
has comment: http://stackoverflow.com/comment/40679650
has answer: http://stackoverflow.com/a/25979166
tagged with: jquery
type: Question
has body: Hey guys I am currently developing a site that lists vehicle data using PDO and a MySQL database. Here is an example of what I currently have: http://www.drivencarsales.co.uk/ So basically each row in the MySQL table contains all of the data for each vehicle and I am printing them into a list using the following code: <?php include('db-affinity/filter.php'); ?> <?php while($row = $results->fetch(PDO::FETCH_ASSOC)) { echo ' '.$row["Make"].' '.$row["Model"].' '.$row["Variant"].' £'.number_format($row['Price']).' '.$row["FuelType"].' '.$row["Bodytype"].' '.$row["Transmission"].' '.$row["Colour"].' Mileage: '.number_format($row["Mileage"]).' Engine size: '.$row["EngineSize"].'cc History checked More details Test drive 5 More photos '; } ?> As you can see I am using a while loop to display every row I have also added the 'Make' of the vehicle to the listing container class, there is also a bit of jQuery however I will explain what that is used for shortly. I then have this form: Car finder Make Make (Any) <?php while($make = $filterres->fetch(PDO::FETCH_ASSOC)) { echo ' '.$make["Make"].' '; } ?> Model (Any) Two Three Four Five Body type 4x4 Convertible Coupe Transmission Automatic Manual Semi automatic Search cars Try our Smart Search You only need to take notice to the start of the form, as you can see the 'Make's' of the vehicles are displayed in the select element options using a while loop. Now back to the jQuery: I have tried adding this jQuery to show the classes that display the same 'Make' selected in the options of the select element and hide the classes that do not contain that class in the listing-container div. For some reason when the option is selected the jQuery isn't displaying the classes that have the same 'Make' as the option selected. Any idea where I am going wrong? BTW I know I should be using AJAX for this however I wouldn't know where to start.
tagged with: php
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25979816

http://stackoverflow.com/q/25993837
has comment: http://stackoverflow.com/comment/40709309
tagged with: java
has title: KnockoutJS read viewmodel from local file?
tagged with: knockout.js
type: Question
has body: I'm writing a client-server framework in Java, and I want the server to display some metrics on a HTML page. To do this, I would love to be able to use KnockoutJS (very little experience) so that the server can update the metrics values and the HTML page can reflect the changes instantly and without needing to refresh the page. Is it possible to have a local viewmodel (that is updated by the Java program) read by Knockout? Or is there a better solution for the problem?
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25994392
type: UnansweredQuestion

http://stackoverflow.com/comment/40513142
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25886389
has text: Consider using the parameters directly instead of creating variables as they are used only once.
score: 0

http://stackoverflow.com/comment/40564302
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25914666
has text: I did not meant to say that you should not use inline. However it is better to use class whenever possible as it makes sense in most cases. But yes you're right.
score: 0

http://stackoverflow.com/comment/40528187
has text: Yes indeed it should be `(0?1-9]|[12]\d|3[01])`. Thanks for pointing it out, I edited it now.
comment on: http://stackoverflow.com/a/25894369
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25930039
tagged with: parsley.js
tagged with: javascript
has answer: http://stackoverflow.com/a/41590772
tagged with: jquery
has answer: http://stackoverflow.com/a/25970881
upvote count: 3
answer count: 2
tagged with: validation
linked to: http://stackoverflow.com/q/20476515
has body: I'm using parsley js in two forms in a single page. i want to trigger parsley validator when i click on a type='button' field and validate the first form to check only 3 fields of the form. Initially there are around 7 fields in the form included for validation. So far I couldn't make it work. tried this but no luck. any idea? update: this is my code; &lt;div class = 'two'&gt; &lt;input type='text' id='firstname' name='firstname' /&gt; &lt;/div&gt; $('#form').parsley({ excluded: '.two input' }); $('#form').parsley('validate'); i just tried to exclude one field and test if the form is validating as i want it to be. But still it validates input field inside css class 'two'. that's all i have done so far. no clue..
favorite count: 0
type: UnansweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40609893
downvote count: 0
has title: How to validate only selected fields using parsley js
type: Question

http://stackoverflow.com/comment/40631472
has text: The same as above with "fonts" repleaced by "assets", i.e. http://example.com/assets/glyphicons-halflings-regular.woff
comment on: http://stackoverflow.com/q/25948913
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40725864
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25941378
type: QuestionComment
has text: I'm pretty sure a child process is the answer. Check out how grunt watch works: https://github.com/gruntjs/grunt-contrib-watch/blob/master/tasks/lib/taskrun.js Each time the task is run from the watcher, they spawn a new child process with grunt.util.spawn, setting grunt:true to run the grunt bin (instead of using some command) and pass it args. I think this is a good pattern for you to use, instead of grunt.cli

http://stackoverflow.com/comment/40510966
comment on: http://stackoverflow.com/a/25885272
type: AnswerComment
score: 0
type: Comment
has text: But the page does not get the hash, because actually i am not using button to start the scrolling, I use this function to start animating the viewport (autoscroll) up and down between anchors.

http://stackoverflow.com/q/25992378
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25993119
tagged with: arrays
has answer: http://stackoverflow.com/a/25993119
tagged with: javascript
answer count: 2
tagged with: functional-programming
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25992779
tagged with: lodash
has title: Functionally create an array of positions (with Underscore/Lowdash)
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25992779
has body: There is a grid of cells. The integer dimensions are stored in an array. How could this array of dimensions be reduced (or otherwise transformed) into an array containing an arrays of all possible cell positions? For example, given a size of the grid is in an array ([2,2]) how could the list of positions ([[0,0],[0,1],[1,0],[1,1]]) be produced without a for loop? (Possibly with lodash or underscore?) I am sure this is possible. I had go when before realising I was procrastinating and the following for loop would work: var size = [ 2, 3 ]; var positions = []; for ( var x = 0; x &lt; size[0]; ++x ) { for ( var y = 0; y &lt; size[1]; ++y ) { positions.push( [ x, y ] ); } }
tagged with: underscore.js
score: 1

http://stackoverflow.com/comment/40760634
comment on: http://stackoverflow.com/a/25988199
has text: i ended up doing something similar to this. unfortunate that it cant be done in css, but this is the next best thing.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27626331
type: Answer
answers question: http://stackoverflow.com/q/25955716
score: 0
has body: You can list the google analytics.js URL in your paths in require.js config: require.config({ paths: { ga: '//www.google-analytics.com/analytics' } }); Then inside of an analytics function where you need to access google analytics just call it directly, and have an error function that assigns window.ga to a function that always returns undefined: require(['ga'], function(data) { window.ga('create', 'UA-XXXXXXXX-X'); window.ga('send', 'pageview'); }, function() { window.ga = function(){}; });

http://stackoverflow.com/comment/40714485
type: QuestionComment
has text: Why would you want to overwrite `MyObject`?
comment on: http://stackoverflow.com/q/25998325
score: 0
type: Comment

http://stackoverflow.com/a/25973585
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25973470
has body: Try changing the removeClass line to this: $(this).prev().removeClass("spinner"); This will get the current selection, this, which is the img which was loaded, and get it's previous sibling, which is the div you want.
has comment: http://stackoverflow.com/comment/40669277
upvote count: 1

http://stackoverflow.com/comment/40553299
score: 0
comment on: http://stackoverflow.com/q/25906084
type: Comment
type: QuestionComment
has text: can you let me know of any such example

http://stackoverflow.com/a/25969857
score: 2
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40662946
type: Answer
has body: Play with droppables tolerance option. "fit": Draggable overlaps the droppable entirely. "intersect": Draggable overlaps the droppable at least 50% in both directions. "pointer": Mouse pointer overlaps the droppable. "touch": Draggable overlaps the droppable any amount. $(document).ready(function(){ $("#square").draggable(); $("#box").droppable({ drop: handleDropEvent, tolerance:"pointer" }); function handleDropEvent(event, ui){ alert('Hello'); } }); #box { margin: 0 auto; background: #ecf0f1; border-radius: 10px; border-style: dashed; height: 100px; width: 100px; } #square { margin: 0 auto; background: #3498db; border-radius: 10px; height: 100px; width: 100px; } jquery - draggable
accepted answer of: http://stackoverflow.com/q/25969707
has comment: http://stackoverflow.com/comment/40663156
answers question: http://stackoverflow.com/q/25969707

http://stackoverflow.com/comment/40533589
comment on: http://stackoverflow.com/q/25897801
score: 0
type: Comment
type: QuestionComment
has text: Your question is difficult to understand. Could you make a JSFiddle to demonstrate?

http://stackoverflow.com/q/26009462
has answer: http://stackoverflow.com/a/26012386
accepted answer: http://stackoverflow.com/a/26012386
type: AnsweredQuestion
tagged with: collectionview
type: Question
has title: Marionette CollectionView filter not working
answer count: 1
tagged with: javascript
score: 0
tagged with: filter
tagged with: marionette
has body: I see questions about properly filtering a CollectionView. None of the prescriptions are working for me. I must not be getting the concept. If I have a collection of models, and I want to show only those with an attribute "visible" set to "true", I should filter the collection in the CollectionView. I thought this was the right way to do that: var myCollectionView = new MyCollectionView ({ collection: new FilteredCollection(UnfilteredCollection.where({ visible: 'true' })) }); When I add 10 models to UnfilteredCollection, 5 with visible=false and 5 with visible=true, and show myCollectionView in a region, I should see 5 items. I'm getting none. If I drop the filter and just show the UnfilteredCollection, I see all 10 items, so I know I'm wired right other than this filtered stuff. Setting a VS breakpoint I can see the proper values in the collection's models - 5 visible=false and 5 visible=true. What am I missing here?

http://stackoverflow.com/comment/40517826
has text: What do you mean with 'focus'? This is actually something specific to input fields... Or do you mean some kind of highlight?
score: 0
comment on: http://stackoverflow.com/q/25889533
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25975905
answer count: 1
tagged with: jakarta-ee
has answer: http://stackoverflow.com/a/25997529
type: AnsweredQuestion
has body: I have a datefield in extjs 2.2 and the problem is that every time I'm in a month to select a date, select my date prior to this for example are now in September, if I select the 13th, me on the 12th leaves selected and always happens in the month that I am, if I see the days of the past month does not give me error. I do not have stalled this several weeks ago, hopefully they can help me. CODE: var form = new Ext.FormPanel({ items: [{ region: 'center', xtype: 'panel', layout: 'anchor', border: false, layoutConfig: { titleCollapse: false, animate: false, activeOnTop: false }, items: [{ height: 80, frame : false, collapsible: false, border: false, title: false, bodyStyle: 'padding:5px', items: [{ layout: 'column', border: false, items:[{ columnWidth: .1, layout: 'form', labelSeparator: ' ' , labelWidth: 10, labelAlign: 'top', border: false, items: [{ xtype: 'datefield', id: 'date_init', name: 'date_init', fieldLabel: 'Date', readOnly: false, disabled: false, format: 'd/m/Y', value: new Date }] },{ columnWidth: .1, layout: 'form', labelAlign: 'top', labelSeparator: ' ' , labelWidth: 10, border: false, items: [{ xtype: 'datefield', id: 'date_end', name: 'date_end', fieldLabel: 'End', readOnly: false, disabled: false, format: 'd/m/Y', value: new Date }] },{ columnWidth: .17, layout: 'form', labelAlign: 'top', labelSeparator: ' ' , labelWidth: 10, border: false, items: [{ xtype: 'combo', store: storeLocal, valueField: 'idMarket', displayField:'nameMarket', fieldLabel: 'Market', mode: 'local', value:'-- ALL --', triggerAction: 'all', width: 190, selectOnFocus:true, hiddenName: 'idMarket', id : 'id_market_id'//, //allowBlank: false }] },{ columnWidth: .3, layout: 'form', border: false, labelWidth: 70, items:[{ xtype: 'button', text: 'Search', arrowAlign: 'right', icon: '../img/icons/find.png', cls: 'x-btn-text-icon', ctCls: 'x-btn-style', width: 80, handler: function(){ if(formulario.form.isValid()) { groupStore.load(); } } }] }] }] }] }] }); Greetings.
tagged with: jsp
tagged with: javascript
has title: 1 day difference datefield in extjs
tagged with: extjs
accepted answer: http://stackoverflow.com/a/25997529
type: Question
score: 0

http://stackoverflow.com/a/34991468
answers question: http://stackoverflow.com/q/26015010
has body: To reset the validations we have to do two things: clear the fields Add the following: $scope.programCreateFrm.$dirty = false; $scope.programCreateFrm.$pristine = true; $scope.programCreateFrm.$submitted = false; programCreateFrm is the name of the form. For example: &lt;form name="programCreateFrm" ng-submit="programCreateFrm.$valid &amp;&amp; createProgram(programs)" novalidate&gt; This code is working for me.
downvote count: 3
score: -3
type: Answer
upvote count: 0

http://stackoverflow.com/q/25990695
tagged with: javascript
has comment: http://stackoverflow.com/comment/40702082
answer count: 1
tagged with: window
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I Want to submit a form to a popup window (not blank). This works fine but for some reason my parentwindow is opened for a 2nd time. var formelements = document.getElementById("exportform"); formelements.removeAttribute("action"); formelements.setAttribute("target","/path/exportwindow.html"); exportwindow = window.open("/path/exportwindow.html", "myexportwindow", "width=800,height=600,resizable=yes"); formelements.submit(); HTML: &lt;form id="exportform" action="/path/myfunction" method="post"&gt; So what happens is that the popup window opens and in the background my parent window is opened to a new tab. Can anyone tell me why js is behaving like this?
has title: Javascript form submit to popup window with target
type: AnsweredQuestion
tagged with: form-submit
tagged with: popup
linked to: http://stackoverflow.com/q/3951768
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25991061
type: Question
has comment: http://stackoverflow.com/comment/62138329
accepted answer: http://stackoverflow.com/a/25991061

http://stackoverflow.com/q/25904351
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25904482
type: Question
tagged with: mobile
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/2864238
answer count: 1
has answer: http://stackoverflow.com/a/25904482
has title: How to show a long string in selected item when a page loads in mobile browser
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I'm working in a web page for mobile browsers. I have a select list that will show an option selected, the problem is that when the selected option has a long string, by default, is truncated, I'd like to show the full text because these are questions that the user should answer. I've been trying with css incrementing the height of the select element but the text is always truncated, and I can't find on Internet any answer for it I could find only to increment the items length but not the selected option. Thank you in advance for your help. Value 1 Very long string to show by default Value 3

http://stackoverflow.com/a/25913811
has body: Change IBM to IBM Additionally, after the call to blockTheScreen, in the innermost if, add a return false; at the end of it
answers question: http://stackoverflow.com/q/25913291
type: Answer
score: 0

http://stackoverflow.com/a/25931704
upvote count: 3
answers question: http://stackoverflow.com/q/25931655
has comment: http://stackoverflow.com/comment/40600077
has comment: http://stackoverflow.com/comment/40600225
has comment: http://stackoverflow.com/comment/40595482
has comment: http://stackoverflow.com/comment/40600013
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40600496
has body: You're pretty close, you're just forgetting to relate a and b to each other: posts.sort(function (a, b) { var arate = (a.likes.length * 100) / a.views.length, brate = (b.likes.length * 100) / b.views.length; return arate - brate; }); That will be in ascending order. If you want descending, change the return to return brate - arate;
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/40600709
accepted answer of: http://stackoverflow.com/q/25931655

http://stackoverflow.com/q/25935294
score: 0
has body: I'm trying to get an extended access token for one of my apps using the Javascript API (I know I should do this server side, but I'm the only one using this app and I have some reasons for not doing it server side this time) Anyway, when I receive a call back from Facebook, I get an Invalid left-hand side in assignment error. I don't have any weird if's or anything like that and it only happens when I get the response back from Facebook - so it has nothing to do with the code I've written I don't think. Anyway, here's the itty-bitty script I'm running. var token = response.authResponse.accessToken; FB.api( '/oauth/access_token', 'GET', { 'grant_type': 'fb_exchange_token', 'client_id': 'XXX', 'client_secret': 'XXX', 'fb_exchange_token': token }, function(response) { console.log(response); } ); My token variable is set correctly, so that's not the issue. If I remove any of the data sent in the array, I get an expected error response, but with it set up this way I just get that error mentioned above and this response from Facebook. Object {error: Object} error: Objectmessage: "unknown error" type: "http" So I'm kind of stumped on this. What could I be doing wrong?
answer count: 1
tagged with: javascript
tagged with: facebook-graph-api
has answer: http://stackoverflow.com/a/25935696
has comment: http://stackoverflow.com/comment/40601421
tagged with: facebook
has comment: http://stackoverflow.com/comment/40601671
has comment: http://stackoverflow.com/comment/40601630
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25935696
type: Question
has title: "Invalid left-hand side in assignment" when receiving response from Facebook API

http://stackoverflow.com/comment/40676319
has text: That makes more sense! I'll do that now and get back with the results
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25977177

http://stackoverflow.com/a/25971405
has body: You should proceed as follows: From your wordpress page, make a JS ajax request to your service (MVC website) $.get(url, function(aJsonString){ .... }) Retrieve the JSON data and convert it to a JS Object: $.get(url, function(aJsonString){ var obj = jQuery.parseJSON( aJsonString ); }) Manipulate your DOM to show the data contained in your JS Object $.get(url, function(aJsonString){ var obj = jQuery.parseJSON( aJsonString ); $('#result').html(obj.message); }) This can all be done with JQuery or more sophisticated libraries like Angular JS. Samples provided are in JQuery and code has not actually been tested.
answers question: http://stackoverflow.com/q/25969422
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25969422
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/26008756
has body: Make async:true for making the browser listen other events while running the ajax code.
has comment: http://stackoverflow.com/comment/40774787
score: 0
answers question: http://stackoverflow.com/q/26008653
has comment: http://stackoverflow.com/comment/40733804
type: Answer

http://stackoverflow.com/q/25922224
has answer: http://stackoverflow.com/a/25931099
favorite count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40581633
tagged with: typescript
answer count: 3
tagged with: knockout.js
has answer: http://stackoverflow.com/a/25922501
has answer: http://stackoverflow.com/a/43063848
has comment: http://stackoverflow.com/comment/43632981
downvote count: 0
tagged with: javascript
has title: Knockout Computed in TypeScript?
has body: Overview I just want to write a Knockout Computed function in TypeScript as a property of a prototype. I know how to write a function as a property of a prototype when it's not a ko.computed. I know how to write a ko.computed as a property of just the object (but not the prototype), but I can't seem to find the right syntax for the intersection. What I'd like (JS) MyClass.prototype.myFunction = ko.computed(function(){ // js goes here }); What I have (TS) myFunction(): any { ko.computed(function(){ // code }) } What my TS outputs (Not wanted) MyClass.prototype.myFunction = function(){ ko.computed(function(){ // code }) }); Example of expression that TypeScript emits to prototype TS class MyClass { name: KnockoutObservable&lt;string&gt;; editing: KnockoutObservable&lt;boolean&gt;; constructor(name: string) { this.name = ko.observable(fullName); this.editing = ko.observable(false); } edit(): void { this.editing(true); } } JS var MyClass = (function () { function MyClass(name) { this.name = ko.observable(fullName); this.editing = ko.observable(false); } MyClass.prototype.edit = function () { this.editing(true); }; return MyClass; })(); I would find it truly puzzling if there wasn't a way to similarly write a ko.computed the way I described.
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25931099
accepted answer: http://stackoverflow.com/a/25922501

http://stackoverflow.com/comment/56539065
has text: Sorry for late answer. It seems it was really fixed. However, there seems to be a new bug which prevents me to configure `$urlMatcherFactoryProvider` in root module. As a workaround I'm setting it in first child module that's required by the root one.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/32956484

http://stackoverflow.com/a/26021487
has comment: http://stackoverflow.com/comment/40757063
has comment: http://stackoverflow.com/comment/40759950
answers question: http://stackoverflow.com/q/26021430
has comment: http://stackoverflow.com/comment/40756842
downvote count: 0
has body: for (var i=1; i &lt; 5; i++) { var image = document.getElementById('image' + i); }
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40601078
type: Comment
has text: It seems great. :) But still I am unaware how you are doing, and why its taking too long.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25918904

http://stackoverflow.com/comment/40566282
comment on: http://stackoverflow.com/a/25914914
score: 0
type: Comment
has text: So does that mean if an image is loaded once , it is reused from the cache, even though the css points out to source file url?
type: AnswerComment

http://stackoverflow.com/comment/40604881
comment on: http://stackoverflow.com/q/25937067
score: 0
type: Comment
type: QuestionComment
has text: did you forget to include jQuery?

http://stackoverflow.com/comment/40502510
score: 1
comment on: http://stackoverflow.com/q/25876317
type: Comment
has text: Consider switching to [Angular UI Bootstrap](http://angular-ui.github.io/bootstrap/) instead of using Bootstrap's own JS.
type: QuestionComment

http://stackoverflow.com/comment/40665682
has text: If the question is indeed about 'bind-reversing', I don't believe it's possible. See, `Function.prototype.bind` actually creates a new function, that invokes the 'original' one with a set context (one can check `_.bind` source, for example, to study the approach). The point is, the new function is basically a compiled one - that's why its `toSource` shows just `[native code]` or something similar.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25971195

http://stackoverflow.com/q/26017137
has comment: http://stackoverflow.com/comment/40748778
has comment: http://stackoverflow.com/comment/40748688
tagged with: jquery
has comment: http://stackoverflow.com/comment/40750950
has comment: http://stackoverflow.com/comment/40751609
has comment: http://stackoverflow.com/comment/40770304
favorite count: 0
linked to: http://stackoverflow.com/q/9007065
has comment: http://stackoverflow.com/comment/40749264
has comment: http://stackoverflow.com/comment/40748815
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40749209
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40750156
has answer: http://stackoverflow.com/a/43355920
has answer: http://stackoverflow.com/a/26017263
has title: How to replace all null values in javaScript object with 'null' string?
type: Question
has comment: http://stackoverflow.com/comment/40748821
tagged with: underscore.js
tagged with: http://stackoverflow.com/tag/json
has body: Let's say I have this js object: {"a": null, "b": 5, "c": 0, d: "", e: [1,2,null, 3]} This is what I would like to get: {"a": "null", "b": 5, "c": 0, d: "", e: [1,2,"null", 3]} The only idea I have is to use: function nullToString(v) { return JSON.parse(JSON.stringify(v).split(":null").join(":\"null\"")); } But it seems like a quite expensive operation comparing with what I would like to achieve. If there is any helpful method from jQuery or underscore.js that would be great.
tagged with: javascript
upvote count: 2
answer count: 2

http://stackoverflow.com/q/25903992
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25904137
has title: How to export html body table to Excel?
type: UnansweredQuestion
tagged with: excel
type: Question
tagged with: html-table
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I would like to export the whole table except the footer. Is there anyway not to export also the of the table? This is the skeleton structure of my table: Employee ID Branch Code Client ID Amount Report Timestamp <?php if(count($result)==0) { echo " No data available "; } else { for($i=0; $i<count($result); $i++){?> 1 2 3 4 5 <?php } } ?> And this is the script I used in exporting the table to excel: EDIT Okay I have tried the said script and this is the result: Any idea why is it like this? I needed the grid lines. Also I needed the footer to be deleted. I have tried the 2nd answer by unix and I failed. This is the code:
has answer: http://stackoverflow.com/a/26407706

http://stackoverflow.com/a/25974619
answers question: http://stackoverflow.com/q/25974572
score: 1
accepted answer of: http://stackoverflow.com/q/25974572
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: value property in DOM returns String value, not Int. So you need to convert them to integers: var a = parseInt( firstNum.value, 10 ); var b = parseInt( lastNum.value, 10 ); var c = parseInt( countBy.value, 10 ); //finish getting values
upvote count: 1

http://stackoverflow.com/comment/40538539
type: AnswerComment
has text: The "for of" is exactly what I was looking for (pun intended) - thank you. I would lump the "while loop" option in with the "for loop" option I mentioned as very C++/Java/C# like - sure it works but there's an awful lot going on on that line and its not super readable...
type: Comment
comment on: http://stackoverflow.com/a/25900475
score: 1

http://stackoverflow.com/q/25896957
tagged with: javascript
downvote count: 0
has body: I am trying to use ui-sortable to sort a list and then save the new list order to firebase using angularfire so that when I refresh it maintains the proper order. Can that be achieved? Here's the relevant code: //html //controller $scope.sortableOptions = { axis: 'y', stop: function( event, ui ) { //save the new sort order } };
tagged with: angularfire
favorite count: 0
has comment: http://stackoverflow.com/comment/40538283
tagged with: angularjs
type: UnansweredQuestion
tagged with: firebase
has answer: http://stackoverflow.com/a/29087328
has comment: http://stackoverflow.com/comment/42872603
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40537392
has title: Using angular ui-sortable and angularfire is there a way to save the new order to the database when sorting?
has comment: http://stackoverflow.com/comment/42870197
type: Question
has comment: http://stackoverflow.com/comment/40539408
answer count: 2
has answer: http://stackoverflow.com/a/36519644

http://stackoverflow.com/q/25899402
has comment: http://stackoverflow.com/comment/40562349
tagged with: google-visualization
tagged with: javascript
tagged with: sorting
has title: Javascript google visualization api table undo sort
score: 0
answer count: 1
has body: I have a google visualization Table https://developers.google.com/chart/interactive/docs/gallery/table When a user clicks on the column headers it sorts based on that column. Is there a way to undo that sort and revert to the original order of the data? To be clear, I want to be able to sort, but I also want to be able to click somewhere and get the original order back. Is this possible?
has answer: http://stackoverflow.com/a/25944093
has comment: http://stackoverflow.com/comment/40610610
has comment: http://stackoverflow.com/comment/40609639
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/27672919
type: Answer
accepted answer of: http://stackoverflow.com/q/26033597
has comment: http://stackoverflow.com/comment/56923757
upvote count: 1
has body: $("#chartdiv").mousemove(function () { var categoryIndex = chart.categoryAxis.xToIndex(event.x)); }); see details here: https://hgminerva.wordpress.com/2014/12/28/how-to-get-the-x-axis-value-of-your-amchart-using-jquery-mousemove-event/
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26033597

http://stackoverflow.com/a/25909844
has comment: http://stackoverflow.com/comment/40555211
has comment: http://stackoverflow.com/comment/40555316
upvote count: 3
has comment: http://stackoverflow.com/comment/40566605
type: AcceptedAnswer
has body: You needed to wrap this in a jQuery object in the click handler. It was failing on the call to attr: $(".Nytt-over a").click(function() { var newLoc = $(this).attr('id'); window.location.hash = newLoc; location.reload(); }); Or use var newLoc = this.id; as Joe suggests :) When in doubt, use the F12 debugger consoles provide by Chrome, IE etc.
type: Answer
accepted answer of: http://stackoverflow.com/q/25909760
has comment: http://stackoverflow.com/comment/40554982
answers question: http://stackoverflow.com/q/25909760
downvote count: 0
has comment: http://stackoverflow.com/comment/40555422
score: 3
has comment: http://stackoverflow.com/comment/40555117

http://stackoverflow.com/comment/40714853
comment on: http://stackoverflow.com/q/25941378
score: 0
type: QuestionComment
has text: @Sergio Deleting means no-one else can read and have the information.
type: Comment

http://stackoverflow.com/a/26022844
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40761482
score: 2
has comment: http://stackoverflow.com/comment/40759963
has comment: http://stackoverflow.com/comment/40759419
accepted answer of: http://stackoverflow.com/q/26022531
answers question: http://stackoverflow.com/q/26022531
has body: With your example, all you need to do is call foo() which will set the global variable data. After that point, you can access it simply with data: function foo() { data = { one : '1', two : '2' } } // At this point here, data does not exist since foo() has not been run foo(); // Will run foo() and set the global variable data window.alert(data.one); With that said, I advise you to rework your code. It's strongly inadvisable to pollute the global scope with random variables. Instead, you should declare the variable data within a scope common to where you want to use it. If, indeed, data must be accessible from anywhere, you should probably create a namespace for it. This could be an example of an XY problem. If you explain exactly what you're trying to accomplish, we can probably come up with a better solution.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40759752

http://stackoverflow.com/a/26223726
has body: The problem is unslick keeps firing on resize even after it has been unslicked, which in turn, breaks it. A work around that my coworker came up with goes like this check.. var target = $('.slick-mobile-gallery'); if(target.hasClass('slick-initialized')) target.unslick(); Update: The solution is built-in feature in slick plugin &amp; @James Daly's answer is the true answer to this question.
score: 3
downvote count: 1
answers question: http://stackoverflow.com/q/26004201
upvote count: 4
accepted answer of: http://stackoverflow.com/q/26004201
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/64556254
type: Answer

http://stackoverflow.com/comment/40757580
comment on: http://stackoverflow.com/q/26021248
has text: op has no idea what he is doing :) I read through the documentation from angular, its good. But still, left me with no idea!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25935594
upvote count: 6
has comment: http://stackoverflow.com/comment/40602037
score: 6
answers question: http://stackoverflow.com/q/25935537
downvote count: 0
has comment: http://stackoverflow.com/comment/40602290
has comment: http://stackoverflow.com/comment/40601958
has comment: http://stackoverflow.com/comment/40602042
has comment: http://stackoverflow.com/comment/40602126
has body: Your setTimeout is called on page load. You need to put it inside the reload() function: function reload() { setTimeout(function() { window.location.reload(); }, 1000); } To make the timer run every x seconds and reload only a part of the page you would need to use setInterval and an AJAX request, something like this: var timer; function reload() { timer = setInterval(function() { $.post('foo.html', function(data) { $('#bar').html(data); }); }, 1000); } function clear() { clearInterval(timer); }
type: Answer
has comment: http://stackoverflow.com/comment/40601915
has comment: http://stackoverflow.com/comment/40601982

http://stackoverflow.com/comment/40690534
type: Comment
score: 1
has text: @hitesh Because the element with id `illusList_heading` is not a parent of the second row; it's a parent of the first row. Try `.closest('#illustartionWrapId')` instead.
type: QuestionComment
comment on: http://stackoverflow.com/q/25978308

http://stackoverflow.com/q/25982317
upvote count: 1
has comment: http://stackoverflow.com/comment/40685802
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
score: 0
has title: JavaScript mobile device detection
has comment: http://stackoverflow.com/comment/40685793
has comment: http://stackoverflow.com/comment/40685866
has body: I was using the following JavaScript codes to detect either the user devices are phones or tablets (I also have to detect either the device is in portrait mode or in the landscape mode): function getDeviceType() { if(window.innerWidth&gt;=320 &amp;&amp; window.innerHeight &lt;=650) { return true; } else { return false; } } It was working fine until we got a new Nexus 7 device and now it is not working. I am preventing to sniff the User-Agent for this for now and just want to do with the device resolutions. How can I detect if the user is using a "smart phone" (should also detect whether phone is in landscape or in portrait mode) and same for the tablets as well. Please advice.
has answer: http://stackoverflow.com/a/25998949
accepted answer: http://stackoverflow.com/a/25998949
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40685913
type: Question

http://stackoverflow.com/comment/40497584
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25875403
has text: sounds to be a good idea. I tried the suggestion of rakhi4110 and it works :)

http://stackoverflow.com/comment/40684596
comment on: http://stackoverflow.com/a/25980939
type: Comment
has text: I need 15 reputation to upvote apparently but I green marked it :P I actually can't figure out. I tried replacing add with multiply and etc and putting x+y but the javascript wasn't alerting the result? function calculate() { var x = parseInt(document.getElementById("first").value); var y = parseInt(document.getElementById("second").value); var z = parseInt(document.getElementById("decision").value); if (z=="add") result = x+y; else if(z=="subtract") result = x-y; alert(result)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40737285
type: Comment
type: QuestionComment
has text: Obviously, looping over all this would get you what you want. But that's not very efficient. I think you need a different structure so you can access `root` directly, and the subfolders on the same level but with reference to their 'parent'.
comment on: http://stackoverflow.com/q/26010599
score: 0

http://stackoverflow.com/q/25991329
tagged with: twitter-bootstrap-3
downvote count: 0
has title: Bootstrap 3 - after Navbar dropdown click darken background
type: Question
has answer: http://stackoverflow.com/a/25991500
accepted answer: http://stackoverflow.com/a/25991500
answer count: 1
tagged with: javascript
upvote count: 3
has body: I'd like to implement background overlay that darkens the background when the Bootstrap Navbar menu item is in drop down state. You might have seen this effect on Amazon's new theme. When a user clicks on Departments menu item and the dropdown menu item is displayed the background goes dark. I did search the web and stackoverflow but didn't find any solution. Maybe you have a solution. So far I have CSS only implemented - overlay effect. Now I'd like to bind it with the dropdown state action. Note: When the user clicks anywhere else on the screen the dropdown closes, and the overlay should go to display:none too. &lt;style&gt; #overlay{ position:absolute; top:0px; left:0px; bottom:0px; right:0px; background-color:rgba(0,0,0,0.7); /* -webkit-filter: blur(10px) grayscale(50%); */ } &lt;/style&gt; After help from @sooks I was able to determine the opened and closed states of Bootstrap menu. Here's how it looks. $('.dropdown').on('show.bs.dropdown', function () { alert('Hi'); }) $('.dropdown').on('hide.bs.dropdown', function () { alert('Bye'); })
favorite count: 0
tagged with: twitter-bootstrap
tagged with: css
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/26020249
has comment: http://stackoverflow.com/comment/40755779
has title: jQuery ajax - SyntaxError: JSON.parse with fine json
has body: i have problem. I get a error with the return from php to my ajax call. SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data in php i do this echo json_encode(array("message1" =&gt; "Hi","message2" =&gt; "Something else")); my ajax call $.ajax({ type: "POST", url: "s_save.php", data: data, cache: false, dataType: "json", beforeSend: function() { console.log("beforesend: "+data); }, success: function(){ console.log("form search in db: "+data); sendMail(mailName,mailAdress, customertype ); }, error: function (xhr, ajaxOptions, thrownError) { console.log(xhr.status); console.log(thrownError); console.log(ajaxOptions) } }); } Now if i look in my firebug i see the answer, what looks good to me. {"message1":"Hi","message2":"Something else"} The Error Section but say this. 200 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data parsererror i dont get it. the json return looks fine to me. why do i get the error ? EDIT: After the first answer i made some changes in the php file, but didnt help header('Content-Type: application/json'); $output = array("data" =&gt; "Hi","message2" =&gt; "Something else"); $output = str_replace(' ', '', $output); echo json_encode($output); Edit 2 That was the fix to the problem. thanky everbody for your HELP! Save the file as UTF-8 without BOM. – Álvaro G. Vicario 12 mins ago
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40755317
tagged with: php
has comment: http://stackoverflow.com/comment/40755029
has comment: http://stackoverflow.com/comment/40755791
has comment: http://stackoverflow.com/comment/40755959
has comment: http://stackoverflow.com/comment/40754545
has comment: http://stackoverflow.com/comment/40755833
has answer: http://stackoverflow.com/a/31087626
has comment: http://stackoverflow.com/comment/40755224
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/40755076
has comment: http://stackoverflow.com/comment/40755053
has comment: http://stackoverflow.com/comment/40755639
answer count: 1
has comment: http://stackoverflow.com/comment/40754546
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40756295
has comment: http://stackoverflow.com/comment/40755891
has comment: http://stackoverflow.com/comment/40755238
has comment: http://stackoverflow.com/comment/40755386
tagged with: ajax
has comment: http://stackoverflow.com/comment/40755038
score: 0
has comment: http://stackoverflow.com/comment/40754629
has comment: http://stackoverflow.com/comment/40754604

http://stackoverflow.com/comment/40658761
has text: They are not the same domain.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25948415

http://stackoverflow.com/comment/40777072
has text: im using HTML and accessing its file in client side but I have to convert this file into bytes and receive on the server to be saved in db as bianry. I have used HTML5 filereader API. but I have to make it supportable to all browsers i.e non HTML5 ones....
type: QuestionComment
comment on: http://stackoverflow.com/q/26032077
score: 0
type: Comment

http://stackoverflow.com/comment/40610361
type: QuestionComment
comment on: http://stackoverflow.com/q/25933003
has text: @CorySilva I tried it but it doesn't work.
score: 0
type: Comment

ipad
tags question: http://stackoverflow.com/q/25991623
tag name: ipad
tags question: http://stackoverflow.com/q/25916993
tags question: http://stackoverflow.com/q/25883586
type: Tag

http://stackoverflow.com/comment/40754663
score: 0
type: Comment
has text: @HenrikPetterson what if you import the js file?
comment on: http://stackoverflow.com/a/26020111
type: AnswerComment

http://stackoverflow.com/a/25903838
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25903779
has body: may be like var test = $("pre").text(); var k = test.split("<").join(1).split(">").join(2); alert(k); < This is a test < which must > replace > reference : How to replace all occurrences of a string in JavaScript?

http://stackoverflow.com/q/25969234
type: Question
answer count: 2
has body: I'm try to render the template dynamiclly, How to run the directive after {{tag}} has been rendered finished ? directive: angular.module('services', []) .directive('demo', function() { return { templateUrl: '/template.html', restrict: 'C' } }); controller: angular.module('controller', []) .controller('DemoCtrl', ['$scope', function($scope) { $scope.tag = "demo"; $scope.clickHandler = function() { // do something when click button } }]); view: Button
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25970934
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40662874
upvote count: 1
has title: How to run a directive after the dom finished rendering in Angularjs
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/40260719
tagged with: angularjs-controller
score: 1

http://stackoverflow.com/comment/40555706
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25910161
has text: OP: "I want to get the array where givenDate is in the *range*. I want the beginning array. In this case the 3rd array:`['2','name2','surname2','2014-03-03']`"

http://stackoverflow.com/comment/51159301
score: 0
comment on: http://stackoverflow.com/q/25942955
type: Comment
type: QuestionComment
has text: I've got the same issue. Did you manage to solve it?

http://stackoverflow.com/q/25983256
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has title: Insert SVG element before another SVG element with class
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
upvote count: 2
has body: I am plotting a graph using D3.js library. I need to insert a svg element before svg element with class "abc". This is what i tried to do: gParent[0][0].insertBefore("g", $('.abc')) .attr({ class: "axis-down", transform: "translate(120, 120)" }) But, it doesn't work and gives an error. This works fine but it appends g after abc and not before gParent.append("g") .attr({ class: "axis-down", transform: "translate(120, 120)" }) gParent is the parent node. Any ideas what i am doing wrong?
tagged with: d3.js
downvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25983343
accepted answer: http://stackoverflow.com/a/25983343
type: Question
answer count: 1

http://stackoverflow.com/a/26023228
has comment: http://stackoverflow.com/comment/40761961
has comment: http://stackoverflow.com/comment/40761374
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26020755
has body: If you want to put HTML/CSS in tooltips you must use a library like tooltipster, jQuery UI, Kendo UI, or a plethora of other options. Here's an example using tooltipster: $(document).ready(function() { $('.myTable').tooltipster({ content: $(' Blue Red Olive ') }); }); .myTable { height:20px; width:200px; background-color: #CCC; text-align:center; } .tip { height:50px; width:50px; float:left; text-align:center; } .blue { background-color: #00F; } .red { background-color: #F00; } .olive { background-color: #808000; } Hover Over Me
upvote count: 2
accepted answer of: http://stackoverflow.com/q/26020755
type: AcceptedAnswer

http://stackoverflow.com/a/25963643
has comment: http://stackoverflow.com/comment/40652870
downvote count: 1
answers question: http://stackoverflow.com/q/25963591
accepted answer of: http://stackoverflow.com/q/25963591
type: AcceptedAnswer
has body: Please see more https://docs.angularjs.org/guide/databinding var app= angular.module("app",[]).controller('fCtrl', function($scope){ $scope.elementName = "testName"; $scope.myElement = { value:"some value", name:"myInput" } }) name only
score: 5
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/40654268
has comment: http://stackoverflow.com/comment/40652847

http://stackoverflow.com/a/25886172
has comment: http://stackoverflow.com/comment/71920842
has comment: http://stackoverflow.com/comment/40533485
type: Answer
has comment: http://stackoverflow.com/comment/40535352
has comment: http://stackoverflow.com/comment/40534857
upvote count: 19
has body: You're experiencing layout thrashing. Changing an element's top property invalidates the current layout. Usually this prompts the browser to re-compute the layout asynchronously (i.e. not immediately). However, calling scrollTop forces the browser to re-layout synchronously. Because you call it in a scroll event handler, this happens repeatedly in a very short space of time. This sequence of DOM write-reads is a known cause of jank. To improve performance you need to prevent layout thrashing. Changing the CSS transform (and opacity) properties does not invalidate the browser's layout - they only require a composite, which is much faster. If you animate a transform: translateY instead of top the browser won't need to compute costly calculations on every animation frame: divUp.css({ 'transform': 'translateY( ' + (-(st/6)) + 'px)', 'opacity': 1 - st/400 }); You can help the browser optimise for the transition by setting the CSS will-change property: .your-div { will-change: transform; } Further reading: Jank free - Articles on improving web app performance CSS Triggers - Lists the steps that browsers need to take when each CSS property is changed
has comment: http://stackoverflow.com/comment/40535003
accepted answer of: http://stackoverflow.com/q/25885500
answers question: http://stackoverflow.com/q/25885500
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40534636
score: 19
has comment: http://stackoverflow.com/comment/40530124
has comment: http://stackoverflow.com/comment/71921197

http://stackoverflow.com/comment/40770087
comment on: http://stackoverflow.com/a/26028054
score: 0
type: Comment
type: AnswerComment
has text: nevermind!! I just wrapped my previous code in the section code you used! thanks so much!!

http://stackoverflow.com/a/25935852
downvote count: 1
has comment: http://stackoverflow.com/comment/40607480
score: 91
has comment: http://stackoverflow.com/comment/40609920
upvote count: 92
accepted answer of: http://stackoverflow.com/q/25929338
has comment: http://stackoverflow.com/comment/40603628
answers question: http://stackoverflow.com/q/25929338
has comment: http://stackoverflow.com/comment/40612195
type: AcceptedAnswer
has body: YES, you can :-) The answer is: Content Security Policy (CSP). Most modern browsers support this flag, which tells the browser only to load JavaScript code from a trusted external file and disallow all internal JavaScript code! The only downside is, you can not use any inline JavaScript in your whole page (not only for a single &lt;div&gt;). Although there could be a workaround by dynamically including the div from an external file with a different security policy, but I'm not sure about that. But if you can change your site to load all JavaScript from external JavaScript files then you can disable inline JavaScript altogether with this header! Here is a nice tutorial with example: HTML5Rocks Tutorial If you can configure the server to send this HTTP-Header flag the world will be a better place!
has comment: http://stackoverflow.com/comment/40722534
has comment: http://stackoverflow.com/comment/40610320
type: Answer
has comment: http://stackoverflow.com/comment/40611998
has comment: http://stackoverflow.com/comment/40609765

http://stackoverflow.com/comment/40668095
type: Comment
has text: so my messages should be written in the data variable?
comment on: http://stackoverflow.com/a/25972949
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40576283
comment on: http://stackoverflow.com/a/25917492
has text: Thankyou for the reply, tried this but still can't get it to work... you say give it an ID, give what an ID?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25875909
accepted answer: http://stackoverflow.com/a/25875998
tagged with: regex
favorite count: 0
has comment: http://stackoverflow.com/comment/40493641
has comment: http://stackoverflow.com/comment/40493878
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40494574
has body: I need to ignore a '.' at the start of my regular expression, and have been somewhat stumped. My current regex is: (?::)(\d{3}) Which matches the following: When I try to ignore the '.' with the following regex: [^.](?::)(\d{3}) I get this: As it seems to be adding the extra character like '&lt;', which is unwanted. How do I go about to ignore that extra character in front of the ':' ?
has comment: http://stackoverflow.com/comment/40495627
has comment: http://stackoverflow.com/comment/40493926
has comment: http://stackoverflow.com/comment/40493873
has answer: http://stackoverflow.com/a/25875998
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25875965
downvote count: 0
tagged with: javascript
score: 4
has title: Javascript Regex to ignore first character in match
possible better answer: http://stackoverflow.com/a/25875965

http://stackoverflow.com/comment/40512023
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25885705
has text: no error.. it like not get the controller of findUserPlanByCurrency..because println "================ "+params is not appear in my console

http://stackoverflow.com/comment/40656480
has text: you want to stay away from `alert` and use `console.log` and friends (`.info`, `.warn` and `.error`) instead. This writes the debug message to the browser console, without locking up the page, or even the browser.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25966191
score: 0

http://stackoverflow.com/q/26009243
has answer: http://stackoverflow.com/a/33047661
type: Question
tagged with: javascript
tagged with: console
upvote count: 1
tagged with: ember.js
answer count: 1
tagged with: action
has body: App = Ember.Application.create(); posts = [{ title: "Rails is omakase", body: "There are lots of à la carte software environments in this world." }, { title: "Broken Promises", body: "James Coglan wrote a lengthy article about Promises in node.js." }]; App.IndexRoute = Ember.Route.extend({ model: function() { return posts; } }); App.PostSummaryComponent = Ember.Component.extend({ actions: { toggleBody: function() { this.toggleProperty('isShowingBody'); } } }); What do I suppose to do if I want to call toggleBody function from my browser console. The above code is presented in ember.js document, http://emberjs.com/guides/components/handling-user-interaction-with-actions/
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
has title: ember trigger action from console

http://stackoverflow.com/q/25927452
tagged with: tumblr
tagged with: twitter
tagged with: toggle
type: Question
has comment: http://stackoverflow.com/comment/40591229
tagged with: javascript
score: -1
answer count: 1
has comment: http://stackoverflow.com/comment/40687387
has body: I'd like to add a twitter-list widget to one sub-page only. On the one hand, the sub-pages HTML editor doesn't run JS, so entering the widget code there won't work. On the other hand, I don't know how to enter the code in the theme HTML, but only show it on one page. Should I give up and just use a redirect page? Thanks.
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25990865
has comment: http://stackoverflow.com/comment/40701330
upvote count: 1
has comment: http://stackoverflow.com/comment/40700968
has comment: http://stackoverflow.com/comment/40700309
tagged with: widget
downvote count: 2
has title: How to run a JS widget on a tumblr sub-page
has comment: http://stackoverflow.com/comment/40687107
has comment: http://stackoverflow.com/comment/40591610

http://stackoverflow.com/a/33437087
answers question: http://stackoverflow.com/q/26022848
has body: Probably you didn't give the include path and library path while compiling. You should compile in this way: sudo g++ -std=c++11 -I/home/pi/mozjs-24.2.0/js/src/build_OPT.OBJ/dist/include -L/home/pi/mozjs-24.2.0/js/src/build_OPT.OBJ/dist/lib/ HelloWorld.cpp -o Helloworld -lmozjs-24 -lz -lpthread -ldl where HelloWorld is the name of your file.
score: 0
type: Answer

http://stackoverflow.com/comment/40514262
score: 0
has text: Requirement are not clear to me. Its not a well written code, binding change event inside another change event. Just think how many times you will bind same handler. Use either off()/one() methods or move binding outside and trigger its change event like Terry explained.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25886485

http://stackoverflow.com/comment/70756306
type: AnswerComment
has text: @Silver Bullet thank you, I revised my answer to provide more info to `for` and clarify the difference.
type: Comment
comment on: http://stackoverflow.com/a/25996033
score: 0

http://stackoverflow.com/comment/40811319
has text: I'd really like to use the writing to a file method. I don't have access to a db as my webserver is kind of limited in scope and I'm looking to run this webpage mainly through clientside
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26024060

http://stackoverflow.com/q/25952726
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40631309
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25952799
answer count: 1
downvote count: 6
has comment: http://stackoverflow.com/comment/40631511
has comment: http://stackoverflow.com/comment/40631186
accepted answer: http://stackoverflow.com/a/25952799
has title: Why aren't both of my scripts in html working?
score: -6
has comment: http://stackoverflow.com/comment/40631173
upvote count: 0
has comment: http://stackoverflow.com/comment/40631146
has body: Only The function validateForm script is working in my html coding. The menu script doesn't seem to work. Can someone please try and identify this problem with my coding? I can't link the Java externally because the web host that I want to publish it on won't support that. My code is below: Our Portolio The SSTO's portfolio If you wish to view our amazing portfolio and receive monthly trading tips: Please contact us at: aryanmisra4@gmail.com or, dggrishanov@hotmail.com or, kencmg85@gmail.com or, elias.kountouris@hotmail.com Thank You Username: Password:
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/a/25941428
score: 1
upvote count: 1
has body: You have an early return statement. This, at the beginning of the function: return { buildEmptyGameBoard: buildEmptyGameBoard } means that the following statements will never be executed: this.startingTileNumber = 2; ...etc... Javascript runs the declarations in the first pass (i.e. buildEmptyGameBoard is declared and will be defined), but not the statements (i.e. this.forEach = function(cb) {} will wait to run at the second pass). But at the second pass, a return is executed immediately and nothing else runs. So **put the return at the end of the function. A service is not a controller, it is not instantiated with new. Your service returns an object with 1 method, buildEmptyGameBoard. this.forEach = function(cb) {} will attach the foreach function to some unknown object, certainly not the object you return. So change your code to: function buildEmptyGameBoard() { ... } function foreach(cb) { ... } ...etc... return { buildEmptyGameBoard: buildEmptyGameBoard, foreach: foreach, ...etc... };
has comment: http://stackoverflow.com/comment/40614894
downvote count: 0
answers question: http://stackoverflow.com/q/25941009
type: Answer

http://stackoverflow.com/q/26009931
accepted answer: http://stackoverflow.com/a/26010597
tagged with: javascript
score: 0
has title: object HTMLInputElement error when trying to display random task
has body: So I am trying to display and random string from an array I created. The counting portion of my message works, the second part where it should display and random task from my array shows the error. Did I not use the parseInt and Math.random function correctly? I dont have to round the number since parseInt converts it to a integer right? var tasks = []; // Function called when the form is submitted. // Function adds a task to the global array. function addTask() { 'use strict'; // Get the task: var task = document.getElementById('task'); // Reference to where the output goes: var output = document.getElementById('output'); // For the output: var message = ''; if (task.value) { // Add the item to the array: tasks[tasks.length] = task; var randomNum = tasks.length; var randomTask = parseInt((Math.random() * randomNum), 10); var randomMsg = tasks[randomTask]; // Update the page: message = 'You have ' + tasks.length + ' task(s) in your to-do list.\n'; message += 'Random Task: ' + randomMsg; if (output.textContent !== undefined) { output.textContent = message; } else { output.innerText = message; } } // End of task.value IF. // Return false to prevent submission: return false; } // End of addTask() function. // Initial setup: function init() { 'use strict'; document.getElementById('theForm').onsubmit = addTask; } // End of init() function. window.onload = init;
tagged with: parseint
answer count: 1
tagged with: arrays
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40736645
type: Question
has answer: http://stackoverflow.com/a/26010597

http://stackoverflow.com/comment/40542605
has text: Might want to explain how to see that `console.log` output. I get the feeling OP is **very** new to this
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25902810
score: 1

http://stackoverflow.com/q/26020579
tagged with: sparse-array
tagged with: median
has answer: http://stackoverflow.com/a/26026659
tagged with: arrays
has comment: http://stackoverflow.com/comment/40755860
downvote count: 0
answer count: 1
favorite count: 0
has title: Performing lookups on a sparse Javascript arrays
has comment: http://stackoverflow.com/comment/40755642
has comment: http://stackoverflow.com/comment/40760341
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40756909
has comment: http://stackoverflow.com/comment/40756076
tagged with: node.js
upvote count: 3
type: Question
has body: I have an interesting Javascript task (performed in Node.js, FWIW): I need to take the "weighted median" of a dataset for which I have values (income, in this case) and a weight for each one. For example: income #people 0 5 16000 3 20000 8 32000 4 40000 3 41000 1 50000 2 90000 1 In other words, 8 people make $20K, 2 make $50K, etc. I need the "weighted median" -- the median of all 27 people. The naive way to do this would be to make an array and seed it with every value, like so: var incomes = [0, 0, 0, 0, 0, 16000, 16000, 16000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 32000, 32000, 32000, 32000, 40000, 40000, 40000, 41000, 50000, 50000, 90000]; One can then easily take the median of this array (which is $20,000). In reality, I have data for between 7,000 and 14,000 people per sample. While I'm sure Node could handle an array this large, it feels incredibly sloppy. My current solution is to calculate the index of the median value in the hypothetical verbose array -- 13, in this case -- and the loop through the array of incomes and weights, adding up the cumulative weight until it reaches or surpasses the halfway point. Here's a simplified example. (Obviously, medians require slightly different rules for even-numbered lists. This is just a POC.) var halfway = 13, progress = 0; var vals = [[0,5], [16000,3], [20000,8], [32000,4], [40000,3], [41000,1], [50000,2], [90000,1]]; for (var v = 0; v &lt; vals.length; v += 1) { progress += vals[v][1]; if (progress &gt;= halfway) { var median = vals[v][0]; break; } } This works ok, but it gets messy when you want to start calculating quartiles and so forth. What would be easier is for me to be able to create a sparse array of the values at their appropriate place in the verbose array without filling in all the intermediate values, then perform lookups on this array for any index up to the maximum. But I need some efficient mechanism for finding the previous known index in the sparse array if (as is likely) the in…
score: 3
has comment: http://stackoverflow.com/comment/40759293
tagged with: javascript

http://stackoverflow.com/a/74051878
has body: Don't use open in the parent to open a new window. Use open in the parent instead. Then you can use close in the children. Works like a charm for me.
score: 0
answers question: http://stackoverflow.com/q/25937212
type: Answer

http://stackoverflow.com/comment/40649483
type: Comment
type: QuestionComment
has text: Have you seen [this tutorial](http://www.d3noob.org/2014/01/tree-diagrams-in-d3js_11.html)?
score: 0
comment on: http://stackoverflow.com/q/25942826

http://stackoverflow.com/q/26007354
has answer: http://stackoverflow.com/a/26007456
accepted answer: http://stackoverflow.com/a/26007456
favorite count: 0
upvote count: 5
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: Ok, so I'm working on a small html5 canvas drawing library and I'm having a slight problem, here's the code (fiddle below): var drawr = { init: function (canvas_id, canvasWidth, canvasHeight) { //height &amp; width are optional this.canvas_id = document.getElementById(canvas_id); this.canvasWidth = canvasWidth; this.canvasHeight = canvasHeight; this.context = this.canvas_id.getContext('2d'); if (canvasWidth) { this.canvas_id.width = canvasWidth; } if (canvasHeight) { this.canvas_id.height = canvasHeight; } }, //magic line drawing function ctx: function (a, b, x, y, dLineColor, dLineWidth) { //lineWidth &amp; lineColor are optional; defaults are 1px &amp; 'black' this.context.lineJoin = 'round'; this.context.beginPath(); this.context.moveTo(a, b); this.context.lineTo(x, y); this.context.closePath(); this.context.strokeStyle = dLineColor; this.context.lineWidth = dLineWidth; this.context.stroke(); }, //destroy event handlers to prevent drawing destroy: function () { //destroy event handlers }, draw: function (lineColor, lineWidth) { //create some utilities for draw function to use var localPen = {}; var drawing = false; var canvasPos = { x: this.canvas_id.offsetLeft, y: this.canvas_id.offsetTop } //initiate event handlers this.canvas_id.addEventListener('mousedown', addDraw, false); function addDraw(e) { drawing = true; console.log(drawing); localPen.x = e.pageX - canvasPos.x; localPen.y = e.pageY - canvasPos.y; }; this.canvas_id.addEventListener('mousemove', function (e) { var drawTo = { x: e.pageX - canvasPos.x, y: e.pageY - canvasPos.y } if (drawing) { drawr.ctx(localPen.x, localPen.y, drawTo.x, drawTo.y, lineColor, lineWidth); } localPen.x = drawTo.x; localPen.y = drawTo.y; }); this.canvas_id.addEventListener('mouseup', function (e) { drawing = false; }); this.canvas_id.addEventListener('mouseleave', function (e) { drawing = false; }); } } drawr.init('my_canvas'); drawr.draw('red', 10); drawr.draw('blue', 5); What I'm trying to accomplish here is this: when I call…
type: Question
has title: Update or Change or Remove/Reset Javascript event listener
score: 5
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40679680
type: Comment
comment on: http://stackoverflow.com/a/25979095
has text: `!important` should be the very very last resort - there are better ways to fix this particular situation
score: 0
type: AnswerComment

http://stackoverflow.com/a/25882635
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40506172
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25882554
answers question: http://stackoverflow.com/q/25882554
has body: You have an off-by-one error if you're surprised by the results. If you weren't surprised by the results then it's by design. You can try this out yourself, on paper. Say you want to count to 3, and you start at 1. So the first number is 1, increment by 1 Check if the number is less than 3, yes it is, the second number is 2, increment by 1 Check if the number is less than 3, no it isn't (3 is not less than 3) There is no third number. Because you've stopped the loop with the check number&lt;3. To get around this check if the number is less than or equals to 3 instead: for (j=1; j&lt;=cols; j++){ ...
has comment: http://stackoverflow.com/comment/40506137
type: Answer

http://stackoverflow.com/a/25938568
has comment: http://stackoverflow.com/comment/40607791
has comment: http://stackoverflow.com/comment/40608123
answers question: http://stackoverflow.com/q/25938345
upvote count: 1
has comment: http://stackoverflow.com/comment/40608286
has body: is a library that simulates a popup with styles, so is a pop of the current window internal popup with Jquery-ui $('.some').dialog( "open" ); it's external popup prompt("Please enter your name", "Harry Potter"); another alert('other popup'); and another window.open('popup.html');
has comment: http://stackoverflow.com/comment/40608051
score: 1
has comment: http://stackoverflow.com/comment/40607719
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40608145

http://stackoverflow.com/comment/40601107
type: Comment
has text: I'm not trying to add markers...I've already done that with success. Markers are fixed on a position and move as you move the map. I want a footer that doesn't move when you move the map.
comment on: http://stackoverflow.com/a/25935187
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40587864
type: Comment
comment on: http://stackoverflow.com/a/25927557
has text: Yeah, which means it isn't a general purpose answer. The fact is that the OP's question is not clear at all so all you can do is guess or explain all possible answers given the uncertainty in the question.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40821892
type: QuestionComment
type: Comment
has text: You can look into using a flatfile database. Google that term, you will find many results. This is one of those results http://sourceforge.net/projects/ffdb-php/
comment on: http://stackoverflow.com/q/26024060
score: 0

http://stackoverflow.com/q/25902263
has comment: http://stackoverflow.com/comment/40541657
type: Question
has title: How to display array in JavaScript without for loop?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25902356
has comment: http://stackoverflow.com/comment/40541719
score: 0
tagged with: arrays
answer count: 1
has body: I am trying to query my information that I have been using on Parse.com. I have an array of information that I want to query from by using they containedIn method. Here is an example from Parse of how I can use the contained in method: // Finds scores from any of Jonathan, Dario, or Shawn query.containedIn("playerName", ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); Here is how I am attempting this: var holdingTheDaysInCurrentMonth = []; //declare array //for loop to put info inside of it for(var i = startDateDay; i &lt;=endDateDay; i++) { var dayInMonth = i.toString(); holdingTheDaysInCurrentMonth.push(dayInMonth); } //... code to query Parse //how I am calling my method alert(holdingTheDaysInCurrentMonth.toString()); query.containedIn("dayString", [holdingTheDaysInCurrentMonth.toString()]); On my alert I get a response back of 1, 2, 3, 4, 5, 6 when I click on the 1st and the 6th of the month(this is to be expected). I am getting no retrieved rows back from my query so must be querying wrong. How can I change my format to be used correctly? What am I doing wrong?
tagged with: parse-platform
has answer: http://stackoverflow.com/a/25902356
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40541726

http://stackoverflow.com/a/25975737
has comment: http://stackoverflow.com/comment/40673398
has body: Us a confirmation prompt no? like this? Intercept page exit event window.onbeforeunload = function (e) { var message = "Your confirmation message goes here.", e = e || window.event; // For IE and Firefox if (e) { e.returnValue = message; } // For Safari return message; };
has comment: http://stackoverflow.com/comment/40675972
score: 0
answers question: http://stackoverflow.com/q/25975594
type: Answer

http://stackoverflow.com/q/25917803
has answer: http://stackoverflow.com/a/25939252
has title: What does "can't spot in frozen mode" mean?
has answer: http://stackoverflow.com/a/25939213
type: Question
has comment: http://stackoverflow.com/comment/40570882
has comment: http://stackoverflow.com/comment/40570095
has body: I am using enyojs 2.4 and the moonstone library. What does "can't spot in frozen mode" mean ? I have two inputs : {kind: "moon.InputDecorator", name: "emaildec", spotlight: true, defaultSpotlightLeft : "emaildec", components: [ {kind: "moon.Input", name: "username",placeholder: "e-mail address", onchange: "nameChanged", value:"",classes: "input-style"} //,spotlight: true ] }, {tag: "br"}, {kind: "moon.InputDecorator", name: "pwddec" , spotlight: true, defaultSpotlightLeft : "pwddec", components: [ {kind: "moon.Input", name: "userpwd",type:"password", placeholder: "ameba password", onchange: "passwordChanged", value: "",classes: "input-style"} //,spotlight: true ] } This console error is thrown when I attempt to set focus on the password input : enyo.Spotlight.spot(this.$.userpwd); What I want to happen is: user fills in first input using onscreen keyboard user then navigates to enter button on onscreen keyboard and presses ok/enter on remote control focus is set to second input.
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25939252
answer count: 3
has comment: http://stackoverflow.com/comment/40571106
has comment: http://stackoverflow.com/comment/40570799
has comment: http://stackoverflow.com/comment/40570486
tagged with: enyo
has answer: http://stackoverflow.com/a/25939016
upvote count: 2
possible better answer: http://stackoverflow.com/a/25939016
has comment: http://stackoverflow.com/comment/40570778
downvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/25986260
type: Answer
score: 0
has body: I Have found a way, where I have removed the data from #update by adding the code inside the jquery ajax calling function: success:function(data) { $('#update').remove(); } The code above remove the data inside #update and it answered my problem. If ever there would be a better way, I would love to learn about it too. As for now, :D
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25986121
answers question: http://stackoverflow.com/q/25986121

http://stackoverflow.com/comment/40730238
comment on: http://stackoverflow.com/q/26006712
has text: What does "fails" mean? Does it explode?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25944668
tagged with: express
favorite count: 0
has body: I'm beginning in NodeJS, but my code have a problem. I'll show the code. I need load the application in MVC pattern, I'm using the express-load, but it gives error when I create the load order. app.js (The important part) var load = require('express-load'); ... load('models').then('controllers').then('routes').into(app); controllers/home.js module.exports = function(app){ var HomeController = { index: function(req,res) { res.render('home/index'); } } return HomeController; } routes/home.js module.exports = function(app){ var home = app.controllers.home; app.get('/home',home.index); } Error npm start &gt; 4cash@0.0.1 start /Users/ewertonmelo/Documents/projects/4cash &gt; node ./bin/www /Users/ewertonmelo/Documents/projects/4cash/node_modules/express/lib/router/index.js:120 var search = 1 + req.url.indexOf('?'); ^ TypeError: Cannot call method 'indexOf' of undefined at Function.proto.handle(/Users/ewertonmelo/Documents/projects/4cash/node_modules/express/lib/router/index.js:120:28) at Object.router(/Users/ewertonmelo/Documents/projects/4cash/node_modules/express/lib/router/index.js:27:12) at /Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/lib/express-load.js:232:17 at iterate (/Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/node_modules/async/lib/async.js:131:13) at /Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/node_modules/async/lib/async.js:142:25 at /Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/lib/express-load.js:252:7 at iterate (/Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/node_modules/async/lib/async.js:131:13) at /Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/node_modules/async/lib/async.js:142:25 at /Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load/lib/express-load.js:252:7 at iterate (/Users/ewertonmelo/Documents/projects/4cash/node_modules/express-load(/node_modules/async/lib/async.js:131:13) npm ERR…
tagged with: node.js
has answer: http://stackoverflow.com/a/27407545
type: UnansweredQuestion
upvote count: 1
has title: Trying use express-load and express 4
type: Question
score: 1
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25929202
upvote count: 1
has comment: http://stackoverflow.com/comment/40590915
has comment: http://stackoverflow.com/comment/40592056
downvote count: 0
has comment: http://stackoverflow.com/comment/40592704
has body: There is no code from topic starter, so try something like this: $(function() { introJs().start(); }); Snippet will be updated when @chirayu sharma will provide code. Updated snippet.
type: Answer
answers question: http://stackoverflow.com/q/25928957
score: 1

http://stackoverflow.com/comment/53398374
has text: I also think Redux is the way to go, but I do not understand your answer completly. Maybe that's why someone downvoted...
score: 0
comment on: http://stackoverflow.com/a/26634136
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26024169
has body: charCodeAt(i) gets the ith character of the fileContent string, and returns its character code as a number. &amp; 0xFF performs a binary AND operation between that number and the hexidecimal number 0xFF; which masks it to the low-order 8 bits. Then this stores that 8-bit number into view[i]. So this whole thing is essentially copying the string from fileContent to buf, but stripping off any high-order bits to get 8-bit characters. The explicit masking here is not really necessary. Assigning to a Uint8Array automatically assigns the value modulo 256.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40762051
has comment: http://stackoverflow.com/comment/40962766
accepted answer of: http://stackoverflow.com/q/26024073
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40953219
answers question: http://stackoverflow.com/q/26024073
type: Answer

http://stackoverflow.com/comment/40568572
type: AnswerComment
comment on: http://stackoverflow.com/a/25916572
has text: Please don't just post code. Explain how this code solves the problem.
type: Comment
score: 0

http://stackoverflow.com/q/26027059
accepted answer: http://stackoverflow.com/a/26027418
has title: AngularJs selectors?
tagged with: css-selectors
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40767578
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40767629
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26027418
has comment: http://stackoverflow.com/comment/40767654
has comment: http://stackoverflow.com/comment/40767553
type: Question
answer count: 2
has body: How does AngularJs make its selectors In HTML without the need/using script tag? I've seen this happening in html via angular allot: {{'Something...'}} How is this possible without the script tag?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26027185
has answer: http://stackoverflow.com/a/26027185
score: 0

http://stackoverflow.com/comment/40653230
score: 0
type: AnswerComment
type: Comment
has text: I used `alert()` instead of `console.log()`. It did not alert anything, and there was no change.
comment on: http://stackoverflow.com/a/25962525

http://stackoverflow.com/q/25904255
has answer: http://stackoverflow.com/a/25906234
has title: Raphael library: Rect element not clickable unless filled?
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25906234
tagged with: javascript
tagged with: raphael
type: AnsweredQuestion
has body: This is driving me kind of batty. The code: var rect = this.paper.rect(0,0,this.width - 10,this.height - 10); rect.click(function(event) { alert("hi"); }); Never fires the click event, but: var rect = this.paper.rect(0,0,this.width - 10,this.height - 10).attr({fill: 'black', 'fill-opacity': 0}) rect.click(function(event) { alert("hi"); }); Will fire the click event. It seems the rect object must absolutely be filled to register the click. I have a big ole rect that I want clickable. What gives?
type: Question

http://stackoverflow.com/comment/40798674
type: AnswerComment
has text: I can change HTML content in OnBeforeResponse but not a query or a parameter in URL. Is there a reason for that?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26000127

http://stackoverflow.com/comment/40646671
type: Comment
comment on: http://stackoverflow.com/a/25955224
has text: It was the double svg element and some bad opacity setting. I still have questions about how to keep constancy with items nested in the layer data object.. Any chance we could take to chat?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25983279
has body: Been trying to find out how to do this the best way but haven't found any answers, don't know if I suck at searching or no-one has asked the question. Probably the first one, but anyway. I'm wondering what the best way is to add an element to the top of the DOM (so that it is on top of everything else) in AngularJS? My solution to this problem now is to show a modal with the loading spinner in it but I think this is an ugly solution as it shouldn't be that hard to add my own div-element to the DOM that are showing the spinner. This is the code I have in my modal right now: &lt;div class="modal-body" style="text-align: center;"&gt; &lt;i class="fa fa-spinner fa-spin fa-5x"&gt;&lt;/i&gt; &lt;/div&gt; So you can understand why I think it's unnecessary and ugly to have it in a modal. I've been reading about directives but not really sure how it would look like and how I would show it where I want it to be shown.
downvote count: 0
has title: AngularJS: Add a loader element to top of DOM
favorite count: 0
has answer: http://stackoverflow.com/a/25983972
tagged with: angularjs
has answer: http://stackoverflow.com/a/25983884
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25983884
upvote count: 1
accepted answer: http://stackoverflow.com/a/25983972
type: Question
has comment: http://stackoverflow.com/comment/40687614
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/40687702
tagged with: javascript
tagged with: dom
answer count: 2

http://stackoverflow.com/comment/62672446
comment on: http://stackoverflow.com/a/37566109
type: AnswerComment
has text: this sample code is supposed to be use in service-worker.js, are you using a HTML5 notifcation which simply relies on the script and works only if the tab is open?
score: 0
type: Comment

http://stackoverflow.com/q/25885067
tagged with: javascript
has comment: http://stackoverflow.com/comment/40510806
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25885237
tagged with: jqbootstrapvalidation
has title: how to validate element if it is displayed?
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/25885157
accepted answer: http://stackoverflow.com/a/25885157
has body: I have a form of two elements, the first one is always required, while the second depends on the value of the first element, so if the value of first element equals to Fashion Designers or Fashion Illustrators, the second element display will be block and the second element will be required, while if the value of the first element is anything else, the second element will still displayed none and not required. here is my code: Select career Fashion Designers Fashion Illustrators Tailors Tailor's Assistants Human Resources Marketing Coordinators Sales Coordinators Accountants Production Managers I got error: Uncaught TypeError: Cannot read property 'display' of undefined
possible better answer: http://stackoverflow.com/a/25885237
type: Question

angularjs-directive
tags question: http://stackoverflow.com/q/25972222
tags question: http://stackoverflow.com/q/25977708
tags question: http://stackoverflow.com/q/25925935
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/25994653
tags question: http://stackoverflow.com/q/26022856
tags question: http://stackoverflow.com/q/25936657
tags question: http://stackoverflow.com/q/25874547
tags question: http://stackoverflow.com/q/25921427
tags question: http://stackoverflow.com/q/26019419
tags question: http://stackoverflow.com/q/25942122
tags question: http://stackoverflow.com/q/26002477
tags question: http://stackoverflow.com/q/25879744
tags question: http://stackoverflow.com/q/25978158
tags question: http://stackoverflow.com/q/25877563
tags question: http://stackoverflow.com/q/25941750
tags question: http://stackoverflow.com/q/26006595
tags question: http://stackoverflow.com/q/25952494
tags question: http://stackoverflow.com/q/25876235
tags question: http://stackoverflow.com/q/25953567
tags question: http://stackoverflow.com/q/25902185
tags question: http://stackoverflow.com/q/26025370
tags question: http://stackoverflow.com/q/26026548
tags question: http://stackoverflow.com/q/25878077
tags question: http://stackoverflow.com/q/26006346
tags question: http://stackoverflow.com/q/25944424
tags question: http://stackoverflow.com/q/25929426
tags question: http://stackoverflow.com/q/25931677
tags question: http://stackoverflow.com/q/25942666
tags question: http://stackoverflow.com/q/25985309
tags question: http://stackoverflow.com/q/25885341
tags question: http://stackoverflow.com/q/25990936
tags question: http://stackoverflow.com/q/25887027
tags question: http://stackoverflow.com/q/25949349
tags question: http://stackoverflow.com/q/25983279
tags question: http://stackoverflow.com/q/25893371
tags question: http://stackoverflow.com/q/25916348
type: Tag
tags question: http://stackoverflow.com/q/25953903
tags question: http://stackoverflow.com/q/25960374
tags question: http://stackoverflow.com/q/25969234
tags question: http://stackoverflow.com/q/25920694
tags question: http://stackoverflow.com/q/25980658
tags question: http://stackoverflow.com/q/26000047
tags question: http://stackoverflow.com/q/25969680
tags question: http://stackoverflow.com/q/25939361
tags question: http://stackoverflow.com/q/25922223
tags question: http://stackoverflow.com/q/25911322

http://stackoverflow.com/q/25890772
has title: javascript: prototype in javascript like reflection in c#, is it possible?
has comment: http://stackoverflow.com/comment/40523548
has comment: http://stackoverflow.com/comment/40523155
has comment: http://stackoverflow.com/comment/40523850
has comment: http://stackoverflow.com/comment/40521996
has comment: http://stackoverflow.com/comment/40523350
duplicate of: http://stackoverflow.com/q/9779624
has comment: http://stackoverflow.com/comment/40523195
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/9779624
has comment: http://stackoverflow.com/comment/40524072
answer count: 0
has body: in javascript I have one class MyClass = { ... } In some part of the code, I would like to do MyClass.SomeFunction(arg1, arg2, ...); using prototype (maybe) I would like to take the name took and arguments and do a generic function. Objective it is to build something similar like PageMethods like in asp.net to have a clear code. Can you help me to start? maybe giving some web page with samples or tutorial. In javascript I was thinking to use $.fn but I don't know how to start. The idea it is have a generic function class inside MyClass, I dont know if it is possible, maybe using jquery
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/40520719
type: Question

http://stackoverflow.com/comment/40718768
score: 0
has text: You really need to clean up your OP. Where is the ***RENDERED*** HTML output? Show just enough code to create a complete example of your problem. Otherwise, we have no idea what you want.
comment on: http://stackoverflow.com/q/26000318
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26015062
possible better answer: http://stackoverflow.com/a/26017383
has body: I have a little problem in a huge dojo-based webproject (earlier version than dojo 1.7, as far as I know it is 1.3). I want to trigger a specific event by code but don't know how I could achieve this. It's a event called ondijitclick which gets registered via the data-dojo-attach-event-attribute in html. I also can't just call the method which is triggered by this event because I only can access the domnodes (or I just don't know how I could access the objects belonging to this domnodes) at the location where I need this functionality. I also have code with that I can at least trigger the usual events like "onclick": if (document.createEventObject){ // IE var evt = document.createEventObject(); node.fireEvent('onclick', evt); } else{ // other browsers var evt = document.createEvent("HTMLEvents"); evt.initEvent('click', true, true ); node.dispatchEvent(evt); } I could enter the ondijitclick event, but nothing would happen and no errors show up. Visual Studio (with ReSharper) itself tells me that this event cannot be resolved. Because of that I think that no event gets triggered and the commands are just ignored because of unknow event type. The whole question finally is: Exists a way to trigger such events by code for dojo 1.3 (or genereal for versions before dojo 1.7)? Edit: clarified that a solution for dojo 1.3 is needed
score: 1
has answer: http://stackoverflow.com/a/26017383
upvote count: 1
type: Question
has title: Is it possible to trigger dojo-specific events by code?
has comment: http://stackoverflow.com/comment/40749655
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27120687
answer count: 2
favorite count: 0
linked to: http://stackoverflow.com/q/27108094
has comment: http://stackoverflow.com/comment/40751021
tagged with: dojo
has answer: http://stackoverflow.com/a/27120687
type: AnsweredQuestion

http://stackoverflow.com/comment/40751854
comment on: http://stackoverflow.com/a/26002307
type: AnswerComment
has text: I've had it on and I have not copied I updated the link
score: 0
type: Comment

http://stackoverflow.com/comment/40712893
comment on: http://stackoverflow.com/a/25997412
type: Comment
has text: Thank you very much for your reply. I will look into the event bubbeling and try to adapt to this concept. I will leave this question open for little while to see if other persons may have a different approach.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25942005
type: Answer
answers question: http://stackoverflow.com/q/25941891
has body: When add button is clicked call this function: function myAddFunction(){ var html = " Remove " $('#shipping').append(html); } When remove button is clicked call this function: function myRemoveFuncion(){ $(this).closest('tr').remove(); } Hopre it helps.
has comment: http://stackoverflow.com/comment/40614420
score: 0

http://stackoverflow.com/q/25964950
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40653836
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40653806
has comment: http://stackoverflow.com/comment/40653979
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40654040
answer count: 0
has body: I'm making a mobile app that first requires the user to log in with a username and password. The password is hashed and sent to the server and some PHP checks to see that the hash and the username match. That all works, fine and dandy. After the username/password checks out though, the user is able to access the rest of the pages in the app, which access server-side script without any kind of security checking. I'd like to change that. Conventionally, I would imagine that the server should return a "token" (i.e. some randomized characters shared by the server and the client with no connection to the password hash itself) upon successfully logging in. Is it so simple as doing this, and checking/renewing the token expiration time each time the user accesses a new page? Or am I missing a vital part of the security process?
has title: Mobile App Login/Password Security
tagged with: mysql
has comment: http://stackoverflow.com/comment/40653807

http://stackoverflow.com/q/25937911
score: 0
tagged with: web
possible better answer: http://stackoverflow.com/a/25938124
has comment: http://stackoverflow.com/comment/40606312
tagged with: css
has comment: http://stackoverflow.com/comment/40606295
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5998924
has answer: http://stackoverflow.com/a/25937996
accepted answer: http://stackoverflow.com/a/25937996
has comment: http://stackoverflow.com/comment/40606377
tagged with: stylesheet
has comment: http://stackoverflow.com/comment/40606330
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40606920
has comment: http://stackoverflow.com/comment/40606662
tagged with: arrays
has answer: http://stackoverflow.com/a/25938124
tagged with: javascript
has title: undefined CSS property to a JS array element
has comment: http://stackoverflow.com/comment/40606451
has body: I want to style the second elment in this array by adding a CSS Property here is a global variable to define the array &lt;canvas id="canvas"&gt;&lt;/canvas&gt; &lt;script&gt; var paddles = [2], // Array containing two paddles function update() { // Update scores updateScore(); // Move the paddles on mouse move // Here we will add another condition to move the upper paddle in Y-Axis if(mouse.x &amp;&amp; mouse.y) { for(var i = 1; i &lt; paddles.length; i++) { p = paddles[i]; // the botoom paddle if (i ==1){ p.x = mouse.x - p.w/2; }else{ // the top paddle //paddles[2].x = mouse.x - p.w/2; debugger paddles[2].style.backgroundColor="red"; } } } and here what the style I want paddles[2].style.backgroundColor="red"; when I use the debugger I face this problem TypeError: paddles[2].style is undefined

http://stackoverflow.com/q/25993244
type: Question
type: AnsweredQuestion
has title: Contenteditable placeholder needs to be empty when saved
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25994130
score: 0
has body: At the company I work at, we took over a project made with symfony2 and angular.js. It is a platform containing courses. These courses are actually "books", that are made interactive with videos and places to discuss course content. A course consists of a number of chapters, each with a set of pages. The person who developed this in angular, used div with contenteditable attributes to enter text. (see screenshot here : https://i.sstatic.net/yXkr7.jpg ) The divs also have a sk-placeholder attribute. I know the basics to angular and I presumed the sk-placeholder attribute was a directive, replacing the content of the div with some text. Appearently, the contenteditable is the directive using the attribute sk-placeholder's content, to fill the element. (in this case a div). When in an editable element, if you press enter, the content is saved. If however, you don't fill in anything, the placeholder text is not removed and it is presumed the content of the specific section of the page you're working on. (I hope I am clear enough, if there are any questions please do ask). It should clear the content of all divs with attribute "contenteditable" by default when saving. And that's the part I can't seem to figure out. SEK.app.directive('contenteditable', function($location, sekApi, $q){ return { require: 'ngModel', restrict: 'A', link: function(scope, element, attrs, ctrl) { var richText = attrs.richText || false, focused = false; function renderMath () { if(richText) { var math = element[0]; MathJax.Hub.Queue(["Typeset",MathJax.Hub,math]); } } function renderElement() { if(!ctrl.$viewValue &amp;&amp; attrs.skPlaceholder) { element.addClass("sk-placeholding"); element.html(attrs.skPlaceholder); } else { element.removeClass("sk-placeholding"); element.html(ctrl.$viewValue); renderMath(); } } ctrl.$render = function() { renderElement(); }; element[0].onpaste = function(e) { var pastedText = undefined; if (window.clipboardData &amp;&amp; window.clipboardData.getData) { // IE p…
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25994130

http://stackoverflow.com/comment/40698815
score: 0
type: Comment
has text: but `robet` and `21` is dynamic data.
type: AnswerComment
comment on: http://stackoverflow.com/a/25989552

http://stackoverflow.com/comment/40765616
type: QuestionComment
has text: Here is a similar question to your second question: http://stackoverflow.com/q/6974069/218196
comment on: http://stackoverflow.com/q/26025671
score: 0
type: Comment

http://stackoverflow.com/q/25921903
tagged with: css
has answer: http://stackoverflow.com/a/25922007
has body: I've been working on a 2D graphics framework running inside only HTML text (i.e. the individual characters act as pixels). Naturally, I need the code to be as efficient as possible as I am aiming to be able to run this as close to 60 fps as possible. Each row of characters is it's own HTML paragraph element. I noticed when I added functionality for colouring each individual character the code suffered a massive dip in performance (around 60 fps down to about 5 or 6). My method to colour the individual % characters "&lt;FONT color=" + colour + "&gt;%&lt;/FONT&gt;" Where colour is the hex value of the desired colour. I've looked around for some time now but haven't been able to find any solution that is compatible with the dynamic nature of the styling I'm trying to do. Does anybody know of a more efficient way of styling individual characters on the fly? Also, an insight into why the above method is so inefficient would also be helpful. Thanks (For a look at the code in context take a look at https://a8afefdfe4646d1a727ae236e436a4e29773afd3.googledrive.com/host/0BwftsCVGDOiwQ0I4WUxRTEFuWkU/TextCanvas.js, the drawChar and render functions are where the styling code is)
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40578094
has comment: http://stackoverflow.com/comment/40578162
tagged with: performance
has title: How to efficiently style individual characters in an element?
has comment: http://stackoverflow.com/comment/40578086
type: Question
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40578163
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40597851
comment on: http://stackoverflow.com/q/25931714
type: Comment
score: 0
type: QuestionComment
has text: @VivekPathak is that the raw result of console.log ? or is that the ff/chrome cleaned up one ? can you inspect what the ajax call actually returns ? like headers, charset etc, jquery might not understand what it is, and if it doesnt understand it will not put it in the DOM as valid xhtml/svg and therefor it will not showup

http://stackoverflow.com/q/25981935
tagged with: backbone.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47533001
tagged with: marionette
has comment: http://stackoverflow.com/comment/40708609
downvote count: 0
score: 1
tagged with: requirejs
has answer: http://stackoverflow.com/a/29698828
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40698220
has comment: http://stackoverflow.com/comment/46865674
has body: Here is the code I have: render: function () { var data = this.serializeData(), that = this; require(['text!trigger-menu/confirmation/' + that.model.get('type') + '-template.html'], function(templateHTML) { var html = _.template(templateHTML, data); that.$el.html(html); }); } I have 3 different confirmation views that could display. 2 of the 3 are working. The one that isn't looks like this: <% _.each(signupForms, function (signup) { %> <%- signup.name %> <% }); %> <% _.each(authorizedApps, function (app) { %> <%- app.name %> <% }); %> <% if ((!signupForms && !authorizedApps) || (!signupForms.length && !authorizedApps.length)) { %> All signups <% } %> The error is Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The new child element is null. Anyone else run into this error?
upvote count: 1
answer count: 1
has title: Marionette.js dynamically changing template with requireJS not working
favorite count: 0

http://stackoverflow.com/comment/40497220
comment on: http://stackoverflow.com/q/25877594
type: QuestionComment
score: 0
has text: You would have to do `$('.something input[value^=""]).length;` everytime to get the count.
type: Comment

http://stackoverflow.com/q/25908098
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40552120
has comment: http://stackoverflow.com/comment/40552119
tagged with: css
score: 0
has answer: http://stackoverflow.com/a/25908232
has answer: http://stackoverflow.com/a/25908353
has body: I have the following list of examples: Prev 4:45 h. 5:23 h. 6:00 h. 6:19 h. 6:37 h. 6:55 h. 7:12 h. 7:28 h. 7:44 h. 8:00 h. 8:16 h. 8:33 h. 8:50 h. 9:08 h. 9:27 h. 9:47 h. 10:07 h. 10:27 h. 10:47 h. 11:07 h. 11:27 h. 11:47 h. 12:07 h. 12:27 h. 12:47 h. 13:07 h. 13:27 h. 13:47 h. 14:08 h. 14:30 h. 14:53 h. 15:15 h. 15:36 h. 15:56 h. 16:16 h. 16:36 h. 16:56 h. 17:16 h. 17:36 h. 17:56 h. 18:21 h. 18:46 h. 19:11 h. 19:36 h. 20:01 h. 20:26 h. 20:51 h. 21:16 h. 21:42 h. 22:08 h. 22:35 h. Next I wish when I press prev and next, respectively go to the next or previous five elements. All other elements are hidden and not visible. How can you do that with JQuery ? Early show set li, but for this example let's all hidden. Then press next and should appear next 5 items from the list and hide the current 5, this is done for example with slidetoggle or something. When pressed prev do show the previous 5 and hide the rest.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40552371
tagged with: javascript
tagged with: jquery
has title: JQuery ul li click move to next five elements in list
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40552439
has comment: http://stackoverflow.com/comment/40552182

http://stackoverflow.com/comment/140145131
score: 0
has text: 2025, 25th Feb and it does not work anymore. Edit - for the new syntax, we can use ```dagre.layout(g, { disableOptimalOrderHeuristic: true });```
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26016286

http://stackoverflow.com/q/26027787
has answer: http://stackoverflow.com/a/56881504
has answer: http://stackoverflow.com/a/26027931
has comment: http://stackoverflow.com/comment/40768958
has answer: http://stackoverflow.com/a/26027929
tagged with: javascript
has answer: http://stackoverflow.com/a/26028302
tagged with: jquery
has answer: http://stackoverflow.com/a/26028334
upvote count: 2
accepted answer: http://stackoverflow.com/a/26027971
has comment: http://stackoverflow.com/comment/40768967
has answer: http://stackoverflow.com/a/26027965
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26028008
favorite count: 0
has answer: http://stackoverflow.com/a/26027971
possible better answer: http://stackoverflow.com/a/26027929
tagged with: css
has title: Simplify this javascript for Show one, Hide Rest
type: AnsweredQuestion
has body: I am using a script for a gallery in which clicking on an element in the navigation shows only one div, but hides the others. Currently my script is very specific, as I need to add a new function for every possible instance. See below... You can imagine this grows out of control easily the more images are added. Can someone help me make this code more generic and elegant? I'm not very experienced with Javascript/JQuery but this is getting a bit embarrassing lol So in case it's not clear from the code: the #li1, #li2, #li3 etc are the navigational thumbnails which are always visible. The #img1, #img2, #img3 etc. are the variable displayed divs. When one is visible, the rest should be hidden. Additional questions: for every #img1 displayed, I'd like to also show a title in a separate div, let's say #title1, #title2, etc. How do I do this? So eg clicking #li1 would show #img1 and #title1 but hide all other #img.. and #title.. all #'s contain images. I've noticed that when one of the images is broken, the whole script stops working properly (all #img.. divs show at once). Why is that? this script doesn't actually hide all the images until everything is loaded, which you don't notice when running the HTML locally, but you do when you're waiting for the images to download. I'm suspecting because the $("#li1").load(function() refers to a div that is further down in the document. How can I counter this? I hope I'm not asking too much, I've tried to understand this myself but I can't figure it out. $("#li1").load(function() { $("#img2, #img3, #img4, #img5, #img6, #img7, #img8, #img9, #img10, #img0, #intro").hide(); $("#img1").show(); }); $("#li1").on('click', function() { $("#img2, #img3, #img4, #img5, #img6, #img7, #img8, #img9, #img10, #img0").hide(); $("#img1").show(); }); $("#li2").on('click', function() { $("#img1, #img3, #img4, #img5, #img6, #img7, #img8, #img9, #img10, #img0").hide(); $("#img2").show(); }); $("#li3").on('click', function() { $("#img2, #img1, #img4, #i…
score: 1
has comment: http://stackoverflow.com/comment/40768852
has comment: http://stackoverflow.com/comment/40768853
downvote count: 1
type: Question
answer count: 8

cordova-plugins
tags question: http://stackoverflow.com/q/25874590
type: Tag
tag name: cordova-plugins
tags question: http://stackoverflow.com/q/25988322
tags question: http://stackoverflow.com/q/25915543

http://stackoverflow.com/a/29708792
answers question: http://stackoverflow.com/q/25979401
type: Answer
has body: The easiest way of opening the compose in its own window is to actually hold down Shift while you click the Compose button. If you use Keyboard Shortcuts, you can also open a New Compose Window in a popup window by pressing Shift + C. No need for extra scripts or plugins to accomplish what you want, and for security and performance, you should always seek to solve browser and website problems with as little interference from 3rd-party plugins and scripts. Alternatively, when you hold down Ctrl and click the Compose button, your Compose window will open in a background tab (in browsers that support tabs, like Google Chrome).
score: 0

http://stackoverflow.com/q/25947486
linked to: http://stackoverflow.com/q/17149286
has comment: http://stackoverflow.com/comment/40626821
tagged with: javascript
has comment: http://stackoverflow.com/comment/40622725
has comment: http://stackoverflow.com/comment/40622675
answer count: 2
has answer: http://stackoverflow.com/a/25948072
has comment: http://stackoverflow.com/comment/40625940
tagged with: jquery
has answer: http://stackoverflow.com/a/25953473
possible better answer: http://stackoverflow.com/a/25948072
has comment: http://stackoverflow.com/comment/40622941
has comment: http://stackoverflow.com/comment/40622614
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: triangles bordered by an inner and outer circle
tagged with: css-shapes
score: 0
has comment: http://stackoverflow.com/comment/40623335
accepted answer: http://stackoverflow.com/a/25953473
has comment: http://stackoverflow.com/comment/40623057
has body: I am trying to create about twelve triangles inside a circle (each having an arc of 360/12 = 30 degrees) using CSS3 such that their bottom borders fit the arc of the outer circle, and their peaks fit/curve around the inner circle. My initial idea was to create each triangle and then position it within the two circles. But using the simple triangle-creation method in CSS, I can't figure out how to create a triangle with borders that fit the two circles exactly. These triangles need to have text inside them later (and styled etc.) and be moved using jQuery or JavaScript (I haven't figured that part out completely yet). Could anyone give me any ideas ? How can I go about doing this. Also, whether this is the best way to go about it , especially if I later want to drag them as a group within the two circles using jQuery. I am new to CSS/JavaScript/jQuery, any help would be greatly appreciated. The following is a simple snippet of code for the two circles. .outerCircle { width:400px; height:400px; border:1px solid black; border-radius:50%; } .innerCircle { position:relative; left:170px; top:170px; width:50px; height:50px; border-radius:50%; border:1px solid black; } .triangleOne { }
type: Question
has comment: http://stackoverflow.com/comment/40631878

http://stackoverflow.com/comment/40608517
comment on: http://stackoverflow.com/q/25939066
score: 0
type: QuestionComment
type: Comment
has text: Make sure that the mobile numbers contains only numbers, otherwise do `where mobile='$mobile'");` or SQL will complain about it.

http://stackoverflow.com/comment/40741527
score: 0
type: Comment
type: QuestionComment
has text: Interesting I'll take a look thanks - one of the problems is that it's difficult putting another attribute in the select as it is dynamically built in Zend 1.12 and there is no method to give each options a custom attribute :(
comment on: http://stackoverflow.com/q/26012932

http://stackoverflow.com/a/26016282
has body: This is what you need to change to get it to work the way you want: var minutes = cur_date.getMinutes(); var seconds = cur_date.getSeconds(); try change it to this: var minutes_remain = 5 - minutes%5 - 1; var seconds_remain = 59 - seconds; Try it out here: jsFiddle
has comment: http://stackoverflow.com/comment/40748050
downvote count: 0
answers question: http://stackoverflow.com/q/26016060
type: Answer
has comment: http://stackoverflow.com/comment/40748278
has comment: http://stackoverflow.com/comment/40747035
upvote count: 1
has comment: http://stackoverflow.com/comment/40747753
score: 1

http://stackoverflow.com/q/25955509
tagged with: jquery
type: Question
has body: I'm using codemirror in my blog, here is the code: var codeJs = document.getElementsByClassName("code-js"); var editor = []; for (var i=0; i&lt;codeJS.length; i++){ editor[i] = CodeMirror.fromTextArea(codeJS[i], { lineNumbers: true, matchBrackets: true, autoCloseBrackets: true }); // Save the value of every codemirror to the textarea editor[i].on("blur", function() {editor[i].save()}); } I use the above code for multiple codemirrors and I want to save the value of every codemirrors to their own textarea, it work fine except this line: editor[i].on("blur", function() {editor[i].save()}); Can anyone figureout what's wrong with my code?
has title: Create Multiple Codemirrors and Save The Value To Textarea
has answer: http://stackoverflow.com/a/25961403
tagged with: codemirror
score: 0
tagged with: javascript
type: UnansweredQuestion
answer count: 1

http://stackoverflow.com/comment/40669370
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25972960
has text: try adding `Cache-Control: no-cache, max-age=0, must-revalidate, no-store` header to the page in question.
score: 0

http://stackoverflow.com/comment/40650697
has text: How did you get to `mY==!2N`? What character set to you consider hand-typable?
comment on: http://stackoverflow.com/q/25963202
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25977177
has comment: http://stackoverflow.com/comment/40701082
has body: App.BasicForm is not an instance, so it doesn't hold an element. You need to initialize it and you will be able to reference the element with $el: var basicForm = new App.BasicForm({ el: document.getElementById('bfBasicFormDiv') }); basicForm.$el.css({display: "block"});
accepted answer of: http://stackoverflow.com/q/25977095
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40676826
score: 1
has comment: http://stackoverflow.com/comment/40676089
has comment: http://stackoverflow.com/comment/40676897
has comment: http://stackoverflow.com/comment/40676927
type: Answer
has comment: http://stackoverflow.com/comment/40676319
has comment: http://stackoverflow.com/comment/40677498
upvote count: 1
has comment: http://stackoverflow.com/comment/40700828
has comment: http://stackoverflow.com/comment/40676223
has comment: http://stackoverflow.com/comment/40677719
has comment: http://stackoverflow.com/comment/40676178
answers question: http://stackoverflow.com/q/25977095

http://stackoverflow.com/a/26026226
accepted answer of: http://stackoverflow.com/q/26025970
has comment: http://stackoverflow.com/comment/40766400
type: AcceptedAnswer
downvote count: 0
has body: First, you want to replace "?that", not "&that". Second, you have an a tag that doesn't have an id, but you're setting the 'href' attribute of an element with the id of 'button', which doesn't appear in your code snippet. You got a NaN error because you're trying to subtract "?that" from a string. Instead, use string.replace("?that", "") - which will remove the "%that", but not anything after it (if there is something). If there is something after "&that" in your string, get the indexOf("?that") and then set the string to a substring of itself like so: html: Click me Javascript: var urlString = $("#linktoModify").prop("href"); urlString = urlString.toString().substring(0, urlString.indexOf("?")); $("#linkToModify").prop("href", urlString); Also, keep in mind that your question is a bit misleading. You're trying to edit a string with javascript, not remove a query string. Query strings are readonly and cannot be removed, but you can easily modify a string, which appears to be what you're trying to do.
has comment: http://stackoverflow.com/comment/40766068
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26025970
score: 1

http://stackoverflow.com/q/26011962
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40739763
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40739357
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26014743
has title: AngularJS post fails, jQuery ajax fails too. No CORS
accepted answer: http://stackoverflow.com/a/26014743
tagged with: jquery
has body: I faced with a strange problem with two customers. Frontend is unable to send POST/GET request insige Angular directive. Line: xhr.open(method, url, true); Ecception: Exception { message: "", result: 2153644038, name: "", filename: "http://site.ru/scripts/vendor/angular.js", lineNumber: 8327, columnNumber: 0, inner: null, data: null } This is is usual request to the same domain, no CORS. This problem reproduced only on a customer side (now 2 customers faced this trouble, first Win 8.1 + Firefox Latest and the second Win 7 + Chrome Latest). I can't reproduce this problem on my side. But I see errors on a customers frontends. Request from page: goo[.]gl/T2d2oh To API: "/user/getAds" Fail callback called in a request: var jqueryRequest = $.ajax({ type: "POST", url: $scope.url, data: JSON.stringify(params), dataType: 'json', contentType: "application/json; charset=utf-8", beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', 'Bearer ' + token); } }); jqueryRequest.done(function(data, status) { /* Do smth */ $scope.$apply(); }); jqueryRequest.fail(function(jqXHR, status, error) { /* Do smth */ console.error("pagination error", jqXHR, status, error); $scope.$apply(); }); The same with angular post: $http.post($scope.url, params).success(function(data, status, headers, config) { /* Do smth */ }).error(function(data, status, headers, config) { console.error('pagination:error', status, config); }) Exception... "" nsresult: "0x805e0006 ()" location: "JS frame :: http://site.ru/scripts/vendor/angular.js :: createHttpBackend/&lt; :: line 8494" data: no
tagged with: ajax

http://stackoverflow.com/a/26022090
score: 22
upvote count: 22
accepted answer of: http://stackoverflow.com/q/26017371
has body: Why would anyone want this function to behave like this (return an integer even if it isn't the precise representation of the string passed)? Because most of the time (by far) you're working with base 10 numbers, and in that case JS can just cast - not parse - the string to a number. (edit: Apparently not just base-10; see update below.) Since JS is dynamically typed, some strings work just fine as numbers without any work on your part. For instance: "21" / 3; // =&gt; 7 "12.4" / 4; // =&gt; 3.1 No need for parseInt there, because "21" and "12.4" are essentially numbers already. If, however the string was "12.4xyz" then you would indeed get NaN when dividing, since that is decidedly not a number and can't be implicitly cast or coerced to one. You can also explicitly "cast" a string to number with Number(someString). While it too only supports base 10, it will indeed return NaN for invalid strings. So because JS already has implicit and explicit type casting/conversion/coercion, parseInt's role isn't to be a yet another type casting function. parseInt's role is instead to be, well, a parsing function. A function that tries its best to make sense of its input, returning what it can. It's for when you have a string you can't just cast because it's not quite perfectly numeric. (And, like JS's basic syntax, it's reminiscent of C, as apsillers' answer explained nicely.) And since it's a parser, not a casting function, it's got the additional feature of being able to handle other bases than 10. Now, you might ask why there isn't a strict casting function that handles non-base-10 numbers, and would complain like you want, but... hey, there just isn't. JS's designers just decided that parseInt would suffice, because, again, 0x63 percent of the time, you're dealing with base 10. Closest you can get to "casting" is probably something horribly hacky like: var hexString = "dsff66"; var number = eval("0x" + hexString); // attempt to interpret as a hexadecimal literal which'll thr…
has comment: http://stackoverflow.com/comment/40781379
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40766322
has comment: http://stackoverflow.com/comment/40781791
has comment: http://stackoverflow.com/comment/40781484
has comment: http://stackoverflow.com/comment/40779078
has comment: http://stackoverflow.com/comment/40765570
has comment: http://stackoverflow.com/comment/40781008
has comment: http://stackoverflow.com/comment/40775662
has comment: http://stackoverflow.com/comment/40778549
answers question: http://stackoverflow.com/q/26017371

http://stackoverflow.com/a/25955563
has body: I think the elements provided in the question are not enough to provide an accurate answer but for the bounty I will guess ;) After a quick look at the source code of your (none working) DEMO using fancybox v2.1.5, I found some issues you may need to fix in in order to have a working page : 1). You don't have a proper DOCTYPE (I meant, not DOCTYPE at all) 2). You have a stray &lt;/div&gt; closing tag (line 179) just before the &lt;div id="baseurl"&gt; 3). You have a stray &lt;! opening (sort of) conditional comment (line 204) 4). Yo DON'T have a closing &lt;/html&gt; tag 5). The base url issue: You have this html line &lt;div id='baseurl' style="display:none"&gt;http://madenade.besaba.com/file/filemanager/dialog.php?type=2&amp;field_id=&lt;&lt;/div&gt; Notice at the end of the line &amp;field_id=&lt;&lt;/div&gt; : the extra &lt; I think is a typo, isn't it?. Then you have this variable: var baseurl = $('#baseurl').html(); ... which actually returns : http://madenade.besaba.com/file/filemanager/dialog.php?type=2&amp;amp;field_id=&amp;lt; If you run that url directly in your browser (out of fancybox) it does return the same js error while selecting the image in fancybox. What I think is the escaped html entities are somehow messing with the functionality of responsive file manager. For instance, if you open the url without escaping the html entities (in a new tab/window) like : http://madenade.besaba.com/file/filemanager/dialog.php?type=2&amp;field_id=s7cJMxQl ...(excluding the &lt; typo), the only error is when triggering the $.fancybox.close() method, which it does make sense. I would recommend you to do either : var baseurl = $("#baseurl").text(); // don't escape html entities or set the value in a data attribute for a cleaner code like &lt;div id="baseurl" data-base="http://madenade.besaba.com/file/filemanager/dialog.php?type=2&amp;field_id=" style="display:none"&gt;&lt;/div&gt; ... then the variable var baseurl = $("#baseurl").data("base");
has comment: http://stackoverflow.com/comment/40654351
score: 1
has comment: http://stackoverflow.com/comment/40758398
upvote count: 1
answers question: http://stackoverflow.com/q/25920021
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40548165
score: 0
has text: isn't that *Java* instead of javascript?
type: Comment
comment on: http://stackoverflow.com/a/25905963
type: AnswerComment

http://stackoverflow.com/q/25941773
tagged with: javascript
has answer: http://stackoverflow.com/a/26083949
has comment: http://stackoverflow.com/comment/40613854
downvote count: 3
has comment: http://stackoverflow.com/comment/40613856
tagged with: autofill
favorite count: 0
has answer: http://stackoverflow.com/a/25941882
upvote count: 0
has body: I need to add a 'Send Message' button which takes the username of the user that message will be sent to, goes to a link and put this username to the 'To' field of the message form. This is my code function sendmessage() { var x; //geting the username x = document.getElementsByClassName('sol-kkutu')[0].innerHTML; var x = x.substring(x.indexOf(":") + 1); //passing the username parameter by URL window.location.href = "http://ogrencidenilan.net/mesajlar-2?fepaction=newmessage"+"&amp;" + x; //to get the username parameter from URL on new page var z=window.location.search.substr(1); //to get rid of some part of the username parameter var a = z.substring(z.indexOf("0") + 1); a = a.substring(0, a.length - 8) //to put the username to 'To' field document.getElementById("search-q").value= a; } Now the problem is that the new page is opened with the parameter. And as a seperate case I can get a parameter from a URL then put it in a field. But I cannot do these two together. Thanks for the answers!
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40613922
score: -3
tagged with: url-parameters
has title: Using the parameter passed by URL in JavaScript
type: Question
has comment: http://stackoverflow.com/comment/40613834
answer count: 2

http://stackoverflow.com/comment/40590179
type: QuestionComment
comment on: http://stackoverflow.com/q/25928859
has text: What about maintaining a flag?
score: 0
type: Comment

http://stackoverflow.com/a/25893056
upvote count: 0
answers question: http://stackoverflow.com/q/25892893
type: Answer
downvote count: 1
score: -1
has body: add html tags in the response like this $response = ' '.$value.' ';
has comment: http://stackoverflow.com/comment/40525187

http://stackoverflow.com/comment/40493509
type: QuestionComment
comment on: http://stackoverflow.com/q/25874416
score: 0
has text: Problem is that `%2E` is an url-encoded period, but since it is in an element's id, it shouldn't be treated as such. So I think the id is invalid because of the percent character. If you found out that the id in Javascript is translated to contain a period, then is looks like one of the functions you call explicitly url-decodes the string while it shouldn't. Two errors so it seems, unless this is intended behaviour.
type: Comment

http://stackoverflow.com/comment/40764213
score: 1
type: AnswerComment
type: Comment
has text: That will not work because `el` when physically clicking the element will be the event. so `el.attr()` will throw `undefined is not a function`.
comment on: http://stackoverflow.com/a/26025269

http://stackoverflow.com/comment/40537692
type: AnswerComment
has text: Ok but how can I than access the iterator?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25899949

http://stackoverflow.com/a/25968183
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25952197
type: Answer
has body: You must define the el element to be an existing element in your DOM. If you do not define it, fine, it will default to a div, but when you render the view, the html generated must be appended/prepended whatever, you get the point, to an existing DOM element. Events are scoped to the view, so something's wrong with your scope. From the code you provided I can't reproduce the problem, so if you might, please provide a live example on jsfiddle/jsbin etc in order to fully understand the issue. Demo ( in order to demonstrate the view render ) var App = { collections: {}, models: {}, views: {}, }; App.models.Channel = Backbone.Model.extend({ defaults: { name: '#jucaSaoBoizinhos' } }); App.views.ChannelView = Backbone.View.extend({ el:$('#PlaceHolder'), events: { "click .channel": "myhandler" }, render: function() { this.$el.html('&lt;div class="channel"&gt;&lt;button&gt;' + this.model.get('name') + '&lt;/button&gt;&lt;/div&gt;'); return this; }, myhandler: function(e) { alert(e); console.log(this.model.get('name')); }, }); var chView = new App.views.ChannelView({model: new App.models.Channel()}); //console.log(chView.render().el) //prints div#PlaceHolder //without the el specified in the view it would print a div container //but i would have to render the view into an existing DOM element //like this //$('#PlaceHolder').html(chView.render().el) chView.render()
score: 0
accepted answer of: http://stackoverflow.com/q/25952197

http://stackoverflow.com/comment/40604833
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25937078
score: 0
has text: where is `screen` defined?

http://stackoverflow.com/q/25975569
has answer: http://stackoverflow.com/a/26126748
score: -3
tagged with: cross-browser
type: AnsweredQuestion
has body: Google Maps Pan Control in V2 does not work in IE 9 and IE 10. Example: http://www3.telus.net/DougHenderson/Example0_v2.html To reproduce the error - browse to the above link in IE9/10 and click on any of the 4 Pan controls (up, down, right, left) buttons on the top left. The map will snap right back to the default position. This works fine on Chrome and Firefox. I have tried searching SO and Google for this issue but could not find anything. Can someone help? Thanks. I know V2 has been deprecated but I would appreciated if someone could shed some light on the matter.
downvote count: 3
has title: GMaps V2 snapping back to original position
type: Question
accepted answer: http://stackoverflow.com/a/26126748
tagged with: internet-explorer
tagged with: javascript
has answer: http://stackoverflow.com/a/25975958
answer count: 2
tagged with: google-maps
tagged with: google-maps-api-2
upvote count: 0
possible better answer: http://stackoverflow.com/a/25975958
favorite count: 0

http://stackoverflow.com/a/33676326
answers question: http://stackoverflow.com/q/25963256
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25963256
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You should see gulp-imports. I think is what you want. usage //include("bar.js"); Plus: if you want to process the modified files and the parent files (imported by), see my fork: gulp-js-inheritance. Plus 2: if you want others features in gulp, based on codekit, see: codekit-gulp.
score: 2

http://stackoverflow.com/q/25938473
type: Question
tagged with: recursion
tagged with: mongodb
tagged with: javascript
has body: I'm trying to store a directory tree in a mongoDB. Here's my schema: { "_id" : ObjectId("541ba7f156d876d3f787bc33"), "name" : "file_1.mp3", "length" : 136.6, "kind" : "audio", "parent" : null } { "_id" : ObjectId("541ba7f156d876d3f787bc34"), "name" : "file_2.mp3", "length" : 132.0, "kind" : "audio", "parent" : null } { "_id" : ObjectId("541ba7f156d876d3f787bc35"), "name" : "file_3.mp3", "length" : 116.8, "kind" : "audio", "parent" : null } { "_id" : ObjectId("541ba7f156d876d3f787bc36"), "name" : "file_4.mp3", "length" : 206.7, "kind" : "audio", "parent" : null } { "_id" : ObjectId("541ba84456d876d3f787bc37"), "name" : "folder_1", "length" : null, "kind" : "dir", "parent" : null } { "_id" : ObjectId("541ba84456d876d3f787bc38"), "name" : "folder_2", "length" : null, "kind" : "dir", "parent" : null } { "_id" : ObjectId("541ba84456d876d3f787bc39"), "name" : "folder_3", "length" : null, "kind" : "dir", "parent" : null } { "_id" : ObjectId("541ba91656d876d3f787bc3a"), "name" : "subfolder_1", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba84456d876d3f787bc37") } { "_id" : ObjectId("541ba91656d876d3f787bc3b"), "name" : "subfolder_2", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba84456d876d3f787bc37") } { "_id" : ObjectId("541ba91656d876d3f787bc3c"), "name" : "subfolder_3", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba84456d876d3f787bc37") } { "_id" : ObjectId("541ba98056d876d3f787bc3d"), "name" : "subsubfolder_1", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba91656d876d3f787bc3b") } { "_id" : ObjectId("541ba98056d876d3f787bc3e"), "name" : "subsubfolder_2", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba91656d876d3f787bc3b") } { "_id" : ObjectId("541ba98056d876d3f787bc3f"), "name" : "subsubfolder_3", "length" : null, "kind" : "dir", "parent" : ObjectId("541ba91656d876d3f787bc3b") } I want to changes this so that the children get nested inside the parents. i.e.: [ { "_id" : ObjectId("541ba7f156d876d3f787bc33"), "…
accepted answer: http://stackoverflow.com/a/25939670
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40781380
tagged with: meteor
favorite count: 0
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25939670
tagged with: underscore.js
score: 6
has title: Build javascript tree based on parent attribute in array of elements

http://stackoverflow.com/a/35923885
type: Answer
has body: I encountered this mask url() issue in AngularJS template which contained similar svg structure like in this jsfiddle. That worked fine until I noticed that it wasn't working in "search" page. I finally found this Stackoverflow thread and did some extra research, in my site base tag is always something like this &lt;base href="/en/search/"&gt; when you are in url "http ://example.com/en/search/?q=something" In my AngularJS template I had to add "{{path}}" in to mask url. (check that fiddle for full svg) &lt;rect x="0" y="0" width="48" height="47" fill="#008FDB" mask="url({{path}}#arrowShape)"&gt;&lt;/rect&gt; In my research I noticed that I only needed to add "window.location.search" in to that "path" variable and everything started to work also in "search" page. BUT 100% working version needed also some js logic, because I noticed that if your url is like "http ://example.com/en/?" Internet Explorer will return "?" from "window.location.search". Chrome, Safari, Firefox and Opera will return just "" which is not enough to that svg mask to work. $scope.path = ''; var tmp = $window.location.search; if(tmp !== "") { $scope.path = tmp; } else if(/\?$/.test($window.location.href)) { $scope.path = '?'; } After this svg mask started working consistently. (As a sidenote I have html5mode turned off.)
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25999037
downvote count: 0

http://stackoverflow.com/comment/40722732
comment on: http://stackoverflow.com/a/26002322
type: AnswerComment
has text: @Webice the javacsript is not the issue then, add error reporting to your php script until you find the hiccup, such as what Fred-ii- mentioned above in the comments.
type: Comment
score: 1

http://stackoverflow.com/comment/40729671
type: QuestionComment
comment on: http://stackoverflow.com/q/26006347
type: Comment
score: 1
has text: you may want to show the ads object. And update your question with the code, dont paste as a comment

http://stackoverflow.com/a/25895672
has body: you can use nth child selector to append div. according to example image you are trying to append new div inside 2nd div in body. &lt;script&gt; $(function(){ $( "body div:nth-child(2)" ).append( "&lt;div&gt; your content &lt;/div&gt;" ); }); &lt;/script&gt; This will place new div inside 2nd div from body tag. find jquery documentation here
answers question: http://stackoverflow.com/q/25895489
score: 1
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40726485
comment on: http://stackoverflow.com/q/26004342
has text: @swam: Don't use `document.write` at all. Use DOM manipulation like `document.createElement("table")` and then use `appendChild` to add nodes to the table.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40788060
comment on: http://stackoverflow.com/a/26024156
score: 1
type: AnswerComment
has text: @Zez3 This code is working : http://jsfiddle.net/gd883hqj/ (Need to click run every time the alert box appear). Your problem must be somewhere else.
type: Comment

http://stackoverflow.com/a/25882410
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25882361
downvote count: 0
answers question: http://stackoverflow.com/q/25882361
upvote count: 2
type: AcceptedAnswer
has body: You can use for loop and call properly using [] insteand on ., see below code for(var i = 1; i &lt;= 4; i++ ){ opener.document.EditView["flight_no"+i+"_c"].value }

http://stackoverflow.com/comment/40780621
type: Comment
type: QuestionComment
has text: [YOUR SOURCE AT JSFIDDLE](http://jsfiddle.net/Dwza/9bthLc55/) easy to add.
comment on: http://stackoverflow.com/q/26033233
score: 0

http://stackoverflow.com/comment/40760827
type: AnswerComment
comment on: http://stackoverflow.com/a/26022890
score: 0
type: Comment
has text: would be really helpful if you could tell me how to call close function of date explicitly :)

http://stackoverflow.com/a/25897263
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25896824
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25896824
type: Answer
has comment: http://stackoverflow.com/comment/40532803
has body: I know I just commented, but I figured I would show you an example: HTML: This is a table header and stuff though asdf qwer zxcv rtyu tyui dfgh dfgh wert Javascript: $(function() { $('.add-column').click(function() { $('.append').append(" iueo "); $('.tablehead').append(" Mo columns "); }); /* vvv - this */ $("#tablee").on('mouseenter', '.edit-column', function() { /* ^^^ should be children or a child of this */ $(this).css('background-color', 'yellow'); }); }); Here is a fiddle This question's answer gives a much better explanation of delegated events.

http://stackoverflow.com/q/25904481
tagged with: c#
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40552147
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40546398
has comment: http://stackoverflow.com/comment/40548232
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40546013
favorite count: 0
has body: I've got a requirement where I need to save CSHTML (View of MVC) Page in Word .DOC files. Can anybody give me some links to both closed and open source libraries that I can use to do this?
has answer: http://stackoverflow.com/a/25908336
tagged with: ms-word
has comment: http://stackoverflow.com/comment/40547782
type: UnansweredQuestion
has title: How to download CSHTML file in word file (.doc)?
downvote count: 1
type: Question

http://stackoverflow.com/q/26022096
tagged with: parse-platform
has body: I am a little bit confused about this code in the parse javascript SDK. // Create the object. var GameScore = Parse.Object.extend("GameScore"); var gameScore = new GameScore(); gameScore.set("score", 1337); gameScore.set("playerName", "Sean Plott"); gameScore.set("cheatMode", false); gameScore.set("skills", ["pwnage", "flying"]); gameScore.save(null, { success: function(gameScore) { // Now let's update it with some new data. In this case, only cheatMode and score // will get sent to the cloud. playerName hasn't changed. gameScore.set("cheatMode", true); gameScore.set("score", 1338); gameScore.save(); } }); Can someone explain why it is saving twice? https://parse.com/docs/js_guide#objects-updating [EDIT] To be clear I understand there are two calls to .save(); I want to know why this code, which is straight from the parse Javascript SDK, is saving twice. Are there benefits or is this a mistake? I am not sure..
score: 0
tagged with: save
answer count: 1
tagged with: object
has title: Javascript Parse SDK saving twice
has answer: http://stackoverflow.com/a/26022276
accepted answer: http://stackoverflow.com/a/26022276
type: AnsweredQuestion
tagged with: javascript
type: Question

http://stackoverflow.com/q/25958875
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40642405
has comment: http://stackoverflow.com/comment/40642528
has body: I am creating a link like this: $("#div_"+id+" .boxcontent").html(" Load History "); but it is breaking the code, I am trying to make it like this: Load History
has comment: http://stackoverflow.com/comment/40642451
has answer: http://stackoverflow.com/a/25958933
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25958933
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40643008
has title: Javascript Issue with creating a link
has comment: http://stackoverflow.com/comment/40644854
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40675707
comment on: http://stackoverflow.com/a/25976750
type: Comment
type: AnswerComment
score: 0
has text: @MortenOC yes, and i do that by using .toLowerCase() - but the main problem is resolved || but exactly i needed this - http://jsfiddle.net/1819tb2m/1/ - Thank You one more time!!!

http://stackoverflow.com/q/25908492
has comment: http://stackoverflow.com/comment/40552863
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25028820
tagged with: internet-explorer-10
has title: Layers with higher z-index gets ignored by touches on Windows Phone 8 Cordova HTML5 App
tagged with: windows-phone-8
has answer: http://stackoverflow.com/a/25913202
type: Question
possible better answer: http://stackoverflow.com/a/25908900
answer count: 2
has answer: http://stackoverflow.com/a/25908900
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25913202
has comment: http://stackoverflow.com/comment/40552696
tagged with: css
has body: We are porting a cordova app from iOS / Android to Windows Phone 8 and have a problem with our overlays. The overlay is a div that has an higher z-index defined than the divs beneath and the it contains several controls (e.g. inputs). The problem we have is that the overlay div is ignored by touch events, instead the events on the underlying divs(which should be locked by the overlay) are fired. I tried to set -ms-touch-action:none css property to the underlying divs with no success. Any help would be appreciated. Thank you, guys.
tagged with: cordova
has comment: http://stackoverflow.com/comment/40553423

http://stackoverflow.com/a/25935301
answers question: http://stackoverflow.com/q/25934885
has body: You are forcing me to guess here(not giving a fiddle), and create a scenario of my own but from what I understand, you want a button to appear no hover, and when pressed to delete the image so here its a working fiddle hover functionality $((document.body).on('mouseenter', '.test', function(){ console.log('here'); $(this).children('.test .x_butt').show(); }); $(document.body).on('mouseleave', '.test', function(){ $('.test .x_butt').hide(); }); remove functionality $(document.body).on('click', '.x_butt', function(){ $(this).parent().remove(); }); P.S. as for your dynamically added divs issue, the $(selector1).on('click','selector2', function() {...}); deals with it, as long as selector1 is not added dynamically. (selector2 would be the div you want the function to be on) demo with dynamically added elements ( click clone )
has comment: http://stackoverflow.com/comment/40601863
has comment: http://stackoverflow.com/comment/40601363
has comment: http://stackoverflow.com/comment/40604577
has comment: http://stackoverflow.com/comment/40602327
has comment: http://stackoverflow.com/comment/40601410
has comment: http://stackoverflow.com/comment/40601930
score: 0
type: Answer

http://stackoverflow.com/a/25970657
has body: I have centered the image on canvas maintaining aspect ratio. Updated fiddle. $("#button1").click(function(){ //alert("sdfsfsdf") var ctx = $('#lcv_1').get(0).getContext('2d'); var img = $('#profile_pic').get(0); var width = ctx.canvas.width; var height = ctx.canvas.width * (img.height / img.width); if (height &gt; ctx.canvas.height) { height = ctx.canvas.height; width = ctx.canvas.height * (img.width / img.height); } ctx.drawImage(img,(ctx.canvas.width - width) / 2, (ctx.canvas.height - height) / 2, width, height); });
type: Answer
has comment: http://stackoverflow.com/comment/40666070
answers question: http://stackoverflow.com/q/25969675
accepted answer of: http://stackoverflow.com/q/25969675
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40665885
score: 0

http://stackoverflow.com/a/25973994
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/40680938
has body: Yet another variant function isFieldExist(expression){ var fields = expression.split('.'), cur = this; for(var i=0; i&lt;fields.length; i++){ if(typeof cur[fields[i]] === "undefined") return false; cur = cur[fields[i]]; } return true; } for using isFieldExist("Variables.settings.backend.url"); // find in global scope isFieldExist.call(Variables, "settings.backend.url"); // find in Variables
downvote count: 0
has comment: http://stackoverflow.com/comment/40678904
answers question: http://stackoverflow.com/q/25973300

http://stackoverflow.com/q/25961497
tagged with: response
has title: Assign the ajax response to a global variable
answer count: 3
upvote count: 1
has body: In this code, I would want my "userid" from postgresql, which will be the "response" of ajax or variable "res", to be stored in a global variable "id" so I can use it into future use. var id; function addUser() { $.ajax({ url: siteloc + scriptloc + "adduser.py", data: {username:$("#login").val(), password:$("#password").val(), email:$("#email").val()}, dataType: 'json', success: function (res) { window.id = res; console.log(id); } }); } It all goes well in the console.log(id), showing the id in the console. But when I proceed to the next function, function setpersonalinfo() { $.ajax({ url: siteloc + scriptloc + "setpersonalinfo.py", data: {userID:id, fullname:$("#fullname").val(), birthday:$("#birthday").val(), gender:$("#gender").val() }, dataType: 'json', success: function (res) { console.log("Successfully added."); } }); } The id in "userID:id" is not recognized. How do I do this?
has comment: http://stackoverflow.com/comment/40647508
has comment: http://stackoverflow.com/comment/40647450
favorite count: 0
tagged with: ajax
tagged with: postgresql
has comment: http://stackoverflow.com/comment/40647466
possible better answer: http://stackoverflow.com/a/25961706
has answer: http://stackoverflow.com/a/25962486
has answer: http://stackoverflow.com/a/25961723
accepted answer: http://stackoverflow.com/a/25961723
has comment: http://stackoverflow.com/comment/40647413
has answer: http://stackoverflow.com/a/25961706
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25995337
score: 3
tagged with: javascript
upvote count: 3
tagged with: cross-domain
answer count: 1
has title: Listen for keydown events in iframe with cross-domain
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25995872
accepted answer: http://stackoverflow.com/a/25995872
type: AnsweredQuestion
has body: I want to listen for keydown events in an iframe to stop backspace from being executed. It works as long as the page in the iframe comes from same domain, but when it comes from another domain it fails when the contents() method is called. The error is: IE: "0x80070005 - JavaScript runtime error: Access is denied." Chrome: "Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "domain_a" from accessing a frame with origin "domain_b". Protocols, domains, and ports must match." Is there any way to listen for keydown events on iframes from another domain? I use this angularJS code to setup a listener: KeyDownService.preFilterKeyDown($(this).contents()); ... angular.module('portal.services.keyHandlers.keyDownService', []) .service('KeyDownService', function () { //Prevents shortcut keys (for instance backspace) in being executed in an iframe or document. this.preFilterKeyDown = function ($document) { $document.keydown(function (e) { var preventKeyPress; switch (e.keyCode) { case 8: //Backspace preventKeyPress = preventBackspace(e); break; ... default: preventKeyPress = false; } if (preventKeyPress) e.preventDefault(); }); }
downvote count: 0
tagged with: iframe
type: Question

http://stackoverflow.com/q/25877990
possible better answer: http://stackoverflow.com/a/25878366
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40498204
has answer: http://stackoverflow.com/a/25879165
type: Question
has comment: http://stackoverflow.com/comment/40498101
has body: Working on a form validation function which produces a list of empty fields and a list of incorrectly-filled fields. The script functions perfectly for text and text-areas. When I apply the following method to radio buttons: $("input:radio[name]").each(function() { $(this).removeClass("error"); // Remove previously-applied error class if($(this).filter(":checked").length == 0) { // Make sure they chose an option. emptys[j] = nameFix($(this).attr("name")); // Add to array, apply error class $(this).addClass("error"); // increment placeholder and exit j ++; // the function return; } else { return; } }); // end radio each unanswered radio groups produce 2 indices in emptys and answered radio groups produce 1 index (I'm testing on a page where the user indicates whether tests were passed or failed). The universally-accepted answers I've found so far all assume I will use specific attributes I've given the tags in my JS. The site I'm building will have dozens of various forms which will require validation, so I'm trying to produce a universally-applicable script to check their validity. EDIT: sample of HTML Methane Overpressure Target Pressure (psi) 300 ± 1.0 P F Magnet Magnetic Field Strength (T) 4.5 ± 0.5 P F Acceleration Radio Frequency (MHz) 68 ± 0.1 P F
has answer: http://stackoverflow.com/a/25878366
has answer: http://stackoverflow.com/a/25878409
accepted answer: http://stackoverflow.com/a/25878409
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40497974
score: 0
answer count: 3
has title: Using jQuery to check all radio groups checked when names are unknown

http://stackoverflow.com/q/25978995
has body: First Question here, too! Yay! Just moved this from AskUbuntu. I am just about to finish a little private project for gaining some experience where i try to change the app layout so it works as a normal website (on Jimdo, so it was quite of a challenge first) without much JavaScript required but is fully functional on mobile view. Since Jimdo serves naturally only the actual site, I had to implement an if (activeTab.getAttribute('jimdo-target') != null) location.href = activeTab.getAttribute('jimdo-target'); redirect into the __doSelectTab() function in tabs.js . (In js I took the values from the jimdo menu string to build the TABS menu with this link attribute) Now everything works fine exept at page load the first tab is selected. I got it to set the .active and .inactive classes right easily, but it is not shifted to the left. So my next idea is to let it initialize as always and then send a command to change to the current tab. Do you have any idea how to manage this? I couldn't because of the this.thisandthat element I apparently don't really understand... Most of you answering have the toolkit and the whole code, but I am listing the select function part of the tabs.js: __doSelectTab: function(tabElement, forcedSelection) { if ( ! tabElement) return; if (tabElement.getAttribute("data-role") !== 'tabitem') return; if (forcedSelection || (Array.prototype.slice.call(tabElement.classList)).indexOf('inactive') &gt; -1) { window.clearTimeout(t2); activeTab = this._tabs.querySelector('[data-role="tabitem"].active'); offsetX = this.offsetLeft; this._tabs.style['-webkit-transition-duration'] = '.3s'; this._tabs.style.webkitTransform = 'translate3d(-' + offsetX + 'px,0,0)'; this.__updateActiveTab(tabElement, activeTab); if (activeTab.getAttribute('jimdo-target') != null) location.href = activeTab.getAttribute('jimdo-target'); [].forEach.call(this._tabs.querySelectorAll('[data-role="tabitem"]:not(.active)'), function (e) { e.classList.remove('inactive'); }); var targetPa…
tagged with: javascript
type: UnansweredQuestion
tagged with: ubuntu
has comment: http://stackoverflow.com/comment/40714897
type: Question
has title: Ubuntu HTML5 App: Change Tab on JS command
tagged with: http://stackoverflow.com/tag/html
tagged with: tabs
score: 0
has comment: http://stackoverflow.com/comment/40679858
answer count: 1
has answer: http://stackoverflow.com/a/25999159

http://stackoverflow.com/q/26001430
has body: let's say I have a page with a script by a third party that is intended to track conversions. Assuming this third party can't visit the page itself, what can the third party know about my page? for example, I think they can tell the URL of the page from which the script is being called. but can they also find out information about the contents of the page, such as the text and links inside of it?
has comment: http://stackoverflow.com/comment/40722336
has comment: http://stackoverflow.com/comment/40721993
has comment: http://stackoverflow.com/comment/40721299
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40720366
has comment: http://stackoverflow.com/comment/40721344
has comment: http://stackoverflow.com/comment/40721005
has comment: http://stackoverflow.com/comment/40721471
has comment: http://stackoverflow.com/comment/40720394
has title: Can a script by a third-party on my page drill info from the page?
has comment: http://stackoverflow.com/comment/40720508
has comment: http://stackoverflow.com/comment/40720916
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40720403
has comment: http://stackoverflow.com/comment/40722268
has comment: http://stackoverflow.com/comment/40720397
tagged with: javascript
has comment: http://stackoverflow.com/comment/40721110
has comment: http://stackoverflow.com/comment/40722072
has comment: http://stackoverflow.com/comment/40721698
type: Question

http://stackoverflow.com/q/26009482
has comment: http://stackoverflow.com/comment/40735084
type: UnansweredQuestion
has title: Javascript Unhiding Element Onclick
has comment: http://stackoverflow.com/comment/40734999
tagged with: javascript
has answer: http://stackoverflow.com/a/26009542
type: Question
has answer: http://stackoverflow.com/a/26009882
tagged with: http://stackoverflow.com/tag/html
answer count: 6
has body: I've been playing around with javascript and I am trying to get the below to work. Remove Are You sure? | Yes / No On click, I am trying to make the hidden element get shown. I am unsure why it isn't working, the logic seems right to me. Cheers
has answer: http://stackoverflow.com/a/26009548
score: 0
tagged with: php
has answer: http://stackoverflow.com/a/26010128
has answer: http://stackoverflow.com/a/26009880
has answer: http://stackoverflow.com/a/26009634

http://stackoverflow.com/q/25944113
possible better answer: http://stackoverflow.com/a/25944341
score: 1
has answer: http://stackoverflow.com/a/25944145
has answer: http://stackoverflow.com/a/25944341
upvote count: 1
has comment: http://stackoverflow.com/comment/40635214
has comment: http://stackoverflow.com/comment/40617816
type: Question
has title: Unable to send JSON data to MVC controller
has comment: http://stackoverflow.com/comment/40618021
tagged with: asp.net-mvc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25944145
answer count: 2
has comment: http://stackoverflow.com/comment/40617899
linked to: http://stackoverflow.com/q/477816
has comment: http://stackoverflow.com/comment/40617793
downvote count: 0
has comment: http://stackoverflow.com/comment/40617935
has comment: http://stackoverflow.com/comment/40617763
has comment: http://stackoverflow.com/comment/40618889
favorite count: 0
has body: I have a JavaScript function that looks as follows: function exportToExcel() { $.ajax({ url: "/eBird/ExportToExcel", data: jsonSightingData, type: 'POST', contentType: 'application/json' }); } My MVC controller looks like this: public ActionResult ExportToExcel(List&lt;Entities.MyClass&gt; data) { try { ... } catch (System.Exception exception) { ... } MyClass defintion is: public class MyClass { public string comName { get; set; } public int howMany { get; set; } public double lat { get; set; } public double lng { get; set; } public string locID { get; set; } public string locName { get; set; } public bool locationPrivate { get; set; } public string obsDt { get; set; } public bool obsReviewed { get; set; } public bool obsValid { get; set; } public string sciName { get; set; } } The class matches the JSON data coming in exactly. The problem is that when my controller method is called, 'data' is always NULL. My understanding was that the MVC model binder would automatically bind the JSON data to my MyClass list. But it doesn't appear to be working. Sample JSON is as follows: [{"comName":"Great Black-backed Gull","lat":42.4613266,"lng":-76.5059255,"locID":"L99381","locName":"Stewart Park","locationPrivate":false,"obsDt":"2014-09-19 12:40","obsReviewed":false,"obsValid":true,"sciName":"Larus marinus"}]
has comment: http://stackoverflow.com/comment/40618153
has comment: http://stackoverflow.com/comment/40618112
type: AnsweredQuestion

http://stackoverflow.com/q/26007058
tagged with: jquery
has comment: http://stackoverflow.com/comment/40731042
has comment: http://stackoverflow.com/comment/40730997
has answer: http://stackoverflow.com/a/26007101
type: Question
score: 3
possible better answer: http://stackoverflow.com/a/26007246
has answer: http://stackoverflow.com/a/26007246
favorite count: 0
upvote count: 3
answer count: 2
tagged with: date
has title: How to convert milliseconds to a readable date with Javascript?
has body: I have a milliseconds integer, and I am trying to convert it to a readable date in the format of yyyy MM dd (2014-08-06). var maxDate = 1407267771429; maxDate = new Date(maxDate); maxDateFinal = maxDate.toString('yyyy MM dd'); WORKING EXAMPLE Although, maxDateFinal always seems to equal Wed Aug 06 2014 05:42:51 GMT+1000 (E. Australia Standard Time) I have added console.log() after each call in my fiddle to demonstrate the change of the variables, although it seems as if toString() is doing absolutely nothing to the date at all.
accepted answer: http://stackoverflow.com/a/26007101
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3552461
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40730970

http://stackoverflow.com/a/25949641
answers question: http://stackoverflow.com/q/25948934
has comment: http://stackoverflow.com/comment/40626624
type: Answer
has body: I would have done : $scope.lastrun = []; $http.get('/api/lastrun') .success(function(data){ angular.forEach(data, function (value) { $scope.lastrun.push({lat : value.lat, lng : value.lng}); }); } }) and then : path: { p1: { color: 'red', weight: 2, latlngs: $scope.lastrun } Hope this helps
score: 0

http://stackoverflow.com/a/25949009
has body: The problem is that green is not defined. You can use "green" or #00FF00. Try this: &lt;script type="text/javascript"&gt; window.rowcount=function() { var exam = new XMLHttpRequest(); exam.onreadystatechange = function() { if (exam.readyState == 4) { var i=document.getElementById("newdata").innerHTML = exam.responseText; if(i==1){ document.getElementsById("newdata").style.backgroundColor = "#00FF00"; } } } exam.open("GET", "demo1.php?", true); exam.send(null); &lt;/script&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/25948960
upvote count: 1
answers question: http://stackoverflow.com/q/25948960
has comment: http://stackoverflow.com/comment/40630247
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40567151
type: QuestionComment
comment on: http://stackoverflow.com/q/25877054
score: 0
type: Comment
has text: @hungerstar Sure. I have updated the question with the snapshot of the error and the actual code.

http://stackoverflow.com/q/25982103
tagged with: jquery-gmap3
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26034513
has body: In this jsfiddle is simplified version of my js: http://jsfiddle.net/Drecker/2m4kvxb8/4/ Note that interesting part of the jsfiddle is only showRoute method. And method showMarker only shows desired behavior on normal marker. Basically I generate a route via gmap3 getroute with some waypoints. After clicking on a waypoint I need to open a small infobox with more custom information of that point - so basically somehow get onclick event of such waypoint (with some identification of that waypoint so I would be able to get proper information). I'm able to achieve desired behavior on a separate marker (as you can see in the jsfiddle - that's the fully functional separate marker on the top left), but not on the markers generated by directionrenderer. Furthermore please note that my waypoints have stopover: false and such markers for some reason ignore (some) options like title, as you can see in jsfiddle. Any help is very appreciated - I've tried several things none of them works.
has comment: http://stackoverflow.com/comment/40780448
linked to: http://stackoverflow.com/q/6630341
has comment: http://stackoverflow.com/comment/40785214
has title: How to get onclick event of marker generated by getroute
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26035862
type: Question
has comment: http://stackoverflow.com/comment/40783949
tagged with: javascript
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26034513
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/26035862
tagged with: google-maps

http://stackoverflow.com/comment/40521906
type: Comment
comment on: http://stackoverflow.com/a/25875585
score: 0
type: AnswerComment
has text: Hm, we could apply a bit more magic and put something like `Wrapper.prototype = {attr: function(){return object.attr.apply(this.element, arguments);}};` instead of `object` directly.

http://stackoverflow.com/comment/40662252
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25969416
has text: Keep in mind that you may run in trouble, when the name field begins with a number. http://stackoverflow.com/questions/2469355/input-field-name-starts-with-a-number
type: Comment

http://stackoverflow.com/comment/40586690
comment on: http://stackoverflow.com/a/25926859
type: Comment
type: AnswerComment
has text: assume that the "tr" are the product container and the td are the the details . in that case you have to repeat the "tr" and made static "td" for the which contain detail
score: 0

http://stackoverflow.com/comment/40655554
comment on: http://stackoverflow.com/a/25965662
score: 0
type: AnswerComment
has text: A `concat` is not "some sort of array join", and using `+` behaves identical to calling `concat`.
type: Comment

http://stackoverflow.com/comment/40599292
type: QuestionComment
comment on: http://stackoverflow.com/q/25933871
score: 0
has text: To check the validity of the JSON, use a [JSON lint](http://jsonlint.com/).
type: Comment

http://stackoverflow.com/comment/40738694
type: Comment
comment on: http://stackoverflow.com/a/26011261
has text: *using javascript*, correct. So, what's the point of using PHP to change the action here?
score: 0
type: AnswerComment

http://stackoverflow.com/q/26008740
has body: Hi i am new to javascript and jquery.I just like to know if there is any way of selecting a table data using this format: $("#myTable").row[index1][index2]; where index1 is row index, index2 is column. Anything similar is fine too.
score: -1
possible better answer: http://stackoverflow.com/a/26008806
answer count: 3
has comment: http://stackoverflow.com/comment/40733716
upvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26008821
has answer: http://stackoverflow.com/a/26008773
favorite count: 0
accepted answer: http://stackoverflow.com/a/26008773
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26008806
downvote count: 1
type: Question
has title: Selecting a table data using javascript/jquery
tagged with: javascript

http://stackoverflow.com/q/26010710
accepted answer: http://stackoverflow.com/a/26022001
answer count: 1
has title: window.location.href and hash are not working on chrome
has answer: http://stackoverflow.com/a/26022001
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40737217
type: AnsweredQuestion
tagged with: coffeescript
type: Question
has comment: http://stackoverflow.com/comment/40749415
tagged with: javascript
has comment: http://stackoverflow.com/comment/40749441
score: 0
has comment: http://stackoverflow.com/comment/40737403
has body: previewOpen:-&gt; window.location.href="#/preview" window.setTimeout(@openView(@uuid),500) openView:(uuid) -&gt; $("#design_parts").empty(); console.log("done emptying..."); console.log(uuid) view= new Embellishment.Views.DP.Preview({uid:uuid} ) $('#design_parts').html(view.render().el) I am using coffee script, when I am trying hit the url, it is not getting redirected to that particular url and the next steps are getting executed later it is hitting that url. I am getting this issue only in chrome but it is working fine in firefox. Any help is appreciated.

http://stackoverflow.com/comment/40740112
type: AnswerComment
type: Comment
has text: What if the page that contains the iframe refreshes? You need to keep the id's persistant through those refreshes also?
comment on: http://stackoverflow.com/a/26011793
score: 0

http://stackoverflow.com/comment/40515401
type: QuestionComment
has text: And why would you load a different stylesheet when the page is loading, that makes no sense ?
comment on: http://stackoverflow.com/q/25888133
score: 0
type: Comment

http://stackoverflow.com/comment/40617122
has text: No probs as long as it works I guess all the best :)
type: Comment
comment on: http://stackoverflow.com/a/25943409
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40617670
type: QuestionComment
comment on: http://stackoverflow.com/q/25943770
has text: @Bobski oh okay, i revised my answer tol check it
score: 0
type: Comment

http://stackoverflow.com/q/25920045
type: Question
has comment: http://stackoverflow.com/comment/40575184
tagged with: javascript
score: 0
has title: Is there any solution that will allow me to process this many characters into a string with Node.js?
answer count: 1
has comment: http://stackoverflow.com/comment/40575733
tagged with: out-of-memory
has answer: http://stackoverflow.com/a/25921200
tagged with: node.js
type: AnsweredQuestion
has body: My question: Is there any solution that will allow me to process this many characters into a string with Node.js? The problem: I need to compute a huge (array, and then) string of character combinations in Node.js, like so: var fs = require('fs'); var legalChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_']; var fiveChars = [legalChars, legalChars, legalChars, legalChars, legalChars]; //output all possible combinations of the arrays within //fiveChars function allPossibleCases(arr) { if (arr.length === 0) { return []; } else if (arr.length === 1) { return arr[0]; } else { var result = []; var allCasesOfRest = allPossibleCases(arr.slice(1)); // recur with the rest of array for (var c in allCasesOfRest) { for (var i = 0; i &lt; arr[0].length; i++) { result.push(arr[0][i] + allCasesOfRest[c]); var val = arr[0][i] + allCasesOfRest[c]; } } return result; } } // join array of results into string var result = allPossibleCases(fiveChars).join('", "'); // this essentially writes the string in the form of a Node module //containing a giant array fs.writeFile("./data/fiveChars.js", 'fiveChar = ["' + result + '"]; \r\n module.exports = fiveChar;', function(err) { if(err) { console.log(err); } else { console.log("The file was saved!"); } }); I want to continue adding character rows up to 16 rows: var sixteenChars = [legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars, legalChars]; The problem is that Node cant cope with this all at once. FATAL ERROR: JS Allocation failed - process out of memory Aborted I don't want to download more RAM, just looking for a way to handle this calculation process over time rather than filling the memory allocation up.
has comment: http://stackoverflow.com/comment/40577057
accepted answer: http://stackoverflow.com/a/25921200
has comment: http://stackoverflow.com/comment/40575698
has comment: http://stackoverflow.com/comment/40575156

text-decorations
type: Tag
tag name: text-decorations
tags question: http://stackoverflow.com/q/25935993

http://stackoverflow.com/q/26024205
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/19871728
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: Referring to this post: How to create image curved using css or jquery (See picture) and this JSFiddle: http://jsfiddle.net/AVRLv/ How can I enable the picture to stretch too? Not only a box-radius. I want to be able to make a curved form of an image controllable with a value of how much it is bended. I've already figured out how to change the width and size of my image: HTML Trust Value: Javascript $(function() { $( "#slider-range-max" ).slider({ range: "min", min: 0, max: 10, value: 0, step: .001, slide: function( event, ui ) { $("#image").width(ui.value * 100); $("#image").height(ui.value * 50); } }); $( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) ); }); Thank you in advance! Stijn
score: 1
has title: Bend an image based on a slider value
favorite count: 0
has answer: http://stackoverflow.com/a/26025699
type: Question
tagged with: css
has comment: http://stackoverflow.com/comment/40762014
tagged with: image-processing
upvote count: 1
answer count: 1

http://stackoverflow.com/a/26192992
type: Answer
score: 1
has body: Sure, the request is not sent at that exact 80ms because there is some code inside $http method like reading the config, building the data, creating http request object,....All of this does take time which causes delay until the request is actually on the wire. What is happening between 80ms and 240ms time frame That's the time taken by the code inside $http method. To be exact, there is also time taken to bootstrap your angular app, create your restFactoryService, make restFactoryService.getInstanceDetails() function call,...
upvote count: 1
answers question: http://stackoverflow.com/q/26018093
downvote count: 0
has comment: http://stackoverflow.com/comment/41072734
has comment: http://stackoverflow.com/comment/41072848

http://stackoverflow.com/a/26000887
upvote count: 2
has body: The mysql/mysql2 modules support Blob/binary column types, so for those modules all you have to do is pass in the Buffer instance as the column value. For example: // ... // no need for `new` with `Buffer.concat()` var jsfile = Buffer.concat(chunks); var query = 'INSERT INTO `files` SET ?', values = { type: 'pdf', data: jsfile }; mysql.query(query, values, function(err) { if (err) throw err; // TODO: improve // do something after successful insertion });
accepted answer of: http://stackoverflow.com/q/26000305
score: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26000305
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40696286
score: 0
comment on: http://stackoverflow.com/q/25987926
has text: if i turn magic_quotes off is there any security issue
type: Comment
type: QuestionComment

google-chrome
tags question: http://stackoverflow.com/q/25885500
tags question: http://stackoverflow.com/q/25975535
tags question: http://stackoverflow.com/q/25975274
tags question: http://stackoverflow.com/q/26010710
tags question: http://stackoverflow.com/q/26010355
tags question: http://stackoverflow.com/q/25952260
tags question: http://stackoverflow.com/q/25922918
tags question: http://stackoverflow.com/q/26015626
tags question: http://stackoverflow.com/q/25935366
tags question: http://stackoverflow.com/q/25882578
tags question: http://stackoverflow.com/q/25964940
tags question: http://stackoverflow.com/q/25935671
tags question: http://stackoverflow.com/q/25991194
tags question: http://stackoverflow.com/q/26003992
tags question: http://stackoverflow.com/q/26001805
tags question: http://stackoverflow.com/q/25937783
tags question: http://stackoverflow.com/q/25879439
tags question: http://stackoverflow.com/q/25919316
tags question: http://stackoverflow.com/q/25968832
tags question: http://stackoverflow.com/q/25999037
tags question: http://stackoverflow.com/q/25960680
tags question: http://stackoverflow.com/q/26023331
tags question: http://stackoverflow.com/q/25976608
tags question: http://stackoverflow.com/q/25967482
tags question: http://stackoverflow.com/q/25885658
tags question: http://stackoverflow.com/q/25998521
tags question: http://stackoverflow.com/q/25929686
tags question: http://stackoverflow.com/q/26030463
tags question: http://stackoverflow.com/q/25920107
tags question: http://stackoverflow.com/q/25935894
tags question: http://stackoverflow.com/q/25919045
tags question: http://stackoverflow.com/q/25956441
tags question: http://stackoverflow.com/q/25933556
tags question: http://stackoverflow.com/q/25965351
tags question: http://stackoverflow.com/q/25904424
tags question: http://stackoverflow.com/q/26022818
tags question: http://stackoverflow.com/q/25902560
tags question: http://stackoverflow.com/q/25939889
tags question: http://stackoverflow.com/q/25880316
tags question: http://stackoverflow.com/q/25955269
tags question: http://stackoverflow.com/q/25990772
tags question: http://stackoverflow.com/q/26022801
tags question: http://stackoverflow.com/q/25941311
tags question: http://stackoverflow.com/q/26030047
tags question: http://stackoverflow.com/q/25939273
tags question: http://stackoverflow.com/q/26003255
tags question: http://stackoverflow.com/q/25906262
tags question: http://stackoverflow.com/q/25951200
tags question: http://stackoverflow.com/q/25980443
tags question: http://stackoverflow.com/q/25968920
tags question: http://stackoverflow.com/q/26024689
type: Tag
tags question: http://stackoverflow.com/q/25920964
tags question: http://stackoverflow.com/q/25884768
tags question: http://stackoverflow.com/q/25983432
tags question: http://stackoverflow.com/q/25903625
tags question: http://stackoverflow.com/q/25953004
tag name: google-chrome
tags question: http://stackoverflow.com/q/25924360
tags question: http://stackoverflow.com/q/25923947
tags question: http://stackoverflow.com/q/25983250
tags question: http://stackoverflow.com/q/25949470
tags question: http://stackoverflow.com/q/26030866
tags question: http://stackoverflow.com/q/26020973
tags question: http://stackoverflow.com/q/25967248
tags question: http://stackoverflow.com/q/25931617
tags question: http://stackoverflow.com/q/25892394
tags question: http://stackoverflow.com/q/25977061
tags question: http://stackoverflow.com/q/25966849
tags question: http://stackoverflow.com/q/25987981
tags question: http://stackoverflow.com/q/25884237
tags question: http://stackoverflow.com/q/26021133
tags question: http://stackoverflow.com/q/25977978
tags question: http://stackoverflow.com/q/25882950
tags question: http://stackoverflow.com/q/25908405
tags question: http://stackoverflow.com/q/25923835
tags question: http://stackoverflow.com/q/25911736
tags question: http://stackoverflow.com/q/25890495
tags question: http://stackoverflow.com/q/25960616
tags question: http://stackoverflow.com/q/25897883

http://stackoverflow.com/comment/40694639
score: 0
has text: @dandavis I was thinking more like 15 separate lines of simple calculators, each with their own ability to calculate independently, rather than just having one.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25986404

http://stackoverflow.com/q/25962766
has answer: http://stackoverflow.com/a/25971954
type: Question
tagged with: charts
tagged with: javascript
score: 0
has title: JavaScript line and area chart with similar interface as shown
upvote count: 1
answer count: 1
tagged with: highcharts
downvote count: 1
favorite count: 0
type: UnansweredQuestion
has body: Is there any chart API which can provide a similar interface as shown in the image? I have worked on amcharts and highcharts before but after endless tweakings I could'nt get them to look similar to the one shown in the image. Especially: Ability to use gradients Bullets in the line chart So far I have explored (not worked on them) these other APIs: d3, fusion charts, rickshaw, protoshart, flotr but none the examples shown on their look similar to the one as shown. There are a large number of charts API and cannot explore each and every one.

http://stackoverflow.com/q/26008168
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/40733259
type: AnsweredQuestion
has body: So, essentially I have this Javascript which interprets the JSON from my php code. It works great on the local server, however, when I try to move the script to a different server it will not work. I have added the <?php header("Access-Control-Allow-Origin: *"); ?> also i've declared my database connection as global within my PHP function. I'm confused as to why these solutions aren't working.. Also, I understand some of the script is iffy, but I'm only interested in figuring out why its not working from different servers. Some Info when I look at the web console from firebug: Access-Control-Allow-Orig... * Connection Keep-Alive Content-Length 0 Content-Type application/json Date Wed, 24 Sep 2014 04:22:57 GMT Keep-Alive timeout=5, max=100 Server Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips DAV/2 mod_bwlimited/1.4 X-Powered-By PHP/5.4.29 Looks like it is communicating with server but not able to interpret data? thoughts? Also, this error comes up in the console from the remote server but not when I run on local server: SyntaxError {stack: (...), message: "Unexpected end of input"}message: "Unexpected end of input"stack: (...) Object {readyState: 4, getResponseHeader: function, getAllResponseHeaders: function, setRequestHeader: function, overrideMimeType: function… parsererror The PHP code is pretty long (and I prefer not to release all of it) - however here is the shortened version: <?php header("Access-Control-Allow-Origin: *"); header('Content-Type: application/json'); require "../database/db.php"; if (is_ajax()) { if (isset($_POST["action"]) && !empty($_POST["action"])) { //Checks if action value exists $action = $_POST["action"]; switch($action) { //Switch case for value of action case "test": test_function(); break; } } } //Function to check if the request is an AJAX request function is_ajax() { return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; } function test_function(){ $c="1"; glob…
has comment: http://stackoverflow.com/comment/40732837
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: Get json ajax php form to work remotely
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40732921
has comment: http://stackoverflow.com/comment/40732884
has comment: http://stackoverflow.com/comment/40732959
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26019254
has comment: http://stackoverflow.com/comment/40733135
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40732913
linked to: http://stackoverflow.com/q/3839966
accepted answer: http://stackoverflow.com/a/26019254
has answer: http://stackoverflow.com/a/26032682
has comment: http://stackoverflow.com/comment/40733411
has comment: http://stackoverflow.com/comment/40732827
has comment: http://stackoverflow.com/comment/40733094
has comment: http://stackoverflow.com/comment/40732943
possible better answer: http://stackoverflow.com/a/26032682

http://stackoverflow.com/q/25885457
has body: I am using Bootstrap.When press enter in textbox ,open Modal popup with Bootstrap.But when I using mobile phone ,I cant detect pressing enter.How to detect it ?Can you help me please? My code ; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('.form-control').keyup(function (e) { if (e.which == 13) { $('.modal').modal('show'); } }); }); &lt;/script&gt;
answer count: 2
has answer: http://stackoverflow.com/a/25885516
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25885631
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 3
linked to: http://stackoverflow.com/q/6545086
upvote count: 3
has title: How to detect pressing enter on mobile device keyboard using jquery?
type: Question
has comment: http://stackoverflow.com/comment/40511001
tagged with: javascript

http://stackoverflow.com/q/25958942
score: 0
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25959077
has title: zAccordion - slider jquery and html - text on image slide
accepted answer: http://stackoverflow.com/a/25959077
answer count: 1
tagged with: jquery
has body: I have a script in jquery: * * and some html: * * The quastion is: How can I generate some text on my image slide in CSS for example? Please help me! Thank you
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/comment/40670868
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25974001
type: Comment
has text: I'm a little bit confused about where to place into the function.the script is placed at the bottom of the page. the page is full of images and the images is fixed and should appear when the user scroll down. if you were me, where would you wrap to the function?

http://stackoverflow.com/q/25900237
tagged with: jquery
has title: JQuery Hide rows (by attribute) when combobox value changes
has answer: http://stackoverflow.com/a/25900306
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25900306
type: Question
has body: I have a blocks dropdown. When the blocks dropdown is changed, I would like to hide the rows with a blockID attribute value not equal to the selected block option value. 102 Thermistor 1535 NW Sensors Point Six No 7054103C00000000 No $('#cmbBlockID').change(function(){ $("tr").show(); cmbBlkID = $("#cmbBlockID").prop("value"); if (cmbBlkID != 0){ $("a[blockID!='"+cmbBlkID+"']").closest("tr").hide();//the line in question } }); I am getting inconsistent results. Is there a better way to write the line to hide some of the rows without using "closest"?
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/26003550
possible better answer: http://stackoverflow.com/a/26003639
has body: I am trying to create a simple Validation Function for validating User inputs at This Demo. now my problem is using the $(this). to reference for each of the inputs which has same type. For example at this example I tried the $('#email1').parent().after(' Can Not be Empty '); which works but when I use the $(this).parent().after(' Can Not be Empty '); I am not getting any thing for validation Here is the code which I have E-Mail 1: E-Mail 2: Validate
accepted answer: http://stackoverflow.com/a/26003677
has comment: http://stackoverflow.com/comment/40724417
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26003677
type: Question
has answer: http://stackoverflow.com/a/26003745
has title: Issue on Referencing $(this) to Multi Inputs on Submit Click
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26003639

http://stackoverflow.com/q/25983035
upvote count: 3
has answer: http://stackoverflow.com/a/25983114
has answer: http://stackoverflow.com/a/25983115
has answer: http://stackoverflow.com/a/25983214
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25983114
has title: AngularJS function available to multiple controllers
type: Question
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25983214
linked to: http://stackoverflow.com/q/19614545
has answer: http://stackoverflow.com/a/25983241
answer count: 4
favorite count: 0
has body: Building a simple control panel in AngularJS + Rest API. Built a simple factory that makes the API request (GET, POST) and returns necessary data to a success callback. The return data needs to be processed and alter the $scope since the API can return server-side form field errors. I cannot build the processing/altering $scope within the factory since the factory doesn't (and shouldn't) have access to the scope. I would prefer not to processing/applying in the success callback since it would be repetitive (once per API request). What is the best "Angular way" to solve this problem? One possible solution is to have a function exist outside of the Angular application and then just pass it the $scope and necessary data. This feel like a poor work around (see below). myApp.controller("saveForm", ["$scope", "api", function($scope, api), function() { ... $scope.submit = function() { api("POST", url, $scope.data, function(data) { //onSuccess processData($scope, data); }); } ... }]); myApp.factory('api', ['$http', function($http) { return function(method, url, input, success, error) { //Retrieve data from API. Note that factory DOES NOT have access to $scope. $http(... } }]); var processData = function(scope, data) { angular.forEach(data, function(value, key)) { scope.... } }
tagged with: angularjs

http://stackoverflow.com/a/26040705
has body: I have been using the following to take a picture using the phone's camera and display it on the web page: &lt;input type="file" id="fileInput" accept="image/*" onchange="inputFileChanged();" /&gt; &lt;img alt="The Picture" src="Content/1.jpg" id="imgDisplay" /&gt; &lt;script type="text/javascript"&gt; function inputFileChanged() { //alert("Input File Changed"); var files = document.getElementById("fileInput").files; if (window.FileReader) { //Check browser - does it support File Reader? //alert("reader OK"); loadImageFile(files); } else { alert("File Reader not Supported"); } } function loadImageFile(files) { if (files &amp;&amp; files.length) { var reader = new FileReader(); reader.onload = (function (theImageElement) { return function (e) { //alert("reader loaded"); theImageElement.src = e.target.result; } })(document.getElementById("imgDisplay")); reader.onerror = function (e) { alert("error " + e.target.error.code); } reader.readAsDataURL(files[0]); } else { alert("no file"); } } &lt;/script&gt; On iPhone Safari iOS8, error code 4 (NOT_READABLE_ERR) is returned. This is a known bug (supposed to be resolved on next release). No problems (so far) with Chrome on iPhone iOS8
type: Answer
answers question: http://stackoverflow.com/q/25978111
score: 0

http://stackoverflow.com/comment/40493873
type: Comment
type: QuestionComment
has text: @hwnd may i know the reason?
score: 0
comment on: http://stackoverflow.com/q/25875909

http://stackoverflow.com/q/25895648
has comment: http://stackoverflow.com/comment/40531282
favorite count: 0
has comment: http://stackoverflow.com/comment/40532931
has comment: http://stackoverflow.com/comment/40531786
has body: So i'm trying to make a drawing application in html/javascript, where i want to save the files to mysql/phpmyadmin. My problem is connecting to the database i set up. What's happening is that the user draws on the canvas, clicks on a save button and i send the lines (saved in an array) and the user name from my javascript file to a php file which sends the information to the database. I've tried looking online for a solution but i can't seem to find anything that helps me. It's probably right in front of me, but i've never tried writing in javascript and php. Just to be sure there's no confusion: I can't seem to figure out how to send the data from my javascript file to my php file and update the database Here's what i got so far: Html: Save image Javascript: function saveImage() { var position = JSON.stringify(allMousePos); author = prompt("Please type your name"); $.ajax({ type: 'post', url: 'https://localhost/folder/database.php', data: {author: author, position: position}, success: function( data ) { console.log( data ); } }); } Php: $dbhost = 'localhost'; $dbuser = 'User'; $dbpass = 'pass'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if (!$conn) { die('Could not connect: ' . mysql_error()); } if (!get_magic_quotes_gpc()) { $author = addslashes($_POST['author']); $mousepositions = addslashes($_POST['position']); } else { $author = $_POST['name']; $mousepositions = $_POST['position']; } var_dump($author); $sql = "INSERT INTO Images (Author, Image) VALUES ('$author', '$mousepositions')"; mysql_select_db('db_to_use'); $retval = mysql_query($sql, $conn); if (!$retval) { die('Could not enter data: ' . mysql_error()); } echo "Entered data successfully\n"; mysql_close($conn); I'm not getting any output from the console in chrome or firefox when running this, and nothing in the database I don't know if you need any more info, but let me know if you do. The database only has 3 fields, an id which auto increments, and then author and the positions.
type: UnansweredQuestion
tagged with: phpmyadmin
has comment: http://stackoverflow.com/comment/103424387
has answer: http://stackoverflow.com/a/25897057
tagged with: php
score: 3
has comment: http://stackoverflow.com/comment/40529648
downvote count: 2
has answer: http://stackoverflow.com/a/25895934
has comment: http://stackoverflow.com/comment/40529685
type: Question
has comment: http://stackoverflow.com/comment/40531749
has comment: http://stackoverflow.com/comment/40531223
has title: Connecting to database on phpmyadmin using javascript and php
upvote count: 5
tagged with: javascript
answer count: 2

http://stackoverflow.com/comment/40721630
has text: This sounds like a good compromise. Ideally I'd really like to remove that first entry, but I suspect I'd have to fiddle with the source for that. I'm still thinking about it.
type: AnswerComment
comment on: http://stackoverflow.com/a/26001343
score: 0
type: Comment

http://stackoverflow.com/q/26011391
has answer: http://stackoverflow.com/a/26012155
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/26011577
linked to: http://stackoverflow.com/q/1885557
tagged with: arrays
has comment: http://stackoverflow.com/comment/40738605
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26011568
has title: javascript check existence of elements of 1 array inside the other
linked to: http://stackoverflow.com/q/11076067
has answer: http://stackoverflow.com/a/26011577
has body: For searching elements of one array inside the other, one may use the indexOf() on the target of search and run a loop on the other array elements and in each step check existence. This is trivial and my knowledge on Javascript is too. Could any one please suggest a more efficient way? Maybe even a built-in method of the language could help? Although I couldn't hit to such a method using google.
possible better answer: http://stackoverflow.com/a/26012155
type: Question
has comment: http://stackoverflow.com/comment/40738708

http://stackoverflow.com/comment/40528892
type: Comment
has text: Also, you need to make sure the CSS in my answer is applied to the `img`, then you declare the height and width on the parent element (`.main-image` in this case)
comment on: http://stackoverflow.com/a/25876005
type: AnswerComment
score: 0

http://stackoverflow.com/q/25895272
score: 0
has comment: http://stackoverflow.com/comment/40528721
type: Question
accepted answer: http://stackoverflow.com/a/25895316
tagged with: javascript
has title: First and Last Number in String?
answer count: 1
has body: I'm really struggling to extract two numbers from a string using Regex. The numbers can be positive, negative or 0. I have extremely limited experience of Regex. The string always takes a format similar to: "rotateX(-90deg) rotateY(-90deg)" My best attempts are the following. This first approach gets me the first integer but does not get me the + / - sign: var rx = string.replace( /(^.+\D)(\d+)(\D.+$)/i,'$2') And, the following seems to get me the second, potentially as an element in an array but also does not get me the +/- sign: var ry = string.match(/(\d+)/i);
has answer: http://stackoverflow.com/a/25895316
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has comment: http://stackoverflow.com/comment/40756067
type: AnsweredQuestion

http://stackoverflow.com/comment/40614806
score: 1
comment on: http://stackoverflow.com/q/25942219
type: Comment
type: QuestionComment
has text: That;s one awful book.

http://stackoverflow.com/comment/40760243
comment on: http://stackoverflow.com/q/26023252
score: 0
type: Comment
type: QuestionComment
has text: This can absolutely be done with `$.ajax()`. However, if the form is on a different website, then how are you appending this button to the 'generated pages'? I'm a bit confused. If you could clarify that point I'm sure we could help.

http://stackoverflow.com/comment/40738953
type: Comment
type: QuestionComment
has text: What is `Marker()` ?
score: 0
comment on: http://stackoverflow.com/q/26011314

http://stackoverflow.com/comment/40744765
comment on: http://stackoverflow.com/q/26014078
score: 0
has text: What exactly is `^.?\/` supposed to mean?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25989813
possible better answer: http://stackoverflow.com/a/25990544
has body: Often times I want to deal with both arrays and single objects in the same fashion. For example I have the property of an object that can either be an array or just a string (look at the scale property): [ { "name": "Experiment type14", "id": "00000000014", "scale": ["Whole Brain", "Cell"], }, { "name": "Experiment type15", "id": "00000000015", "scale": "Cell", } ] What I want is to show my scale like here: &lt;span ng-repeat="scale in experimentType.scale"&gt; &lt;!--some decoration here--&gt; {{scale}} &lt;/span&gt; Of course this won't work for a single string values. Is there any elegant way not to worry whether I'm dealing with a string or with an array?
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/25990539
has comment: http://stackoverflow.com/comment/40699587
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25990544
answer count: 2
tagged with: arrays
downvote count: 0
has title: ng-repeat over a non-array/object / dealing with arrays and non-arrays the same way
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25990539
has comment: http://stackoverflow.com/comment/40699511
tagged with: angularjs-ng-repeat

http://stackoverflow.com/a/25948247
answers question: http://stackoverflow.com/q/25948230
has comment: http://stackoverflow.com/comment/40623823
has body: No javascript can secure your password. Use SSL. Or better yet, use services your user are already registered to like Google, Facebook or any openID/oAtuh provider so we don't need to go thought the annoying process of creating a new unique password verify the email :)
has comment: http://stackoverflow.com/comment/40623865
upvote count: 6
has comment: http://stackoverflow.com/comment/40623871
type: Answer
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/40623877

http://stackoverflow.com/comment/40575500
type: Comment
type: QuestionComment
has text: It's great that you're not jumping off bridges by forcing 70KB down people's throats but please explain what `$ajax({`... is if it is not jQuery?
comment on: http://stackoverflow.com/q/25920528
score: 0

http://stackoverflow.com/q/26011869
answer count: 1
has comment: http://stackoverflow.com/comment/40739519
has comment: http://stackoverflow.com/comment/40739338
has answer: http://stackoverflow.com/a/26014161
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26014161
has comment: http://stackoverflow.com/comment/40739226
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40740238
favorite count: 0
has comment: http://stackoverflow.com/comment/40739365
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Video background doesn't work (html, css, js)
tagged with: video
linked to: http://stackoverflow.com/q/10630835
upvote count: 1
has body: i'm working on a code that create a video background in loop. Unfortunately the code doesn't work if I change the video source, because I copied the code from a tutorial online: http://codepen.io/bldng/pen/biGJx I need help to solve the problem. This is my code videosfondo prova

http://stackoverflow.com/a/25949876
type: Answer
has body: setAttributeNS does the Job! svgItem.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href", "http://link/to.png");
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40751376
has comment: http://stackoverflow.com/comment/40626287
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25949470
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25949470
has comment: http://stackoverflow.com/comment/40714654
has comment: http://stackoverflow.com/comment/40716270

http://stackoverflow.com/comment/40750174
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/26017964
has text: Could you also put in what have you tried.

http://stackoverflow.com/comment/40519694
has text: Thanks! I don't really understand why Error's message (and probably name) is not enumerable, but your answer is the one I was expecting.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25890496

http://stackoverflow.com/q/25952716
has body: I´d like to control the look of a HTML page using the strings I receive from my Node.js server via Socket.io. Each string I receive becomes an entry in a list (see screenshot below). Until here it works. Now, I want to use these strings to control other things, for example the color of the heading I´m using a string comparison. I tried to turn the heading green whenever the received string is "on". However, the following command does not turn the heading green: if(receivedData == "on") { $("#currentData").css("color", "green"); } But if I tell my computer to turn the heading green when any message other than "on" comes in. Then the heading is turning green. However the incoming message is exactly "on"! In this case the heading should not become green! if(receivedData != "on") { $("#currentData").css("color", "green"); } What am I doing wrong? Here is the complete client-side HTML code and the link to a screenshot. Browser Info Panel CurrentData Screenshot: https://i.sstatic.net/14FW8.jpg
linked to: http://stackoverflow.com/q/863524
has title: Controlling a HTML page via Socket.io
tagged with: socket.io
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/10805711
score: 0
has answer: http://stackoverflow.com/a/25974139
accepted answer: http://stackoverflow.com/a/25974139
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40652417
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/25957017
has comment: http://stackoverflow.com/comment/40644373
has comment: http://stackoverflow.com/comment/40646354
has comment: http://stackoverflow.com/comment/40646247
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25956895
score: 0
type: Answer
has body: Actually you can't. You can identify which input box has a value and create your query according to that. However, it is possible to fill multiple inputs and submit the form, so that won't work. One option is to use a dropdown and let the user choose which input it wants to fill. For example: Student ID Last name Exam date Now you know on which field the user wants to query. You can catch this with e.g.: <?php //Note that you should add checks using e.g. isset() $value = $_POST['typeValue']; if($_POST['type'] == "student_id") { //Query with $value on student_id } elseif($_POST['type'] == "last_name") { //Query with $value on last_name } elseif($_POST['type'] == "date") { //Query with $value on date } ?> Or if it's in the same table and the option values are the same as the column names in your table: <?php //Note that you should add checks using e.g. isset() //Also note this is vulnerable for SQL injection, using prepared statements will solve that. $query = $db->query("SELECT * FROM records WHERE ".$_POST['type']." LIKE '%".$_POST['typeValue']."%'" ); ?> You also can fix this using Javascript. An option with javascript is to identify which input field is filled as last and create your query according to the last filled input field.
has comment: http://stackoverflow.com/comment/40647566
has comment: http://stackoverflow.com/comment/40646393
accepted answer of: http://stackoverflow.com/q/25956895
has comment: http://stackoverflow.com/comment/40646208

http://stackoverflow.com/comment/40716111
comment on: http://stackoverflow.com/q/25999128
score: 0
has text: You're utilizing jQuery but you're not loading the jQuery libraries at all. You need to include jQuery to use jQuery functions.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/104806774
type: Comment
comment on: http://stackoverflow.com/a/33782011
score: 0
type: AnswerComment
has text: I know this is old but @Apoorv: You already hat to write down own logic to use "find", since the function requires a function as its parameter. But you can easily replace find with filter, since both functions have the same method signature. Filter returns an array, so simply access the first element. Find automatically returns the first found element.

http://stackoverflow.com/comment/40705528
has text: i want the text only to show when the box is clicked expands red.. and when when you click on another the text then hides like the box gets goes back to how it was and then click on other box and shows the text, so like the boxes do but with the text too..
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25993364
type: QuestionComment

http://stackoverflow.com/a/26000554
downvote count: 0
has comment: http://stackoverflow.com/comment/40718878
has body: Iterate the text and replace using the old parameter: $('td').text(function (i, old) { $(this).html(old.replace('0', '').replace('1', '')) }); jsFiddle
answers question: http://stackoverflow.com/q/26000367
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/40512177
type: AnswerComment
score: 0
has text: the PHP code prints the values of all the hidden fields, I just want the one that was clicked. How can i do that in PHP? thnx
comment on: http://stackoverflow.com/a/25884693
type: Comment

http://stackoverflow.com/q/26011985
possible better answer: http://stackoverflow.com/a/26012047
upvote count: 1
has comment: http://stackoverflow.com/comment/40739960
linked to: http://stackoverflow.com/q/19719626
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/26012125
has answer: http://stackoverflow.com/a/26012047
has body: I have read this article Need helping with innerHTML and array input variables. But when i do this: if (errors.length &gt; 0) { var htmlErrors =''; for (var i = 0; i &lt; errors.length; i++) { htmlErrors += errors[i]; } document.getElementById("registration_errors").innerHtml = htmlErrors; I get white screen. Where is my mistake?
has comment: http://stackoverflow.com/comment/40739568
tagged with: innerhtml
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40739603
downvote count: 0
score: 1
has title: innerHtml form array
type: Question
accepted answer: http://stackoverflow.com/a/26012125
answer count: 2
has comment: http://stackoverflow.com/comment/40739512

http://stackoverflow.com/a/25931290
has comment: http://stackoverflow.com/comment/40604160
upvote count: 2
has comment: http://stackoverflow.com/comment/40594493
has comment: http://stackoverflow.com/comment/40595295
has comment: http://stackoverflow.com/comment/40595373
has comment: http://stackoverflow.com/comment/40594942
has comment: http://stackoverflow.com/comment/40594709
has comment: http://stackoverflow.com/comment/40604103
answers question: http://stackoverflow.com/q/25930937
has body: Your state definitions say that you will have a home state with the body and content views, however from what you describe you define the content view as a child of the body view, not your home state. Basically you're saying with your state deceleration that you will do this: index.html for the home state: &lt;div ui-view="body"&gt;&lt;/div&gt; &lt;div ui-view="content"&gt;&lt;/div&gt; However what you're actually doing is: &lt;div ui-view="body"&gt; &lt;div ui-view="content"&gt;&lt;/div&gt; &lt;/div&gt; Meaning that you have made the content view a child of body and not a sub view if your main state. See this plunk.
has comment: http://stackoverflow.com/comment/40594999
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40596546
downvote count: 0
has comment: http://stackoverflow.com/comment/40594598

http://stackoverflow.com/comment/40596114
has text: Then for browser compatibility you're going to have to add the browser prefixed versions of each css styles in your script and it's definitely going to look ugly.. BTW why did you post the question twice?
comment on: http://stackoverflow.com/q/25932008
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26023936
has comment: http://stackoverflow.com/comment/40761676
upvote count: 1
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40761571
has comment: http://stackoverflow.com/comment/40761842
has body: This matches nothing in your string ([ \w-]*: )? Since it was optional, that doesn't matter because it gets caught by the all inclusive (.+) If you were trying to match the [UT] part with it's separator, it would look something like this (\[\w+\][\s\-]*)? As noted in the comments, you only have one number in parentheses but your regex requires three sets of them, separated by commas. This will allow any number of numbers, separated by commas indefinitely (I don't know if there's a limit or not). \((\d+,\s)*(\d+)\) If you need something more specific, you'll have to be more specific about what template your matching, not a specific case. But the best I can figure with what you've provided is ^(\[\w\][\s\-]*)?(.+)\((\d+,\w)*(\d+)\)Rerun
answers question: http://stackoverflow.com/q/26023754
has comment: http://stackoverflow.com/comment/40761982

http://stackoverflow.com/q/25907021
upvote count: 1
has comment: http://stackoverflow.com/comment/40550866
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40550209
score: 1
has title: how to create a dynamic array of functions
type: Question
accepted answer: http://stackoverflow.com/a/25907298
has comment: http://stackoverflow.com/comment/40550458
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25907298
has body: I want to initialize a array of functions dynamically, Example : Transform the following code : $filter('orderBy')(datas, [ function (obj) { return filterTable(obj, sortInfos.fields[0]); }, function (obj) { return filterTable(obj, sortInfos.fields[1]); }, function (obj) { return filterTable(obj, sortInfos.fields[2]); }, function (obj) { return filterTable(obj, sortInfos.fields[3]); } ], revert); To : $filter('orderBy')(datas, myArrayOfFunction, revert);
tagged with: angularjs

http://stackoverflow.com/comment/40655675
type: QuestionComment
comment on: http://stackoverflow.com/q/25965796
has text: Tom, actually no. I am using this in wordpress, and since it is a responsive website and all that stuff it would be a nightmare make that clean, also, I just prefer to keep my css clean and easy.
score: 0
type: Comment

http://stackoverflow.com/comment/40651255
type: AnswerComment
has text: Thanks for the quick response. How do I return the promise in get key? return $promise?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25963503

http://stackoverflow.com/comment/40753671
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26019788
has text: Typo mistake :3. Thanks :)
type: Comment

http://stackoverflow.com/q/25963251
type: UnansweredQuestion
upvote count: 1
has title: Is relative URL/path possible in openDialog()?
has body: Is it possible to use a relative path for the URL? changelog.htm is in the same directory as options.xul Section of options.xul &lt;setting title="&amp;options.changelog.title;" type="control"&gt; &lt;button label="&amp;options.changelog.label;" oncommand="openDialog('chrome://myAddon/content/changelog.htm', '', 'dialog=no, modal=no, resizable=yes, width=500, height=600');"/&gt; &lt;/setting&gt; Are there alternatives? Update: If I try the following I get an error "NS_ERROR_MALFORMED_URI:" in console &lt;setting title="&amp;options.changelog.title;" type="control"&gt; &lt;button label="&amp;options.changelog.label;" oncommand="openDialog('changelog.htm', '', 'dialog=no, modal=no, resizable=yes, width=500, height=600');"/&gt; &lt;/setting&gt; Update2: I should have mentioned that my testing was on &lt;em:optionsType&gt;2&lt;/em:optionsType&gt;, and as explained in the following answer, it does not seem to work.
score: 1
type: Question
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40651299
tagged with: firefox-addon-restartless
tagged with: firefox-addon
has answer: http://stackoverflow.com/a/25966788
favorite count: 0

http://stackoverflow.com/q/25886485
type: Question
accepted answer: http://stackoverflow.com/a/25889169
has comment: http://stackoverflow.com/comment/40513010
has comment: http://stackoverflow.com/comment/40512818
tagged with: javascript
has comment: http://stackoverflow.com/comment/40514262
has answer: http://stackoverflow.com/a/25889169
upvote count: 2
answer count: 3
tagged with: onchange
has answer: http://stackoverflow.com/a/25886903
has body: Im having trouble having code onchange inside onchange event. some works and some dont work due to that. &lt;script&gt; $(document).on('change', '.sellkop', function() { // this is radio button if ($("#rs").is(':checked')) { $("#text_container").after(price_option()); }; if ($("#rk").is(':checked')) { $("#price_container").remove(); $("#licensenumber_c").css({"display": 'none' }); }; }); $('#category_group').on('change', function() { // this is select options if ($(this).val() == 101) { $("#underKategory").css({"display": 'none'}); $("#modelcontainer").remove(); $(".toolimage").css({ "display": 'block'}); $('.sellkop').on('change', function() { // this is radio button if ($("#rs").is(':checked')) { $("#licensenumber_c").css({"display": 'block'}); $(".toolimage").css({"display": 'block' }); } else { $(".toolimage").css({"display": 'none'}); } }); } else { $(".bilar").remove(); $(".toolimage").css({ "display": 'none'}); } if ($(this).val() == 102) { $(".houses_container").remove(); $(".toolimage").css({"display": 'none'}); $("#underKategory").css({"display": 'inline-block'}); $("#modelcontainer").remove(); } ///............many other values continue }); &lt;/script&gt; i know there is better way to manage this code and simplify it , how can i do it ? EDIT: what i want is : if i select an option , then get values to that option, then under this category option there is radio buttons , then every check button i need to get some data displayed or removed here is a fiddle there looks my problem by jumping from categories when i select buy or sell , so if i select category-->check buy -->then select others . i dont get same result as if i select directly cars ---> buy
tagged with: jquery
has comment: http://stackoverflow.com/comment/40513021
favorite count: 0
has comment: http://stackoverflow.com/comment/40512862
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Onchange inside onchange jquery
has answer: http://stackoverflow.com/a/25887884
possible better answer: http://stackoverflow.com/a/25886903
has comment: http://stackoverflow.com/comment/40512888
has comment: http://stackoverflow.com/comment/40513049
has comment: http://stackoverflow.com/comment/40514569

http://stackoverflow.com/comment/40607757
comment on: http://stackoverflow.com/q/25932990
score: 0
type: QuestionComment
type: Comment
has text: Thanks, it looks promising, but I want the button to be clickable without opening the collapsible. Which means it has to be in the h tag.

http://stackoverflow.com/comment/40620791
has text: Also try resetting 'sub_cat', 'sub_cat1' values to '0' after you display the image. It may help to solve the issue.
score: 0
comment on: http://stackoverflow.com/q/25945671
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40515706
has text: i have one question though as soon as i click on the next button on my 2th form to come to the form with the radios in mention it alerts me can we make it so that only if i click on the submit or next button to alert me not in the start of form 3 ?
type: Comment
comment on: http://stackoverflow.com/a/25887443
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40612687
has text: Is the other question relevant (if so, link it), or did you just refer to it because "PHP sorting issue" is not accepted as a title?
score: 0
comment on: http://stackoverflow.com/q/25941142
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40747293
score: 0
has text: I know it looks ridiculous but I wrote a big jumble of code and I wanted to see other solutions than the obvious ones
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26016444

http://stackoverflow.com/q/25957313
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40641408
tagged with: node.js
score: 2
has comment: http://stackoverflow.com/comment/40647532
has comment: http://stackoverflow.com/comment/40641903
tagged with: http://stackoverflow.com/tag/json
has title: Is express Body parser Asynchronous?
type: Question
has comment: http://stackoverflow.com/comment/40641912
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/40641937
has body: I am creating RESTful API for my application, and I am using Bodyparser for parsing the JSON data sent to my API endpoint. app.get('/api/endpoint', function(req,res) { console.log(req.body); console.log(req.body.path.split('/')); res.status(200).end(); }); I had configured the bodyparser in below way, app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); The problem is when I send this, var params = { path: '/dir1/dir2/dir3/pptdir' }; It throws an error, TypeError: Cannot call method 'split' of undefined After this error both the console.log statements work fine and prints the below output. { path: '/dir1/dir2/dir3/pptdir' } [ '', 'dir1', 'dir2', 'dir3', 'pptdir' ]
has comment: http://stackoverflow.com/comment/40641768
downvote count: 0
favorite count: 0
answer count: 0
upvote count: 2

http://stackoverflow.com/comment/40743089
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26013793
has text: Actually, this should be handled with CSS. Edit : ok, I understood the question.
score: 0

http://stackoverflow.com/comment/40517281
score: 0
has text: There is no more elegant way to do it than the array. Unless you know the elements from the beginingm, then you can use var arr=[1,2,3,4,5,6,7,8]
comment on: http://stackoverflow.com/q/25889133
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25939455
has answer: http://stackoverflow.com/a/25939698
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25939727
possible better answer: http://stackoverflow.com/a/25939727
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25939698
has body: How do I use javascript to click a button with no id? Normally, I would do something like: document.getElementById("button").click(); here is the html: Email Address Password or Return to Store I can fill in the email and password boxes like this: document.getElementById("customer_email").value = "myemail@mail.com"; document.getElementById("customer_password").value = "passwordtoenter";
type: Question
has title: How do I use javascript to click a button with no on click event?
has comment: http://stackoverflow.com/comment/40609391
answer count: 2

http://stackoverflow.com/comment/40747518
type: AnswerComment
type: Comment
has text: It's unnecessary. Do you write functions for concatenating strings as well?
comment on: http://stackoverflow.com/a/26016584
score: 0

http://stackoverflow.com/comment/40636625
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25951506
type: AnswerComment
has text: And what exactly is your problem there? Everything seems fine to me.

http://stackoverflow.com/q/25876928
has comment: http://stackoverflow.com/comment/40496094
answer count: 3
score: 2
has body: Here's my code var something = "four"; if( something == "one" || something == "two" || something == "three" || something == "five" || something == "six" || something == "seven" ){ document.body.innerHTML = " yes "; }else{ document.body.innerHTML = " no "; } Is there a way to simplify the IF statement given that all the conditions regard the same variable? DEMO
has title: simplify IF statement with multiple OR || conditions for the same variable
tagged with: javascript
has comment: http://stackoverflow.com/comment/40495774
favorite count: 0
tagged with: multiple-conditions
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25877025
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/69123766
has answer: http://stackoverflow.com/a/25876992
has comment: http://stackoverflow.com/comment/40495798
tagged with: if-statement

http://stackoverflow.com/a/25914914
downvote count: 0
has comment: http://stackoverflow.com/comment/40564588
type: Answer
has comment: http://stackoverflow.com/comment/40568501
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40564505
has comment: http://stackoverflow.com/comment/40566282
has body: If you put all your images in a hidden (display none) div, they'll load all at once. The browser should cache them, so then each time it changes, it pulls from the client system. &lt;div style="display: none;"&gt; &lt;img src="image1.jpg"&gt; &lt;img src="image2.jpg"&gt; &lt;img src="image3.jpg"&gt; &lt;/div&gt;
answers question: http://stackoverflow.com/q/25914858

http://stackoverflow.com/comment/40507451
comment on: http://stackoverflow.com/a/25883054
score: 0
type: Comment
has text: thanks for helping me.I tried this.but only one div(first div) changed the color.but I have several div to change the color.can you help me?.....
type: AnswerComment

http://stackoverflow.com/a/25961400
answers question: http://stackoverflow.com/q/25961006
has comment: http://stackoverflow.com/comment/40680691
score: 1
has comment: http://stackoverflow.com/comment/40680163
has comment: http://stackoverflow.com/comment/40649150
accepted answer of: http://stackoverflow.com/q/25961006
has comment: http://stackoverflow.com/comment/40674125
downvote count: 0
has comment: http://stackoverflow.com/comment/40675175
has comment: http://stackoverflow.com/comment/40647782
type: AcceptedAnswer
has body: That dbModel#save method is asynchronous, and so, the return keyword will only return to the inner the anonymous function. You want to use callbacks, instead. Also remove false from the save method. It can have only callback function as a parameter. So, your insert function will look like this: function insert (req, res, callback) { var d = req.body; new dbModel({ name: d.dname, desc: d.desc }).save(function(err){ if (err){ // Instead of return, you call the callback callback(null, 'failure'); }else{ // Instead of return, you call the callback callback(null, 'success'); } }); } module.exports.insert = insert; And your route function will look like this: router.post('/insert', function(req, res) { insert.insert(req, res, function (err, result) { res.render('insert',{title: 'insert', message: result}); }); }); Ideally, though, whenever an inner callback returns an error, you should also call your callback with the error, without any result; absent an error, and at the presence of a successful function call, you set the first parameter to null, and the second parameter to your result. Typically, the first parameter of the callback call represents an error, where as the second parameter represents your result. As a reference, you may want to read up on Node.js' callback pattern.
has comment: http://stackoverflow.com/comment/40681166
has comment: http://stackoverflow.com/comment/40680026
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40629511
type: Comment
has text: You can do this in C#?
type: AnswerComment
comment on: http://stackoverflow.com/a/25951886
score: 0

http://stackoverflow.com/comment/40738293
type: Comment
comment on: http://stackoverflow.com/a/26010941
type: AnswerComment
has text: @angel - `this.par str =` isn't valid JavaScript... And why are there `this`'s?
score: 0

http://stackoverflow.com/a/26011331
has comment: http://stackoverflow.com/comment/40877875
has comment: http://stackoverflow.com/comment/40741934
upvote count: 3
has comment: http://stackoverflow.com/comment/40741855
type: Answer
answers question: http://stackoverflow.com/q/25968454
has comment: http://stackoverflow.com/comment/40740877
has body: You have some semantic errors going on here. I'm going to repost your code, formatted for easier reading: this.taskHandle.find('img') .stop(true, true) .animate( { //todo// top: vtop , // this.taskHandle.outerHeight(), //'top' : 0 - $('.target.upper').height(), width : 0, opacity : 0 }, { duration:2000, step: function() { console.log('I am called'); } }, $.proxy( function() { // some css clearing method }, { // some further actions after animation completes } ) ); First: animate() doesn't accept 3 parameters (at least not those 3 parameters). I'm not sure what you are trying to do with your css clearing method, but anything you wan't to happen after the animation is complete should be in the complete method that you add right next to the step method. Second: $.proxy() needs to have the context in which you want it to run as the second parameter, not some other"complete"-function. So here is a slightly modified example which works. You can try it yourself in this fiddle. var vtop = 100; $('div') .stop(true, true) .animate( { top: vtop, width: 0, opacity : 0 }, { duration: 2000, step: function() { console.log('I am called'); }, complete: function () { alert('complete');// some further actions after animation completes } } );
has comment: http://stackoverflow.com/comment/40742388
score: 3
downvote count: 0

http://stackoverflow.com/q/25944424
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/38865357
has body: In my controller, I have: $scope.woffset = window.pageYOffset; $scope.$watch("woffset", function (newValue, oldValue) { console.log("hello"); console.log(window.pageYOffset); }, true); }); So when I scroll, I should be receiving console logs of "hello" as the pageYOffset changes. However, it doesn't do anything. But if I run window.pageYOffset in the console as I scroll down, I can see that the value is changing. Any ideas? I've tried multiple variations of watch (with and without true, using functions instead of strings, but nothing seems to work). (I know there is a work around with onscroll, but I'd like to learn how it would work this way) Thanks! Edit: This doesn't seem to work either: $scope.test = function () { return window.pageYOffset; } $scope.$watch("test", function (newValue, oldValue) { console.log("hello"); console.log(window.pageYOffset); }, true);
has title: Angular $watch window.pageYOffset not updating?
tagged with: javascript
score: 4
upvote count: 4
answer count: 3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25944534
tagged with: angularjs
has answer: http://stackoverflow.com/a/25967090
has comment: http://stackoverflow.com/comment/40618420
type: UnansweredQuestion

http://stackoverflow.com/a/26015293
type: Answer
accepted answer of: http://stackoverflow.com/q/26014033
answers question: http://stackoverflow.com/q/26014033
has body: You can have select all logic that is if you want to select all you can have like : $('#selectoption option').attr('selected', true); But as you requested your code will be as click ALL: $('option').click(function(){ if($(this).val()=="opt1") $("#selectoption").val(["opt2","opt3","opt4","opt5","opt6","opt7","opt8","opt9"]); }); All all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 separate_content1 separate_content2
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25939697
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has title: Do we have to put the ajax code and web method in the same asp.net page?
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26018131
tagged with: jquery
has body: I am having a question about JQuery Ajax, I researched some examples online, which put ajax code and static web method in the same asp.net page. What I am trying to do is to put ajax code in ascx control, and the static webmethod in a aspx page that contains the control. Is it feasible? From my test, I got problem that "the server responded with a status of 404". static web method: [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod(ResponseFormat = System.Web.Script.Services.ResponseFormat.Json)] public static List&lt;AppUtils.vAdviseComponent&gt; GetPDFReport() { //AppUtils.vAdvise.GetAllComponents(currentAssembelyID); List&lt;AppUtils.vAdviseComponent&gt; assebmblyCompList = null; assebmblyCompList = AppUtils.vAdvise.GetAllComponents(14); return assebmblyCompList; } JQuery ajax code in the control var tablecontent; $j(function onSuccess(data) { tablecontent = { content: [ { fontsize: 8, table: { headerrows: 1, widths: ['auto', 'auto', 'auto', 'auto', 'auto'], body: [ [{ text: 'id', bold: true }, { text: 'component name', bold: true }, { text: 'cage code', bold: true }, { text: 'nsn', bold: true }, { text: 'part number', bold: true}], ] } } ] }; tablecontent.content[0].table.body.push("shit"); }); $j("#pdfExtractBtn").button().on("click", function getPDFSummary() { $j.ajax({ type: "post", url: "vAdviseConfigurations.aspx/getPDFReport", data: "{}", datatype: "json", contenttype: "application/json; charset=utf-8", success: onSuccess, error: function () { alert("There was an error"); } }); }); so my question is that do I have to put the ajax code and web method in the same asp.net page? Thanks in advance!
answer count: 1
downvote count: 0
tagged with: asp.net
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/26018131
type: AnsweredQuestion

http://stackoverflow.com/a/25948415
answers question: http://stackoverflow.com/q/25948323
has comment: http://stackoverflow.com/comment/40664197
score: 0
type: Answer
has body: For browsers >= IE8, you can use .postMessage, look at this documentation. If you won't use .postMessage, you can pass client argument with the hash # part of the url. You can do src="url?query#" + JSON.stringify({param1:"value1", param2:"value2"}). On the other side, you can retrieve the object with var params = JSON.parse(window.location.hash). I work on a library about this : xssinterface To retrieve a session, look into your cookies, the name is depending of your remote server (check with F12). Cookie access in JS.
has comment: http://stackoverflow.com/comment/40658761

http://stackoverflow.com/a/25956941
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25956906
type: Answer
has body: if(jQuery("#inviteUpdate").length >0){ alert("Element exists"); } 0 check this
accepted answer of: http://stackoverflow.com/q/25956906
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40638940
upvote count: 1

http://stackoverflow.com/a/25938624
answers question: http://stackoverflow.com/q/25938593
upvote count: 1
has body: Having app as a global variable could cause conflicts
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25938593

http://stackoverflow.com/comment/40646993
type: QuestionComment
has text: I don't have either.. i just googled hapi.js.. o.0
score: 0
comment on: http://stackoverflow.com/q/25950866
type: Comment

http://stackoverflow.com/a/25991982
has comment: http://stackoverflow.com/comment/40705936
has comment: http://stackoverflow.com/comment/40703054
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/40710067
score: 6
has comment: http://stackoverflow.com/comment/40709373
accepted answer of: http://stackoverflow.com/q/25989642
has body: There are no integers in JavaScript. Start with ECMAScript Section 8: Types: The ECMAScript language types are Undefined, Null, Boolean, String, Number, and Object. Then see ECMAScript Section 8.5: The Number Type: The Number type has exactly 18437736874454810627 (that is, 264−253+3) values, representing the double-precision 64-bit format IEEE 754 values ..." (emphasis added) The fact that Firefox displays the floating point value 1 as "1" rather than "1.0" is irrelevant, and is confusing you.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25989642
has comment: http://stackoverflow.com/comment/40708089

http://stackoverflow.com/a/25889169
has body: I have never resorted to even two answers before (let alone three), but based on all the comments, and in a desire to keep things simple another solution is to data-drive the visibility of other items based on selections, using data- attributes to store the selectors on the options and radio buttons. JSFiddle: http://jsfiddle.net/TrueBlueAussie/4s5rwce2/28/ e.g the HTML for the select becomes choose category cars others and the radio buttons like this: The code becomes very simple then, simply applying the filters specified in the selected items. $(document).on('change', '.sellkop', function () { // this is radio button // Hide defaults $("#price_container,.cars,.toolimage").hide(); // Show the items desired by the selected radio button $($(this).data("show")).show(); }); $('#category_group').on('change', function () { // this is select options // Get the various possible data options and decide what to show/hide based on those var $this = $(this); var value = $this.val(); // Get the selected option var $li = $('option[value='+ value+']', $this); // Hide all the defaults first $('#licenscontainer,.cars,.toolimage,.sell,#underKategory').hide(); // Now show any desired elements $($li.data('show')).show(); // Fire change event on the radio buttons to ensure they change $('.sellkop:checked').trigger('change'); }); This is a very generic solution that will allow very complex forms to turn on/off other elements as required. You can add data-hide attributes and do something similar for those too if required.
has comment: http://stackoverflow.com/comment/40517653
has comment: http://stackoverflow.com/comment/40517866
has comment: http://stackoverflow.com/comment/40518597
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40517433
answers question: http://stackoverflow.com/q/25886485
has comment: http://stackoverflow.com/comment/40517520
type: Answer
has comment: http://stackoverflow.com/comment/40518220
has comment: http://stackoverflow.com/comment/40517493
has comment: http://stackoverflow.com/comment/40517867
has comment: http://stackoverflow.com/comment/40518445
score: 1
has comment: http://stackoverflow.com/comment/40517830
upvote count: 1
has comment: http://stackoverflow.com/comment/40518014
has comment: http://stackoverflow.com/comment/40517600
has comment: http://stackoverflow.com/comment/40523855
has comment: http://stackoverflow.com/comment/40517877
accepted answer of: http://stackoverflow.com/q/25886485

http://stackoverflow.com/a/25907365
answers question: http://stackoverflow.com/q/25906468
upvote count: 1
score: 1
downvote count: 0
has body: Calling restore will not revert back to how the canvas was when you called save. In other words, it does not remove any transformations drawn onto the canvas. What save does is push the current settings to the top of the stack so when you call restore it'll pop and use those settings. Example: var c = document.getElementById('canvas'), ctx = c.getContext('2d'); function draw(e) { ctx.fillStyle = '#09F'; ctx.fillRect(e.x, e.y, 10, 10); } function reset() { ctx.restore(); ctx.fillStyle = '#000'; ctx.fillRect(0, 0, c.width, c.height); ctx.save(); } reset(); c.addEventListener('mousemove', draw); c.addEventListener('mouseleave', reset); Demo: http://jsfiddle.net/moogs/rgfdc3uw/
type: Answer

http://stackoverflow.com/comment/40619042
has text: @Badddy You removed the contentType from the ajax request and changed the dataType from json to html?
type: Comment
comment on: http://stackoverflow.com/a/25944899
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40581216
type: Comment
comment on: http://stackoverflow.com/q/25923319
score: 0
has text: `current[menu].style.display = 'block';` can't work correctly if you use the `dropdown` class once but the `image` class several times. You can't use the value of `menu` in this case.
type: QuestionComment

http://stackoverflow.com/q/25936593
has comment: http://stackoverflow.com/comment/40608613
has comment: http://stackoverflow.com/comment/40612356
has comment: http://stackoverflow.com/comment/40614550
accepted answer: http://stackoverflow.com/a/25952123
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/40605450
score: 8
linked to: http://stackoverflow.com/q/19097626
tagged with: d3.js
has title: d3.js dynamically setting "stroke-width" on a path
type: Question
has body: I have a question very similar to this one regarding dynamically setting the "stroke-width" attribute on a path. The solution offered was to pass the results of a function to the "stroke-width" attr for each path, which makes perfect sense but I cannot manage to get this to work. Here is the statement that has me stumped: .attr("stroke-width", function(d) { return (d.interest * 50); }) (The above works just fine and sets the path attr if a substitute an number like "5" for the function.) Here is the full code: &lt;!doctype html&gt;&lt;/html&gt; &lt;meta charset="utf-8" /&gt; &lt;style&gt; .node circle { fill: #fff; stroke: steelblue; stroke-width: 1.5px; } .node { font: 16px sans-serif; } .link { fill: none; stroke: #ccc; } &lt;/style&gt; &lt;script type="text/javascript" src="http://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var width = 800; var height = 500; var cluster = d3.layout.cluster() .size([height, width-200]); var diagonal = d3.svg.diagonal() .projection (function(d) { return [d.y, d.x];}); var svg = d3.select("body").append("svg") .attr("width",width) .attr("height",height) .append("g") .attr("transform","translate(100,0)"); d3.json("data.json", function(error, root){ var nodes = cluster.nodes(root); var links = cluster.links(nodes); var link = svg.selectAll(".link") .data(links) .enter().append("path") .attr("class","link") .attr("stroke-width", function(d) { return (d.interest * 50); }) .attr("d", diagonal); var node = svg.selectAll(".node") .data(nodes) .enter().append("g") .attr("class","node") .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; }) node.append("circle") .attr("r", function(d) { return d.interest * 50 ;}); node.append("text") .attr("dx", function(d) { return (d.interest * 50) ;}) .attr("dy", function(d) { return -(d.interest * 50) ;}) .style("text-anchor", function(d) { return d.children ? "end" : "start"; }) .text( function(d){ return d.name + " ("+ d.interest*100 + "%)";…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40604009
has answer: http://stackoverflow.com/a/25952123

http://stackoverflow.com/q/26013693
has title: Replacing node request.post with request-promise
has answer: http://stackoverflow.com/a/55923981
downvote count: 0
favorite count: 0
tagged with: promise
has body: I have: I used Node.js request module to get authorization token: Working code without promise var request = require('request'); var querystring = require('querystring'); var requestOpts = querystring.stringify({ client_id: 'Subtitles', client_secret: 'X............................s=', scope: 'http://api.microsofttranslator.com', grant_type: 'client_credentials' }); request.post({ encoding: 'utf8', url: "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13", body: requestOpts }, function(err, res, body) { //CALLBACK FUNCTION var token = JSON.parse(body).access_token; amkeAsyncCall(token); }); I want: It takes some time to get that token. In turn I need makeAsyncCall from getToken callback. So I decide to use a request-promise from here. Problem: request-promise seems don't work for me at all. The same (not working) code with promise: var rp = require('request-promise'); var querystring = require('querystring'); var requestOpts = { encoding: 'utf8', uri: 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13', method: 'POST', body: querystring.stringify({ client_id: 'Subtitles', client_secret: 'Xv2Oae6Vki4CnYcSF1SxSSBtO1x4rX47zhLUE/OqVds=', scope: 'http://api.microsofttranslator.com', grant_type: 'client_credentials' }) }; rp(requestOpts) .then(function() { console.log(console.dir); }) .catch(function() { console.log(console.dir); });
has answer: http://stackoverflow.com/a/57387288
has answer: http://stackoverflow.com/a/26876060
tagged with: node.js
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26876060
has answer: http://stackoverflow.com/a/26013936
upvote count: 3
type: Question
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/40743055
accepted answer: http://stackoverflow.com/a/26013936

http://stackoverflow.com/comment/40606978
has text: Ok... but how to put the background image inside the image like what I'm doing right now? Can you help me?
comment on: http://stackoverflow.com/a/25935400
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40608891
has text: Are you looking for it to close the application? or is there something else that button does that you want the back button to do?
comment on: http://stackoverflow.com/q/25938016
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26022406
downvote count: 1
type: Question
tagged with: coffeescript
has answer: http://stackoverflow.com/a/26022791
answer count: 1
accepted answer: http://stackoverflow.com/a/26022791
tagged with: javascript
has comment: http://stackoverflow.com/comment/40761193
favorite count: 0
has body: Let's say that you've got an array of page objects in Javascript: pages = [{uid: 1, title: 'Home'}, {uid: 2, title: 'Products'}, {uid: 3, title: 'About'}, {uid: 4, title: 'Contact'} ] Your goal is to create a method that, given the UID of the current page, returns the one that's next to it or the one that's previous to it (as defined by the order in the array). (updated) NOTE: You do not have access to the current page object, only its UID so you can't find its position using simply indexOf() nextPage = function (pages, currentPageUID){...} previousPage = function(pages, currentPageUID){...} In Javascript what would be the most elegant way to do this? It's a simple problem but the solutions I have thought of for it don't manage to reflect that simplicity and I'm sure there is one that would. BONUS Same question but for Coffeescript? (not sure how I'll reward it as a bonus but hopefully you'll feel good)
type: AnsweredQuestion
score: 0
upvote count: 1
has title: Best way to find the next/previous items in a javascript array of objects?

http://stackoverflow.com/comment/40778345
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26033061
has text: Good point andrex. It makes the code cleaner. Since I will be processing many thousands of records with this function. Do you see anyway we can optimize the code? Like faster execution and/or less memory usage? Thank you

http://stackoverflow.com/comment/40597242
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25928460
type: AnswerComment
has text: @Aniket updated the answer have a look wheather this is what you need

http://stackoverflow.com/comment/40610012
type: Comment
type: QuestionComment
has text: No, Actually ajax Worked !! Thank you very Much !!!
comment on: http://stackoverflow.com/q/25939076
score: 0

http://stackoverflow.com/q/25926937
has answer: http://stackoverflow.com/a/33747159
has comment: http://stackoverflow.com/comment/40586898
tagged with: javascript
has comment: http://stackoverflow.com/comment/41024811
answer count: 1
has body: I was taking the Javascript aptitude test on oDesk and there was a question that perplexed me: It asked me this: Which of the given options represents the correct length when alert(Emp..*.length()); is applied to the following code? var Emp = Mark Linux Firefox JavaScript Python ..And then it had some multiple choice answers. I've never seen anything like this in javascript, and I tried plugging it into my browser and threw an error. So, why would this be a valid question? What the hell are they talking about here? The possible answers are: a. 11 b. 5 c. 6 d. 12 Thanks in advance.
has comment: http://stackoverflow.com/comment/40586743
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40587045
tagged with: http://stackoverflow.com/tag/xml
score: 0
has title: XML variable type in javascript?
type: Question

http://stackoverflow.com/comment/40606845
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25936566
score: 1
has text: `strokeJoin` only determines how the intersection point of 2 lines will be displayed. Since it's a point it won't result in a curve. So you will need to use both lines & curves (or arcs) to round your trapezoid.

http://stackoverflow.com/a/25932814
upvote count: 2
has comment: http://stackoverflow.com/comment/40598672
type: Answer
answers question: http://stackoverflow.com/q/25932753
has body: You can do it a several ways: // Reference property name document.getElementById("sidescrollbtn").style.marginTop = '70px'; OR // Use setAttribute method document.getElementById("sidescrollbtn").setAttribute("style", "margin-top: 70px"); OR // Use jquery .css() $('#sidescrollbtn').css({ 'margin-top': '70px' }); Additional Information Element.setAttribute() on MDN css() on jQuery docs
score: 2
downvote count: 0

http://stackoverflow.com/comment/40758182
score: 0
type: AnswerComment
has text: In this case I am getting the error: `var foo = io.listen(server); ReferenceError: io is not defined`
type: Comment
comment on: http://stackoverflow.com/a/26022208

http://stackoverflow.com/a/25976992
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25975868
has body: I would recommend the jQuery library: relCopy It'll help you easily clone/remove row of fields (or anything else).

state
tag name: state
tags question: http://stackoverflow.com/q/25994478
type: Tag

http://stackoverflow.com/q/25992325
answer count: 1
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
score: -1
duplicate of: http://stackoverflow.com/q/4660142
has title: Databinding form data set to list box
downvote count: 2
upvote count: 1
type: Question
tagged with: c#
tagged with: javascript
has body: I have added Dataset from database. From dataset values are loading and from Dataset to list Box. It is not loading. I got exception like object instance Null reference exception Here is the code I have, please correct error. if (!IsPostBack) { ViewState["PageJobseekerRegisIds"] = System.Guid.NewGuid().ToString(); Session["PageJobseekerRegisId"] = ViewState["PageJobseekerRegisIds"].ToString(); ds = objJobseekerEdu.GetIndusrtries(); if (ds.Tables[0].Rows.Count != 0) { ddlIndustry.DataTextField = ds.Tables[0].Columns["industry_type"].ToString(); ddlIndustry.DataValueField = ds.Tables[0].Columns["industry_id"].ToString(); ddlIndustry.DataSource = ds.Tables[0]; ddlIndustry.DataBind(); } }
linked to: http://stackoverflow.com/q/4660142
has answer: http://stackoverflow.com/a/25992655

http://stackoverflow.com/q/25883624
type: Question
linked to: http://stackoverflow.com/q/21125834
has body: What I want to do is to declare two caspers, the two will login to a certain site, one will act as an admin and the other one will act as a typical user. And I want to do it in a single script. Is it possible to declare two or more casper in a single script? just like this one: var casper1 = require("casper").create({ verbose: true, timeout: null }); var casper2 = require("casper").create({ verbose: true, timeout: null });
tagged with: javascript
has title: Declare two or more casper in a single script
linked to: http://stackoverflow.com/q/24315512
accepted answer: http://stackoverflow.com/a/25885711
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/24880671
favorite count: 0
score: 2
type: AnsweredQuestion
tagged with: casperjs
upvote count: 2
has answer: http://stackoverflow.com/a/25885711
tagged with: session-cookies
tagged with: authentication

http://stackoverflow.com/q/26011092
has comment: http://stackoverflow.com/comment/40738053
type: Question
has comment: http://stackoverflow.com/comment/40751606
has comment: http://stackoverflow.com/comment/40746991
has comment: http://stackoverflow.com/comment/40748292
has title: javascript outputs weird characters
has comment: http://stackoverflow.com/comment/40750228
has comment: http://stackoverflow.com/comment/40745503
has comment: http://stackoverflow.com/comment/40738429
tagged with: javascript
has comment: http://stackoverflow.com/comment/40738149
has comment: http://stackoverflow.com/comment/40748378
score: 0
has comment: http://stackoverflow.com/comment/40745352
has comment: http://stackoverflow.com/comment/40747806
has comment: http://stackoverflow.com/comment/40748183
has comment: http://stackoverflow.com/comment/40749672
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40738290
tagged with: utf-8
has comment: http://stackoverflow.com/comment/40744027
answer count: 0
has body: I've built an application and it worked just fine until today. When I checked it today, all of the hebrew characters turned to something like ×˜×§×¡×˜. I've tried adding charset="UTF-8" to all of my script files (when including them) but it just doesn't work. The first statement in my HTML markup is the &lt;meta charset="UTF-8"&gt; I have to mention that it happens only when the output is coming from JS or CSS file. I fixed the CSS problem by adding @charset="UTF-8" to the top of the script. Any ideas?

http://stackoverflow.com/comment/40703785
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25990936
has text: @OctoD, Doesn't seem to help : I've changed it to : controller: ['$scope', function ($scope) { $scope.periods = ... }]

http://stackoverflow.com/q/25893215
type: UnansweredQuestion
tagged with: cookies
has body: I'm having an issue trying to download an image... in specific, I need to download from this URL (also changing get parameters) https://www.mercatoelettrico.org/it/Esiti/MGP/DomandaOfferta.aspx?zona=nord&amp;data=20140918&amp;ora=12 but the web site is redirecting me to https://www.mercatoelettrico.org/It/Tools/Accessodati.aspx... (that has a javascript onsubmit) downloading that page instead of my image. I followed many guides I found but still I can't figure out how to download that image. One of my last trials was this... trying to save a cookie to avoid the auth in the following connections, but the cookie stays empty wget --user-agent=Mozilla/5.0 --content-disposition --no-check-certificate --save-cookies cookies.txt --post-data "ctl00$ContentPlaceHolder1$CBAccetto1=on&amp;ctl00$ContentPlaceHolder1$CBAccetto2=on&amp;ctl00$ContentPlaceHolder1$Button1=Accetto" "https://www.mercatoelettrico.org/it/Tools/Accessodati.aspx" dunno what to do...
type: Question
has answer: http://stackoverflow.com/a/25896304
tagged with: wget
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25893366
has title: wget download after auth form with redirect
tagged with: download

http://stackoverflow.com/comment/40684561
type: Comment
has text: Unless `test01` is a variable, it needs to be encapsulated in quotes...
comment on: http://stackoverflow.com/q/25981686
score: 0
type: QuestionComment

http://stackoverflow.com/q/26005796
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/21800010
duplicate of: http://stackoverflow.com/q/21800010
tagged with: promise
possible better answer: http://stackoverflow.com/a/26005927
has body: I am using a provider to fetch some data via an API in my angular app and then use it in a controller. The API make call to is sometimes down which results in a 500 error. This error gets printed to the console and I don't know how to handle it gracefully. Here is my provider code: function myPvdr() { this.getUrl = function() { return 'http://path/to/my/API'; }; this.$get = function($q, $http) { var self = this; return { getData: function(points) { var d = $q.defer(); $http({ method: 'GET', url: self.getUrl(), cache: true }).success(function(data) { d.resolve(data); }).error(function(err) { d.reject(err); }); return d.promise; } } } } And here is how I use it in my controller: function myCtrl($scope, myProvider, localStorageService) { $scope.myData = localStorageService.get('data') || {}; myProvider.getData() .then(function(data) { localStorageService.set('data', data); $scope.data = data; }); } How can I handle the 500 error properly, i.e. not throw any error to the console and use the data provided in local storage if any? Many thanks
tagged with: angularjs
has answer: http://stackoverflow.com/a/26006000
has answer: http://stackoverflow.com/a/26005927
has comment: http://stackoverflow.com/comment/40728998
has title: AngularJS - handling errors with promises
accepted answer: http://stackoverflow.com/a/26006000
type: AnsweredQuestion
tagged with: javascript
type: Question

http://stackoverflow.com/q/25920006
type: AnsweredQuestion
tagged with: list
has comment: http://stackoverflow.com/comment/40577295
has title: Loading a list of images with OpenCV in Node.js
type: Question
has body: I'm trying to load a lot of images which are listed in a CVS file in the following format: ./path/to/img1.ext;label1 ./path/to/img2.ext;label2 This is the script I've written: var cv = require("opencv"), fs = require("fs"), console = require("console"), util = require("util"), lazy = require("lazy.js"); var basePath = '/some/path/'; var csvFile = fs.createReadStream(basePath + 'db.csv', {flags:'r'}); var images = [], labels = []; lazy(csvFile) .lines() .each(function(l) { var d = lazy(l).split(';').toArray(); cv.readImage(basePath + d[0], function(e, m) { images.push(m); }); labels.push(d[1]); }); console.log(util.inspect(images)); console.log(util.inspect(labels)); It prints two line containing the representation of an empty array []. The images are actually getting loaded by OpenCV, because if you try to print m before pushing it into the array it correctly prints [Matrix HxW ], where H and W stand for the height and the width of the images. EDIT: also, can you think of a better way than 2 separated arrays for keeping each image associated with its label? EDIT: the problem seems to be that the images are loaded asynchronously. So the problem is my lack of experience with asynchronous programming. How can I make this work?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25939382
has comment: http://stackoverflow.com/comment/40575158
has comment: http://stackoverflow.com/comment/40575330
linked to: http://stackoverflow.com/q/6156501
score: 0
accepted answer: http://stackoverflow.com/a/25939382
has comment: http://stackoverflow.com/comment/40577244
tagged with: node.js
tagged with: opencv

http://stackoverflow.com/comment/40557006
comment on: http://stackoverflow.com/q/25910958
type: QuestionComment
type: Comment
score: 0
has text: It is working on fiddle. see http://jsfiddle.net/r7e9r861/

http://stackoverflow.com/q/25938585
has answer: http://stackoverflow.com/a/25938686
score: 16
upvote count: 16
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25938737
accepted answer: http://stackoverflow.com/a/25938637
type: Question
has title: Find and Replace all instances of a word with jquery
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25938637
has answer: http://stackoverflow.com/a/38012242
has body: I have an article with many instances of the word "color". I set up a button with the class .colour so that if you want you can click it and change the spelling from "color" to "colour" throughout the page. I've written some jQuery to do this but it only changes one instance of the word color but not all. You'd have to keep repeatedly clicking the button to change all of them. $(document).ready(function(){ $(".colour").click(function(){ $("body").children().each(function() { $(this).html($(this).html().replace("color","colour")); }); }) }) Is there a way to repeatedly loop the script until it changes all instances? Also is it possible to make it so it is not case-sensitive? I'm new to javascript and jquery so might be a noob question. Thanks Here's a codepen of it: http://codepen.io/patrickaltair/pen/vcdmy
has answer: http://stackoverflow.com/a/25938737
answer count: 4
favorite count: 0

http://stackoverflow.com/comment/40557938
score: 0
type: AnswerComment
has text: Anything inside my form and not changed by innerHTML is posting correctly.... The only item not posting value to the next page is the select changed by innerHTML ...
type: Comment
comment on: http://stackoverflow.com/a/25910745

http://stackoverflow.com/comment/40770788
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26028887
has text: Now actually nothing happens with i change the datatype to dataType

http://stackoverflow.com/q/25961260
tagged with: sqlite
tagged with: node.js
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25972067
has comment: http://stackoverflow.com/comment/40663239
type: Question
has comment: http://stackoverflow.com/comment/40662888
type: AnsweredQuestion
has body: In my express application I use Sequelize to manage the database. Here's my bootstrap code. db.sequelize .sync({ force: true}) .complete(function(err) { if (err) { throw err[0]; } else { //seed require('../db/seed')(db); app.listen(app.get('port'), function() { console.log('express listening on ' + app.get('port')); }); } }); As you can see, everytime I start the server first I seed the database with hard coded data. Here's the code to initialize sequelize: if (process.env.NODE_ENV === 'test') { console.log('[test] using in memory database'); sequelize = new Sequelize('marbles-site-db', null, null, { dialect: 'sqlite', storage: ':memory:' }); } else if (process.env.HEROKU_POSTGRESQL_WHITE_URL) { var match = process.env.HEROKU_POSTGRESQL_WHITE_URL .match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); sequelize = new Sequelize(match[5], match[1], match[2], { dialect: 'postgres', protocol: 'postgres', port: match[4], host: match[3], logging: true // false }); } else { sequelize = new Sequelize('marbles-site-db', null, null, { dialect: 'sqlite', storage: './db/development.sqlite' }); } As you can see, I use SQlite with flat file as storage for development and Postgres for production. The problem is each time I restart the server, data in the database are gone. This is the case with SQlite, I suppose it's the same with Postgres too. So what do I have to do to keep the data in the database even though I restart the server, and is this related to database migrations? Note that the seed should not be needed after the initial boot.
has answer: http://stackoverflow.com/a/73608923
upvote count: 2
has title: How to survive server restart with sequelize postgres database and migrations
answer count: 2
possible better answer: http://stackoverflow.com/a/73608923
tagged with: javascript
favorite count: 0
tagged with: postgresql
accepted answer: http://stackoverflow.com/a/25972067
tagged with: sequelize.js

http://stackoverflow.com/a/25939670
downvote count: 0
has body: You want to use _.map instead of _.each, see here. _.map returns the array with results of your iteration function, which is what you want to assign to the children param. _.each just loops trough your collection, returning undefined.
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25938473
answers question: http://stackoverflow.com/q/25938473
score: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25992736
has answer: http://stackoverflow.com/a/26162302
type: Question
type: AnsweredQuestion
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/26162302
tagged with: javascript
favorite count: 0
has title: WebAudioApi, frequency sound animation, android chrome v37
has body: I have trouble with frequency animation of sounds through web audio api on android chrome v.37 I can hear music but animation doesn't present. A lot of experiments lead me in final to two separate ways for loading sounds and animate it. In first way i load sound via aduio html 5 element. Then create MediaElementSource with audio element as parameter. Connect MediaElementSource to Analyser(AudioContext.createAnalyser element). Analyse i connect to GainNode, and finaly connect GainNode to AudioContext.destination. Code: var acontext = new AudioContext(); var analyser = acontext.createAnalyser(); var gainNode = acontext.createGain(); var audio = new Audio(path_to_file); var source = acontext.createMediaElementSource(temp_audio); source.connect(analyser); analyser.connect(gainNode); gainNode.connect(acontext.destination); This schema work on PC-Chrome and newest mobile safari. Also in FireFox. Second way which i found have few differences. Sounds here readed to buffer, and then connect to analyser. code: var acontext = new AudioContext(); var analyser = acontext.createAnalyser(); var gainNode = acontext.createGain(); var source = acontext.createBufferSource(); var request = new XMLHttpRequest(); request.open('GET', path, true); request.responseType = 'arraybuffer'; request.addEventListener('load', function(){ source.buffer = acontext.createBuffer(request.response, false); }, false); request.send(); source.connect(analyser); analyser.connect(gainNode); gainNode.connect(acontext.destination); For draw animation i use canvas, data for draw: analyser.fftSize = 1024; analyser.smoothingTimeConstant = 0.92; var dataArray = new Uint8Array(analyser.frequencyBinCount); analyser.getByteFrequencyData(dataArray); //fill dataArray from analyser for (var i = 0; i &lt; analyser.frequencyBinCount; i++) { barHeight = dataArray[i]; // and other logic here. } Second way work on old chromes, mobile browsers, safari. But in android chrome v37 both way doesn't work. As i said before first way…
score: 2
upvote count: 2

http://stackoverflow.com/comment/40722810
has text: @Webice I'm sorry, I ommitted something in my code, please check again. I forgot to add `type: 'POST',` to the `$.ajax()`.
type: Comment
comment on: http://stackoverflow.com/a/26002322
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40734773
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26008973
has text: Thanks Fahad, that helps a lot.

http://stackoverflow.com/q/25897989
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: file-upload
tagged with: jquery-file-upload
upvote count: 5
favorite count: 0
downvote count: 0
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/28102924
has title: Sending multiple file input fields programmatically in one form
has body: I'm trying to use the blueimp/jQuery-File-Upload plugin to programmatically send more than one file input field though the same form. When user select form files, it just append them in a JS variable to further send them with $('#form').fileupload('send') method on form submission. My goal is to use the exactly same synchronous form I was using before in an asynchronous way. So when user click on form submit button, it prevents default action and them let the plugin to do the task, sending all form data and displaying overall upload progress. I'm mainly following these guides: https://github.com/blueimp/jQuery-File-Upload/wiki/API https://github.com/blueimp/jQuery-File-Upload/wiki/Multiple-File-Input-Fields-in-One-Form Actually it's almost working, but it does not send more than one input file to the server end. In fileuploadadd event I'm pushing data.files[0] (my file inputs are single file only, but each of them use different accept attributes) to a "global" uploadable array and then on form submission I use something like $('#form').fileupload('send', {files: uploadable}). I guess I'm not doing it the right way, since only one file is being sent along with form data. What is the correct way to programmatically send more than one file input file using a single form? I'm also not too confident about overall upload progress... If I use fileuploadprogressall event to read the upload progress will it be reporting the progress of all uploaded files? JS (simplified) $(function () { var uploadable = []; $('#form').fileupload({ autoUpload: false, singleFileUploads: false, add: function (event, data) { uploadable.push(data.files[0]); return false; }, // other event callbacks }) .prop('disabled', !$.support.fileInput) .parent().addClass($.support.fileInput ? undefined : 'disabled'); $('#form').submit(function (event) { event.preventDefault(); $('#form').fileupload('send', {files: uploadable}); }); }); HTML &lt;form id="form" action="upload" method="post" enctype="multipart/…
score: 5

http://stackoverflow.com/a/25953606
has comment: http://stackoverflow.com/comment/40637086
score: 6
upvote count: 6
has body: You should: Use the ng-submit directive on your form Pass the form element to your save() method Use the $http service to post var ctrl = function ($scope, $http, $log) { $scope.save = function (form) { //if (!$scope.contactForm.$valid) return; var url = form.attributes["target"]; $log.debug(url); $http .post(url, { email: $scope.email, name: $scope.name }) .success(function (response) { $log.debug(response); }) } } Send Message
answers question: http://stackoverflow.com/q/25953541
downvote count: 0
has comment: http://stackoverflow.com/comment/49570051
type: Answer

http://stackoverflow.com/comment/40544787
type: AnswerComment
has text: This seems to me to be a restatement of the question. All that's missing is "How do I..." at the front. lastr2d2's comment, though, guides to an answer. ;)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25903974

http://stackoverflow.com/comment/40506243
type: Comment
type: QuestionComment
score: 1
has text: Scope is inherited unless otherwise specified. So both apps are inheriting the same parent scope. If you want each directive to have its own child scope, add "scope:true" to your directive definition
comment on: http://stackoverflow.com/q/25882257

http://stackoverflow.com/comment/40671082
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25972080
has text: Ah, ok, didn't think about those. Not sure what you can do about them but like Cerbrus said don't use regex http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
score: 0

http://stackoverflow.com/q/25952216
answer count: 1
has answer: http://stackoverflow.com/a/25958820
tagged with: websocket
accepted answer: http://stackoverflow.com/a/25958820
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41046278
downvote count: 0
score: 1
has title: Websockets - multiple vs multipurpose tradeoff
type: Question
has body: I am writing a web interface to a rasperry pi that needs to have the least possible latency and is visible from the local network. Would it be better to have multiple websockets or one and demux the messages? Out of curiosity, what if I wanted an internet facing service backed by a normal server. Is the number of sockets used a tradeoff situation or is it the less the better? Obviously if I don't want to flood the server with too many connections but at the same time if I demux messages with javascript it should be harder on the client that to have the browser websocket implementation do the heavy lifting. Could I get some insight on this?
tagged with: javascript
tagged with: raspberry-pi
upvote count: 1

http://stackoverflow.com/comment/40757010
type: Comment
comment on: http://stackoverflow.com/q/26020696
type: QuestionComment
score: 0
has text: Andrew - This isn't a big worry for me. The users are not highly pc literate, and are government employees.

http://stackoverflow.com/comment/40791483
comment on: http://stackoverflow.com/a/26021165
score: 0
type: AnswerComment
type: Comment
has text: You're welcome. I know it work but you'll end up with some inconsistency if you continue to use `obj_x` in other functions. Warned ;) have fun

jquery-ui
tags question: http://stackoverflow.com/q/25944436
tags question: http://stackoverflow.com/q/25949731
tags question: http://stackoverflow.com/q/25899908
tags question: http://stackoverflow.com/q/25990542
tags question: http://stackoverflow.com/q/25951094
tags question: http://stackoverflow.com/q/26029667
tags question: http://stackoverflow.com/q/25884322
tags question: http://stackoverflow.com/q/25876061
tags question: http://stackoverflow.com/q/26033840
tags question: http://stackoverflow.com/q/25964342
tags question: http://stackoverflow.com/q/26015474
tags question: http://stackoverflow.com/q/25938345
tags question: http://stackoverflow.com/q/25999294
tags question: http://stackoverflow.com/q/25876912
tags question: http://stackoverflow.com/q/25943906
tags question: http://stackoverflow.com/q/25994239
tags question: http://stackoverflow.com/q/26014200
tags question: http://stackoverflow.com/q/25942058
tags question: http://stackoverflow.com/q/25976272
tags question: http://stackoverflow.com/q/26020289
tags question: http://stackoverflow.com/q/25887995
tags question: http://stackoverflow.com/q/25945923
tags question: http://stackoverflow.com/q/25936034
tags question: http://stackoverflow.com/q/25993722
tags question: http://stackoverflow.com/q/26028939
tags question: http://stackoverflow.com/q/25952840
tags question: http://stackoverflow.com/q/25976300
tags question: http://stackoverflow.com/q/25968984
tags question: http://stackoverflow.com/q/26009398
tags question: http://stackoverflow.com/q/25955269
tags question: http://stackoverflow.com/q/26025612
tags question: http://stackoverflow.com/q/25969606
tags question: http://stackoverflow.com/q/25921985
tags question: http://stackoverflow.com/q/25895922
tags question: http://stackoverflow.com/q/26025136
tags question: http://stackoverflow.com/q/25930874
tags question: http://stackoverflow.com/q/25953570
tags question: http://stackoverflow.com/q/26013459
tags question: http://stackoverflow.com/q/25877346
tags question: http://stackoverflow.com/q/25887709
tags question: http://stackoverflow.com/q/25975672
tags question: http://stackoverflow.com/q/25891658
tags question: http://stackoverflow.com/q/25996377
tags question: http://stackoverflow.com/q/25996215
tags question: http://stackoverflow.com/q/26022803
type: Tag
tag name: jquery-ui
tags question: http://stackoverflow.com/q/25920502
tags question: http://stackoverflow.com/q/26010679
tags question: http://stackoverflow.com/q/25877419
tags question: http://stackoverflow.com/q/26033610
tags question: http://stackoverflow.com/q/26021493

http://stackoverflow.com/q/25877376
tagged with: javascript
has comment: http://stackoverflow.com/comment/40497155
has comment: http://stackoverflow.com/comment/40496972
linked to: http://stackoverflow.com/q/22127640
has body: How would I split this string and keep only the unique values using underscore? I do need the br after each value. Input = 'John Doe&lt;br&gt; John Doe&lt;br&gt; Frank Watts&lt;br&gt; ' Expected Ouput = "John Doe&lt;br&gt; Frank Watts&lt;br&gt; ' What I've tried so far was to split the string using str.split(' ') but this breaks the first and last name
has comment: http://stackoverflow.com/comment/40496892
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25877496
has answer: http://stackoverflow.com/a/25877487
favorite count: 0
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25877568
downvote count: 0
tagged with: underscore.js
score: 1
possible better answer: http://stackoverflow.com/a/25877496
type: Question
has answer: http://stackoverflow.com/a/25877568
has title: Return name string with unique values

http://stackoverflow.com/comment/40526988
score: 0
type: AnswerComment
type: Comment
has text: @chridam: there was a typo in the javascript call, I corrected it
comment on: http://stackoverflow.com/a/25894233

http://stackoverflow.com/comment/40538623
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25900500
has text: I don't have any modified files in bootstrap. I'm using jQuery, jQueryUI, jQueryChatboxWidget and the Bootstrap. I think it'll be hard to put on jsbin by the widget.

http://stackoverflow.com/q/25991367
has answer: http://stackoverflow.com/a/72815802
has answer: http://stackoverflow.com/a/62606463
has answer: http://stackoverflow.com/a/52192108
has answer: http://stackoverflow.com/a/61120437
has answer: http://stackoverflow.com/a/35290646
has answer: http://stackoverflow.com/a/63522864
has answer: http://stackoverflow.com/a/57524083
has answer: http://stackoverflow.com/a/44547447
type: UnansweredQuestion
score: 576
has answer: http://stackoverflow.com/a/73012800
has answer: http://stackoverflow.com/a/72545294
has answer: http://stackoverflow.com/a/29749815
has answer: http://stackoverflow.com/a/73914665
has comment: http://stackoverflow.com/comment/40702276
answer count: 28
has answer: http://stackoverflow.com/a/25991510
has answer: http://stackoverflow.com/a/79063859
has comment: http://stackoverflow.com/comment/122668738
has answer: http://stackoverflow.com/a/58710389
has answer: http://stackoverflow.com/a/66444837
has body: Can anyone give me an in-simple-words explanation about the difference between throttling and debouncing a function for rate-limiting purposes? To me, both seem to do the same the thing. I have checked these two blogs to find out, but I'm still having trouble understanding. http://remysharp.com/2010/07/21/throttling-function-calls http://benalman.com/projects/jquery-throttle-debounce-plugin/
type: Question
has answer: http://stackoverflow.com/a/55364092
tagged with: debouncing
has answer: http://stackoverflow.com/a/40550771
has answer: http://stackoverflow.com/a/59678727
upvote count: 576
has answer: http://stackoverflow.com/a/70395924
downvote count: 0
has answer: http://stackoverflow.com/a/70810478
tagged with: javascript
has answer: http://stackoverflow.com/a/56297433
favorite count: 0
has comment: http://stackoverflow.com/comment/75238284
linked to: http://stackoverflow.com/q/27078285
has answer: http://stackoverflow.com/a/73842701
has comment: http://stackoverflow.com/comment/135169971
has answer: http://stackoverflow.com/a/69577719
has answer: http://stackoverflow.com/a/75964864
has answer: http://stackoverflow.com/a/45067145
has comment: http://stackoverflow.com/comment/76783598
tagged with: throttling
has comment: http://stackoverflow.com/comment/89954859
has answer: http://stackoverflow.com/a/44536817
has title: Difference between throttling and debouncing a function
has answer: http://stackoverflow.com/a/64300273

http://stackoverflow.com/a/26012047
has comment: http://stackoverflow.com/comment/40739487
type: Answer
answers question: http://stackoverflow.com/q/26011985
downvote count: 0
score: 1
upvote count: 1
has body: The if is not closed and this is innerHTML instead of innerHtml: if (errors.length &gt; 0) { var htmlErrors =''; for (var i = 0; i &lt; errors.length; i++) { htmlErrors += errors[i]; } document.getElementById("registration_errors").innerHTML = htmlErrors; }
has comment: http://stackoverflow.com/comment/40739551

http://stackoverflow.com/comment/40671890
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25974971
type: Comment
has text: The cron job is a separate process, it is not associated to any one user, and does not have a session id. Even if you pass it a session id, any output from the cron job will not been seen by any user

http://stackoverflow.com/a/25988717
score: 1
has body: The first method uses a function handle to bind as a callback. It can only be used if the element with someId already exists on the page. The second approach delegates the click event to any element on the page matching someId at any time, and uses a function handle bound as a callback. The difference is the event delegation.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25988656
downvote count: 0

http://stackoverflow.com/q/25905652
tagged with: jquery
type: Question
tagged with: datepicker
linked to: http://stackoverflow.com/q/5656495
has answer: http://stackoverflow.com/a/25906026
tagged with: css
score: 0
answer count: 1
has title: How to disable the click event on day in gwt datepicker?
tagged with: gwt
tagged with: javascript
type: UnansweredQuestion
has body: I am a java developer. I have developing one web application related with holiday activity. I am using GWT datepicker. How can i disable click event and don't show the past month day &amp; next month day in the current month datepicker. I am disabled the previous &amp; next button in the datepicker but when i click the next &amp; past day in the current datepicker, it will navigate the selected month. My Screen Shot: Expected Result: In my expected result marked yellow color is the unwanted day in the specific datepicker (no need to show) otherwise disable the click event to the specific day in the datepicker and how can i integrate CellGridImpl in my code. code: fTableLayout.setWidget(2, 0, datePicker); fTableLayout.setWidget(2, 1, getDatePicker(year + "-02-01")); fTableLayout.setWidget(2, 2, getDatePicker(year + "-03-01")); fTableLayout.setWidget(2, 3, getDatePicker(year + "-04-01")); fTableLayout.setWidget(3, 0, getDatePicker(year + "-05-01")); fTableLayout.setWidget(3, 1, getDatePicker(year + "-06-01")); public DatePicker getDatePicker (String date) { DatePicker datePicker = new DatePicker(); DateTimeFormat format = DateTimeFormat.getFormat("yyyy-MM-dd"); datePicker.setCurrentMonth(format.parse(date)); datePicker.addStyleName("my-cal"); return datePicker; } Thanks in advance.

http://stackoverflow.com/q/25916969
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25921222
type: Question
tagged with: backbone-routing
tagged with: backbone-views
tagged with: javascript
score: 0
has body: I'm having a problem with backbone routes and views. The views are properly rendered when I click on the link and the url is correct as well, but the problem is whenever I refresh the page, the url is still the same but the view goes back to the index view, wherein it's supposed to render the view under that route, which results to events not being properly handled. here's the router: var MainRouter = Backbone.Router.extend({ initialize: function() { // homeView.render(); }, routes: { '': 'index', 'register': 'register' } }); var mainRouter = new MainRouter(); router.on('route:index', function() { if (htmlObj.hasClass('connected')) { if (htmlObj.hasClass('present')) { profileView.render(); } homeView.render(); } }); router.on('route:register', function() { signUpView.render(); }); Backbone.history.start(); and then in the view events I set the trigger to true Backbone.history.navigate('#/signup', {trigger: true}); So it would run the function of that specific route. I also tried using pushState and root but it has the same problem on refresh but this time it says that page not found. Thanks
answer count: 1
tagged with: jquery
tagged with: backbone.js
has title: Backbone view rendering on refesh

http://stackoverflow.com/comment/40674999
type: Comment
has text: Sry, try this link istead: http://jsfiddle.net/mQHEs/23/ I need them all in one div, since it is a WordPress-blog I'm using this for!
comment on: http://stackoverflow.com/q/25976384
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40719291
comment on: http://stackoverflow.com/q/26000771
type: Comment
type: QuestionComment
has text: try jquery svg plugin or raphael.js
score: 0

http://stackoverflow.com/comment/40772191
type: AnswerComment
has text: you my javascript code it's should also solve your number 1, 2 and 3. Just give it a try, there's no harm in trying.
type: Comment
comment on: http://stackoverflow.com/a/26029656
score: 0

http://stackoverflow.com/q/26031063
has body: Whenever i run this it gives me, "first" instead of "second". Is my logic correct here? finding both avarages and then returning the greater? or what exactly do you see wrong with it. var first = ([100, 80], [100, 100]); function compare(a, b) { sum = 0; for(var i = 0; i &lt; a.length; i++) { sum += first[i]; avg1 = (sum/a.length); } sum2 = 0; for(i = 0; i &lt; b.length; i++) { sum2 += first[i]; avg2 = (sum2/b.length); } if (avg1 &gt; avg2); { return ("first"); } if (false) { return ("second"); } }
has comment: http://stackoverflow.com/comment/40774545
has comment: http://stackoverflow.com/comment/40774485
score: -2
answer count: 4
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/26031270
linked to: http://stackoverflow.com/q/25174601
has comment: http://stackoverflow.com/comment/40774423
type: Question
has answer: http://stackoverflow.com/a/26031270
has answer: http://stackoverflow.com/a/26031267
has answer: http://stackoverflow.com/a/26031674
tagged with: javascript
has title: find the average of both arrays, and then spit out the greater of the two
has comment: http://stackoverflow.com/comment/40774458
downvote count: 4
has comment: http://stackoverflow.com/comment/40774450
has comment: http://stackoverflow.com/comment/40774425
has answer: http://stackoverflow.com/a/26031357
has comment: http://stackoverflow.com/comment/40774715
has comment: http://stackoverflow.com/comment/40774479
accepted answer: http://stackoverflow.com/a/26031267
favorite count: 0

http://stackoverflow.com/comment/40524654
type: QuestionComment
comment on: http://stackoverflow.com/q/25892765
has text: @Alex K. yes number is a constant
score: 0
type: Comment

http://stackoverflow.com/q/25924321
tagged with: debugging
has body: I am reading the code of a chat project as a demo for socket.io In index.js, here is a snippet: var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); So I use Node.JS debugger: var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); // add: debugger; watch("io"); The command is: node debug index.js It stops at var io = ... But I don't know how to get the information of the object "io". Actually when I type io in the terminal, it says: io is not defined. if I type http, it will output the definition of http. If I type app, it says: app is not defined. I am confused. How to do it?
tagged with: javascript
has title: Node.JS: debug to know one object's prototype name
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25938919
has answer: http://stackoverflow.com/a/25926523
possible better answer: http://stackoverflow.com/a/25938919
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25926523
tagged with: socket.io
type: Question

http://stackoverflow.com/q/25877704
upvote count: 48
accepted answer: http://stackoverflow.com/a/25877877
has title: What is stateful filtering in AngularJS?
type: Question
has answer: http://stackoverflow.com/a/25877877
tagged with: javascript
tagged with: filter
linked to: http://stackoverflow.com/q/26848704
has body: I was reading the AngularJS developer guide on the Filter section (https://docs.angularjs.org/guide/filter#stateful-filters) and came across "Stateful Filters". This description is given as follows: It is strongly discouraged to write filters that are stateful, because the execution of those can't be optimized by Angular, which often leads to performance issues. Many stateful filters can be converted into stateless filters just by exposing the hidden state as a model and turning it into an argument for the filter. I'm new to web development, so have no idea what Stateful filtering is, and Angular Documentation didn't explain it either :( Can someone please explain what is the difference between a normal filter and a stateful filter is?
answer count: 1
favorite count: 0
tagged with: angularjs
score: 48
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/25885888
accepted answer of: http://stackoverflow.com/q/25885685
has comment: http://stackoverflow.com/comment/40520494
has comment: http://stackoverflow.com/comment/40513683
score: 2
has comment: http://stackoverflow.com/comment/40529460
has comment: http://stackoverflow.com/comment/40529707
downvote count: 0
has comment: http://stackoverflow.com/comment/40529851
has comment: http://stackoverflow.com/comment/40529529
has body: There might be some problem with your jquery file inclusion. Your code is working absolutely fine with me. I tried your code by saving it in a new php file as follows. <?php sleep(1); $mail_reg = '/^(?i)(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9] {1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/'; $return = array(); $mesaj = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (empty($_POST['inputName']) || is_numeric($_POST['inputName'])) { $mesaj = "Please enter your name!"; $return['error'] = true; $return['msg'] = 'oops'.$mesaj; echo json_encode($return); exit(); } elseif (empty($_POST['inputEmail']) || !preg_match($mail_reg, $_POST['inputEmail'])) { $mesaj = "Please enter your e-mail!"; $return['error'] = true; $return['msg'] = 'oops'.$mesaj; echo json_encode($return); exit(); } elseif (empty($_POST['inputMess'])) { $mesaj = "Please tell us something"; $return['error'] = true; $return['msg'] = 'oops'.$mesaj; echo json_encode($return); exit(); } else { $return['error'] = false; $return['msg'] = 'Thank you for getting in touch. We will contact you!'; echo json_encode($return); exit(); } } ?> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> Your name Your e-mail Your message for us Send Output:
has comment: http://stackoverflow.com/comment/40529643
has comment: http://stackoverflow.com/comment/40512445
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40515436
answers question: http://stackoverflow.com/q/25885685
type: Answer

http://stackoverflow.com/a/26025806
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26023168
upvote count: 1
has comment: http://stackoverflow.com/comment/40771801
has body: You shouldn't put any non-meteor files inside your meteor project directory, all of those CAN be picked up by some package, even if standard meteor-platform packages don't recognize the extension. So putting them in the /server might cause problems in the future. The /private folder on the other hand is meant for resources used by your application, so placing the scripts there is unsemantic and inelegant. To avoid moving those scripts outside of the project folder you can store them inside a hidden directory, that is any directory with name starting with a dot, i.e. /.scripts. Files placed there will not be picked up by Meteor application.
type: Answer

http://stackoverflow.com/comment/40625475
comment on: http://stackoverflow.com/a/25949294
type: AnswerComment
has text: Yes. But is there any way so I don't have to do further checking to find out whether it is an array or object.
score: 0
type: Comment

http://stackoverflow.com/comment/40556279
has text: @TrueBlueAussie Pretty decent, huh? I think it's available to everybody.
score: 0
comment on: http://stackoverflow.com/q/25910457
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40537105
comment on: http://stackoverflow.com/a/25899825
score: 0
type: Comment
has text: It's just an example, see the first line in the description. By tag I am sure OP means attribute
type: AnswerComment

http://stackoverflow.com/comment/40738920
comment on: http://stackoverflow.com/a/26011303
type: Comment
has text: Why use the setTimeout with 0 ms? Toggle the timeout function, use only the pure code inside the "load resize" event
score: 0
type: AnswerComment

http://stackoverflow.com/a/26001848
type: Answer
upvote count: 11
has comment: http://stackoverflow.com/comment/40721248
score: 11
has comment: http://stackoverflow.com/comment/40721206
answers question: http://stackoverflow.com/q/26001829
has body: use strip_tags() this will delete all html tags So if a $_POST['username'] = Bob than with strip_tags($_POST['username']) = Bob. If you also add trim() it will also remove leftover spaces. http://php.net/manual/en/function.strip-tags.php https://www.php.net/manual/en/function.trim.php Update As Joe Frambach points out, if you want to know if the username contains html use: if (strip_tags($name) !== $name) { echo 'this contains html'; } else { echo 'this does not contain html'; } So if the stripped value is not equal to the input value it contains html.
has comment: http://stackoverflow.com/comment/40721270
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40721226
has comment: http://stackoverflow.com/comment/40725621
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26001829
has comment: http://stackoverflow.com/comment/40721491

http://stackoverflow.com/q/25924873
has answer: http://stackoverflow.com/a/25924899
type: UnansweredQuestion
downvote count: 1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has body: I am trying to jquery isotope and Balkin Style portfolio to work together (http://codepen.io/MightyShaban/pen/eGaCf) buti cant. I can get them to work perfectly on there own but once together it wont work. I have also tried noConflict() with no luck as well. Any ideas would be much appreciated. JS Code. // Balkin $( document ).ready(function() { $('.portfolio ul li a').click(function() { var itemID = $(this).attr('href'); $('.portfolio ul').addClass('item_open'); $(itemID).addClass('item_open'); return false; }); $('.close').click(function() { $('.port, .portfolio ul').removeClass('item_open'); return false; }); $(".portfolio ul li a").click(function() { $('html, body').animate({ scrollTop: parseInt($("#top").offset().top) }, 400); }); }); /*===========================================================*/ /* Isotope Posrtfolio /*===========================================================*/ if(jQuery.isFunction(jQuery.fn.isotope)){ jQuery('.portfolio_list').isotope({ itemSelector : '.list_item', layoutMode : 'fitRows', animationEngine : 'jquery' }); /* ---- Filtering ----- */ jQuery('#filter li').click(function(){ var $this = jQuery(this); if ( $this.hasClass('selected') ) { return false; } else { jQuery('#filter .selected').removeClass('selected'); var selector = $this.attr('data-filter'); $this.parent().next().isotope({ filter: selector }); $this.addClass('selected'); return false; } }); } HTML (needs to be made more tidy i know, sorry) All Responsive Mobile Branding Nostrum mnesarchum Art / Illustration
has title: Two jquery items not working together
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
score: -1

http://stackoverflow.com/comment/40747238
score: 0
type: QuestionComment
has text: user3995789: That worked perfectly! Now I just need to figure out why it worked yesterday *with* the base. Thanks so much. Post an answer and so I can accept it.
type: Comment
comment on: http://stackoverflow.com/q/26015335

http://stackoverflow.com/q/25917578
upvote count: 1
possible better answer: http://stackoverflow.com/a/25917989
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/17952514
has title: Change src of image using jquery and FileResult
has comment: http://stackoverflow.com/comment/40569983
type: AnsweredQuestion
has body: I am trying to change the source of an image dynamically using jQuery. Here's an example of what we were doing before: $('#resultsDiv').on('mouseover', '.cardImage', function() { var imageSrc = $(this).attr("data-id"); imageSrc = imageSrc.replace("~", ""); $('#cardImageDiv').attr('src', imageSrc); }); The imageSrc variable was storing the physical location of an image; however, we must change that as it is no longer sure we might have access to the physical location of an image on our server. So we've stored our image in a database and I'm trying to get it back like this: $('#resultsDiv').on('mouseover', '.cardImage', function () { var cardID = $(this).attr("data-id"); alert("woah!"); alert(cardID); $.ajax({ type: "GET", url: '@Url.Action("UpdateImageByCardID","Images")', data: {_cardid: cardID}, datatype: "image/png", success: function (data) { alert("yeah!"); $('#cardImageDiv').attr('src', data); } }); }); The cardId is the unique identifier of the image. Here's the Images controller action: public FileResult UpdateImageByCardID(int? _cardid) { byte[] imageData = mImageManager.GetNormalImageAsyncByCardId((int)_cardid); return File(imageData, "image/png"); } Now I know the action is hit in debugging and returns a correct byte[] value, however the image src is not updated. For information only here's how the first image is displayed: &lt;img id="cardImageDiv" src="@Url.Action("GetNormalImageByCardIdAsync", "Images", new { @_cardId = firstSrc.CARD_IDE})" alt="@firstSrc.CARD.CARD_NAME" title="@firstSrc.CARD.CARD_NAME" class="nullify"/&gt; The GetNormalImageByCardIdAsync is an asynchronous file returned by the controller task and it does its job. Now I wanna know what's causing the problem and how can I fix it?
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25917989
has comment: http://stackoverflow.com/comment/40570172
has comment: http://stackoverflow.com/comment/40569994
accepted answer: http://stackoverflow.com/a/25919162
has comment: http://stackoverflow.com/comment/40570056
type: Question
has comment: http://stackoverflow.com/comment/40571272
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25919162
tagged with: javascript
has comment: http://stackoverflow.com/comment/40570144
tagged with: image
has comment: http://stackoverflow.com/comment/40570251
answer count: 2

http://stackoverflow.com/q/26014138
upvote count: 1
has title: Bootstrap modal doesn't show after prevented from being opened
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/9817827
has answer: http://stackoverflow.com/a/26014909
has comment: http://stackoverflow.com/comment/40743088
type: Question
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40743509
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26014909
has answer: http://stackoverflow.com/a/26014848
has body: I'm using Bootstrap 3 to create modal form. Before user click button to open the modal, there is a field validation. If it is valid then modal is shown, otherwise prevent the modal from being shown. The problem is on the second chance, user click the button and the modal won't display. How to solve this problem? Code to show modal and prevent modal from being shown: jsfiddle $("#btnLookupClient").click(function (e) { if ($("select[name='OfficeID'] option:selected").index() &lt;= 0) { alert("Please select office"); $("#OfficeID").focus(); $("#clientModal").on("show.bs.modal", function (e) { return e.preventDefault() // stops modal from being shown }); } else { var url = '@Url.Content("~/Client/Search?officeID=")' + $("#OfficeID").val(); $.get(url) .done(function (data) { $("#lookup-client-container").html(data); $("#clientModal").modal(show = true, backdrop = true); }); } });
favorite count: 0
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/26014848

http://stackoverflow.com/a/25932460
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25932152
answers question: http://stackoverflow.com/q/25932152
type: Answer
has body: I don't why it could make an issue, but pay attention other developers would have to use React in their site just for this plugin. I like React too, but jQuery is mainstream, and most websites have jQuery in them, so if I were you, I'd go jQuery for the plugin, and make a React wrapper around it. good luck dude!

http://stackoverflow.com/comment/40580552
comment on: http://stackoverflow.com/q/25923423
score: 0
type: Comment
type: QuestionComment
has text: Try `slike[Math.floor(Math.random() * (slike.length-1))]`

http://stackoverflow.com/q/25940853
type: Question
has comment: http://stackoverflow.com/comment/40624087
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Show an svg in a force graph
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
type: UnansweredQuestion
has body: I have a force graph with nodes and links and I want to represent the batterystatus as a svg over each node. My problem is that I do not know how to create the image an place it over my node. Fiddle Link http://fiddle.jshell.net/angelov/gt2j14g6/15/ This is how my JS code looks, but it does not represent anything over the nodes: function updateBatteryNotification(value) { batteryIndicator = document.querySelector("#indicator"); batteryIndicator.style.width = value + "%";} updateBatteryNotification(20); var newElement = document.createElementNS("http://www.w3.org/2000/svg", 'batteryBody'); var batt = document.getElementById('batteryBody'); node.append("svg:svg") .attr("x", -15) .attr("y", -42) .attr("xlink:href", function(d) { return newElement; }); HTML: CSS: #batteryBody { float: left; width: 30px; height: 11px; border: 2px #CCC solid; } .container { width: 40px; margin-left: auto; margin-right: auto; margin-top: 5px; } .batteryEnd { float: left; height: 12px; width: 3px; } .batteryEnd div { width: 2px; height: 5px; margin-top: 5px; margin-left: 2px; background-color: #CCC; } #indicator { height: 100%; width: 50%; } #indicator.charging { background-color: #BFFF00; } #indicator.notCharging { background-color: #FFFF00; }
has comment: http://stackoverflow.com/comment/40647475
has comment: http://stackoverflow.com/comment/40632717

http://stackoverflow.com/comment/40555183
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25908621
has text: Hey Regent, that is just what i needed, now i just need to change the addition with multiplication and its done. Why not add it as an answer?

http://stackoverflow.com/q/25943382
type: UnansweredQuestion
has body: I have an ajax call to get a remote file on my server. It works, but only returns part of the file: var remoteFile; $.ajax({ async: false, url: "http;//myAWSDNS.com/some/path/file.txt", dataType: "text", success: function(data) { remoteFile = data; } }); . . . //more code I have confirmed that the file currently looks like this: user, wants to pair with user1, test@gmail.com user2, anothertest@gmail.com however, in code, remoteFile only is this: user, wants to pair with user1, test@gmail.com i.e. it is missing the last line. Why can this be happening? Is it a JavaScript string issue, or an ajax issue? Thanks, best regards, Chris
tagged with: file
tagged with: resources
type: Question
has answer: http://stackoverflow.com/a/25943771
answer count: 2
has title: Ajax call to get remote file only returns part of file
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25943409
tagged with: ajax
score: 0

http://stackoverflow.com/comment/40497800
has text: Yes, I have jQuery. Basically I purchased a template that was built using bootstrap and jquery. I am trying to convert it to angular. Everything on the angular part works fine except from the options. When i remove the reference to the bootstrap.js I cannot get the options to load. And yes, the $http.get works fine. I cannot think of anything else but a conflict...
type: Comment
comment on: http://stackoverflow.com/q/25876317
score: 0
type: QuestionComment

http://stackoverflow.com/a/32715545
type: Answer
answers question: http://stackoverflow.com/q/25999037
has body: Here's the fix (in svg.js and dist files): https://github.com/adobe-webplatform/Snap.svg/issues/325 URL = Snap.url = function (url) { // return "url('#" + url + "')"; return "url('" + window.location.pathname + "#" + url + "')"; };
score: 0

http://stackoverflow.com/comment/40534117
score: 0
type: Comment
has text: Hey @Bilal, just another quick question. If I were to switch the ranking of an item in the same column, how can I re-enable the disabled items? i.e. I select item 2 at ranking 1 but then switch it to ranking 2, options for item1 and 3 are now disabled for ranking 1. I tried using `if(!$(this).is(':checked') == false { $(this).prop('disabled', false)` but it didn't work.
type: AnswerComment
comment on: http://stackoverflow.com/a/25896154

http://stackoverflow.com/q/26022831
type: UnansweredQuestion
has body: I have a JavaScript file using speechSynthesis. I keep having this error: "Cannot read property 'attachEvent' of null" in line 129: Here it is: speech.bind = function(event, element, callback) { **if (element.attachEvent) {** element.attachEvent('on'+event, callback ) } else if (window.addEventListener) { element.addEventListener(event, callback ,false); }; }; I will put in here the role code in here so anyone can check the entire JavaScript: var speech_def = speech_def || { container: "#glb-materia" ,insert_before: true ,ico: "http://edg-1-1242075393.us-east-1.elb.amazonaws.com/speech/listen_icon.jpg" ,bt_txt: "OUÃƒâ€¡A A REPORTAGEM" ,bt_stop: "PARAR!" ,source: ".materia-conteudo" ,ignore: [ ".foto-legenda" ,".frase-materia" ,"script" ,"style" ,"#speech" ,".sub-header" ,".chamada-materia" ,".data-autor" ,".box-tags" ,".saibamais" ] }; var speech = speech || {}; //Polyfill remove() Element.prototype.remove = function() { this.parentElement.removeChild(this); }; NodeList.prototype.remove = HTMLCollection.prototype.remove = function() { for (var i = 0, len = this.length; i &lt; len; i++) { if(this[i] &amp;&amp; this[i].parentElement) { this[i].parentElement.removeChild(this[i]); } } }; //Polyfill innerText if ( (!('innerText' in document.createElement('a'))) &amp;&amp; ('getSelection' in window) ) { HTMLElement.prototype.__defineGetter__("innerText", function() { var selection = window.getSelection(), ranges = [], str; for (var i = 0; i &lt; selection.rangeCount; i++) { ranges[i] = selection.getRangeAt(i); } selection.removeAllRanges(); selection.selectAllChildren(this); str = selection.toString(); selection.removeAllRanges(); for (var i = 0; i &lt; ranges.length; i++) { selection.addRange(ranges[i]); } return str; }) } speech.iOS = /(iPad|iPhone|iPod)/g.test( navigator.userAgent ); speech.Android = /(Android)/g.test( navigator.userAgent ); speech.include = function() { var bt = "" bt += '&lt;div id="speech" ' +'title="'+speech_def.bt_txt+'" ' +'style="' +'display: no…
has comment: http://stackoverflow.com/comment/40800918
has title: Cannot read property `attachEvent` of null
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26022883
has comment: http://stackoverflow.com/comment/40759315

http://stackoverflow.com/comment/40680621
has text: This is actually the answer to the first version of your question. If the myObj is an Array instead of an Object, then the loop in `searchByProprerty` can be changed to `for(var i=0,l=myArray.length; i<l; ++i){ val = myArray[i]; prop=...; if... }` where `...` means copy the existing code into that spot.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25979460
type: Comment

http://stackoverflow.com/comment/40764730
has text: Justin, could I possibly do something higher up in code to hide catalogid=3? Like here:` ${Name}`
comment on: http://stackoverflow.com/a/26023304
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40749266
type: QuestionComment
score: 1
has text: `why did they decide it should behave this way.` since we can't read minds, that makes this question opinion based.
comment on: http://stackoverflow.com/q/26017371
type: Comment

http://stackoverflow.com/a/25922503
score: 0
has comment: http://stackoverflow.com/comment/40580594
has body: Do NOT create a form and call it's submit() method. Use jQuery $.post() function like this in the click event of your button: $.post("Home/generatePdf", { "id" : "invform", "name" : "Name", "type" : "text", "value" : cellValue, function( resp ) { //Success function //Reply with a JSON string from server indicating the PDF URL in the url property resp.url; //this should cointain the URL to your generated PDF }, "json" }); This will avoid the PDF to be downloaded from the server to the browser. On the "success function", open the modal and display the PDF. You can use pdf.js library (https://github.com/mozilla/pdf.js/) to display the PDF inside the modal, remember that if you don't use this library (or similar) the PDF would not shown on browser unless a PDF reader extension is installed in the browser. I'm assuming these PDF are generated on the server and can be downloaded later, otherwise you just can pass the URL to pdf.js in the click button handler instead of doing the $.post(). Also, Google docs viewer would be an alternative to show the PDF (either generated and stored on server or on the fly via an URL), if the PDF do not contains sensitive just use it like this inside your modal window, but be aware that the PDF gets transmitted to Google docs in order to be rendered, also the PDF URL must be public (not user/password needed to be accessed): &lt;iframe src="http://docs.google.com/viewer?url=your-pdf-url.com/doc.pdf&amp;embedded=true" width="600" height="780" style="border: none;"&gt;&lt;/iframe&gt;
type: Answer
answers question: http://stackoverflow.com/q/25921754

http://stackoverflow.com/comment/40659938
comment on: http://stackoverflow.com/a/25968094
has text: It is different from your problem
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26022236
has comment: http://stackoverflow.com/comment/40758386
has answer: http://stackoverflow.com/a/26022314
upvote count: 1
has title: input type color in html5 to have random value
accepted answer: http://stackoverflow.com/a/26022314
score: 0
downvote count: 1
has body: can i make my color value random? i have a for loop that creates input fields color,and i want that i have random values of color when they are created. can i do this with input type=color in html5? or not? what i tried for(var i=0;i&lt;val;i++) { randomColor=‘#’+(Math.random()*0xFFFFFF&lt;&lt;0).toString(16); generate(e, i, randomColor); } function generate(e, i,randomColor) { e.innerHTML += "&lt;input type='color' name ='color1' value="randomColor" id='color"+i+"'/&gt;"; }
type: AnsweredQuestion
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/26022322
type: Question
has answer: http://stackoverflow.com/a/26022322
tagged with: http://stackoverflow.com/tag/html
answer count: 2

http://stackoverflow.com/q/25920561
favorite count: 0
has answer: http://stackoverflow.com/a/39006953
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I created a contenteditable div and added features for formatting. One of the feature I added is creating a list from paragraph, I'll reproduce the steps below. ==== 1) This is the paragraph I wanted part of it to be a list. 2) So I marked the text to make it a list , I use plugin from https://github.com/kenshin54/popline/ (modified it myself). And it uses document.execCommand("InsertOrderedList", false); for creating list 3) And then after I clicking the button, it made the whole paragraph to list. I just want the marked text to be (just for "Sed imperdiet....orci,") The reason that I posting on Stackoverflow instead of Github repository issues (https://github.com/kenshin54/popline/) because I'm not sure that is an issue or not, I just want it to work like that. Anyone has some suggestions?
upvote count: 2
answer count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25965987
tagged with: dom
has title: InsertOrderedList doesn't make new list with marked text
tagged with: browser
score: 2
downvote count: 0
tagged with: javascript

mime-mail
type: Tag
tags question: http://stackoverflow.com/q/25956343
tag name: mime-mail

http://stackoverflow.com/q/25903254
tagged with: gmaps4rails
has comment: http://stackoverflow.com/comment/40603495
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40572677
type: Question
has comment: http://stackoverflow.com/comment/40562171
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40571600
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/40571798
has title: Too much recursion with GMaps4Rails
score: 1
has body: I'm having a problem what I'm not able to fix right now.. Here is my code: https://gist.github.com/foncho/0bd5d879221c85774346 The problem I have is too much recursion when trying to render all markers x too much recursion ...ction V(){}K=V[H];K.get=function(a){var b=hf(this);a=a+&quot;&quot;;b=qe(b,a);if(be(b)){if... {main,g...try}.js (line 21, col 830) x too much recursion function qe(a,b){if(aa[H][ec]Zc)return a[b]};function P(a,b,c){a-=0;b-=0;... {main,g...try}.js (line 13, col 20) x too much recursion ....toUpperCase()+aVb)}function hf(a){a.gm_accessors_||(a.gm_accessors_={});re... {main,g...try}.js (line 22, col 382) Any ideas? Any help is welcome! Thanks in advance
answer count: 0

http://stackoverflow.com/a/26015377
answers question: http://stackoverflow.com/q/26015248
downvote count: 1
has body: Nope. Changing the url without the hash reloads the entire page. The entire point of this $routeProvider is to build single-page app with multiple views. Basically, having the # in the url is the only way to do that. Changes to a url's hash don't result in a page reload, and allow Angular to load the relevant views.
score: -1
upvote count: 0
type: Answer

keystroke
type: Tag
tags question: http://stackoverflow.com/q/26000785
tag name: keystroke

http://stackoverflow.com/comment/40595598
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25931947
type: Comment
has text: Please do not include the entire codebase of a plugin you are using. We only require the code you have written.

http://stackoverflow.com/comment/40638720
has text: JSC uses a generational garbage collector. Read about this here: http://blogs.msdn.com/b/abhinaba/archive/2009/03/02/back-to-basics-generational-garbage-collection.aspx
comment on: http://stackoverflow.com/q/25956725
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25985027
downvote count: 0
has comment: http://stackoverflow.com/comment/40728034
answers question: http://stackoverflow.com/q/25984931
type: Answer
accepted answer of: http://stackoverflow.com/q/25984931
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40727811
has body: We dont have any icons over here so I am changing colour of the background to demonstrate toggling of your desired classes. $('.got').on('click',function(){ $(this).find('.icon-white').toggleClass('icon-play icon-pause'); }); .icon-white{ margin:0px 20px; } .icon-play{ background:#ddd; } .icon-pause{ background:#fdc847; } a{ text-decoration:none; color:#999; font-weight:bold; } yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download yourIconclick here (anchor tag having got class) Download
has comment: http://stackoverflow.com/comment/40735461
type: AcceptedAnswer

http://stackoverflow.com/q/26001869
possible better answer: http://stackoverflow.com/a/26001962
has answer: http://stackoverflow.com/a/26001962
has comment: http://stackoverflow.com/comment/40721253
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40721727
accepted answer: http://stackoverflow.com/a/26002017
type: Question
score: 0
answer count: 2
has title: Hide entire row in tr
tagged with: javascript
tagged with: jquery
has body: I'm trying to hide an entire row when there is input value = 0 inside the tr tag? In the example I'm trying to hide row 1,3,4 and display row 2 since the value of input = 1 Right now I'm hiding all tr's with the class hide-also and that is not what i want to accomplished. http://jsfiddle.net/jmg2u98a/1/ Row 1 Hide if value 0 Row 2 Show if value 1 Row 3 Hide if value 0 Row 4 Hide if value 0 Hide Show
has comment: http://stackoverflow.com/comment/40721213
has answer: http://stackoverflow.com/a/26002017

http://stackoverflow.com/a/25877576
type: Answer
has body: I am unable to reproduce the flicker with the code provided, but there are a few things you may want to check or do: Make sure nothing else is broadcasting on 'broadcast.' Make sure a parent DOM element isn't forcing your headshot to refresh when data within the controller changes. Perhaps refactor your directive to: myDirectives.directive('headshot', function($http) { return { restrict: 'AE', scope: { lastID: '@lastid' }, template: '&lt;img ng-src="{{imgSrc}}" class="headshot"&gt;', link: function(scope, element, attrs) { var src = 'img/nophoto.png'; scope.imgSrc = (src); var last_id = -1; attrs.$observe('lastid', function(id) { if ( last_id !== id ) { //get name of the image based on employee id $http.get('photo/photo.aspx?id=' + id).success(function(data) { src = 'img/' + data; scope.imgSrc = (src); }).error(function(error) { src = 'img/nophoto.png'; scope.imgSrc = (src); }); last_id = id; } }) } }; }); There is some chance that your flicker is caused by scope.imgSrc getting reset to "img/nophoto.png" briefly before the http service is able to load in the proper image. Additionally, you should maintain some state and check to make sure that the new lastid is actually different than the previous value (will also prevent extraneous http calls). This refactor should prevent that, although I don't actually see that as the cause of your problem since if I understand your problem correctly, lastid shouldn't actually be changing in the flickering cases. If you are complaining about a flicker when the employee image should change, then this should fix your problem.
has comment: http://stackoverflow.com/comment/40523925
has comment: http://stackoverflow.com/comment/40524857
answers question: http://stackoverflow.com/q/25876235
score: 0

http://stackoverflow.com/q/25988204
tagged with: model-view-controller
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25988535
type: Question
has answer: http://stackoverflow.com/a/25988535
has body: I am reading a tutorial on a web application. This is one of the simple UI java script called home.js. This syntax looks very new to me, and even horrible. It looks like two parameters are defined for a function (no function name?). What is text! The parameter of applyTemplate seems to be "$(this.el),HomeTemplate,{}". What does this whole thing do? Why is it so messy? /** * The About view */ define([ 'utilities', 'text!../../../../templates/desktop/home.html' ], function (utilities, HomeTemplate) { var HomeView = Backbone.View.extend({ render:function () { utilities.applyTemplate($(this.el),HomeTemplate,{}); return this; } }); return HomeView; });
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40697245
has title: Java script in model view of web application

http://stackoverflow.com/q/25971195
tagged with: javascript
has comment: http://stackoverflow.com/comment/40665187
favorite count: 0
has comment: http://stackoverflow.com/comment/40665682
has body: So, I'm looking for toSourceString() method for Function object which will return the source code of the Function object in String format. For example, If I have (function(a, b) { function useThis(c,d) { return 'hello' + c + d; } console.log(useThis('Jenny', 'Jim')); }).bind(this); kind of function, then I wish if I run toSourceString(), I will just get the inner source part of the function like: function useThis(c,d) { return 'hello' + c + d; } console.log(useThis('Jenny', 'Jim')); Is there any default function that works across browsers? Or is there any Regex way to find some string and replace/remove the first and the end?
has comment: http://stackoverflow.com/comment/40665256
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/25971269
tagged with: tostring
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40665357
has title: is there a toSourceString() kind of function for Function in Javascript?
has comment: http://stackoverflow.com/comment/40665276
has answer: http://stackoverflow.com/a/25971269
type: Question
tagged with: function
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25958879
upvote count: 0
has comment: http://stackoverflow.com/comment/40642844
tagged with: javascript
favorite count: 0
has body: I want to add a condition to my JavaScript code, where if I write the correct answer in the text box it will go to the next page. For example: the question is: "What is the capital of Japan?", if I write Tokyo it will go to a new page, but if write the wrong answer it will just show the alert box message. Crack the code What is the Capital of Japan
has comment: http://stackoverflow.com/comment/40643120
has title: Java Script Condition Statement
has comment: http://stackoverflow.com/comment/40643369
has comment: http://stackoverflow.com/comment/40642728
type: UnansweredQuestion
score: -3
tagged with: conditional-statements
downvote count: 3
has answer: http://stackoverflow.com/a/25959146
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25959454

http://stackoverflow.com/q/26010355
possible better answer: http://stackoverflow.com/a/26025722
accepted answer: http://stackoverflow.com/a/26014716
upvote count: 6
has answer: http://stackoverflow.com/a/26025722
type: AnsweredQuestion
has title: Is there a way to uniquely identify an iframe that the content script runs in for my Chrome extension?
tagged with: iframe
has answer: http://stackoverflow.com/a/26011793
tagged with: google-chrome
type: Question
tagged with: javascript
score: 6
has answer: http://stackoverflow.com/a/26014716
has comment: http://stackoverflow.com/comment/40743179
answer count: 3
has comment: http://stackoverflow.com/comment/40743289
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40743329
downvote count: 0
favorite count: 0
has body: In my Chrome extension I am injecting the content script into all IFRAMEs inside a page. Here's a part of the manifest.json file: "content_scripts": [ { "run_at": "document_end", "all_frames" : true, "match_about_blank": true, "matches": ["http://*/*", "https://*/*"], "js": ["content.js"] } ], So a single web page having multiple IFRAMEs will end up running that many copies of my injected content.js. The logic inside content.js collects data from each IFRAME it's injected into, or from the main/top page, and sends it back to the background script (using chrome.runtime.sendMessage.) The background script in turn needs to store the data in the global variable, that is later used in the extension itself. The issue I'm facing is that the app needs to distinguish between the "data" received from multiple IFRAMEs, since my data collection method can be called repeatedly upon user's interaction with the page, and thus I cannot simply "dump" the data received by the background script into an array. Instead I need to use a dictionary-type data storage. I can tell if the data is coming from an IFRAME or from the top page by running the following: //From the `content.js` var isIframe = window != window.top; and my thinking was that if I collect page URLs of each IFRAME then I should be able to use it as a unique key to store the data under in my dictionary-type global variable: //Again from content.js var strUniqueIFrameURL = document.URL; Well, that is not going to work, because two or more IFRAMEs can have the same URLs. So thus my original question -- how to tell IFRAMEs on the page apart? Is there some unique ID or somethign that Chrome assigns to them?
has comment: http://stackoverflow.com/comment/40743591

http://stackoverflow.com/comment/40779249
type: Comment
score: 1
has text: Ok - but I think especially on mobile devices it is worth bothering due to the hardware constraints. The facebook mobile web app does not unload items and fills the phone memory to 500 MB.
comment on: http://stackoverflow.com/a/26028619
type: AnswerComment

http://stackoverflow.com/comment/40709295
comment on: http://stackoverflow.com/a/25988991
type: AnswerComment
has text: {multi:true} is the expression for updating all documents matching the criterion by default it is false and in that case only one document is updated. See the link below http://docs.mongodb.org/manual/reference/method/db.collection.update/#multi-parameter/#multi-parameter
type: Comment
score: 1

http://stackoverflow.com/a/25914513
has comment: http://stackoverflow.com/comment/40563914
accepted answer of: http://stackoverflow.com/q/25914339
score: 2
answers question: http://stackoverflow.com/q/25914339
has body: Two distinct (non-identical) objects are never equal to each other, even if they have the same properties. Just check the register property. var remove = selectedDomains.domains.filter(function(e){ return e.register === domain + "." + selectedTLD; }) remove will be an array containing all elements which match the URL. However, if you want to remove the element from the array, you probably want to change the condition to e.register !== domain + "." + selectedTLD;
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25983377
has body: I am trying to hide and show div's displayed on my page with a select element however having a bit of trouble as I can't seem to get the jQuery to function. I am listing results from my SQL table using PHP that currently displays every row onto my page and prints them into a list. I want to make the jQuery hide the div's that don't have a class that matches the select option that is selected. Here is an example of the listing template that echo's out all of the MySQL results and displays them into a template and is then looped to display every row on the table: <?php while($row = $results->fetch(PDO::FETCH_ASSOC)) { echo ' '.$row["Make"].' '.$row["Model"].' '.$row["Variant"].' £'.number_format($row['Price']).' '.$row["FuelType"].' '.$row["Bodytype"].' '.$row["Transmission"].' '.$row["Colour"].' Mileage: '.number_format($row["Mileage"]).' Engine size: '.$row["EngineSize"].'cc History checked More details Test drive 5 More photos '; } ?> The 'Make' is added to the listing-container div to add a class to be able to filter the results with jQuery. Here is the form with the select element I am using: Make (Any) <?php while($make = $filterres->fetch(PDO::FETCH_ASSOC)) { echo ' '.$make["Make"].' '; } ?> Model (Any) Two Three Four Five As you can see the select option contains the 'Make' and is looped. So down to the jQuery: So in theory this should work but for some reason it isn't, can anybody notice anything that might be wrong? I have placed my script below the core jQuery in my footer and it still doesn't work. Here is a live example: http://www.drivencarsales.co.uk/used-cars.php
has title: jQuery show and hide dynamic classes not working
has answer: http://stackoverflow.com/a/25984293
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25983531
score: 0
answer count: 2
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/25964547
score: 0
possible better answer: http://stackoverflow.com/a/25964612
has answer: http://stackoverflow.com/a/25964612
has title: Does JavaScript from console affects real page or just my 'local copy'
has answer: http://stackoverflow.com/a/25964572
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25964572
tagged with: http-post
type: AnsweredQuestion
tagged with: console
type: Question
answer count: 2
has body: there is some thing that troubles me. There is some social-dating-site. The normal process is that page is showing you photos of some girls and you have to click Yes, if u like it, or No if you do not. If u both click Yes on each other photos- you get contact. So now the point - i wrote javascript code that automatically click Yes if average photo rank is bigger than 8/10 :). I simulated click event on button, putted in loop for 300 times and run this from chrome console. I know that click event is raised but, due to their politic, i cant click button Yes more than X times during one day, so i don't know now if this click event really goes to server or just my 'local copy' or what ever is it called. Does it work? I mean, can i have influence on the real outcome of server?

http://stackoverflow.com/comment/40710046
comment on: http://stackoverflow.com/q/25995437
score: 0
has text: @ClémentMalet Neither. It was sarcasm. Both code and strings in JavaScript don't have any hard limits. You can write as much code or as long strings as you want and you won't ever have a problem on modern systems. As Cerbrus said, don't worry about it too much. Modern JavaScript engines can handle almost anything that you throw at them.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25901475
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Hi DrakaSAN i guess you are looking for a progress bar. An example can be found on https://github.com/visionmedia/node-progress var ProgressBar = require('progress'); var bar = new ProgressBar(':bar', { total: 10 }); var timer = setInterval(function () { bar.tick(); if (bar.complete) { console.log('\ncomplete\n'); clearInterval(timer); } }, 100); Hope this is helpful to you.
has comment: http://stackoverflow.com/comment/40550249
score: 1
accepted answer of: http://stackoverflow.com/q/25888535
answers question: http://stackoverflow.com/q/25888535

http://stackoverflow.com/a/25922497
has body: One alternative would be dojo's dijit widgets: http://dojotoolkit.org/
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25922323
upvote count: 2
answers question: http://stackoverflow.com/q/25922323
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40779979
has text: Do you know the object Bar? How do you create it? What if the input is none of the object you know?
type: Comment
comment on: http://stackoverflow.com/q/26034049
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40635496
type: QuestionComment
comment on: http://stackoverflow.com/q/25955061
score: 0
has text: Does this help var1 = var2 = function() ?
type: Comment

http://stackoverflow.com/q/25983345
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40688327
has body: I have a variable that contains my angular app (was instantiated with:) var app = angular.module('app', [...]); And I want to get the $timeout service. How can I get this service from the it? I want something like: var timeout = app.getService('$timeout'); or app.something('$imeout', function($timeout) { ... } // like controller() does Where I want to use it: define([], function () { // I can import my angular module 'app', or 'angular' return { 'some_function': function () { $timeout(function() { ... do something ... }, 1000); } } } This is a service (with requirejs), and my controllers will require it.
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40687899
has comment: http://stackoverflow.com/comment/40687737
has comment: http://stackoverflow.com/comment/40687841
tagged with: javascript
has answer: http://stackoverflow.com/a/25983480
has comment: http://stackoverflow.com/comment/40688069
has title: how to get a service from angularjs app
answer count: 1
downvote count: 0
favorite count: 0
tagged with: service
tagged with: angularjs

jquery-focusout
type: Tag
tag name: jquery-focusout
tags question: http://stackoverflow.com/q/25976214

http://stackoverflow.com/a/56088422
type: Answer
answers question: http://stackoverflow.com/q/26002974
score: 0
has body: well using flexbox make it simple. Try this around .text { display: flex; &gt; div { flex: 0 0 40%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } } https://codepen.io/baagii95/pen/byeNqZ btw i used sass. If you want in css version try this. .text { display: flex; } .text &gt; div { flex: 0 0 40%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
has comment: http://stackoverflow.com/comment/138050034

http://stackoverflow.com/a/25964566
type: Answer
answers question: http://stackoverflow.com/q/25964024
score: 2
upvote count: 2
has body: There were 2 things wrong with your directive: You should escape the apostrophes of your template. If you are going to pass an attribute as a string you should use @, the equal sign = is for data binding a property of the directive with a property of the parent scope. So your directvive should look like this: angular.module('test', []) .controller('Controller', ['$scope', function($scope) { $scope.test = 'asdf'; }]) .directive('myView', function ($window) { return { restrict:'E', scope: { size: '@' }, controller: function($scope) { if (angular.isUndefined($scope.size)) { $scope.size = 'medium'; } }, template: ' {{size}} I\'m HUGE I\'m a wee little thing I\'m the default ' }; }); Working Example
accepted answer of: http://stackoverflow.com/q/25964024
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40548461
comment on: http://stackoverflow.com/a/25905963
type: Comment
has text: You can check this site, we have library called jaggery, you can try out:) http://jaggeryjs.org/
score: 0
type: AnswerComment

angular-strap
tags question: http://stackoverflow.com/q/25909823
tag name: angular-strap
type: Tag

http://stackoverflow.com/comment/40636376
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955514
score: 1
has text: Don't forget about [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys).

http://stackoverflow.com/comment/40668006
type: QuestionComment
has text: Any errors in console? Why use js AND jQuery selectors? Why you specify full path to form action and not relative one? I see no jQuery loading
type: Comment
comment on: http://stackoverflow.com/q/25972880
score: 0

http://stackoverflow.com/comment/40644190
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25956117
score: 0
has text: Might I be so bold as to suggest you check out my [fork of tablesorter](http://mottie.github.io/tablesorter/docs/). It has a lot of enhancements which includes a bunch of default themes.

http://stackoverflow.com/comment/40632488
type: Comment
comment on: http://stackoverflow.com/a/25932941
has text: I tried to call the computed property in the login-template with the #each helper, but it doesn't output anything: '{{#each user in controllers.application.particularUser}}{{/each}}' This still works as expected: '{{#each user in controllers.application.userArray}}{{/each}}' So are a controller's computed properties accessed differently in templates when it's controller is injected through the needs-property? In my understanding both should work the same way!?
type: AnswerComment
score: 0

http://stackoverflow.com/q/25994001
score: 16
possible better answer: http://stackoverflow.com/a/49599723
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/48642563
has title: How to calculate byte length containing UTF8 characters using javascript?
type: Question
has answer: http://stackoverflow.com/a/25994411
accepted answer: http://stackoverflow.com/a/25994411
answer count: 3
upvote count: 16
tagged with: javascript
has answer: http://stackoverflow.com/a/49599723
favorite count: 0
has body: I have textbox, in which the user can enter the characters in ASCII/UTF-8 or a combination of both. Is there any API in javascript which we can calculate the length of string in bytes for the characters entered in textbox. Like if i enter ascii chacter let's say : mystring - the length would be calculated as 8. But when UTF8 characters are entered the characters can be 2/3/4 byte. lets say the character entered : i ♥ u , the length in bytes is 5. The textbox can accept max length of 31 characters. But in case if UTF8 characters entered, it will not accept character string : i ♥ u i ♥ u i ♥ u i ♥ u i ♥ u . the length is 30. Can we restrict the user to enter characters not more than 31 even for UTF8 characters.
tagged with: utf-8
linked to: http://stackoverflow.com/q/5728045
downvote count: 0
linked to: http://stackoverflow.com/q/48419167

http://stackoverflow.com/comment/40512657
has text: I am also well known in Flash and Flex, and Flash can be exported as HTML5, But when u look at the code then, it looks like JavaScript, i think, it has been awhile, and i am learning Android iOS and windows 8 apps at the moment. aspecialy in the late hours a cant see the beginning or the end of some codes, the next morning i have fixed it in 5 minutes or so. Flex/Flash builder would be ideal for HTML5, but there is not mutch happening there for the public yet.
comment on: http://stackoverflow.com/a/25886099
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26033763
has answer: http://stackoverflow.com/a/26033825
favorite count: 0
tagged with: php
type: Question
score: 2
type: AnsweredQuestion
has body: My for loop in php looks like this: for ($i=1;$i&lt;=10;$i++) { ?&gt; &lt;input type="hidden" class="ThisQuestion" id="GetQuestion-&lt;?php echo $i; ?&gt;" value="&lt;?php echo $i; ?&gt;" /&gt; &lt;a href="javascript:void(0)" class="VerySmallFont"&gt; &lt;div class="SelectNumberBox &lt;?php echo $NumberBoxClass; ?&gt;"&gt;&lt;?php echo $i; ?&gt;&lt;/div&gt; &lt;/a&gt; Now I want to extract value of $i from php to Jquery. Here's what I am doing in JS part for this - &lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function() { $(".VerySmallFont").click(function(){ var $Parent = $(this).parent(); var ThisQuestionNumber = $Parent.find('[id^="GetQuestion-]:first').val(); var TestID = $("#GetTestID").val(); var ShowCQ = '1'; $.ajax( { type : 'GET', url:'getquestiondata.php', data : {TestID: TestID, ShowCQ: ShowCQ, ThisQuestionNumber: ThisQuestionNumber}, success:function(data) { $("#LoadingImage").hide(); $('#ShowQuestion').html(data); } }); }); }); &lt;/script&gt; I'm not getting value of the var ThisQuestion in my JS. I also tried using the class ThisQuestion instead of id selector GetQuestion but that doesn't work either. I'm not sure what the mistake that I'm making is.
accepted answer: http://stackoverflow.com/a/26033825
upvote count: 2
downvote count: 0
answer count: 1
has title: jQuery is not picking up right value from php for loop
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25920941
has answer: http://stackoverflow.com/a/25925185
possible better answer: http://stackoverflow.com/a/26319074
has answer: http://stackoverflow.com/a/26319074
score: 6
type: AnsweredQuestion
downvote count: 0
type: Question
answer count: 2
tagged with: mithril.js
upvote count: 6
tagged with: javascript
tagged with: browser
accepted answer: http://stackoverflow.com/a/25925185
has body: As a practical exercise in learning bare-bones JS programming in depth (on up to date browsers), I am building an SPA to maintain customer records. The only external library I am using is Mithril.js MVC. So far I have got a table view with live data from my database, which includes edit, merge and delete buttons for each record. The editing is done and working well, using an inline "form" and save/cancel for that works. I am now trying to implement delete and merge, both of which need a popup confirmation before being actioned, which is where I am stuck. I know exactly what I'd do in a desktop GUI environment, so the roadblock may be my lack of understanding of the browser front-end more than of Mithril, per se. Ideally, I'd like to create a self-contained, reusable "popup" component represent the popup, but I can't see how I should go about doing this in JS using Mithril, in particular, but not solely, how to make Mithril to overlay one view on top of another. Any assistance would be appreciated, from a broad outline to specific code snippets.
tagged with: user-interface
has title: How Do I Overlay a Popup View in Mithril.js?
favorite count: 0

http://stackoverflow.com/a/25961403
has body: Try this editor[i].on("blur", function(codeMirror) {codeMirror.save()});
has comment: http://stackoverflow.com/comment/40686732
answers question: http://stackoverflow.com/q/25955509
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40557023
type: Comment
type: QuestionComment
has text: Have you clicked the link?
score: 1
comment on: http://stackoverflow.com/q/25910958

http://stackoverflow.com/a/25995538
score: 5
has comment: http://stackoverflow.com/comment/40709635
has comment: http://stackoverflow.com/comment/40709652
has comment: http://stackoverflow.com/comment/40709425
has comment: http://stackoverflow.com/comment/40709483
has comment: http://stackoverflow.com/comment/40709493
has comment: http://stackoverflow.com/comment/40709561
answers question: http://stackoverflow.com/q/25995451
has comment: http://stackoverflow.com/comment/40709729
has comment: http://stackoverflow.com/comment/40709604
type: Answer
has comment: http://stackoverflow.com/comment/40709574
downvote count: 1
upvote count: 6
has comment: http://stackoverflow.com/comment/40709944
has body: The right-hand string has two characters: an i and a "combining tilde" following that. You can tell just by looking closely at the title of your question!
has comment: http://stackoverflow.com/comment/40709832

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/25986991
tags question: http://stackoverflow.com/q/25973067
type: Tag
tags question: http://stackoverflow.com/q/25985656
tags question: http://stackoverflow.com/q/26017864

http://stackoverflow.com/a/25988955
answers question: http://stackoverflow.com/q/25988860
type: Answer
has comment: http://stackoverflow.com/comment/40698085
upvote count: 0
has comment: http://stackoverflow.com/comment/40697826
score: -2
has body: You can find the following code to make it work. $('#idButtonLogin').bind('keydown', function(e) { if (e.keyCode == 13) { // Here you can call the function } });
downvote count: 2

http://stackoverflow.com/comment/40515564
comment on: http://stackoverflow.com/a/25887884
has text: hahaha i found also one thing. 1: select cars-->check buy-->select others-->select cars (you should not lose radio buttons of fix)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25975989
has body: You can make use of rowCallback function. var arrayOfAlreadyAddedRows = [1,5,7]; //Here is array you made from db. "rowCallback": function( row, data ) { // I assume in your data you have a rowId column. if ( $.inArray(data.rowId, arrayOfAlreadyAddedRows ) !== -1 ) { $(row).find('td:eq(6)').html( "Add"); }else{ $(row).find('td:eq(6)').html("Already added"); } } or you already mark added row in your table data. something like a column called 'added' with value yes/no/ "rowCallback": function( row, data ) { if (data.added === "yes") { $(row).find('td:eq(6)').html("Add"); }else{ $(row).find('td:eq(6)').html("Already added"); } }
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/40674163
accepted answer of: http://stackoverflow.com/q/25975375
downvote count: 0
answers question: http://stackoverflow.com/q/25975375
score: 5
has comment: http://stackoverflow.com/comment/40674327
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40681877

http://stackoverflow.com/comment/40501405
comment on: http://stackoverflow.com/q/25879689
score: 0
type: QuestionComment
has text: I corrected the doctype. The files are in the same directory(same folder)
type: Comment

http://stackoverflow.com/q/25984382
accepted answer: http://stackoverflow.com/a/25984554
has title: Creating a Virtual Interactive Object with Javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40689787
type: Question
has answer: http://stackoverflow.com/a/25984603
has answer: http://stackoverflow.com/a/25984554
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25984603
score: 0
has answer: http://stackoverflow.com/a/25984630
answer count: 3
has body: I am working on a web page where I have 5 buttons which when clicked, make the object respond. Now, I just used the toggle class option but I am sure there is a better way since I am having difficulty getting the bugs worked out. Issues: When you go through and press multiple buttons, sometimes it doesn't remove the current class its on. For instance, tell the object to go to sleep then press another button, it won't work unless you click the button twice. How do you set a timeout function to make the object go back to normal after a certain amount of time? HTML: Javascript // Set Kitty as object var myKitty= { getKitty: document.getElementById("#cat"), } // Make Kitty look left $(document).ready(function() { $("#catLeft").click(function() { $(".catNormal").toggleClass("catLeft"); }); }); // Make Kitty look right $(document).ready(function() { $("#catRight").click(function() { $(".catNormal").toggleClass("catRight"); }); }); // Pet the kitty $(document).ready(function() { $("#catPurr").click(function() { $(".catNormal").toggleClass("catPurr"); }); }); // Make Kitty sleep $(document).ready(function() { $("#catSleep").click(function() { $(".catNormal").toggleClass("catSleep"); }); }); // Make Kitty wag tail $(document).ready(function() { $("#catWag").click(function() { $(".catNormal").toggleClass("catWag"); }); });

http://stackoverflow.com/q/26003302
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has body: Let's say I have an array of three colors like so: ['blue', 'green', 'red'] And I have an array of hats: ['fedora', 'bowler', 'top hat', '10 gallon'] How can I assign a color to each hat and when I've run out of colors start over from the beginning? So that: fedora = blue bowler = green top hat = red 10 gallon = blue
has answer: http://stackoverflow.com/a/26003351
has title: Associate values in two arrays of unequal length
has comment: http://stackoverflow.com/comment/40723870
possible better answer: http://stackoverflow.com/a/26003351
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26003334
type: Question
accepted answer: http://stackoverflow.com/a/26003334

http://stackoverflow.com/q/25972371
has comment: http://stackoverflow.com/comment/40669771
answer count: 1
tagged with: liferay-aui
score: 0
tagged with: liferay
has answer: http://stackoverflow.com/a/25989030
tagged with: javascript
has title: How to remove session attribute on closing pop up window in liferay?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40668126
accepted answer: http://stackoverflow.com/a/25989030
type: Question
has body: I am displayin the data in pop up using alloy dialog. This is the code in first jsp.. Inside search container here the id of viewDocs button will be overriden to viewDocs regardless of the id that was given in viewDocs.jsp In viewDocs.jsp &lt;portlet:renderURL var="docListView" windowState="&lt;%=LiferayWindowState.POP_UP.toString()%&gt;"&gt; &lt;portlet:param name="mvcPath" value="/html/emp/docList.jsp"/&gt; &lt;portlet:param name="redirect" value="&lt;%= currentURL %&gt;"/&gt; &lt;portlet:param name="prk" value="&lt;%= prk %&gt;"/&gt; &lt;/portlet:renderURL&gt; &lt;aui:button name="viewDocs" id="view_&lt;%=prk %&gt;" cssClass="btn btn-primary btn-small" value="View Docs" onclick="viewDetails()"&gt;&lt;/aui:button&gt; &lt;aui:script&gt; function viewDetails() { AUI().use('aui-base','aui-io-plugin-deprecated','liferay-util-window', 'aui-dialog-iframe-deprecated', function(A) { var popUpWindow=Liferay.Util.Window.getWindow( { dialog: { destroyOnClose:true, centered: true, constrain2view: true, modal: true, resizable: false, height:300, width: 700 } } ).plug( A.Plugin.DialogIframe, { autoLoad: true, iframeCssClass: 'dialog-iframe', uri:'&lt;%=docListView.toString()%&gt;' }).render(); popUpWindow.show(); popUpWindow.titleNode.html("Document List"); popUpWindow.io.start(); }); } In docList.jsp long proposalPrk=Long.parseLong((String)request.getParameter("prk")); //It retrives the same value of primary key on every button click If I set the value of primary key in session How to remove that session attribute on close of pop up?

http://stackoverflow.com/a/25979031
score: 0
type: Answer
has body: Try this: $(document).ready(function () { $('.portfolio-excerpt').hover(function () { $(this).next().addClass('portfolio-hover') }, function () { $(this).next().removeClass('portfolio-hover') }) }) or just use .show() and .hide(): $(document).ready(function () { $('.portfolio-excerpt').hover(function () { $(this).next().show(); }, function () { $(this).next().hide(); }) }) Fiddle Demo
answers question: http://stackoverflow.com/q/25978982

http://stackoverflow.com/q/25904336
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40545831
type: Question
tagged with: javascript
has title: How to capture file opened in browser and post it to backend using java script
has comment: http://stackoverflow.com/comment/40545904
has comment: http://stackoverflow.com/comment/40545436
has body: I am writing chrome extension to capture file opened in chrome browser like if i selected a pdf it opens in browser and i want to save the file in my datastore using a webservice my code looks like this.How can i capture the current pdf or image file and post to my webservice? popup.html UserName Password manifest.js "manifest_version": 2, "name": "Bookmark Extension Example", "description": "POST details of the current page to a remote endpoint.", "version": "0.1", "background": { "scripts": ["background.js"], "persistent": true }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "tabs", "http://*/", "https://*/" ] } popup.js // Global reference to the status display SPAN var statusDisplay = null; // POST the data to the server using XMLHttpRequest function addBookmark() { // Cancel the form submit event.preventDefault(); // The URL to POST our data to var postUrl = 'http://mydrive.com'; // Set up an asynchronous AJAX POST request var xhr = new XMLHttpRequest(); xhr.open('POST', postUrl, false); // Prepare the data to be POSTed // Set correct header for form data xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); // Handle request state change events xhr.onreadystatechange = function() { // If the request completed if (xhr.readyState == 4) { statusDisplay.innerHTML = ''; if (xhr.status == 200) { // If it was a success, close the popup after a short delay statusDisplay.innerHTML = 'Saved!'; window.setTimeout(window.close, 1000); } else {// Show what went wrong statusDisplay.innerHTML = 'Error saving: ' + xhr.statusText; } } }; // Send the request and set status xhr.send(null); statusDisplay.innerHTML = 'Saving...'; } // When the popup HTML has loaded window.addEventListener('load', function(evt) { // Handle the bookmark form submit event with our addBookmark function document.getElementById('addbookmark').addEventListener('submit', addBookmark); // Cache a reference to the status display SPAN s…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40547302
has comment: http://stackoverflow.com/comment/40545616

webbrowser-control
type: Tag
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/25944461
tags question: http://stackoverflow.com/q/25954216

http://stackoverflow.com/q/25991970
tagged with: php
has answer: http://stackoverflow.com/a/25992050
has answer: http://stackoverflow.com/a/25992384
type: Question
has body: I have a div that uses some unique id from a mysql db that I have to pass to my javascript file so I could display results from another php script in a particular div with a specific id that corresponds to the one obtained from the db. index page. <?php $query = mysqli_query($con, 'SELECT * FROM in_table limit 10 '); while($result = mysqli_fetch_array($query)){ ?> <img src= <?php echo $result['user_image_url']; ?> /> <?php echo $result['msg'].' '; echo 'More... '; echo ' '; } ?> The div is inside the while loop. ajax.js $('a').on('click', function(){ var hash = this.hash.replace('#',''); $.post('content.php', {id: hash}, function(data){ $('div#?????').html(data); }); }) So how do I call that div inside? content.php <?php include('ajax.php'); if (isset($_POST['id'])) { $id = $_POST['id']; } $query = mysqli_query($con, "SELECT * FROM comments where statusID = '".$id."'"); while($row = mysqli_fetch_array($query)){ echo $row['message'].' '; } ?>
tagged with: javascript
score: 0
answer count: 2
has title: Using a unique div Id in php passed to javascript and used to run another php script
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40724393
comment on: http://stackoverflow.com/a/26003583
has text: That does not put the 'More' link inline the text when the text is not fitting all 2 lines.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25941124
accepted answer: http://stackoverflow.com/a/25941292
tagged with: javascript
score: 0
answer count: 3
has body: Furthering my project but having a hiccup with databinding. the change in my data is not getting reflected on the DOM I've a constructor function inside JS function/object. constructor: function() { var self = this; var navigation = angular.module("navigation", []); navigation.controller("ProductIDsController", function($scope) { $scope.productIds = self.productIds; }); angular.bootstrap(document.getElementById('navigation'), ['navigation']); } and product id's are defined on the same level productIds: ["abc", "xyz", "test"], //DOM gets populated from this array via angular init: function(productIds) { console.log(this.productIds); // displays ["abc", "xyz", "test"] this.productIds.push("another item"); //this didn't work on the dom either this.productIds = productIds; //I changed the productId's by passing another array console.log(this.productIds); //the array got changed but DOM is still the same, } HTML &lt;div id="navigation"&gt; &lt;ul data-ng-controller="ProductIDsController"&gt; &lt;li data-ng-repeat="productId in productIds"&gt;{{productId}}&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; Initially the DOM gets populated by the given array, but it's not changing after I pass in another array. how can I have data bind productId's in the given scenario? Edit: JS Fiddle http://jsfiddle.net/casadev/n50ecw5m/
has comment: http://stackoverflow.com/comment/40612749
has title: angular data binding with passed params
tagged with: angularjs
has answer: http://stackoverflow.com/a/25941292
has answer: http://stackoverflow.com/a/25941255
possible better answer: http://stackoverflow.com/a/25941351
has answer: http://stackoverflow.com/a/25941351
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40612779
type: Question

http://stackoverflow.com/q/25921333
has title: javascript function returns tagname in a given url
has body: I am trying to create a function that can return number of tabname in a given URL. I have the following code so far, which doesn't work. I would like to display number of paragraphs in cnn.com or any other website at innerHTML. function myFunction() { var currentURL = document.URL; document.getElementById("links").innerHTML = currentURL; location.assign("www.cnn.com"); var x = document.getElementsByTagName("p"); location.assign(currentURL); document.getElementById("links").innerHTML = x.length; }
has comment: http://stackoverflow.com/comment/40577373
answer count: 0
has comment: http://stackoverflow.com/comment/40577226
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40577014
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40577125
has comment: http://stackoverflow.com/comment/40577181
score: 0

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/25886876
type: Tag

http://stackoverflow.com/a/25960765
downvote count: 1
has body: Is this what you want? var a = 1; var b = 2; var c; var d = 4; var e; [a, b, c, d, e].some(function(x){return typeof x === "undefined";}); I don't think javascript has introspection features, so you can't just find all the variables in the local scope.
answers question: http://stackoverflow.com/q/25960683
type: Answer
score: 2
upvote count: 3

http://stackoverflow.com/a/25939252
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has body: The moon.InputDecorator will automatically unfreeze Spotlight upon a blur event (from the moon.Input), whereupon you could call enyo.Spotlight.spot(). moon.Input will automatically blur itself when it detects the Enter key being pressed, but only if the dismissOnEnter flag is set to true on moon.Input. It sounds like you might actually want to call focus on the desired moon.Input (instead of spotting, as that will just display the Spotlight hovered state on the moon.InputDecorator and not actually spot it), something like this (http://jsfiddle.net/aarontam/nxp8x7ku/): enyo.create({ handlers: { onblur: 'blurHandler' }, components: [{ kind: "moon.InputDecorator", name: "emaildec", spotlight: true, defaultSpotlightLeft: "emaildec", components: [{ kind: "moon.Input", name: "username", placeholder: "e-mail address", onchange: "nameChanged", value: "", classes: "input-style", dismissOnEnter: true, } //,spotlight: true ] }, { tag: "br" }, { kind: "moon.InputDecorator", name: "pwddec", spotlight: true, defaultSpotlightLeft: "pwddec", components: [{ kind: "moon.Input", name: "userpwd", type: "password", placeholder: "ameba password", onchange: "passwordChanged", value: "", classes: "input-style" } //,spotlight: true ] }], blurHandler: function (sender, event) { if (event.originator === this.$.username) { this.$.userpwd.focus(); } } }).renderInto(document.body);
has comment: http://stackoverflow.com/comment/41555130
accepted answer of: http://stackoverflow.com/q/25917803
answers question: http://stackoverflow.com/q/25917803
upvote count: 3
has comment: http://stackoverflow.com/comment/40630510

http://stackoverflow.com/comment/40502737
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25880545
has text: I tried the first option, didn't work. The second one compiled but now the error is "Uncaught TypeError: Cannot read property 'create' of undefined". How do I create a module? Couldn't find much information on that. Sorry about the newbie questions. Also, how would you dynamically create a component in an Ember CLI application assuming I didn't even ask the question here? Is my current script correct?

http://stackoverflow.com/comment/40658854
comment on: http://stackoverflow.com/a/25967532
type: AnswerComment
has text: Also, does `.settle()` reject if all input promises are rejected, but fulfills if at least one is filfilled? It would also be useful to see that in the doc.
type: Comment
score: 0

http://stackoverflow.com/a/74458050
type: Answer
upvote count: 1
has body: Do the following to remove whitespace in image. var canvas = document.getElementById("canvas"); var context = canvas.getContext('2d'); var imgWidth = canvas.width; var imgHeight = canvas.height; var imgData = context.getImageData(0, 0, imgWidth, imgHeight).data; // get the corners of the content (not the spaces) var cropTop = scanY(true); var cropBottom = scanY(false); var cropLeft = scanX(true); var cropRight = scanX(false); var cropXDiff = cropRight - cropLeft; var cropYDiff = cropBottom - cropTop; // get the content that doesn't contain outer spaces var data = this.context!.getImageData(cropLeft, cropTop, cropXDiff, cropYDiff); // set again width, height and image data canvas.width = data.width; canvas.height = data.height; context.putImageData(data); and here are scanX and scanY functions scanX = function (fromLeft) { var offset = fromLeft? 1 : -1; // loop through each column for(var x = fromLeft ? 0 : imgWidth - 1; fromLeft ? (x < imgWidth) : (x > -1); x += offset) { // loop through each row for(var y = 0; y < imgHeight; y++) { var rgb = getRBG(x, y); if (!isWhite(rgb)) { if (fromLeft) { return x; } else { return Math.min(x + 1, imgWidth); } } } } return null; // all image is white }; scanY = function (fromTop) { var offset = fromTop ? 1 : -1; // loop through each row for(var y = fromTop ? 0 : imgHeight - 1; fromTop ? (y < imgHeight) : (y > -1); y += offset) { // loop through each column for(var x = 0; x < imgWidth; x++) { var rgb = getRBG(x, y); if (!isWhite(rgb)) { if (fromTop) { return y; } else { return Math.min(y + 1, imgHeight); } } } } return null; // all image is white }
answers question: http://stackoverflow.com/q/26015497
downvote count: 0
score: 1

http://stackoverflow.com/q/25928086
tagged with: regex
has comment: http://stackoverflow.com/comment/40588862
accepted answer: http://stackoverflow.com/a/25928709
has answer: http://stackoverflow.com/a/25928610
answer count: 4
has comment: http://stackoverflow.com/comment/40588801
possible better answer: http://stackoverflow.com/a/25928566
has answer: http://stackoverflow.com/a/25928566
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40589250
type: AnsweredQuestion
has body: I am trying to validate the password using regex with function but its not working for me. can anyone take a look at what is missing or what mistake i have made.? Here is my code: function passCheck() { var passexp = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{8,}$/; var password = document.getElementById("password"); if (password != "") { if (!password.match(passexp)) { document.registration.password.focus(); document.getElementById('error2').innerHTML = "Password should be atleast 8 character long and must contain at least one digit,at least one lower case,at least one upper case."; return false; } else { document.getElementById('error2').innerHTML = ""; return true; } } else { document.registration.password.focus(); document.getElementById('error2').innerHTML = "Password can't be blank"; return true; } } &lt;label for="password"&gt;* Password &lt;/label&gt; &lt;input type="password" name="password" placeholder="Password should be atleast 8 characters" id="password" size="40" required="required" onblur="return passCheck();"/&gt; &lt;span id="error2"&gt;&lt;/span&gt; EDIT: Hello, In same form I have few other fields(viz. name,email,password,confirm password,username,mobile no, street, city, country(Select tag), gender(radio button). and now my questions are or rather confusions are: do I need to check if the field is empty(on both client side and server side) in spite of using 'required' attribute? I have created new function for each of the field i am trying to validate(just like passCheck() which makes code unnecessarily lengthy. So here re-usability of code is not done. In what other way I can implement validation so as to achieve it. Its bit boring too to implement similar kind of logic or methods again and again with minor changes. Javascript variable can not have same name as that of function name which contains that variable.? Why? Because when I was trying to use same name,code didn't worked. But when I checked same code on jsfiddle.net it showed me an erro…
has comment: http://stackoverflow.com/comment/40589386
has comment: http://stackoverflow.com/comment/40589295
has title: complete form validation using javascript,php
type: Question
has answer: http://stackoverflow.com/a/25928709
has comment: http://stackoverflow.com/comment/40589038
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25928202
score: 0
has comment: http://stackoverflow.com/comment/40588966
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40623822
comment on: http://stackoverflow.com/q/25948142
score: 0
type: Comment
has text: Look at this answer first: http://stackoverflow.com/questions/14148836/can-all-media-queries-be-overriden
type: QuestionComment

http://stackoverflow.com/q/25922040
has comment: http://stackoverflow.com/comment/40578422
has title: Page Loading Without the Styling and then Eventually Loads the Style
has comment: http://stackoverflow.com/comment/40578372
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40578385
linked to: http://stackoverflow.com/q/13270290
has comment: http://stackoverflow.com/comment/40579707
answer count: 0
has body: I have a mobile website created using ASP.NET MVC and jQuery Mobile. In the MainLayout page I load the CSS in the header from Google CDN. &lt;head&gt; &lt;meta name="viewport" content="width=device-width" /&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.css" /&gt; &lt;/head&gt; The page first loads without the style and then after 10-20 milliseconds the page formats itself to the correct style. This all results in a small flicker which is quite noticeable. How can I resolve this issue?
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40578357
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40578305
score: 0

http://stackoverflow.com/q/25955320
type: UnansweredQuestion
upvote count: 1
has body: My Angular script looks like this: var app = angular.module("myApp", []); app.controller('TestController', function ($scope) { $scope.test= "TEST"; }); My test file looks like this: describe('first test', function() { var $scope; beforeEach(function (){ module('myApp'); inject(function($rootScope, $controller) { $scope = $rootScope.$new(); ctrl = $controller('TestController', { $scope: $scope }); }); it('scope should have test', function() { expect($scope.test).toEqual("TEST"); }); }); This test fails saying $scope.test is undefined. I debugged in Chrome and saw that $scope has a bunch of properties on it, but none of them are test. I've looked through several examples online, and they all look pretty similar to this. i'm not quite sure what i'm doing wrong here and i'm stuck.... edit I tried adding $controller to inject, but i'm still having the same problem.
downvote count: 1
tagged with: unit-testing
type: Question
tagged with: javascript
has title: Trying to test Angular with Karma/Jasmine, but can't get the Jasmine tests to set $scope correctly
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25955363
has comment: http://stackoverflow.com/comment/40636355
tagged with: jasmine
favorite count: 0
tagged with: angularjs

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/25997163
tags question: http://stackoverflow.com/q/25891848
tags question: http://stackoverflow.com/q/26015216
tags question: http://stackoverflow.com/q/26011659
type: Tag
tags question: http://stackoverflow.com/q/26022505

webpage-screenshot
type: Tag
tags question: http://stackoverflow.com/q/25933587
tag name: webpage-screenshot
tags question: http://stackoverflow.com/q/25878466

http://stackoverflow.com/a/25910903
downvote count: 0
has comment: http://stackoverflow.com/comment/40576209
has comment: http://stackoverflow.com/comment/40577253
type: Answer
has comment: http://stackoverflow.com/comment/40577142
has body: For something like this you could make use of document fragment, these are DOM nodes that are not part of the actually DOM tree (more info can be found here https://developer.mozilla.org/en-US/docs/Web/API/document.createDocumentFragment), so you can do all your setup on the fragment and then append the fragment which will only be causing the one re flow rather than 1000. So here is an example -http://jsfiddle.net/leighking2/awzoz7bj/ - a quick check on run time it takes around 60-70ms to run var currentzoom = 1; var docFragment = document.createDocumentFragment(); var start = new Date(); for (i=0; i &lt; 1000; i++) { var blax = (Math.random()-0.5)*3000; var blay = (Math.random()-0.5)*3000; var tb = document.createElement('span'); $(tb).data("x", blax / $(window).width()); $(tb).data("y", blay / $(window).height()); $(tb).data("size", 20 * currentzoom); tb.contentEditable = true; tb.style.fontFamily = 'arial'; tb.style.fontSize = '20px'; tb.style.position = 'absolute'; tb.style.top = blay + 'px'; tb.style.left = blax + 'px'; tb.innerHTML="newtext"; docFragment.appendChild(tb); } document.body.appendChild(docFragment); var end = new Date(); console.log(end-start) compared to the original which took around 645ms to run http://jsfiddle.net/leighking2/896pusex/ UPDATE So for improving the dragging speed again keep the individual edits out of the DOM to avoid the cost of the reflow 1000 times every mouse drag so here is one way using jquery's detach() method (example http://jsfiddle.net/sf72ubdt/). This will remove the elements from the DOM but give them to you with all their properties so you can manipulate them and reinsert them later on redraw = function(resize) { //detach spans var spans = $("span").detach(); //now loop other them, because they are no longer attached to the DOM any changes are //not going to cause a reflow of the page $(spans).each(function(index) { var newx = Math.floor(($(this).data("x") - currentx) / currentzoom * $(window).width()); var newy = Ma…
has comment: http://stackoverflow.com/comment/40568700
has comment: http://stackoverflow.com/comment/40577909
has comment: http://stackoverflow.com/comment/40568663
has comment: http://stackoverflow.com/comment/40576252
score: 5
has comment: http://stackoverflow.com/comment/40571086
upvote count: 5
has comment: http://stackoverflow.com/comment/40576740
has comment: http://stackoverflow.com/comment/40576493
has comment: http://stackoverflow.com/comment/40568973
answers question: http://stackoverflow.com/q/25910500

http://stackoverflow.com/a/25936102
type: Answer
answers question: http://stackoverflow.com/q/25933556
score: 0
has body: This answer only applies to Linux and Mac (not to Windows where the bug in question does not exist). A Chrome extension cannot focus a window unless at least a part of Chrome is the currently active window. I reported this bug a month ago with a detailed steps-to-reproduce as Issue 407817: chrome.windows.create({ focused:true }) within a desktop notification does not create a focused window. Unfortunately, there is nothing that you can do in an extension. If it's a personal extension, you could create a native messaging host and write a native application that puts the focus on the new window (if it is not a personal extension, then you have to ask your users to also install that native messaging host).
has comment: http://stackoverflow.com/comment/40603205
has comment: http://stackoverflow.com/comment/40603639

http://stackoverflow.com/comment/40513683
has text: Are you getting 'Thank you for getting in touch. We will contact you!' ?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25885888

http://stackoverflow.com/q/26019974
upvote count: 3
possible better answer: http://stackoverflow.com/a/26020111
has answer: http://stackoverflow.com/a/26020111
downvote count: 1
has answer: http://stackoverflow.com/a/26020410
has title: Hide URL from bots by reversing it using Javascript
type: Question
has comment: http://stackoverflow.com/comment/40754158
has comment: http://stackoverflow.com/comment/40754891
has comment: http://stackoverflow.com/comment/40755072
has body: A have a link: Register And I want to hide the URL from bots. I know that bots generally do not have Javascript enabled, so I am thinking an approach like this. In my HTML code, I have the URL reversed: Register Then using Javascript, I reverse it so the user sees the correct URL. How can I do this? Comparability is obviously essential. To users who do not have JS enabled, I simply display a message that JS is required.
linked to: http://stackoverflow.com/q/5874652
has comment: http://stackoverflow.com/comment/40755017
has answer: http://stackoverflow.com/a/26020681
tagged with: url
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: security
has answer: http://stackoverflow.com/a/26020386
answer count: 4
score: 2
type: AnsweredQuestion
tagged with: bots
accepted answer: http://stackoverflow.com/a/26020386

http://stackoverflow.com/q/25926771
tagged with: javascript
has comment: http://stackoverflow.com/comment/40586426
answer count: 1
tagged with: ruby
has answer: http://stackoverflow.com/a/25926854
has title: How to convert Javascript string of array to array?
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40586430
has body: I have a data-type element for each option in select box. When I select an option I get the data-type as "[{:type=&gt;"textbox", :label=&gt;"Age"}]" (string of array of hashes). I want to convert this to array of hashes. I searched in google but couldn't get any. Can anyone help. I tried replace as well, str.replace('"[', '[').replace(']"' , ']'); but didnt get result. I want this in Javascript.
type: Question
accepted answer: http://stackoverflow.com/a/25926854

http://stackoverflow.com/q/25881421
tagged with: bootstrap-modal
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25881478
tagged with: ajax
has title: Ajax call multiple time onclick event on bootstrap modal
favorite count: 0
possible better answer: http://stackoverflow.com/a/62625269
has answer: http://stackoverflow.com/a/62625269
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25881478
type: AnsweredQuestion
score: 3
upvote count: 3
has body: By clicking a button Its loaded a bootstrap modal. On the modal there have a form and on click save button I am trying to submit form by ajax call. At first time the ajax call trigger one time, but 2nd time the ajax url trigger two times. I see on firebug console section the post url is called multiple times. Here Is my jquery code. $(".show-modal").click(function() { $('.upload-modal').modal(); $(".save-logo").click(function(e) { e.preventDefault(); $.ajax({ type : "POST", data : data, contentType: false, cache : false, processData: false, url : "../../io/upload/" }).done(function(rawData) { $('.modal-header .close').click(); }) }); })
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/q/25965905
has comment: http://stackoverflow.com/comment/40655868
has body: I'm trying to retrieve multiple $_GET variables within PHP. Javascript is sending the URL and it seems to have an issue with the '&amp;' between variables. One variable works: //JAVASCRIPT var price = "http://&lt;site&gt;/realtime/bittrex-realtime.php?symbol=LTC"; //THE PHP END $coinSymbol = $_GET['symbol']; echo $coinSymbol OUTPUT: LTC With two variables: //JAVASCRIPT var price = "http://&lt;site&gt;/realtime/bittrex-realtime.php?type=price&amp;symbol=LTC"; //THE PHP END $coinSymbol = $_GET['symbol']; $type = $_GET['type']; echo $coinSymbol echo $type OUTPUT: price It just seems to ignore everything after the '&amp;'. I know that the PHP end works fine because if I manually type the address into the browser, it prints both variables. http://&lt;site&gt;/realtime/bittrex-realtime.php?type=price&amp;symbol=LTC OUTPUT ON THE PAGE priceLTC Any ideas? It's driving me nuts - Thanks UPDATE - JAVASCRIPT CODE jQuery(document).ready(function() { refresh(); jQuery('#bittrex-price').load(price); }); function refresh() { setTimeout( function() { //document.write(mintpalUrl); jQuery('#bittrex-price').fadeOut('slow').load(price).fadeIn('slow'); refresh(); }, 30000); }
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40656000
accepted answer: http://stackoverflow.com/a/25965990
has comment: http://stackoverflow.com/comment/40655966
has comment: http://stackoverflow.com/comment/40655929
type: Question
has comment: http://stackoverflow.com/comment/40655863
has comment: http://stackoverflow.com/comment/40655902
has comment: http://stackoverflow.com/comment/40656418
has comment: http://stackoverflow.com/comment/40655948
tagged with: javascript
has answer: http://stackoverflow.com/a/25965990
has comment: http://stackoverflow.com/comment/40655950
has comment: http://stackoverflow.com/comment/40655959
has comment: http://stackoverflow.com/comment/40655834
has comment: http://stackoverflow.com/comment/40655837
has comment: http://stackoverflow.com/comment/40656458
score: 0
has comment: http://stackoverflow.com/comment/40656276
has comment: http://stackoverflow.com/comment/40655883
answer count: 1
has comment: http://stackoverflow.com/comment/40655847
has title: Sending multiple GET variables in URL with Javascript
has comment: http://stackoverflow.com/comment/40656314

http://stackoverflow.com/q/25972142
accepted answer: http://stackoverflow.com/a/27449966
upvote count: 1
tagged with: youtube
type: AnsweredQuestion
has title: Youtube API v3 search videos by location
score: 1
has body: I try to use Youtube v3 api to search videos by location. For example I try run this example https://developers.google.com/apis-explorer/#s/youtube/v3/youtube.search.list?part=snippet&amp;location=37.42307%252C-122.08427&amp;locationRadius=50km&amp;maxResults=10&amp;order=date&amp;_h=2&amp; But all what I get is just this error "message": "Invalid combination of search filters and/or restrictions." I try to google how to resolve this problem, but no luck with this one. Maybe someone have example url or know how to resolve this problem. Maybe I'm lucking some required parameters. Ty for your help.
type: Question
tagged with: api
has answer: http://stackoverflow.com/a/27449966
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40768049
has text: "Is this possible?" Yes, of course. Those other libraries are written in JavaScript, so everything jQuery can do, you can do yourself. And looking for *years*? Really?!
type: Comment
type: QuestionComment
score: 5
comment on: http://stackoverflow.com/q/26027348

http://stackoverflow.com/comment/47615247
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25880987
has text: how did you create the report?
score: 0

http://stackoverflow.com/a/25954902
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25954728
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25954728
type: AcceptedAnswer
has body: window.onload = function(){ //this captures all the elements with the spec classes var soldItems = document.getElementsByClassName('product-mark sold-out'); //this changes each element 1 by 1 to new text for(var i=0; i&lt;soldItems.length; i++){ soldItems[i].innerHTML = "Coming Soon"; } } That should take care of it!

http://stackoverflow.com/comment/40620538
comment on: http://stackoverflow.com/q/25943488
score: 0
type: Comment
type: QuestionComment
has text: @royhowie: Odd, that *used* to work.

http://stackoverflow.com/q/25908635
has body: Please help , Problem : I am reading file content using HTML5 FileReaderAPI -> ReadAsArrayBuffer. I am storing that buffer in a variable. Now I want to compute CRC of that ArrayBuffer ? How shall I proceed. No clues. All operations are to be performed on browser side. Let me tell you I am using arayBuffer because, that file contains Binary Data. So, I can not use anything other than ArrayBuffer. If we can use anything else than please tell that also.
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: How to compute CRC of the binary data in JQuery,javascript,HTML5?
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25908770
type: Question
linked to: http://stackoverflow.com/q/18638900
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40589795
type: QuestionComment
has text: Are you sure `data.data.collection` is of the correct format? Can you log to `console` and see?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25927929

http://stackoverflow.com/q/25954352
accepted answer: http://stackoverflow.com/a/26007600
upvote count: 1
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/17038436
tagged with: spring-data-rest
downvote count: 0
answer count: 1
favorite count: 0
has title: How can I add my tasks back to my list using Restangular
tagged with: rest
tagged with: angularjs
has body: So here's the flow that I'd like request wise, intial page load -> get tasks -> add task. add task, should not require a subsequent fetch of it's created task or the list. here's the relevant part of my app.js thus far .config(function (RestangularProvider) { RestangularProvider.setBaseUrl('http://localhost:8080'); RestangularProvider.addResponseInterceptor(function halInterceptor(data, operation, what) { var resp; if (operation === 'getList') { if (typeof data._embedded !== 'undefined') { resp = data._embedded[what]; resp.page = data.page; return resp; } else { return []; } } return data; }); }) here's my controller 'use strict'; angular.module('myTaskApp') .controller('Task', function ($scope, Restangular) { var tasks = Restangular.all('task'); if ( typeof $scope.tasks === 'undefined' ) { $scope.tasks = tasks.getList().$object; } $scope.add = function add() { tasks.post($scope.task).then(function () { console.log('add task: ', $scope.task); // MAGIC HERE }); }; }) ; Here are the response headers for a create HTTP/1.1 201 Created Server: Apache-Coyote/1.1 Access-Control-Allow-Origin: * Access-Control-Allow-: POST, GET, PUT, OPTIONS, DELETE Access-Control-Allow-Headers: content-type, x-requested-with Access-Control-Max-Age: 3600 Location: http://localhost:8080/task/5c75235d-d9f7-4cdd-98b4-3487603d8fcb Content-Length: 0 Date: Sat, 20 Sep 2014 06:34:59 GMT I think that part of my problem is that the response doth not return the body, however, I can predict what that should look like, and would be easy to craft after grabbing location. { "description" : "better", "_links" : { "self" : { "href" : "http://localhost:8080/task/5c75235d-d9f7-4cdd-98b4-3487603d8fcb" } } } how can I make it so that when I create a new resource I can then add it to the $scope.tasks list and have that reflected in my ng-repeat. Again, this should be without making further calls to the API.
has answer: http://stackoverflow.com/a/26007600
tagged with: restangular
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16589743
score: 1

http://stackoverflow.com/comment/40642608
has text: but then why is it refreshing the page?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25958860

http://stackoverflow.com/a/25887085
has comment: http://stackoverflow.com/comment/40560266
has comment: http://stackoverflow.com/comment/40515598
answers question: http://stackoverflow.com/q/25886183
has comment: http://stackoverflow.com/comment/40559954
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40560661
accepted answer of: http://stackoverflow.com/q/25886183
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40516017
type: Answer
has comment: http://stackoverflow.com/comment/40516376
has comment: http://stackoverflow.com/comment/40560448
has comment: http://stackoverflow.com/comment/40517166
has body: In JavaScript, any access to an object property from a member of the whole object should be qualified with this (it's not the case of C#, where there're few edge cases where you need to use this explicitly): // Check that you need to get "SelectedClass" property value like a function call // (Knockout's getter function): addPerson: function() { this.SelectedClass().Persons.push(new Person(this.SelectedClass(), " ", " ")); } Update, issue #2 this.SelectedClass is an observable property. In order to access Persons property, you need to obtain SelectedClass property value like a function: this.SelectedClass()!
has comment: http://stackoverflow.com/comment/40516995
upvote count: 1

http://stackoverflow.com/a/26000107
downvote count: 0
answers question: http://stackoverflow.com/q/25999718
score: 1
has comment: http://stackoverflow.com/comment/40719754
has comment: http://stackoverflow.com/comment/40718672
has comment: http://stackoverflow.com/comment/40719031
has comment: http://stackoverflow.com/comment/40718734
has comment: http://stackoverflow.com/comment/40718946
has comment: http://stackoverflow.com/comment/40719097
has comment: http://stackoverflow.com/comment/40718948
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40719128
has body: I think you didn't get the difference between JSP and JavaScript. While JSP is executed on the Server at the time your browser requires the web page, JavaScript is executed at the Client side, so in your browser, when you do an interaction that causes the JavaScript to run. You Server (eg Apache Tomcat) will firstly execute your JSP code: String st = "document.writeln(dat)"; BufferedImage image = null; byte[] imageByte; BASE64Decoder decoder = new BASE64Decoder(); imageByte = decoder.decodeBuffer(st); ByteArrayInputStream bis = new ByteArrayInputStream(imageByte); image = ImageIO.read(bis); bis.close(); if (image != null) ImageIO.write(image, "jpg", new File("d://1.jpg")); out.println("value=" + st); System.out.println("value=" + st); As you can see, nowhere is the value of st changed. Your broser will receive the following snippet from your server: value=document.writeln(dat); Since your browser is the one that executes JavaScript, he will execute it and show the Base64-encoded Image - but your server won't. For the exact difference, read this article. To make the code working, the easiest way is to redirect the page: function(data_uri) { // redirect document.location.href = 'saveImage.jsp?img='+data_uri; } Now, you can have a JSP-page called saveImage.jsp that saves the Image, and returns the webpage you had already, and write the dara_uri into the element results. Another, but more difficult way is to use AJAX. Here is an introduction to it.
type: Answer
accepted answer of: http://stackoverflow.com/q/25999718

http://stackoverflow.com/a/25892905
has comment: http://stackoverflow.com/comment/40526101
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40525116
type: Answer
has body: In the nintex form-designer you can use Regex. In the field-properties (double click textbox) you are able define the validation (range, Regex...). example: regex Email: ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$
has comment: http://stackoverflow.com/comment/40525941
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40525655
has comment: http://stackoverflow.com/comment/40525511
accepted answer of: http://stackoverflow.com/q/25892407
has comment: http://stackoverflow.com/comment/40547087
has comment: http://stackoverflow.com/comment/40525242
has comment: http://stackoverflow.com/comment/40547119
answers question: http://stackoverflow.com/q/25892407
upvote count: 1

http://stackoverflow.com/comment/40567567
has text: Do you mean [this](http://stackoverflow.com/a/11058411)?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25916490

http://stackoverflow.com/comment/40770579
comment on: http://stackoverflow.com/a/26023571
type: Comment
type: AnswerComment
has text: @Csdtesting @isherwood When I looked at the fiddle, it looked like it was the closest to what I wanted since it pushes down the `#entry` below it to make room for the `.permalink` but when I tried it on my blog, it doesn't push it and still goes over the padding so when you hover, there's no more padding between them. Here's my blog http://asphyxiated.tk I'm trying to do it on the photosets when you hover at it. I am also using masonry. I tried to use it on my original fiddle but I don't know how to edit the code to make it work there.
score: 0

http://stackoverflow.com/comment/40725141
comment on: http://stackoverflow.com/q/26003053
type: Comment
type: QuestionComment
has text: @amphetamachine Well I am new to web programming, I used to see the console output in my IDE in the desktop programming languages. For JS, I used this function in the IDE of codeacademy.org, and rest I don't know. I don't know where the console for the web programming is. SO that's not a reason to downvote my question.
score: 0

http://stackoverflow.com/comment/40761348
type: AnswerComment
has text: Thanks Johnny, I was told most of the jQuery functionalities were integrated to angularjs and that in most case it is possible to avoid using the jQuery library. I am quite new to angular and I can't really fin an alternative to the jQuery $(window).resize function. Any idea how I could do that ?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26006426

http://stackoverflow.com/comment/40568898
comment on: http://stackoverflow.com/q/25917079
score: 0
type: Comment
type: QuestionComment
has text: Can you add the full path to you json data file to the jsfiddle?

http://stackoverflow.com/a/25910250
score: 4
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25910023
has body: Inside that each function, this does not point to your outer object, but to the listeners object. Creat a local var pointing to the outer object at the beginning of the getChildrens function and replace all scope params with it. getChildrens: function(selectedRecord) { var self = this; // &lt;-- local copy of `this` (owner of getChildrens) Ext.create('Rally.data.wsapi.Store', { ... Ext.Array.each(childrens, function(child){ if (child.get('PortfolioItemTypeName') == "Feature") { final_features.push(child); this._copyChild(final_features); } }, self); // &lt;--- replace `this` with `self`
answers question: http://stackoverflow.com/q/25910023
type: AcceptedAnswer

http://stackoverflow.com/a/39006953
answers question: http://stackoverflow.com/q/25920561
upvote count: 1
has body: Bun, your answer doesn't work for me, but this does: var sel = rangy.getSelection(); var range = sel.rangeCount ? sel.getRangeAt(0) : null; if (range) { var el = document.createElement("li"); if (range.canSurroundContents(el)) { range.surroundContents(el); var ul = document.createElement("ul"); range.surroundContents(ul); } else { alert("Unable to surround range because range partially selects a non-text node.."); } } (taken mostly from the rangy core demo)
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/q/25936196
has answer: http://stackoverflow.com/a/25936584
has comment: http://stackoverflow.com/comment/40603045
has answer: http://stackoverflow.com/a/25936553
has title: Multiple ajax calls when previous one completes
has comment: http://stackoverflow.com/comment/40604005
answer count: 4
has answer: http://stackoverflow.com/a/25936924
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25936584
upvote count: 3
has comment: http://stackoverflow.com/comment/40618483
type: Question
has answer: http://stackoverflow.com/a/25936658
has body: I have these ajax calls that need to get called when the previous one is success, meaning once the first ajax is OK, call the 2nd ajax, once the 2nd ajax is OK call the 3rd one, etc so on. I started with a few ajax calls so it was fine to chain them up like this below but now I have about 20 of them and it'd be a mess to chain them up like this. $.ajax({ url: 'urlThatWorks1', success: function (data) { //call someMethod1 with data; $.ajax({ url: 'urlThatWorks2', success: function (data) { //call method2 with data; //another ajax call ... so on } }.... 19 level deep So I need to make it bit easier to read and maintain so I'm thinking something like var ajaxArray = []; var function1 = $.ajax('urlThatWorks1', data I get back from the 'urlThatWorks1' call); myArray.push(function1); var function2 = $.ajax('urlThatWorks2', data I get back from the 'urlThatWorks2' call); myArray.push(function2); //etc 19 others myArray.each(index, func){ //Something like $.when(myArray[index].call()).done(... now what? } Hope this makes sense, I'm looking for a way of ajax call array from which I can call an ajax call on whose success I call the next ajax in the array. Thanks.
downvote count: 0
has comment: http://stackoverflow.com/comment/40604522
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25936658
tagged with: ajax
has comment: http://stackoverflow.com/comment/40603526
has comment: http://stackoverflow.com/comment/40603199
favorite count: 0
linked to: http://stackoverflow.com/q/14220321

http://stackoverflow.com/a/26008341
type: Answer
has body: HTML5 Video documentation: http://www.w3schools.com/html/html5_video.asp I would suggest using something like inspector in Chrome to look through their web page - you can learn a lot by trying to understand their CSS/HTML code and then adapting it for your use case.
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40733236
answers question: http://stackoverflow.com/q/26008183

http://stackoverflow.com/comment/40730292
type: Comment
type: QuestionComment
has text: Can you include what have you done so far
comment on: http://stackoverflow.com/q/26006734
score: 0

http://stackoverflow.com/q/26012745
has answer: http://stackoverflow.com/a/27596000
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/1069666
linked to: http://stackoverflow.com/q/16164078
tagged with: javascript
has title: sort JS object on multiple items, including Dates
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26012810
type: Question
has body: trying to work this out but not sure about it really I have a JSON object which contains multiple items like below DATA_TABLE = [{"rownum": 0, "Surname": "Doe", "Firstname": "John", "Dob": "1 Jan 1980"}...] I want to sort the data by DOB then Surname then firstname, to get the same result like for example the sql statement ORDER BY Dob, Surname, Firstname
possible better answer: http://stackoverflow.com/a/27596000
has comment: http://stackoverflow.com/comment/40740920
has answer: http://stackoverflow.com/a/26012810

http://stackoverflow.com/q/25909883
answer count: 0
downvote count: 0
score: 1
favorite count: 0
type: Question
tagged with: visual-studio
upvote count: 1
has body: Is there a way to make visual studio load source maps when debugging javascript files? in case we are debugging typescript in visual studio source maps are loaded but when debugging regular javascript files that has source maps then the source maps are ignored by the visual studio debuggers. IE loads source maps and everything works.
tagged with: javascript
type: UnansweredQuestion
has title: debugging javascript using source maps in visual studio

http://stackoverflow.com/comment/40566178
score: 0
type: Comment
has text: Well, i'm planning the fetch the data user sent to the forum earlier, this is helpful, will check on it :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25915705

http://stackoverflow.com/comment/40627095
has text: @Martyn: Sorry about that, I've again updated my code. This should fix the issue which you're facing when the images move to a single column.
comment on: http://stackoverflow.com/a/25942232
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26005255
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26005215
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/40728095
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26005215
score: 5
has body: No JQuery... Make them display: table-cell elements, and they'll match each other's height automatically... #button1, #button2 { display: table-cell; width: 50%; border: 1px solid red; } Here's some text that the client will control. Here's some more text that the client will control Here's some more text that the client will control Here's some more text that the client will control Here's some more text that the client will control

http://stackoverflow.com/q/26013605
tagged with: javascript
tagged with: ajax
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26013800
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26013800
has body: is there any way to import an external html file, with all the linked css and javascript files, to an already existing html document? I have tried with JQuery method load(), but it seems it is ignoring scripts completely. Basically, what I am trying to do is to load a complete component, with its style and logic/behavior. I need to do this on the client side, with javascript.
type: AnsweredQuestion
has title: importing html file (and all the stylesheets and scripts) with javascript?

http://stackoverflow.com/comment/40592272
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25929805
has text: this is server-side application that runs on node
score: 0

http://stackoverflow.com/q/25931498
type: UnansweredQuestion
tagged with: knockout-components
has title: knockout components binding attribute error
tagged with: knockout.js
type: Question
has body: i want to add attribute id dynamically to tag but it is giving error "Uncaught ReferenceError: Unable to process binding "attr: function (){return {id:id} }" Message: id is not defined" My html- my view model- this.listrows = [ {layout:'basic', params:{icon:'icon-phone', items:[ {item:'content', type:'basic', params:{id:'test', label:'From Account',value:'asuhdas'}} ]}}, {layout:'basic', params:{icon:'icon-money', items:[ {item:'content', type:'basic', params:{label: 'To Account:', value:''}} ]}} ] I added attr:{id:id} still its giving error. can anyone help me in this.
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25931559

http://stackoverflow.com/q/25990585
has body: I'm new with knockout.js and trying to fix data binding on a site that is build on Laravel and is using knockout.js. Observable array works well and items can be pushed and popped without issues. The problem is with the binding to GUI. When items are pushed to array those are added to GUI, but nothing else works, like removing items, and also when adding more items later on those are added on the top of the GUI element list, not added after existing items on the GUI. The observable array is having correct items after push/pop/removeall, its just not reflecting to GUI. I guess that the problem is that observable array is not binded to GUI, but I cannot figure out what could be wrong. Stripped code: Chat.init = function(){ Chat.viewModel = new Chat.ViewModel; ko.applyBindings(Chat.viewModel, $('#msg_canvas').get(0)); }; Chat.ViewModel = function(){ self.messages = ko.observableArray(); self.setMessages = function(msgs){ _.each(msgs, function(msg){ self.messages.push(msg); }); }; self.clearMessages = function(data, e){ self.messages.removeAll(); } } clearMessages is called via onclick: data-bind="click: $parent.clearMessages The HTML is this: &lt;div id="msg_canvas" class="msg-wrap col-md-12" style="height:274px;overflow-y:scroll;" data-bind="foreach: messages"&gt; &lt;div class="media msg"&gt; &lt;div class="media-body"&gt; &lt;span data-bind="text: sent_at"&gt;&lt;/span&gt; &lt;small class="col-lg-10" data-bind="text: message"&gt;&lt;/small&gt; &lt;/div&gt; &lt;/div&gt; Any help or pointer to what could be causing the problem would be highly appreciated. UPDATE: added inner HTML which was not included to post before
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25990962
tagged with: laravel-3
has comment: http://stackoverflow.com/comment/40701145
type: AnsweredQuestion
has title: ObservableArray not binding to GUI
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/40702131
accepted answer: http://stackoverflow.com/a/25990962

http://stackoverflow.com/comment/40642561
type: QuestionComment
type: Comment
has text: @TJ Sorry, I didnt mean the exact thing. I referring its some thing similar like that.
comment on: http://stackoverflow.com/q/25958811
score: 0

http://stackoverflow.com/a/25883317
downvote count: 0
score: 1
has body: Add some classes to the element, in which you should not include that in a variable. For example, try like this: var ids = $( "div" ).not( ".not" );
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25883119

http://stackoverflow.com/comment/40524638
type: Comment
comment on: http://stackoverflow.com/a/25887354
type: AnswerComment
has text: it didn´t work for me. ok let´s make it simple. Mr Ms how can the directive in this case look like ?
score: 0

http://stackoverflow.com/q/25917706
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/28071239
score: 0
tagged with: laravel-4
answer count: 1
tagged with: javascript
has body: I'm trying to require a .js.php file in codesleeve/asset-pipeline for Laravel 4, and have not been able to get it working successfully. Has anyone else had trouble with this? The problem... I use gettext to feed some translation strings into JavaScript (e.g. for error messages). My javascript looks something like this (locale.js.php) where _e is an escaped string from gettext using sprint. Locale.define('&lt;?php echo $USER_LOCALE; ?&gt;', 'Number' , { billion: '&lt;?php echo _e('%s billion', '{x}'); ?&gt;' }); This all works perfectly when throwing the correct header on it and calling the file directly. It will output: Locale.define('fr-FR', 'Number' , { billion: 'milliard {x}' }); In my asset-pipeline config file, I added the extension .js.php to my javascripts mime array, and added the filter: 'filters' =&gt; array( '.js.php' =&gt; array( new AssetPipelinePHP ), ... where the class AssetPipelinePHP is: (I know eval is dangerous, but bear with me) class AssetPipelinePHP implements FilterInterface { ... public function filterDump(AssetInterface $asset) { $content = eval("?&gt; " . $asset-&gt;getContent() . " &lt;?php "); $asset-&gt;setContent($content); } } Finally, in my application.js file I have: //= require_tree modernizr //= require_tree mootools //= require_tree locale This will display the javascript correctly (though ABOVE modernizr instead of at the end of the file) for the first page load only. Consecutive page loads will not display any of the locale.js.php file. However, if I change the locale.js.php file at all (inserting a will do) then again it shows correctly for one page load.
has title: Parse PHP in codesleeve/asset-pipeline javascript
tagged with: asset-pipeline
type: UnansweredQuestion

http://stackoverflow.com/q/25939644
type: Question
score: 1
has body: I have this code: self.Groups = ko.observableArray(); function LoginNameObject(name) { this.loginName = name; } self.Groups.push(new LoginNameObject('Blah')); I am trying to bind in the html like this: &lt;select data-bind="options: Groups, optionsText: loginName"&gt;&lt;/select&gt; but keep on getting loginName is undefined when it tries to bind. Any help would be appreciated! Thanks
tagged with: knockout.js
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: KnockOut.JS optionsText
has answer: http://stackoverflow.com/a/25939673
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/40807559
score: 0
type: Comment
type: QuestionComment
has text: i was trying to have print out the answer given to the prompt.
comment on: http://stackoverflow.com/q/25943760

http://stackoverflow.com/comment/40732264
comment on: http://stackoverflow.com/q/26007544
type: Comment
has text: You've also got an extra double-quote in there: ";" >
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40533713
comment on: http://stackoverflow.com/a/25897803
has text: How can i trigger the radio buttons then? I cant trigger only one radio with one calss
type: AnswerComment
score: 0
type: Comment

jsf-2
tags question: http://stackoverflow.com/q/25978791
type: Tag
tags question: http://stackoverflow.com/q/25984662
tags question: http://stackoverflow.com/q/25970266
tag name: jsf-2
tags question: http://stackoverflow.com/q/25980924
tags question: http://stackoverflow.com/q/25991753

http://stackoverflow.com/comment/40541188
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25901371
score: 0
has text: how to use .on() the container? thanks

http://stackoverflow.com/comment/40557496
type: AnswerComment
comment on: http://stackoverflow.com/a/25898910
type: Comment
has text: Hi, I can't seem to be able to use this method? 'app' nor <myProjectName>, nor anything else possibly related seems to be available?
score: 0

http://stackoverflow.com/q/25956624
has body: I am trying to develop my application in Laravel 4 and Angular JS, my application allows user to retrieve their Information through the system via Text Change. Angular is used to pass data input from the user to Laravel which in turn retrieves the Information from the Database. However Laravel is unable to retrieve the data passed from Angular. View &lt;div data-ng-controller="ReservationController"&gt; &lt;input id='ERI' type='text' data-ng-model="scanRID" data-ng-change="queryRes()" name='exampleInput' maxlength='3' /&gt; &lt;/div&gt; Angular Factory app.factory('exampleFactory', function($http) { var factory = {}; factory.getExample = function(scanRID) { return $http({ method: 'GET', url: LARAVEL_CONTROLLER + 'Example', data: $.param(scanRID) }); }; return factory; }); Angular Controller app.controller('exampleController', function($scope, $http, exampleFactory) { $scope.queryRes = function() { if($scope.scanRID.length == 3) { exampleFactory.getExample($scope.scanRID) .success(function (data) { // Do Something Here }) .error(function (data) { console.log(data); }); } }; }); Laravel 4 Routes Route::get('Example', 'ExampleController@show'); Laravel 4 ExampleController class ExampleController extends \BaseController { public function show() { $id = Input::get('scanRID'); // This here might be wrong. It's always empty! $data = ExampleModel::find($id); // Able to query and retrieve. return Response::JSON($data); // Returns empty. } } Laravel 4 ExampleModel class ExampleModel extends Eloquent { // The id of this table is what I want, but I can't retrieve it. protected $fillable = ['id', 'ExampleData1', 'ExampleData2']; protected $table = 'exampleTable'; } I have searched everywhere for a solution, it seems that everyone is able to successfully make the Ajax call. I think there is something that I am missing out that I am unaware about. I have also tried setting CSRF Token, but however, I do not think that is an issue. So my last resort is to turn to the experts and hop…
has title: Laravel 4 can't get data from Angular Ajax
tagged with: javascript
score: 0
tagged with: laravel-4
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/25956660
tagged with: angularjs
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25956660
type: Question

http://stackoverflow.com/comment/40771880
score: 1
comment on: http://stackoverflow.com/q/26029558
has text: http://stackoverflow.com/questions/16410488/why-keyvaluekey-doesnt-work/16410499#16410499 - same problem
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25940806
favorite count: 0
type: Question
has title: meteor - Synchronizing multiple async queries before returning?
tagged with: meteor
tagged with: asynchronous
score: 9
answer count: 1
upvote count: 9
has body: So I have a Meteor method that is supposed to tell the server to send multiple API requests to 3rd party APIs, and then combine the results of these queries into one array, which is returned to the client. However, I can't seem to find a way for the server to wait until all the API queries have completed before returning the result. The synchronous version of the code, which just fetches the data API call after another, goes like this: Meteor.methods({ fetchData: function(APILinks) { var data = []; APILinks.forEach(function(APILink) { var items = HTTP.get(APILink).content.items; items.forEach(function (item) { data.push(item); }); }); return items; } }); This synchronous code works. However, I haven't been able to find a good way to make the API requests async. The closest I could get to a solution was to redefine the method to return the result of only one API request, and then have the client side loop through each of the API link and calling the method for each one of them. However, is there a way to wrap all these requests into one nice method that returns only when all the API requests are complete?
has answer: http://stackoverflow.com/a/25941287
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25941287

http://stackoverflow.com/comment/40584120
comment on: http://stackoverflow.com/q/25924132
has text: Please post your javascript code here.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40649836
type: Comment
comment on: http://stackoverflow.com/a/25962423
has text: Are you able to show an actual working example where this occurs, on your site or reproduced on jsfiddle.net?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26009100
answer count: 1
downvote count: 0
favorite count: 0
has body: I have the following code that draws a chart using dimple.js: http://jsbin.com/zacus/17/ When the browser window is resized (or the jsbin pane is resized) i want the chart to also resize to fit it's table cell parent. As you can see from the example this does not happen. I have attempted writing an event handler to change the width of the chart or to redraw the chart when it's , but to no avail. window.onresize= function redraw(){ chart1.setBounds(70, 30, pTd.offsetWidth-150, 300); myLegend1.left = chart1.width + 100; } Any suggestions on how to accomplish this? EDIT: Experimenting a bit led me to the following code which seems to solve my problem. Is this the best way to accomplish this? chart1.svg.attr("width", "100%") .attr("height", "100%") .attr("viewBox", "0 0 600 400");
tagged with: d3.js
has title: 2dimple.js/d3.js auto size chart when window size changes
type: AnsweredQuestion
tagged with: dimple.js
linked to: http://stackoverflow.com/q/9400615
score: 1
has answer: http://stackoverflow.com/a/26018604
accepted answer: http://stackoverflow.com/a/26018604
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40739525

http://stackoverflow.com/a/25908461
accepted answer of: http://stackoverflow.com/q/25908372
answers question: http://stackoverflow.com/q/25908372
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40552853
has body: use $(document).on('keyup', function(e) { $('div').removeClass('bar'); e.preventDefault(); }); e.preventDefault(); will reset the input
type: Answer
score: 6
upvote count: 6

http://stackoverflow.com/a/26086159
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26018924
score: 1
has body: I have tried the same example in my end, and faced the same issue that , generated TR are not accessible in code behind. This is because, they are added using dynamic JS, and those are not put into VIEWSTATE, as you now, ASP control value are available in code behind on POSTBACK only if those are in VIEWSTATE. In this case it was not, so does the debugger says that projGrid.Rows.Count = 0. To make it work, you need to put changed/dynamic JS added TR into VIEWSTATE, but again those are encoded format, i afraid, how to do that. But if you put any static TR inside table, then definitely those are accessible, I have verified that in debugger, it says projectGrid.Rows.Count = 1, if there is only one static TR inside table. And again because, that static TR is in VIEWSTATE only. So to conclude, in my opinion, it is better to handle in JS side, if you are going to save those value to DB , then make AJAX call and save, and pass data in JSON format. Or use a hidden field, and save those data in JSON format, and after post, get those in code behind, read JSON format data, and operate.

http://stackoverflow.com/q/25969422
type: Question
score: 0
has title: Calling an MVC controller action to return a view into a Wordpress website
answer count: 1
tagged with: javascript
tagged with: rest
has body: A bit stumped... sorry if this is vague. I have an MVC website. I wish to create a controller action that returns a value in JSON, which I can do. For example, my MVC website will return today's weather as a string ("Today is sunny"). I wish to call this from a Wordpress website, which is where I'm stumped. Should I modify the JSON action to create a html view, then use an iframe in the Wordpress site to show the view? I'd rather find a way to use javascript in the wordpress website to retrieve the value as a string and insert it into the page. How would I go about that!?
has answer: http://stackoverflow.com/a/25971405
tagged with: wordpress
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40662104
tagged with: asp.net-mvc
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25971405

http://stackoverflow.com/q/25919245
type: AnsweredQuestion
type: Question
has body: I am trying to implement a ScrollSpy on a website that i'm developing. Here's the link of the tutorial i'm following Tutorial And here the demo: Demo I'm trying to adapt their script to my needs, but i keep getting a error on javascript, the console says that "Cannot read property 'top' of undefined" Here's my Javascript */$(document).ready(function(){ $(".menu li a").click(function(evn){ evn.preventDefault(); $('html,body').scrollTo(this.hash, this.hash); }); /** * This part handles the highlighting functionality. * We use the scroll functionality again, some array creation and * manipulation, class adding and class removing, and conditional testing */ var aChildren = $(".menu li").children(); // find the a children of the list items var aArray = []; // create the empty aArray for (var i=0; i &lt; aChildren.length; i++) { var aChild = aChildren[i]; var ahref = $(aChild).attr('href'); aArray.push(ahref); } // this for loop fills the aArray with attribute href values $(window).scroll(function(){ var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page var windowHeight = $(window).height(); // get the height of the window var docHeight = $(document).height(); for (var i=0; i &lt; aArray.length; i++) { var theID = aArray[i]; if (theID.length) { var divPos = $(theID).offset().top; var divHeight = $(theID).height(); // get the height of the div in question if (windowPos &gt;= divPos &amp;&amp; windowPos &lt; (divPos + divHeight)) { $("a[href='" + theID + "']").parent().addClass("active"); } else { $("a[href='" + theID + "']").parent().removeClass("active"); } } } if(windowPos + windowHeight == docHeight) { if (!$(".menu li:last-child a").hasClass("active")) { var navActiveCurrent = $(".active").attr("href"); $("a[href='" + navActiveCurrent + "']").removeClass("active"); $(".menu li:last-child a").addClass("active"); } } }); }); and here's the web site i'm developing Web-Site Can anyone help me?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25919409
accepted answer: http://stackoverflow.com/a/25919409
tagged with: http://stackoverflow.com/tag/html
has title: Scrollspy with jQuery and scrollTo plugin
tagged with: css

http://stackoverflow.com/comment/40781223
score: 0
comment on: http://stackoverflow.com/a/26034318
type: Comment
type: AnswerComment
has text: it is so , but in case of large number of datas in use.

http://stackoverflow.com/q/25896665
tagged with: jquery
has answer: http://stackoverflow.com/a/25896741
favorite count: 0
has comment: http://stackoverflow.com/comment/40564982
has comment: http://stackoverflow.com/comment/40566189
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I've been trying to figure the issue out for past few hours but can't get it to work. I'm having that div that contains 3 other divs: &lt;div id="main" class="box"&gt; &lt;div class="index"&gt;&lt;/div&gt; &lt;div class="content"&gt;&lt;/div&gt; &lt;div class="options"&gt;&lt;/div&gt; &lt;/div&gt; Ultimately I want div with class .options to show after clicking on the div id "main", using jQuery, by first finding relevant descendant and than applying either .show() or toggle() function. Unfortunatelly I can't get it to work, and even trying to apply simple .css style change fails to work. Here's the jQuery code: $(document).ready(function() { $('#main').on(mouseenter: function(event) { $(this).find('.options').css("background" , "red")}) }); Here's jsfiddle Any clues?
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/25897305
has comment: http://stackoverflow.com/comment/40565130
type: Question
has answer: http://stackoverflow.com/a/25896773
has comment: http://stackoverflow.com/comment/40531324
has title: How can I apply jQuery .css style to descendant div
has answer: http://stackoverflow.com/a/25897305
score: -2
has comment: http://stackoverflow.com/comment/40561540
has comment: http://stackoverflow.com/comment/40566955
has comment: http://stackoverflow.com/comment/40554661
possible better answer: http://stackoverflow.com/a/25896741
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/40565632
has comment: http://stackoverflow.com/comment/40570197
tagged with: javascript

http://stackoverflow.com/comment/40537763
comment on: http://stackoverflow.com/q/25899989
type: QuestionComment
type: Comment
has text: That really depends on your application and what it does.
score: 0

http://stackoverflow.com/q/25906826
has comment: http://stackoverflow.com/comment/40549664
score: 0
answer count: 1
has title: Uncaught TypeError: undefined is not a function on line var new_arr = filtered.split(',');
tagged with: arrays
has answer: http://stackoverflow.com/a/25906936
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: i wrote little bit of javascript and i'm getting error, usually it never happens but still i've no idea what i'm doing wrong here is my code ` var stu = ['ron','john','johnny','roni','rob','bob']; $('#studentName').keyup(function(){ var student = $('#studentName').val(); alert(findStu(student)); }); function findStu(val){ var filtered = stu.filter(function(str){ return str.indexOf(val) != -1; }); var new_arr = filtered.split(','); var html = ""; new_arr.foreach(function(element,index,array){ console.log('a['+index+']='+element); }); } ` what i'm trying to do is when someone types r my code should return 'ron,roni,rob' sort of auto suggestions, but i'm getting error on line var new_arr = filtered.split(',') \\ undefined is not a function
type: Question

http://stackoverflow.com/q/25931737
tagged with: asp.net
type: UnansweredQuestion
has body: I have table: @for (var i = 0; i < Model.Count; i++) { @if (!Model[i].Letter.Equals(letter)) { @Html.DisplayTextFor(m => Model[i].Letter); } @Html.HiddenFor(m => Model[i].Student.Id, new { @class = "mojaklasa" } ) ... ... ... } And how can i get closest hiddenfor value to button? i tried: $(document).ready(function () { $('.button-edit').each(function () { $(this).mouseenter(function () { $(this).fadeTo(20, 1).css('cursor', 'pointer'); }); $(this).mouseleave(function () { $(this).fadeTo(20, 0.5); }); $(this).click(function () { var id; $(this).closest('.mojaklasa').val(id); alert(id); }); }); and with $(this).next.... Still if i click this button i dont have anything in alert box. I have even put class inside but i can get this text from it.
has title: ASP.NET MVC JQuery closest HiddenFor val
has answer: http://stackoverflow.com/a/25931976
has answer: http://stackoverflow.com/a/25931942
type: Question
has answer: http://stackoverflow.com/a/25931836
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3

http://stackoverflow.com/comment/40738130
type: Comment
type: QuestionComment
has text: actually your code does work http://jsfiddle.net/p8paydcd/10/
comment on: http://stackoverflow.com/q/26011165
score: 1

http://stackoverflow.com/comment/40587860
type: AnswerComment
comment on: http://stackoverflow.com/a/25927434
has text: where it is showing the file input?? can you brief that??
type: Comment
score: 0

http://stackoverflow.com/comment/40628848
type: QuestionComment
has text: Its 11 seconds on the first request. The "Html" page. the rest after that is around 1 sec at most. See img: [link](http://www.tiikoni.com/tis/view/?id=6c8998d)
comment on: http://stackoverflow.com/q/25943769
score: 0
type: Comment

http://stackoverflow.com/comment/40765480
has text: There is a different legend to each graph (same series, but each legend is placed under different container and should be treated separately. The click event is fetched in all of the graphs but they are all changes the top graph alone.
comment on: http://stackoverflow.com/a/26020693
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40525899
type: Comment
comment on: http://stackoverflow.com/a/25875767
type: AnswerComment
has text: I'm not thrilled with batarang, but I suppose that's as good as it's going to get. Perhaps it will be more useful as I learn more. The linked dupe is definitely an issue I've had. It's not today's issue, but that's okay. It's still important to know!
score: 0

http://stackoverflow.com/comment/40805330
comment on: http://stackoverflow.com/q/26008300
type: Comment
type: QuestionComment
has text: I would take a look at iOS's (Safari's) documentation [here](https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html), and take a specific look at the "unload" event. When you exit Safari, this event is fired. Perhaps you can listen to that and stop the timer (save it in localStorage or something) then resume?
score: 0

http://stackoverflow.com/a/25878727
has comment: http://stackoverflow.com/comment/40499582
type: Answer
has body: See here for documentation. ul // create ul list tag each u in user // start loop li= u // create li tag and assign innerHTML to array item value
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40499647
downvote count: 0
answers question: http://stackoverflow.com/q/25878660

http://stackoverflow.com/a/25879885
type: Answer
has comment: http://stackoverflow.com/comment/40502294
downvote count: 0
has comment: http://stackoverflow.com/comment/40501900
has comment: http://stackoverflow.com/comment/40502181
has body: I hope I understood it right. Here is a small but cool fiddle for you: FIDDLE Your Code Editted and its working now: FIDDLE var workers = 0; var workerCheck = setInterval(function(){ workers = parseInt($("#workers").val()); if( workers &gt; 0 ){ for(var i = 0; i &lt; workers; i++){ $("#Alien").trigger('click'); } } },1000); Whats wrong with your code: I don't know it a bit messy I edited it and its working now.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25879601
has comment: http://stackoverflow.com/comment/40501517
has comment: http://stackoverflow.com/comment/40501792

http://stackoverflow.com/a/25877025
answers question: http://stackoverflow.com/q/25876928
score: 0
type: Answer
has body: You could always invert your check: var something = 4; if( something < 1 || something == 4 || something >7 ){ document.body.innerHTML = " no "; }else{ document.body.innerHTML = " yes "; }

http://stackoverflow.com/comment/40574919
type: AnswerComment
comment on: http://stackoverflow.com/a/25901694
type: Comment
has text: Thank you, this is a big help!
score: 0

http://stackoverflow.com/comment/40583879
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25921717
type: Comment
has text: @thetallweeks also it does not capture the spaces in first two rows :)

http://stackoverflow.com/q/25954744
upvote count: 3
tagged with: ruby-on-rails
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25964767
has body: I am calling two different actions for the same controller with ajax in development environment. In one action I am updating a database in a very slow process. On the other action I want to get the percentual concluded to update a progressbar. I can see that both are executing, The problem is that the second action is waiting for the first to finish to execute itself and it should be executing every second to get the actual percentual. Can rails execute two actions in parallel? or is it a Webrick problem? I Tried with puma as suggested but it's still waiting for the first action, heres the ajax code call $(document).ready(function() { $(':button').click(function(){ var formData = new FormData($('form')[0]); $.ajax({ url: '/quotes/upload', //Server script to process data type: 'POST', //Ajax events beforeSend: progress, success: completeHandler, error: function(ts) { alert(ts.responseText) }, // Form data data: formData, //Options to tell jQuery not to process data or worry about content-type. cache: false, contentType: false, processData: false }); }); }); function progress() { $.ajax({ url: '/quotes/status.json', dataType: "JSON" }).success(function (percentual) { if (percentual &gt;= '95') { location.reload(); } else { var $bar = $('.bar'); $bar.width(percentual+"%"); setInterval(progress,800); } }); } and here is the console print out: Started GET "/quotes/status.json" for 127.0.0.1 at 2014-09-21 10:23:38 -0300 Processing by QuotesController#status as JSON percentual =&gt; 0 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.0ms) Started POST "/quotes/upload" for 127.0.0.1 at 2014-09-21 10:23:38 -0300 Processing by QuotesController#upload as */* Parameters: {"quotes"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x00000001b980b0 @tempfile=#&lt;Tempfile:/tmp/RackMultipart20140921-5849-otvxky&gt;, @original_filename="HIST_XXX.TXT", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"quotes\"; filename=\"HIST_XXX.TXT\"\r\nContent-Type: te…
type: Question
answer count: 2
downvote count: 0
has title: Ruby on rails - How to make controller execute 2 actions simultaneously with ajax?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25964767
favorite count: 0
tagged with: ajax
tagged with: controller
has answer: http://stackoverflow.com/a/25956376
tagged with: ruby
has comment: http://stackoverflow.com/comment/40635251
possible better answer: http://stackoverflow.com/a/25956376

http://stackoverflow.com/q/26015100
upvote count: 1
downvote count: 1
type: Question
has body: I have the following regex which only allows numbers delimited by comma. /^(?:\d+(?:, *|))*\d+$/ Example: 12345, 123456789, 987654 //valid Is there any way to modify this regex to only allow between 3 to 5 numbers before and after the commas. Examples: 12345, 54321, 918, 123, 5678 //valid 12345, 1234567, 4382929001 //invalid
has comment: http://stackoverflow.com/comment/40745366
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26015251
has answer: http://stackoverflow.com/a/26015223
favorite count: 0
has comment: http://stackoverflow.com/comment/40746994
possible better answer: http://stackoverflow.com/a/26015251
tagged with: regex
has comment: http://stackoverflow.com/comment/40744856
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26015223
has title: Limit number of characters delimited by a comma?

http://stackoverflow.com/q/26002219
has title: Replacing Title Attribute With Spans For ToolTips A Bad Idea For SEO?
has body: I am currently implementing pure CSS for tool tips and started rethinking it. I had decided to use a pure CSS approach to keep the code to text ratio down to a minimum, have better control how they are displayed and better UX. But using a pure CSS solution without any JavaScript requires removing the title attribute from the anchor tag. This obviously could have a disadvantage(?). That got me thinking: Has the SE's evolved to look at the span tag within anchor tags in lieu of the title attribute? By removing the title attribute prevents the browser from displaying it's default behavior of a tool tip ( so there isn't two tool tips displayed to the user when using pure CSS) but the title attribute is important to search engines and SEO. Knowing that the search engines are getting smarter and smarter by the day and I see a lot of tool tip design use implemented in this way thru the property inspector. So: Should I still include the title attribute? - I see good & bad Would there be a penalty by having a span and title containing the same text within a given anchor? - this would be bad Is the span tag counted as text even-thou it's within anchors? Cool if it is but most likely yes If the title attribute is omitted, would the span take its place? Even better to make the inter-webs a better & faster place but most likely not Having both would end up increasing the file size and the code ratio would increase too. It would be awesome if the SE's could search for the span tag between anchors as a title description. So I ask you based on any current (or insider) knowledge and what I ask above, what code snippet below would be bad or best for SEO? The old school way with JS and/or CSS: The Link or A movement I have seen many developers using: The Linkdescription of link or BUt should it be: The Linkdescription of link Obviously there are a lot of factors to SEO weight to consider too so I would like to se everyone's opinion to be as thorough as possible - There might be someth…
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26002781
tagged with: seo
tagged with: css
tagged with: attributes
has comment: http://stackoverflow.com/comment/40751036
type: UnansweredQuestion
tagged with: performance
has answer: http://stackoverflow.com/a/26009636

parse-cloud-code
tags question: http://stackoverflow.com/q/25985611
tags question: http://stackoverflow.com/q/25877320
type: Tag
tags question: http://stackoverflow.com/q/25984026
tags question: http://stackoverflow.com/q/25894744
tag name: parse-cloud-code

http://stackoverflow.com/comment/40602969
score: 0
comment on: http://stackoverflow.com/q/25933496
type: Comment
type: QuestionComment
has text: Yes...i want to add the navigator in the x-axis ...please help in the jsfiddle ..

http://stackoverflow.com/q/26008900
has comment: http://stackoverflow.com/comment/40734096
has answer: http://stackoverflow.com/a/26008932
has title: Turn scroll event "off" after it has been fired three times
has comment: http://stackoverflow.com/comment/40734304
has comment: http://stackoverflow.com/comment/40734042
has body: I have a small script I am running to load images on scroll. I would like to stop loading images after the function is called three times. Here is the script: $(window).on('scroll' function () { feed.next(); ltfeed.next(); }); Except I want the on() event to fire three times and then stop. So it would act like .one() but fire multiple times. Any advice is greatly appreciated.
downvote count: 3
tagged with: scroll
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40733998
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26008957
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/25949738
has title: Change div background color on click event
has answer: http://stackoverflow.com/a/25949820
type: Question
score: 0
has answer: http://stackoverflow.com/a/25949800
tagged with: javascript
has answer: http://stackoverflow.com/a/25949768
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25949768
answer count: 3
type: AnsweredQuestion
has body: I am trying to change div color on click but it is not working: 1 Logout Where am I wrong here? Any help will be appreciated
possible better answer: http://stackoverflow.com/a/25949800

http://stackoverflow.com/a/25954263
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40634509
answers question: http://stackoverflow.com/q/25953570
downvote count: 0
score: 1
has body: Use the beforeActivate and activate methods, as described in the API. beforeActivate: function (event, ui) { var el = ui.newPanel[0]; if (el) el.innerHTML = returnContent(el.id); // Opening }, activate: function (event, ui) { var el = ui.oldPanel[0]; if (el) el.innerHTML = "" // Closing } Working demo: http://jsfiddle.net/ag0gw7cu/
accepted answer of: http://stackoverflow.com/q/25953570
type: AcceptedAnswer

playback-rate
tags question: http://stackoverflow.com/q/25908628
type: Tag
tag name: playback-rate

http://stackoverflow.com/q/26016562
has comment: http://stackoverflow.com/comment/40747632
favorite count: 0
tagged with: jquery-ui-dialog
has comment: http://stackoverflow.com/comment/40747781
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40747432
downvote count: 3
has comment: http://stackoverflow.com/comment/40747411
upvote count: 75
possible better answer: http://stackoverflow.com/a/42089436
has answer: http://stackoverflow.com/a/44253575
type: Question
has title: Error: TypeError: $(...).dialog is not a function
has answer: http://stackoverflow.com/a/46210837
has comment: http://stackoverflow.com/comment/40747869
has answer: http://stackoverflow.com/a/45889144
has comment: http://stackoverflow.com/comment/40747579
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40749748
has comment: http://stackoverflow.com/comment/40747577
has comment: http://stackoverflow.com/comment/40747454
has answer: http://stackoverflow.com/a/26016764
accepted answer: http://stackoverflow.com/a/26016764
has answer: http://stackoverflow.com/a/35107510
has comment: http://stackoverflow.com/comment/40747483
has body: I am having an issue getting a dialog to work as basic functionality. Here is my jQuery source imports: Html: open the dialog I'm a dialog From the posts around seems like as a library import issue. I downloaded the JQuery UI Core, Widget, Mouse and Position dependencies. Any Ideas?
has answer: http://stackoverflow.com/a/50721552
has comment: http://stackoverflow.com/comment/40748040
has comment: http://stackoverflow.com/comment/40747613
has answer: http://stackoverflow.com/a/42089436
answer count: 7
has comment: http://stackoverflow.com/comment/40747525
score: 72

http://stackoverflow.com/comment/40698288
comment on: http://stackoverflow.com/a/25976568
has text: I updated the question to show what I mean.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26008535
tagged with: jquery
has body: in my code dialog page and back button not working..i correctly include jquery.mobile-1.4.4.min.css, jquery.js, and jquery.mobile-1.4.4.min.js links my 2 pages. can anyone point me what im doing wrong here... My index.html &lt;!-- page 1--&gt; &lt; div data-role="page" id="home" data-theme='b' data-dom-cache="true"&gt; &lt; div data-role="header" data-theme='a'&gt; &lt; h1&gt;My first Jquery&lt;/h1&gt; &lt; /div&gt; &lt; div data-role="content"&gt; &lt; a href="page2.html" data-role="button"&gt;Take Me to Page 2&lt;/a&gt; &lt; a href="page2.html" data-role="button"&gt;Take Me to Page 2&lt;/a&gt; &lt; a href="#dialog" data-role="button"&gt;dialog&lt;/a&gt; &lt; /div&gt; &lt; div data-role="footer" data-theme='a' data-position="fixed"&gt; &lt; h1&gt;All Right Reserved&lt;/h1&gt; &lt; /div&gt; &lt; /div&gt; &lt;!-- dialog--&gt; &lt; div id="dialog" data-role="dialog" &gt; &lt; div data-role="header" data-theme='a'&gt; &lt; h1&gt;header pf dialog&lt;/h1&gt; &lt; /div&gt; &lt; div data-role="content"&gt; &lt; a href="#" data-role="button"&gt;Back&lt;/a&gt; &lt; /div&gt; &lt; div data-role="footer" data-theme='a' data-position="fixed"&gt; &lt; h1&gt;All Right Reserved&lt;/h1&gt; &lt; /div&gt; &lt; /div&gt; this is my page2.html &lt; div data-role="page" id="home" data-theme='a'&gt; &lt; div data-role="header" data-theme='a'&gt; &lt; h1&gt;My first Jquery&lt;/h1&gt; &lt; /div&gt; &lt; div data-role="content"&gt; &lt; a href="#" data-role="button" data-rel="back" data-theme="b"&gt;Go Back&lt;/a&gt; &lt; a href="#dialog" data-role="button"&gt;dialog&lt;/a&gt; &lt; /div&gt; &lt; div data-role="footer" data-theme='a' data-position="fixed"&gt; &lt; h1&gt;All Right Reserved&lt;/h1&gt; &lt; /div&gt; &lt; /div&gt;
score: 0
tagged with: android
answer count: 1
has comment: http://stackoverflow.com/comment/40733504
tagged with: cordova
has answer: http://stackoverflow.com/a/26008901
type: AnsweredQuestion
has title: JQuery Mobile Dialog page not working
type: Question
accepted answer: http://stackoverflow.com/a/26008901
tagged with: javascript

typeahead
type: Tag
tags question: http://stackoverflow.com/q/26027474
tag name: typeahead
tags question: http://stackoverflow.com/q/26022577

http://stackoverflow.com/comment/40708609
comment on: http://stackoverflow.com/q/25981935
score: 0
type: QuestionComment
type: Comment
has text: It is possible that you're using an element present in other views, but absent in this one. Just guessing.

http://stackoverflow.com/comment/40766372
type: Comment
comment on: http://stackoverflow.com/a/26026426
score: 0
has text: Same as my answer presented first
type: AnswerComment

http://stackoverflow.com/a/73284631
has body: You can only close a window that your script made, so this is possible: window.open("", "_blank", ""); window.close(); But otherwise you can change the link, like that: location.href = "https://bruh.io"; Make sure that you have https:// Otherwise if you were in https://www.youtube.com and you run location.href = bruh.io you'll go to https://www.youtube.com/bruh.io
answers question: http://stackoverflow.com/q/25937212
score: 0
upvote count: 1
downvote count: 1
type: Answer

http://stackoverflow.com/a/26001118
has comment: http://stackoverflow.com/comment/40719849
upvote count: 2
has comment: http://stackoverflow.com/comment/40719909
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40721944
answers question: http://stackoverflow.com/q/26001074
type: Answer
has body: Assuming you have control over the extElementConfig object, remove the parenthesis from sampleFunc var extElementConfig={extElementPosition :10,extElementId:'mailOrderBtn',onClickDo:sampleFunc};
accepted answer of: http://stackoverflow.com/q/26001074
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40719837
has comment: http://stackoverflow.com/comment/40720019
has comment: http://stackoverflow.com/comment/40720747
has comment: http://stackoverflow.com/comment/40720258
has comment: http://stackoverflow.com/comment/40719958

http://stackoverflow.com/q/25938024
type: Question
tagged with: polymer
linked to: http://stackoverflow.com/q/3397113
possible better answer: http://stackoverflow.com/a/25938206
tagged with: javascript
has comment: http://stackoverflow.com/comment/40609402
answer count: 3
tagged with: web-component
has body: Edit 2: Keypress events working, on this jsbin: http://jsbin.com/foyile/1/. The problem is, I need to focus the tab on the element, with these two pieces line of code ready: function() { this.tabIndex = 0; this.focus(); } The problem is this causes to draw a blue border around the element, and it gets ugly when I do this on my moving element, Is there a way to capture the key event globally on the page without focusing on the element, (or a parent element that will make the border invisible and focusing more natural)? Original Question Is there a polymer component that handles user input, mainly key presses and swipe gestures. I want to create a game, and I need to control the player via up, down button or swipe gestures. Is there a polymer way to handle input, or I need to use native dom and javascript? Edit: According to this answer Polymer keypress event handler not being called: this.tabIndex = 0 must be set, this to work. Here's a jsbin: http://jsbin.com/foyile/1/.
linked to: http://stackoverflow.com/q/3660831
downvote count: 0
has title: How to Handle Input with Polymer, without blue border tab focus?
favorite count: 0
has comment: http://stackoverflow.com/comment/40624957
linked to: http://stackoverflow.com/q/23232926
has answer: http://stackoverflow.com/a/25938206
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40609322
has comment: http://stackoverflow.com/comment/40609204
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40609251
has comment: http://stackoverflow.com/comment/40609295
score: 1
has comment: http://stackoverflow.com/comment/40606776
has answer: http://stackoverflow.com/a/25938244
upvote count: 1
accepted answer: http://stackoverflow.com/a/25938244
has comment: http://stackoverflow.com/comment/40609430
has answer: http://stackoverflow.com/a/25939255

ruby
tags question: http://stackoverflow.com/q/25953762
tags question: http://stackoverflow.com/q/25951147
tags question: http://stackoverflow.com/q/25951668
tags question: http://stackoverflow.com/q/25882186
tag name: ruby
tags question: http://stackoverflow.com/q/25894466
tags question: http://stackoverflow.com/q/25943079
tags question: http://stackoverflow.com/q/25899521
tags question: http://stackoverflow.com/q/25908578
tags question: http://stackoverflow.com/q/25944997
tags question: http://stackoverflow.com/q/25966688
tags question: http://stackoverflow.com/q/25954744
tags question: http://stackoverflow.com/q/25926771
tags question: http://stackoverflow.com/q/25879763
tags question: http://stackoverflow.com/q/25930992
tags question: http://stackoverflow.com/q/26020664
tags question: http://stackoverflow.com/q/26016053
tags question: http://stackoverflow.com/q/25958618
type: Tag

http://stackoverflow.com/q/26007447
has title: Read Only Collection or Iterator in JavaScript
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40731655
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26007837
accepted answer: http://stackoverflow.com/a/26007837
answer count: 1
linked to: http://stackoverflow.com/q/15142022
favorite count: 0
tagged with: private-members
has body: I have a small question in regard to JS. It's similar to this post: here from @ADC, with a small caveat. in his code he creates a java script object: var AssocArray = function(){ var collection = new Object(); this.add = function(id, o){ collection[id] = o; } this.remove = function(id){ delete collection[id]; } this.getById = function(id){ return collection[id]; } this.get = function(){ var res = collection; return res; } } Which is something very close to what I need to do. His question was to create a read only property for the get() accessor, which he tackled with cloning the collection private variable. My problem is that I don't want to create just a clone. What I need is to give the individual elements to the consumer, but prevent them from adding any new ones from the array returned by the get() member. Instead they should use the add(id, o) member to add new items, rather than having the option to add new stuff to the clone returned by the get(). Is that even possible? Is it possible to create or return just an iterator of the collection variable preventing the users to modify the array other than to use the Add/Remove members?

http://stackoverflow.com/comment/40549120
type: Comment
type: QuestionComment
has text: http://www.sitepoint.com/convert-html-to-pdf-with-dompdf/
comment on: http://stackoverflow.com/q/25906503
score: 0

http://stackoverflow.com/a/25991835
upvote count: 2
score: 2
has body: Ok I figured it out. Here's what I did. You have a tile coordinate for each tile (x,y) and zoom and a tile size. So first we make a new Google MapsPoint to the center point of the tile: var centerpoint = new google.maps.Point((coord.x * tileSize) + (tileSize / 2), ((coord.y + 1) * tileSize) + (tileSize / 2)); Then convert those x,y coordinates to LatLng (conversion functions and the math behind it can be found on http://www.maptiler.org) So it was actually pretty simple...
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25990570
type: Answer
answers question: http://stackoverflow.com/q/25990570

http://stackoverflow.com/a/25919409
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25919245
has comment: http://stackoverflow.com/comment/40573616
answers question: http://stackoverflow.com/q/25919245
type: AcceptedAnswer
has body: the problem is that you are using href as a selector for jQuery. you need to form a correct selector: for (var i=0; i &lt; aArray.length; i++) { var theID = aArray[i]; if (theID.length) { var divPos = $(theID).offset().top; var divHeight = $(theID).height(); // get the height of the div in question if (windowPos &gt;= divPos &amp;&amp; windowPos &lt; (divPos + divHeight)) { $("a[href='" + theID + "']").parent().addClass("active"); } else { $("a[href='" + theID + "']").parent().removeClass("active"); } } } should instead be: for (var i=0; i &lt; aArray.length; i++) { var theID = aArray[i]; var selector = "a[href='" + theID + "']"; if (theID.length) { var divPos = $(selector).offset().top; var divHeight = $(selector).height(); // get the height of the div in question if (windowPos &gt;= divPos &amp;&amp; windowPos &lt; (divPos + divHeight)) { $(selector).parent().addClass("active"); } else { $(selector).parent().removeClass("active"); } } }

http://stackoverflow.com/a/25898997
has body: There is no selector for this (as far as I know) but you can filter them out yourself... $.expr[':'].dataStartsWith = function (elem, index, not) { var data = $(elem).data(); return Object.keys(data).some(function (key) { return key.indexOf(not[3]) === 0; }); }; $(':dataStartsWith("xy")'); Just bear in mind data attribute names are converted to camelcase in dataset so to match data-xy-z-* you will need to use $(':dataStartsWith("xyZ")');
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25898709
answers question: http://stackoverflow.com/q/25898709
has comment: http://stackoverflow.com/comment/40535613
type: AcceptedAnswer

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/25902416
tag name: datetimepicker
tags question: http://stackoverflow.com/q/25900446
tags question: http://stackoverflow.com/q/25978820

php
tags question: http://stackoverflow.com/q/26033681
tags question: http://stackoverflow.com/q/26013856
tags question: http://stackoverflow.com/q/25987784
tags question: http://stackoverflow.com/q/25990141
tags question: http://stackoverflow.com/q/25902717
tags question: http://stackoverflow.com/q/26020621
tags question: http://stackoverflow.com/q/25932324
tags question: http://stackoverflow.com/q/25949727
tags question: http://stackoverflow.com/q/25999360
tags question: http://stackoverflow.com/q/25924944
tags question: http://stackoverflow.com/q/26006843
tags question: http://stackoverflow.com/q/26028909
tags question: http://stackoverflow.com/q/25927062
tags question: http://stackoverflow.com/q/25886323
tags question: http://stackoverflow.com/q/25969539
tags question: http://stackoverflow.com/q/25962846
tags question: http://stackoverflow.com/q/26014190
tags question: http://stackoverflow.com/q/25950085
tags question: http://stackoverflow.com/q/25888777
tags question: http://stackoverflow.com/q/26019705
tags question: http://stackoverflow.com/q/25923198
tags question: http://stackoverflow.com/q/25917745
tags question: http://stackoverflow.com/q/25935870
tags question: http://stackoverflow.com/q/25903352
tags question: http://stackoverflow.com/q/26022826
tags question: http://stackoverflow.com/q/25988057
tags question: http://stackoverflow.com/q/25958107
tags question: http://stackoverflow.com/q/26031540
tags question: http://stackoverflow.com/q/26015924
tags question: http://stackoverflow.com/q/26001194
tags question: http://stackoverflow.com/q/26002049
tags question: http://stackoverflow.com/q/25876687
tags question: http://stackoverflow.com/q/25906987
tags question: http://stackoverflow.com/q/25931834
tags question: http://stackoverflow.com/q/25970188
tags question: http://stackoverflow.com/q/25951631
tags question: http://stackoverflow.com/q/25921602
tags question: http://stackoverflow.com/q/25981686
tags question: http://stackoverflow.com/q/25882355
tags question: http://stackoverflow.com/q/25982567
tags question: http://stackoverflow.com/q/25874632
tags question: http://stackoverflow.com/q/25991189
tags question: http://stackoverflow.com/q/25953332
tags question: http://stackoverflow.com/q/25955894
tags question: http://stackoverflow.com/q/25993836
tags question: http://stackoverflow.com/q/26015977
tags question: http://stackoverflow.com/q/26031518
tags question: http://stackoverflow.com/q/25958240
tags question: http://stackoverflow.com/q/25924499
tags question: http://stackoverflow.com/q/25879455
tags question: http://stackoverflow.com/q/26001829
tags question: http://stackoverflow.com/q/25918426
tags question: http://stackoverflow.com/q/25908350
tags question: http://stackoverflow.com/q/26009309
tags question: http://stackoverflow.com/q/25885419
tags question: http://stackoverflow.com/q/25879745
tags question: http://stackoverflow.com/q/25983250
tags question: http://stackoverflow.com/q/25933034
tags question: http://stackoverflow.com/q/25948556
tags question: http://stackoverflow.com/q/26027361
tags question: http://stackoverflow.com/q/26016703
tags question: http://stackoverflow.com/q/25945379
tags question: http://stackoverflow.com/q/25978769
tags question: http://stackoverflow.com/q/25925297
tags question: http://stackoverflow.com/q/26011589
tags question: http://stackoverflow.com/q/25966100
tags question: http://stackoverflow.com/q/25947050
tags question: http://stackoverflow.com/q/25917704
tags question: http://stackoverflow.com/q/25905412
tags question: http://stackoverflow.com/q/25947731
tags question: http://stackoverflow.com/q/26012117
tags question: http://stackoverflow.com/q/25901387
tags question: http://stackoverflow.com/q/26000192
tags question: http://stackoverflow.com/q/26025554
tags question: http://stackoverflow.com/q/25943971
tags question: http://stackoverflow.com/q/25955223
tags question: http://stackoverflow.com/q/25915110
tags question: http://stackoverflow.com/q/25925020
tags question: http://stackoverflow.com/q/25885685
tags question: http://stackoverflow.com/q/25900734

http://stackoverflow.com/comment/40614213
has text: Use a beautifier, for example [jsbeautifier.org](http://jsbeautifier.org).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25941152
type: Comment

http://stackoverflow.com/a/25949156
has body: Once you convert the JSON string to an object you can use a foreach style for loop for ( var key in map){ var value = map [key]; .... }
type: Answer
has comment: http://stackoverflow.com/comment/40625468
answers question: http://stackoverflow.com/q/25949085
score: 0
has comment: http://stackoverflow.com/comment/40625990

http://stackoverflow.com/comment/40724702
score: 0
has text: My $id property seems to be a timestamp and not the firebase $id. I'm not sure why yet but I'm trying to figure it out.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26002335

http://stackoverflow.com/comment/40796105
has text: Hi Michal - good point. I have updated and although it has not solved the problem it probably has made the code a bit more future proof ;-)
comment on: http://stackoverflow.com/q/26023278
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26025404
has body: You may use ng-model attribute in your controller and assign a default variable like Nissan Toyota Fiat {{myForm.car}} jsbin and go through this link so that you will come to know form handling in angularjs: http://tutorials.jenkov.com/angularjs/forms.html
type: Answer
has comment: http://stackoverflow.com/comment/40766253
answers question: http://stackoverflow.com/q/26025130
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40767079

http://stackoverflow.com/a/25955234
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40635794
has body: Your question implies there is a way to do this, which is not true at least not at this time. As PM 77-1 said, a JavaScript function can return an array or an object with several properties, but not two separate values. Here's an example of both: var one, two; // Return two values using an array function foo(a, b) { return [a, b]; } // Return two values using a plain object function bar(a, b) { return { one: a, two: b }; } // Assign by index var testOne = foo(1, 2); one = testOne[0], two = testOne[1]; // Assign by properties var testTwo = bar(1, 2); one = testTwo.one, two = testTwo.two; I would also like to add this is a duplicate question, please see: Return multiple values in JavaScript?
answers question: http://stackoverflow.com/q/25955061
type: Answer
downvote count: 0

http://stackoverflow.com/comment/108590798
has text: With Safari, I get `cross-origin script load denied by cross-origin resource sharing policy`
comment on: http://stackoverflow.com/a/58152287
score: 4
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40530088
has text: @sansarp: Just making sure
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25895875

http://stackoverflow.com/a/25890837
has body: If you are looking for pure Js solution, then try this one function myFunction() { var elems= document.querySelectorAll('table tr td input'); for (var i = 0;i&lt;elems.length;i++) { debugger; alert(elems[i].id); } } http://jsfiddle.net/ss7ykqyh/5/
score: 0
has comment: http://stackoverflow.com/comment/40549043
type: Answer
answers question: http://stackoverflow.com/q/25889319
has comment: http://stackoverflow.com/comment/40544262

http://stackoverflow.com/q/25951746
answer count: 1
has title: Dosen't show the right numbers
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25951786
type: Question
tagged with: javascript
has body: I have this code to a game that have like a linux console and I'm doing the command ping. When I want the code to display icpm_seq 0/1/2/3, it just shows icpm_seq 4. Code: function ping(IP){ for (var i = 0; i &lt;= 3; i++) { var start = new Date().getTime(); $.post("data_script/ping.php?IP=" + IP, function(data){ var newTime = new Date().getTime() - start; // 0: bad (isn't online) // 1: good (is online) // 2: bad hostname if(data == 0) { outputToConsole("Request timeout for icmp_seq " + i) } else { if(data == 1) { outputToConsole("64 bytes from " + IP + ": icmp_seq=" + i + " ttl=64 time: " + newTime + "ms"); } else { outputToConsole("ping: Cannot resolve hostname " + IP + ": unknown host") } } }); } }
score: 0

http://stackoverflow.com/q/25899639
upvote count: 1
type: Question
has body: I'm trying to use the cloudapp api with javascript, the problem is that the api is using Digest access authentication for authentication. I visited the app documentation but there is no examples or wrappers for javascript. I tried many things but here is my latest code: $.ajax({ headers: { "Accept": "application/json"}, type: "GET", url: "http://my.cl.ly/account", crossDomain: true, success:function(data, textStatus, request){ console.log(data); } }); All I'm getting with this code is Cross-origin resource sharing (CORS) problems and a 401 Unauthorized error. here is the response headers: Cache-Control no-cache Connection keep-alive Content-Type text/plain; charset=utf-8 Date Wed, 17 Sep 2014 20:15:26 GMT Transfer-Encoding chunked WWW-Authenticate Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTQxMDk4NDkyNjo4MmE4ZWU0ZDY4YWUwYTAyMjRjNzIzYWU2NzE5YTQyMQ==", opaque="9eb56ccb2e8b017ae42bdb4739690863" X-Request-Id b6bdbf12-f1d9-4769-a06d-216d5d7ae669 X-Runtime 0.008105 status 401 Unauthorized x-ua-compatible IE=Edge,chrome=1 So how can I use the WWW-Authenticate to authenticate and retrieve data? Also I tried adding xhrFields: { withCredentials: true } I got a promt, I filled it and now I'm getting 200 OK status but no response. All I need is to get this working and getting a return. Thanks.
score: 1
has title: Digest access authentication with javascript
tagged with: api
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26480677
favorite count: 0
linked to: http://stackoverflow.com/q/2384230
type: UnansweredQuestion
tagged with: authentication

http://stackoverflow.com/q/25877622
score: 0
has answer: http://stackoverflow.com/a/25882129
has title: dc.js bubble chart fails to display points
tagged with: d3.js
has body: I am trying to get a bubble chart working with crossfilter and dc.js. But I am having a problem getting my points to appear on my chart. I have built a JSFiddle here: http://jsfiddle.net/4asmb7h1/ var data = [ {date: "12/27/2012", label: "a1", x: 2, y: 190, bubble: 5}, {date: "12/28/2012", label: "a2", x: 2, y: 10, bubble: 5}, {date: "12/29/2012", label: "a3", x: 95, y: 300, bubble: 10} ]; var ndx = crossfilter(data); var parseDate = d3.time.format("%m/%d/%Y").parse; data.forEach(function(d) { d.date = parseDate(d.date); }); var dateDim = ndx.dimension(function(d) {return d.date;}); var xDim = ndx.dimension(function(d) {return d.x;}); var bubbleChart = dc.bubbleChart("#bubble-chart"); bubbleChart .dimension(dateDim) .group(xDim) .x(d3.scale.linear().domain([0, 100])) .y(d3.scale.linear().domain([0, 100])) .width(400) .height(400) .yAxisPadding(50) .xAxisPadding(50) .xAxisLabel('X') // (optional) render an axis label below the x axis .yAxisLabel('Y') // (optional) render a vertical axis lable left of the y axis .label(function (p) { return p.label; }) .renderLabel(true) .title(function (p) { return [ "x: " + p.x, "y: " + p.y, "Bubble: " + p.bubble, ] .join("\n"); }) .renderTitle(true) .renderHorizontalGridLines(true) // (optional) render horizontal grid lines, :default=false .renderVerticalGridLines(true) .maxBubbleRelativeSize(0.3) .keyAccessor(function (p) { return p.y; }) .valueAccessor(function (p) { return p.x; }) .radiusValueAccessor(function (p) { return p.bubble; }) ; The data is viewable via the data table at the bottom, so I know the data is being seen. My best guess at this point is that I am not implementing my groups or dimensions properly, but nothing I seem to try is working for me. Can anyone see what I am doing wrong here? I am looking for the points to be displayed as data.x, data.y with a bubble size of data.bubble. EDIT: updated the question to include more setup JS. (All code is on my fiddle)
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40542833
accepted answer: http://stackoverflow.com/a/25882129
has comment: http://stackoverflow.com/comment/40505070
tagged with: dc.js
type: Question
tagged with: crossfilter
has comment: http://stackoverflow.com/comment/40521088
answer count: 1
tagged with: bubble-chart
tagged with: javascript
has comment: http://stackoverflow.com/comment/40537737
has comment: http://stackoverflow.com/comment/40527324

http://stackoverflow.com/q/25968922
linked to: http://stackoverflow.com/q/6505033
has body: Go to your browser's JS console and try these: -14 // -14 -014 // -12 -24 // -24 -024 // -20 -0024 // -20 012 // 10 Why is this 0-integer construct giving me results that are 2 smaller in absolute value?
tagged with: types
answer count: 1
has title: 0 + integer is weird in JS
duplicate of: http://stackoverflow.com/q/6505033
favorite count: 0
has comment: http://stackoverflow.com/comment/40661224
accepted answer: http://stackoverflow.com/a/25968979
score: 2
type: AnsweredQuestion
tagged with: numbers
upvote count: 3
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25968979

http://stackoverflow.com/comment/40790088
comment on: http://stackoverflow.com/q/25973173
type: QuestionComment
type: Comment
has text: Coffeescript. Interesting.
score: 0

http://stackoverflow.com/comment/40542014
has text: Yes, Show your existing code. most DOM elements aren't draggable by default.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25902444

http://stackoverflow.com/comment/40616490
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25943217
has text: Side note: Unless it's possible you'll have an `id="calc-benefits-right-wrapper"` element that *isn't* a `div` sometimes and you want this code to ignore it if so, the `div` in `$("div#calc-benefits-right-wrapper")` is not only pointless, but significantly degrading the performance of that line of code. If it's a one-off, it's harmless, but in general qualifying `id` selectors is an anti-pattern barring very specific (and unusual) use cases.
type: Comment

http://stackoverflow.com/comment/40758333
has text: Ok, I've inserted it into my cadastro.html, but what I insert in php to call this var?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26020599

http://stackoverflow.com/q/25895756
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25896076
has comment: http://stackoverflow.com/comment/40529869
tagged with: javascript
has answer: http://stackoverflow.com/a/25895932
has body: I'm curious, becouse i thought that Object.prototype.toString.call(null) return [object Object], but now i was checking that in Chrome and FF and both returned [object Null]. Now the question is, wether i can assume that Object.prototype.toString will always tell me the good type? Until now, i was checking every type with this method, but not for null values, i was checking null values by obj === null; Thanks! Note for clarification: this 'problem' is not a serious case, since atm i'm using function isNull(obj) { return obj === null; } function isUndefined(obj) { return typeof obj === 'undefined'; } which works just fine, but if Object.prototype.toString.call() would work sufficient in older browsers, i could drop these two functions and extend my solution with null and undefined like: var types = ['Object', 'Number', 'String', 'Array', 'Function', 'Date', 'RegExp', 'Boolean', 'Error', 'Null', 'Undefined'].reduce(function(prev, type) { prev['[object ' + type + ']'] = type.toLowerCase(); return prev; }, {}); function isType(type) { return function(obj) { return getType(obj) === type; }; } function getType(obj) { return types[Object.prototype.toString.call(obj)]; } var isNull = isType('null'); document.querySelector('#console').textContent = isNull(null); &lt;div id='console'&gt;&lt;/div&gt;
favorite count: 0
upvote count: 8
has comment: http://stackoverflow.com/comment/40530316
has comment: http://stackoverflow.com/comment/40530205
has comment: http://stackoverflow.com/comment/40529786
score: 8
has comment: http://stackoverflow.com/comment/40529665
has comment: http://stackoverflow.com/comment/40529889
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40529821
type: Question
has title: Since when does null.toString() return [object Null]?
has comment: http://stackoverflow.com/comment/40529676
has comment: http://stackoverflow.com/comment/40529778
has comment: http://stackoverflow.com/comment/40530262

http://stackoverflow.com/q/25962933
tagged with: jquery-selectors
has answer: http://stackoverflow.com/a/25963600
type: UnansweredQuestion
has title: Select only text visible on webpage, from DOM parent element
score: 0
has comment: http://stackoverflow.com/comment/40650902
has comment: http://stackoverflow.com/comment/40651316
has body: Inside a content script of my work-in-progress Firefox add-on, I have a variable named element containing the reference toward a generic DOM element. This element may contain children or grandchildren, which in turn may contain text nodes visible on the rendered webpage. My goal is to extract all the visible text contained in this DOM element. Internet Explorer has the innerText method, which does exactly what I need but, unfortunately, that is not a standard method and does not work/exist outside of IE. Firefox comes with a similar textContent property which closely imitates innerText, but fails to filter off invisible text contained within tags such as &lt;script&gt; and &lt;style&gt;. Looking for a jQuery solution, I believe I'm close to find one; I've come to: text = $(element).filter(":visible").text(); This statement correctly extracts the text contained in all the children of element, but invisible text from &lt;script&gt; tags is not filtered off. Googling around, I couldn't find any reference solution to the problem.
type: Question
answer count: 2
tagged with: firefox
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25992546
tagged with: firefox-addon

http://stackoverflow.com/q/25958946
has body: I am requesting three urls in AngularJs by Using JSONP. For the first time i am getting the values. But after second call i am not getting any value. When i see the console i found this error. Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them What is this error meant by? Here is my sample code. appPortal.controller('HistoCtrl', ['$rootScope', '$scope', '$http', '$location', function($rootScope, $scope, $http, $location) { console.log($rootScope); $scope.url1 = ''; $scope.url2 = ''; $scope.url3 = ''; //request handler $scope.sendDataRequest = function() { $http.jsonp($scope.url1).then(function(msg) { console.log(msg.data); }); $http.jsonp($scope.url2).then(function(msg) { console.log(msg.data); }); $http.jsonp($scope.url3).then(function(msg) { console.log(msg.data); }); }; //get current month data $scope.getCurrentMonthData = function() { $scope.url1 = $rootScope.ApiWeatherHost + '/climo/v1/actuals/' + $scope.location_key + '?callback=JSON_CALLBACK&amp;start=' + $scope.start + '&amp;end=' + $scope.end + '&amp;apikey=' + $rootScope.ApiKey; $scope.url2 = $rootScope.ApiWeatherHost + '/climo/v1/records/' + $scope.location_key + '?callback=JSON_CALLBACK&amp;start=' + $scope.start + '&amp;end=' + $scope.end + '&amp;apikey=' + $rootScope.ApiKey; $scope.url3 = $rootScope.ApiWeatherHost + '/climo/v1/normals/' + $scope.location_key + '?callback=JSON_CALLBACK&amp;start=' + $scope.start + '&amp;end=' + $scope.end + '&amp;apikey=' + $rootScope.ApiKey; $scope.sendDataRequest(); }; } ]); I am try to get these rest API Using the Jsonp http://api.accuweather.com/developers/climoAPIguide
upvote count: 1
linked to: http://stackoverflow.com/q/13267285
has comment: http://stackoverflow.com/comment/40760099
has comment: http://stackoverflow.com/comment/40642544
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40669634
has comment: http://stackoverflow.com/comment/40643074
has comment: http://stackoverflow.com/comment/40645017
score: 1
favorite count: 0
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: JSONP Request is not getting the result in Angular JS

http://stackoverflow.com/comment/40526746
score: 0
type: Comment
has text: Well I'm still trying to determine if the the former but I think its the latter.
comment on: http://stackoverflow.com/q/25893447
type: QuestionComment

http://stackoverflow.com/q/25917425
answer count: 2
has title: Updating a global variable from a function
tagged with: function
has comment: http://stackoverflow.com/comment/40569308
tagged with: variables
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25917512
has body: There is a global variable called numbers. Function one calculates a random number and stores it in mynumber variable. var mynumber; function one (){ var mynumber = Math.floor(Math.random() * 6) + 1; } I need to use it in a separate function as belows. But an error says undefined - that means the value from function one is not updated. function two (){ alert(mynumber); } How to overcome this problem. Is there a way to update the mynumber global variable.
accepted answer: http://stackoverflow.com/a/25917522
type: Question
has answer: http://stackoverflow.com/a/25917522
tagged with: javascript
tagged with: scope
has answer: http://stackoverflow.com/a/25917512
score: 0

http://stackoverflow.com/comment/40679054
comment on: http://stackoverflow.com/a/25959881
score: 0
type: AnswerComment
has text: No problem! Just FYI, reset() - the method - is for forms and resetting them to their default state (i.e., clearing out the form fields). I do not believe it would work on a div. My sense is that you want either the text('')/html('') methods, which will replace the existing content or append('') which will add content to the div. You may just need to rebuild the div's content in your controller/.js.erb and then render it anew (i.e., with the text() or html() methods).
type: Comment

http://stackoverflow.com/comment/40777988
score: 0
type: Comment
type: AnswerComment
has text: AppCache should *only* be used for application resource. Here images are app data, should stored in database.
comment on: http://stackoverflow.com/a/26030760

http://stackoverflow.com/comment/40534187
score: 0
type: AnswerComment
type: Comment
has text: this is because when radio is disabled you click event will not fire again. In this case you need to convert radio inputs to checkboxes. Change it carefully, you have to edit js also.
comment on: http://stackoverflow.com/a/25896154

http://stackoverflow.com/comment/40590976
type: QuestionComment
has text: I'm doing this to disable gzip compression in browser.
comment on: http://stackoverflow.com/q/25928825
score: 0
type: Comment

http://stackoverflow.com/comment/40572436
score: 0
type: QuestionComment
type: Comment
has text: Just found out that the captions of individual photos in a Tumblr Photoset are actually considered alt (alt='The caption of the photo'). I am guessing that all I have to do is to replace "title" with "alt" somewhere in Magnific Popup's code. Do you happen to know where?
comment on: http://stackoverflow.com/q/25888699

http://stackoverflow.com/a/26024551
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/26024120
type: Answer
downvote count: 1
has body: Update the progress bar using setTimeout method. it will wait for some time and then update the width of progressbar. myVar = setTimeout("javascript function",milliseconds); Thanks, Ganesh Shirsat

http://stackoverflow.com/q/25918876
has comment: http://stackoverflow.com/comment/40572806
accepted answer: http://stackoverflow.com/a/25919251
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40573420
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40572249
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/25919347
has comment: http://stackoverflow.com/comment/40572627
has answer: http://stackoverflow.com/a/25919251
has answer: http://stackoverflow.com/a/25919347
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40572662
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40572516
has body: I'm trying to make a game with jquery where bullets are appended using a function. So far bullets are generating whenever I press spacebar but I want to generate bullets like 3-5 stacks. 3-5 bullets will be generated and then a short break then again 3-5 bullets will be generated and the process continues. Bullets are appended as div element. Here are the codes, function generateBullet() { var Player = $('#player'); var PlayerLeft = Player.offset().left; var PlayerTop = Player.offset().top - 50; var appendingValue = "&lt;div class='bulletID' style=' position: absolute; left: 250px; top: 250px;'&gt;&lt;/div&gt;"; var appendSize = $('.bulletID').size(); if (appendSize &gt;= 3) { $('#content').delay(5000).append(appendingValue); } else { $('#content').append(appendingValue); } } function animateBullet() { var bulletID = $('.bulletID'); bulletID.each(function () { var nowTop = $(this).offset().top; $(this).css("top", nowTop - 25); }); } var keys = {} $(document).keydown(function (e) { keys[e.keyCode] = true; }); $(document).keyup(function (e) { delete keys[e.keyCode]; }); function shoot() { var Player = $('#player'); for (var direction in keys) { if (!keys.hasOwnProperty(direction)) continue; if (direction == 32) { generateBullet(); } } } JSFIDDLE DEMO : http://jsfiddle.net/ygz5wo7r/1/ I'm not getting any more idea how to do this. Your help will be really appreciated. TnQ.
has title: generating a number of divs at a time in jQuery
score: 1

http://stackoverflow.com/a/26097713
accepted answer of: http://stackoverflow.com/q/26018756
upvote count: 94
has body: I solved myself this and I put the answer in scope to help other user that have same problem: We have an event in bootstrap and we can use that event to set overflow: inherit but this will work if you don't have the css property on your parent container. $('.table-responsive').on('show.bs.dropdown', function () { $('.table-responsive').css( "overflow", "inherit" ); }); $('.table-responsive').on('hide.bs.dropdown', function () { $('.table-responsive').css( "overflow", "auto" ); }) and this is the fiddle info: In this fiddle example works strange and I'm not sure why but in my project works just fine.
has comment: http://stackoverflow.com/comment/73839393
score: 87
has comment: http://stackoverflow.com/comment/44452820
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/86834541
has comment: http://stackoverflow.com/comment/57421700
type: Answer
downvote count: 7
answers question: http://stackoverflow.com/q/26018756

http://stackoverflow.com/a/28258233
answers question: http://stackoverflow.com/q/25941848
has body: I don't think @wiherek's answer will work in general because it doesn't give any way to guarantee that the Auth service is ready by the time that the $routeChangeStart handler is called. What you can rely on though is that if any of the items in the route's resolve parameter return promises, then either: The promise will be resolved before the the route change happens, or The promise will be rejected before $rootScope.$routeChangeStart is broadcast. So in your route definition you could so something like this: $routeProvider.when('/participant/login', { resolve: { auth: function(Auth, $q) { var deferred = $q.defer(); Auth.isLoggedInAsync(function(loggedIn) { if (loggedIn) { deferred.resolve(); } else { deferred.reject({alreadyLoggedIn: true}); } }).catch(function() { deferred.reject(); }); return deferred.promise; } } ); And you could catch it by listening for $routeChangeError: app.run(function($rootScope, $location, Auth) { $rootScope.$on("$routeChangeError", function(event, current, previous, rejection) { if (rejection != null &amp;&amp; rejection.alreadyLoggedIn) { // We should get here if and only if // `deferred.reject({alreadyLoggedIn: true})` was called from the // above. } }); });
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40558248
has text: There are no classes in javascript. All native functions are constructors, so if the function exists, then so does the "class".
score: 1
comment on: http://stackoverflow.com/q/25911630
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40790031
has text: That is already in there. No matter what I change the number to, it still doesnt change.
comment on: http://stackoverflow.com/a/26028663
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25886426
downvote count: 1
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25886319
has body: Remove the space before the string Stat, > var str = 'Coldwater'; undefined > console.log(/Stat=5&item=(\d.*)">(.*)<\/a><\/b>/gi.exec(str)[0]); Stat=5&item=10739">Coldwater > console.log(/Stat=5&item=(\d.*)">(.*)<\/a><\/b>/gi.exec(str)[1]); 10739 > console.log(/Stat=5&item=(\d.*)">(.*)<\/a><\/b>/gi.exec(str)[2]); Coldwater
upvote count: 2

http://stackoverflow.com/a/25896887
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25885388
has body: Sure, you can use the resizing version of context.drawImage as you've done--your code should resize the image assuming your drawImage parameters are valid). But...The security error are likely a result of attempting to draw a cross-domain image onto canvas. Cross-domain draws will taint the canvas and prevent canvas.toDataURL from occurring. You can upload a cross-domain image if it's headers allow anonymous access and you also specify in javascript that the image allows anonymous access. You can read about enabling cross-domain transfers here: http://enable-cors.org/ Here is an example using FileReader to let the user drag an image into a dropzone. The image will be scaled 2X and added as a new image on the webpage. // dropzone event handlers var dropzone; dropzone = document.getElementById("dropzone"); dropzone.addEventListener("dragenter", dragenter, false); dropzone.addEventListener("dragover", dragover, false); dropzone.addEventListener("drop", drop, false); // function dragenter(e) { e.stopPropagation(); e.preventDefault(); } // function dragover(e) { e.stopPropagation(); e.preventDefault(); } // function drop(e) { e.stopPropagation(); e.preventDefault(); var dt = e.dataTransfer; var files = dt.files; handleFiles(files); } // function handleFiles(files) { for (var i = 0; i < files.length; i++) { // get the next file that the user selected var file = files[i]; var imageType = /image.*/; // don't try to process non-images if (!file.type.match(imageType)) { continue; } // a seed img element for the FileReader var img = document.createElement("img"); img.classList.add("obj"); img.file = file; // get an image file from the user // this uses drag/drop, but you could substitute file-browsing var reader=new FileReader(); reader.onload=(function(aImg){ return function(e) { aImg.onload=function(){ // draw the aImg onto the canvas var canvas=document.createElement("canvas"); var ctx=canvas.getContext("2d"); canvas.width=aImg.width*2; canvas.height=aImg.height*2; ctx.draw…

http://stackoverflow.com/comment/40778315
type: QuestionComment
has text: my bad, i misspel it here
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26032973

http://stackoverflow.com/q/25898382
answer count: 1
tagged with: throw
favorite count: 0
has answer: http://stackoverflow.com/a/25898437
has comment: http://stackoverflow.com/comment/40534457
type: AnsweredQuestion
downvote count: 2
has title: What is the point of "throw"?
type: Question
tagged with: debugging
has body: I ask because whenever I throw an error, it makes the console exit immediately and I can't tell whether one of my exceptions was thrown or it was some other runtime error. Is this some kind of setting I have for my cmd console where it exits on an exception and it can be changed? Or is this just how it is? If so what's the point of "throw" then? EDIT: For the curious, I was using throws like this... which I see now is not in line with their intended use: if (array.length !== 28) throw 'replacedData.txt in mls_num_' + index + ' FAILED: has ' + array.length + ' values instead of 27'
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25898437
has comment: http://stackoverflow.com/comment/40534426
has comment: http://stackoverflow.com/comment/40534466
upvote count: 0

http://stackoverflow.com/comment/40770619
type: QuestionComment
comment on: http://stackoverflow.com/q/26028856
type: Comment
score: 0
has text: Because there is a script error caused by an invalid closure. Check the brackets after `else if` which is incorrect and the "success" callback is missing a `:`

http://stackoverflow.com/comment/40513908
type: Comment
has text: Yes, the 3 and 4 number of the serial n° refers to a full name model. Ex : Serial n° : 14020001 where "02" refers to Model : TMSA4-NET LV.
comment on: http://stackoverflow.com/a/25886922
type: AnswerComment
score: 0

http://stackoverflow.com/a/70883212
has comment: http://stackoverflow.com/comment/128722356
has body: Macro tasks include keyboard events, mouse events, timer events (setTimeout) , network events, Html parsing, changing Urletc. A macro task represents some discrete and independent work. micro task queue has higher priority so macro task will wait for all the micro tasks are executed first. Microtasks, are smaller tasks that update the application state and should be executed before the browser continues with other assignments such as re-rendering the UI. Microtasks include promise callbacks and DOM mutation changes. Microtasks enable us to execute certain actions before the UI is re-rendered, thereby avoiding unnecessary UI rendering that might show an inconsistent application state. Separation of macro and microtask enables the event loop to prioritize types of tasks; for example, giving priority to performance-sensitive tasks. In a single loop iteration, one macro task at most is processed (others are left waiting in the queue), whereas all microtasks are processed. Both task queues are placed outside the event loop, to indicate that the act of adding tasks to their matching queues happens outside the event loop. Otherwise, any events that occur while JavaScript code is being executed would be ignored. The acts of detecting and adding tasks are done separately from the event loop. Both types of tasks are executed one at a time. When a task starts executing, it’s executed to its completion. Only the browser can stop the execution of a task; for example, if the task takes up too much time or memory. All microtasks should be executed before the next rendering because their goal is to update the application state before rendering occurs. The browser usually tries to render the page 60 times per second, It's accepted that 60 frames per second are the rate at which animations will appear smooth. if we want to achieve smooth-running applications, a single task, and all microtasks generated by that task should ideally complete within 16 ms. If a task gets executed for mor…
answers question: http://stackoverflow.com/q/25915634
upvote count: 14
type: Answer
score: 14
downvote count: 0

http://stackoverflow.com/comment/40739890
comment on: http://stackoverflow.com/q/26012224
type: Comment
has text: http://en.wikipedia.org/wiki/Point_in_polygon ; https://github.com/maxogden/geojson-js-utils; EDIT: even better, https://github.com/isterin/geo-utils (works on lat/lon)
type: QuestionComment
score: 0

http://stackoverflow.com/q/25882474
has answer: http://stackoverflow.com/a/26022812
downvote count: 1
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
has body: Hi i am working on a firefox extension which render the google search page (Such I want put some ads on the right side of search result ) it can be achieved by pagemod but page must be reloaded for apply the rules myscript.js var eElement=document.getElementById("rhs"); //self.port.emit("find","samsung"); var newFirstElement= document.createElement("div"); newFirstElement.setAttribute("style","height:400px;border: 3px solid #F0f0f0"); newFirstElement.innerHTML="Put aids here"; eElement.insertBefore(newFirstElement, eElement.firstChild); main.js var data = require("sdk/self").data; var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*.google.co.in", contentScriptFile: data.url("myscript.js"), attachTo: [ "existing","top"] }); How can I achieve this without page relaod. as i think when search on google page the url is not reloaded. please help..
has title: rendor google page using addon sdk page mod
tagged with: firefox-addon
tagged with: firefox-addon-sdk
favorite count: 0
score: -1
type: Question
answer count: 1

http://stackoverflow.com/comment/40622301
has text: sorry i didnot ask for that
comment on: http://stackoverflow.com/a/25946962
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40536073
type: AnswerComment
type: Comment
score: 1
has text: Then you might have a plugin installed which hides broken images. Does `http://my.pic/test/rg/pict.png` shows an image when you put it directly in the location bar ?
comment on: http://stackoverflow.com/a/25898268

http://stackoverflow.com/a/25968333
type: Answer
downvote count: 0
score: 1
has body: You missed the closing quotes (after no-repeat " is missing) in below script, add it and try $(document).ready(function(){ setTimeout(function(){ $('html').css({"background":"url(include-uploads/backgrounds/ironman2.jpg) no-repeat"}); }, 5000); }); and in second try, you have given all attribute values for background attribute only. every css attribute should be assigned separately. $(document).ready(function(){ setTimeout(function(){ $('html').css({"background":"url(include-uploads/backgrounds/ironman2.jpg) no-repeat"}); $('html').css({"-webkit-background-size":"cover"}); $('html').css({"-moz-background-size":"cover"}); $('html').css({"-o-background-size":"cover"}); $('html').css({"background-size":"cover"}); }, 5000); });
answers question: http://stackoverflow.com/q/25968217
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25968217

video
tags question: http://stackoverflow.com/q/25878834
type: Tag
tags question: http://stackoverflow.com/q/26007115
tags question: http://stackoverflow.com/q/26001737
tags question: http://stackoverflow.com/q/25992843
tags question: http://stackoverflow.com/q/26024497
tags question: http://stackoverflow.com/q/25881991
tags question: http://stackoverflow.com/q/25962612
tags question: http://stackoverflow.com/q/25876544
tags question: http://stackoverflow.com/q/25949992
tags question: http://stackoverflow.com/q/26011869
tags question: http://stackoverflow.com/q/26008183
tag name: video
tags question: http://stackoverflow.com/q/25917737
tags question: http://stackoverflow.com/q/25894446

http://stackoverflow.com/comment/97562400
comment on: http://stackoverflow.com/a/55364092
type: Comment
has text: it's worth noting that in these demos, they may not look "identical" because debounce will always fire X milliseconds after the last event, while throttle's last call may happen sooner (and it doesn't need to be called again when debounce would normally fire). it's pretty inconsequential, but worth mentioning if you look at the demos.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40758865
comment on: http://stackoverflow.com/q/26022470
has text: can anyone fix the code above for three dependable drop down menus? or is there a web link you can send me towards to help get that more valid?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40648570
type: Comment
comment on: http://stackoverflow.com/a/25962074
score: 0
type: AnswerComment
has text: edited the fiddle ... I believe it is working as intended now ... check it!

http://stackoverflow.com/a/25986461
has comment: http://stackoverflow.com/comment/40693592
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: Yes, you can just define it this way: function Person() { // constructor initialization code here } // define static method Person.sayHi = function() { console.log("hi"); } var bob = new Person(); Person.sayHi(); // works any time even before creating a Person object bob.sayHi(); // undefined method A function is an object that can have it's own properties (a method is just a property that happens to be a function). Because those properties are not on the prototype, they will not be given to objects created from the Person constructor, but will be available from the Person constructor function object itself. These are essentially what other languages call static methods as they are not associated with any instance.
answers question: http://stackoverflow.com/q/25986108
has comment: http://stackoverflow.com/comment/40693655

http://stackoverflow.com/a/25930658
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40596929
score: 2
answers question: http://stackoverflow.com/q/25930417
has body: Since it's javascript you can try this var str = "You should match this string that starts with"; var res = str.match(/^You should match.*/); alert(res);
upvote count: 2

http://stackoverflow.com/comment/40773076
comment on: http://stackoverflow.com/q/26030172
score: 0
type: QuestionComment
type: Comment
has text: Where is your code for the slider? https://github.com/piotrkrosniak

http://stackoverflow.com/comment/40660094
has text: `appendChild()` returns the newly-created element, hence `warning = ...`
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25968262

http://stackoverflow.com/q/25983802
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 0
tagged with: java
has body: I've tested the connection in google chrome browser, its connecting and disconnecting ok, but why firefox is not closing the connection after it is closed? I've tried to add this part of code: $(window).on('beforeunload', function(){ ws.close(); }); but it didn't helped, are there any other hacks to solve this? also I've tried in the server side to put this: byte d = bytes[0]; //first byte if(d == 0x8) { System.out.println("DISCONNECT"); } but not helped, any other hacks?
type: Question
score: 3
tagged with: javascript
upvote count: 3
tagged with: websocket
tagged with: jquery
has title: Firefox Websocket connection not closing after the tab or browser is closed
favorite count: 0

http://stackoverflow.com/comment/40732207
comment on: http://stackoverflow.com/a/26007477
type: AnswerComment
type: Comment
score: 0
has text: so If i understand correctly, here Promise1 takes 3 arguments, and returning promise RegDevice is within the success callback (placed within the first arugment)

http://stackoverflow.com/q/25914076
linked to: http://stackoverflow.com/q/830618
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/25914302
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40562637
linked to: http://stackoverflow.com/q/10463025
has body: I could see some piece of code for while am searching for infinity scroll. In the below piece of code am not able get a line of code. var lazyload = lazyload || {}; var lazyload = lazyload || {}; (function($, lazyload) { "use strict"; var page = 2, buttonId = "#button-more", loadingId = "#loading-div", container = "#data-container"; lazyload.load = function() { alert("Invoked"); var url = "./" + page + ".html"; $(buttonId).hide(); $(loadingId).show(); $.ajax({ url: url, success: function(response) { if (!response || response.trim() == "NONE") { $(buttonId).fadeOut(); $(loadingId).text("No more entries to load!"); return; } appendContests(response); }, error: function(response) { $(loadingId).text("Sorry, there was some error with the request. Please refresh the page."); } }); }; var appendContests = function(response) { //var id = $(buttonId); $(buttonId).show(); $(loadingId).hide(); $(response).appendTo($(container)); page += 1; }; })(jQuery, lazyload);
type: Question
duplicate of: http://stackoverflow.com/q/830618
has comment: http://stackoverflow.com/comment/40562612
tagged with: javascript
score: -7
has answer: http://stackoverflow.com/a/25914128
has title: What is the use [] or {} while declaring a variable?
answer count: 3
has comment: http://stackoverflow.com/comment/40562660
downvote count: 7
has answer: http://stackoverflow.com/a/25914174

http://stackoverflow.com/q/25881515
answer count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
tagged with: keyword-search
has title: Matching multiple keywords in a text (Javascript)
has comment: http://stackoverflow.com/comment/40504471
downvote count: 0
score: 1
tagged with: match
type: Question
has answer: http://stackoverflow.com/a/25881579
tagged with: matching
has body: Here is my code: // Matching multiple keywords in a text // Case 1 var text = "Hello, My name is @Steve, I love @Bill, happy new year!"; var keywords = ["steve"]; var matching = text.toLowerCase().search([keywords]); console.log(matching); // return 19 // Case 2 var text = "Hello, My name is @Steve, I love @Bill, happy new year!"; var keywords = ["bill"]; var matching = text.toLowerCase().search([keywords]); console.log(matching); // return 34 // Case 3 var text = "Hello, My name is @Steve, I love @Bill, happy new year!"; var keywords = ["steve, bill"]; var matching = text.toLowerCase().search([keywords]); console.log(matching); // return -1 // Case 4 var text = "Hello, My name is @Steve, I love @Bill, happy new year!"; var keywords = ["steve", "bill"]; var matching = text.toLowerCase().search([keywords]); console.log(matching); // return -1 If there something I missed out to make Case 3 and Case 4 return positive? I just want if the text is either matching with one of the keywords, it will return positive. But not working at this moment. Helps needed. Thanks. Thanks.
upvote count: 1
has comment: http://stackoverflow.com/comment/40504418
tagged with: arrays

http://stackoverflow.com/comment/40663748
has text: Do I just change the script in script.js or add this to the child?
type: AnswerComment
comment on: http://stackoverflow.com/a/25970311
type: Comment
score: 0

http://stackoverflow.com/q/25878471
type: Question
has comment: http://stackoverflow.com/comment/43454382
tagged with: javascript
has body: Update: Revised JSON and added code sample to show the Nodes at a size based on the interest data but I still cannot get the "stroke-width" to work. Any help appreciated. I would like to use d3.js to build a dendrogram describing the distribution/transfer of real property interest over time and I need some help. My initial concept: Space nodes of a dendrogram along a relative timeline defined by the data to give context for when a particular transfer occurred. Scale the width of each connecting path according to the amount of normalized interest traveling to the receiving node (Like the paths in Sankey diagrams) to provide a context for the magnitude of the transfer. This would be useful for visualizing the distribution of interest of real property, or similar, through sale, heirship, etc. I appreciate any helpful tips or suggestions. Thank you for considering my question. Example: Example Image Example Data: data = { "name": "Root", "date": 1950, "interest": 1.0, "children": [ { "name": "Anne", "date": 1970, "interest": 0.5, "children": [ { "name": "Charles", "date": 1988, "interest": 0.25, "children": [ { "name": "Frank", "date": 2010, "interest": 0.125, "children": [] }, { "name": "Gina", "date": 2010, "interest": 0.125, "children": [] } ] }, { "name": "Diane", "date": 1995, "interest": 0.25, "children": [ { "name": "Harley", "date": 2015, "interest": 0.25, "children": [] } ] } ] }, { "name": "Ben", "date": 1970, "interest": 0.5, "children": [ { "name": "Erin", "date": 1970, "interest": 0.5, "children": [ { "name": "Ingrid", "date": 1970, "interest": 0.16665, "children": [] }, { "name": "Jack", "date": 1970, "interest": 0.16665, "children": [] }, { "name": "Kelsey", "date": 1970, "interest": 0.16665, "children": [] } ] } ] } ] } Sample tree (modified from this source: http://www.meccanismocomplesso.org/en/dendrogramma-d3-parte2/) &lt;!doctype html&gt;&lt;/html&gt; &lt;meta charset="utf-8" /&gt; &lt;style&gt; .node circle { fill: #fff; stroke: steelblue; stroke-wi…
downvote count: 0
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: visualize transfer of interest over time in d3.js
tagged with: tree
score: 3
answer count: 0
upvote count: 3

http://stackoverflow.com/q/26003623
has title: indexedDB correct usage
has body: I'm experimenting with indexedDB. Now everything is like asynchronous and that hurts my brain a lot. I created an object like this: var application = {}; application.indexedDB = {}; application.indexedDB.db = null; application.indexedDB.open = function() { var dbName = "application"; var dbVersion = 1; var openRequest = indexedDB.open(dbName, dbVersion); openRequest.onupgradeneeded = function(e) { console.log("Upgrading your DB (" + dbName + ", v" + dbVersion + ")..."); var thisDB = e.target.result; if (!thisDB.objectStoreNames.contains("journal")) { thisDB.createObjectStore( "journal", {keyPath: "id"} ); } } openRequest.onsuccess = function(e) { console.log("Opened DB (" + dbName + ", v" + dbVersion + ")"); application.indexedDB.db = e.target.result; } openRequest.onerror = function(e) { console.log("Error"); console.dir(e); } }; Now I am able to open the dbconnection with application.indexedDB.open(). Now I added another function to my Object: application.indexedDB.addItemToTable = function(item, table) { var transaction = application.indexedDB.db.transaction([table], "readwrite"); var store = transaction.objectStore(table); //Perform the add var request = store.add(item); request.onerror = function(e) { console.log("Error", e.target.error.name); //some type of error handler } request.onsuccess = function(e) { console.log("Woot! Did it"); } }; My instruction-sequence extended like this: application.indexedDB.open() application.indexedDB.addItemToTable(item, "journal") But this doesn't work. Because the open-Instruction is asynchronous the application.indexedDB.dbis not yet available when i call it in the addItemToTable-Function. How does a Javascript-Developer solve this? I was following this tutorial here: http://code.tutsplus.com/tutorials/working-with-indexeddb--net-34673 and now I have some problems with those examples. For example he creates the HTML-Output directly in the "onsuccess"-Part (in the "Read More Data" Section) . In my eyes this is bad coding beca…
has comment: http://stackoverflow.com/comment/40724899
tagged with: indexeddb
has answer: http://stackoverflow.com/a/26019084
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40724815
score: 0
has comment: http://stackoverflow.com/comment/41015229
has answer: http://stackoverflow.com/a/26006072
has comment: http://stackoverflow.com/comment/40725494
type: UnansweredQuestion

http://stackoverflow.com/comment/40722962
comment on: http://stackoverflow.com/q/25986391
score: 0
type: Comment
type: QuestionComment
has text: @Sam you could provide it as an answer.

http://stackoverflow.com/q/26023488
answer count: 2
has answer: http://stackoverflow.com/a/26023545
tagged with: angular-filters
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26023574
has body: I am writing a custom filter to replace the value of zero with ' - ' for display purposes. However, if it is not zero, it should return input but filtered as currency. When I tried that, I get an unexpected token error. angular.module('app') .filter('displaynullcurrency', function(){ return function(input){ if(!input){ return ' - '; } if(parseFloat(input) != 0){ return; } return ' - '; }; });
type: AnsweredQuestion
downvote count: 0
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/26023545
has comment: http://stackoverflow.com/comment/40760608
has answer: http://stackoverflow.com/a/26023574
tagged with: javascript
has title: AngularJS: Applying Currency Filter to return value of custom filter
upvote count: 3

function
tags question: http://stackoverflow.com/q/26028993
tag name: function
tags question: http://stackoverflow.com/q/26027861
tags question: http://stackoverflow.com/q/26021933
tags question: http://stackoverflow.com/q/25888478
tags question: http://stackoverflow.com/q/25998632
tags question: http://stackoverflow.com/q/25924220
tags question: http://stackoverflow.com/q/25955718
tags question: http://stackoverflow.com/q/25995737
tags question: http://stackoverflow.com/q/25921175
tags question: http://stackoverflow.com/q/25880139
tags question: http://stackoverflow.com/q/25927991
tags question: http://stackoverflow.com/q/25970531
tags question: http://stackoverflow.com/q/25917006
tags question: http://stackoverflow.com/q/25917425
tags question: http://stackoverflow.com/q/26024612
tags question: http://stackoverflow.com/q/25942017
tags question: http://stackoverflow.com/q/25981050
tags question: http://stackoverflow.com/q/26006811
tags question: http://stackoverflow.com/q/25876746
tags question: http://stackoverflow.com/q/25883250
tags question: http://stackoverflow.com/q/26009718
tags question: http://stackoverflow.com/q/25992099
tags question: http://stackoverflow.com/q/26028074
type: Tag
tags question: http://stackoverflow.com/q/25917220
tags question: http://stackoverflow.com/q/25997327
tags question: http://stackoverflow.com/q/25941635
tags question: http://stackoverflow.com/q/26008108
tags question: http://stackoverflow.com/q/25959156
tags question: http://stackoverflow.com/q/25988735
tags question: http://stackoverflow.com/q/25961689
tags question: http://stackoverflow.com/q/25992162
tags question: http://stackoverflow.com/q/25980414
tags question: http://stackoverflow.com/q/25998892
tags question: http://stackoverflow.com/q/25971195
tags question: http://stackoverflow.com/q/26002890
tags question: http://stackoverflow.com/q/25991076
tags question: http://stackoverflow.com/q/25939633

http://stackoverflow.com/q/25968240
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40660056
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: getting error: Cannot set property 'innerHTML' of null
has comment: http://stackoverflow.com/comment/40660266
type: Question
has comment: http://stackoverflow.com/comment/40660059
has comment: http://stackoverflow.com/comment/40660074
has body: i keep getting error said: Cannot set property 'innerHTML' of null. i try to change innerHTML ->innerText. still not working. what am i missing here??? function countdown(minutes) { var seconds = 60; var mins = minutes function tick() { var counter = document.getElementById("timer"); var current_minutes = mins-1; seconds--; counter.innerHTML = current_minutes.toString() + ":" + (seconds &lt; 10 ? "0" : "") + String(seconds); if( seconds &gt; 0 ) { setTimeout(tick, 1000); } else { if(mins &gt; 1){ // countdown(mins-1); never reach “00″ issue solved:Contributed by Victor Streithorst setTimeout(function () { countdown(mins - 1); }, 1000); } } } tick(); } countdown(3); html &lt;div id="timer"&gt;&lt;/div&gt;
has answer: http://stackoverflow.com/a/25968287
tagged with: javascript

http://stackoverflow.com/comment/40709425
type: AnswerComment
has text: @andrex the second string in your fiddle also includes another Unicode character (character 775, "combining dot above").
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25995538

http://stackoverflow.com/q/26006140
tagged with: javascript
has body: I have simple path like bellow. As I understand it should sticks to the top left corner of the canvas. But I'm having it rendered somewhere in the middle. And as result all paths I am rendering seem to be shifted from their original positions. Am I missing something very obvious? I'm using fabric.js for all canvas manipulations. Any clues are very appreciated. path1 = new fabric.Path('M 0 0 L 300 100 L 200 300 z');
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26006583
tagged with: http://stackoverflow.com/tag/svg
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26006583
score: 1
tagged with: fabricjs
tagged with: canvas
has title: SVG path position on canvas
downvote count: 0
answer count: 1

http://stackoverflow.com/q/25912328
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25912602
tagged with: css
type: UnansweredQuestion
has body: I want to create high chart graph . Here is FIDDLE LINK of My code. I am giving two values a and b . a for x-axis b for y-axis. Problem is that when i gave values of a and b . when the difference between a and b is less, then no graph appears i-e. a= -9 , b= -9 . Otherwise it works $(function () { var a, b, x, j; a = -9; b = -9; if (a &gt; b) { x = a; j = b } else { x = b; j = a } alert("X is " + x); alert("Y is" + j); $('#container').highcharts({ chart: { type: 'bar', backgroundColor: null }, credits: { enabled: false }, tooltip: { enabled: false, }, title: { text: '' }, xAxis: { categories: ["", "", ""], //minTickInterval:20000, }, yAxis: { min: j - (j * 5 / 100), max: x + (x * 5 / 100), //min: -50, //max: -50, //minTickInterval:20000, endOnTick: true, tickPixelInterval: 340, maxPadding: 0.25, title: { text: '' }, labels: { formatter: function () { if (j - (j * 5 / 100) &gt; 1000000) { return Highcharts.numberFormat((this.value) / 1000000, 0, '', ',') + 'M'; } else if (j - (j * 5 / 100) &gt; 1000) { return Highcharts.numberFormat((this.value) / 1000, 0, '', ',') + 'K'; } else { return Highcharts.numberFormat((this.value), 0, '', ','); } }, x: 6 } }, legend: { backgroundColor: '#FFFFFF', reversed: true }, plotOptions: { series: { stacking: 'normal' } }, series: [{ name: ' ', data: [a] }, { name: ' ', data: [0, b] }, ] }); });
type: Question
answer count: 1
tagged with: javascript
has title: Creating Highchart Graph with JavaScript

http://stackoverflow.com/q/26025739
has body: There is something wrong with my jQuery script. It kinda works, but when I try to toggle between the classes it works at first. the script changes classes just like it's supposed to. but when i try to do it again, I have to click the link and then somewhere else, and then it works again. I want to be able do repeat the whole procedure over and over without having to click two extra times. var clickOnSettings = true; $(".settings_link").click(function () { event.preventDefault(); if (clickOnSettings) { $("#coverup").toggleClass("cover1"); $("#settingani").toggleClass("settings1"); clickOnSettings = false; } }); $("#coverup").click(function () { if (!clickOnSettings) { $("#coverup").toggleClass("cover2"); $("#settingani").toggleClass("settings2"); clickOnSettings = true; } }); created a jsfiddle: http://jsfiddle.net/5dzt1v6f/13/
possible better answer: http://stackoverflow.com/a/26025856
has title: Something wrong with my toggleclass
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26026289
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26025833
tagged with: javascript
has answer: http://stackoverflow.com/a/26025856
accepted answer: http://stackoverflow.com/a/26025833
score: 0
answer count: 3

http://stackoverflow.com/comment/40649945
type: Comment
has text: @Shai Eilat It actually does return milliseconds, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Description
comment on: http://stackoverflow.com/a/25962794
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40502764
type: QuestionComment
has text: Thanks Egregory, I made a jsfiddle to show the issue I'm running into. See the bottom show more example: http://jsfiddle.net/yttf88zp/
comment on: http://stackoverflow.com/q/25879112
score: 0
type: Comment

http://stackoverflow.com/q/25985501
favorite count: 0
has body: I've been trying to get a simple implementation of the Slick Carousel working. I've followed the instructions at the Git page: https://github.com/kenwheeler/slick Here is my code. Can anyone see a problem? Does anyone have a simple working code sample for slick? My Now Amazing Webpage test1 test2 test3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25985585
type: UnansweredQuestion
upvote count: 5
type: Question
score: 5
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Slick Carousel Not Working

http://stackoverflow.com/a/25955487
type: Answer
has comment: http://stackoverflow.com/comment/40637579
has comment: http://stackoverflow.com/comment/40653241
has comment: http://stackoverflow.com/comment/40637081
has body: One thing I notice is that your AdType object is a property of Ads. The codes seem to work when I replace Ads.display() with Ads.mobile.display(). Also, to improve code readability, there is no need to repeat those $ symbol in your function argument. Take a look at this stack snippet, where I was able to append an tag to your AdType. function AdType(parentObj, adSlot) { this.parentObj = parentObj; this.adSlot = adSlot; } AdType.prototype.display = function() { this.parentObj.append('I got appended!'); }; AdType.prototype.remove = function() { this.$parentObj.empty(); }; var Ads = { mobile: new AdType($("#mobile-ad"), "555") }; Ads.mobile.display();
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25955086
score: 0
accepted answer of: http://stackoverflow.com/q/25955086
has comment: http://stackoverflow.com/comment/40638667

http://stackoverflow.com/comment/40723534
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26002890
has text: @Joe Even here, MDN does a better job.

http://stackoverflow.com/q/25908529
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: See http://plnkr.co/edit/hPyYUCBYvWguyNniCexk?p=preview for a basic example (the original solution is much more complex). The problem is that I cannot scroll the div inside iframe because main page has another div on top. Is there a nice way to fix this (ideally without handling javascript events)?
has answer: http://stackoverflow.com/a/25908622
score: 1
upvote count: 1
type: Question
tagged with: javascript
downvote count: 0
answer count: 1
has title: scrollbar inside iframe not working - zindex issue
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26014291
has answer: http://stackoverflow.com/a/26020339
tagged with: javascript
has answer: http://stackoverflow.com/a/42471765
answer count: 2
downvote count: 0
tagged with: ember-cli
favorite count: 0
has body: In my config/environment file, I'd like to include a Date object. Doing the following: module.exports = function(environment){ var ENV = { ... APP: { someDate = new Date(2014, 12, 25, 22, 0, 0, 0), .... } .... }; ... }; And accessing it via: import ENV from 'my-app/config/environment'; ... var isDate = ENV.APP.someDate instanceof Date; //false var isDateFromWin = window.MyAppENV.APP.someDate instanceof Date; //false Results pulled from config object are of type string, and not a date object. Are settings in the environments file always returned as strings? How can I return a date (or other POJO) from my config file? Additionally, the file seems to be ignoring my .jshintrc file, and am unable to access the window object as per Access window object in ember-cli environment
linked to: http://stackoverflow.com/q/25609303
type: UnansweredQuestion
tagged with: ember.js
score: 2
upvote count: 2
has title: Javascript objects in ember-cli config/environment
type: Question

http://stackoverflow.com/comment/40619123
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25942769
has text: That would be fine, but I need to have a 20pt range from -10 to +10, with a starting value of 0.

http://stackoverflow.com/a/25908770
has comment: http://stackoverflow.com/comment/40681198
upvote count: 2
has comment: http://stackoverflow.com/comment/40699269
type: Answer
has comment: http://stackoverflow.com/comment/40553276
has comment: http://stackoverflow.com/comment/40702273
has comment: http://stackoverflow.com/comment/40701871
score: 2
has comment: http://stackoverflow.com/comment/40553454
has comment: http://stackoverflow.com/comment/40553661
has body: You can make an slight modification of this solution to work on arrays instead of on strings. Basically change the str.charCodeAt(i) to str[i]. Use a data view on your array buffer to access the elements in the array: var dataview = new DataView(buffer); Then use this: dataview.getInt8(i);
has comment: http://stackoverflow.com/comment/40701343
has comment: http://stackoverflow.com/comment/40702184
downvote count: 0
has comment: http://stackoverflow.com/comment/40703133
answers question: http://stackoverflow.com/q/25908635
has comment: http://stackoverflow.com/comment/40555021
has comment: http://stackoverflow.com/comment/40701429

http://stackoverflow.com/q/25931643
has title: Parse JSON response with quotes - Twitter error handling
answer count: 0
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40595239
has comment: http://stackoverflow.com/comment/40595271
score: 0
has body: Am getting a twitter error response like the following json as my response body. I would like to check a condition if there is any error occurs. Twitter response {"errors":[{"code":186,"message":"Status is over 140 characters."}]} But here the twitter response errors is in quotes. So i cannot access it. Could you please help me to solve this issue. Thank you my code tuwm.post(content, media_picture.picture, function(response) { if(response.body.errors) { console.log('error') } else { res.json({ status: 200, info: "OK", id: response.id }); } });
tagged with: http://stackoverflow.com/tag/json
type: UnansweredQuestion

http://stackoverflow.com/q/25949961
accepted answer: http://stackoverflow.com/a/25952843
tagged with: intellij-idea
has title: Serverside JS coverage for IntelliJ
tagged with: javascript
score: 4
tagged with: jetbrains-ide
possible better answer: http://stackoverflow.com/a/25975544
favorite count: 0
has answer: http://stackoverflow.com/a/25952843
upvote count: 4
tagged with: node.js
downvote count: 0
tagged with: code-coverage
has body: Is there a way to run code coverage without browser in intelliJ? http://www.jetbrains.com/webstorm/webhelp/monitoring-code-coverage-for-javascript.html This is only coverage tutorial by Jetbrains, but both of these require a browser, so i can't test my Node.js code. I bet i'm not the only one who want's a coverage report of their Node.js code using IntelliJ :) Karma and JsTestDriver seems both to run tests in browser so no Node.js code can be tested with those. I can anyways run mocha tests straight from idea, but without coverage.
has answer: http://stackoverflow.com/a/25975544
type: Question
type: AnsweredQuestion
answer count: 2

http://stackoverflow.com/comment/40512244
has text: I dont want a click function i need a mouseover function
comment on: http://stackoverflow.com/a/25886166
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40562694
type: AnswerComment
comment on: http://stackoverflow.com/a/25914128
has text: http://en.wikipedia.org/wiki/Null_coalescing_operator#Javascript
score: 0
type: Comment

http://stackoverflow.com/a/25933184
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40665186
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25932990
has comment: http://stackoverflow.com/comment/40667520
answers question: http://stackoverflow.com/q/25932990
has body: This is happening because the events are not bubbling properly. I am not sure what about the jQuery Mobile event handling is causing the events to be stopped. A solution is to bind a click handler to the objects right after they are created. $(document).ready(function () { $('#btnSearch').on('click', function () { $('#resultList').html( " Biatorbagy(65 - 312) Year 1997 Path ").enhanceWithin(); $('#resultList').find('a.resultZoomButton').click(function(e){ console.debug('Fire'); }); }); }); It is not ideal but the best way to do this is to add the handler after the item is created. It would appear also that you are going to be making multiple results. You do not want to bind an event to each one every time. I would suggest after you add the click handler, also add a special 'bound' class to the object so that each result is only bound once. $(document).ready(function () { $('#btnSearch').on('click', function () { $('#resultList').html( " Biatorbagy(65 - 312) Year 1997 Path ").enhanceWithin(); var zoomButtons = $('#resultList').find('a.resultZoomButton'); zoomButtons.each(function(){ if(!$(this).hasClass('bound')){ $(this).click(function(e){ console.debug('Fire'); }).addClass('bound'); } }); }); }); Here is an updated fiddle.

http://stackoverflow.com/a/26032666
has comment: http://stackoverflow.com/comment/40779195
has comment: http://stackoverflow.com/comment/40780996
has comment: http://stackoverflow.com/comment/40778605
has comment: http://stackoverflow.com/comment/40779643
type: Answer
has comment: http://stackoverflow.com/comment/40780302
has comment: http://stackoverflow.com/comment/40781071
answers question: http://stackoverflow.com/q/26030322
has body: A couple of things: first, underscore's _.template function, unless you pass it both a template and some data, is returning another function. Right now it appears you're just passing it the template string. You either need to additionally pass it the data to interpolate: var _subview = _.template(Subview, { key: value }); Or, if there is no data to interpolate, you need to invoke the method to return the markup string: $(this.el).html(_subview()); The other thing I recommend, if you're going to attach your views to existing elements, is not to use this.$el. When the element you're asking it to attach to isn't in the DOM yet, this.$el will be undefined. Instead of using this shorthand, you can still do $(this.el) because it won't try to select and cache the el as a jquery wrapped object before the element exists in the DOM. The other alternative is to allow your divs to create the element and you append the entire el into the DOM, in which case you can use this.$el in your render method.
has comment: http://stackoverflow.com/comment/40781353
score: 0

http://stackoverflow.com/comment/40501462
comment on: http://stackoverflow.com/q/25879643
score: 0
has text: where do you instantiate your view?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40619217
has text: See here: http://stackoverflow.com/questions/684672/loop-through-javascript-object
comment on: http://stackoverflow.com/q/25945045
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40611034
comment on: http://stackoverflow.com/q/25940361
has text: What do you mean? The DB is a SQL Server DB if that's what you're asking.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25924299
has answer: http://stackoverflow.com/a/41741757
has answer: http://stackoverflow.com/a/25924358
has body: Is there a way to clear the console in Firefox? In Chrome I can use... console.clear() (Not sure if it works for Safari or Opera though) However I haven't been able to find a solution for Firefox. Is this type of API not yet available? Is there a workaround that doesn't require? console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
has comment: http://stackoverflow.com/comment/40582152
has answer: http://stackoverflow.com/a/41241053
type: AnsweredQuestion
tagged with: firefox
downvote count: 0
tagged with: javascript
score: 21
possible better answer: http://stackoverflow.com/a/52577016
has answer: http://stackoverflow.com/a/70488988
favorite count: 0
has answer: http://stackoverflow.com/a/52577016
accepted answer: http://stackoverflow.com/a/25924358
type: Question
has title: Clear the console in Firefox
has comment: http://stackoverflow.com/comment/40640199
upvote count: 21
has answer: http://stackoverflow.com/a/63809859
answer count: 7
has answer: http://stackoverflow.com/a/30400818
has comment: http://stackoverflow.com/comment/40582800

http://stackoverflow.com/a/25934551
accepted answer of: http://stackoverflow.com/q/25934550
has comment: http://stackoverflow.com/comment/40608640
has comment: http://stackoverflow.com/comment/40600016
type: Answer
has comment: http://stackoverflow.com/comment/40600526
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/40600262
has body: Solution The jQuery appendTo method adds the element into the existing div, meaning when you clone it the second time the div contains two rows of input fields and then the third time will contain 4 rows of input fields. To overcome this use the insertAfter() method Button Javascript $('#add-item').click(function(){ $('.input-row:first').clone().insertAfter('.input-row:last'); })
has comment: http://stackoverflow.com/comment/40600412
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25934550

http://stackoverflow.com/a/25892083
has body: Steps: Convert the object to an array (objects are unordered, arrays are ordered) Sort the array Code: function reArrangeTilesObject(tilesObj) { var tilesArray = []; // Step 1 - convert to array for (var i in tilesObj) { tilesArray.push(tilesObj[i]); } // Step 2 - sort tilesArray.sort(function(a, b) { return a.showorder - b.showorder; }); return tilesArray; } Result – an ordered array: [ {"ref":"1","active":"1","showorder":"1","title":"Test 1"}, {"ref":"2","active":"1","showorder":"2","title":"Test 2"}, {"ref":"3","active":"1","showorder":"4","title":"Test 4"}, {"ref":"5","active":"1","showorder":"7","title":"Test 7"}, {"ref":"4","active":"1","showorder":"9","title":"Test 9"} ]
has comment: http://stackoverflow.com/comment/40536884
score: 0
accepted answer of: http://stackoverflow.com/q/25891848
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40529415
answers question: http://stackoverflow.com/q/25891848
type: Answer
has comment: http://stackoverflow.com/comment/40522738
has comment: http://stackoverflow.com/comment/40523707
has comment: http://stackoverflow.com/comment/40536702
has comment: http://stackoverflow.com/comment/40538991

http://stackoverflow.com/comment/40660056
type: QuestionComment
has text: your isn´t rendered when your code is executed, you need to execute your code after pageload
comment on: http://stackoverflow.com/q/25968240
type: Comment
score: 1

http://stackoverflow.com/a/25963503
has comment: http://stackoverflow.com/comment/40651391
has comment: http://stackoverflow.com/comment/40651449
has comment: http://stackoverflow.com/comment/40651538
has comment: http://stackoverflow.com/comment/40674562
has comment: http://stackoverflow.com/comment/40651602
has comment: http://stackoverflow.com/comment/40651549
has comment: http://stackoverflow.com/comment/40651912
has body: You need to return the promise in getKey(), then call then() on the returned promise in populateTasks() to access the result.
has comment: http://stackoverflow.com/comment/40651308
score: 0
has comment: http://stackoverflow.com/comment/40651359
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40651946
accepted answer of: http://stackoverflow.com/q/25963479
has comment: http://stackoverflow.com/comment/40651255
has comment: http://stackoverflow.com/comment/40651871
has comment: http://stackoverflow.com/comment/40651922
answers question: http://stackoverflow.com/q/25963479
type: Answer
has comment: http://stackoverflow.com/comment/40651267

http://stackoverflow.com/q/26003572
has title: In JQuery, why can't I check a checkbox after removeAttr("checked") is called?
favorite count: 0
possible better answer: http://stackoverflow.com/a/26004369
accepted answer: http://stackoverflow.com/a/26003726
has answer: http://stackoverflow.com/a/26004369
has comment: http://stackoverflow.com/comment/40724494
type: AnsweredQuestion
upvote count: 3
has body: I want to check a checkbox if a certain input field is populated. The solution below works initially. After I enter input, the checkbox is correctly checked. After the input is deleted, the checkbox is unchecked. But after entering input again, the checkbox does not get checked. Name is selected? Name:
has comment: http://stackoverflow.com/comment/40724497
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40724522
has comment: http://stackoverflow.com/comment/40724488
has comment: http://stackoverflow.com/comment/40724485
has comment: http://stackoverflow.com/comment/40724581
has answer: http://stackoverflow.com/a/26003726
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/26029147
has title: appendChild new paragraph on form submit not working
accepted answer: http://stackoverflow.com/a/26029172
type: AnsweredQuestion
has body: I'm trying to add a paragraph to my dom/html/site(I'm new to html and js) through javascript when a form is submitted. This is what I have so far: document.addEventListener('DOMContentLoaded',function() { var form = document.getElementById("form"); form.addEventListener("submit", add, false); }); function add(e) { var para = document.createElement("p"); var newText = document.createTextNode("new text"); para.appendChild(newText); document.documentElement.lastChild.appendChild(para); } The paragraph seems to get added, I can see "new text" for a split second when I click on the submit button but then it immediately disappears.
type: Question
has comment: http://stackoverflow.com/comment/40771136
has comment: http://stackoverflow.com/comment/40771112
tagged with: form-submit
has answer: http://stackoverflow.com/a/26029172
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40771116
tagged with: javascript
tagged with: dom

http://stackoverflow.com/q/25940855
tagged with: node.js
has answer: http://stackoverflow.com/a/25982620
type: Question
type: AnsweredQuestion
tagged with: mongodb
answer count: 2
possible better answer: http://stackoverflow.com/a/25941357
has answer: http://stackoverflow.com/a/25941357
tagged with: javascript
tagged with: express
has body: I am trying to get my Node.js server to communicate with a database so that I can extend it to an Angular front end. I have a path that makes a request to the database that should return the entire database (5 documents). I have a connection to the database as I can see it connect when I refresh the server. I will try to list only the relevant code below: Loading the modules... var express = require('express'); var morgan = require('morgan'); var mongoose = require('mongoose'); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var app = express(); Defining the database schema and connecting // Database connection and scheme =================== mongoose.connect('mongodb://localhost/data/'); var schema = mongoose.Schema({ date: 'String', newProofs: [Number], changes: [Number], output: [Number] }); var TEST2014 = mongoose.model('TEST2014', schema); Middleware configurations. I don't know what methodOverride does. I believe the body parser allows the response to be JSON? // Application middleware and configurations ============== app.set('view engine', 'ejs'); app.use(express.static(__dirname + '/public')); app.use(morgan('dev')); app.use(bodyParser.urlencoded({'extended':'true'})); // parse application/x-www-form-urlencoded app.use(bodyParser.json()); // parse application/json app.use(bodyParser.json({ type: 'application/vnd.api+json' })); // parse application/vnd.api+json as json app.use(methodOverride()); Path for making request to database. app.get('/api/TEST2014', function(req, res) { // Use mongoose to get all weekdays for display TEST2014.find(function(err, days) { // if there is an error retrieving, send the error then nothing else if (err) res.send(err); res.json(days); }); }); Listening... var server = app.listen(3000, function() { console.log('Listening on port %d', server.address().port); }); When I refresh the page at http://localhost:3000/api/TEST2014 I see this: {} I expect to see this (what I currently have in the …
score: 0
accepted answer: http://stackoverflow.com/a/25982620
has title: Empty response in MEAN database query

http://stackoverflow.com/comment/40740058
comment on: http://stackoverflow.com/q/26012282
score: 1
has text: [You should read this](http://blog.jquery.com/2013/04/18/jquery-2-0-released/). jQuery 2+ has no support for IE6/7/8. And that is a good thing.
type: Comment
type: QuestionComment

phaser-framework
tags question: http://stackoverflow.com/q/25942955
tags question: http://stackoverflow.com/q/25953934
tags question: http://stackoverflow.com/q/25957617
tag name: phaser-framework
type: Tag

http://stackoverflow.com/comment/127959608
comment on: http://stackoverflow.com/a/32794161
has text: Domain List can be taken from IANA Data ( https://data.iana.org/TLD/tlds-alpha-by-domain.txt )
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26033967
accepted answer of: http://stackoverflow.com/q/26033909
answers question: http://stackoverflow.com/q/26033909
score: 3
type: AcceptedAnswer
downvote count: 0
has body: You can get the type of the error as a string with obj.name, giving you "TypeError" - jsFiddle.
type: Answer
upvote count: 3

http://stackoverflow.com/a/25945395
has comment: http://stackoverflow.com/comment/40681746
downvote count: 0
answers question: http://stackoverflow.com/q/25945252
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25945252
score: 1
has body: If you use $rawData instead of $data in your foreach binding, it will work as expected. From the docs $rawData This is the raw view model value in the current context. Usually this will be the same as $data, but if the view model provided to Knockout is wrapped in an observable, $data will be the unwrapped view model, and $rawData will be the observable itself.
type: AcceptedAnswer

http://stackoverflow.com/comment/40563518
type: QuestionComment
score: 6
comment on: http://stackoverflow.com/q/25914534
has text: Pure code-writing requests are off-topic on Stack Overflow -- we expect questions here to relate to *specific* programming problems -- but we will happily help you write it yourself! Tell us [what you've tried](http://whathaveyoutried.com), and where you are stuck. This will also help us answer your question better.
type: Comment

http://stackoverflow.com/comment/40575208
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25920278
has text: I'm sorry, but I am not familiar with JQuery yet. I'm still trying to wrap my head around Javascript.

http://stackoverflow.com/a/26001479
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26000771
has body: It looks like your issue is with the html vs svg namespace. The following answer does a good job of summing up your issue: jquery's append not working with svg element? My suggestion would be to use a js library to handle creating the elements. Snap svg is a great solution and should handle the issues you are having. Also, doing $('body').html($('body').html()); is a really bad idea. Essentially, you are erasing all the DOM elements (with the all the events bound to them) and rebuilding the entire page with brand new elements. That's why all your events are getting destroyed.
downvote count: 0

http://stackoverflow.com/comment/40500102
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25878916
has text: The first map is looping each square's images, which results in array of multiple urls for one square image. The second map should go through the multiple urls to only grab on url at a time.
score: 0

http://stackoverflow.com/comment/40732669
has text: I think for single field i would still use Label tag as i prefer to have accessibility and dont want to use id for every input. Do you have any suggestion to take care of this situation
comment on: http://stackoverflow.com/a/26008055
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40754478
comment on: http://stackoverflow.com/a/26019390
type: Comment
has text: I love the "clear" ("x") functionality. It is now very far from the search box. I want to keep it beside the search box. How can I do that?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25911111
answers question: http://stackoverflow.com/q/25911069
has body: You need to do it like: var e = document.getElementById("leave"); document.getElementById("message").value = e.options[e.selectedIndex].value;
type: Answer
score: 0

http://stackoverflow.com/comment/40578575
has text: Running this for a test now. Thank you first off, for your help and the introduction to highland.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25921200

http://stackoverflow.com/q/25923157
has body: I want to have 2 sidebars aligned to right where one is hidden. I want that when user clicks one button from right sidebar, the sidebar should disappear to right and a new sidebar should come at the same moment with css animatons. If I use right:-50px this extends scrollable area. If I use a container with width, this still extends scrollable area. see: http://jsfiddle.net/oz62o2yd/2/ &lt;- this is just right minus value, coming to screen area. and http://jsfiddle.net/oz62o2yd/3 &lt;- and here I use a container, but that doesnt stop page from making scrollbars. I dont want to just "hide" scrollbars but also disable them. If I need to use javascript for this, I'm also OK with that.
tagged with: javascript
has answer: http://stackoverflow.com/a/25923805
has title: Css "right" minus value without extending scroll area?
score: 0
has comment: http://stackoverflow.com/comment/40580066
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25923805
tagged with: css
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/25923336
answer count: 2
has answer: http://stackoverflow.com/a/25923336

http://stackoverflow.com/a/25976634
has comment: http://stackoverflow.com/comment/40675077
has comment: http://stackoverflow.com/comment/40675591
type: Answer
has comment: http://stackoverflow.com/comment/40675330
score: 0
has comment: http://stackoverflow.com/comment/40675241
has comment: http://stackoverflow.com/comment/40676163
answers question: http://stackoverflow.com/q/25976544
has comment: http://stackoverflow.com/comment/40675353
has comment: http://stackoverflow.com/comment/40675915
has comment: http://stackoverflow.com/comment/40675547
has comment: http://stackoverflow.com/comment/40675490
has body: You cannot logically place a block level element &lt;h4&gt; inside an inline element &lt;a&gt; according to HTML Standards. So, you need to find some alternate ways of doing it. It is simply NOT VALID HTML (Except HTML 5). And another thing is, you cannot nest &lt;a&gt; inside another &lt;a&gt;! For the comment by vsync, please check out Creating anchor tag inside anchor tag.
has comment: http://stackoverflow.com/comment/40675030
has comment: http://stackoverflow.com/comment/40675331

http://stackoverflow.com/q/25912993
answer count: 2
has comment: http://stackoverflow.com/comment/40560914
has answer: http://stackoverflow.com/a/25913781
accepted answer: http://stackoverflow.com/a/25913781
has answer: http://stackoverflow.com/a/25913273
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40560927
has comment: http://stackoverflow.com/comment/40560764
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Make entire DIV block clickable
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40561219
score: 1
possible better answer: http://stackoverflow.com/a/25913273
has comment: http://stackoverflow.com/comment/40560874
upvote count: 1
has comment: http://stackoverflow.com/comment/40561695
type: Question
has comment: http://stackoverflow.com/comment/40560987
has comment: http://stackoverflow.com/comment/40560961
has body: I have a script on my site and using jQuery it makes the variation-value div element clickable. Unfortunately the areas with the p & div tags aren't clickable. Is there an easy fix for this? jsfiddle example ::: http://jsfiddle.net/xb4qkdLu/ ::: left aligned text right aligned text
tagged with: javascript
has comment: http://stackoverflow.com/comment/40561313

http://stackoverflow.com/q/25917275
score: 1
has answer: http://stackoverflow.com/a/25917341
has answer: http://stackoverflow.com/a/25917583
has title: AngularJS dynamic routes and templates
answer count: 3
upvote count: 1
has body: I'm trying to setup a wildcard or dynamic routing with templates, for example: /page/test would resolve the template in page/test.tpl.html I have the following and I've tried some variations appending .tpl.html, but it doesn't seem to work right. Any suggestions? Thank you! angular.module('page', []).config(['$routeProvider', function ($routeProvider) { $routeProvider.when('/page/:route', { templateUrl: function($routeParams) { return $routeParams; }, controller: 'PageController' }); }]) .controller('PageController', ['$scope', function ($scope) { }]);
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25917355
accepted answer: http://stackoverflow.com/a/25917355
possible better answer: http://stackoverflow.com/a/25917341
downvote count: 0
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/40570432
score: 0
has text: Well then I guess I'm confused. If you are submitting a normal form, it will reload the page. When the submission completes and the page reloads, the loading screen div will be hidden again. So what exactly is the problem?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25916250

http://stackoverflow.com/comment/40678328
has text: Replace `alert('status');` with `return false;` It'll stop the propagation.
type: AnswerComment
comment on: http://stackoverflow.com/a/25978261
type: Comment
score: 0

http://stackoverflow.com/comment/40750068
type: Comment
has text: Ok.. I got your point.. But When you want to call your showTrips function then?
comment on: http://stackoverflow.com/a/26015279
type: AnswerComment
score: 0

http://stackoverflow.com/q/26022803
has comment: http://stackoverflow.com/comment/40759399
tagged with: datepicker
has title: How to call a function AFTER blur from input?
has answer: http://stackoverflow.com/a/26022890
type: AnsweredQuestion
downvote count: 0
has body: I'm using jquery-ui datepicker as one of my inputs. If a user blurs from an input, I display a relevant message (e.g. "This field is required"). For this purpose I have the following jQuery, which works perfectly fine for simple &lt;select&gt; and &lt;input type="text"&gt; tags: $("input").blur(function(){ if($(this).val()=="") $(this).next().text("This field is required."); else $(this).next().text(""); }); However, in case of datepicker (where I have to essentially blur to select a date) the error message gets displayed even after I've selected the date (i.e. selection of date is leading to the blur event). This requires that the .blur(function(){}); should be called after the blur event is completed (not simultaneously). How to solve this situation? Here's a DEMO.
type: Question
possible better answer: http://stackoverflow.com/a/26022886
score: 3
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40761240
tagged with: javascript
has answer: http://stackoverflow.com/a/26022886
upvote count: 3
has comment: http://stackoverflow.com/comment/40759864
answer count: 2
has comment: http://stackoverflow.com/comment/40759432
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26022890
favorite count: 0

http://stackoverflow.com/a/25935297
score: 1
answers question: http://stackoverflow.com/q/25935219
accepted answer of: http://stackoverflow.com/q/25935219
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You need a regex that matches the text "fr" between boundaries characters: if(/\bfr\b/.test(loc)) { } You may also avoid regex, doing if(loc.indexOf('/fr/') != -1) { }
upvote count: 1

gmail
type: Tag
tags question: http://stackoverflow.com/q/25979401
tag name: gmail

http://stackoverflow.com/q/26012932
type: Question
has title: JavaScript - Update pricing with select box change
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40741513
answer count: 1
has answer: http://stackoverflow.com/a/26013100
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: So... I am trying to update a price at the top of a comparison table when you select the price options from thee select box. The select box is hidden and is controlled by two +/- buttons on either side. I want to take the value of the select box and cross reference it with the amount in the durationOptions array and increase/decrease the total bubble at the top. Here is my ugly attempt but I'm stuck, the figures are all over the place and I am sure I am doing this the long way. There must be something simpler. Here is my fiddle: http://jsfiddle.net/xt2qLzmk/1/ Code: var customFlag = 0; $(".select-plus").click(function (event) { customFlag = 0; var durationOptions = new Array(); durationOptions[18] = 95; (select option value 18 = £95 etc...) durationOptions[4] = 125; durationOptions[30] = 165; durationOptions[20] = 195; The random indexes are actually their values in the DB but will build that array from the DB later, made a static one for quick prototyping. var isLastElementSelected = $('#customise-rightmove_zoopla_700_sites &gt; option:selected').index() == $('#customise-rightmove_zoopla_700_sites &gt; option').length - 1; if (!isLastElementSelected) { $('#customise-rightmove_zoopla_700_sites &gt; option:selected').removeAttr('selected').next('option').attr('selected', 'selected'); // Update label with current select value var currentVal = $('#customise-rightmove_zoopla_700_sites &gt; option:selected').attr('label'), labelId = 'customise-rightmove_zoopla_700_sites_label'; var bubblePrice = $('#customise-bubble-display-price').text(), optionValue = $('#customise-rightmove_zoopla_700_sites &gt; option:selected').val(), oldOptionValue = $('#customise-rightmove_zoopla_700_sites &gt; option:selected').prev('option').val(); var labelAmount = parseFloat(durationOptions[optionValue]), oldLabelAmount = parseFloat(durationOptions[oldOptionValue]); if (oldLabelAmount == 95) { oldLabelAmount = 0; } var newPrice = (parseInt(bubblePrice) - parseFloat(oldLabelAmount)) + parseFloa…
has comment: http://stackoverflow.com/comment/40741527
score: 1
tagged with: select

http://stackoverflow.com/q/25984212
score: 0
has body: Following the example in the AngularJS docs for ngInclude and ngAnimate , I've made a simple modification to it so that templates are loaded from script tags instead of from urls. See Plunkr here The problem is that if we define our templates inline, like so: Then the content is added correctly, but the first enter animation stops working (animations from subsequent changes seem to work though). Any workarounds to this problem? angular.module('includeExample', ['ngAnimate']) .controller('ExampleController', ['$scope', function($scope) { $scope.templates = [ { name: 'template1.html', url: 'template1.html'}, { name: 'template2.html', url: 'template2.html'} ]; $scope.template = $scope.templates[0]; }]); .slide-animate-container { position:relative; background:white; border:1px solid black; height:40px; overflow:hidden; } .slide-animate { padding:10px; } .slide-animate.ng-enter, .slide-animate.ng-leave { -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; position:absolute; top:0; left:0; right:0; bottom:0; display:block; padding:10px; } .slide-animate.ng-enter { top:-50px; } .slide-animate.ng-enter.ng-enter-active { top:0; } .slide-animate.ng-leave { top:0; } .slide-animate.ng-leave.ng-leave-active { top:50px; } (blank) url of the template: {{template.url}}
answer count: 1
accepted answer: http://stackoverflow.com/a/25986602
tagged with: angularjs
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25986602
type: Question
tagged with: javascript
has title: Angular: ngInclude not triggering first enter animation when template is defined inline as text/ng-template

http://stackoverflow.com/q/26000367
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26000716
score: 0
has title: Datatables Find Replace If Statement
tagged with: datatables
has answer: http://stackoverflow.com/a/26000500
tagged with: datatable
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26000554
has answer: http://stackoverflow.com/a/26000554
accepted answer: http://stackoverflow.com/a/26000500
type: Question
has body: How do I do a find/replace on specific elements in a datatable? I'm trying to replace elements in the table with font awesome icons: JavaScript: $(document).ready(function() { $('#example').dataTable(); $('td').html().replace('0', '&lt;i class="fa fa-thumbs-o-up"&gt;&lt;/i&gt;'); $('td').html().replace('1', '&lt;i class="fa fa-warning"&gt;&lt;/i&gt;'); } ); JFiddle: http://jsfiddle.net/wo02xedr/

http://stackoverflow.com/a/25962419
has body: So first of all, an unrelated tip - it would be a good idea to update jQuery a bit (if there isn't anything that depends on the old version you are using). live won't be available, instead you'll need to replace it with .on, but otherwise it's a good idea. Secondly, sounds like all you're looking for is to give hide and show some transition. You can simply replace them with fadeIn() and fadeOut(). You can also use toggle which does it all at once (though might misbehave when used with a hover, because it will flip like crazy). Here's a small snippet that shows you how they work: $(document).ready(function() { var img = $('img'); $('#show').on('click', function() { img.fadeIn(); }); $('#hide').on('click', function() { img.fadeOut(); }); $('#toggle').on('click', function() { img.fadeToggle(); }); }); * { font-family: sans-serif; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;button id="show"&gt; Show me! &lt;/button&gt; &lt;button id="hide"&gt; Hide me! &lt;/button&gt; &lt;button id="toggle"&gt; Toggle me! &lt;/button&gt; &lt;br&gt; &lt;br&gt; &lt;img src="http://www.randomwebsite.com/images/head.jpg" /&gt; Of course, those are just shortcut functions that use the .animate functionality, which is quite flexible on its own. Here's a link where you can read more about effects and animations in jQuery and how you can use them
type: Answer
has comment: http://stackoverflow.com/comment/40650016
answers question: http://stackoverflow.com/q/25962080
has comment: http://stackoverflow.com/comment/40649873
upvote count: 10
has comment: http://stackoverflow.com/comment/40649399
accepted answer of: http://stackoverflow.com/q/25962080
has comment: http://stackoverflow.com/comment/40649993
score: 10
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40650203
downvote count: 0
has comment: http://stackoverflow.com/comment/40649918
has comment: http://stackoverflow.com/comment/40649349
has comment: http://stackoverflow.com/comment/40649801

http://stackoverflow.com/a/25881441
answers question: http://stackoverflow.com/q/25881186
has comment: http://stackoverflow.com/comment/93993480
downvote count: 0
has body: "Fill" is a style property, you have to use CSS url() notation for the reference to the pattern element. Once you fix that, you'll discover that you also have your sizes wrong -- unless your intention was to have four copies of the avatar tiled in the circle! P.S. I would normally have left this just as a comment, and marked this for closure as a simple typo, but I wanted to try out Stack Snippets: var config = { "avatar_size" : 48 } var body = d3.select("body"); var svg = body.append("svg") .attr("width", 500) .attr("height", 500); var defs = svg.append('svg:defs'); defs.append("svg:pattern") .attr("id", "grump_avatar") .attr("width", config.avatar_size) .attr("height", config.avatar_size) .attr("patternUnits", "userSpaceOnUse") .append("svg:image") .attr("xlink:href", 'http://placekitten.com/g/48/48') .attr("width", config.avatar_size) .attr("height", config.avatar_size) .attr("x", 0) .attr("y", 0); var circle = svg.append("circle") .attr("cx", config.avatar_size/2) .attr("cy", config.avatar_size/2) .attr("r", config.avatar_size/2) .style("fill", "#fff") .style("fill", "url(#grump_avatar)");
type: AcceptedAnswer
score: 18
upvote count: 18
type: Answer
accepted answer of: http://stackoverflow.com/q/25881186
has comment: http://stackoverflow.com/comment/93993267

http://stackoverflow.com/comment/40635943
score: 0
type: Comment
type: QuestionComment
has text: @bcorso So if the link in your error message is `http://localhost:9000/signup.php`, it still shouldn't download your PHP file.
comment on: http://stackoverflow.com/q/25955203

http://stackoverflow.com/comment/40501354
type: Comment
type: QuestionComment
has text: Yes, I recommend [reading this](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Using_object_initializers).
comment on: http://stackoverflow.com/q/25879745
score: 0

http://stackoverflow.com/q/25951557
tagged with: css
has title: Removing inline CSS
upvote count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/4033004
type: Question
has answer: http://stackoverflow.com/a/25951721
tagged with: javascript
has comment: http://stackoverflow.com/comment/40629018
has answer: http://stackoverflow.com/a/25951626
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/2027935
has body: I have this piece of javascript for a RSS feed and I want to be able to edit the CSS to my taste, however there is an existing inline style sheet over-riding my preferences. Any ideas on how to remove the inline CSS and use an external style sheet instead? Here is the piece of javascript that I have...
favorite count: 0
linked to: http://stackoverflow.com/q/10943544
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/14383668

http://stackoverflow.com/a/25938120
accepted answer of: http://stackoverflow.com/q/25938059
has body: You can do this with ng-init: {{ name.first }} https://docs.angularjs.org/api/ng/directive/ngInit
answers question: http://stackoverflow.com/q/25938059
type: AcceptedAnswer
downvote count: 1
type: Answer
upvote count: 22
score: 21

http://stackoverflow.com/a/26001071
answers question: http://stackoverflow.com/q/26000225
score: 0
type: Answer
has body: var yourArray = ['25 test1', '50 test 50', '10 item ten', '100 test100 hi', '75 seventy five ok', 'alpha menu item', 'bravo ok']; function arraySort(pArray) { return pArray.sort(function(a, b) { var an = parseInt(a), bn = parseInt(b); return an &gt; bn || isNaN(bn) ? -1 : bn &gt; an || isNaN(an) ? 1 : 0; }); } // now call arraySort var sortedArray = arraySort( yourArray );
accepted answer of: http://stackoverflow.com/q/26000225
has comment: http://stackoverflow.com/comment/40730266
type: AcceptedAnswer

http://stackoverflow.com/a/26013806
upvote count: 0
answers question: http://stackoverflow.com/q/26013459
score: -1
has body: I have modified the code as below and it worked in chrome : $(function(){ $("#draggable").draggable(); $("#draggable1").draggable({revert:true}); $("#draggable2").draggable({revert:true}); }); Why exactly do you want to add containment:".dragcontainer" ?
downvote count: 1
has comment: http://stackoverflow.com/comment/40742732
type: Answer

konacha
type: Tag
tags question: http://stackoverflow.com/q/25917838
tag name: konacha

http://stackoverflow.com/comment/40639085
type: Comment
type: QuestionComment
has text: @RussellBevan doesn't work
score: 0
comment on: http://stackoverflow.com/q/25956906

http://stackoverflow.com/comment/40653525
score: 0
type: Comment
type: QuestionComment
has text: can you just console.log(resp) like this: success: function(resp) { console.log(resp); jQuery('div.out1').html(resp[0]); jQuery('div.out2').html(resp[1]); jQuery('div.out3').html(resp[2]); }, and copy paste here what is writing in the console tab?
comment on: http://stackoverflow.com/q/25964593

http://stackoverflow.com/a/26027418
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26027059
has body: Think of it as a templating system. Your html is the template, and the controller is the... controller that you defined in your angular js. The {{something}} things in your html are usually references to properties on the scope of the controller. $scope.something = "Hello World!"; Angular simply replaces the {{something}} entries in your html with actual content, for example, with theHtml.replace("{{something}}", $scope.something). Angular can also interpret basic javascript within the brackets so you can do things like &lt;p&gt;{{something + ' Today\'s date is: ' + new Date()}}&lt;/p&gt; and actually get the result to output on the page instead of the brackets. This only explains at a very basic level how the content within the brackets gets replaced with actual content, explaining much more such as how data binding is done will become too much for a single answer on SO.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26027059
type: AcceptedAnswer

http://stackoverflow.com/q/25941264
favorite count: 0
linked to: http://stackoverflow.com/q/5974323
has title: jQuery scrollTop destination reference changes on static element
upvote count: 1
type: AnsweredQuestion
has body: fiddle $("#other-content").click(function() { var dest = $('input[value="skip0"]').offset().top; console.log(dest, typeof(dest)); $("html, body").animate({ scrollTop: dest }); }); I can't figure out why I can click the red bar and the window will scroll, but if I click the orange one, it doesn't The difference is that I am referencing a hidden inputs placement for the scrolling of the orange bar If I scroll and then click the orange bar, the top property of the input changes. Not sure why I realize the input's top position is 0, but even if it is at 900, it doesn't work correctly
score: 1
accepted answer: http://stackoverflow.com/a/25941534
has comment: http://stackoverflow.com/comment/40613147
tagged with: scrolltop
type: Question
has comment: http://stackoverflow.com/comment/40612959
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25941534

http://stackoverflow.com/comment/40537210
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25899231
has text: @FelixKling and iceless i put in inside the document.ready and before the update_result code but it still doesn't work.

http://stackoverflow.com/comment/40814104
comment on: http://stackoverflow.com/q/26030679
type: Comment
type: QuestionComment
has text: I'm looking for true/false
score: 0

http://stackoverflow.com/a/25998445
answers question: http://stackoverflow.com/q/25998241
has body: Try using \n to start a new line
score: 0
type: Answer

http://stackoverflow.com/a/26035680
has body: I don't know if I missunderstood, but: var currentIndexChangeHandler = function(newValue, oldValue) { scope.challenges.forEach(function(challenge) { //do something } } scope.$watch('currentIndex', currentIndexChangeHandler); will provoke that "currentIndexChangeHandler" will be triggered on the very first run (see: $watch is triggered directly after init, why?), when "scope.challenges" is still undefined. You colud "hack" this "first run" with "if(newValue!=oldValue)", but I think this is not the point. Other problem is that when you iterate "scope.challenges", it is undefined, because its value should be async received. It could be solved using "if(Boolean(scope.challenges))", but it's not the right way. I think the real problem is that you are working with async data. ¿What value returns Challenge.findAll()? ¿maybe a promise? In this way you should use: Challenge.findAll().then(function(challenges){ $scope.challenges = challenges; } I refactored your code with my sugestion. Is that behaviour, what you was pretending? http://jsfiddle.net/rizome/uqtaoLne/ UPDATE: Using Firebase and $firebase (see: https://www.firebase.com/docs/web/libraries/angular/api.html#angularfire-firebase) "$firebase" AngularJS wraper has a similar behaviour than coded in the fiddle above, but you should use "$firebase" api to obtain a promises. (this piece of code represents code inside your repo-service, and inside the controller as well) var firebaseResource = $firebase(new Firebase(YOUR_DATA_URL)); var firebaseSyncArray = firebaseResource.$asArray(); //it is still empty var loadedArrayPromise = firebaseSyncArray.$loaded(); //promise with the array when loaded var loadedArrayPromise.then(function (challenges) { $scope.challenges = challenges; //now, you can set $scope.challenges });
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26025323
type: Answer
answers question: http://stackoverflow.com/q/26025323

http://stackoverflow.com/a/26013796
has comment: http://stackoverflow.com/comment/40743350
type: Answer
has comment: http://stackoverflow.com/comment/40742899
has comment: http://stackoverflow.com/comment/40742619
upvote count: 1
answers question: http://stackoverflow.com/q/26013638
score: 1
accepted answer of: http://stackoverflow.com/q/26013638
has body: I suggest using the asynchronous way to check if a user is logged in and to get his id: You should never use this method at page load time. Generally, it is safer to use FB.getLoginStatus if you are unsure. Check out the Facebook docs for code and information: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus Of course you should call this right after FB.init.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40743666
has comment: http://stackoverflow.com/comment/40743130

http://stackoverflow.com/comment/40726409
has text: Oh wait, of course. By changing the projection, the bounds of subsequent features will also change. Hang on, will edit.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26004142

http://stackoverflow.com/a/25877132
has body: Try this: /(&lt;((?!br)[^&gt;]+)&gt;)/ig
downvote count: 0
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/40527494
answers question: http://stackoverflow.com/q/25877030

http://stackoverflow.com/comment/40552678
has text: Add the language tag.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25908440
type: Comment

http://stackoverflow.com/q/25977095
score: 1
tagged with: backbone-views
accepted answer: http://stackoverflow.com/a/25977177
has body: I have the following ItemView (there is no model associated with the view, it's a very basic "form" which has a submit or cancel and a single input field): App.BasicForm = Backbone.Marionette.ItemView.extend({ template: "build/templates/basic-form.html", tagName: "div", attributes: { id: "some-id", style: "display: none;" }, events: { "click button#bf-submit": "bfSubmit", "click button#bf-close": "bfClose" }, bfSubmit: function() { var bfInputField= document.getElementById('bfSomeData').value; }, bfClose: function() { this.$el.hide(); } }); So by default, this view is hidden (but is instantiated when App starts). I want to have a button which, when clicked, simply changes the attribute style display to block. I can do this easily like this: document.getElementById('bfBasicFormDiv').style.display = "block"; However, I'd rather call the view's $el.attr and edit it there, something along the lines of: App.BasicForm.$el.attr({style: "display: block;"}); However, this returns an undefined, and I can see no way of retrieving the attribute of the View (it's easy with models using .get()) but that doesn't hold for a view. Thank you for any advice. Gary
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: backbone.js
has title: Backbone - Access a View's $el.attr outside of the ItemView
tagged with: marionette
has answer: http://stackoverflow.com/a/25977177
upvote count: 1
type: Question
tagged with: model-view-controller
type: AnsweredQuestion

http://stackoverflow.com/q/26003053
downvote count: 1
type: Question
has body: Step 1: When I change the value of the display property of an element using JavaScript by something like: document.getElementById("myDiv").style.display = "none"; it changes what I see in the browser, but it does not change anything in the server side HTML script. Step 2 - Problem here: The problem is that after the above step, I later have to check if #myDiv is displayed on the screen. If it is, I do something. So I need to use a conditional expression like: if (document.getElementById("myDiv").style.display == "none") { //do something here } But problematically this expression never evaluates to true, because step one did not change anything on the server side HTML. So I need a way here to check in JS whether an element is displayed on the screen? How can I do that? NOTE:- Don't suggest JQuery. I can't use it.
accepted answer: http://stackoverflow.com/a/26003234
has comment: http://stackoverflow.com/comment/40725141
possible better answer: http://stackoverflow.com/a/26003203
has answer: http://stackoverflow.com/a/26003203
answer count: 2
has comment: http://stackoverflow.com/comment/40723462
upvote count: 0
has title: Javascript: How to check whether an element is "displayed" on the screen?
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40723705
has comment: http://stackoverflow.com/comment/40723526
has comment: http://stackoverflow.com/comment/40723658
tagged with: css
has answer: http://stackoverflow.com/a/26003234
score: -1
type: AnsweredQuestion

http://stackoverflow.com/comment/40622999
comment on: http://stackoverflow.com/a/25947605
score: 0
type: AnswerComment
has text: ah yes, I seem to have neglected to read that the 'type:' had to be set to custom.
type: Comment

http://stackoverflow.com/comment/40777612
comment on: http://stackoverflow.com/q/26032492
has text: why don't you just spawn and then use `spawn.stdin.write` directly?
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25999347
downvote count: 0
score: 8
upvote count: 8
type: Answer
answers question: http://stackoverflow.com/q/25994909
has body: &gt;&gt; sparseArray = [1, 2, , 4]; &gt;&gt; sparseArray.forEach(console.log, console); 1 0 [1, 2, 3: 4] 2 1 [1, 2, 3: 4] 4 3 [1, 2, 3: 4] &gt;&gt; for(var i = 0; i &lt; sparseArray.length; ++i) { console.log(sparseArray[i]) }; 1 2 undefined 4 forEach is a recent addition to make expressive list-comprehension style possible in javascript. Here you can see that forEach skips elements that were never set, but the best you can do with a for loop is to check for undefined or null, both of which can be set as values and picked up by forEach. Unless you expect missing values, forEach is equivalent to for loops, but note that you cannot stop early, for which you need every.

http://stackoverflow.com/comment/40808892
score: 0
has text: Make a new question for that and I'll look at it tonight.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26029870

http://stackoverflow.com/a/25893749
score: 1
upvote count: 1
downvote count: 0
has body: You can add a new data attribute to each of your link and then get that value and redirect. ..... and then // this will bind all ids starting with slide- $('[id^=slide-]').on('click', function(e){ // some code. window.location.href = $(this).data('webpage'); }
type: Answer
answers question: http://stackoverflow.com/q/25893607

http://stackoverflow.com/a/25891994
type: Answer
has body: Deciding the best way is tough without knowing about the way you wanna use it but this might help: var oData = { sections : [{name: "section1", items : { item1 : {description : "description goes here", checked : true}, item2 : {description : "description goes here", checked : true} } }, {name: "section2", items : { item1 : {description : "description goes here", checked : true}, item2 : {description : "description goes here", checked : true} } } ]}
has comment: http://stackoverflow.com/comment/40524125
accepted answer of: http://stackoverflow.com/q/25891534
has comment: http://stackoverflow.com/comment/40523098
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25891534
has comment: http://stackoverflow.com/comment/40523421
score: 0
has comment: http://stackoverflow.com/comment/40523567

http://stackoverflow.com/q/25891758
tagged with: javascript
has title: Different way to write Javascript?
has answer: http://stackoverflow.com/a/25891940
has comment: http://stackoverflow.com/comment/40522228
has answer: http://stackoverflow.com/a/25891917
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25891957
has body: It the code below I am not certain as to which way is better to write the code. The NewVar is a variable which I think can become which ever value is returned from the functions that are inside of the quotes. Is there a better way of writting this. var NewVar = { myVar: function() { return AnotherValue; }, isAny: function() { return SomeValue; } }; Can you make the like this: Would the following work the same. var NewVar; function myFunc() { //code here } function myFunc2() { //code here } NewVar = myFunc(); or NewVar = myFunc2();
score: 0
answer count: 3

http://stackoverflow.com/a/25877991
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40498114
has body: (This solution requires jQuery) Remove the &lt;script&gt; tag from your code and add this to your javascript: $(function() { $.getScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"); }); This will do an AJAX call to get the script, rather than using the async browser method. This should result in not having the loading indicator. ref: http://api.jquery.com/jquery.getscript/
answers question: http://stackoverflow.com/q/25877461

http://stackoverflow.com/q/25891122
accepted answer: http://stackoverflow.com/a/25891178
score: 0
possible better answer: http://stackoverflow.com/a/25891343
has answer: http://stackoverflow.com/a/25892033
has answer: http://stackoverflow.com/a/25891343
tagged with: asp.net-mvc-4
has title: How to remove a div with particular id containing particular text?
has comment: http://stackoverflow.com/comment/40520843
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25891178
has comment: http://stackoverflow.com/comment/40520845
tagged with: javascript
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/25891370
has body: if (!$(this).is(":checked")) { $.each(function(){ if ($('#result').has("Apartment")) { $('#result').remove(); } }) } I want that if I uncheck a checkbox then the div having id="result" should be deleted which contains the text "Apartment". Currently this logic is not working for me.

tilestache
tags question: http://stackoverflow.com/q/25895676
type: Tag
tag name: tilestache

http://stackoverflow.com/q/25922776
answer count: 6
upvote count: 18
has answer: http://stackoverflow.com/a/74115543
has answer: http://stackoverflow.com/a/28120936
downvote count: 0
has body: I'm having problems with a duplicate tab on Chrome (session's stuff) and I'd like to avoid the action of duplicating tabs (or lacking that close the duplicate one). I'm opening the tab as it was a popup, with no address bar, no status bar, and no nothing, just the window. There's no way to duplicate a tab (opened as a popup) in IE and Firefox (at least I havent found one), but in chrome is still possible. I also know I'm not able to programmatically check if there's an already open duplicated tab Any idea how to approach this? thanks!
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/829046
tagged with: tabs
has title: How to realize when a browser tab has been duplicated
linked to: http://stackoverflow.com/q/11008177
tagged with: cross-browser
accepted answer: http://stackoverflow.com/a/28120936
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6553334
has answer: http://stackoverflow.com/a/45094537
has answer: http://stackoverflow.com/a/48687782
has answer: http://stackoverflow.com/a/64747261
type: Question
possible better answer: http://stackoverflow.com/a/45094537
has answer: http://stackoverflow.com/a/74261626
score: 18
tagged with: javascript
tagged with: duplicates

http://stackoverflow.com/a/25969531
answers question: http://stackoverflow.com/q/25969424
has comment: http://stackoverflow.com/comment/40663151
type: Answer
score: 0
has body: As far as i understand, you want to retain the visible div even after post-back. you can use a hidden field for retaining the div visibility. try the following code snippet for reference $("#view_exam").click(function(){ $("#add_exams").hide(); $("#exams").hide(); $("#add_accts").hide(); $("#exams").fadeIn(); $("#FiddenField_For_Current_Form").val("exams"); }); And At page load Check the value in FiddenField_For_Current_Form and show the appropriate form as the following $(document).ready(function(){ switch($("#FiddenField_For_Current_Form").val()) { case "exams": $("#exams").fadeIn(); break; default : $("#add_exams,#exams,#add_accts").hide(); break; } });
has comment: http://stackoverflow.com/comment/40663205

http://stackoverflow.com/comment/40709278
comment on: http://stackoverflow.com/a/25995524
type: AnswerComment
score: 0
type: Comment
has text: Hi can you explain this http://jsfiddle.net/6j8w71tf/2/ why it results false yet there length is the same

http://stackoverflow.com/a/26006551
has body: Just as example, you could do this with jquery like this: var $arr = [2,1,4]; var $new = [] $.each($arr, function(index, item) { $new.push([item, 2*item]); }); Result: [[2, 4], [1, 2], [4, 8]] So while iterating over your initial array, you could just create the new array using the functions for geocoding. For reference: detailed answer given here: How to loop through array in jQuery?, and http://api.jquery.com/each/
answers question: http://stackoverflow.com/q/26005678
score: 0
type: Answer

http://stackoverflow.com/a/25880823
upvote count: 2
score: 2
downvote count: 0
has body: Is it possible to change function runtime scope…I wonder if I can change the Runtime context of the loaded function, for example, when the loaded function is being called No. Javascript is lexically scoped, so scope is entirely dependent on where functions are created in the code, not where they called from or how they are called &gt; fun &amp;&amp; fun.apply(this); That will only set one parameter of the function's execution context, its this parameter. There is general confusion about the term context. In ECMA-262 (the standard for the language underpinning javascript) context is used exclusively in execution context, which is the entire environment inside a function and includes its this parameter. The call and apply methods allow you to specify the value of a function's this, that's it, they have no other effect on the execution context (which is why this should never be called "context"). They do not have any effect on identifier resolution, which proceeds based on scope regardless of the value of this or where a function has been called from. You might find the following article interseting: Identifier Resolution, Execution Contexts and scope chains.
type: Answer
has comment: http://stackoverflow.com/comment/40503210
answers question: http://stackoverflow.com/q/25880697

http://stackoverflow.com/comment/40742739
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26012482
has text: I've added an archive with all files.

http://stackoverflow.com/q/25924005
has comment: http://stackoverflow.com/comment/40603346
tagged with: pdf.js
tagged with: http://stackoverflow.com/tag/pdf
accepted answer: http://stackoverflow.com/a/25977779
has answer: http://stackoverflow.com/a/25949941
tagged with: parsing
possible better answer: http://stackoverflow.com/a/25949941
has comment: http://stackoverflow.com/comment/40582991
type: Question
has comment: http://stackoverflow.com/comment/40610174
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25977779
has title: how to parse a local copy of pdf files and search keyword occurrence using javascript?
answer count: 2
tagged with: javascript
has body: I am working on a window application where I have to look for all pdf files, parse them and search a keyword occurrence in them with the help of javascript. I tried using pdf.js but found no solution for local files. It shows me following error; XMLHttpRequest cannot load file:///Hello.pdf. Cross origin requests are only supported for HTTP. (sample file name is Hello.pdf)
score: 0

http://stackoverflow.com/q/25902181
type: Question
has answer: http://stackoverflow.com/a/25902294
has title: AngularJS TypeError
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25902294
favorite count: 0
tagged with: typeerror
tagged with: angular-filters
has body: Getting a TypeError: undefined is not a function error. The code is meant to filter a list by the tags that it contains. I had the code working for a single tag but now that the query is an array of tags it's not working. angular.module('myapp', []) .controller('myctrl', function($scope, $http) { $scope.formData = {}; $scope.formData.query = ""; $scope.formData.list = [{"Tags":["a", "b", "c"]}, {"Tags":["a", "b"]}, {"Tags":["b", "c"]}] $scope.filterTags = function(query){ return function(elem){ query = query.split(","); for(i in query){ if(elem.Tags.indexOf(query[i]) == -1){ return false; } } return true; }; } }); And the template. &lt;div ng-app="myapp" ng-controller="myctrl"&gt; &lt;input type='text' ng-model='formData.query' /&gt; &lt;ul&gt; &lt;li ng-repeat='item in formData.list | filter:filterTags(formData.query)'&gt;{{item.Tags}}&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/40664669
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25969680
score: 0
has text: I just posted an answer, please let me know if that what you were looking for ;). Thanks!

http://stackoverflow.com/comment/40674872
comment on: http://stackoverflow.com/q/25976465
score: 0
type: Comment
has text: Is it just me, or are there some issues with the use of quotes here?
type: QuestionComment

http://stackoverflow.com/comment/40536924
has text: You should really include the error. As far as I can tell from the quick glance, action parameters do not match the JSON data you're passing; it should probably be `data : { id : /* get the guid from somewhere */, organization: jsonOrg }`
type: QuestionComment
comment on: http://stackoverflow.com/q/25899419
type: Comment
score: 1

http://stackoverflow.com/q/26008183
tagged with: ogg
favorite count: 0
has answer: http://stackoverflow.com/a/26009923
upvote count: 1
type: AnsweredQuestion
tagged with: video
has title: How to create an HTML 5 Landing Page w/ Video Background
has answer: http://stackoverflow.com/a/26008744
score: 1
tagged with: forms
accepted answer: http://stackoverflow.com/a/26009923
type: Question
possible better answer: http://stackoverflow.com/a/26008744
has answer: http://stackoverflow.com/a/26008341
downvote count: 0
tagged with: javascript
has body: I want to mimic Spotify's landing page here: https://www.spotify.com/uk/video-splash/?utm_source=spotify&amp;utm_medium=web&amp;utm_campaign=start I'm fairly new to coding but have created some landing pages before but never one with HTML and video as a background. I want the same layout as Spotify with NO scrolling capability OR sound. Then I want to be able to click on the button and have a form that someone can fill out and submit. Not quite sure how to go about this. TLDR: How to do HTML5 Video Background Create JS pop-up like form Where to get videos / format to work as a background
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25875964
has answer: http://stackoverflow.com/a/25876020
type: Question
has answer: http://stackoverflow.com/a/25876010
has body: I have a string url as follows: var url = '/test/mybin/processes/edit.jsp?id={processId}'; I want to extract the string "processId" from above url. I can get it using indexOf and substring methods, but is there a better alternative to do it? Can we do it using Regex?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40493927
possible better answer: http://stackoverflow.com/a/25876020
has answer: http://stackoverflow.com/a/25876067
has answer: http://stackoverflow.com/a/25876039
accepted answer: http://stackoverflow.com/a/25876067
answer count: 4
has comment: http://stackoverflow.com/comment/40494352
favorite count: 0
has comment: http://stackoverflow.com/comment/40857460
has title: How to extract a string from parent string?
has comment: http://stackoverflow.com/comment/40494391
score: -4
downvote count: 4
type: AnsweredQuestion
upvote count: 0
linked to: http://stackoverflow.com/q/901115

http://stackoverflow.com/comment/40718104
comment on: http://stackoverflow.com/a/26000076
score: 0
type: Comment
has text: The `ng-value` isn't working for me like it should. Also I am only able to get the `ng-checked` to work if I use the curly braces. What could be causing that? I am using `angular 1.2.17`
type: AnswerComment

http://stackoverflow.com/comment/40693823
type: AnswerComment
comment on: http://stackoverflow.com/a/25979255
has text: @D.LawrenceBarksdale Well, There was no mention about Perl in the post. Anyway, I've posted the final parsed HTML. Did you get the event listener to work?
score: 0
type: Comment

http://stackoverflow.com/comment/40587126
score: 0
comment on: http://stackoverflow.com/q/25926971
type: Comment
type: QuestionComment
has text: it will be stored in `local`, and not php application.

http://stackoverflow.com/q/25883008
favorite count: 0
accepted answer: http://stackoverflow.com/a/25883110
has title: How to focus a text box on pressing a key without entering that keyword into it
upvote count: 1
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25883086
has answer: http://stackoverflow.com/a/25883265
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25883086
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I want to focus into a text box when ever be user press 'S' keyword in keyboard. But the problem is that 'S' keyword also typed in text box (this only happens in chrome). How I can do this here is my code. $(document).keypress(function(event){ if(document.getElementById('search')!==null) { if(event.which==115 &amp;&amp; event.target.nodeName=='BODY') // WHEN USER PRESS 'S' KEYWORD IN KEYBOARD ONLY { $('#search').focus(); } } });
has answer: http://stackoverflow.com/a/25883110
answer count: 3

http://stackoverflow.com/a/25918694
score: 1
has comment: http://stackoverflow.com/comment/40572074
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40572375
has comment: http://stackoverflow.com/comment/40572495
upvote count: 1
answers question: http://stackoverflow.com/q/25918599
has body: The reason '' == 0 is because in Javascript, == will use type coercion to attempt to equate the values. If you want to check to see if the values are equal without type coercion, use ===. A simple way to check for a value being present is !!a.value (!a.value will be true when the value is empty, negated again makes it false)

http://stackoverflow.com/q/25945506
tagged with: javascript
tagged with: sugarcrm
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: soap
answer count: 0
upvote count: 1
has title: How to check impersonation in SugarCRM by Code?
type: Question
tagged with: c#
has body: I want to check that if impersonation is enabled in SugarCRM site by code (C# or JavaScript). I have searched lot in google but I am not able to find anything for that. I am using the SugarCRM's soap api. From that I want to find out the way that if the SugarCRM site is accessible with impersonation. The soap api I am using with C# and JavaScript. Is there any way to find out this? I have checked a Link which shows steps for how to check impersonation. http://kb.omni-ts.com/entry/94/
downvote count: 0

http://stackoverflow.com/q/25916868
tagged with: platform
tagged with: object
type: Question
tagged with: polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/25917504
score: 0
answer count: 1
has body: The issue's impact I have a proprietary library and custom elements to make settings on the library. Separately the library is running fine and so do my custom elements. As soon as I include platform, the functionality of the library gets broken due to missing data. I figured out that set (custom) properties on DOM elements happen to be undefined again where they are expected to still hold set data. At least if platform is not included, the properties hold a defined value. The issue is given within Firefox 32 and Internet Explorer 11. Chrome 37 is not affected, suprisingly not even with polymer-dev sources and Platform = {flags: {debug: true, log: 'data', register: true, shadow: 'polyfill'}}. Backgrounds explained Platform wraps objects to polyfill functionality i.e. ShadowDOM. So I falsely assumed the wrappers to lose set properties by being exchanged/renewed or to do not delegate properly, however the wrappers stay the same. As pointed out by kentaromiura within the #polymer IRC channel on freenode and by Scott in the comment below, platform basically needs to wrap every element, but there are bound to be cases where polymer does not wrap. See ShadowDOM#wrap-and-unwrap and ShadowDOM#known-limitations: Known limitations document, window, document.body, document.head and others are non configurable and cannot be overridden. We are trying to make these work as seamlessly as possible but there will doubtlessly be cases where there will be problems; for those cases you can use wrap and unwrap to get unblocked. Having platform included, within the library problems occur where there is still access to unwrapped elements (access via document.body, document.head) and therefore data is registered or read upon unwrapped DOM elements. Peter supposed so. Possible workarounds Within IRC kentaromiura added to workaround this by: [17:57:27] kentaromiura a) [his] preferred method: using selectors instead of pointer [17:57:46] kentaromiura b) if not possible for any reason use the …
has comment: http://stackoverflow.com/comment/40571836
has title: Set properties on DOM elements happen to be undefined again if I include Polymer Platform on a existing library
tagged with: shadow-dom
type: UnansweredQuestion

http://stackoverflow.com/q/25951760
type: Question
has answer: http://stackoverflow.com/a/25952043
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40630176
upvote count: 4
has body: I'd like to ask if there is a way to use jQuery animate() method to animate horizontal navbar's top property on window scroll. Here is code I use: window.addEventListener("scroll", function() { if (window.scrollY &gt; 200) { $('#navbar').css({top:"100px"}); } else { $('#navbar').css({top:"0px"}); } },false); CSS: #navbar{ top:0; position:fixed; transition: top 0.5s; } When you scroll down 200px the navbar changes its top position from 0 to 100px; This works fine, but if I change methods and put .animate instead of .css, $('#navbar').animate({top:"100px"}); it stops working. Any ideas why?
answer count: 2
linked to: http://stackoverflow.com/q/20185001
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25952254
favorite count: 0
possible better answer: http://stackoverflow.com/a/25952043
has title: how to animate navbar on window scroll
tagged with: css
has answer: http://stackoverflow.com/a/25952254
has comment: http://stackoverflow.com/comment/40629948
type: AnsweredQuestion

http://stackoverflow.com/comment/40748297
type: QuestionComment
has text: you can use '>' operator to find the tbody as `$("#MyTable > tbody")`
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26016985

http://stackoverflow.com/comment/40719730
score: 0
type: Comment
type: QuestionComment
has text: Yes, I know it says I've got an error, but I seriously can't find out why, because `ancoraOK` is defined a line above, but that's not the problem. And I already tried the `$(document).ready` but it seems to not work too.
comment on: http://stackoverflow.com/q/26000599

http://stackoverflow.com/comment/48892720
has text: In Highcharts 4.1.5 $("#chartId").highcharts() is coming back undefined. Has it changed again?
type: Comment
comment on: http://stackoverflow.com/a/26069540
score: 0
type: AnswerComment

http://stackoverflow.com/a/25898798
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25898739
has body: The ? makes the preceding token optional, meaning between "zero or one" time. If you're wanting to only validate when the hyphens are entered, you need to remove the optional quantifier. You could simply write the following to validate that format: var phonenoFilter = /^\d{2}-\d{3}-\d{4}-\d{3}$/
type: Answer

http://stackoverflow.com/comment/40493309
type: AnswerComment
has text: I accidentally put "==" instead of "=", that was my problem. Thanks for your answer
comment on: http://stackoverflow.com/a/25875662
score: 0
type: Comment

http://stackoverflow.com/comment/40598657
score: 4
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25933871
has text: So, what's the problem?

http://stackoverflow.com/q/25956970
has comment: http://stackoverflow.com/comment/40639056
has answer: http://stackoverflow.com/a/25957192
linked to: http://stackoverflow.com/q/7743007
type: Question
has answer: http://stackoverflow.com/a/25957098
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40639024
answer count: 3
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25957158
has title: Loop through characters in array, for each possible combination of 3 characters run code?
has body: In my code, I want to loop through all of the characters in an array, and for each possible combination of 3 characters, execute the following code, then repeat until it has reached all the possible combinations I have no idea where to start, please help if you can This is my code, thanks var link = 'http://www.roblox.com/UserCheck/DoesUsernameExist?username='; var swap = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] //get all combinations of 3 objects in the swap array, for each do this: $.get(link+(the combination of three objects here)).success(function(r) { if (r['success'] == false) console.log(the combination of three objects here); });
score: 1
has comment: http://stackoverflow.com/comment/40639119
upvote count: 1

http://stackoverflow.com/comment/40638563
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25956434
has text: Sorry.I am really thankful if you can give me a suitable example to above code or modified code to above one.because I have no chance to go with jQuery UI dialog instead of above code.
score: 0

http://stackoverflow.com/comment/40693513
score: 0
has text: Because these are quantiles, and assuming there are 8 of them, each section would be 12.5% on the range. But the domain won't be equally split because it is a quantile scale. So if I get a single domain value, how do I know it's position on the output range?
comment on: http://stackoverflow.com/q/25975063
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40760570
type: QuestionComment
comment on: http://stackoverflow.com/q/25978769
has text: Sorry, but it doesn't work. I tried it yesterday after your first comment, and now again, but doesn't work with { categories: json[3] }
score: 0
type: Comment

http://stackoverflow.com/a/56802660
upvote count: 4
score: 1
answers question: http://stackoverflow.com/q/25962958
downvote count: 3
has body: // module.js export function hello() { return "Hello"; } // main.js import {hello} from 'module'; // or './module' let val = hello(); // val is "Hello"; reference from https://hype.codes/how-include-js-file-another-js-file
type: Answer

http://stackoverflow.com/q/25918284
answer count: 1
has body: If a user selects a #bundle, it takes the request through Ajax to this Django view. @ensure_csrf_cookie def getcourses(request): if request.is_ajax(): id = int(request.POST['cat_id']) try: courses = Courses.objects.values('id', 'name').filter(cat_id = id) except Courses.DoesNotExist: courses = None if courses: message = courses return HttpResponse(message) else: message = 'Please select a valid bundle...' return HttpResponse(message) else: return HttpResponseRedirect(reverse('mysite:index')) The view returns this dictionary: {'id': 1L, 'name': u'Python'} {'id': 2L, 'name': u'Django'} {'id': 3L, 'name': u'jQuery'} {'id': 4L, 'name': u'Ajax'} How do I remove these Ls? What I want is to have this dictionary iterated over in jQuery and have them as options under #courses in my HTML. Select a bundle... Web Design Mobile Apps My jQuery code: $(document).on('change', '#bundle', function(){ var $this = $( this ); var $cat_id = $this.val() if ($cat_id.length > 0){ var request = $.ajax({ url: "/mysite/fetchcourses/", type: "POST", data: { cat_id : $cat_id }, dataType: "html" }); request.done(function( msg ) { $.each(msg, function (i, item) { $('#courses').append($(' ', { value: item.id, text : item.name })); }); }); request.fail(function(XMLHttpRequest, textStatus, errorThrown){ alert('errorThrown '+ errorThrown); }) } }) How do I get the dictionary data iterated over and have them as option under #courses? Any help will be appreciated.
has answer: http://stackoverflow.com/a/25918726
tagged with: django
tagged with: python
tagged with: dictionary
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25918726
score: 0
type: Question
has comment: http://stackoverflow.com/comment/40571011
tagged with: javascript
tagged with: jquery
has title: How Do I Get Python Dictionary to Fill HTML Select Option with jQuery?

http://stackoverflow.com/a/25911702
upvote count: 1
has comment: http://stackoverflow.com/comment/40562810
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40566131
has body: You need to modify your transformations, like I said in the comment. Try this: function moveContext() { viewportContext.setTransform(1, 0, 0, 1, 0, 0); // Reset context viewportContext.translate( (viewport.width/2-camera.x+camera.width/2)*scale, (viewport.height/2-camera.y+camera.height/2)*scale ); }; The whole thing: var onClick, onLoad = function () { var canvas, viewport, context, canvasWidth, canvasHeight, viewportContext, background = {}, camera, scale = 4; function init() { background.image = new Image(); background.image.src = "http://upload.wikimedia.org/wikipedia/commons/4/4e/Coronation_of_Ahmad_Shah_Durrani_in_1747_by_Breshna.jpg"; canvas = document.getElementById("canvas"); context = canvas.getContext("2d"); viewport = document.getElementById("viewport"); viewportContext = viewport.getContext("2d"); camera = { x: canvas.width/2, y: canvas.height/2, width: canvas.width/scale, height: canvas.height/scale }; background.width = canvas.width * scale; background.height = canvas.height * scale; }; // Translate viewport's context to camera pos function moveContext() { viewportContext.setTransform(1, 0, 0, 1, 0, 0); // Reset context viewportContext.translate( (viewport.width/2-camera.x+camera.width/2)*scale, (viewport.height/2-camera.y+camera.height/2)*scale ); }; // Update camera's position function moveCamera(vector) { camera.x = vector.x; camera.y = vector.y; moveContext(); }; function draw() { context.drawImage(background.image, 0, 0, canvas.width, canvas.height); // Draw camera guide context.strokeStyle = 'red'; context.beginPath(); context.moveTo(camera.x - camera.width / 2, camera.y - camera.height / 2); context.lineTo(camera.x + camera.width / 2, camera.y - camera.height / 2); context.lineTo(camera.x + camera.width / 2, camera.y + camera.height / 2); context.lineTo(camera.x - camera.width / 2, camera.y + camera.height / 2); context.lineTo(camera.x - camera.width / 2, camera.y - camera.height / 2); context.stroke(); // Draw viewport background viewportConte…
accepted answer of: http://stackoverflow.com/q/25911275
type: Answer
answers question: http://stackoverflow.com/q/25911275
has comment: http://stackoverflow.com/comment/40566154
score: 1

http://stackoverflow.com/comment/40684141
score: 0
type: AnswerComment
has text: @RickHitchcock I hope that it is better now. Do me a favor and upvote it because I did my best to recover that what needs to be recovered.
type: Comment
comment on: http://stackoverflow.com/a/25981037

twitter-bootstrap
tags question: http://stackoverflow.com/q/25915549
tags question: http://stackoverflow.com/q/25903602
tags question: http://stackoverflow.com/q/25976974
tags question: http://stackoverflow.com/q/25888279
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/25922291
tags question: http://stackoverflow.com/q/25977088
tags question: http://stackoverflow.com/q/25944245
tags question: http://stackoverflow.com/q/25996191
tags question: http://stackoverflow.com/q/25921104
tags question: http://stackoverflow.com/q/25991329
tags question: http://stackoverflow.com/q/25924301
tags question: http://stackoverflow.com/q/25978372
tags question: http://stackoverflow.com/q/25996945
tags question: http://stackoverflow.com/q/25893831
tags question: http://stackoverflow.com/q/25997208
tags question: http://stackoverflow.com/q/25900446
tags question: http://stackoverflow.com/q/25957011
tags question: http://stackoverflow.com/q/25966541
tags question: http://stackoverflow.com/q/26027489
tags question: http://stackoverflow.com/q/25892990
tags question: http://stackoverflow.com/q/25968065
tags question: http://stackoverflow.com/q/25876098
tags question: http://stackoverflow.com/q/26003709
tags question: http://stackoverflow.com/q/26018351
tags question: http://stackoverflow.com/q/25984680
tags question: http://stackoverflow.com/q/26028933
tags question: http://stackoverflow.com/q/25920964
tags question: http://stackoverflow.com/q/25995294
tags question: http://stackoverflow.com/q/25926853
tags question: http://stackoverflow.com/q/25881775
tags question: http://stackoverflow.com/q/26004345
tags question: http://stackoverflow.com/q/25956177
tags question: http://stackoverflow.com/q/25960152
tags question: http://stackoverflow.com/q/25905561
tags question: http://stackoverflow.com/q/25987734
tags question: http://stackoverflow.com/q/26013149
tags question: http://stackoverflow.com/q/25889072
tags question: http://stackoverflow.com/q/25914164
tags question: http://stackoverflow.com/q/25895916
tags question: http://stackoverflow.com/q/25945655
tags question: http://stackoverflow.com/q/25996486
tags question: http://stackoverflow.com/q/26024057
tags question: http://stackoverflow.com/q/25971266
tags question: http://stackoverflow.com/q/26006055
tags question: http://stackoverflow.com/q/25885457
tags question: http://stackoverflow.com/q/25917926
tags question: http://stackoverflow.com/q/25978820
tags question: http://stackoverflow.com/q/25912804
type: Tag
tags question: http://stackoverflow.com/q/25958685
tags question: http://stackoverflow.com/q/26025369
tags question: http://stackoverflow.com/q/25967082
tags question: http://stackoverflow.com/q/25898002
tags question: http://stackoverflow.com/q/25961823
tags question: http://stackoverflow.com/q/25951725
tags question: http://stackoverflow.com/q/25948913
tags question: http://stackoverflow.com/q/25876195
tags question: http://stackoverflow.com/q/25972311
tags question: http://stackoverflow.com/q/25982567
tags question: http://stackoverflow.com/q/25875878
tags question: http://stackoverflow.com/q/25995409
tags question: http://stackoverflow.com/q/26015230
tags question: http://stackoverflow.com/q/25997901
tags question: http://stackoverflow.com/q/25929769
tags question: http://stackoverflow.com/q/25996436
tags question: http://stackoverflow.com/q/25876317
tags question: http://stackoverflow.com/q/25995999
tags question: http://stackoverflow.com/q/25935061
tags question: http://stackoverflow.com/q/26027241
tags question: http://stackoverflow.com/q/25895694
tags question: http://stackoverflow.com/q/25920340
tags question: http://stackoverflow.com/q/25880163
tags question: http://stackoverflow.com/q/25997467
tags question: http://stackoverflow.com/q/26025764
tags question: http://stackoverflow.com/q/25988907
tags question: http://stackoverflow.com/q/25996065
tags question: http://stackoverflow.com/q/25958403
tags question: http://stackoverflow.com/q/25900500
tags question: http://stackoverflow.com/q/26014138

http://stackoverflow.com/q/25950791
has comment: http://stackoverflow.com/comment/40627736
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25950845
linked to: http://stackoverflow.com/q/21175290
answer count: 1
duplicate of: http://stackoverflow.com/q/21175290
type: UnansweredQuestion
has title: Object.defineProperty is not working in IE8
has body: I'm working on a JSON Query language, project which is working fine in every browser except IE8. I'm getting this Object doesn't support this action in IE8. Object.defineProperty(FJQL, c, { get: function(){ return (new Query(this, this.records))[c]; } }); Is there any alternative solution to this? Thanks....

http://stackoverflow.com/q/25954354
has comment: http://stackoverflow.com/comment/40635319
has title: How do I get around this on iOS?
score: 0
has comment: http://stackoverflow.com/comment/40634321
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40634225
has comment: http://stackoverflow.com/comment/40634286
type: Question
has body: I am working on an iOS mobile site. I would like to add some content to the top of the page and at the same time scroll the page by the height of the content, so the user will not see the content until they scroll up. Here's the code: page.prepend( stuff ); window.scrollBy( stuff.height() ); This almost works, however there is a brief flash while the content is visible, before it is scrolled up out of view - I guess because adding the content to the DOM is intensive. How can I avoid this?
has comment: http://stackoverflow.com/comment/40634342
has comment: http://stackoverflow.com/comment/40634229
tagged with: ios
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40635631

http://stackoverflow.com/comment/40770894
has text: Tried what? My second lump of code is pseudo-code, there is no `wrapped` variable.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26028993
score: 0

typescript
tags question: http://stackoverflow.com/q/25924288
tags question: http://stackoverflow.com/q/25937698
tags question: http://stackoverflow.com/q/25984258
tags question: http://stackoverflow.com/q/25993861
tags question: http://stackoverflow.com/q/25922224
tags question: http://stackoverflow.com/q/26005687
tags question: http://stackoverflow.com/q/25974831
tags question: http://stackoverflow.com/q/25974541
tag name: typescript
tags question: http://stackoverflow.com/q/25924597
tags question: http://stackoverflow.com/q/25886121
tags question: http://stackoverflow.com/q/25898378
tags question: http://stackoverflow.com/q/25972052
tags question: http://stackoverflow.com/q/25927895
type: Tag
tags question: http://stackoverflow.com/q/25988293

http://stackoverflow.com/a/25943420
downvote count: 0
has comment: http://stackoverflow.com/comment/40620729
upvote count: 3
has comment: http://stackoverflow.com/comment/40616964
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40616989
accepted answer of: http://stackoverflow.com/q/25943393
type: Answer
answers question: http://stackoverflow.com/q/25943393
score: 3
has body: The problem is neither with scope or closures. :-) It's with this, which is a slippery concept in JavaScript. In JavaScript, this during a function call is set almost entirely by how the function is called, not where the function is defined. It's basically a special form of function argument. (This is quite different to its meaning in other languages with similar syntax.) The particular problem in your case is here: this.liveIteration = setInterval(this.incCounter, 1000); When the browser's timer code calls your incCounter, it will do so with this set to the global object, not to your object. So this.counter isn't the counter property on your object (because this doesn't refer to your object), and things don't work as expected. You can solve this several ways, probably the most direct is ES5's Function#bind (which can be shimmed on older browsers): this.liveIteration = setInterval(this.incCounter.bind(this), 1000); Function#bind returns a function that, when called, calls the original function with this set to the first argument you give it. More to explore (on my blog): Mythical methods You must remember this

http://stackoverflow.com/q/25980951
has body: When I am executing the above code nothing is shown. But when i append empty text like $p.append(jQuery.hasData(p) + " "); false is being shown in page. Please let me know why this is behaving like this. Edit : To simplify, my question is why $p.append(false); is not showing anything but $p.append(true); is appending true to the paragraph
has answer: http://stackoverflow.com/a/25982234
type: Question
has answer: http://stackoverflow.com/a/25981082
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25981073
score: 0
answer count: 3
has title: hasData not able to append to paragraph
has comment: http://stackoverflow.com/comment/40683175
type: UnansweredQuestion

http://stackoverflow.com/comment/40550249
score: 0
comment on: http://stackoverflow.com/a/25901475
has text: +1 for "progress bar", I didn t think of that. The module you found is good to, but this is a "link based answer". Just c/p the example code so I can accept the answer : )
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25909549
type: Answer
has comment: http://stackoverflow.com/comment/40555933
score: 1
has body: Your code works, but you are actually clicking the span/label, not the anchor, so preventing the click at that level stops it propagating to the anchor. Best to use delegated event handlers instead: JSFiddle: http://jsfiddle.net/TrueBlueAussie/q7mnvoqj/4/ $('.tbluplift').find('td,a,span').css("cursor", "default"); $('.tbluplift').on("click", "td,a,span", function (e) { console.log("click"); e.preventDefault(); }); The delegated event handlers work by listening for the click to be bubbled up to an ancestor (in this case .tbluplift), so only one handler is attached. It then applies the jQuery filter and then runs the supplied function against any selected elements that actually caused the event. Note, JSFiddle load the code inside a DOM ready handler (by default), so you may need to wrap your code like this: $(function(){ $('.tbluplift').find('td,a,span').css("cursor", "default"); $('.tbluplift').on("click", "td,a,span", function (e) { console.log("click"); e.preventDefault(); }); });
answers question: http://stackoverflow.com/q/25909471
has comment: http://stackoverflow.com/comment/40556289
has comment: http://stackoverflow.com/comment/40555876
upvote count: 1
has comment: http://stackoverflow.com/comment/40554988
has comment: http://stackoverflow.com/comment/40555243
downvote count: 0
has comment: http://stackoverflow.com/comment/40555141
has comment: http://stackoverflow.com/comment/40555497

pivot-table
tag name: pivot-table
tags question: http://stackoverflow.com/q/26002789
type: Tag

http://stackoverflow.com/q/25977522
type: UnansweredQuestion
has body: What I have: I'm writing my very trivial media player. So somewhere in it I have collection of subtitles (let's say about 2 thousands per movie). So each subtitle looks like: Object { id: "1" startTime: 2468 endTime: 4743 text: "Test subtitle." } I want: Very effectively do two things: .next() method which should get me the next subtitle. .getByTime(neededTime) which make something like binary search through the whole subtitles collection in effective way. The point is that the neededTime could be something in between the startTime and endTime attributes (i.e. 3000). Question: I gonna use Backbone collection for my subtitles but how will it handle those two requirements? I mean maybe it'd be better to implement Iterator pattern and binary search manually?
score: 3
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25980516
has title: Backbone Collection: iterate & search effectively
tagged with: javascript
upvote count: 3
answer count: 1
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/q/25980271
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26148974
tagged with: gruntjs
answer count: 1
score: 1
tagged with: yeoman
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has title: Yeoman/Grunt and Grunticon workflow
upvote count: 1
has body: I've started working with Yeoman. I was already using GruntIcon. I'm trying to combine the workflow, but can only think of a very complicated solution. Here's the problem: I've set up Grunticon so that it only converts my svg files in the build task, to the dist folder. However, I want to also use my svg files in the 'app' or 'dev' environment. I can think of only one way: - Making a separate workflow for Grunticon, and manually put it in my app folder and just copy it in my build task. Anyone got a slick grunticon workflow ?

http://stackoverflow.com/comment/40550458
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25907021
has text: What exactly is your question?
score: 0

http://stackoverflow.com/comment/125254810
comment on: http://stackoverflow.com/a/25921387
type: AnswerComment
score: 0
type: Comment
has text: I don't think `\r` is used as a newline in any operating system, it is a carriage return character and not a newline or linefeed character. Windows uses `\r\n` and Unix based systems use `\n` only.

http://stackoverflow.com/a/25989944
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40702091
has body: You're getting a bit mixed up with asynchronous nature of AJAX. The AJAX event is being fired, but it won't be causing any pause in the execution of your code, as such, you need to implement a callback. This code isn't particularly nice, but it should give you an idea of how the data needs to be handled. function setJSONSer() { formData = { 'Email': 'clientlink@russell.com', 'Password': 'russell1234', 'URL': getVaria() }; $.ajax({ url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'POST', data: formData, complete: function(data) { console.log("Successfullly set JSON!"); getJSONSer(); } }); } function getJSONSer() { $.ajax({ url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'GET', complete: function(data) { //alert("This is Get JSON Out "+JSON.stringify(data));# Load(data); } }); } function BeginLoad() { setJSONSer(); } function Load(data) { setJsonSer(); var labels = new Array(); var values = new Array(); var catogories = new Array(); var arrayOfArray = new Array(); var rowData = "return value of JSON.stringify(data)"; } BeginLoad();
has comment: http://stackoverflow.com/comment/40732764
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40732500
has comment: http://stackoverflow.com/comment/40705481
accepted answer of: http://stackoverflow.com/q/25988168
upvote count: 2
answers question: http://stackoverflow.com/q/25988168

http://stackoverflow.com/q/26020068
type: Question
has title: Override dojo module without modify the compact and minified file
tagged with: javascript
tagged with: touch
has comment: http://stackoverflow.com/comment/40942351
downvote count: 0
favorite count: 0
has body: What I need is to apply a fix from dojo 1.10 into dojo 1.9. This fix is related to the iOS 8 crashing touch events on dojo. Due to the specifications of the project, I cannot upgrade dojo or modify the dojo original files, so I need to patch it someway. The fix https://github.com/dojo/dojo/pull/104 doesn't affect to a method inside the 'on' module, it affect to the module instanciation instead, so I cannot extend the module. Does anybody know a way to patch this? I tried to do it but it doesn't work (I checked by my own that the fix works correctly replacing that in the dojo source code, but I cannot do that for the real product as I mentioned before). I think the issue is related to the variables scope, specifically with 'fixTouchListener', as it is maybe not extended into the methods used by the class and I cannot access to it as is not a property of the module result.
type: UnansweredQuestion
tagged with: dojo
has comment: http://stackoverflow.com/comment/40942370
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/40776077
upvote count: 1

http://stackoverflow.com/comment/40564505
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25914914
has text: But how can I use this with css. I need to show image1 at a time, and then image2 like that.
type: AnswerComment

http://stackoverflow.com/comment/40667208
type: QuestionComment
has text: It's not an answer, it's a comment - hence I posted it as such. Yes, there is - read up on CSS media queries.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25972386

http://stackoverflow.com/comment/40698468
type: AnswerComment
comment on: http://stackoverflow.com/a/25989200
has text: as i have used font-awesome classes for icons in my css sheets too
type: Comment
score: 0

http://stackoverflow.com/comment/40694419
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25985611
has text: where is your `object` variable coming from? What is the type of `object`?

http://stackoverflow.com/a/25889204
score: 2
upvote count: 3
downvote count: 1
has body: The example of min_by in the documentation has the following example: a = %w(albatross dog horse) a.min_by {|x| x.length } #=&gt; "dog" So we can roughly translate that to JavaScript as: var arr = ['albatross', 'dog', 'horse']; function minBy(arr) { var result = arr.map(function (el) { return el.length; }); var min = Math.min.apply(null, result); return arr[result.indexOf(min)]; } minBy(arr); // dog max_by would use Math.max.apply instead. function maxBy(arr) { var result = arr.map(function (el) { return el.length; }); var min = Math.max.apply(null, result); return arr[result.indexOf(min)]; } maxBy(arr); // albatross You could also amend the array prototype to get it more Rubyish. if (!('minBy' in Array.prototype)) { Array.prototype.minBy = function (type) { var result = this.map(function (el) { return el[type]; }); var min = Math.min.apply(null, result); return arr[result.indexOf(min)]; }; } arr.minBy('length'); // dog DEMO
answers question: http://stackoverflow.com/q/25888963
type: Answer

http://stackoverflow.com/comment/40527134
has text: Your second query has `name=idpcat`. However nowhere else in your code refers to that query name. Instead you're using `cat2`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25893465

http://stackoverflow.com/q/25890149
answer count: 0
has comment: http://stackoverflow.com/comment/40533429
type: Question
has title: Adding annotations on an image that can move in a canvas style tag
tagged with: javascript
score: 0
has body: I'm trying to do something that seems simple, but I just can't do it. I want to have an image that can be zoomed in and out, probably in a canvas (this I can do it). But, I want to be able to put annotations on this image, like annotations on a map. I could also do this, with an html list positioned on the image. Problem is, I have no idea how to merge these two concept into one, I know I can't really put html in the canvas, so forget about the li there. Example of what I would like to be able to do (this is done in flash): http://www.digitalwanderer.net/darksun/ Any one has any ideas of the way to go to reproduce something like that in html?
has comment: http://stackoverflow.com/comment/40555937
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40519984

http://stackoverflow.com/q/25922323
type: AnsweredQuestion
tagged with: oop
tagged with: widget
score: 1
has answer: http://stackoverflow.com/a/25922497
type: Question
tagged with: jquery-ui-widget-factory
tagged with: javascript
has title: JQuery UI Widget Factory alternatives
has body: I've just found this question that is asking exactly what I was looking for: a way to construct in OOP a widget that can present complex DOM aggregate. I'm not using JQuery so I'm asking alternative to this widget factory, or at least some example/repository where I can read something similar.
accepted answer: http://stackoverflow.com/a/25922497
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/11299238
favorite count: 0
upvote count: 1

http://stackoverflow.com/comment/40533707
score: 0
comment on: http://stackoverflow.com/a/25897506
type: Comment
has text: Is that possible on JavaScript only? Why we use GridView1_RowDataBound.
type: AnswerComment

http://stackoverflow.com/comment/40856647
type: Comment
has text: worked after wrapping the call to the controller in a function passed to ctrlScope.$apply() like this: ctrlScope.$apply(function() { ctrlScope.googleLoginCtrl.signinCallBack(authResult); }); See the first fragment of code in my question. Please edit the answer with this fix before I accept it as the correct answer.
comment on: http://stackoverflow.com/a/26019882
score: 0
type: AnswerComment

http://stackoverflow.com/a/26023520
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40762407
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26023450
has body: Why you just do not push the image url and use it like this : playerLists["MIN - Minnesotta Vikings"].push({ name: "Player 1", url: "/path_to_image.png" }); playerLists["ARI - Arizona Cardinals"].push({ name: "Player 2", url: "/path_to_image.png" }); playerLists["DAL - Dallas Cowboys"].push({ name: "Player 3", url: "/path_to_image.png" }); playerLists["DAL - Dallas Cowboys"].push({ name: "Player 4", url: "/path_to_image.png" }); After that, when you make an iteration you can do : _.each(playerLists, function(player){ console.log(player.name); console.log(player.url); }) (To use _.each, you have to install http://underscorejs.org/)
accepted answer of: http://stackoverflow.com/q/26023450
score: 1
upvote count: 1

http://stackoverflow.com/q/25974135
has answer: http://stackoverflow.com/a/25974878
type: UnansweredQuestion
has title: How to solve knockout applyBindingsToNode adding multiple elements?
tagged with: javascript
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to use knockout applyBindingsToNode to dynamically add and remove elements. The reason is I need to update my html so the binding will be cut that's why I need to use applyBindingsToNode. I have an example here if you click on the button Rebind name, it will add four elements but I only expect 2. Anything I miss? Here's my jsfiddle http://jsfiddle.net/noppanit/dhztqgbz/ var Model = function Model() { var people = ko.observableArray([{ name: 'name1' }, { name: 'name2' }]); var changeElement = function () { people.push({ name: 'name3' }); }; var rebindElement = function () { var peopleList = document.getElementById('people_list'); ko.cleanNode(peopleList); ko.applyBindingsToNode(peopleList, { foreach: [{ name: 'name3' }, { name: 'name4' }] }); }; return { people: people, changeElement: changeElement, rebindElement: rebindElement }; }; ko.applyBindings(new Model(), document.getElementById('wrapper'));
score: 0
tagged with: knockout.js
answer count: 1

http://stackoverflow.com/q/25993668
tagged with: busboy
has answer: http://stackoverflow.com/a/45254183
tagged with: node.js
favorite count: 0
has comment: http://stackoverflow.com/comment/40709080
possible better answer: http://stackoverflow.com/a/45254183
has comment: http://stackoverflow.com/comment/40709245
has answer: http://stackoverflow.com/a/26048284
type: AnsweredQuestion
type: Question
upvote count: 4
answer count: 2
has title: Why is req.busboy undefined?
has body: I am using connect-busboy in Express.js 4 in order to upload files. I have added app.use(busboy({ immediate: true }); in app.js. My route handler looks like this: router.post('/upload', function (req, res) { var fstream; req.pipe(req.busboy); console.log(req.busboy); req.busboy.on('file', function (fieldName, file, fileName) { console.log('Uploading ' + fileName + '...'); fstream = fs.createWriteStream(__dirname + '/data/' + fileName); file.pipe(fstream); fstream.on('close', function () { res.end('ok'); }); }); }); The console.log(req.busboy); returns undefined. Why?!??!
downvote count: 0
accepted answer: http://stackoverflow.com/a/26048284
tagged with: javascript
score: 4
tagged with: express

http://stackoverflow.com/comment/40674465
has text: Missed removing those - sorry :)
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25975286

http://stackoverflow.com/comment/40729800
comment on: http://stackoverflow.com/q/25996891
score: 0
type: QuestionComment
type: Comment
has text: If I'm not mistaken, in the current implementation, if you call `setState` in response to an event, the state will settle before any further events are dispatched.

http://stackoverflow.com/q/25885692
tagged with: jquery
has comment: http://stackoverflow.com/comment/40511695
has comment: http://stackoverflow.com/comment/40511736
score: 0
has comment: http://stackoverflow.com/comment/40511912
has comment: http://stackoverflow.com/comment/40512175
has answer: http://stackoverflow.com/a/25886351
has comment: http://stackoverflow.com/comment/40512007
has comment: http://stackoverflow.com/comment/40511531
accepted answer: http://stackoverflow.com/a/25887064
has comment: http://stackoverflow.com/comment/40512276
has title: jQuery validation works but not the right way
possible better answer: http://stackoverflow.com/a/25886351
has comment: http://stackoverflow.com/comment/40512003
type: AnsweredQuestion
type: Question
answer count: 2
has body: I have a simple jQuery validation where I need to check required fields over different pages in my website. At the moment I have a the following code which works. I check the function check_inputs(), but in my opinion this is not the right way. // Check the required fields function check_inputs() { var errors = false; jQuery('#wiz-action .required').each(function () { var input = jQuery(this); if (input.val().length < 1) { input.addClass('error'); errors = true; } else { input.removeClass('error'); errors = false; } }); if (errors == false) { return true; } } // Check fields on blur $('#wiz-action input.required').blur(function () { var input = $(this); input.removeClass('error'); if (input.val().length < 1) { input.addClass('error'); } else if (!input.val().match(/^\d+$/)) { input.addClass('error'); } }); // Check fields by clicking "next" link $('#next-link').click(function (e) { if (check_inputs() == true) { // Do something } else { $('.error-message').fadeOut(200).fadeIn(200); } }); .error { border: 1px solid #f00; } Next
has comment: http://stackoverflow.com/comment/40512026
tagged with: validation
has answer: http://stackoverflow.com/a/25887064
tagged with: javascript

http://stackoverflow.com/q/25933569
favorite count: 0
has title: Getting started with JSC3D. Creat a simple file viewer in JSC3D. File not loading
linked to: http://stackoverflow.com/q/3582671
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/73299800
has answer: http://stackoverflow.com/a/33377476
has answer: http://stackoverflow.com/a/26445718
tagged with: jsc3d
type: UnansweredQuestion
has body: I have just started using JSC3D. I have followed the getting started guide in the documentation: https://code.google.com/p/jsc3d/wiki/GettingStarted The code seems fine but my file does not seem to load, the loading bar just freezes. <TITLE>Loader It seems you are using an outdated browser that does not support canvas :-( Does anyone know where I am going wrong? Regards, Mr B EDIT: Seem to work fine when not testing in chrome. Could be a problem with loading external files in chrome.
upvote count: 1
linked to: http://stackoverflow.com/q/4100927
type: Question
score: 1
tagged with: viewer
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40601648
has text: Excellent! just what I wanted, I don't understand it very well though so I will have to debug! thanks
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25935418

http://stackoverflow.com/q/25987573
tagged with: javascript
type: UnansweredQuestion
has title: HTML5 : How to get native player Prev and Next button event in iOS
favorite count: 0
has body: I am playing video in iOS using html5 video player. I am using following code for that : var player = $('#videoPlayer'); player.attr('src',video.file_url); player.play(); It is working fine and it is playing on native video player . But the problem comes when I tried to play the videos sequentially . I want the next and previous button event from native iOS player . Right now I can detect the next button event by attaching the onend event listener to the video . But the problem is with the Prev button click I have tried many events but unfortunately could not get that prev button click . Is there any way to get that button event ?
type: Question
has comment: http://stackoverflow.com/comment/41140795
score: 5
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/41325373
answer count: 1
has answer: http://stackoverflow.com/a/26218837
upvote count: 5
tagged with: iphone
has comment: http://stackoverflow.com/comment/41140499
downvote count: 0
tagged with: ios

http://stackoverflow.com/q/25924132
type: Question
has comment: http://stackoverflow.com/comment/40584768
has body: I have 2 different types of Jssor sliders on a website. The problem I encounter is setting up 2 different sets of options for each slider. I tried renaming the second variable from options to optionss temporarily but the sliders break and don't run. if I use the same variable of options I have no problem and both work. The problem is I want to run 2 different options as one slider is a gallery and the other is scrolling logos. Any help is greatly appreciated. Ok I figured it out... make sure you use the naming convention of options1 &amp; var options2 etc... incrementing the numerical value for any additional slide you have on the page... var jssor_slider1 = new $JssorSlider$("main_header_slider", options1); var jssor_slider2 = new $JssorSlider$("content_gallery", options2); var jssor_slider3 = new $JssorSlider$("footer_banner", options3);
tagged with: javascript
tagged with: jquery
score: 0
answer count: 0
type: UnansweredQuestion
tagged with: jssor
has title: Using Two Different Options for Two Seperate Jssor Sliders on Same Page
has comment: http://stackoverflow.com/comment/40584120

http://stackoverflow.com/comment/40726469
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26001166
has text: i fixed my actual gallery with the "joe watkins" method. The problem is that i can't actually swipe in mobile. Can anyone help me out ? you can check page and code at http://www.morlotti.com/test

http://stackoverflow.com/comment/40567105
type: Comment
comment on: http://stackoverflow.com/a/25915876
type: AnswerComment
score: 0
has text: thank you for the article. Yes target now has the layer object.

http://stackoverflow.com/a/30337865
upvote count: 30
downvote count: 0
has body: Single line text truncation can be easily achieved using css text-overflow property, which is supported by all major browsers, including IE since version 6. The thing is that text-overflow alone doesn't do much. It only defines what will happen when there is text overflowing the container. So in order to see results, we first need to make the text overflow, by forcing it to a single line. It is also important to set the overflow property of the container: .truncated { display: block; white-space: nowrap; /* forces text to single line */ overflow: hidden; text-overflow: ellipsis; } .truncated { display: block; white-space: nowrap; /* forces text to single line */ overflow: hidden; text-overflow: ellipsis; } &lt;div class="truncated" style="width: 200px"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in enim ac libero laoreet molestie vel ultricies magna. Mauris ullamcorper mi vitae nunc gravida, bibendum scelerisque velit ultrices. Vivamus non consectetur mauris. Donec luctus orci sit amet leo suscipit, quis luctus nunc egestas. &lt;/div&gt; &lt;div class="truncated" style="width: 300px"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in enim ac libero laoreet molestie vel ultricies magna. Mauris ullamcorper mi vitae nunc gravida, bibendum scelerisque velit ultrices. Vivamus non consectetur mauris. Donec luctus orci sit amet leo suscipit, quis luctus nunc egestas. &lt;/div&gt; &lt;div class="truncated" style="width: 400px"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in enim ac libero laoreet molestie vel ultricies magna. Mauris ullamcorper mi vitae nunc gravida, bibendum scelerisque velit ultrices. Vivamus non consectetur mauris. Donec luctus orci sit amet leo suscipit, quis luctus nunc egestas. &lt;/div&gt; &lt;div class="truncated"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in enim ac libero laoreet molestie vel ultricies magna. Mauris ullamcorper mi vitae nunc…
type: Answer
score: 30
answers question: http://stackoverflow.com/q/26019875

http://stackoverflow.com/a/25887815
accepted answer of: http://stackoverflow.com/q/25887801
answers question: http://stackoverflow.com/q/25887801
has body: Nope, no difference between the 2 examples, functionally. However, statement 2 can cause confusion. This is because i is not scoped to the for block, it's accessible outside of that for loop, which can result in a polluted global scope. Just make sure you keep track of your variables when using them like statement 1. Personally, I prefer something like this: var i; for(i = 0; i &lt; 10; i++){ // Do stuff } for(i = 0; i &lt; 20; i++){ // Do other stuff } This way, you'll always have your iterator properly set.
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/40515255
type: Answer

http://stackoverflow.com/a/25976124
upvote count: 1
answers question: http://stackoverflow.com/q/25976078
type: Answer
has body: ^.*?=([\w.]+).*$ Try this.See demo. http://regex101.com/r/kM7rT8/9
downvote count: 0
score: 1

http://stackoverflow.com/q/25895676
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/40529981
has comment: http://stackoverflow.com/comment/40534021
has comment: http://stackoverflow.com/comment/40532895
has title: How to stop D3.js from creating infinite areas from linear polygons
tagged with: tilestache
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion
has body: I'm trying to draw topojson features with D3, they are generated by TileStache from a PostGIS database. Small triangular polygons tend to simplify into "lines": the 3 points are on a straight line. If the TopoJSON goes like this the polygon is drawn as a line: "arcs":[[[609,278],[-1,-1],[-1,-1],[2,2]]] However if the TopoJSON goes like this: "arcs":[[[609,278],[-2,-2],[1,1],[1,1]]]} An infinite area with a 'line shaped' hole is drawn, messing up the map. How can I stop D3 from creating infinite areas when the feature is line-shaped? You can see the effect of the two styles of TopoJSON here: http://research.geodan.nl/sites/vectortiling/test/faultytile.html The are greater effect of these infinite features is visible here: http://research.geodan.nl/sites/vectortiling/
has answer: http://stackoverflow.com/a/25913397
upvote count: 1
tagged with: topojson
has comment: http://stackoverflow.com/comment/40552672
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40730811
comment on: http://stackoverflow.com/a/25995155
score: 0
type: AnswerComment
has text: Thanks. This is way better than my original approach and it works perfectly fine, too. Don't know why i didn't see this in the MathJax docu.
type: Comment

http://stackoverflow.com/q/25884619
tagged with: http://stackoverflow.com/tag/json
has body: Hello i have problem to load data in flotchart.js here's the original code that works var pageviews = [ [1,2], [2, 3] ]; var visitors = [ [1, 3], [2, 2] ]; var plot = $.plot($("#site_statistics"), [{ data: pageviews, label: "Unique Visits" }, { data: visitors, label: "Page Views" }]); but when i change the data that i load from json it doesn't work. here's the data json on load_statistik_bidang.php: [{"data":[["1",12],["1",11],["3",10],["14",9]],"label":"EMSA"},{"data":[["1",12],["4",9]],"label":"BSSA"},{"data":[["1",2],["1",10]],"label":"OSSAC"}] if i copy the json in manual it's works but when im using function to load the data it doesnt work . code that i load the json is like this : function loadMyData(){ $.ajax({ url:"load_statistik_bidang.php", dataType: "json", method:"get", success: function(data){ tampung = data; console.log(data.EMSA); } }); } var plot = $.plot($("#site_statistics"), tampung); any ideas for this? thanks
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25884700
type: UnansweredQuestion
has title: Cant Load Data from JSON in FlotChart.js

http://stackoverflow.com/comment/40683104
comment on: http://stackoverflow.com/q/25980224
score: 0
type: Comment
type: QuestionComment
has text: If the down vote was for lack of information, I've updated the post to explain more about how and what I'm doing.

http://stackoverflow.com/comment/40560914
type: QuestionComment
comment on: http://stackoverflow.com/q/25912993
type: Comment
score: 1
has text: What `` tag? :)

http://stackoverflow.com/q/25988907
downvote count: 1
has title: FontAwesome doesn't display in Firefox 33
has answer: http://stackoverflow.com/a/25989200
tagged with: font-awesome
type: Question
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40699373
favorite count: 0
has comment: http://stackoverflow.com/comment/40697613
tagged with: http://stackoverflow.com/tag/html
has body: here is the code and fontawesome fonts are displaying on chrome but not in mozilla 33.0.what is the mistake i am doing? Welcome To Sri Mata Anandamayi Ashram <!--[if lt IE 8]> <![endif]-->
answer count: 1
tagged with: css
score: -1
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40697626

http://stackoverflow.com/comment/40629532
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25945406
type: Comment
has text: I'd never have guessed that. I always assumed `node.js` Buffers and ArrayBuffers were the same. Thank you very much.

http://stackoverflow.com/comment/40765641
score: 0
has text: if the function isn't being found - then another possibility is that there is a syntax error in the javascript file. So then file isn't parsed correctly - resulting in this type of error too.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26025115

http://stackoverflow.com/q/25893465
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: i have a jquery accordion menu. i work with coldfusion. with an AJAX function, i have my data for my menu. With Coldfusion, i created several dynamic li with a different id. and with jquery or javascript, i would like to fill my li Test My first li are ok. with jquery i can to fill my li with that : $("#"+my_id_li).html(value[i][1]) but for my second li no text appears my id li are ok and data are ok I don't know why my second li doesn't appears in my menu
tagged with: coldfusion
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40525436
has comment: http://stackoverflow.com/comment/40527057
has title: add text dynamically li in accordion jquery Coldfusion
has comment: http://stackoverflow.com/comment/40527134
has comment: http://stackoverflow.com/comment/40526119
type: Question
downvote count: 2
score: -2
has answer: http://stackoverflow.com/a/25905659
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40518780
has text: Not in your code. Try posting more than 3 lines.
score: 3
comment on: http://stackoverflow.com/q/25890026
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40751847
type: Comment
has text: Thank you, this works. Sorry I couldn't get back to you sooner!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25952575

http://stackoverflow.com/q/26019081
upvote count: 0
has title: Iframe that works with Div Button
type: UnansweredQuestion
tagged with: iframe
has body: I have an image that is inside a div. The image is a play button. On top of the image I have placed an iframe which is invisible. When I click the image I want the iframe to appear and start playing ok i think i found a code that is supposed to do the same thing but i cant make it work but its not working.... any help?? i found a simmilar working example here http://www.plaisio.gr/Campaign/20140808-Turbo-x-Smartphone-P.htm
type: Question
has answer: http://stackoverflow.com/a/26019720
score: -1
answer count: 1
tagged with: javascript
downvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/40752480
favorite count: 0

http://stackoverflow.com/comment/40593897
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25930957
type: QuestionComment
has text: If events on disabled elements is your concern this might help: http://stackoverflow.com/questions/3100319/event-on-a-disabled-input

http://stackoverflow.com/comment/40741066
comment on: http://stackoverflow.com/a/25998874
has text: hey joe, your explanation is quite well. but i thing i need to do is instead of 60 its .60 as you have taken the module and then remainder is obtain. I debug and check different values its like in the format 0.25 0.89 0.66 0.59 etc. By the way thanks for the reply
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40652353
comment on: http://stackoverflow.com/q/25963471
score: 1
type: Comment
type: QuestionComment
has text: The `element` variable is a Javascript reference to that ` `. When you set its class name to `test`, the ` ` pointed to by that variable gets a class name of `test`. What were you expecting?

http://stackoverflow.com/q/25972617
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26165241
tagged with: visual-studio-lightswitch
tagged with: lightswitch-2013
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26131040
score: 0
has answer: http://stackoverflow.com/a/26165241
possible better answer: http://stackoverflow.com/a/26131040
has title: Lightswitch 2013 - passing a parameter to a details picker on load
has body: What I am trying to do is add an item to an order. and I want it to pass the OrderID from the previous screen to the new screen (which I have achieved and you can see below) however the user still has to press the + arrow on the details picker and select it. I want to remove this and just do it automatically... any tips:

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/26010477
tags question: http://stackoverflow.com/q/25894024
tags question: http://stackoverflow.com/q/26032602
tags question: http://stackoverflow.com/q/25979429
tags question: http://stackoverflow.com/q/25919651
tags question: http://stackoverflow.com/q/25886802
tags question: http://stackoverflow.com/q/25972656
tags question: http://stackoverflow.com/q/25949510
tags question: http://stackoverflow.com/q/25957313
tags question: http://stackoverflow.com/q/25974711
tags question: http://stackoverflow.com/q/25959227
tags question: http://stackoverflow.com/q/25899715
tags question: http://stackoverflow.com/q/25939697
tags question: http://stackoverflow.com/q/25988322
tags question: http://stackoverflow.com/q/25969147
tags question: http://stackoverflow.com/q/26027349
tags question: http://stackoverflow.com/q/26017137
tags question: http://stackoverflow.com/q/25919212
tags question: http://stackoverflow.com/q/26023904
tags question: http://stackoverflow.com/q/25906263
tags question: http://stackoverflow.com/q/25917921
tags question: http://stackoverflow.com/q/26007010
tags question: http://stackoverflow.com/q/25952050
tags question: http://stackoverflow.com/q/25917703
tags question: http://stackoverflow.com/q/25883531
tags question: http://stackoverflow.com/q/25910804
tags question: http://stackoverflow.com/q/25898241
tags question: http://stackoverflow.com/q/26002228
tags question: http://stackoverflow.com/q/26026193
tags question: http://stackoverflow.com/q/26013455
tags question: http://stackoverflow.com/q/26025812
tags question: http://stackoverflow.com/q/25920518
tags question: http://stackoverflow.com/q/26033441
tags question: http://stackoverflow.com/q/25918453
tags question: http://stackoverflow.com/q/25904398
tags question: http://stackoverflow.com/q/25999045
tags question: http://stackoverflow.com/q/26008168
tags question: http://stackoverflow.com/q/25885230
tags question: http://stackoverflow.com/q/25875168
tags question: http://stackoverflow.com/q/25900676
tags question: http://stackoverflow.com/q/26028447
tags question: http://stackoverflow.com/q/26031934
tags question: http://stackoverflow.com/q/26014172
tags question: http://stackoverflow.com/q/25880810
tags question: http://stackoverflow.com/q/25878916
tags question: http://stackoverflow.com/q/25988293
tags question: http://stackoverflow.com/q/25987965
tags question: http://stackoverflow.com/q/25918362
tags question: http://stackoverflow.com/q/25969422
type: Tag
tags question: http://stackoverflow.com/q/25999853
tags question: http://stackoverflow.com/q/26010599
tags question: http://stackoverflow.com/q/25881803
tags question: http://stackoverflow.com/q/26027474
tags question: http://stackoverflow.com/q/25992722
tags question: http://stackoverflow.com/q/25978158
tags question: http://stackoverflow.com/q/25906055
tags question: http://stackoverflow.com/q/25916438
tags question: http://stackoverflow.com/q/25898853
tags question: http://stackoverflow.com/q/25934429
tags question: http://stackoverflow.com/q/25889194
tags question: http://stackoverflow.com/q/25899329
tags question: http://stackoverflow.com/q/25981053
tags question: http://stackoverflow.com/q/25954604
tags question: http://stackoverflow.com/q/25951094
tags question: http://stackoverflow.com/q/25987719
tags question: http://stackoverflow.com/q/25933840
tags question: http://stackoverflow.com/q/25931643
tags question: http://stackoverflow.com/q/25876331
tags question: http://stackoverflow.com/q/25940129
tags question: http://stackoverflow.com/q/26007439
tags question: http://stackoverflow.com/q/25991469
tags question: http://stackoverflow.com/q/25914339
tags question: http://stackoverflow.com/q/25908673
tags question: http://stackoverflow.com/q/25981909
tags question: http://stackoverflow.com/q/25891848
tags question: http://stackoverflow.com/q/25978533
tags question: http://stackoverflow.com/q/25988168
tags question: http://stackoverflow.com/q/25969017
tags question: http://stackoverflow.com/q/26018037

http://stackoverflow.com/comment/40762450
comment on: http://stackoverflow.com/a/26024384
score: 0
type: AnswerComment
has text: Most likely, but it's overhead. Either way, assigning the variable inside the function will still work, but the parameter is not a reference of the original variable. He'll have to return it and assign `a` to it
type: Comment

http://stackoverflow.com/a/26028470
has body: I'm not a Regex expert, but the following seems to work on this data set. //Your data simulated. var data = document.getElementById('data').innerHTML; var myRegexp = /\/applications\/([0-9a-zA-Z]*)\/containers/g; //Group iteration from: http://stackoverflow.com/a/432503/402706 var match = myRegexp.exec(data); while (match != null) { //write out each id that was found console.log(match[1]); // matched text: match[0] // match start: match.index // capturing group n: match[n] match = myRegexp.exec(data); }
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40770643
answers question: http://stackoverflow.com/q/26028284

http://stackoverflow.com/q/26008338
answer count: 0
has body: Hi I am using ember for my client side application .here is my code which is in emberView When I want to use transitionToRoute inside the kill action, it is showing the above error. and my routes are like this App.Router.map(function () { this.route('groups'); this.resource('group', { path: 'group/:uuid' }, function() { this.route('people'); this.route('vehicles'); this.route('reports'); this.route('geofences'); }); }); currently I am at the route of child View (group/:uuid/people) and once if i call the above Tile View of kill action it has redirect to parentRoute of (groups) App.TileView = Ember.View.extend({ actions:{ kill: function() { var dfd = new $.Deferred(); var t = this,resolveEntity = false; this.set('waitingOnDelete', true); //this.get('entity').kill().done(this.remove.bind(this)); var pid = this.get('entity').id; this.get('entity').kill().then(function() { t.remove(); if ((t.get('entityType') === 'association') &amp;&amp; (DS.session.user_uuid === pid)) { resolveEntity = true; dfd.resolve(resolveEntity); if(resolveEntity){ t.get('controller').transitionToRoute('groups'); } } }); } } });
type: UnansweredQuestion
upvote count: 1
score: 1
has title: Uncaught TypeError: Cannot read property 'transitionToRoute' of null
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ember.js

http://stackoverflow.com/a/25938987
type: Answer
answers question: http://stackoverflow.com/q/25938952
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25938952
has comment: http://stackoverflow.com/comment/40608763
score: 1
has body: Of course! You simply use ng-value to set the value according to an Angular expression, and use a $scope property. Live Demo You're also using invalid property names. radio-input-shows is not valid JavaScript and is throwing an error. That should camelCased radioInputShows or at least something that isn't a syntax error. Lastly, you should always follow the "dot" rule so that child scope changes affect parent scopes. Show = In the controller: $scope.foo = { // default value radioInputShows: '123' }; This is just taking advantage of object references to share changes.
has comment: http://stackoverflow.com/comment/40609568
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40608502
has comment: http://stackoverflow.com/comment/40610316

http://stackoverflow.com/comment/40608542
score: 0
type: QuestionComment
has text: @AmadeusDrZaius: You're right, the close vote was incorrect. Re-opened. Any way, you _really_ shouldn't use `document.write()`. You'll have no idea where in the document the string is added.
comment on: http://stackoverflow.com/q/25938948
type: Comment

http://stackoverflow.com/a/26018366
type: Answer
answers question: http://stackoverflow.com/q/26003896
downvote count: 0
has body: I figured out the answer to my own question so I thought that I would post it here. I had to add: color: { pattern: ['#363FBC', '#363FBC', '#B73540', '#B73540'] } Instead of: colors: { 'Line1': '#ff0000' }
upvote count: 8
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41478610
score: 8
accepted answer of: http://stackoverflow.com/q/26003896

http://stackoverflow.com/a/25895952
accepted answer of: http://stackoverflow.com/q/25892298
answers question: http://stackoverflow.com/q/25892298
type: AcceptedAnswer
downvote count: 0
has body: This was a known issue for past versions of Moment.js: YYYY-MM-DD with 3 digit year returns true for isValid(). It was fixed in December 2013, and your code works as expected with the most recent version of the library. Version 2.3.1 was released in October 2013 and does not include this fix.
type: Answer
has comment: http://stackoverflow.com/comment/40530632
upvote count: 3
score: 3

http://stackoverflow.com/q/25976928
tagged with: templates
has answer: http://stackoverflow.com/a/25977159
has body: I have a controller that update a value according to a radiobuttons list. MyTypes = { "cat": 0, "dog": 1, "cow": 2 }; function MyController($scope) { $scope.value= 1; //Updated by a radiobuttons list } Type ({{value}}) This would display "1". I would like to display "dog". Is there a way to call a function inside the html template? This function would find the key associated to value.
downvote count: 1
type: Question
tagged with: enums
has title: Process a value before displaying it with AngularJS
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/40763494
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26024796
has text: When making regexes, I like using a site like: http://regex101.com/
score: 0

http://stackoverflow.com/q/25931881
has comment: http://stackoverflow.com/comment/40595524
accepted answer: http://stackoverflow.com/a/25932057
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: php
has body: I've been trying to get my three update same time when I click button to get update it will count for new feeds, notifications and messages. I've tried by using setInterval( "getupdate()", 10000 ) too, to get update automatically every 10 seconds but doesn't work for second and third divs. Or because Ajax doesn't support many load() call? Now, I have no idea how should I do and need your helps. Thanks. Javascript function getupdate(){ $('#newsfeed').load('getnewsfeed.php'); $('#notify').load('getnewnoti.php'); $('#message').load('getnewmessage.php'); } HTML Get Update
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40595423
has title: Why doesn't ajax load() work after second and third call?
has comment: http://stackoverflow.com/comment/40595605
has answer: http://stackoverflow.com/a/25932057
type: Question
has comment: http://stackoverflow.com/comment/40595885
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

yii
tags question: http://stackoverflow.com/q/26006578
tags question: http://stackoverflow.com/q/25924301
tag name: yii
type: Tag
tags question: http://stackoverflow.com/q/25923501
tags question: http://stackoverflow.com/q/26015924
tags question: http://stackoverflow.com/q/25984039
tags question: http://stackoverflow.com/q/25982567
tags question: http://stackoverflow.com/q/25907499
tags question: http://stackoverflow.com/q/25951239
tags question: http://stackoverflow.com/q/25989578
tags question: http://stackoverflow.com/q/25988169

http://stackoverflow.com/comment/40689390
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25984129
has text: *"But the selected value is not reflected in the user interface."* Are you saying that the selection is immediately reset after the user makes a selection? That's not normal, so code must be doing that. There shouldn't be a reason to set the attribute explicitly. Please provide more context.

http://stackoverflow.com/a/25879038
type: Answer
accepted answer of: http://stackoverflow.com/q/25878852
answers question: http://stackoverflow.com/q/25878852
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40500235
has body: Ok you don't can you javascript syntax by parsing XML or HTML. I know this library not really good. But i think you can find your desired Element with: -(HTMLNode*)findChildWithAttribute:(NSString*)attribute matchingName:(NSString*)className allowPartial:(BOOL)partial and the child elements or innerHTML with -(NSArray*)children
score: 0

http://stackoverflow.com/q/25931259
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40594695
score: 2
has comment: http://stackoverflow.com/comment/42173250
has comment: http://stackoverflow.com/comment/42169413
type: Question
tagged with: google-maps
tagged with: infowindow
downvote count: 0
tagged with: javascript
has body: I'm using Google Maps Javascript v3 API and MarkerClusterer JS in my Ruby on Rails application. I want following functionality in my map. I've some markers on my map, in that map markers forms a cluster when I zoom out the map, and again gets separated when I zoom in. When I click on the particular marker it displays the info-window of that marker, and when I click on the cluster it displays the info-window related to that cluster. this is the current behavior of my map. Now when I click on the particular marker on the map, it displays the info-window of that marker, now I zoom out that and when the marker becomes the part of cluster then the info-window of that marker is hidden, I want that info-window to remain displayed on cluster also. I'm using global info-window for markers and clusters. here is the some code that handles map in my application. function createMarker(latlng, name, html) { // create new google marker using the latitude and longitude that is passed into this function as "latlng" var marker = new google.maps.Marker({ position: latlng, draggable: true , map: map, zIndex: Math.round(latlng.lat()*-100000)&lt;&lt;5, icon: '/assets/pin.png', }); // add click event listner to the created marker google.maps.event.addListener(marker, 'click', function() { // clear the previous content of infowindow infowindow.setContent('');; // close the infowindow infowindow.close(); // set the content of infowindow that is passed into this function as "html" infowindow.setContent(html); // open the new infowindow with the created marker infowindow.open(map,marker); clearUpMenus(); }); // add closeclick event listner when user clicks on the close button on the infowindow google.maps.event.addListener(infowindow,'closeclick',function(){ // set the map of the marker to null marker.setMap(null); check = null; }); // add drag event listner when user drags the created marker google.maps.event.addListener(marker,'dragend',function(event) { // update latitude and longitude of …
tagged with: google-maps-api-3
tagged with: ruby-on-rails-3
has comment: http://stackoverflow.com/comment/42169617
favorite count: 0
has title: How to keep info-window of particular marker displayed on cluster?
answer count: 0

http://stackoverflow.com/q/26007854
answer count: 2
accepted answer: http://stackoverflow.com/a/26023729
tagged with: javascript
tagged with: angularjs
linked to: http://stackoverflow.com/q/1606797
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26023729
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/40732364
type: Question
has body: Is there any case where a Constructor returns something on purpose and it still makes sense to new it? var Fn = function(){ return this.fn = function(){} } var a = new Fn() var b = Fn() I can't seem to find any difference between a and b from console, but just in case I missed something, are they identical? Apart from b's side effect of adding fn as a method to window object. And if they're the same, does it mean that when a Constructor returns something, it's no longer a Constructor and shouldn't be newed? Edit, the reason I'm asking is that I'm working with Coffee and Angular at the moment, while both seem to be pretty sensitive about return, especially with providers. Do you have any best practises regarding this?
has title: Does New make any sense in this case?
has comment: http://stackoverflow.com/comment/40761337
possible better answer: http://stackoverflow.com/a/26029154
has answer: http://stackoverflow.com/a/26029154

http://stackoverflow.com/a/26019561
has body: Sometimes when you write the question down the answer becomes clearer... I was reinitializing Swiper on window.resize to manage the dynamic sizing. The resize event was getting triggered by the textarea on mobile devices. Maybe this is due to the soft keyboard popping up. Anyway, removing the reinitialize on resize solved the problem.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26018434
type: Answer
answers question: http://stackoverflow.com/q/26018434

mobile-safari
tags question: http://stackoverflow.com/q/25916993
tags question: http://stackoverflow.com/q/26024488
tags question: http://stackoverflow.com/q/26030565
tag name: mobile-safari
tags question: http://stackoverflow.com/q/25928605
type: Tag
tags question: http://stackoverflow.com/q/25970466
tags question: http://stackoverflow.com/q/26019147
tags question: http://stackoverflow.com/q/25983608
tags question: http://stackoverflow.com/q/25999083

http://stackoverflow.com/a/25948941
has body: How about this: Meteor.methods({ reviewUpsert : function(id, doc){ ... if( (doc.rating &gt; 10) || (doc.rating &lt; 0) ){ throw new Meteor.Error( ... ) } } }) As for stopping the same user from entering a rating repeatedly, you will have to track which users have rated which videos and update their rating instead of simply adding new ratings blindly.
answers question: http://stackoverflow.com/q/25948842
upvote count: 1
has comment: http://stackoverflow.com/comment/40647615
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40632119
score: 1

http://stackoverflow.com/a/26033332
score: 3
downvote count: 0
upvote count: 3
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26029521
has body: Figured it out! We went from being able to render 5k things at 60fps to 100k things at approx 40fps. We followed what most people are saying out there about merging meshes, but it took some experimentation to really understand what was happening and getting multiple textures/materials to work. for (var i = 0; i &lt; 100000; i++) { // creates a mesh from the geometry and material from the question and returns an object circle = ourCircleFactory.create(); circle.shape.updateMatrix(); sceneGeometry.merge(circle.shape.geometry, circle.shape.matrix, circle.cachedMaterialIndex); } var finalMesh = new three.Mesh(sceneGeometry, new THREE.MeshFaceMaterial(cachedMaterials)); scene.add(finalMesh); That code will create 1 geometry per cached material. cachedMaterialIndex is something we created to cache textures and indicate which material to use. It is likely that this code will create 1 geometry per combination of material and geometry. EG: if you have 5 geometries and they are interchangeable with 5 materials then you will get 25 geometries. It seems that it doesn't matter how many objects you have on screen. Note: we were getting 15fps with 5000 geometries so I think this is a fairly cheap solution.
accepted answer of: http://stackoverflow.com/q/26029521
type: Answer

http://stackoverflow.com/comment/40589840
type: QuestionComment
comment on: http://stackoverflow.com/q/25928053
score: 0
has text: Try -> [Get or Set value to Controls inside iFrame from Parent](http://www.codeproject.com/Tips/656521/Get-or-Set-value-to-Controls-inside-iFrame-from-Pa)
type: Comment

http://stackoverflow.com/comment/40575294
type: QuestionComment
comment on: http://stackoverflow.com/q/25920483
has text: Let the new page load that the navigateToUrl() function pulls up.
score: 0
type: Comment

http://stackoverflow.com/comment/40981546
type: AnswerComment
has text: Thanks @laurent! It works like a charm and now I understand how it works! I'm able to continue from here!
type: Comment
comment on: http://stackoverflow.com/a/26011830
score: 0

http://stackoverflow.com/q/25957424
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25959836
tagged with: http://stackoverflow.com/tag/html
has body: I want my browser to run this code: Asynchronous Loading I want to send the code as a string with an aspx file: <%@ Page Language="C#" %> Info windows <%Response.Write(s2 + " "); %> When I am trying to run it, it doesn't show the map.. As if it doesn't read the javascript. Can someone show me what is my problem in the code?
type: Question
tagged with: javascript
score: 0
tagged with: google-maps
has title: Combine c# and google maps javascript API
answer count: 1
tagged with: asp.net

http://stackoverflow.com/q/25876912
has body: I've created a custom jQuery UI widget. It looks something like this: $.widget('wx.datetime', { options: { dateFormat: 'd-M-yy', timezone: '', ... }, _create: function() { ... } ... } Now how can I override those option defaults globally?
accepted answer: http://stackoverflow.com/a/25877825
type: AnsweredQuestion
tagged with: jquery-ui
type: Question
has answer: http://stackoverflow.com/a/25877825
has title: How to set defaults on custom widget?
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25916472
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25916385
has body: Assuming you want the value &amp; text the same: for (i = 0; i &lt; 9; i++) { var option = document.createElement('option'); option.value = option.innerHTML = parties[i]; select.appendChild(option); } form.appendChild(submit);
answers question: http://stackoverflow.com/q/25916385
has comment: http://stackoverflow.com/comment/40578732

http://stackoverflow.com/a/25936518
score: 0
has body: Just add a pointer-event:none to the .hover class Working example: http://jsfiddle.net/4ba70vy3/
type: Answer
answers question: http://stackoverflow.com/q/25936334

http://stackoverflow.com/q/25951345
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25951435
type: Question
tagged with: javascript
has body: I've build a webapp about TV Shows as a practice to learn AngularJS. What I need now, though, is to change a class based on which radio button is checked. This is the view: <div ng-class="{ {{ show.name }}:'col-md-12 chosen', !{{ show.name }}:'col-md-12' }[tvshow.chosen]" ng-repeat="show in shows" TV Show = How do I go from here to change the class of #image
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25951439
has title: Change class based on radio button in Angular
has answer: http://stackoverflow.com/a/25951571
tagged with: angularjs

http://stackoverflow.com/q/25913399
has title: AngularJS UI-Router won't recognize a defined controller on the module
accepted answer: http://stackoverflow.com/a/25914228
favorite count: 0
tagged with: controller
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40562009
has body: I'm in the process of learning Angular, and I'm trying to set up a state with a controller using ui-router. I have a main module named app.js, and then sub-modules based on different content. The first sub-module is diary.js. Everything is working with this controller other than the controllers. The state works in the UI, etc. When I make the controller directly in diary.js (such as controller : function () { //stuff }, it works fine). But when I try to include an already defined controller for the diary state (like it's currently written), I get the following error (I couldn't post the whole error because stackoverflow won't let me have that many links): "Error: [ng:areq] errors.angularjs.org/1.2.23/ng/areq?p0=DiaryCtrl&amp;p1=not%20aNaNunction%2C%20got%20undefined at Error (native) ... /** diary.js */ 'use strict'; (function () { angular.module('diary', ['ui.router']) .config(['$stateProvider', function ($stateProvider) { // States $stateProvider.state('diary', { url : '/diary', templateUrl : 'diary/html/diary.html', controller : 'DiaryCtrl' }); }]); }).call(); Here is the code for the DiaryCtrl.js (the defined controller). /** DiaryCtrl.js */ 'use strict'; angular.module('diary') .controller('DiaryCtrl', [$scope, $http, function ($scope, $http) { $http.get('api/json/diaries.html').success(function (data) { $scope.diaries = data; }).error(function (status) { console.log(status); }); }]); I'd appreciate any help. Let me know if you need more information.
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/25914228
score: 1
has comment: http://stackoverflow.com/comment/40564265
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40621540
has text: no, it's impossible, you should use ajax
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25946758

http://stackoverflow.com/comment/40700957
type: QuestionComment
has text: __IDs must be unique.__ The problem occurs when you are using same id multiple times. Use [class selector](http://api.jquery.com/class-selector/)
score: 3
comment on: http://stackoverflow.com/q/25990730
type: Comment

http://stackoverflow.com/a/25902751
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25901682
has body: Fiddle - http://liveweave.com/EyC98j I took a look at Liveweave's source code to see how they did it. Liveweave looks for your &lt;head&gt; tag and adds your library right below it. If it doesn't have a head tag they alert you with a dialog suggestion. // Append JS library to HTML &lt;head&gt; function appendJSLib(txt) { var textArea=htmlEditor.getValue(); var searchText = textArea.search("&lt;head&gt;"); if(searchText&gt;0) { txt = "&lt;head&gt;"+"\n"+txt; var updatedTextArea = textArea.replace("&lt;head&gt;",txt); htmlEditor.setValue(updatedTextArea); } else { reset(); alertify.alert("&lt;span style='color: #f5f5f5; padding:4px 6px 4px 6px; border-radius:3px; background-color: #cc0000;'&gt;WARNING!&lt;/span&gt;&lt;br/&gt;&lt;br/&gt; The &lt;strong&gt;&amp;lt;head&amp;gt;&lt;/strong&gt; tag seems to be missing in your HTML. Although your code may still work, we highly recommened that you have a valid HTML syntax. Please refer to the structure of a correct HTML code below:&lt;br/&gt;&lt;br/&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br/&gt;&amp;lt;html&amp;gt;&lt;br/&gt;&amp;lt;head&amp;gt;&lt;br/&gt;&amp;lt;title&amp;gt&amp;lt;!-- title --&amp;gt;&amp;lt;/title&amp;gt;&lt;br/&gt; &amp;lt;/head&amp;gt;&lt;br/&gt; &amp;lt;body&amp;gt;&lt;br/&gt; &amp;lt;!-- your content here --&amp;gt;&lt;br/&gt; &amp;lt;/body&amp;gt;&lt;br/&gt;&amp;lt;/html&amp;gt;"); txt = txt+textArea; htmlEditor.setLine(0, txt); return false; } } In my case all I needed was a forward slash right after the &lt;/ in &lt;/script&gt; to close the code like so.. editor.replaceRange("&lt;"+"script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-latest.min.js\"&gt;"+"&lt;/"+"script"+"&gt;\n", editor.getCursor()); If you'd like to go Liveweave's way you would add a js library like so. $("#jquery").click(function() { txt="&lt;"+"script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-latest.min.js\"&gt;"+"&lt;/"+"script"+"&gt;"; appendJSLib(txt); });
score: 3
answers question: http://stackoverflow.com/q/25901682
upvote count: 3

http://stackoverflow.com/q/25984931
possible better answer: http://stackoverflow.com/a/25985026
has answer: http://stackoverflow.com/a/25985027
has answer: http://stackoverflow.com/a/25985026
upvote count: 1
downvote count: 1
type: Question
has body: I have this html: Download I need ONCLICK class got, change the class icon-play to icon-pause Im using this code, but not works. $('a.got').click(function() { $('i.icon-white').parent().toggleClass('icon-pause'); });
has title: Changing Class whit jQuery not works
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25985027
favorite count: 0
has comment: http://stackoverflow.com/comment/40690911
type: AnsweredQuestion

http://stackoverflow.com/comment/40922060
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26036291
type: Comment
has text: Update in jsfiddle link.

http://stackoverflow.com/a/26022226
answers question: http://stackoverflow.com/q/26022088
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/40759257
accepted answer of: http://stackoverflow.com/q/26022088
score: 3
has body: From the documentation: If a key function is not specified, then the first datum in the specified array is assigned to the first element in the current selection, the second datum to the second selected element, and so on. You are getting three new elements because none of the existing ones has a key. Data association is either index-based (default) or key-based (if a key function is passed).

http://stackoverflow.com/comment/40775314
type: Comment
has text: Instead of walking the DOM yourself, use TreeWalker.
comment on: http://stackoverflow.com/a/26030835
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40558144
score: 0
comment on: http://stackoverflow.com/q/25911422
type: QuestionComment
has text: Possible duplicate question on SU: http://superuser.com/questions/251749/how-can-i-add-autocomplete-in-notepad-for-javascript-in-an-html-file and related question on SE: http://stackoverflow.com/questions/5012569/how-can-i-add-autocomplete-in-notepad-for-javascript-in-an-html-file
type: Comment

http://stackoverflow.com/comment/40494039
type: Comment
has text: I tried this and it gave me {processId}. What I want is processId
comment on: http://stackoverflow.com/a/25876010
type: AnswerComment
score: 0

http://stackoverflow.com/q/25891282
accepted answer: http://stackoverflow.com/a/25891395
type: Question
possible better answer: http://stackoverflow.com/a/25892279
answer count: 2
has answer: http://stackoverflow.com/a/25892279
tagged with: javascript
tagged with: jquery
score: 0
tagged with: asp.net
tagged with: form-submit
has answer: http://stackoverflow.com/a/25891395
has body: I am trying to control form submitting after validating user input the user must select at least one radio otherwise the form wouldn't submit the first part is working very fine, if the user haven't select any radio input I call $('form').submit(function () { return false }); else if he selected something I will call $('form').submit(); but it is not submitting function validateSelection() { var temp = false; $('.lang-radio &gt; input[type=radio]').each(function () { if ($(this).is(':checked')) { temp |= $(this).is(':checked') }; }); if (temp != 1) { $('form').submit(function () { return false }); $('.high-light').effect("shake"); } else { $('form').submit(); } } I am calling the function validateSelection from OnClientClick="validateSelection();" I am using asp.net webforms
has title: form is not doing submit after calling function return false only one time
type: AnsweredQuestion

rest
tags question: http://stackoverflow.com/q/25984856
tags question: http://stackoverflow.com/q/26010173
tags question: http://stackoverflow.com/q/25973575
tags question: http://stackoverflow.com/q/25883485
tags question: http://stackoverflow.com/q/25880810
tags question: http://stackoverflow.com/q/25961437
tags question: http://stackoverflow.com/q/25884377
tags question: http://stackoverflow.com/q/26014792
tags question: http://stackoverflow.com/q/25969422
tags question: http://stackoverflow.com/q/25935218
tags question: http://stackoverflow.com/q/25979402
tags question: http://stackoverflow.com/q/25936042
tags question: http://stackoverflow.com/q/26000436
tags question: http://stackoverflow.com/q/25882497
tags question: http://stackoverflow.com/q/25899111
tags question: http://stackoverflow.com/q/25957636
tags question: http://stackoverflow.com/q/25952251
tags question: http://stackoverflow.com/q/26024057
tags question: http://stackoverflow.com/q/25954352
type: Tag
tag name: rest
tags question: http://stackoverflow.com/q/26026641
tags question: http://stackoverflow.com/q/26018093
tags question: http://stackoverflow.com/q/25967718
tags question: http://stackoverflow.com/q/25944540

http://stackoverflow.com/comment/40656530
comment on: http://stackoverflow.com/q/25966191
score: 0
type: Comment
type: QuestionComment
has text: @PaulS. i've replaced my code 'if (digits.indexOf(temp)==-1)' with yours and it doesn't seem to validate the numbers still. Mike'Pomax'Kamermans so instead of alert i can write console.warn ("Invalid Card Number") and this will alert the user of their accidental mistake?

http://stackoverflow.com/comment/40494395
comment on: http://stackoverflow.com/q/25875760
has text: What happen if you apply class to the parent `div`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40631236
type: Comment
has text: I've updated my main answer with two images, the first image shows the two images inside your website with a `2px` gap between them and the second image shows the two images inside your website with a `25px` gap between them.
type: AnswerComment
comment on: http://stackoverflow.com/a/25942232
score: 0

http://stackoverflow.com/comment/40624144
type: Comment
comment on: http://stackoverflow.com/q/25948422
has text: In my menu.js the selector '.pure-menu-item' seems to be wrong, because replacing that with '*' makes the click handler work. But that isn't a solution.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25936084
answers question: http://stackoverflow.com/q/25935999
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Since most errors are asynchronous, you probably want to use a callback to propagate the error back to the error handler. Try/catch blocks are seldomly used, and only for the few synchronous functions which might fail, like JSON.parse().

http://stackoverflow.com/comment/40607021
score: 0
comment on: http://stackoverflow.com/q/25938260
type: QuestionComment
type: Comment
has text: possible duplicate of [Open a new page on click of a link on new window](http://stackoverflow.com/questions/2620765/open-a-new-page-on-click-of-a-link-on-new-window)

http://stackoverflow.com/comment/40641984
comment on: http://stackoverflow.com/q/25958646
score: 0
type: Comment
type: QuestionComment
has text: Well, you wait before asking but not before checking the answer and redirecting!!! Put your redirection code in the `stayonPage` function as well.

http://stackoverflow.com/a/25935956
accepted answer of: http://stackoverflow.com/q/25935876
score: 3
answers question: http://stackoverflow.com/q/25935876
downvote count: 0
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: the .row.add() function will return the datatable object, and so will the .draw() function. Thus, rowAdded is not the new row you added. You could add .node() to the end of it to get the added row: var rowAdded = analysisTable.row.add(data.analysis).draw(false).node();

http://stackoverflow.com/comment/40748250
type: AnswerComment
score: 0
type: Comment
has text: ,Thank you very much.Shall we implement the above change in jquery?Why because above code is in javascript and the one you are suggesting seems to in jquery.
comment on: http://stackoverflow.com/a/26000545

http://stackoverflow.com/a/25989932
answers question: http://stackoverflow.com/q/25989497
has comment: http://stackoverflow.com/comment/40703399
type: Answer
has comment: http://stackoverflow.com/comment/40699810
has body: UPDATED: is this what you're looking for? => DEMO $(document).ready(function () { var requiredFields = ["surname", "phone", "email", "city", "verifyCode", "question"]; $.each( requiredFields, function( i, l ) { $(".formInput[name*="+l+"]").each(function () { $(this).keyup(function () { $("#submit").prop("disabled", chkAllFields()); }); }); }); function chkAllFields() { $('.formInput').not(this).each(function(){ if($.inArray($(this).attr('name'),requiredFields)&gt;-1 &amp;&amp; $(this).val()==''){ $(this).addClass('redBorder'); } }); var empty=0; $('.formInput').each(function(){ if($(this).val()==''){ empty++; } }); if(empty==0){ $('#submit').prop('disabled',false); } else{ $('#submit').prop('disabled',true); } } $('.formInput').blur(function(){ $('.redBorder').removeClass('redBorder'); }); });
has comment: http://stackoverflow.com/comment/40700847
score: 0

http://stackoverflow.com/a/25945211
answers question: http://stackoverflow.com/q/25945179
type: Answer
has body: When grabbing the imgNumber do this instead: var imgNumber = parseInt(urlsplit[5]); urlsplit[5] will retrieve a string, so you need to parse it to an int.
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/40708416
type: Comment
type: QuestionComment
has text: @RobG Right. Can't correct now.
comment on: http://stackoverflow.com/q/25994909
score: 0

http://stackoverflow.com/q/26024914
score: 4
has body: Is is possible? jQuery Knob I am trying to disable the mousewheel, but still allow it to be draggable/adjustable. You can set the knob to readOnly: true, but that won't let you drag the dial. Any ideas? $(".dial").knob({ min: 1 max: 10 stopper: true, readOnly: true,//if true This will Set the Knob readonly cannot click release: function (value) { //Do something as you release the mouse } }); $(".dial").bind("mousewheel", function() { return false; });
has comment: http://stackoverflow.com/comment/40763782
answer count: 3
has comment: http://stackoverflow.com/comment/40764257
downvote count: 0
tagged with: jquery-knob
favorite count: 0
has title: Disable Mousewheel on jQuery Knob
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/39366882
has answer: http://stackoverflow.com/a/26025498
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40763474
tagged with: mousewheel
has answer: http://stackoverflow.com/a/37032007
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25973724
tagged with: php
has body: I have an app where each user can invite his friends to join the app. I have done this via the JS FB SDK. I also use PHP SDK for server sessions and other things. Now the questions is how can I determine the id of the inviter when an user joins my app based on the invitation sent? EG: Let's say USER-X invites USER-Z to join my app. Then USER-Y invites USER-Z to join my app too. But USER-Z joins through the link of USER-X. I want to reward USER-X because he brought a new user to my app, so I need his fbid or something. How can I do determine the referer? I have used this code to implement the Facebook friends invite on my website: OPEN INVITE POPUP
has comment: http://stackoverflow.com/comment/40669597
has comment: http://stackoverflow.com/comment/40669443
has comment: http://stackoverflow.com/comment/40670027
has comment: http://stackoverflow.com/comment/40669648
type: Question
has comment: http://stackoverflow.com/comment/40669489
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40669739
has title: facebook friend invites - who sent invitation
tagged with: facebook-graph-api
answer count: 0
type: UnansweredQuestion
tagged with: facebook

http://stackoverflow.com/q/25977052
tagged with: ajax
type: AnsweredQuestion
tagged with: handsontable
has title: how to update cell based on another autocomplete cell with Handsontable
type: Question
has body: i am already have complete code to return autocomplete data and fill another cell based on this autocomplete but i want to make it dynamic from ajax request to database query. how to do this? http://jsfiddle.net/wvXvJ/15/ $(document).ready(function() { var $container = $("#mytables"); var comsources = ["Chrysler", "Nissan", "Suzuki", "Toyota"]; var ac = [ {"name":"Chrysler","label":"Pepsi Cola Hat","price":"24","abbrev":"CRY"}, {"name":"Nissan","label":"Candle Lights Dinner","price":"780","abbrev":"NSS"}, {"name":"Suzuki","label":"Pork Meat Ball","price":"178","abbrev":"SZK"}, {"name":"Toyota","label":"Granny Health Supplement","price":"24","abbrev":"TYT"} ]; var ht = $container.handsontable({ startRows: 1, startCols: 5, rowHeaders: true, colHeaders: ['Item Name', 'Price', 'Code'], minSpareRows: 1, contextMenu: true, columns: [ { data: "name", type: 'autocomplete', source: comsources, strict: false }, { data: "price" }, { data: "code" } ], afterChange : function(arr, op) { if(op=="edit"&amp;&amp;arr.length==1) { var value = arr[0][3]; for(var i=0;i&lt;ac.length;i++) { if(ac[i].name == value) { $container.handsontable("setDataAtCell", arr[0][0], 1, ac[i].price); $container.handsontable("setDataAtCell", arr[0][0], 2, ac[i].abbrev); return false; } } } } }); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26119255
accepted answer: http://stackoverflow.com/a/26119255
score: 0
answer count: 1

http://stackoverflow.com/q/25875210
has title: Javascript - Match items for query parse.com
has body: I have these two classes in parse This is my TestItem class and it has items that are available. Then I have my UserFavorites Class: It has Items that user have favorited. As you can see Buffalo Waffle Fries and Shrimp Po Boy are in both classes. In UserFavs I have a pointer from the item in UserFav to that item in TestItem so I can match them for a purpose not relevant to this question. My problem is that the items in the class TestItem get deleted and new ones are added daily. So the pointer in testItem is no longer valid. So I can no longer match them. As you can see I manually updated the pointer for Shrimp Po Boy, just to show this. I need some help with my javascript code, that will match the items in TestItem to ones in UserFav. And then update the pointer in UserFav to match the objectId in TestItem class. I hope that makes sense if not ask me to clarify. Also it could be possible that more than one user has favorited the same item so I would need it to update both pointers to TestItem class. Hers what I am working with so far: Parse.Cloud.define("updateUserFavPointerToTestItem", function(request, response) { var TestItem = Parse.Object.extend("TestItem"); var UserFav = Parse.Object.extend("UserFavourite"); var testItemsQuery = new Parse.Query(TestItem); var userFavoritesQuery = new Parse.Query(UserFav); testItemsQuery.find().then(function(testItemRes) { for (var i = 0; i &lt; testItemRes.lenght; i++) { var item = testItemRes.get('item'); userFavoritesQuery.equalTo('item', item); userFavoritesQuery.then(function(userFavoritesRes) { for (var i2 = 0; i2 &lt; userFavoritesRes.length; i2++) { //update the testItem pointer here //but this doesnt work, I think its because the query is async //But I am using .then, so maybe I need some promises? } }); } }); }); Thanks so much for the help in advance!
tagged with: cloud
tagged with: javascript
tagged with: pointers
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/26374560
favorite count: 0
tagged with: promise
tagged with: parse-platform
has answer: http://stackoverflow.com/a/25883948
accepted answer: http://stackoverflow.com/a/25883948
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/26374560
type: Question

http://stackoverflow.com/q/25924306
answer count: 2
has comment: http://stackoverflow.com/comment/40582109
tagged with: button
has body: I am trying to use an onClick event in JavaScript and am running into a problem. I want to make a button that changes its id, click handler, and text back and forth when it is clicked - I want it to become a completely different button when clicked the first time, but then revert back to the original button when clicked the second time. My idea was to write one event handler for the original button being clicked which changes it to the second button and I put this in the function "change()". I also had planned on writing one separate event handler for the new button being clicked which changes it to the original button and I put this in the function "changeBack()". The problem is that when I click on the original button one time, change() gets called and within it changeBack() automatically gets called exactly when the onClick is defined for the new button and right before the innerHTML is changed. I commented out some of the original lines and put an alert in to illustrate this unwanted behavior. I think somehow the click is still active when the new button gets created, thus forcing it to call changeBack() even though the new button was never clicked. Any help on this would be great. Thank you. Click Me
has comment: http://stackoverflow.com/comment/40582193
has comment: http://stackoverflow.com/comment/40582224
has answer: http://stackoverflow.com/a/25924541
has title: Javascript changing button and onClick issue
tagged with: onclick
type: Question
accepted answer: http://stackoverflow.com/a/25924541
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/40582031
possible better answer: http://stackoverflow.com/a/25925967
score: 0
has answer: http://stackoverflow.com/a/25925967

http://stackoverflow.com/a/25939698
type: Answer
answers question: http://stackoverflow.com/q/25939455
accepted answer of: http://stackoverflow.com/q/25939455
score: 0
has body: You can locate element by class using getElementsByClassName method. This method returns array-like list, so you need to know exactly which button you're trying to click. Assuming that there's only one button with class "btn" or if this button comes first in the document flow - you can do something like this: document.getElementsByClassName("btn")[0].click();
type: AcceptedAnswer

http://stackoverflow.com/comment/40578337
score: 0
type: Comment
type: QuestionComment
has text: It's better to replace the inline javascript statement with built-in [`replace`](http://lesscss.org/functions/#string-functions-replace) function (which is recommended anyway regardless of `Crunch` options).
comment on: http://stackoverflow.com/q/25921901

http://stackoverflow.com/comment/40510977
type: Comment
has text: Great I understand what you mean. I will give this a shot. This will go through each iteration of the array right?
type: AnswerComment
comment on: http://stackoverflow.com/a/25885227
score: 0

http://stackoverflow.com/comment/40567808
has text: I imagined you could do something smart by partitioning and then joining, or the like. But no.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25916163

search-engine
type: Tag
tags question: http://stackoverflow.com/q/25970044
tag name: search-engine

http://stackoverflow.com/comment/40551654
has text: how does it says that my `arrow` element is over that image ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25907864
type: AnswerComment

http://stackoverflow.com/comment/40776114
has text: Take a look at [UI Bootstrap](http://angular-ui.github.io/bootstrap/). Also have a look at _web component_ and _shadow DOM_, which may occur in future standards.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26027241
score: 1

http://stackoverflow.com/q/25942253
type: AnsweredQuestion
has title: React component classes meta-programming
score: 1
tagged with: metaprogramming
upvote count: 1
tagged with: react-bootstrap
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/25959029
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25959029
has comment: http://stackoverflow.com/comment/40682395
has body: I'm working with React and using React-Bootstrap components. I found some issues in the React-Bootstrap library which I "fixed" (or "workarounded") by editing the react-bootstrap.js file. The problem is that if tomorrow a new version of react-bootstrap comes out, then I will have to copy-paste/re-write/whatever all the code I wrote in the react-bootstrap.js file to the new one. I don't want to do this, so I'm wandering if there is a way to modify the component classes (i.e. change the render function) provided by react-bootstrap without touching the react-bootstrap.js file. The problem is that I can't figure out how to do this, or at least I'm not finding easy to understand the inner working of the component classes. Any ideas on how could I accomplish this? Thanks in advance!
has comment: http://stackoverflow.com/comment/40617195

http://stackoverflow.com/q/25877171
has title: angularjs form submit causing page reload and adding '?' to url
tagged with: javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/40496345
favorite count: 0
has body: I have the following form in my angular application Name Consignee Invoice To Notify Party Point of Sale Country Port Save Cancel This element is the template for a directive editCustomerForm. The directive is very long, so I won't post the whole thing here unless it's needed, but the function submit() is currently only producing a console log. form.submit = function () { console.log('submitting'); }; When the form is submitted, the url website.com/#/customers becomes website.com/?#/customers. This causes a full page refresh. After the ? is added to the url, everything work as expected, until a link clicked, which refreshes page again and resets the url. I've worked with angular for a long time now, and I've never run into this behaviour. What's causing this? Edit: Here's how my directive is declared. .directive('editCustomerForm', [ 'customerService', 'countryService', 'portService', 'errorService', function (customerService, countryService, portService, errorService) { return { restrict: 'E', scope: { pushTo: '&', customer: '&' }, templateUrl: '/partials/elements/customers/forms/edit.html', controller: function ($scope) { var form = this; form.pushTo = $scope.pushTo; form.countries = []; form.ports = []; form.selectedCountry = {}; form.selectedPort = {}; var clone = function (obj) { return $.extend(true, {}, obj); }; form.customer = clone($scope.customer()); ... form.submit = function () { console.log('submitting'); //customerService.edit(form.customer, successfulEdit(form.customer), handleError) }; form.cancel = function () { form.customer = {}; form.selectedCountry = {}; form.selectedPort = {}; form.pushTo().cancelEditCustomer(); }; }, controllerAs: 'formCtrl' }; }]); Update So the issue seems to be here Where I'm using my form inside of a foundation 5 modal. I've made a directive reveal-modal for the modal. This is the modal directive code app.directive('revealModal', function () { return function (scope, elem, attrs) { scope.$watch(function(){return attrs.reve…
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40496758
score: 1
type: Question
tagged with: ng-submit

http://stackoverflow.com/comment/40660904
type: Comment
comment on: http://stackoverflow.com/a/25968603
has text: I don't know, their page says you have to pay.
score: 1
type: AnswerComment

http://stackoverflow.com/a/25968674
score: 0
has body: Here you go... No change in HTML. But like other suggested, you need to have unique ID's $(function (){ $('li').click(function(event) { event.stopPropagation(); $(event.target).children('ul').slideToggle(); }); }); A B Sub-sub
answers question: http://stackoverflow.com/q/25968305
type: Answer

http://stackoverflow.com/a/25966788
has comment: http://stackoverflow.com/comment/40660593
has comment: http://stackoverflow.com/comment/40679469
has body: Yes, relative URLs work just fine. I don't have references, but just tried it from the options dialog for an extension I am working on. The following opened a dialog window just fine when the button was clicked. It used the XUL in the file test.xul which is in same directory as my options.xul file (defined as the options dialog in instal.rdf) : &lt;button label="test" oncommand="openDialog('test.xul', '', 'dialog=no, modal=no, resizable=yes, width=500, height=600');"/&gt; The followin worked when the test.xul file was in the relative location test/test.xul, but did not exist in the directory containing my options.xul: &lt;button label="test" oncommand="openDialog('test/test.xul', '', 'dialog=no, modal=no, resizable=yes, width=500, height=600');"/&gt; Moved from comments: However, for XUL that is not actually specifying a window using a full URL may be required. If the window was not actually opened by your XUL you do not necessarily know what the current working directory will be. In such cases, using a relative URL path can result in the error NS_ERROR_MALFORMED_URI: and the operation failing. This is definitely true for options dialogs which are displayed within the Add-on Manager (i.e. they do not open their own window). In your install.rdf file the option &lt;em:optionsType&gt;2&lt;/em:optionsType&gt; sets your add-on's options to be displayed within the Add-on Manager. The default, &lt;em:optionsType&gt;1&lt;/em:optionsType&gt;, results in a new dialog window opening. Relative URLs do work from within separate windows. For instance, consider the case of your add-on's dialog, which is within the Add-on Manager, opening another dialog window. In that case relative URLs work just fine from within the XUL of the now open dialog window.
has comment: http://stackoverflow.com/comment/40667894
downvote count: 0
answers question: http://stackoverflow.com/q/25963251
type: Answer
has comment: http://stackoverflow.com/comment/40666859
upvote count: 3
has comment: http://stackoverflow.com/comment/40657760
has comment: http://stackoverflow.com/comment/40660903
has comment: http://stackoverflow.com/comment/40658300
score: 3

http://stackoverflow.com/q/25941376
has comment: http://stackoverflow.com/comment/40898925
type: UnansweredQuestion
tagged with: requirejs
tagged with: r.js
score: 2
type: Question
upvote count: 2
tagged with: javascript
favorite count: 0
has title: File header comment block breaks RequireJS Optimizer r.js
has body: Given the following AMD module (messages.js): /************************************************************************* * Copyright blah blah blah * ************************************************************************* * * @description * Super detailed description here... * * @author * Eric Steele * *************************************************************************/ define(['angular'], function() { return "here's a message!"; }); With a RequireJS configuration that looks something like this... require.config({ baseUrl: 'javascripts', paths: { 'angular': '../bower_components/angular/angular.min', 'messages': './shared/services/messages', } }); And the following r.js configuration: ({ baseUrl: "javascripts", mainConfigFile: './javascripts/requirejs-config.js', optimize: 'none', optimizeCss: "none", waitSeconds: 0, name: 'app', wrapShim: 'true', preserveLicenseComments: false, out: './javascripts/app-built.js' }) I get the following in my build output: /************************************************************************* * Copyright blah blah blah * ******'messages',******************************************************************* * * @description * Super detailed description here... * * @author * Eric Steele * *************************************************************************/ define(['angular'], function() { return "here's a message!"; }); As you can see, r.js has inserted the module name 'messages' inside the comment block instead of placing it as the first argument of the define() call. If I remove the file header, the module name is properly inserted like so: define('messages',['angular'], function() { return "here's a message!"; }); However, if I leave a blank line at the start of the file like so: // pretend this comment is a blank line define(['angular'], function() { return "here's a message!"; }); Then I see this in my build output: 'messages', define(['angular'], function() { return "here's a message!"; }); It seems that r.js expect…
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/40523850
type: QuestionComment
has text: yes and in a automatic prototype inside function get the call and throw some ajax. looks like something like PageMethod in asp.net using webforms
comment on: http://stackoverflow.com/q/25890772
score: 0
type: Comment

http://stackoverflow.com/a/25902969
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25902432
has comment: http://stackoverflow.com/comment/40551492
has body: You're almost there. Your $scope.MyColor is bound to the color that is selected. You can use $scope.MyColor.name to get the name. Also, I think you are writing the controller incorrectly. It seems that what you are trying to achieve is to make an Ajax call to get some data, but what is the trigger to get the data? If it is based on when selection changes, then you should write your controller as follows: .controller("LookCtrl", ["$scope", "$http", function ($scope, $http){ $scope.colors = [ {name:'blue', shade:'femme'}, {name:'red', shade:'femme'}, {name:'yellow', shade:'femme'}, {name:'blue', shade:'homme'}, {name:'red', shade:'homme'} ]; $scope.myColor = $scope.colors[2]; // default selection $scope.onChange = function(){ var ouinon = "http://api.shopstyle.fr/api/products?pid=uid7689-25635133-51&cat=" + $scope.MyColor.name + "&limit=60&fl=d0&sort=Popular"; $http.get(ouinon).success(function(data){ $scope.look = data; $scope.$apply(); // this is needed since it's an async call } }; }]); Then the HTML: <section ng-controller="LookCtrl" ng-init="init()" class="panel panel-padding left" ng-class="{center:panel==1, right:panel<1}"> Selection:
accepted answer of: http://stackoverflow.com/q/25902432
upvote count: 2
score: 2

http://stackoverflow.com/comment/40723244
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26003001
score: 0
has text: You mean like a parser error?

http://stackoverflow.com/a/26028963
has body: 1) Is this jQuery function only executed once or is it placed inside the onScroll-binded function? $( window ).scroll(function() { /* get scroll top and left values here */ $( ".box" ).each(function(){ /* do position check and css adjustments here */ }); }); 2) The calculation for the opacity is: (1 - ((box_offsetTop - scrollTop) / windowHeight)) 3) I made a working example here for scrolling vertically: http://jsfiddle.net/0mks8eut/1/ You can change it to calculate opacity based on horizontal scrolling by (un)commenting the other calculation inside the function. ! Make sure that there is enough content (or padding/margin) after/next to the object. Otherwise it will never reach opacity:1 (e.g. the top/left of the screen).
answers question: http://stackoverflow.com/q/26028644
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40772608
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26028644

http://stackoverflow.com/a/26149406
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25963466
has body: Looks like I didn't set a z-index on my video-background. It worked once I set a z-index of -1.
answers question: http://stackoverflow.com/q/25963466
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/a/26023059
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40760113
accepted answer of: http://stackoverflow.com/q/26022950
answers question: http://stackoverflow.com/q/26022950
upvote count: 2
type: AcceptedAnswer
has body: dataType: 'json' specifies that jQuery expects JSON back from the server (see docs). In order to specify that you are sending JSON, you need to add contentType: "application/json". Furthermore, jQuery cannot convert an object into JSON for you. If you are passing any object to data, you need to stringify it yourself: data: JSON.stringify(dataObject);

c#
tags question: http://stackoverflow.com/q/25991842
tags question: http://stackoverflow.com/q/25993763
tags question: http://stackoverflow.com/q/25886617
tags question: http://stackoverflow.com/q/25979847
tags question: http://stackoverflow.com/q/25895760
tags question: http://stackoverflow.com/q/25999235
tags question: http://stackoverflow.com/q/25901173
tags question: http://stackoverflow.com/q/25917032
tags question: http://stackoverflow.com/q/25972311
tags question: http://stackoverflow.com/q/25920762
tags question: http://stackoverflow.com/q/25918881
tags question: http://stackoverflow.com/q/26029920
tags question: http://stackoverflow.com/q/25896833
tags question: http://stackoverflow.com/q/26007838
tags question: http://stackoverflow.com/q/26005687
tags question: http://stackoverflow.com/q/25941358
tag name: c#
tags question: http://stackoverflow.com/q/26014036
tags question: http://stackoverflow.com/q/25946494
tags question: http://stackoverflow.com/q/25988869
tags question: http://stackoverflow.com/q/25993453
tags question: http://stackoverflow.com/q/26024012
tags question: http://stackoverflow.com/q/25923608
tags question: http://stackoverflow.com/q/25986721
tags question: http://stackoverflow.com/q/25921941
tags question: http://stackoverflow.com/q/25889194
tags question: http://stackoverflow.com/q/25903551
tags question: http://stackoverflow.com/q/25927215
tags question: http://stackoverflow.com/q/25899236
tags question: http://stackoverflow.com/q/25929720
tags question: http://stackoverflow.com/q/26010360
tags question: http://stackoverflow.com/q/25990406
tags question: http://stackoverflow.com/q/25999441
tags question: http://stackoverflow.com/q/25991469
tags question: http://stackoverflow.com/q/25974979
tags question: http://stackoverflow.com/q/26024605
tags question: http://stackoverflow.com/q/25973899
tags question: http://stackoverflow.com/q/25886183
tags question: http://stackoverflow.com/q/25944461
tags question: http://stackoverflow.com/q/26020696
tags question: http://stackoverflow.com/q/25978886
tags question: http://stackoverflow.com/q/25936425
tags question: http://stackoverflow.com/q/25887268
tags question: http://stackoverflow.com/q/25880318
tags question: http://stackoverflow.com/q/25945923
tags question: http://stackoverflow.com/q/25953420
tags question: http://stackoverflow.com/q/25899419
tags question: http://stackoverflow.com/q/25887119
tags question: http://stackoverflow.com/q/25890026
tags question: http://stackoverflow.com/q/26031546
tags question: http://stackoverflow.com/q/25908027
tags question: http://stackoverflow.com/q/25945506
tags question: http://stackoverflow.com/q/26023478
tags question: http://stackoverflow.com/q/25962121
tags question: http://stackoverflow.com/q/25971944
tags question: http://stackoverflow.com/q/25954216
tags question: http://stackoverflow.com/q/25949530
tags question: http://stackoverflow.com/q/25999279
tags question: http://stackoverflow.com/q/25979812
type: Tag
tags question: http://stackoverflow.com/q/26029538
tags question: http://stackoverflow.com/q/25951419
tags question: http://stackoverflow.com/q/26004959
tags question: http://stackoverflow.com/q/25913856
tags question: http://stackoverflow.com/q/25909421
tags question: http://stackoverflow.com/q/25896863
tags question: http://stackoverflow.com/q/25875984
tags question: http://stackoverflow.com/q/25977309
tags question: http://stackoverflow.com/q/26028447
tags question: http://stackoverflow.com/q/25965198
tags question: http://stackoverflow.com/q/25992325
tags question: http://stackoverflow.com/q/25972656
tags question: http://stackoverflow.com/q/25898769
tags question: http://stackoverflow.com/q/26000294
tags question: http://stackoverflow.com/q/25977870
tags question: http://stackoverflow.com/q/25904481
tags question: http://stackoverflow.com/q/25928796

http://stackoverflow.com/a/25955725
type: Answer
answers question: http://stackoverflow.com/q/25955680
downvote count: 2
has comment: http://stackoverflow.com/comment/40637126
has body: You replace isn't going to do anything, since you aren't providing it with a second parameter. The replace method is like this: String.replace('texttolookfor', 'replacementtext'); String replace If you want to redirect, then you need to give the replace method the url of where you want to go: window.location.replace("https://www.teabeyond.com/Articles.asp?ID=252", "http://www.teabeyond.com/MailingList_subscribe.asp"); You might want to use the console to verify your address and what not. Also, per @mplungjan, you need to prevent the default submit action.
score: -2
upvote count: 0

http://stackoverflow.com/a/26007844
has body: You can try to add a stop animation function before doing any other animation. E.g., $('#drop-menu').stop().fadeIn( 200 ); and $('#drop-menu').stop().fadeOut( 200 ); So these animations won't ruin each other.
score: 0
answers question: http://stackoverflow.com/q/26006955
type: Answer

http://stackoverflow.com/q/25999327
downvote count: 0
has title: Leading and Trailing removal
has comment: http://stackoverflow.com/comment/40717173
type: Question
has comment: http://stackoverflow.com/comment/40716458
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25999702
upvote count: 3
has answer: http://stackoverflow.com/a/25999773
has answer: http://stackoverflow.com/a/25999439
favorite count: 0
has answer: http://stackoverflow.com/a/25999450
accepted answer: http://stackoverflow.com/a/25999450
has body: I have string expression like &lt;br /&gt;&lt;br /&gt;&lt;br/ &gt;this is &lt;br /&gt;&lt;br /&gt;&lt;br/ &gt; a test&lt;br /&gt;&lt;br /&gt;&lt;br/ &gt;&lt;br&gt; in which I need to remove only the first and last set of &lt;br /&gt; tags using plain javascript.
has comment: http://stackoverflow.com/comment/40956803
tagged with: regex
answer count: 4
has answer: http://stackoverflow.com/a/25999702
type: AnsweredQuestion
score: 3
linked to: http://stackoverflow.com/q/7596647

http://stackoverflow.com/a/25996421
answers question: http://stackoverflow.com/q/25996046
has body: What about? ([0-9]+|([0-9]+-[0-9]+))(,([0-9]+|([0-9]+-[0-9]+)))* Or with the \d character class shorthand notation: (\d+|(\d+-\d+))(,(\d+|(\d+-\d+)))* Explanation: This is the basic pattern (\d+|(\d+-\d+)) Optionally followed (zero or more times) by character "," and the same pattern, again. Hence: (,(\d+|(\d+-\d+)))*
score: 1
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/25885590
type: Question
answer count: 1
has body: I made a small cms where the frontend is based on jquery. My problem is that sometimes in my module-template code i use something like this: When i grap this template with jquerys html function: var htmlString = $("#templateid").html(); jquery modifies the content in the condition tag. The ouput is Its just works when the code in the condition tag is complete like Is there any function where jquery outputs the html without modifying the content?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40511204
score: 0
has title: jquery html() always changes content
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40511193
has answer: http://stackoverflow.com/a/25885640
has comment: http://stackoverflow.com/comment/40511219
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40511267
has comment: http://stackoverflow.com/comment/40511697
has comment: http://stackoverflow.com/comment/40511364
downvote count: 1

http://stackoverflow.com/a/25980919
upvote count: 1
has comment: http://stackoverflow.com/comment/40683039
score: 1
has body: You can use only one function function multiplyOrDivide(todo){ var x = document.getElementById("first").value; var y = document.getElementById("second").value; var z = document.getElementById("third").value; if(todo==0){ alert(Number(x*y*z)); } else{ if(y!=0 || z!=0){ alert(Number(x/y)/z); } } } In onclick you can pass options as multiplyOrDivide(1)
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40683199
answers question: http://stackoverflow.com/q/25980693

http://stackoverflow.com/comment/40554142
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25893994
has text: Ok i will try this. But i would like to remind that casperjs do render html, only without what's inside the container div.
score: 0

http://stackoverflow.com/a/25976883
type: Answer
has comment: http://stackoverflow.com/comment/40676043
accepted answer of: http://stackoverflow.com/q/25965884
has body: As far as I understand your question, here's my take on this - Unit test are to check functionality of particular source code. There are following ways to do unit testing for a function Pass the input to function and test the output Pass the input and test every thing (steps) it does to manipulate that input Test if its calling anything external function to get any input &amp; use the stubbed value as a returned object/value from that external function If a method in directive is manipulating css, then it should be adding and removing CSS class inside that method, isn't it? So in assertions it need to check only if particular class is present or not. (In most of the cases which I worked on) CSS file is external file and its a dependancy for javascript source file &amp; it should be treated as dependancies. Where as e2e testing is the like integration testing, to make sure if all integration files work together perfectly. So if we need to test CSS changes, we should check with e2e. Here is interesting talk on Unit Testing from Miško Hevery. It's not related to CSS, but in general Unit Testing &amp; about handling dependancies(17:50)
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25965884

http://stackoverflow.com/comment/40603831
type: AnswerComment
comment on: http://stackoverflow.com/a/25936065
type: Comment
has text: Yes (I normaly dont ask HTML questions sorry if there basic ones)
score: 0

http://stackoverflow.com/a/25941996
downvote count: 0
score: 1
upvote count: 1
has body: You miss the this parameter of bind, so you should write something like: myInterval = setInterval(myFunc.bind(this, testA, testB), 5000); this can be any JS Object. This is the same for call and apply of a function. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind Here your edited fiddle : http://jsfiddle.net/v2zc6mtm/6/
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25941904
answers question: http://stackoverflow.com/q/25941904
has comment: http://stackoverflow.com/comment/40614335
type: Answer

http://stackoverflow.com/q/26011694
upvote count: 0
tagged with: javascript
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/26011898
has comment: http://stackoverflow.com/comment/40738938
tagged with: php
downvote count: 1
accepted answer: http://stackoverflow.com/a/26011898
type: Question
type: AnsweredQuestion
has title: Google Map Circle not working
score: -1
possible better answer: http://stackoverflow.com/a/26018599
has body: Can't Draw Circle in Google Map I am following this tutorial by google : https://developers.google.com/maps/documentation/javascript/examples/circle-simple I can't find what is the mistake i am doing. Here is my Google Map API Code : <?php $lat = '11.0183'; $lng = '76.9725'; ?> I just want to draw circle in the Map that i have Loaded. How can i fix this ??
has answer: http://stackoverflow.com/a/26018599
answer count: 2
tagged with: google-maps
tagged with: google-maps-markers

http://stackoverflow.com/comment/40557145
comment on: http://stackoverflow.com/q/25910924
has text: @Kishore i want to alert my name field
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40743362
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26013739
has text: There is no require in your listing. you only have `var dbLib =require('./db');` and `.registerSchema` is not exported from that file. So I am asking you if you in fact just don't understand how `require` and the module system work? Or have you not included your true listings?
score: 0

http://stackoverflow.com/comment/40821472
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26018726
has text: Well in my case I want to invoke a JS function that is returned as a result of something that is calculated inside my asp.net controller, no parameters can be passed to it from the user so I should be on the safe side
type: AnswerComment

http://stackoverflow.com/comment/40725194
type: AnswerComment
comment on: http://stackoverflow.com/a/26003814
score: 0
type: Comment
has text: @Blazemonger I have jquery-1.10.1.min.js and I have the css in a stylesheet that both the parent and child can acces and i have the script but it dosent work

http://stackoverflow.com/comment/40712752
comment on: http://stackoverflow.com/q/25997245
score: 0
type: Comment
has text: I edited the question for clarity.
type: QuestionComment

http://stackoverflow.com/a/25918219
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/40570826
downvote count: 0
has comment: http://stackoverflow.com/comment/40571005
answers question: http://stackoverflow.com/q/25918148
upvote count: 3
has body: You are using an array in your example. Use an object instead ({} instead of []) Something like this should work: var params = { "event" : 'click', "callback" : function () { $(this).css('background', 'black'); } }; $('.helloWorld').on(params.event, params.callback);
has comment: http://stackoverflow.com/comment/40570865

http://stackoverflow.com/q/25941814
has answer: http://stackoverflow.com/a/25941937
has title: Why isn't my jQuery if/else statement working?
has comment: http://stackoverflow.com/comment/40614017
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40614053
has comment: http://stackoverflow.com/comment/40614153
has comment: http://stackoverflow.com/comment/40614076
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40614180
type: UnansweredQuestion
has body: In an attempt to brush up on my jQuery, I'm trying to make a functional tic-tac-toe game. I've managed to run into a problem pretty early on. Here is a jsFiddle (you may have to change the width to get the right board layout): http://jsfiddle.net/isherwood/xcg22twj/1/ Here is my jQuery code: $(document).ready(function () { var board = $('.board'); subtitle = $('.subtitle'); gamespace = $('.gamespace'); a1 = $('.a1'); a2 = $('.a2'); a3 = $('.a3'); b1 = $('.b1'); b2 = $('.b2'); b3 = $('.b3'); c1 = $('.c1'); c2 = $('.c2'); c3 = $('.c3'); piece = $('.piece'); pieceX = $('.pieceX'); pieceO = $('.pieceO'); player1select = true; player2select = false; player1piece = ""; player2piece = ""; gameOver = true; if (gameOver == true) { $(board).css('display', 'none'); $(pieceX).click(function () { player1piece = "x"; player2piece = "o"; $(pieceX).css('display', 'none'); $(pieceO).css('display', 'none'); subtitle.html('Player 1 = X | Player 2 = O'); $(board).css('display', 'inline'); }) $(pieceO).click(function () { player1piece = "o"; player2piece = "x"; $(pieceX).css('display', 'none'); $(pieceO).css('display', 'none'); subtitle.html('Player 1 = O | Player 2 = X'); $(board).css('display', 'inline'); }) if (player1piece.length &gt; 0 &amp;&amp; player2piece.length &gt; 0) { gameOver = false; } } else { $(gamespace).hover( function () { $(this).css('background-color', 'tomato'); }, function () { $(this).css('background-color', 'white'); }); } }); Basically, my problem is that I want the gameOver variable to be false until player one selects either X or O. After selection the pieces disappear, the board appears, gameOver is set to false, and the game begins. However, the if/else statement that checks whether gameOver is true or false doesn't seem to be working properly. If it were working, I would be able to hover over each space and it would change to tomato. Can anyone explain why it's not working that way? Thank you.
has comment: http://stackoverflow.com/comment/40614019
has comment: http://stackoverflow.com/comment/40613991
has comment: http://stackoverflow.com/comment/40613978
has comment: http://stackoverflow.com/comment/40614133
downvote count: 1
type: Question

http://stackoverflow.com/comment/40555843
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25910243
has text: Because the break is only breaking the switch statement, not the loop.

http://stackoverflow.com/q/25961207
has answer: http://stackoverflow.com/a/25961273
accepted answer: http://stackoverflow.com/a/25961273
favorite count: 0
downvote count: 3
has body: I'm trying to make a request form for my website, and I need a button that can add new input fields on click but I have no idea on how to tackle this. imagine this: [ button ] a button that when you click it, it will then create a new textfield, and when you click it multiple times it would look something like the thing below. [ textfield ] [ textfield ] [ textfield ] [ textfield ]
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/40646885
tagged with: php
type: Question
has title: Codeigniter create new textfield on button/link click
type: AnsweredQuestion
tagged with: mysql
score: -1
upvote count: 2
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40520032
comment on: http://stackoverflow.com/q/25890164
type: Comment
score: 1
type: QuestionComment
has text: It is not possible directly with CSS to fix two columns while scrolling the rest. You may be able to achieve the effect with a table embedded in the centre that scrolls horizontally.

http://stackoverflow.com/q/25894589
has comment: http://stackoverflow.com/comment/40527455
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40527799
has title: Get value of file input in iframe
score: 0
has body: I am building a website that loads an html into an iframe, and allows the user to change elements of that html through the parent page. One of the functions is an image upload that adds an image to a div within the iframe. I have the image upload button inside the Iframe but am trying to get the input type='file' on the parent page and maybe a getelementbyid(file)? This is what I have inside the Iframe $(function () { $(":file").change(function () { if (this.files &amp;&amp; this.files[0]) { var reader = new FileReader(); reader.onload = imageIsLoaded; reader.readAsDataURL(this.files[0]); } }); }); function imageIsLoaded(e) { $('#myImg').attr('src', e.target.result); }; &lt;/script&gt; &lt;/head&gt; &lt;body contentEditable="false"&gt; &lt;input type='file' /&gt;
has comment: http://stackoverflow.com/comment/40527688
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/45094537
downvote count: 0
has body: My application required that a user can only sign on once so I can use the localStorage to reliably cache records. The signon uses localStorage flags to enforce this requirement and uses the window.name to know which user owns the tab. The issue was that the browser duplicate tab facility messed up the enforcement. The code below forces a signon page to appear in the duplicated tab if they duplicate a signed on session. This solution was tested in Chrome. It makes use of the fact that a duplicated tab has no name. This characteristic may not exist in all browsers. The preventDuplicateTab function is called very early in the page load sequence. /* This prevents users from duplicating the tab. If they do it * triggers the start page which checks for duplicate userid */ function preventDuplicateTab() { if (sessionStorage.createTS) { // Chrome at least has a blank window.name and we can use this // signal this is a duplicated tab. console.log("Existing sessionStorage "+sessionStorage.createTS+" w.name="+window.name); if (!window.name) { window.name = "*ukn*"; sessionStorage.createTS = Date.now(); // treat as new window.location = "/res/Frame.htm?page=start.htm"; // force to signon screen } } else { sessionStorage.createTS = Date.now(); console.log("Create sessionStorage "+sessionStorage.createTS+" w.name="+window.name); } }
score: 7
has comment: http://stackoverflow.com/comment/131249341
upvote count: 7
answers question: http://stackoverflow.com/q/25922776
has comment: http://stackoverflow.com/comment/107738540
type: Answer

google-apps-script
tags question: http://stackoverflow.com/q/25972194
tags question: http://stackoverflow.com/q/25998241
tags question: http://stackoverflow.com/q/25987051
tags question: http://stackoverflow.com/q/25900256
tags question: http://stackoverflow.com/q/25880637
type: Tag
tag name: google-apps-script
tags question: http://stackoverflow.com/q/25958492
tags question: http://stackoverflow.com/q/25980008
tags question: http://stackoverflow.com/q/25908620
tags question: http://stackoverflow.com/q/26021789
tags question: http://stackoverflow.com/q/25909096
tags question: http://stackoverflow.com/q/26003437
tags question: http://stackoverflow.com/q/25978993
tags question: http://stackoverflow.com/q/25985243
tags question: http://stackoverflow.com/q/25985264
tags question: http://stackoverflow.com/q/26006649

http://stackoverflow.com/q/25987987
has answer: http://stackoverflow.com/a/25988058
has comment: http://stackoverflow.com/comment/40704898
has body: I was trying out the following example in nodejs "use strict"; const fs = require('fs'); fs.readFile('target.txt',function(err, data){ if (err) { throw err; } console.log(data.toString()) }) fs.writeFile('target.txt','writing some content',function(err){ if(err) throw err; console.log("file saved") }) As per the code, I read the file, print its content. Then I write some content in the same file and print the text file saved in the console. But my output is file saved writing some content The writeFile function is executed first rather than the readFile. Why does this happen and how can this be avoided?
tagged with: javascript
type: UnansweredQuestion
score: 2
has title: Why does the control flow does not follow the code execution order?
downvote count: 0
favorite count: 0
type: Question
upvote count: 2
answer count: 1
tagged with: node.js

http://stackoverflow.com/q/26019153
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26019275
possible better answer: http://stackoverflow.com/a/26019275
type: AnsweredQuestion
has title: Wrong function called after class toggle
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/26020576
type: Question
has body: I'm facing such problem. I have div with class oldClass and function that toggle div's class on click. When the class changed clicking on div should trigger other function and call alert, however this behavior doesn't appear and it seems like previous function is called again. I'm quite new in jQuery, so what am I missing? qwerty
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/26020576
downvote count: 0

http://stackoverflow.com/comment/40636219
score: 0
type: Comment
type: QuestionComment
has text: Do you need to send and receive the message from the background page? If you send the message from the app's main page, it should just work, i.e. sending it from the JavaScript of webview-embed.html
comment on: http://stackoverflow.com/q/25949427

http://stackoverflow.com/comment/40528331
has text: Thanks guys exactly what I wanted.
comment on: http://stackoverflow.com/q/25894785
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/70149861
type: Comment
has text: @dirkdig There's no simple answer for "when to use refs," but there is often a more maintainable way to reference components than via refs. http://stackoverflow.com/a/29504636/368697 is a good starting point to read and React's documentation on [Refs and the DOM](https://facebook.github.io/react/docs/refs-and-the-dom.html) is worthwhile as well.
comment on: http://stackoverflow.com/a/25941984
score: 1
type: AnswerComment

http://stackoverflow.com/a/25917166
has comment: http://stackoverflow.com/comment/40575900
answers question: http://stackoverflow.com/q/25916009
score: 0
has body: el: '#sportsManDetails', may not work if you do not load jQuery at the time you create a constructor of the view. Make sure you have jQuery loaded before this line app.SportsManDetailsView = Backbone.View.extend({ you can check it with console.log(jQuery.fn.jquery);`
type: Answer

http://stackoverflow.com/comment/40588044
type: Comment
type: QuestionComment
has text: It is executed inside the success?
comment on: http://stackoverflow.com/q/25927478
score: 0

http://stackoverflow.com/comment/40661330
type: QuestionComment
has text: Please read [this](http://stackoverflow.com/help/on-topic) and [this](http://stackoverflow.com/help/dont-ask) article, before posting questions.
score: 1
comment on: http://stackoverflow.com/q/25968941
type: Comment

http://stackoverflow.com/a/26033244
type: Answer
downvote count: 0
score: 1
has body: I changed your code a bit, to get it easier to read, and make it work as well. Your problem was in the structure of your while : Handle the user input if it's not 1, 2, or 3 Get the right tickets count at the end Correctly loop while totTickets &lt;= MAX... Here is a sample of the structure if you want to have a look : if (manyAdults &lt;= 10) { adultsCounter = adultsCounter + manyAdults; costAdults = manyAdults * adults; alert("You bought " + manyAdults + " adult tickets for $ " + costAdults.toFixed(2)); } else { alert("You can only buy 10 tickets per ticket type."); } totTickets = totTickets + toddlersCounter + juniorsCounter + adultsCounter; //don't forget to reset their values, otherwise your ticket count will grow instantly toddlersCounter = 0; juniorsCounter = 0; adultsCounter = 0; totSales = costToddlers + costJuniors + costAdults; I put a button in the Fiddle to control the launch of your while :) Take a look at this Working Fiddle with the entire code !
upvote count: 1
answers question: http://stackoverflow.com/q/26032308

http://stackoverflow.com/comment/40649554
type: Comment
type: QuestionComment
has text: is the num of images fixed?
comment on: http://stackoverflow.com/q/25962402
score: 0

http://stackoverflow.com/a/45889144
type: Answer
has body: Here are the complete list of scripts required to get rid of this problem. (Make sure the file exists at the given file path) and also include the below css link in _Layout.cshtml for a stylish popup.
answers question: http://stackoverflow.com/q/26016562
score: 0

http://stackoverflow.com/comment/40617254
type: QuestionComment
comment on: http://stackoverflow.com/q/25943030
has text: @jeff above meant to say `setInterval`.
score: 0
type: Comment

http://stackoverflow.com/comment/40605466
type: AnswerComment
score: 0
type: Comment
has text: You could certainly use ng-change and then store the object. For a slightly more hack-y approach, instead of embedding the ng-selected code in the attribute, use a function, and when it finds equality store the object somewhere else. Let me know if that doesn't make sense to you - I can update the fiddle.
comment on: http://stackoverflow.com/a/25936299

http://stackoverflow.com/q/25899805
has answer: http://stackoverflow.com/a/25899849
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/1227286
has answer: http://stackoverflow.com/a/25899825
has comment: http://stackoverflow.com/comment/40537717
answer count: 4
has title: How to check if class attribute exist?
has answer: http://stackoverflow.com/a/25899966
downvote count: 0
has comment: http://stackoverflow.com/comment/40537206
accepted answer: http://stackoverflow.com/a/25899835
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40537106
possible better answer: http://stackoverflow.com/a/25899825
has body: I'm trying to check if there is no class tag within a &lt;li&gt; &lt;/li&gt; tag. For example, if I have this: &lt;li class="menu...."&gt; words &lt;/li&gt; I want to ignore it. However if I have this: &lt;li&gt; words &lt;/li&gt; I want to use it. What I currently have is something along the lines of: $("li").each(function() { if ($(this).classList.contains('') { do function } }) However, this is not working - how would I go about doing this? Thanks in advance
has answer: http://stackoverflow.com/a/25899835
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40537839

http://stackoverflow.com/a/26020805
has comment: http://stackoverflow.com/comment/40757154
downvote count: 0
has comment: http://stackoverflow.com/comment/40756532
has body: You're on the right track: &lt;%- if @intercom_event.present? -%&gt; &lt;%= javscript_tag do -%&gt; Intercom('trackEvent', '&lt;%=j @intercom_event %&gt;'); &lt;%- end -%&gt; &lt;%- end -%&gt; The j method escapes for JavaScript context like the companion method h escapes for HTML. This is important to avoid scripting errors. For more complicated structures, @intercom_event.to_json would give you a JavaScript compatible representation.
score: 1
answers question: http://stackoverflow.com/q/26020664
upvote count: 1
type: Answer

http://stackoverflow.com/comment/40705011
score: 1
has text: I really like how you have answered my question, you've pointed out where I went wrong and provided the solution to this instead of bombarding with code and not really explaining anything.
type: AnswerComment
comment on: http://stackoverflow.com/a/25993029
type: Comment

http://stackoverflow.com/q/26005234
score: 1
favorite count: 0
type: Question
tagged with: ember-data
tagged with: javascript
has body: I'm developing a flashcard app that shows the chinese characters to the user. I have a App.User class setup with all of the properties, however I have great difficulty keeping track with the trial-property, which keeps track of the number fo times the user has been exposed to that particular character/sinogram. The application controller is supposed to store the current logged in user and it's details as attributes. But I can't seem to get hold of the object in the trials attribute or how to do that in ember and ember data. I read something about extending the supported attribute types, but I honestly have no idea how to make it work. (http://www.kaspertidemann.com/representing-objects-in-ember-data) Eventually a REST-api php-backend is gonna provide the data, but for now I'm using ember data's fixtures.adapter to test it in my app. Any help on this is greatly appreciated! Thanx in advance. PS: I tried to be as complete as possible, but if anything is unclear just let me know and I'll provide more details! // This template has a button which trigger the login action // application controller App.ApplicationController = Ember.ArrayController.extend({ username: 'Sunchild', currentUser: {}, // get the user.model particularUser: function() { return this.get('userArray').filterBy('username', this.get('username')); }.property('userArray.@each.username'), login: function(){ if ((this.get('particularUser').getEach('hed_password') == _password)){ // Code to store all the App.user info on the controller. // I figured I just set the currentUser property to the object, // but I don't know how to get to the currentUser.trials property. this.set('currentUser', this.get('particularUser')); var _trialsObject = this.get('currentUser').getEach('trials'); for (var key in _trialsObject) { // Does not work } } }); // Router and Routes App.Router.map(function() { this.resource('signup'); this.resource('login'); this.resource('profile'); this.resource('practice'); this.resource('overview'…
upvote count: 1
has title: How to use an object as model-attribute in Ember.js and Ember data
type: UnansweredQuestion
tagged with: ember.js
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/40556961
comment on: http://stackoverflow.com/a/25891325
has text: This is My Another Question related to HREF link Can Anyone tell me how to stop system generated message "EROOR LODING PAGE" If i have used for(var p=1;p<=numPages;p++) { var html1='' +p+' &nbsp&nbsp';// $('#expense_list').append(html1); } and i have used this href id only but not linked to any page so system is giving that message Error Loading Page how can i stop this message??????? jquery
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25929426
score: 1
has body: I am trying to hide the button1 when user clicked on button1 and show the button2.when user clicked on button2 and show the button1. At the time of when the user clicked button1 call the function myController1 and when the user clicked button2 call the function myController2 button1 button2 how show other element and also call the controller
has title: How to hide clicked button1 and show button2 and on click on button2 hide button2 and show button1 in angularjs?
downvote count: 1
type: Question
tagged with: angularjs-directive
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25929641
accepted answer: http://stackoverflow.com/a/25929664
favorite count: 0
has answer: http://stackoverflow.com/a/25929732
has answer: http://stackoverflow.com/a/25929664
answer count: 4
has answer: http://stackoverflow.com/a/25929641
has answer: http://stackoverflow.com/a/25929753
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/q/25893328
has title: Avoid mouseup event when selecting a file from dialog when double clicking
type: AnsweredQuestion
tagged with: firefox
tagged with: mouseup
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25959984
tagged with: http://stackoverflow.com/tag/html
score: -2
answer count: 2
downvote count: 3
possible better answer: http://stackoverflow.com/a/25914060
has comment: http://stackoverflow.com/comment/40525993
upvote count: 1
has body: I have a input[type="file"] in my web page and when the file dialog is open and I select a file with double clicking the mouseup event is triggered. But if I select the file and then click the Open button to select there is no extra event. This behavior is specific to Firefox, I tested in Chrome, IE and Opera and there is not extra mouseup event. Also there is no mousedown event, so the log will have two sequential mouseup events. HTML: &lt;input type="file" /&gt; JavaScript: jQuery(document).mouseup(function(e) { //... }); Here is a fiddle where you can see this behavior. To see it in action make sure that the file dialog is over the Result box of the jsfiddle page. How can I avoid this? Is this a browser bug? Googling didn't come up with any useful results. Edit: This issue appears on my Firefox (version 32.0.1 on Win7 64bit) but not on Firefox 32.0 in Linux.
has answer: http://stackoverflow.com/a/25914060
accepted answer: http://stackoverflow.com/a/25959984
has comment: http://stackoverflow.com/comment/40526052
has comment: http://stackoverflow.com/comment/40525755

http://stackoverflow.com/comment/40528907
type: QuestionComment
has text: If you're actually using jQuery to parse the input despite what you said in the description, you can use http://api.jquery.com/jquery.parsehtml/ instead of whatever method you're using.
score: 0
comment on: http://stackoverflow.com/q/25895348
type: Comment

spacing
tags question: http://stackoverflow.com/q/26016633
tag name: spacing
type: Tag

http://stackoverflow.com/q/26031131
has body: I'm working on Drupal 5. I have a separate .js file which is added by using drupal_add_js(drupal_get_path('module','MTM')."/include/JS_form.js"); I have an element &lt;a onclick="MTM_test()"&gt;Name&amp;#8657;&lt;/a&gt; And a JS code in JS_form.js &lt;script type="text/javascript"&gt; function MTM_test(){ alert('A'); } &lt;/script&gt; And when I click on that element nothing happens even though it appears on the page's source code. What am I doing wrong?
has title: Can't call JS function from file Drupal 5
tagged with: drupal
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26031276
downvote count: 1
accepted answer: http://stackoverflow.com/a/26031276
type: Question
tagged with: javascript
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/40774572
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25923152
type: AcceptedAnswer
type: Answer
has body: string.replace(/[^0-9xX]/g,"") will remove all characters that are not 0-9, x or X. Read more here.
accepted answer of: http://stackoverflow.com/q/25923092
has comment: http://stackoverflow.com/comment/40580340
answers question: http://stackoverflow.com/q/25923092
score: 0

http://stackoverflow.com/a/25960871
upvote count: 2
answers question: http://stackoverflow.com/q/25960729
score: 2
downvote count: 0
has body: Add to select onchange function &lt;select name="storeID" onchange='changeAction(this.value)'&gt; and add to javascript function changeAction(val){ document.getElementById('storeID').setAttribute('action', val); } This will change action after selected option is changed to selected option value.
type: Answer

http://stackoverflow.com/a/26022767
downvote count: 0
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/26022724
has body: Omit the dollar sign: &lt;h2&gt;{{verification.state}}&lt;/h2&gt;
accepted answer of: http://stackoverflow.com/q/26022724
type: AcceptedAnswer

http://stackoverflow.com/comment/40634383
has text: @Prashank No need to be rude. Yes, I did try Google. That is numbers to words. My script does that. I need to do the reverse.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25954221

http://stackoverflow.com/q/25967466
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/400836
score: 0
answer count: 1
has body: My webpage has a grid which contains 500 rows and 30 columns. Each cell is either a dropdown or a textbox. As of now, we are attaching 'change' events to each of these elements individually. Recently, I learnt that JQuery event delegation using 'on' method can improve performance. t I created two prototypes one with event delegation and one without it. Without event delegation: http://jsfiddle.net/djaoru53/ $(".event").click(function(){ alert("click"); }); With event delegation: http://jsfiddle.net/15cswkq7/ $("#test").on("click",".event", function(){ alert("click"); }); How should I measure the performance improvement that I get on my webpage by using event delegation? What tools can I use and what should I measure?
has title: How to measure the performance advantage arising due to Jquery event delegation?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25967552
tagged with: event-delegation

http://stackoverflow.com/q/25943586
upvote count: 1
type: Question
tagged with: javascript
has title: Javascript .load function error causing issues with jQuery
downvote count: 0
tagged with: load
score: 1
has comment: http://stackoverflow.com/comment/40616926
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40616971
tagged with: php
has body: I am making a basic PHP 'Game' for learning purposes. For me, its all about learning PHP classes. I have this part of javascript to keep loading 2 divs which contain 'game' information: function bla() { var timeTillWinner = $(".time").html(); if (timeTillWinner &lt; '20') { $(".container").fadeOut(); //alert(timeTillWinner); } } // function to reload the container function pageUpdate(){ $('body').load(document.URL + '#playerList').load(document.URL + '.table-information'); bla(); } setInterval(pageUpdate, 10000); The fadeOut() line is not working, yet the alert does fine. In my web console on firebug I see this everytime the pageUpdate() function is called: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ SyntaxError: syntax error jquery.min.js:1 Any help on how to solve this error? I could go down the route of loading the div content with AJAX etc but just wanted something simple for now whilst I worked on the PHP. Thanks!
answer count: 0
has comment: http://stackoverflow.com/comment/40616889

inheritance
tags question: http://stackoverflow.com/q/25877026
tag name: inheritance
type: Tag
tags question: http://stackoverflow.com/q/25982342
tags question: http://stackoverflow.com/q/25974977
tags question: http://stackoverflow.com/q/26022505

http://stackoverflow.com/comment/40496949
score: 0
type: AnswerComment
has text: You don't need the `i` modifier.
type: Comment
comment on: http://stackoverflow.com/a/25877484

http://stackoverflow.com/q/25940378
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25940790
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40611630
has comment: http://stackoverflow.com/comment/40611686
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Issue finding specific div with same class - JQuery
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40611217
has body: I have a file selector that populates a div with a thumbnail based on the file. Now I have multiple buttons and divs that contain the same class names. What I am using for each time the primary button is selected is, var thisButton = $(event.target); which translates to: var appendThis = thisButton.closest('.insurance').find(".attachmentCont"); appendThis.append(' X '); $(".removeImg").bind('click', function(){ $(this).parent().remove(); }); The appenThis equals the button which is within a div containing another div attachmentCont Both the button and div are within a parent div which is div.insurance There are multiple div.insurance containers. My issue is when using thisButton.closest('.insurance').find(".attachmentCont"); it always focuses on the .attachmentCont div that was first selected. So if I selected section 1, the image populates. If I select section 2, section 1 still gets that image when the div.attachmentCont within section 2 should of gotten the append() too. Suggestions or Thoughts? HTML EXAMPLE: General Your

http://stackoverflow.com/a/25986549
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40701385
accepted answer of: http://stackoverflow.com/q/25985650
answers question: http://stackoverflow.com/q/25985650
type: Answer
downvote count: 0
has body: Here you go, you get the idea: http://jsfiddle.net/8bhd8njh/ function bind(obj, evt, fnc) { // W3C model if (obj.addEventListener) { obj.addEventListener(evt, fnc, !1); return !0; } // Microsoft model else if (obj.attachEvent) { return obj.attachEvent('on' + evt, fnc); } // Browser don't support W3C or MSFT model, go on with traditional else { evt = 'on'+evt; if(typeof obj[evt] === 'function'){ // Object already has a function on traditional // Let's wrap it with our own function inside another function fnc = (function(f1,f2){ return function(){ f1.apply(this,arguments); f2.apply(this,arguments); } })(obj[evt], fnc); } obj[evt] = fnc; return !0; } } String.prototype.supplant = function (a, b) { return this.replace(/{([^{}]*)}/g, function (c, d) { return void 0!=a[d]?a[d]:b?'':c }) }; var data = { food : '{meat} and {vegetables}', meat : '{pork} and {beef}', pork : '{tough} and {chewy}', tough : '{burnt} and {salty}', vegetables : '{carrots} and {peas}' }; var classname = 'game-clickable'; var init = function(obj, data) { var template = '&lt;span class="{classname}"&gt;{text}&lt;/span&gt;'; obj.innerHTML = obj.innerHTML.replace(/{([^{}]*)}/g, function(a,b) { return template.supplant({ classname : data[b] ? classname : '', text : b }, !0) }); var objects = document.getElementsByClassName('game-clickable'); for (var i = 0; i &lt; objects.length; i++) { bind(objects[i], 'click', (function(o) { return function() { if (!data[o.innerHTML]) { return; } var parent = o.parentNode; var span = document.createElement('SPAN'); span.innerHTML = data[o.innerHTML]; parent.insertBefore(span, o); parent.removeChild(o); init(parent, data); } })(objects[i])); } }; init(document.getElementById('word-game'), data); .game-clickable { cursor: pointer; text-decoration: underline; } &lt;div id="word-game"&gt; {food} &lt;/div&gt;

http://stackoverflow.com/a/26023587
has body: Try to change find('testJQ') to find('#testJQ'). I added hash character for id.
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26023529

http://stackoverflow.com/comment/40608016
type: QuestionComment
has text: It's all good, I just wanted to clarify terms, and the other chap noticed that with the clarified terms this had already been asked. A closure is really something different than an IFFE, though IIFE's are a way to create a closure.
comment on: http://stackoverflow.com/q/25938593
type: Comment
score: 1

http://stackoverflow.com/q/26031086
tagged with: javascript
tagged with: jquery
has title: Why Object expected error in jquery?
favorite count: 0
has comment: http://stackoverflow.com/comment/40774538
has comment: http://stackoverflow.com/comment/40774522
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4584373
has comment: http://stackoverflow.com/comment/40774471
has body: I have simple web page having html, css and jquery. Purpose of this page is to demo horizontal collapse pane. Sample HTML SIDEBAR I used IE debugger and it hits at $(window).load(function () saying Object expected. I do not understand why it is not working. Also this page is taking long time to load.
tagged with: css
type: UnansweredQuestion
downvote count: 1
type: Question
tagged with: debugging
score: -1
has answer: http://stackoverflow.com/a/26031172
has comment: http://stackoverflow.com/comment/40774552
has comment: http://stackoverflow.com/comment/40774647
upvote count: 0
answer count: 1

http://stackoverflow.com/comment/40516684
type: AnswerComment
has text: @Sid M, Agreed. But, the answer to the question is already there. And describing the same thing again from another post (as if that I found it) is IMHO "plagiarism"
type: Comment
comment on: http://stackoverflow.com/a/25887928
score: 0

http://stackoverflow.com/q/25954933
accepted answer: http://stackoverflow.com/a/25959316
has comment: http://stackoverflow.com/comment/40635341
downvote count: 0
possible better answer: http://stackoverflow.com/a/25955140
has comment: http://stackoverflow.com/comment/40635282
score: 1
tagged with: meteor
has answer: http://stackoverflow.com/a/25955970
favorite count: 0
has answer: http://stackoverflow.com/a/25955140
answer count: 4
type: AnsweredQuestion
has body: Due to nature of Meteor where the Template.&lt;name&gt;.rendered executed before the collection could be retrieved, I have resorted to Iron-Router waitOn. This is to wait a playlist to be enabled before rendering the page. It works in Firefox and IE (ironically) but never in Chrome. The error pointed out by the Chrome console is Cannot read property 'uploadType' of undefined which makes sense since the object/collection failed to load in Chrome. What should I do to encounter this? FYI the waitOn is like this: //router.js this.route('videoPlayer',{ path:'/video', waitOn: function(){ return [Meteor.subscribe('videoPlaylist'), Meteor.subscribe('video')]; } }); It doesnt work even during single subscription.
has title: Iron Router waitOn Does Not Work in Chrome
tagged with: iron-router
upvote count: 1
has answer: http://stackoverflow.com/a/25964977
has comment: http://stackoverflow.com/comment/40635292
type: Question
has answer: http://stackoverflow.com/a/25959316
tagged with: javascript
has comment: http://stackoverflow.com/comment/40642764

http://stackoverflow.com/comment/40609947
type: AnswerComment
comment on: http://stackoverflow.com/a/25939680
score: 0
type: Comment
has text: There is no clicking left or right, I have it set with no controls to auto play and slide to the left.

http://stackoverflow.com/a/25967017
type: Answer
has comment: http://stackoverflow.com/comment/40658002
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25966953
accepted answer of: http://stackoverflow.com/q/25966953
type: AcceptedAnswer
downvote count: 0
has body: Here, this simple solution should do well: var num = 3434333333 var arr = num.toString().split(""); var finalStr = ""; for(var i = 0; i &lt; arr.length; i++){ if(arr[i] % 2 === 1 &amp;&amp; arr[i + 1] % 2 === 1){ finalStr += arr[i] + "-"; } else { finalStr += arr[i]; } } simply keep a string for the result, if two consecutive numbers are odd append an extra "-" after the number in the string, otherwise simply append the number and your final string will contain the desired result. See the DEMO here
has comment: http://stackoverflow.com/comment/40657921
has comment: http://stackoverflow.com/comment/40657788

http://stackoverflow.com/q/26010685
tagged with: javascript
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/26011133
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Try clicking one of the thumbnails here: http://henrybuilt.com/questions/ On a computer it works as desired (the text overlay is displayed on top of the first image in the slide set and then goes away when next or previous is clicked). On iPad or iPhone in both safari and chrome, the text overlay appears for a second and then gets covered by my background image slide div once it loads and I cannot make my overlay (.slide_view .title) appear on top of the background div. The specific css: .slide_view .title{ display: none; position: absolute; top:0; left:0; background-color: white; width: 100%; height: 100%; z-index: -3 } #backstretch{ z-index: -3; } The full doc: <?php $slides = array( array("Why talk with us", "whytalk", 6), array("Who we are", "who", 1), array("Notable projects", "notable", 0), array("Products", "products", 0), array("Unique options", "unique", 11), array("Kitchens", "kitchens", 0), array("Whole House", "whole", 0), array("Furniture", "furniture", 4), array("Opencase", "opencase", 0), array("What is a system", "system", 5), array("HB vs Custom", "vscustom", 0), array("HB vs Euro system", "vseuro", 0), array("Design Process", "design", 0), array("Making it", "making", 0), array("Installation", "installation", 0), array("Pricing", "pricing", 0), array("Materials", "materials", 0), array("High functions", "highfunctions", 0), array("Craft quality", "craft", 0), array("Press kit", "press", 0), array("Working remotely", "working", 0), array("Client site", "client", 0) ); ?> henrybuilt <?php $i = 0; foreach($slides as $slide){ ?> <div class="thumb_wrapper" group="<?php echo $i; ?>"> <img src="images/<?php echo $slide[1]; ?>_0.jpg" /> <?php echo $slide[0]; ?> <?php $i++; } ?> some text <?php foreach($slides as $slide){ for($i = 0; $i < $slide[2]; $i++){ echo ' '; } } ?>
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/26011133
type: Question
has title: Mobile safari ignoring z-index

http://stackoverflow.com/comment/40578660
type: AnswerComment
has text: Please add a summary of that external resource here, otherwise when (not 'if') that page dies your answer becomes immediately useless.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25922142

http://stackoverflow.com/comment/40756620
has text: @MatthewBakaitis I am not using morgan, but can you tell me the answer anyway, it might help. thanks
comment on: http://stackoverflow.com/q/26014323
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40758925
type: Comment
type: QuestionComment
has text: I cannot modify the existing JS code, so data must exist within `foo()`. I am calling `foo()` from the console.
comment on: http://stackoverflow.com/q/26022531
score: 0

http://stackoverflow.com/q/25913973
answer count: 1
accepted answer: http://stackoverflow.com/a/25934685
has title: Confirm Navigation not showing my message
has body: I have used this but it is not showing my custom message instead it is showing its own message &lt;script language="JavaScript"&gt; var needToConfirm = true; window.onbeforeunload = confirmExit; function confirmExit() { if (needToConfirm) return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, your changes will be lost. Are you sure you want to exit this page?"; } &lt;/script&gt;
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40564938
tagged with: dom
has answer: http://stackoverflow.com/a/25934685
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40564295
type: Comment
comment on: http://stackoverflow.com/q/25914050
type: QuestionComment
score: 0
has text: Did you try to debug in firebug? What does `dataString` hold on submit? Have you considered to use the [jQuery Form Plugin](http://malsup.com/jquery/form/)?

http://stackoverflow.com/q/26005215
possible better answer: http://stackoverflow.com/a/26005353
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40728236
has title: Want both divs to be set to the max of their heights on page load
has answer: http://stackoverflow.com/a/26005353
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26005255
type: AnsweredQuestion
has body: Clients are using a Content Management System to inject text into 2 divs that represent buttons. I want the buttons to be equal in height. The problem is: If I a set a height equal for both using CSS, then that only works if the client doesn't type in too much text. If I don't set a height using CSS, then that only works if the client types in the same number of lines of text into both. So I think JQuery will come to the rescue on this one. Can you help me figure out which functions to use? An outline of the issue is: Here's some text that the client will control. Here's some more text that the client will control
accepted answer: http://stackoverflow.com/a/26005255
has answer: http://stackoverflow.com/a/26005542
type: Question

http://stackoverflow.com/comment/40542172
type: Comment
has text: Works perfectly. Thanks. Sorry about that error. It was a typo. I'll fix it. Thanks again!
comment on: http://stackoverflow.com/a/25902528
type: AnswerComment
score: 0

http://stackoverflow.com/q/25902078
has answer: http://stackoverflow.com/a/25902144
upvote count: 2
has body: I have two elements displayed inline-block; one an image and one text. The text is dynamic so it can have any width. I want to hide the image when these two elements combined become wider than the page. I've tried this on page resize: if ($(window).width() == $('#id').width()) { document.getElementById('image').style.display = 'none'; } else { document.getElementById('image').style.display = 'block'; } This isn't working correctly. Any ideas?
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/40541431
score: 2
has answer: http://stackoverflow.com/a/25902282
has title: How to hide dynamic content if it's width is greater than screen width?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: resize
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/q/25957631
linked to: http://stackoverflow.com/q/122102
has body: I want to remove an obj from my form and be able to add it back as it was onload. But when I try to add it back using the var I tried to save onload I get an error (it queries the current form which has its child removed). How can I store all the children obj properties in their current form onload, immutably, so that I can be able to add them back after they have been removed from the document? This would give me an error ("Argument 1 of Node.appendChild is not an object"): var fullList2 = null; window.onload = function () { fullList2 = document.getElementsByName('person')[0].children; document.getElementsByName('person')[0].removeChild(document.getElementsByName('person')[0].children[1]); document.getElementsByName('person')[0].appendChild(fullList2[1]); } the form: Scott Ambler Andrew Binstock " tabindex="3" />
has answer: http://stackoverflow.com/a/25957701
possible better answer: http://stackoverflow.com/a/25957714
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25957714
tagged with: javascript
has comment: http://stackoverflow.com/comment/40641917
score: 0
has title: How can I store obj properties in there current form onload?
accepted answer: http://stackoverflow.com/a/25957701

http://stackoverflow.com/comment/40715073
score: 0
type: Comment
has text: You should use your image element myImageElement.onclick = function() { ... }
type: AnswerComment
comment on: http://stackoverflow.com/a/25992229

http://stackoverflow.com/comment/40595716
type: QuestionComment
has text: possible duplicate of [drawing CSS cross shape with jquery](http://stackoverflow.com/questions/25932008/drawing-css-cross-shape-with-jquery)
type: Comment
comment on: http://stackoverflow.com/q/25928767
score: 0

http://stackoverflow.com/a/25932704
has comment: http://stackoverflow.com/comment/40607355
has comment: http://stackoverflow.com/comment/40597647
score: 0
has comment: http://stackoverflow.com/comment/40611872
has comment: http://stackoverflow.com/comment/40610280
type: Answer
has body: Just comment out this line, echo "You have" . " " . "&lt;span class='yourstyle'&gt;" . $totalRows1 . "&lt;/span&gt;" . " " . "new message(s). Please go to the message area in your control panel.";
has comment: http://stackoverflow.com/comment/40607772
has comment: http://stackoverflow.com/comment/40609866
has comment: http://stackoverflow.com/comment/40622389
has comment: http://stackoverflow.com/comment/40610107
answers question: http://stackoverflow.com/q/25931119

http://stackoverflow.com/q/25899951
has answer: http://stackoverflow.com/a/25941189
answer count: 1
tagged with: firebase
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25941189
downvote count: 0
tagged with: javascript
tagged with: angularfire
favorite count: 0
tagged with: angularjs
type: Question
linked to: http://stackoverflow.com/q/26047958
score: 3
has title: How can I sort a firebase angularfire array into weeks and days?
has body: I'm working on a todo list that groups tasks by week (based on added and completion dates) and groups tasks by the days of the week. The database structure looks like this: users userA tasks taskobject1 taskobject2 .. userB tasks taskobject1 task object2 I'm using an ng-repeat to display all the tasks to the view for each user. I would like to be able to sort them first by which week they fall into and then like this: #week1 --monday-- task a task b --tuesday-- task c task d .. #week2 --monday-- task a .. Even a conceptual answer would be helpful. I don't know where to start exactly. Thanks.
upvote count: 3

http://stackoverflow.com/comment/40665944
type: AnswerComment
type: Comment
has text: Thanks for link. That's just what I was looking for.
comment on: http://stackoverflow.com/a/25971430
score: 0

http://stackoverflow.com/comment/40720246
type: Comment
comment on: http://stackoverflow.com/q/25993315
score: 0
has text: what version os select2 are you using? can you jsfiddle what you are experiencing?
type: QuestionComment

http://stackoverflow.com/comment/40766610
comment on: http://stackoverflow.com/a/26026381
type: Comment
has text: `result` was kept in the first sample to avoid major differences from the sample post and highlight the missing return but later it is explained how it can be simplified. But it is all for the sake of simplicity a more clear answer
type: AnswerComment
score: 0

http://stackoverflow.com/a/30951615
has body: I am not sure whether the answer is still required or not. However, posting my approach of doing it. function removeClass(className) { // convert the result to an Array object var els = Array.prototype.slice.call( document.getElementsByClassName(className) ); for (var i = 0, l = els.length; i &lt; l; i++) { var el = els[i]; el.className = el.className.replace( new RegExp('(^|\\s+)' + className + '(\\s+|$)', 'g'), '$1' ); } } var elements = document.getElementsByClassName("inoneset"); for (var i = 0; i &lt; elements.length; i++) { (function(i) { elements[i].onclick = function() { removeClass("isactive"); //this.setAttribute("class", this.getAttribute("class") + " isactive"); var headerElem = this.getElementsByClassName("headerSelected")[0]; headerElem.setAttribute("class", headerElem.getAttribute("class") + " isactive"); var addressElem = this.getElementsByClassName("selDelAddress")[0]; addressElem.setAttribute("class", addressElem.getAttribute("class") + " isactive"); var footerElem = this.getElementsByClassName("footerSelected")[0]; footerElem.setAttribute("class", footerElem.getAttribute("class") + " isactive"); }; })(i); } Fiddle - http://jsfiddle.net/38nv5rft/18/ Reasoning As you can see, there is a remove class function, that removes the class from the elements in the document. One can update it as per the requirement. Then the main logic, which gets all the elements, iterate on them and bind the click function. In click function, we are removing the inActive class from every element and then for current block, adding inActive class. Please note, as per the fiddle, I did not find the class on inoneset elements being updated, hence, commented out the code. Important Point Click event bubbles, hence, click on elements with showDelete and showDialog click functions will bubble the event to click event of inoneset i.e. click handler of inoneset will also be triggered. In order to stop the propagation of event to it, use event.stopPropogation() in showDelete and sho…
answers question: http://stackoverflow.com/q/25906155
score: 0
type: Answer

http://stackoverflow.com/comment/40596739
type: Comment
comment on: http://stackoverflow.com/a/25932262
has text: You have a error in your code. `y = 2^x => x*ln(2) = ln(y) => x = ln(y)/ln(2) != ln(y)/ln(ln(2))`
score: 0
type: AnswerComment

http://stackoverflow.com/a/25938763
has body: One way is to use common classes and data attributes $(".rads").on("change", '[type="radio"]', function (e) { var show = $(this).data("show"); $(".details").hide().filter(show).show(); }); .details { display: none; } A B Apple Bacon There is also pure CSS solutions using the :checked selector.
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25938410
score: 1

http://stackoverflow.com/q/25874385
downvote count: 0
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/4982702
has answer: http://stackoverflow.com/a/25874506
type: AnsweredQuestion
has body: I have two bookmarklets that work individually 1) javascript:(function(){window.open("http://mail.yahoo.com");})(); 2) javascript:(function(){;document.getElementsByClassName('btn-compose')[0].click()})(); (the above lines of code were put through a bookmarklet generator here: http://ted.mielczarek.org/code/mozilla/bookmarklet.html and each bookmarklet works fine) but when they are together like so: javascript:(function(){window.open("http://mail.yahoo.com");document.getElementsByClassName('btn-compose')[0].click()})(); or like so: javascript:(function(){window.open("http://mail.yahoo.com");})(); javascript:(function(){;document.getElementsByClassName('btn-compose')[0].click()})(); the compose window does not open. I have a feeling the DOM is not ready. but this fails: javascript:(function(){window.open("http://mail.yahoo.com");})(); document.onreadystatechange = function () { if (document.readyState == "complete") { javascript:(function(){;document.getElementsByClassName('btn-compose')[0].click()})(); } }
score: 1
upvote count: 1
has title: javascript commands work singly but not sequentially as a bookmarklet
accepted answer: http://stackoverflow.com/a/25874506
type: Question
tagged with: javascript
tagged with: bookmarklet

http://stackoverflow.com/q/25962759
answer count: 3
has title: Why does Date.now() return a different value every time it is called?
favorite count: 0
has answer: http://stackoverflow.com/a/25962898
has answer: http://stackoverflow.com/a/25962809
has body: I typed this in my console repeatedly 5 times: Date.now(); each time I get different value: 1411325746046 1411325746707 1411325747247 1411325747731 1411325748204 the difference between each value is way more than I had expected... Any ideas as to why?
has comment: http://stackoverflow.com/comment/40649849
score: 2
has answer: http://stackoverflow.com/a/25962794
upvote count: 3
type: UnansweredQuestion
tagged with: utc
has comment: http://stackoverflow.com/comment/40649874
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40649863
tagged with: javascript

http://stackoverflow.com/comment/40642167
type: Comment
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/25958252
has text: Humble request: please stop sharing links to w3schools. They contain lots of outdated info. if you want to share a jquery method then link to the ocumentation or create a demo yourself...

http://stackoverflow.com/q/25883732
tagged with: jquery
has body: Columanfilter is not working in datatables in server side preprocessing. Datatable with column search is not working.Below code is the sample code.Can please provide it in the jsdiddle or any other. Please help me. This is javascript code $(document).ready(function() { drawDataTable = function() { $('#example').dataTable( { "processing": true, "serverSide": true, "ajax": "../server_side/scripts/server_processing.php", "sPagination": "full_numbers", "bFilter": true, "oSearch":{ "sSearch":"", "bRegex": false, "bSmart": true }, "aoColumns":[ {"bSearchable": true}, null, null, null ] }) .columnFilter({ aoColumns: [{ type: "text" }, { type: "text" }, { type: "text" },{ type: "text" }] }); } drawDataTable(); } ); And this is Html code Name Position Office Extn. Name Position Office Extn.
tagged with: ajax
tagged with: datatables
type: UnansweredQuestion
tagged with: php
score: 0
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25883779
has title: cloumnfilter not working jquery datatables in serverside preprocessing
has answer: http://stackoverflow.com/a/27906264
tagged with: javascript

http://stackoverflow.com/q/25959232
has body: need to learn the basics of bootstrap for a new project coming up but so far its hurting my brain. For some reason, I cannot get basic jQuery to function on the website. Heres a jsFiddle of the basic bootstrap: http://jsfiddle.net/D2RLR/6891/ Here is the pay structure: <?php // require the database connection / action class require('libs/PHP_Classes/class.database.php'); require('libs/PHP_Classes/class.table.php'); ?> PHPGamble <!--[if lt IE 9]> <![endif]--> <!--[if lt IE 9]> <![endif]--> Current Players On Table Player 1 Player 2 Copyright Craig Lovelock 2014 The playerlist will not change the html, The .html() is just to test. Nothing I try is working... A you can see in the example it doesnt work, have tested it in a blank fiddle and ofcourse it works fine. Cannot see why this is failing, its so simple. Craig.
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25959351
type: Question
has answer: http://stackoverflow.com/a/25959278
has title: jQuery problems with Bootstrap
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/q/26019675
tagged with: javascript
has comment: http://stackoverflow.com/comment/40763121
tagged with: struts2
has comment: http://stackoverflow.com/comment/40755434
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40764514
favorite count: 0
has answer: http://stackoverflow.com/a/26044407
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
has comment: http://stackoverflow.com/comment/40766226
upvote count: 1
has title: Struts2 page not returning correct value from checkbox
has body: I have a form with various pieces of phone information for two phones, including two checkboxes that correspond to a boolean value in my action class. The below javascript is setting the second check box automatically if the user enters two identical phone numbers. if(phone1 != '' &amp;&amp; phone1==phone2) { document.getElementById("phone2Type").value = document.getElementById("phone1Type").value; document.getElementById("phone2Text").value = document.getElementById("phone1Text").value; document.getElementById("phone2Text").checked = document.getElementById("phone1Text").checked; if( phone2Type=='CELL' &amp;&amp; document.getElementById('phone2Text') != null) { document.getElementById('phone2Text').disabled=true; } document.getElementById("phone2Type").disabled=true; } And the jspx code to go along with it: &lt;s:checkbox id="phone1Text" onclick="javascript:enableTextingBox()" cssClass="phoneText" name="phoneInfo.phone1.textOptionSelected" fieldValue="true" value="phoneInfo.phone1.textOptionSelected" disabled="%{!phoneInfo.phone1.textOptionEnabled || inputFieldDisabled}" /&gt; &lt;s:checkbox id="phone2Text" onclick="javascript:enableTextingBox()" cssClass="phoneText" name="phoneInfo.phone2.textOptionSelected" fieldValue="true" value="phoneInfo.phone2.textOptionSelected" disabled="%{!phoneInfo.phone2.textOptionEnabled || inputFieldDisabled}" /&gt; The problem I'm seeing is that when I use javascript to set phone2Text equal to phone1Text the corresponding boolean (phoneInfo.phone2.textOptionSelected) is not getting set. I'm confused because the above jspx works correctly when I forget the javascript and check the box manually. Looking at the parameters being sent in the post method, instead I see this: _checkbox_phoneInfo.phone2.textOptionSelected: "true" What I would expect to see is: phoneInfo.phone2.textOptionSelected: "true" I'm not sure if this is a Struts2 issue or some javascript peculiarity that I'm not familiar with.
type: Question
linked to: http://stackoverflow.com/q/16460923

http://stackoverflow.com/q/26027861
tagged with: css
has comment: http://stackoverflow.com/comment/40768990
has answer: http://stackoverflow.com/a/26027920
has answer: http://stackoverflow.com/a/26027884
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40768966
has title: Error in my Image Changing
tagged with: function
has comment: http://stackoverflow.com/comment/40768978
has body: Sorry if this is already asked, but i could not find my exact error. I want the image to change as i mouse over and change back as i mouse off. For some reason i get the alert messages, but the actual images do not change. This is my J script function altimage(){ alert("hi"); document.getelementbyid("header").innerhtml="This is good"; document.getelementbyid("homeicon").src="homelogoalt.jpg"; } function normimage(){ alert("bye"); document.getelementbyid("homeicon").src="Homelogo.jpg"; } and this is my div that hold the image i would like to change: &lt;div class="search" onmouseenter="altimage()" onmouseout="normimage()" style="width:30px;z-index:4;"&gt; &lt;img src="homelogo.jpg" alt="Home" class="menu" style="width:30px;height:30px;" id="homeicon"&gt; &lt;/div&gt;
tagged with: javascript
type: UnansweredQuestion
tagged with: web
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26023571
has comment: http://stackoverflow.com/comment/40761025
answers question: http://stackoverflow.com/q/26023464
has comment: http://stackoverflow.com/comment/40783209
accepted answer of: http://stackoverflow.com/q/26023464
score: 0
has body: Use .mouseenter and .mouseleaveinstead! $(document).ready(function () { $(".photo").mouseenter(function() { $(this).find('.permalink').stop().slideDown("slow"); }).mouseleave(function() { $(".permalink").slideUp("slow"); }); }); http://jsfiddle.net/csdtesting/umws6nrk/9//
has comment: http://stackoverflow.com/comment/40770579
has comment: http://stackoverflow.com/comment/40760812
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40780977
has comment: http://stackoverflow.com/comment/40761628
type: Answer

http://stackoverflow.com/comment/40541981
has text: I restructured the question to make it easier to understand.
comment on: http://stackoverflow.com/q/25902378
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40752139
score: 0
type: AnswerComment
type: Comment
has text: Hey, so I've done it like it's in the fiddle and it's not woring, do you know why? Thanks and here is the fiddle http://jsfiddle.net/tyfwvvnh/1/
comment on: http://stackoverflow.com/a/26004577

http://stackoverflow.com/comment/40774897
comment on: http://stackoverflow.com/a/26031267
score: 0
type: AnswerComment
type: Comment
has text: Thanks, didn't notice that he left out some of the `var` declarations.

http://stackoverflow.com/a/25940037
score: 1
has comment: http://stackoverflow.com/comment/40623437
upvote count: 1
answers question: http://stackoverflow.com/q/25934327
has body: Have you tried to use the charting libraries that are included with Dojo and therefore already included? I am currently using them with good results. I first found a good example at OpenNTF And here is an excellent tutorial. I also have used the Java charts also from OpenNTF but found the Dojox version to be a bit more flexible and less memory intensive for the Xpage.
type: Answer
has comment: http://stackoverflow.com/comment/40654119
downvote count: 0

http://stackoverflow.com/q/26033268
score: 0
tagged with: javascript
tagged with: jquery
tagged with: ellipsis
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion
has title: Ellipsis (…) with Jquery/JavaScript/CSS with support for IE 8 and ability to work on Grid/HTML table
has comment: http://stackoverflow.com/comment/40778532
has comment: http://stackoverflow.com/comment/40778533
has comment: http://stackoverflow.com/comment/40778609
has body: I want to implement ellipsis (…) functionality on my Jquery DataTable. I googled around and found tons of examples. I really likes this Jquery Plugin My requirements: Support for IE 8 Should be able to work on JQuery DataTable or any HTML table Simple solution. Does not matter if solution uses Jquery/JavaScript or CSS I would like the ability to see the hidden text. so if user clicks on ... or read more option, he must see the full text. see this example Text width should adjust based on column type. So if I am showing names which can be 100 character long in a column, ellipsis should come after 40-50 character and if the column size is 20 character, I should be able to configure column to show ellipsis after 10 character.
type: Question

http://stackoverflow.com/a/25885711
accepted answer of: http://stackoverflow.com/q/25883624
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25883624
upvote count: 5
has body: That heavily depends on how the web site handles sessions. If this is done through a unique ID in every request as a request parameter, then this is possible. But as soon as cookies are used, this is not possible. CasperJS is like a browser. You can have multiple tabs (casper instances), but the session is handled by the browser (PhantomJS). Even if you have multiple casper instances, they operate on the same cookies, so you cannot be logged in as a user and as an admin at the same time. This is because PhantomJS handles the cookies and even if you have multiple casper instances, there is only one phantomjs process underneath. If the admin interface is on another domain, this multiple casper instances should work. The rule of thumb is, if you can login in a single browser window with multiple tabs, you can do it with multiple casper instances. So, if they are on the same domain and cookies are used, you would need to do this with different scripts. Other questions that might interest you: How to test two interacting browsers (e.g. chat app) How to open a new tab in CasperJS

http://stackoverflow.com/q/25927822
downvote count: 0
score: 1
has body: I have the styling for my textboxes: input[type=text] { width: 300px !important; line-height: 25px; } I need to change it that if the container width is smaller than 300px it must inherit the width from the parent container else the width must be 300px.
type: Question
tagged with: asp.net-mvc
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
has title: CSS textbox width inherit from parent container with max width
favorite count: 0
has answer: http://stackoverflow.com/a/25927995
accepted answer: http://stackoverflow.com/a/25927995
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/26033681
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have separate file (LIB.php) with defined function. This function is called in each page. I want to make it dynamic, when I navigate to one of the pages the page gets active state in the function get_Navigation(){ $navigation = <<<END Home Admin Cart END; echo $navigation; }
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26033812
possible better answer: http://stackoverflow.com/a/26034164
has comment: http://stackoverflow.com/comment/40779201
upvote count: 3
has answer: http://stackoverflow.com/a/26034164
tagged with: php
type: AnsweredQuestion
score: 3
has title: Active link in the navigation list
has answer: http://stackoverflow.com/a/26033812

http://stackoverflow.com/comment/40755382
type: QuestionComment
comment on: http://stackoverflow.com/q/26020402
score: 0
type: Comment
has text: @chetan - stackoverflow.com/questions/12913141/… in this question he was unable to install node, but is installed node successfully and trying to intall bower

http://stackoverflow.com/comment/40491991
comment on: http://stackoverflow.com/q/25874632
has text: I´m happy for all of yours answers but I would like to say that I´ m not really good in PHP or JS so if you will briefly write some solid code I will be happy for that :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25994909
has body: I am wondering: Is there any significant difference between forEach and for loop in JavaScript. Consider this example: var myArray = [1,2,3,4]; myArray.forEach(function(value) { console.log(value); }); for (var i = 0; i &lt; myArray.length; i++) { console.log(myArray[i]); } Here is part of my research: Performance: According to JsPerf : forEach is little slower than for loop. Usability: There is no way we can break/return from the callback in case of forEach loop. For example: You want to find out if a number is prime or not. I think using for loop is much more easier than using forEach loop to do this. Readability: Using for loop makes code more readable than having forEach in code. Browser compatibility: forEach is Not supported in IE &lt; 9 So that introduces some shim in our code. My questions are: What are the advantages of forEach over for loop ? In what scenarios, forEach is more preferable. Why did even it come into JavaScript ? Why was it needed at all ?
has answer: http://stackoverflow.com/a/58451032
answer count: 9
downvote count: 0
possible better answer: http://stackoverflow.com/a/25997951
has answer: http://stackoverflow.com/a/73453462
has comment: http://stackoverflow.com/comment/40708416
has answer: http://stackoverflow.com/a/61756879
tagged with: loops
has answer: http://stackoverflow.com/a/25999347
has comment: http://stackoverflow.com/comment/40707872
type: AnsweredQuestion
tagged with: foreach
upvote count: 25
type: Question
has answer: http://stackoverflow.com/a/63033008
has answer: http://stackoverflow.com/a/64676565
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/25996033
has answer: http://stackoverflow.com/a/25997951
tagged with: javascript
has comment: http://stackoverflow.com/comment/40716667
has answer: http://stackoverflow.com/a/25996033
has title: Difference between forEach and for loop in javascript
has comment: http://stackoverflow.com/comment/40715250
linked to: http://stackoverflow.com/q/10929586
has comment: http://stackoverflow.com/comment/40708309
score: 25
favorite count: 0
has answer: http://stackoverflow.com/a/73708711

http://stackoverflow.com/comment/40491332
score: 0
comment on: http://stackoverflow.com/q/25874416
has text: Seems to work fine: http://jsfiddle.net/isherwood/be7uqg1f/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41019818
type: AnswerComment
type: Comment
has text: Ah, I see. Awesome! However, what are the use cases when not closing the server/process, there will be issues?
comment on: http://stackoverflow.com/a/25980121
score: 0

http://stackoverflow.com/comment/40754170
type: Comment
has text: That is horrible code, if I encountered it, I would refactor it :D
comment on: http://stackoverflow.com/a/26020049
type: AnswerComment
score: 2

http://stackoverflow.com/a/25973815
downvote count: 0
has body: I think you should remove the params object on the delete action or rename the parameter to speakerId, because otherwise AngularJS cant set the url parameter in the resource (your url placeholder is speakerId, but your property is named id)
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25973575
type: Answer
answers question: http://stackoverflow.com/q/25973575
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40670209

http://stackoverflow.com/a/25955097
type: Answer
has comment: http://stackoverflow.com/comment/40635603
has comment: http://stackoverflow.com/comment/40641314
has comment: http://stackoverflow.com/comment/40635630
has body: I got this to work, though to be fair even with your base code I could never get the same error you speak of. I'm using the data-replaced attribute to determine whether or not the replace has been called already. I added a third parameter just in case the string will be changed later on. If not,whereever you see prefix, just change it with the string literal you want to use. Test 1 Test 2
has comment: http://stackoverflow.com/comment/40635590
score: 0
has comment: http://stackoverflow.com/comment/40650266
answers question: http://stackoverflow.com/q/25955006

date
tags question: http://stackoverflow.com/q/25980857
tags question: http://stackoverflow.com/q/25888182
tag name: date
tags question: http://stackoverflow.com/q/26014760
tags question: http://stackoverflow.com/q/25892298
tags question: http://stackoverflow.com/q/26008361
tags question: http://stackoverflow.com/q/25991981
tags question: http://stackoverflow.com/q/25921602
tags question: http://stackoverflow.com/q/25983193
tags question: http://stackoverflow.com/q/25910054
tags question: http://stackoverflow.com/q/26028466
tags question: http://stackoverflow.com/q/25938560
tags question: http://stackoverflow.com/q/25968984
tags question: http://stackoverflow.com/q/26008070
tags question: http://stackoverflow.com/q/26030272
tags question: http://stackoverflow.com/q/26007058
tags question: http://stackoverflow.com/q/25892956
tags question: http://stackoverflow.com/q/25956863
tags question: http://stackoverflow.com/q/25956205
tags question: http://stackoverflow.com/q/25951018
tags question: http://stackoverflow.com/q/25942671
type: Tag
tags question: http://stackoverflow.com/q/25882009
tags question: http://stackoverflow.com/q/26018894
tags question: http://stackoverflow.com/q/26007680
tags question: http://stackoverflow.com/q/25900663
tags question: http://stackoverflow.com/q/25908909

http://stackoverflow.com/comment/40721550
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26002061
has text: Which part are you having trouble with? Seems like you should easily be able to narrow down to that `p` by selecting the `test` id, and then getting its only descendant element. Then it's just a matter of updating its text content. Not sure what exactly you're asking about.

http://stackoverflow.com/a/25957983
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25957897
has body: If "mydiv" is the id of your div: document.getElementById("mydiv").innerHTML= "Whatever you want in the div..."; Or with JQuery: $("#mydiv").html("Whatever you want here..."); Or if you don't care about ancient browsers: document.querySelector("#mydiv").innerHTML = "Whatever you want in the div...";
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40643608
comment on: http://stackoverflow.com/q/25959525
score: 0
has text: Simplest is to put a numeric property directly on the element to hold its count. Just make sure the name avoids conflicts, like: `this.__counter__ = this.__counter__ + 1 || 1;`
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40492736
score: 0
comment on: http://stackoverflow.com/q/25875298
type: QuestionComment
type: Comment
has text: "there are no differences between my test program and the project" Did you check that your javascript isn't breaking somewhere else ? Did you check you didn't use the same function name twice ?

http://stackoverflow.com/comment/40692303
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25939273
type: QuestionComment
has text: Why are you surprised at this? It's one computer with one CPU. It can only do so much at one time.

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/25995175
tags question: http://stackoverflow.com/q/25913873
tag name: google-oauth
tags question: http://stackoverflow.com/q/25893137

scope
tags question: http://stackoverflow.com/q/25964751
tags question: http://stackoverflow.com/q/25880697
tags question: http://stackoverflow.com/q/25881665
tags question: http://stackoverflow.com/q/26023996
tags question: http://stackoverflow.com/q/25912000
tags question: http://stackoverflow.com/q/25892990
tags question: http://stackoverflow.com/q/25927991
tags question: http://stackoverflow.com/q/25964327
tags question: http://stackoverflow.com/q/25917425
tags question: http://stackoverflow.com/q/26022727
tag name: scope
tags question: http://stackoverflow.com/q/26015433
tags question: http://stackoverflow.com/q/25988531
tags question: http://stackoverflow.com/q/25902007
tags question: http://stackoverflow.com/q/25894744
type: Tag
tags question: http://stackoverflow.com/q/25916719
tags question: http://stackoverflow.com/q/25964324
tags question: http://stackoverflow.com/q/25944207
tags question: http://stackoverflow.com/q/25928334
tags question: http://stackoverflow.com/q/25962754
tags question: http://stackoverflow.com/q/25943393
tags question: http://stackoverflow.com/q/25983634

http://stackoverflow.com/a/25916579
answers question: http://stackoverflow.com/q/25916043
score: 0
has comment: http://stackoverflow.com/comment/40568659
type: Answer
has body: The answer for your second question might be: JSON.stringify(yourObject) I'm not sure if this part is correct: error: function (msg) { alert("Post was Unsuccessful..." + msg); } Console.log(msg); You might need comma or even move Console.log(msg)...

http://stackoverflow.com/q/25952840
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25952876
tagged with: jquery-ui
tagged with: javascript
has body: The goal of my experiment is to retrieve the DOM element ID by the index of the jQuery UI's Tabs element. The Tabs control layout HTML begins as such: Tab name 1 Tab name 2 Tab name 3 So say, if I want to write a JS function that would return #tab3 for the tab with index 2, what jQuery method do I need to use to get it?
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25952876
has title: How get jQuery UI Tabs DOM element by its index?
tagged with: css

http://stackoverflow.com/q/25959123
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
score: 1
accepted answer: http://stackoverflow.com/a/25965011
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40703986
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25959293
answer count: 2
has answer: http://stackoverflow.com/a/25959293
has title: Bootstrap 3: Cant make two affix side bars
downvote count: 0
has answer: http://stackoverflow.com/a/25965011
has body: I am currently coding a bootstrap website, I am about to finish. but I have one part that I can't accomplish, and its the Side bar, I have made a bootstrap 3 spy + affix side bar for example: http://s.bootply.com/render/RpfBuecywd Imagine that the Side scrollspy menu has another menu after it, that will move when you scroll with you. I am trying to do something like this: I am always failing to do that since everytime I create the 2nd menu the menu itself doesn't scroll and the page gets broken.. if any of you guys can help me do that, I will love you for ever. I am trying to do it for the past 30 minutes and I cant think of a way to do it. Thanks, Aviv.

http://stackoverflow.com/q/26014325
tagged with: google-maps
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26014581
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40774826
type: Question
has comment: http://stackoverflow.com/comment/40782339
has comment: http://stackoverflow.com/comment/40743782
has comment: http://stackoverflow.com/comment/40743477
score: -1
has title: Unable to show location details in google map using Javascript
has body: I am trying to plot few locations in google map. I have two arrays containing latitudes & longitudes of certain places. Then, using that array, I have to plot them into google map & have to add markers for the places. I did that. Now...On clicking a marker, an information window should pop up showing details about that place. I tried doing it. But don't know what, nothing happens. Also you can find the JavaScript code down below. Can anyone tell me what is wrong with this code. var map; var marker1; var marker2; var lat_array = [7.170000076293945, 9.819999694824219, 8.470000267028809]; var lon_array = [79.87000274658203, 78.06999969482422, 76.94999694824219]; var contentString= new Array(); function initialize() { var bounds = new google.maps.LatLngBounds(); var mapOptions = { zoom: 10, center: new google.maps.LatLng(7.170000076293945, 79.87000274658203) }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var count_total = lat_array.length; for (i = 0; i < count_total; i++) { var myLatlng = new google.maps.LatLng(lat_array[i], lon_array[i]); bounds.extend(myLatlng); var image = 'mapmarkers/you-are-here-2.png'; var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'I am here' /*, icon: image */ }); contentString[i] = ' '+ ' '+ ' '+ ' '+lon_array[i]+' '+ ' '+ ' ICAO:'+lat_array[i]+'. '+ ' '+ ' '; infowindow = new google.maps.InfoWindow ( { content: contentString[i] } ); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); map.fitBounds(bounds); } } google.maps.event.addDomListener(window, 'load', initialize); UPDATE: I forgot to initialize content string array. Now it's done. But info window is not showing correct details. On whichever marker I click, info window is shown only for one location. NEW FIDDLE
has comment: http://stackoverflow.com/comment/40743623
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/26014581
has comment: http://stackoverflow.com/comment/40774780
tagged with: google-maps-api-3

http://stackoverflow.com/a/26059376
has body: After some trial and error I was able to use Fuelux to implement a multi step form within my app. Eventually I will look into building a multistep form which records the state of the record maybe using the Wicked Wizard Gem as a means for defining steps. But for now Fuelux's Wizard component works great.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/57398867
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25912474
has comment: http://stackoverflow.com/comment/57386607
answers question: http://stackoverflow.com/q/25912474
downvote count: 0

http://stackoverflow.com/comment/88976355
has text: This solution is better because it returns the weekdays in ISO order +1
comment on: http://stackoverflow.com/a/47872337
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25914361
has body: I have used jssor slider on my website which works fine in all browsers except safari, in safari images are little blur. My image size is bigger than slider Div, image size is (1207 x 708) but div is of 900 x 600 px. please help me how can i fix this issue
has answer: http://stackoverflow.com/a/28631189
tagged with: slider
has answer: http://stackoverflow.com/a/25924285
has comment: http://stackoverflow.com/comment/40563348
favorite count: 0
has comment: http://stackoverflow.com/comment/40563492
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40564009
tagged with: css
has comment: http://stackoverflow.com/comment/40563604
downvote count: 1
tagged with: jssor
has comment: http://stackoverflow.com/comment/40563288
score: 1
has comment: http://stackoverflow.com/comment/40581554
has title: low image quality in safari, jssor slider is used
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40564378
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25974049
has title: Jasmine.js: How to spyOn a dropdown list
tagged with: unit-testing
type: AnsweredQuestion
has body: I have a fromDate text field in my script as: var fromDate = document.getElementById('fromDate').value; I know how to spyOn this textbox in jasmine.js: var params = { 'fromDate': { value: '01/01/2010' }, }; beforeEach() { spyOn(document, 'getElementById').and.callFake(function (arg) { return params[arg]; }); } Similarly I am also extracting value from a dropdown list in script as: var invId = $('#cboInv').find('option:selected').val(); Now how do I spy on this? Please help.
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/26117129
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40670710
tagged with: javascript
tagged with: jasmine
favorite count: 0
linked to: http://stackoverflow.com/q/22060119
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/26117129

http://stackoverflow.com/comment/40633207
comment on: http://stackoverflow.com/q/25953444
score: 0
type: Comment
type: QuestionComment
has text: what's the reason behind that downvote? Isn't that a valid question? :o

http://stackoverflow.com/comment/40500991
has text: my mistake inputting the code, it's actually ('#footer .cbutton') corrected above, problem persists
type: QuestionComment
comment on: http://stackoverflow.com/q/25879413
type: Comment
score: 0

http://stackoverflow.com/comment/40676799
type: QuestionComment
has text: So, if we name them, `H4.Parent`, and `H4.Child`, you want to leave the contents of `H4.Child` in-tact always (and always visible) and replace the text contents of `H4.Parent.A` with the text contents of `H4.Child.A`, correct (in other words, you want to copy the `H4.Child` into the `H4.Parent` without bringing the `H4.Child.A` element, just it's contents)? Also, is this on click, or on page load?
comment on: http://stackoverflow.com/q/25976544
score: 0
type: Comment

http://stackoverflow.com/comment/40614812
comment on: http://stackoverflow.com/q/25942240
has text: Can you post your entire page ?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/25953938
has body: finally i can understand, what's problem in there. so many people give me negative vote without proper answer. thx to them "make me grow". use the canvas x,y coordinate following structure. _draw_grid:function(_radius,_step,_color, _width) { var _group=new APP.RADAR.Group(); for (var _q=0,_qmax=(2*Math.PI),_qstep=(Math.PI/_step); _q&lt;_qmax; _q+=_qstep){ _sx = APP.POSITION.x+Math.sin(_q)*_radius; _sy = APP.POSITION.y+Math.cos(_q)*_radius; var path=new APP.RADAR.Path(); path.strokeColor=_color; path.strokeWidth=_width; path.moveTo(_sx,APP.POSITION.y*2-_sy); path.lineTo(_sx,_sy); _group.addChild(path); } for (var _q=0,_qmax=(2*Math.PI),_qstep=(Math.PI/_step); _q&lt;_qmax; _q+=_qstep){ _sx = APP.POSITION.x+Math.sin(_q)*_radius; _sy = APP.POSITION.y+Math.cos(_q)*_radius; var path=new APP.RADAR.Path(); path.strokeColor=_color; path.strokeWidth=_width; path.moveTo(APP.POSITION.y*2-_sy,_sx); path.lineTo(_sy,_sx); _group.addChild(path); } return _group; },
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25952916
type: Answer
has comment: http://stackoverflow.com/comment/40636265

http://stackoverflow.com/q/25942688
has body: I'm trying out Loopback for an API that will talk to Ember. Ember requires JSON to be contained in 'keys', e.g. for an account: { account: { domain: 'domain.com', subdomain: 'test', title: 'test.domain.com', id: 1 } } I've found some advice on the Google group about how to alter the response so that Ember will receive it, using afterRemote hooks. E.g. in my models/account.js: module.exports = function(Account) { Account.afterRemote('**', function (ctx, account, next) { if(ctx.result) { if(Array.isArray(ctx.result)) { ctx.res.body = { 'accounts': account }; } else { ctx.res.body = { 'account': account }; } } console.log(ctx.res.body); next(); }); }; I see that the response is as it should be in the console .. however the JSON output at localhost:3000/api/accounts does not show the altered JSON object. What is the correct way to alter the JSON response / requests in Loopback? Ideally in a general way so it can be applied to all Models.
has comment: http://stackoverflow.com/comment/40618812
type: Question
has title: Making Loopback API Ember.js compatible
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/32467642
has comment: http://stackoverflow.com/comment/45258898
tagged with: loopbackjs
tagged with: ember.js
answer count: 1
has comment: http://stackoverflow.com/comment/40705403
has comment: http://stackoverflow.com/comment/40724259
favorite count: 0
type: UnansweredQuestion
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/40651697
has comment: http://stackoverflow.com/comment/40705452
has comment: http://stackoverflow.com/comment/40705514
linked to: http://stackoverflow.com/q/29863278
tagged with: node.js
has comment: http://stackoverflow.com/comment/40710399

http://stackoverflow.com/comment/40528899
type: QuestionComment
comment on: http://stackoverflow.com/q/25895014
type: Comment
has text: mostly the last part, you write you have a webpage that returns the data, then you don't
score: 0

http://stackoverflow.com/q/25895127
has comment: http://stackoverflow.com/comment/40530079
favorite count: 0
has comment: http://stackoverflow.com/comment/40529389
accepted answer: http://stackoverflow.com/a/25896080
upvote count: 7
type: AnsweredQuestion
has body: In FF and Chrome i can set the this value to the location object using bind, with the following code locationFacade ={ reload: location.reload.bind(location) } locationFacade.reload(); Or I can use apply locationFacade ={ reload: function(){ location.reload.apply(location,arguments); } } locationFacade.reload(); However in IE 9 I keep getting "Invalid calling object" when calling locationFacade.reload(); I havent tested every IE but issue happens in IE 11 also. Apply and bind are both supported in IE here and here
tagged with: internet-explorer
score: 7
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has title: Invalid calling object IE
has answer: http://stackoverflow.com/a/25896080

http://stackoverflow.com/a/25993383
has comment: http://stackoverflow.com/comment/73029571
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25992214
answers question: http://stackoverflow.com/q/25992214
downvote count: 0
has body: I'm not totally sure what was the cause of the issue but I managed to find a solution. I imported the SVG to: https://svg-edit.github.io/svgedit/releases/svg-edit-2.8.1/svg-editor.html I reoriented the paths and then exported. The following SVG was produced: <metadata/> <g> Layer 1 <path id="svg_1" d="m932.44098,173.05901l85.34198,0l0,62.58l-85.34198,0l0,-62.58z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_2" d="m743.1745,381.74323l62.07562,-62.07562l62.65472,62.65472l-62.07562,62.07562l-62.65472,-62.65472z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_3" d="m744.50299,548.14899l40.80103,0l0,43.13898l-40.80103,0l0,-43.13898z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_4" d="m1025.172,322.57101l53.71997,0l0,147.46899l-53.71997,0l0,-147.46899z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_5" d="m642.21399,721.36902l93.91699,0l0,94.133l-93.91699,0l0,-94.133z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_6" d="m653.42999,530.74902l62.58002,0l0,84.03503l-62.58002,0l0,-84.03503z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_7" d="m523.24103,211.666l52.12201,0l0,47.644l-52.12201,0l0,-47.644z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_8" d="m867.25897,547.14899l201.95197,0l0,28.19897l-201.95197,0l0,-28.19897z" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="null" fill="#94D4EA"/> <path id="svg_9" d="m653.42999,432.87201l62.58002,0l0,84.03503l-62.58002,0l0,-84.03503z" stroke-linecap="null" stroke-linejoin="null" stroke-…
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40773489
comment on: http://stackoverflow.com/a/26021740
has text: @HamHamJ why value: key is not supported?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40508115
score: 0
type: QuestionComment
has text: Decided to take your advice and write my own function for this particular countdown. Thanks @RobG
type: Comment
comment on: http://stackoverflow.com/q/25883529

http://stackoverflow.com/q/25939209
has comment: http://stackoverflow.com/comment/40608964
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25939556
downvote count: 1
has body: var i; for (i=2; i&lt;=32; i++){ var j=i-1; document.writeln("&lt;td align=\"center\"&gt;&lt;input type=\"text\" onblur=\"add3('p4rm2r'+i,'p3rm2r'+j,this)\" size=\"1\" maxlength=\"4\"&gt;&lt;/td&gt;&lt;td align=\"center\"&gt;&lt;input type=\"text\" onblur=\"subs1('p3rm2r'+i,'p4rm2r'+i,this)\" size=\"1\" maxlength=\"4\"&gt;&lt;/td&gt;&lt;td align=\"center\"&gt; &lt;input type=\"text\" id=\" 'p3rm2r' +i\" readonly size=\"1\" maxlength=\"4\" &gt;&lt;/td&gt;&lt;td align=\"center\"&gt;&lt;input type=\"text\" id=\" 'p4rm2r' +i\" readonly size=\"1\" maxlength=\"4\"&gt;&lt;/td&gt;&lt;/tr&gt;" ); } I guess there are some mistake in the syntax, specially in the caoncatenation. My intention is to concatenate the function argument and input id. e.g I want to use p4rm2r2, p4rm2r3, p4rm2r4, ..p4rm2r32 as function arguments and as input id. Please suggest me the correct syntax.
has answer: http://stackoverflow.com/a/25939342
tagged with: javascript
score: -1
type: Question
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40609590
has title: How to concatenate the function argument and input id.

http://stackoverflow.com/comment/40570004
score: 0
comment on: http://stackoverflow.com/q/25917030
type: QuestionComment
has text: i have used but don't know why its not working..
type: Comment

http://stackoverflow.com/comment/40532788
comment on: http://stackoverflow.com/a/25897164
score: 0
type: Comment
has text: Well I don't use the SQL method you do, so not sure on that. But you would create your own c# object, then JSON.Net will serialize it for you, then you can return it and it will be formatted all properly.
type: AnswerComment

http://stackoverflow.com/a/26030842
has comment: http://stackoverflow.com/comment/40774098
answers question: http://stackoverflow.com/q/26030759
has body: You may want to try this. var arr = [{"name":"aName","lastName":"aLastname"},{"name":"bName","lastName":"bLastname"}]; arr.forEach(function(d){ console.log(d.name, d.lastName); });
type: Answer
score: 3
upvote count: 3
downvote count: 0

http://stackoverflow.com/q/25967366
type: Question
tagged with: charts
has answer: http://stackoverflow.com/a/26202314
accepted answer: http://stackoverflow.com/a/26202314
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40669835
has body: So, I've been updating a functioning but not elegant D3 chart using https://github.com/NickQiZhu/d3-cookbook/blob/master/src/chapter9/pie-chart.html My class looks like this: function doughnutChart(selector_div) { "use strict"; var _chart = {}; var _width = 200, _height = 200, _data = [], _svg, _bodyG, _pieG, _radius = 100, _inner_radius = 50; _chart.render = function() { if (!_svg) { _svg = d3.select(selector_div).append("svg") .attr("height", _height) .attr("width", _width); } renderBody(_svg); }; function renderBody(svg) { if (!_bodyG) { _bodyG = svg.append("g") .attr("class", "body"); } renderDoughnut(); } function renderDoughnut() { var pie = d3.layout.pie() .sort(function (d) { return d.id; }) .value(function (d) { return d.count + d.abnormal; }); var arc = d3.svg.arc() .outerRadius(_radius) .innerRadius(_inner_radius); if (!_pieG) { _pieG = _bodyG.append("g") .attr("class", "pie") .attr("transform", "translate(" + _radius + "," + _radius + ")"); } renderSlices(pie, arc); renderLabels(pie, arc); } } function renderSlices(pie, arc) { var slices = _pieG.selectAll("path.arc") .data(pie(_data)); slices.enter() .append("path") .attr("class", "arc") .attr("fill", function(d) { return d.data.visualisation_colour; }); slices.transition() .attrTween("d", function(d) { var currentArc = this.__current__; if (!currentArc) { currentArc = {startAngle: 0, endAngle: 0}; } var interpolate = d3.interpolate(currentArc, d); this.__current__ = interpolate(1); return function(t) { return arc(interpolate(t)); }; }); } function renderLabels() { _pieG.append("text") .attr("dy", ".35em") .style("text-anchor", "middle") .attr("class", "inside") .text(function(d) { var total = 0; for (var j = 0; j &lt; _data.length; j++) { total = total + _data[j].count + _data[j].abnormal; } return total; }); } _chart.data = function(d) { if (!arguments.length) { return _data; } _data = d; return _chart; }; return _chart; } When I use: var chart = doughnutChart("#chart").data(data); chart.render() I get…
has comment: http://stackoverflow.com/comment/40695475
answer count: 1
tagged with: d3.js
type: AnsweredQuestion
has title: D3 enter-exit-update and pie charts

http://stackoverflow.com/comment/40664428
type: QuestionComment
has text: *Every movie title is an anchor with same id='movie'.* Wrong choice, `id` attributes must be unique within an HTML document. Use a class instead.
score: 10
comment on: http://stackoverflow.com/q/25970821
type: Comment

http://stackoverflow.com/q/25926556
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/25926594
tagged with: checkbox
has title: If checkbox is checked and user clicks on the button do this
has comment: http://stackoverflow.com/comment/40586148
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25926576
has answer: http://stackoverflow.com/a/25926633
has answer: http://stackoverflow.com/a/25926576
has answer: http://stackoverflow.com/a/25926656
type: Question
accepted answer: http://stackoverflow.com/a/25926594
has body: I have a checkbox with a button, i want when user check the check box and click on the button show an alert and when checkbox is unchecked and user clicks on the button do something else. I did something but i need help to accomplish it. Any help greatly appreciated $(document).ready(function(e) { $('#remember').click(function() { if (this.checked) { alert("This is checked and you cliked"); } else { alert("This is unchecked and you cliked"); } }); }); JSFIDDLE
tagged with: javascript

http://stackoverflow.com/q/26005508
downvote count: 2
has comment: http://stackoverflow.com/comment/40728234
type: Question
has answer: http://stackoverflow.com/a/26005599
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40728180
answer count: 1
favorite count: 0
has body: I am keeping track of a timer that I want to trigger at 5 second intervals. The problem is that with my test of if (Math.round(time.position) % 5 === 0){do stuff} it triggers too many times. It will trigger for all of the 9.~ decimal values. How can I have it trigger at 5 second intervals? time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.29} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.43} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.54} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.68} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.79} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 9.92} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.03} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.18} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.29} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.42} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.54} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.68} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.79} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 10.92} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 11.04} index.html:104 time: Object {duration: 149.49, type: "jwplayerMediaTime", position: 11.17}
has comment: http://stackoverflow.com/comment/40728199
has title: Javascript math.round threshold
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40728187
upvote count: 2

http://stackoverflow.com/comment/40730302
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26005887
has text: The number of lines/vertices is not the real measure of complexity. Can there be any concave sides? Is the center of the polygon inside the polygon? If so (and there are no concave edges) you should be able to do something similar to what you are doing for the rectangle.

http://stackoverflow.com/comment/40688987
comment on: http://stackoverflow.com/q/25962123
score: 0
has text: It's not an answer, but since it's thrown an unexpected spanner in the works for my Cordova-powered app, I'm migrating my spinner GIF to a sprite, animated by JavaScript.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40670916
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25974422
has text: You want to output the info to the page? Than console.log is not what you want. Learn about innerHTML or appendChild.
score: 0

http://stackoverflow.com/a/25896186
type: Answer
answers question: http://stackoverflow.com/q/25895916
has comment: http://stackoverflow.com/comment/40534868
has comment: http://stackoverflow.com/comment/40534732
has comment: http://stackoverflow.com/comment/40532188
score: 0
has body: the problem is that you're removing the active class before the code inside the $.ajax even executes. There are several ways to pass in the (this) object to your $.ajax success function. here is one. (function () { $(document).on("click","#submitbutton", function (event) { $(this).addClass('active'); var formdata = $("#filterdata").serializeArray(); var url1 = "/SelectUnit"; $.ajax({ context: this, url: 'whatever.php' }).done(function(){ $(this).removeClass('active'); }); }); })();

http://stackoverflow.com/q/26000770
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/41027457
accepted answer: http://stackoverflow.com/a/26000915
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40719280
has title: Edit text after clicked
answer count: 1
has answer: http://stackoverflow.com/a/26000915
has comment: http://stackoverflow.com/comment/40719573
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40719455
has comment: http://stackoverflow.com/comment/40719277
tagged with: php
has body: I do not know how to do, so after onclick event change my code &lt;div id='1' onclick='edit()'&gt; Tekst &lt;/div&gt; on &lt;div id='1'&gt; &lt;form action='#' method=post&gt; &lt;input type='text' name='1' value='Tekst'&gt; &lt;/form&gt; &lt;/div&gt; Of course div's id and input's name must be the same. I tried using append() but nothing happened, no errors and no results. function edit(clicked_id) { var input = document.createElement("input"); input.type = "text"; input.size = "15"; input.name = "text" + clicked_id; container.appendChild(input); }
tagged with: append
type: AnsweredQuestion
upvote count: 0
tagged with: onclick

http://stackoverflow.com/q/26003867
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40725262
has comment: http://stackoverflow.com/comment/40725010
has answer: http://stackoverflow.com/a/26003914
has body: I Would like to tell if an object has been successfully created when loaded in via ajax call to an external javascript at run time. This is required because the loaded script can sometimes process data for 20 seconds prior to creating a global scoped variable (that is can have various names), and i need to wait until that script has finished prior to using the object. i would like a function i could call that would behave like this function is_object_loaded( objectname ) { if (typeof objectname !== "undefined" ) { // do something } } is_object_loaded("demographic_pail"); obviously i need to turn objectname into something other than a string; and i refuse to eval unless its totally unavoidable. Thanks!
has comment: http://stackoverflow.com/comment/40724965
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26003914
has answer: http://stackoverflow.com/a/26003911
type: Question
accepted answer: http://stackoverflow.com/a/26003911
tagged with: javascript
has title: how to tell dynamically if object exists, from a string variable

http://stackoverflow.com/comment/40735903
type: Comment
type: QuestionComment
has text: I am searching lots of related to issue on stack overflow but not find single question related to that issue. So i post this question.
comment on: http://stackoverflow.com/q/25997318
score: 0

http://stackoverflow.com/comment/40738301
comment on: http://stackoverflow.com/a/26011266
has text: @MilindAnantwar It worked. ThankYou..:) But any other method than a callback?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/43360681
comment on: http://stackoverflow.com/a/27332117
has text: Okay, will revise my answer tomorrow. Too much stuff on my plate today :)
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/28987089
score: 5
has comment: http://stackoverflow.com/comment/46226055
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/25903625
downvote count: 1
has body: You should calclulate size of your localStorage, window.localStorage is full as a solution is to try to add something var localStorageSpace = function(){ var allStrings = ''; for(var key in window.localStorage){ if(window.localStorage.hasOwnProperty(key)){ allStrings += window.localStorage[key]; } } return allStrings ? 3 + ((allStrings.length*16)/(8*1024)) + ' KB' : 'Empty (0 KB)'; }; var storageIsFull = function () { var size = localStorageSpace(); // old size // try to add data var er; try { window.localStorage.setItem("test-size", "1"); } catch(er) {} // check if data added var isFull = (size === localStorageSpace()); window.localStorage.removeItem("test-size"); return isFull; }

http://stackoverflow.com/q/25958483
has comment: http://stackoverflow.com/comment/40641753
tagged with: javascript
has title: Nodejs exports.module How to export Variable to other Script
tagged with: node.js
tagged with: google-drive-api
tagged with: google-api
has comment: http://stackoverflow.com/comment/40641693
has answer: http://stackoverflow.com/a/25958982
has body: my goal is to get a list of files from a google drive folder and its subfolders as json string. so i can then use express to expose it as an API endpoint that other applications can connect to it. the code is working. i get everything i want, but i do not know how to export my data variable to app.js // get-filelist.js var GoogleTokenProvider = require("refresh-token").GoogleTokenProvider, request = require('request'), async = require('async'), data const CLIENT_ID = "514...p24.apps.googleusercontent.com"; const CLIENT_SECRET = "VQs...VgF"; const REFRESH_TOKEN = "1/Fr...MdQ"; // get it from: https://developers.google.com/oauthplayground/ const FOLDER_ID = '0Bw...RXM'; async.waterfall([ //----------------------------- // Obtain a new access token //----------------------------- function(callback) { var tokenProvider = new GoogleTokenProvider({ 'refresh_token': REFRESH_TOKEN, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET }); tokenProvider.getToken(callback); }, //----------------------------- // connect to google drive, look for the folder (FOLDER_ID) and list its content inclusive files inside subfolders. // return a list of those files with its Title, Description, and view Url. //----------------------------- function(accessToken, callback) { // access token is here console.log(accessToken); // function for token to connect to google api var googleapis = require('./lib/googleapis.js'); var auth = new googleapis.OAuth2Client(); auth.setCredentials({ access_token: accessToken }); googleapis.discover('drive', 'v2').execute(function(err, client) { getFiles() function getFiles(callback) { retrieveAllFilesInFolder(FOLDER_ID, 'root' ,getFilesInfo); } function retrieveAllFilesInFolder(folderId, folderName, callback) { var retrievePageOfChildren = function (request, result) { request.execute(function (err, resp) { result = result.concat(resp.items); var nextPageToken = resp.nextPageToken; if (nextPageToken) { request = client.drive.children.list({ 'folderId': folder…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25958982
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/40708287
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25992759
has text: @papmooo It did not work because there is an error in your send_data() function. In `window.location = '/aaa/'+value_2;` `value_2` is not defined. Replace it with something else like this `window.location = '/aaa/'+'value_2';` then it will work.
type: AnswerComment

http://stackoverflow.com/q/25977925
has comment: http://stackoverflow.com/comment/40677726
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25978142
has title: Height on page coming from an unknown source
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40679051
tagged with: css
has answer: http://stackoverflow.com/a/25978142
has body: I usually build my wordpress sites by using a theme and creating a child theme. Generally I have done this with Wordpress 2013, but this time decided to take a crack at it with 2014. I have run into a few issues but finally landed on one I have not been able to resolve. http://demo.diocesan.com/robert/ On this page, it tells me the page has a height of 2000+ px. When I try to find where this height is computed, I find nothing. I have set the height on many different elements to 1000px (even the HTML tag itself) and I still have this mysterious height value. I suspect this has something to do with the 2014 masonry script (Admittedly I am not great with javascript) and any direction on this would be helpful. So my question - Does anyone upon glancing at this know where the height is coming from and what steps I can take to remove it?
has comment: http://stackoverflow.com/comment/40677566
tagged with: wordpress
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/40588416
score: 0
has text: can I use setTimeout() with it??If yes, how?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25909135

http://stackoverflow.com/a/25938035
type: AcceptedAnswer
downvote count: 0
has body: If you have access to your cy object, you can use cy.$() with any of the available selectors. The ready event is to know when your graph has loaded and finished the initial layout.
answers question: http://stackoverflow.com/q/25915001
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25915001

http://stackoverflow.com/comment/40676484
comment on: http://stackoverflow.com/a/25975398
score: 0
type: AnswerComment
type: Comment
has text: That's just because your `extend` function doesn't allow overriding properties at all. What I mean is that when you do `something.extend(base2.extend(multiChild))` then `base::findFirst` won't be inherited via `base2`.

http://stackoverflow.com/a/26011348
accepted answer of: http://stackoverflow.com/q/26010692
score: 3
answers question: http://stackoverflow.com/q/26010692
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
has body: You should define messages inside filterable. Something as follows: { field: "ShipAddress", filterable: { messages: { info: 'Show items custom message:' } } }

http://stackoverflow.com/comment/40762712
has text: I think I'll just go with a "There is an iOS 8 bug. Please use a different device or upgrade your phone" error message. Thanks.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26002252
score: 0

http://stackoverflow.com/q/25950016
tagged with: cucumberjs
tagged with: jsduck
tagged with: jsdoc
type: AnsweredQuestion
has body: Is there any way to document steps in cucumber.js step definition code? I've tried to do emulate it with jsduck @class: /** * @class Global.steps.common * Common steps. */ var steps = module.exports = function() { /** * Step 1 description. */ this.Given(/^StepDef1$/, function(next) { ... }); /** * Step 2 description. */ this.Given(/^StepDef2$/, function(next) { ... }); }); But jsduck recognizes only the last one step description.
score: 1
upvote count: 1
has title: How to document (jsduck/jsdoc) cucumber.js step definitions?
type: Question
has answer: http://stackoverflow.com/a/25956661
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25956661
downvote count: 0
answer count: 1
tagged with: documentation
favorite count: 0

http://stackoverflow.com/comment/40627916
type: Comment
comment on: http://stackoverflow.com/a/25942232
has text: Man - so sorry - cut and paste messed up - so I have only one issue, I neeed to push the images together on the horizontal line with a 2 pixel gap while they are side by side
score: 0
type: AnswerComment

http://stackoverflow.com/a/26038951
type: Answer
has comment: http://stackoverflow.com/comment/40820706
has body: Obviously the code below depends on what the name of your survey and survey_link inputs look like in actual HTML. So if in this example it is for @user: &lt;% simple_form_for @user do |f| %&gt; &lt;%= f.input :survey, :as =&gt; :boolean, :label =&gt; false, inline_label: 'Do you need survey responses?' %&gt; &lt;%= f.input :survey_link, label: 'Where is your survey?', :label_html =&gt; { :class =&gt; 'question-data' }, placeholder: 'Include a link to your survey', :input_html =&gt; {:style=&gt; 'width: 650px; margin-top: 20px', class: 'response-project'} %&gt; &lt;% end %&gt; Then the JQuery should look like (note the user part - you may have to change this): &lt;script&gt; $(function() { // Hide the survey_link input $('input[name="user[survey_link]"]').hide(); $('input[name="user[survey_link]"]').closest("label").hide(); // When the survey checkbox changes $('input[name="user[survey]"]').change(function() { $('input[name="user[survey_link]"]').closest("label").toggle(this.checked); $('input[name="user[survey_link]"]').toggle(this.checked); }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40809930
has comment: http://stackoverflow.com/comment/40809831
has comment: http://stackoverflow.com/comment/40818794
accepted answer of: http://stackoverflow.com/q/26028123
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26028123
has comment: http://stackoverflow.com/comment/40844597
has comment: http://stackoverflow.com/comment/40844556
score: 0

key
tags question: http://stackoverflow.com/q/25948027
tags question: http://stackoverflow.com/q/25959090
tags question: http://stackoverflow.com/q/25947040
type: Tag
tag name: key
tags question: http://stackoverflow.com/q/25887864

http://stackoverflow.com/q/25958611
has answer: http://stackoverflow.com/a/32024108
type: Question
type: AnsweredQuestion
has body: I want to use boomrang framework in Jquery to get the bandwidth of the user's network which has to be displayed on the screen as "connection : fair/poor/good". With on ready,on load, etc.., javascript function will be called only after the elements are ready to be accessed. But, I want the boomrang call to be called quite before that. Please tell me which event I have to use so that function call can happen before the elements of the page loads. Thanks in advance.&lt;> Note: I have tried by putting script tag at the top of the head tag. But still page elements are getting evaluated first (along with their el expressions).
tagged with: javascript
has title: Which event I have to use in jquery to get called before my page elements load?
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25958718
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25958718
favorite count: 0
possible better answer: http://stackoverflow.com/a/32024108

http://stackoverflow.com/q/25957256
has comment: http://stackoverflow.com/comment/40644538
accepted answer: http://stackoverflow.com/a/25957423
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0
has comment: http://stackoverflow.com/comment/40639807
answer count: 1
has comment: http://stackoverflow.com/comment/40640708
has answer: http://stackoverflow.com/a/25957423
has title: Jquery transfer name attribute to child
has body: I'm trying to transfer the name attribute of an element 2 generations up. The reason is, I'm using a jquery plugin that gives elements a dropdown with images. It uses jquery that converts something like this: Apple Banana Orange To: // If I had picked Apple //I have images disabled for simplicity Apple It's red // I was able to get the name here with jquery Apple It's red // another li for each other ... ... The plugin works great and the images display fine. The problem is that I can't submit my form through PHP due to the fact that the name attribute isn't carried to the hidden element. How do I get the name from the element in the first piece of code to the tag in the second piece of code. Would I do something like $this.parentUntil("#fruitselect").attr("name") where the plugin converts the tag? Another thing to consider, would it make sense to get the name from 2 parents up OR, perhaps, get the name from I'm new to jquery, thanks a ton!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40640917
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40641590

http://stackoverflow.com/q/26021493
favorite count: 0
possible better answer: http://stackoverflow.com/a/49491920
has answer: http://stackoverflow.com/a/49491920
has comment: http://stackoverflow.com/comment/40756887
linked to: http://stackoverflow.com/q/7046012
has comment: http://stackoverflow.com/comment/40756959
has answer: http://stackoverflow.com/a/26021571
type: AnsweredQuestion
score: 1
has body: I'm trying to set focus on an input after the modal shows. The solutions and links I've seen and tried so far: How to focus on a form input text field on page load using jQuery?, Jquery Focus on input field, and none of them works. My code is actually pretty simple: $input = $("#letter-change-text").find("input[type='text']"); $input.val($.trim("I am just testing!!")); $("#letter-change-text").modal('show'); $input.focus(); // this should focus the textbox in order to allow immediately input by the user You can check this issue in JSfiddle. I also have tried without any success: setTimeout(function(){ $input.focus(); }, 0);
upvote count: 1
type: Question
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/26021571
tagged with: javascript
has comment: http://stackoverflow.com/comment/40756889
answer count: 2
linked to: http://stackoverflow.com/q/1591910
downvote count: 0
has title: How to set focus on input in modal?
tagged with: jquery

http://stackoverflow.com/q/25977134
tagged with: android-fullscreen
type: Question
tagged with: fullscreen
has answer: http://stackoverflow.com/a/25977247
tagged with: mobile
tagged with: javascript
has title: Scroll function doesn´t work in mobile browser fullscreen mode?
score: 2
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: I have requesting fullscreen mode through javascript fullscreen API with this library Screenfull.js. This is working pretty good in my webapp on mobile devices with mobile chrome. But why is not working scroll function at all? Is this just truly bug of browser? If yes have you tried somebody figure it somehow ? I have tried make function separately with iscroll but on mobile devices is really slow and not smooth at all. Thanks for any advice

http://stackoverflow.com/q/26025396
answer count: 1
has answer: http://stackoverflow.com/a/33492327
downvote count: 0
favorite count: 0
has title: Grunt Run in a For Loop
has comment: http://stackoverflow.com/comment/40792968
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40770773
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/33492327
tagged with: javascript
tagged with: gruntjs
has body: I'm new to grunt. I have a gruntfile that works for a single build. There are several target that are chained together to complete the process. The problem is that I need to create several different builds using variable data. I'm trying to figure out how to do this in my gruntfile. Today, to do a build, I just need to run grunt --foo=bar build or grunt --foo=baz build What I'd like to, and have tried to do, is create a build-all target that uses an array to define the foo data, like so: grunt.registerTask('build-all', function() { var foos = ["bar", "baz"]; for (var i in foos) { grunt.config.set("foo", foos[i]); grunt.task.run("build"); } }); From the looks of things, it seems that the run task is non-blocking. And that means that "foo" is being set to "baz" before the first run, running it twice for the same value. Is there a better way to set arguments/options in this situation? Or to run the task in a blocking way?

http://stackoverflow.com/q/25957617
has comment: http://stackoverflow.com/comment/40646514
has comment: http://stackoverflow.com/comment/40763827
tagged with: javascript
has answer: http://stackoverflow.com/a/25964137
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40647725
has title: Audio Enter Phaser?
has body: I'm designing a game where the player will be given 4 sounds and they have to guess what the sounds have in common. It works exactly as "4 pictures 1 word" game but instead of pictures, the player has to guess the sounds. The user has to press key 1,2,3 and 4 to hear the sounds. Once the player has heard the sounds, the player has to guess what the sounds have in common. How do I code the part where after the player has heard the 4 sound, they would enter the word to guess it? As an example in level 1, player will be given the sound of cat,dog,parrot and hamster, and have to guess the common between the four sounds. The player after hearing the sounds will be notified that the word consist of 3 letters and they have to guess what is it. If let say the player inserts the letter "E" the "E" will be inserted in the missing word and the player needs to guess the remaining words. The correct word for this will be "PET". How do I code this in Phaser? (Btw The game has no graphics or animations because it is for blind users). I get error message "Uncaught SyntaxError: Unexpected token { " at the line "if (game.input.keyboard.isDown(Phaser.Keyboard.P) { " The input I'm still trying to play after hearing the four sounds are not working. I have no idea where I have gone wrong. My code: var game = new Phaser.Game(400,490, Phaser.AUTO, 'gameDiv'); var key1; var key2; var key3; var key4; var speech; var level1; var PCorrect; var ECorrect; var TCorrect; var TryAgain; var mainState = { preload: function() { game.stage.backgroundColor ='#71c5cf' game.load.audio('the_intro', 'assets/speech_intro.wav'); game.load.audio('start', 'assets/cat_meow.wav'); game.load.audio('second', 'assets/dog_bark.wav'); game.load.audio('third', 'assets/mouse_squeak.wav'); game.load.audio('fourth', 'assets/parrot.wav'); game.load.audio('default' , 'assets/wrong_key.wav'); game.load.audio('levelPet' , 'assets/GuessPet.wav'); game.load.audio('P', 'assets/PforPet.wav'); game.load.audio('T', 'assets/TforPet.…
tagged with: audio
type: UnansweredQuestion
type: Question
tagged with: phaser-framework

http://stackoverflow.com/a/25946567
upvote count: 1
type: AcceptedAnswer
has body: What you're looking for is called auto-complete. Many JavaScript Libraries like jQuery come with a built in autocomplete feature. http://jqueryui.com/autocomplete/ Here's a demo fiddle. Code: Just replace the availableTags list with the list of elements that you want in the dropdown menu. HTML Tags: jQuery: $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); });
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25946548
answers question: http://stackoverflow.com/q/25946548

java
tags question: http://stackoverflow.com/q/25992431
tags question: http://stackoverflow.com/q/25998296
tags question: http://stackoverflow.com/q/25931856
tags question: http://stackoverflow.com/q/25911025
tags question: http://stackoverflow.com/q/26007030
tags question: http://stackoverflow.com/q/25938560
tags question: http://stackoverflow.com/q/25973575
tags question: http://stackoverflow.com/q/25911661
tags question: http://stackoverflow.com/q/25983802
tags question: http://stackoverflow.com/q/25883481
tags question: http://stackoverflow.com/q/25966492
tags question: http://stackoverflow.com/q/25893904
tags question: http://stackoverflow.com/q/26031592
tags question: http://stackoverflow.com/q/25993057
tags question: http://stackoverflow.com/q/25999718
tags question: http://stackoverflow.com/q/25959906
tags question: http://stackoverflow.com/q/25925002
tags question: http://stackoverflow.com/q/25913944
tags question: http://stackoverflow.com/q/26022818
tags question: http://stackoverflow.com/q/25873621
tags question: http://stackoverflow.com/q/25931650
tags question: http://stackoverflow.com/q/25891618
tags question: http://stackoverflow.com/q/26013412
tags question: http://stackoverflow.com/q/25972758
tags question: http://stackoverflow.com/q/25945535
tag name: java
tags question: http://stackoverflow.com/q/25993837
tags question: http://stackoverflow.com/q/25983786
tags question: http://stackoverflow.com/q/25890271
tags question: http://stackoverflow.com/q/25973918
tags question: http://stackoverflow.com/q/26012224
tags question: http://stackoverflow.com/q/25874590
tags question: http://stackoverflow.com/q/26032602
tags question: http://stackoverflow.com/q/25877121
tags question: http://stackoverflow.com/q/25876095
tags question: http://stackoverflow.com/q/25940525
tags question: http://stackoverflow.com/q/26016918
tags question: http://stackoverflow.com/q/25892822
type: Tag
tags question: http://stackoverflow.com/q/25989280
tags question: http://stackoverflow.com/q/25979948
tags question: http://stackoverflow.com/q/25931108
tags question: http://stackoverflow.com/q/25987888
tags question: http://stackoverflow.com/q/26013745
tags question: http://stackoverflow.com/q/25935995
tags question: http://stackoverflow.com/q/26016202

http://stackoverflow.com/comment/40557832
score: 1
has text: Why are you sending the data as a string? You can send it as an object, jQuery will handle everything.
comment on: http://stackoverflow.com/q/25911406
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/41179348
type: Comment
has text: As bamnet mentioned in the comments this was a bug which is fixed now. For more details see code.google.com/p/gmaps-api-issues/issues/detail?id=7165
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/26249272

http://stackoverflow.com/q/26013793
score: 0
accepted answer: http://stackoverflow.com/a/26015464
tagged with: http://stackoverflow.com/tag/html
has body: I've two div covering whole page 50% each and on lower div click i want it to cover full screen and come back on click again example JQuery equivalent $('.wrapper div.green').click(function() { $(this).toggleClass('go') if($(this).hasClass('go')){ $(this).animate({'height':'100%'},{ duration:200, step:function(gox){ var height = gox &lt; 100 ? (100 - gox) / 1 : 0; $(this).siblings().css('height', height + "%"); } }) }else{ $('.wrapper div').animate({'height':'50.00%'},200) } }); Now I want this in AngularJS and being new to it I've problems, so looking for some guidance to move in right direction. So far what I've tried AngularJs Attempt All i want is a similar functionality as of JQuery.
has comment: http://stackoverflow.com/comment/40744218
answer count: 1
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40742742
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40743146
has comment: http://stackoverflow.com/comment/40743089
type: Question
has answer: http://stackoverflow.com/a/26015464
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40743057
has title: AngularJs re-size/adjust two div's accordingly

http://stackoverflow.com/comment/40541688
comment on: http://stackoverflow.com/q/25902222
has text: As a side note, why bluetooth over network? Network programming is as easy as binding to a port and communicating over it, or at least it's somewhat like that. You're not even communicating over WAN from what I see, so port forwarding is a non-problem. LAN Network programming is extremely easy if you just want to send small chunks of data.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25999841
answers question: http://stackoverflow.com/q/25999747
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/40750191
has body: This happens because jQuery append() method not supporting only closing tags and trying to close tags if they wasn't closed in provided param. To solve this you need to assign your append() result to some variable, for example: var myTable = $(" ").appendTo("#board"); and then append your rows to this var: var myRow = $(" ").appendTo( myTable ); Same with columns: myRow.append(" " + num + " "); By using appendTo method you will be able to get newly created elements. So your final code should look like: var boardSize = 5; $(function() { //on load printBoard(boardSize); }); function printBoard(i_BoardSize) { var maxRow = parseInt(i_BoardSize); var maxCol = parseInt(i_BoardSize); var num = 1; var myTable = $(" ").appendTo("#board"); for (var row = maxRow - 1; row >= 0; row--) { var myRow = $(" ").appendTo(myTable); for (var col = 0; col < maxCol; col++) { myRow.append(" " + num + " "); num++; } } }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25999747
type: Answer

http://stackoverflow.com/comment/40708582
score: 0
type: Comment
has text: I am not going to make any change to the page itself. I am just trying to add the listener in debugger console for the element
comment on: http://stackoverflow.com/a/25995263
type: AnswerComment

http://stackoverflow.com/comment/40753952
score: 1
comment on: http://stackoverflow.com/q/26019774
type: Comment
type: QuestionComment
has text: Can you show the value of `entries`? Most likely that's causing your issue, all `$apply` does in this case is tell the template it has to show the new value ( `entries` )

http://stackoverflow.com/q/25960175
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40645144
possible better answer: http://stackoverflow.com/a/25962190
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25962190
has comment: http://stackoverflow.com/comment/40644955
has comment: http://stackoverflow.com/comment/40644976
has comment: http://stackoverflow.com/comment/40645553
accepted answer: http://stackoverflow.com/a/25960730
upvote count: 0
tagged with: scroll
has answer: http://stackoverflow.com/a/25960730
type: AnsweredQuestion
has title: Check for unseen posts and update title
linked to: http://stackoverflow.com/q/487073
score: -1
has body: I need to check wether the user has seen the post and change the document title based on how many posts he hasn't seen. For example title with 2 unseen posts: "(2) - Post#123", or with no unseen posts: "Post #123". I've looked into a couple of "scrolled into view" jQuery plugins, but I haven't found a good and quick solution to do this with ajaxed content (the posts are appended to a div, it checks for new every 5 seconds). So for example this as markdown: &lt;div id="posts"&gt; &lt;div class="reply" data-postid="1" data-seen="no"&gt; Post 1 &lt;/div&gt; &lt;div class="reply" data-postid="2" data-seen="no"&gt; Post 2 &lt;/div&gt; &lt;div class="reply" data-postid="3" data-seen="no"&gt; Post 3 &lt;/div&gt; &lt;/div&gt; I'm guessing using an attribute for "seen" will be useful. Now how do I check if a user has seen (the posts have been scrolled by/on the screen) and store the unseen in a string to use in the title? Useful info: The divs appended are gotten via xhr, they are echoed out as the body of another file "imported" or appended to #posts with xhr. The name of the function that is repeated every 5 seconds to get new posts is PostData(). EDIT: I'm trying this, but it's not working: function isScrolledIntoView(elem){ var docViewTop = $(window).scrollTop(); var docViewBottom = docViewTop + $(window).height(); var elemTop = $(elem).offset().top; var elemBottom = elemTop + $(elem).height(); return ((elemBottom &lt;= docViewBottom) &amp;&amp; (elemTop &gt;= docViewTop)); } $(window).scroll(function(){ isScrolledIntoView(".reply[data-seen='no']", function(){ if ($(this) == true){ $(this).attr("data-seen", "yes"); } }); }); UPDATED WORKING CODE (for the bypassers): function lescroll(){ var amount = "0"; $('.reply[data-seen="no"]').each(function(){ amount++; if ( isScrolledIntoView(this) ) { $(this).attr("data-seen", "yes"); amount--; }; }); document.title = "(" + amount + ") pagetitle"; if (amount == 0){ document.title = "&gt;&gt;&lt;?php echo($pageid); ?&gt; - &lt;?php…
has comment: http://stackoverflow.com/comment/40645056
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40645451
downvote count: 1

http://stackoverflow.com/q/25941262
has comment: http://stackoverflow.com/comment/40686397
has comment: http://stackoverflow.com/comment/40650407
has comment: http://stackoverflow.com/comment/40663175
upvote count: 1
has comment: http://stackoverflow.com/comment/40640633
has comment: http://stackoverflow.com/comment/40686382
tagged with: javascript
tagged with: grails
has body: I am currently facing an issue using the Atmosphere Framework grails plugin, which is basically the Java and Javascript implementation of Atmosphere, but my question is specifically dealing with the JS (https://github.com/Atmosphere/atmosphere-javascript) I am hitting a roadblock currently when a disconnect happens, and while it is more of a problem on mobile browsers, desktop browsers have issues sometimes as well. We get a "broken frame" error, which states: WebSocket connection to '{URL}' failed: Received a broken close frame containing a reserved status code. This occurs whenever internet is interrupted for any reason on any device. Wifi, 3g/4g, whatever. The only browser that seems to somewhat handle this is Firefox, and even that is touch and go. We currently have a hackjob in to try to reconnect clients to the socket, and it works fairly decently on desktops, but not very well on mobile. The library states this functionality should be built in, but it doesn't seem to be functional and I cannot find much online that talks about reconnecting to a socket that was closed due to a connection interuption. So, finally my question. I want to know how others that use this framework handle internet interruptions on browsers, specifically Chrome, Safari, and IE. Any help would be appreciated.
type: AnsweredQuestion
tagged with: websocket
downvote count: 0
tagged with: web
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25986479
tagged with: atmosphere
has title: Atmosphere Framework Disconnect
has comment: http://stackoverflow.com/comment/40650996
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40663159
has answer: http://stackoverflow.com/a/25986479

http://stackoverflow.com/comment/40614446
comment on: http://stackoverflow.com/q/25908776
type: Comment
type: QuestionComment
has text: Did you take a look at the grouping and aggregation SlickGrid example? http://mleibman.github.io/SlickGrid/examples/example-grouping
score: 0

http://stackoverflow.com/comment/40568013
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25915669
has text: I'm pretty sure that your custom binding registering script is not called and there is an error in console, something like `jqmRefreshList` is undefined. See this simple [jsFiddle](http://jsfiddle.net/iluzyanin/z562ju74/) without `define`, works as expected. Make sure that your script with `define` is included in right place.

http://stackoverflow.com/a/25916524
answers question: http://stackoverflow.com/q/25916309
type: Answer
has comment: http://stackoverflow.com/comment/40567529
has body: Your include is dangerous. You should define a working directory and check the result of realpath('../' . $record->wpath) against your working directory to prevent directory traversal. const WORKING_DIR = '/var/www/my-page'; $pathForInclude = realpath('../' . $record-&gt;wpath); if ($pathForInclude !== false &amp;&amp; strpos($pathForInclude, WORKING_DIR) === 0) { include($pathForInclude); }
score: 0

http://stackoverflow.com/comment/40721899
type: Comment
has text: my question is, if you arent allowing users to create their own choices, why include it?
type: AnswerComment
comment on: http://stackoverflow.com/a/26001343
score: 0

http://stackoverflow.com/comment/40751715
type: Comment
type: QuestionComment
has text: Hmm I dont really understand that. I had the script working in coffee but wanted to translate it to normal java. And the coffee script was build just like this. Worked perfectly. Not seeing the difference here. But I am a noob though.
score: 0
comment on: http://stackoverflow.com/q/26018053

http://stackoverflow.com/comment/40733257
comment on: http://stackoverflow.com/q/26008363
score: 0
type: Comment
type: QuestionComment
has text: what logic you want here console.log(today - postDate < newMark);

http://stackoverflow.com/a/25948520
has comment: http://stackoverflow.com/comment/40624442
score: 0
has comment: http://stackoverflow.com/comment/40625378
type: Answer
has body: Why not have something like: window.shownCache = []; function changeOfferPicture() { … window.currentlyShownOffer = tagArray[Math.floor(Math.random() * tagArray.length)]; window.shownCache.push(window.currentlyShownOffer); document.getElementById('top5').src = window.currentlyShownOffer.ImagesPath; } And now, your last shown offer will always be at widow.shownCache[window.shownCache.length - 1], and the elements before it will be your entire history of shown offers.
answers question: http://stackoverflow.com/q/25948477
has comment: http://stackoverflow.com/comment/40626132

http://stackoverflow.com/q/25983819
type: UnansweredQuestion
upvote count: 1
has body: I have a stupid problem I don't understand, googleing is very difficult, because I get 1000 trivial matches with window.open and script src=.. I do something like this: myWin= open("", "displayWindow", "status=no,toolbar=no,menubar=yes"); myWin.document.open(); myWin.document.write(" Test-Window"); myWin.document.write(' '); myWin.document.write(" "); myWin.document.write(' Hello '); myWin.document.close(); Every time I add the line: myWin.document.write(" "); the window left empty. I tried it with something like: var script = myWin.document.createElement('script'); ... but the same effect. I think the browser interpretes the script end tag and breaks. but what can I do? Thanks a lot for reading, kind regards Thomas
has title: Can't add <script src=".." to a Window created with window.open() .. document.write(9
type: Question
has answer: http://stackoverflow.com/a/25983854
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40689016
answer count: 1
score: 1
favorite count: 0

http://stackoverflow.com/a/25913675
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25908578
type: Answer
answers question: http://stackoverflow.com/q/25908578
upvote count: 1
has body: Seems like you use the asset pipeline. This means assets have different paths between development and production. You need to use the image path helpers to get the correct path/URL on every environment. The image_path helper is probably what you need. The problem is this is a Ruby method and you want to call it in Javascript code. There are 2 solutions: Append .erb at the end of your javascript filename. You can then use ERB like you do in the views. e.g. imageURLs.push("&lt;%= image_path('isit.png') %&gt;") If your Javascript code is loaded from an HTML page, add the array of the image URLs inside your views, then reference them via Javascript. You can either add a data attribute to an HTML element, or simply add a &lt;script&gt; tag. e.g.: &lt;div data-images="['&lt;%= image_path('1.png') %&gt;', '&lt;%= image_path('2.png') ']"&gt; or &lt;%= javascript_tag("images = ['#{image_path("1.png")}']") %&gt; and so on.
score: 1
downvote count: 0

http://stackoverflow.com/comment/40690240
score: 0
type: Comment
has text: Oh, I see what I was doing wrong! Thank you, the way you did it makes much more sense.
comment on: http://stackoverflow.com/a/25984554
type: AnswerComment

http://stackoverflow.com/comment/40613297
has text: @Kechol sorry this, one http://jsfiddle.net/casadev/n50ecw5m/1/ (didn't instanitate the object - fixed), anyway the above url was set as base as well
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25941292
type: Comment

http://stackoverflow.com/comment/40673421
score: 1
type: AnswerComment
has text: Anyone handing prizes in stupidity contest? I had my dialogbox div in "for" loop...thanks ; )
type: Comment
comment on: http://stackoverflow.com/a/25975269

http://stackoverflow.com/comment/40704100
score: 2
has text: ``onchange="this.setAttribute('value',this.value);"``, why, just why?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25992664

http://stackoverflow.com/comment/40577053
type: AnswerComment
comment on: http://stackoverflow.com/a/25921234
score: 0
type: Comment
has text: @user1031947 then honestly I don't think this is an issue at all. If the person has his finger on the screen before anything started to happen, that person would be smart enough to know he needs to do something before anything else starts to happen

http://stackoverflow.com/q/26001809
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Change width of selectbox if no value
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26001917
has answer: http://stackoverflow.com/a/26001881
accepted answer: http://stackoverflow.com/a/26001881
has answer: http://stackoverflow.com/a/26002297
score: 0
answer count: 3
has body: can someone help me please with creating little script in jQuery to make select box width bigger when is there no value? Here is code for my selectbox Select one 100 g 200 g and I need to make this: .summary table.variations .value { width: 300px; } Thanks a lot.
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26001917

http://stackoverflow.com/q/25973921
tagged with: highcharts
answer count: 1
has body: When I create a chart using highstock.js It doesn't return me a chart : For example : var chart = $('#container').highcharts('StockChart', { xAxis: { minRange: 30 * 24 * 3600 * 1000 }, rangeSelector: { selected: 1 }, series: [{ name: 'USD to EUR', data: usdeur }] }); return the same like var chart = $('#container'); To get the object I must redo the call to highcharts() method: this.chart = $('#container').highcharts(); I don't understand really why and I'm afraid it creates two instances of highcharts object. Here is a fiddle (see in js console) : http://jsfiddle.net/ma15t0kx/2/ Any Idea ?
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25974107
tagged with: initialization
has title: Highchart ctor doesn't return a Chart
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25974107
type: Question

http://stackoverflow.com/q/25906503
has comment: http://stackoverflow.com/comment/41367244
has body: I need to export pdf file from html file on click of a button. Tried jspdf to export pdf from html but jspdf doesn't support CSS and IE doesn't support this method. Is there any other method to export pdf from html on client side with all css property and images on html page.
type: Question
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40549780
has title: How to export a html file as PDF file on clientside
answer count: 0
has comment: http://stackoverflow.com/comment/40549120
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40550653
has comment: http://stackoverflow.com/comment/40549097

http://stackoverflow.com/a/25981711
has body: While I can't give you an answer as to 'why', here's some discoveries I made while testing this: Replacing the .submit() action with $('#the_frame').contents().find('#inner_form input[type="submit"]').click(); Will trigger the alert. This isn't a proper fix though, because there's more ways to submit a form. Still, it shows that the events are not completely broken. So I dug deeper. I tried using native javascript events instead of jquery's .submit([function]) bind in inner.html: &lt;form id="inner_form" onsubmit="alert('hi')"&gt; That actually shows the alert. And so does this: $('#inner_form')[0].onsubmit = function() { alert('Inner submit is triggered!'); } So there seems to be something wrong with the way jQuery sets and/or detects its own submit() method. One more try: $('#inner_form').on('submit', function() { alert('Inner submit is triggered!'); }); This also shows the submit! My wild guess is that for some reason when the events in inner.html are being bound, it doesn't know the form yet, even though the bind is wrapped in an implicit document.ready event through $(function(){ .. });. As for the how and why of this I remain in the dark, but the fix is simple: wrap your event binds in an .on() method.
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25890657
has comment: http://stackoverflow.com/comment/40692685
answers question: http://stackoverflow.com/q/25890657
type: AcceptedAnswer
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25990616
answer count: 2
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
has body: I have a function called Render(arr). Arr is a parameter that contain 50 rows of data. I have an empty div in html page &lt;div id="test"&gt;&lt;/div&gt; when I use this javascript code var s="" for(i&lt;0;i&lt;arr.length;i++{ s+= arr[i].attr1.toString(); s+= arr[i].attr2.toString(); s+= arr[i].attr3.toString(); } var data = document.getElementById("test"); data.innerHTML = s; It will render all the 50 rows of data along with the attributes in a html page which is space-consuming. How to make page indexing if i want to split the array into page indexing that a page only contain 5 data? e.g. page 1 only show data row 1-5, page 2 only show data row 6-10 without refreshing the page? thanks
has comment: http://stackoverflow.com/comment/40701004
tagged with: javascript
type: UnansweredQuestion
has title: javascript - split array into multiple page index
has answer: http://stackoverflow.com/a/25990819
has comment: http://stackoverflow.com/comment/40700739
tagged with: arrays
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40700840
type: Question
has answer: http://stackoverflow.com/a/25990985

http://stackoverflow.com/a/25930204
has body: Consider using Object.keys to iterate the array. You could end up with something like this: // return a new object that contains the same keys as object o // but had function f called on each value function myMap(o, f) { var new_o = {}; Object.keys(o).forEach(function(k){ new_o[k] = f.apply(o[k]); }); return new_o; } // E.g. call String.toUpperCase on an anonymous object containing two fields myMap({ s1: 'string 1', s2: 'string 2' }, "".toUpperCase);
type: Answer
answers question: http://stackoverflow.com/q/25929353
score: 0

http://stackoverflow.com/q/26019127
has comment: http://stackoverflow.com/comment/40841157
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/40842909
downvote count: 0
score: 16
linked to: http://stackoverflow.com/q/9847580
type: Question
has comment: http://stackoverflow.com/comment/40846814
has comment: http://stackoverflow.com/comment/40843322
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/40846288
tagged with: javascript
has answer: http://stackoverflow.com/a/31875049
answer count: 3
upvote count: 16
has comment: http://stackoverflow.com/comment/40841043
has answer: http://stackoverflow.com/a/26069573
favorite count: 0
has answer: http://stackoverflow.com/a/26089489
accepted answer: http://stackoverflow.com/a/26089489
tagged with: d3.js
has body: I use this D3 snippet to move SVG g elements to top of the rest element as SVG render order depends on the order of elements in DOM, and there is no z index: d3.selection.prototype.moveToFront = function () { return this.each(function () { this.parentNode.appendChild(this); }); }; I run it like: d3.select(el).moveToFront() My issue is that if I add a D3 event listener, like d3.select(el).on('mouseleave',function(){}), then move the element to front of DOM tree using the code above, all event listeners are lost in Internet Explorer 11, still working fine in other browsers. How can I workaround it?
tagged with: http://stackoverflow.com/tag/html
has title: SVG element loses event handlers if moved around the DOM
possible better answer: http://stackoverflow.com/a/26069573

http://stackoverflow.com/comment/40774522
has text: @ArunPJohny No. I it is saved on my desktop. And I am opening it using IE and Chrome, both not working.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26031086

http://stackoverflow.com/a/25912306
score: 1
accepted answer of: http://stackoverflow.com/q/25911631
answers question: http://stackoverflow.com/q/25911631
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Yes phonegap has single page model, single page is good option over multiple page application with phonegap.But you can create it on both ways if you are going with multiple page application and having multiple html pages then also it's not required to load all the css and js stuff in every html pages you can declare it once and then you can use that js and css in all other pages as well. Multi-Page Apps Multi-page applications function more like traditional web pages. Each “page” or HTML file contains a finite and discrete set of functionality, and has limited client-side dynamic updates. A page is loaded, content is displayed, the user interacts with it, and then another page is loaded. These pages can be loaded from the local file system or from remote servers. This style of architecture works for many developers, however there are three notable drawbacks to this approach. First, there is the transition between pages. Not only are there visual display artifacts when pages are loaded and unloaded, but you also lose anything in-memory in JavaScript. This includes framework libraries, collected data, and so on. Single Page Apps This approach enables you to create web apps that feel more like apps instead of web pages. Once the PhoneGap js library has been initialized, you never have to re-initialize it. By leveraging the single-page architecture, you will not lose data that is resident in memory, and you can manage the transition of content from one visual state to another. Many MVC/development frameworks leverage this approach for building applications. However, if you are leveraging the web view’s history management, then you have to manually manage URL fragments and history behaviors.

http://stackoverflow.com/comment/40600123
has text: Looking at source, this plugin does not provide this option, neither does it provide an option to hook to an event. Use some other plugin for dropdown, maybe bootstrap http://getbootstrap.com/components/#dropdowns or jquery ui selectmenu http://jqueryui.com/selectmenu/ or whatever
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25934193

http://stackoverflow.com/comment/40628213
has text: Flagged (too broad), further reading http://stackoverflow.com/help/how-to-ask
type: QuestionComment
comment on: http://stackoverflow.com/q/25951106
score: 0
type: Comment

http://stackoverflow.com/comment/40727664
type: Comment
has text: 90% of the time when something's not working, it's because I made a typing mistake.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26004487

http://stackoverflow.com/q/25946059
possible better answer: http://stackoverflow.com/a/25946127
has title: Value selection between two Arrays in Javascript
has answer: http://stackoverflow.com/a/25946127
has answer: http://stackoverflow.com/a/25946086
type: Question
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/40620527
has body: I have two different arrays - Name and Email in javascript. Values in the two arrays correspond to each other; Name[0] has email value at Email[0]. Values from array Name are used for a dropdown in the HTML page. Now when the user selects a name (dropdown) and clicks on Send button, email should be send to the person whose name is selected in the dropdown. How to lookup in the second array based on the value selected by User in the dropdown? Name and Email arrays will always have dynamic values Thanks.
score: 0
accepted answer: http://stackoverflow.com/a/25946086
answer count: 2
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40647801
type: AnswerComment
has text: ya know and I started to learn Java basics before JavaScript's ones
type: Comment
comment on: http://stackoverflow.com/a/25954124
score: 0

http://stackoverflow.com/a/25991440
has body: This may help you: http://www.w3schools.com/dom/dom_nodes_get.asp The load function: http://www.w3schools.com/dom/dom_loadxmldoc.asp
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25991339
answers question: http://stackoverflow.com/q/25991339

http://stackoverflow.com/q/25998962
tagged with: sql
has comment: http://stackoverflow.com/comment/40715798
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has body: I am very new to dev and probably biting off more than I chew right now. :0 I am looking to create a query string form that will stick through a users session, no matter what backpages they travel between during the visit. This is what i got so far, its not much, but It does accomplish some of what I'm trying to do. &lt;div style="text-align: center;"&gt; &lt;form method="get" action="http://www.example.com"&gt; &lt;input name="n" value="Show" type="hidden"&gt; &lt;input name="id"&gt; &lt;input type="submit"&gt; &lt;/form&gt; &lt;/div&gt; This code builds the form and send the user to the custom submitted query link after entry, however, I would like the custom query to stick all pages they visit. In this code the query is only valid for the initial page after entry. Need the query stay attached to child pages thereafter as well: IE: http://example.com/blob/?id=44553355 as well as http://example.com/blog/article/?id=44553355 Any suggestions on how to tweak the form or accomplish this task I would very much appreciate it. Thank you.
score: 0
tagged with: mysql
answer count: 1
has answer: http://stackoverflow.com/a/25999184
has title: Creating a Query String HTML form that passes through pages?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40715786

http://stackoverflow.com/comment/40731704
has text: Can you point out the typo in your code above? I can't notice anything with such short/confusing names
comment on: http://stackoverflow.com/q/26007475
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40624744
score: 0
type: Comment
type: QuestionComment
has text: How I can identify each system uniquely? Except IP address what I can use for this?
comment on: http://stackoverflow.com/q/25948762

http://stackoverflow.com/q/25893536
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
score: -1
type: Question
answer count: 2
downvote count: 2
has title: Display JSON in AngularJS
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25895049
upvote count: 1
has body: I want to display JSON output using AngularJS. What would be the best way to do this? Would gridOptions be a good idea? All I want to print is the label/parent's label/parent's parent's label/... till the root in reverse order. { artifactId:"6450", classificationId:6451, id:3276, hierarchyId:"lp", label:"Authorization", nodeId:"84", parent:{ id:3275, hierarchyId:"lp", label:"Authorize", nodeId:"83", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:23Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:23Z", parent:{ id:3193, hierarchyId:"lp", label:"Actions & Verbs", nodeId:"1", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:17Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:17Z", parent:{ id:3192, hierarchyId:"lp", label:"root", nodeId:"13190", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:14Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:14Z" } } }, parentNodeId:"83", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:23Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:23Z" }, { artifactId:"6450", classificationId:6452, id:3280, hierarchyId:"lp", label:"Licensee", nodeId:"88", parent:{ id:3276, hierarchyId:"lp", label:"Authorization", nodeId:"84", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:23Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:23Z", parent:{ id:3275, hierarchyId:"lp", label:"Authorize", nodeId:"83", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:23Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:23Z", parent:{ id:3193, hierarchyId:"lp", label:"Actions & Verbs", nodeId:"1", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:17Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:17Z", parent:{ id:3192, hierarchyId:"lp", label:"root", nodeId:"13190", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:14Z", updatedBy:"INITIAL-LOAD", updatedOn:"2014-09-12T16:21:14Z" } } } }, parentNodeId:"84", createdBy:"INITIAL-LOAD", createdOn:"2014-09-12T16:21:23Z", upd…
has answer: http://stackoverflow.com/a/25894080
tagged with: angularjs

http://stackoverflow.com/q/26033970
accepted answer: http://stackoverflow.com/a/26033995
answer count: 4
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26033989
has title: .on('click') in for loop to multiple elements?
has answer: http://stackoverflow.com/a/26034024
linked to: http://stackoverflow.com/q/750486
type: Question
possible better answer: http://stackoverflow.com/a/26033989
has answer: http://stackoverflow.com/a/26033995
score: 2
has body: I'm having trouble with my function. I need a for loop to attach a click event to my elements. Now it sadly only adds the click event to the last element. I did it like this right now: var $texte = $('.text-bg'); $texte = $texte.children(); for(i=0;i&lt;$texte.length;i++){ switch($($texte[i]).attr('class')){ case 'text-top-left': console.log($texte[i]); $($texte[i]).on('click', function(){ $($texte[i]).toggle( function(){$($texte[i]).animate({'left':'0'})}, function(){$($texte[i]).animate({'left':'-100px'})} ); }); break; } } But somehow the click event doesnt save. So when it goes into the second loop in the for function, the first click event is being overwritten. How to prevent this?
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26034126

http://stackoverflow.com/q/26012729
favorite count: 0
type: Question
upvote count: 2
has title: jquery get id of input selected text
answer count: 1
downvote count: 7
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26013489
type: AnsweredQuestion
score: -5
tagged with: http://stackoverflow.com/tag/html
has body: I have several input fields (sometimes disabled). When the user clicks a button, how can I get the id of the input field that has text selected in it? Text:&lt;input type="text" id="myID" disabled="disabled" value="Hello World"/&gt; &lt;input type="text" id="myID2" value="Hello again"/&gt; &lt;input type="button" id="myButton" value="Get Selected Id" name="Get Selected Id"/&gt; $("#myButton").click(function(){ alert(/*...how do I get 'myID' or 'myID2' here, depending on which has a selection?...*/); }); By "selected" I mean like this: Here's the fiddle Unfortunately, I need to support not just modern browsers, but also IE7 and IE8.
accepted answer: http://stackoverflow.com/a/26013489

http://stackoverflow.com/comment/40747016
comment on: http://stackoverflow.com/q/26016299
type: Comment
type: QuestionComment
has text: Can you post full code?
score: 0

http://stackoverflow.com/comment/40526081
type: QuestionComment
comment on: http://stackoverflow.com/q/25882186
score: 0
has text: Is it a popup from your application on it is from the browser(e.g. a security alert)? if it is your application, then your developers might be able to tell what triggers the pop up randomly and if it is indeed a valid pop up. You can probably have a `rescue` and handle the pop up whenever it appears.
type: Comment

http://stackoverflow.com/q/25950985
type: Question
has comment: http://stackoverflow.com/comment/40630964
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40659606
has comment: http://stackoverflow.com/comment/40628128
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40628761
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40628318
has title: user-defined java Script function doesn't work properly till being followed by standard one
has answer: http://stackoverflow.com/a/25951100
has body: I have a function myFun() that is called when a user pressed the ENTER key on the keyboard. The function myFun() calls another user-defined function callFun(). I've added this event to the input item which will be triggered once ENTER key is pressed: onkeydown="myFun();". This is the structure of my function: function myfunc() { if (window.event.keyCode === 13) { callFun(); // alert("DONE"); } } Now, it will not be executed unless alert("DONE") is uncommented, otherwise it's not executed. /+/+/+/+/+ More Explanation +++++\ now, user has two choice either click on a button "btn1" or press the ENTER key. So, once the user click the button btn1 everything goes fine. but once he/she press the ENTER Key, function myfunc() will be executed and call callFun(). function myfunc() will send a parameter which is an aspx page to the callFun(). the problem is that the callFun() will not be executed unless followed by alret() function and this happened by chance when I was debugging the code. So, I don't need the alret() at all but I noticed it is executed one I use it. this means there is somthing happen with the alret(). I hope this is clear. Thanks
has comment: http://stackoverflow.com/comment/40628335
downvote count: 1

http://stackoverflow.com/comment/40554913
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25909760
has text: @ivy_lynx the script scope is `window` anyway, so it's not required
score: 0

http://stackoverflow.com/q/25876247
upvote count: 24
type: Question
accepted answer: http://stackoverflow.com/a/25876311
has answer: http://stackoverflow.com/a/56166030
has title: how to replace undefined with a empty string
answer count: 6
has body: I am using jsPdf. When a field has been left blank "undefined" is printed on the pdf. I would like to replace that with a empty string. I am trying to use a if statement but I am not getting it. doc.text(30, 190, "Budget : $"); if ($scope.currentItem.JobOriginalBudget == "undefined") { doc.text(50, 190, " "); } else { var y = '' + $scope.currentItem.JobOriginalBudget; doc.text(50, 190, y); };
has answer: http://stackoverflow.com/a/71452191
tagged with: jspdf
has answer: http://stackoverflow.com/a/41548317
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40494571
favorite count: 0
score: 24
has comment: http://stackoverflow.com/comment/40494707
has answer: http://stackoverflow.com/a/25876336
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/41548317
linked to: http://stackoverflow.com/q/1011317
has answer: http://stackoverflow.com/a/25876311
has comment: http://stackoverflow.com/comment/40497521
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/54728173

http://stackoverflow.com/q/25909242
favorite count: 0
has answer: http://stackoverflow.com/a/27745172
has answer: http://stackoverflow.com/a/27745247
type: Question
score: 1
tagged with: asp.net
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/27745247
tagged with: vlc
has body: I am playing vlc videos in Google chrome and using javascript for it but i do not want to view the play and stop buttons when the video is properly playing. How to remove this tools?
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has title: Remove vlc tools using Javascript
possible better answer: http://stackoverflow.com/a/27745172

http://stackoverflow.com/a/25913560
has body: Step 1 Put on your jquery file or header section $(window).scroll(function(){ var p = $( ".your-div" ).height(); if ($(this).scrollTop() &gt; p) { $('.fixeddiv').addClass('fixed'); } else { $('.fixeddiv').removeClass('fixed'); } }); Step 2 Put on your css file .fixed{ position:fixed; top:0; z-index:1000; width:100%; background:#FFF; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25913283

http://stackoverflow.com/a/42088086
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/72170730
upvote count: 2
answers question: http://stackoverflow.com/q/26019823
type: Answer
has body: I thought switch too,but no need. for (var n = 1; n &lt;= 100; n++) { var output = ""; if (n % 3 == 0) output = "Fizz"; if (n % 5 == 0) output += "Buzz"; console.log(output || n); }

http://stackoverflow.com/a/25898154
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25898061
has body: You are on the correct track. I have created a regexp type fiddle here to show you have it works. /^([\S]+)\s([\S]+)\s([\S]+)/g Essentially what this does is look for any non-space character 1 or more times followed by a whitespace character then non-space 1 or more times, whitespace, then the last set of non-space characters giving you your three words.
type: Answer
score: 3
downvote count: 0
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25898061

http://stackoverflow.com/q/26019875
has comment: http://stackoverflow.com/comment/40753994
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26020136
has comment: http://stackoverflow.com/comment/40759512
has comment: http://stackoverflow.com/comment/40754383
tagged with: javascript
has comment: http://stackoverflow.com/comment/40754518
possible better answer: http://stackoverflow.com/a/30337865
has answer: http://stackoverflow.com/a/26020529
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40753940
has body: I'm trying to make a string fits in a determined area (td) without breaking line. The problem is: It needs to ... Fit while resizing Fit in N kinds of resolution Add ... at the end when needed (and don't when not needed) Accept the change of font-size, font-weight, and font-family Based on the answers on Novon's question, I made the following code: CSS (// Just adding some styles to break the line) .truncated { display:inline-block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } jQuery (// Find all td that contains a .truncated element. Getting the real width (by removing the content and adding it again) of the td. Applying, if needed, minWidth on the td) jQuery('.truncated').closest('td').each(function() { var text = jQuery(this).text(); var widthOriginal = jQuery(this).width(); var widthEmpty = jQuery(this).text('').width(); jQuery(this).text(text); if(widthOriginal &gt;= widthEmpty){ var width = (parseInt(widthEmpty) - 10) + 'px'; jQuery(this).css('maxWidth', width); jQuery(this).text(text + '...'); } }); the result (as expected from the above code) is: but it should be: I was thinking, maybe try to find the first line of the string and remove the rest but didn't find a way to do that (and it's a lot of "workaround" for my taste). Is there a better way to do that?
favorite count: 0
has title: Truncate string based on pixel width
has answer: http://stackoverflow.com/a/28655391
accepted answer: http://stackoverflow.com/a/26020136
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 25
has answer: http://stackoverflow.com/a/26021440
upvote count: 25
linked to: http://stackoverflow.com/q/6222616
linked to: http://stackoverflow.com/q/4700226
has comment: http://stackoverflow.com/comment/40757429
linked to: http://stackoverflow.com/q/895888
has answer: http://stackoverflow.com/a/30337865
type: Question

http://stackoverflow.com/comment/40736301
has text: thanks for this @Max but the '"Add filter for <%:cell.Value %>",' is the header bit and this is the bit i'm struggling with as you've got the ' Add filter for Test ' sat within the '"<%= String.Format("' section so I have 2 headers. Other than that it works and looks perfect
comment on: http://stackoverflow.com/a/25997887
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26030679
has body: How can I compare two math expressions in JavaScript? For example "1 + x" and "x + 1". There is a JavaScript Math parser but I couldn't find the logic to compare the parsed expressions: https://github.com/silentmatt/js-expression-eval/blob/master/test.js Are there other options? Thanks
score: 0
type: Question
tagged with: math
has comment: http://stackoverflow.com/comment/40814104
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40773905
type: UnansweredQuestion
has title: Compare Math expressions with JavaScript
has answer: http://stackoverflow.com/a/26033020
has answer: http://stackoverflow.com/a/26045737

http://stackoverflow.com/q/25997925
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I have three comboboxes : Each combobox have following values to select : Combobox 1: English French Spanish Italian Combobox 2: English French Spanish Italian Combobox 3: English French Spanish Italian When the values are selected in Combobox 1 let's say English, then this value is to be disabled in Combobox 2 & 3 both. I want to do this in javascript. can any body help. I want to disable this value not to delete it. Thanks in advance. EDIT I tried this : French English US Greek Swedish French English US Greek Swedish
has title: How to Disable the value of combobox selected in another combobox using Javascript?
has comment: http://stackoverflow.com/comment/40781215
has answer: http://stackoverflow.com/a/25998131
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/40713700
type: Question
score: -1

http://stackoverflow.com/comment/40735757
type: QuestionComment
comment on: http://stackoverflow.com/q/26009855
score: 0
has text: `{!foo}` is not valid JavaScript. Are you sure your code worked to begin with? Did you forget to expand some template before posting?
type: Comment

http://stackoverflow.com/a/25946268
has body: Just use the greaterThan, greaterThanOrEqualTo, lessThan and lessThanOrEqualTo methods on Parse.Query, and pass in date objects. I.e. var query = new Parse.Query("Event"); query.lessThan("eventDate", new Date()); This query will get you all objects from the table "Event", whose column "eventDate" (a Date column) contains a date that is before the current date.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25946198

http://stackoverflow.com/comment/40623828
type: AnswerComment
comment on: http://stackoverflow.com/a/25948257
has text: This is only half the problem because the following code with the `$.each()` probably tries to use the `cars` variable before the `$.get()` has finished. That code needs to be moved into the `$.get()` completion callback and restructured a bit.
type: Comment
score: 0

jsf
tags question: http://stackoverflow.com/q/25978791
type: Tag
tags question: http://stackoverflow.com/q/25947170
tags question: http://stackoverflow.com/q/25970266
tags question: http://stackoverflow.com/q/25913373
tags question: http://stackoverflow.com/q/25914332
tags question: http://stackoverflow.com/q/25972332
tag name: jsf
tags question: http://stackoverflow.com/q/25959671
tags question: http://stackoverflow.com/q/25937763

http://stackoverflow.com/comment/40575421
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25920544
has text: The behavior reported is incorrect. `null == "null"` is false.

http://stackoverflow.com/comment/40743858
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26014323
has text: I am using v0.10.25 of nodejs and I am creating my own webapp. I just want to see the console logs and the api calls not all these informations.
score: 0

http://stackoverflow.com/comment/40719325
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26000643
type: Comment
has text: Hi thanks, for your help. In fact it works now when I set the /myoptical/ before the file. But I do not understand how do you insert the ` ` and how do you use it (fyi, i am in php?

http://stackoverflow.com/a/25949551
upvote count: 1
answers question: http://stackoverflow.com/q/25949445
downvote count: 0
type: Answer
has body: Try this: function displayImage() { var image = document.getElementById("canvas"), select = document.getElementsByTagName('select')[0]; image.src = select.value; } or more compact: function displayImage() { document.getElementById("canvas").src = document.getElementsByTagName('select')[0].value; } Here is the example
score: 1

http://stackoverflow.com/q/25962781
has comment: http://stackoverflow.com/comment/40650025
score: 0
linked to: http://stackoverflow.com/q/4172221
has comment: http://stackoverflow.com/comment/40649915
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40649925
answer count: 0
has title: Preventing css inheritance in injected iframe with different domain?
tagged with: iframe
type: Question
has body: How to stop Injected HTML-div / CSS from inheriting styles ? (Internet Explorer) Reading that question, it seems that iframe being usedto prevent injected element on the page from inheriting css. My only concern is, that I need to communicate with this injected iframe, so will not include an src. my widget don't want to inherit css from outside page. would injecting that to a current page work properly? or does the src need to have a completely different domain than the current page it is on.
tagged with: javascript

http://stackoverflow.com/a/25925928
has comment: http://stackoverflow.com/comment/40585112
has comment: http://stackoverflow.com/comment/40585759
type: Answer
has comment: http://stackoverflow.com/comment/40585384
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40585185
has body: Instead of taking the id and trying invoke onclick() event manually, you can retrieve the href attribute and pass it to the window.open method. for (var i = 0; i &lt; elements.length; i++) { var url = elements[i].getAttribute("href"); window.open(url); }}) Read more about window.open here. https://developer.mozilla.org/en-US/docs/Web/API/Window.open However, this might not be well accepted by the browsers, I suspect that they will prevent opening that many windows via javascripts. (Blocking Popups).
accepted answer of: http://stackoverflow.com/q/25925864
answers question: http://stackoverflow.com/q/25925864
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25956272
favorite count: 0
possible better answer: http://stackoverflow.com/a/25963362
tagged with: truetype
has answer: http://stackoverflow.com/a/25963362
score: 34
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/54159174
downvote count: 0
has title: Better Quality Text in WebGL
tagged with: webgl
type: Question
has body: I am searching a method to draw better quality (arbitrary) text inside WebGL. Currently I am using bitmap font rendering on a 2D canvas and blitting them into the WebGL context. This method is described here http://delphic.me.uk/webgltext.html This is the only solution for drawing arbitrary unicode text inside WebGL I know of right now. The problem with this method is that these are bitmap fonts and look blocky on smaller font sizes. I mostly use a font size of 18 and the result is quite blocky compared to desktop quality fonts. I know that threeJS has a font library which generates better looking text, however I do not want to use threeJS as I have my own wrapper which is working fine for what I need and don't want to add the additional overhead of threeJS. So how to create better quality text in WebGL ? Are there methods to extract text shapes in Javascript to improve quality ?
tagged with: javascript
upvote count: 34
answer count: 3
has answer: http://stackoverflow.com/a/35027166
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/35027166
tagged with: opengl-es

http://stackoverflow.com/a/25975839
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25975504
has body: The value of the -htmlSuite parameter is broken in two pieces. And you probably shoud use backslashes in your pathnames (because you're on dos/win): exec(['java','-jar','D:\\selenium\\selenium-server-standalone-2.40.0.jar','-htmlSuite','"*firefox3 C:\\Users\\AppData\\Local\\Mozilla Firefox\\firefox.exe"','"http://google.com"','"D:\\selenium\\TS2.html"','"D:\\selenium\\Res3.html"'], function(err, out, code) { });

http://stackoverflow.com/comment/76837351
type: AnswerComment
comment on: http://stackoverflow.com/a/25924205
type: Comment
has text: @Flash did you get an answer on this?
score: 0

http://stackoverflow.com/a/36584060
answers question: http://stackoverflow.com/q/26022029
type: Answer
upvote count: 2
has body: Uncaught TypeError: Cannot set property 'cursor' of undefined. Fixed with: map.getTargetElement()s.style.cursor = hit ? 'pointer' : ''; instead of map.getTarget().style.cursor = hit ? 'pointer' : '';
score: 2
downvote count: 0

http://stackoverflow.com/comment/53034295
comment on: http://stackoverflow.com/a/31038940
score: 0
type: Comment
has text: This is an inaccurate way to detect download speed not connection type. There are several variables that come into the portrait when detecting download speed, one of which being latency.
type: AnswerComment

http://stackoverflow.com/a/25958235
has body: if result is not fully divisible by 12, then use Math.ceil (2.25) which equals 3
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25958190

ios-ui-automation
tags question: http://stackoverflow.com/q/25919234
tags question: http://stackoverflow.com/q/25978901
tags question: http://stackoverflow.com/q/25928707
tag name: ios-ui-automation
type: Tag

http://stackoverflow.com/q/25929805
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25930790
possible better answer: http://stackoverflow.com/a/25930708
has answer: http://stackoverflow.com/a/25930708
answer count: 2
has comment: http://stackoverflow.com/comment/40592237
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40592466
accepted answer: http://stackoverflow.com/a/25930790
has body: I have an object then have another objects as values. And that objects have arrays as values. And I need to modify each that array. Here is 2 items of my object: 'Toyota Prius hybrid hatchback': { '2001': [ 2, 8.2, 2, 10, 8, 8 ], '2002': [ 2, 7.6, 1, 9, 6, 6 ], '2004': [ 10, 45.900000000000006, 7, 50, 43, 43 ], '2005': [ 17, 75.1, 11, 82, 62, 78 ], '2006': [ 27, 119.6, 17, 133, 106, 120 ], '2007': [ 20, 84.70000000000002, 17, 99, 87, 92 ], '2008': [ 33, 139.49999999999997, 17, 154, 124, 141 ], '2009': [ 66, 292.40000000000003, 49, 322, 273, 298 ], '2010': [ 58, 259.0999999999999, 39, 281, 240, 263 ], '2011': [ 22, 96.50000000000001, 15, 107, 90, 101 ], '2012': [ 23, 104.70000000000002, 20, 114, 92, 105 ] }, 'Toyota RAV4 SUV': { '2001': [ 1, 3.9, 0, 4, 4, 3 ], '2002': [ 7, 27.4, 5, 28, 27, 23 ], '2003': [ 7, 28.900000000000002, 4, 35, 27, 26 ], '2004': [ 2, 7.3, 1, 9, 7, 5 ], '2005': [ 6, 24.200000000000003, 5, 29, 25, 19 ], '2006': [ 11, 45.6, 10, 50, 46, 39 ], '2007': [ 9, 38.599999999999994, 7, 45, 35, 34 ], '2008': [ 10, 43.1, 8, 47, 43, 39 ], '2009': [ 11, 47.5, 8, 54, 48, 42 ], '2010': [ 7, 31.5, 5, 35, 32, 28 ], '2011': [ 11, 47, 7, 54, 47, 41 ], '2012': [ 11, 51.3, 9, 55, 51, 47 ] }, So I need to divide every item in the array on the first item, and then multiply third item on 100 and round all the items. I have tried to do it with underscore map like so: var newObj = _.map(myObj, function(value, key){ var b = _.map(value, function(value, key){ var rev = value[0]; var rat = (value[1]/rev).toFixed(1); var rec = (value[2]/rev*100).toFixed(0); var per1 = (value[3]/rev).toFixed(1); var per2 = (value[4]/rev).toFixed(1); var per3 = (value[5]/rev).toFixed(1); // What should I return so my b variable would be an object? }); // What should I return so my newObj variable would be an object? }); But I don;t know what should I return in the map function so my var would be an object. What is the right way to do that?
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40592272
upvote count: 2
tagged with: underscore.js
type: Question
has title: Modifying an array inside object inside of another object with Underscore?

http://stackoverflow.com/comment/40586342
score: 2
has text: It doesn't look like you've loaded jQuery into your page which `js.js` depends upon. There should have been errors in the browser error console or debug console that point you in some useful direction. If you aren't looking there first when something doesn't work, that's one of the first things to learn.
type: Comment
comment on: http://stackoverflow.com/q/25926711
type: QuestionComment

http://stackoverflow.com/comment/40617712
has text: Thanks a lot, I think this is something I will look into as I cant test it right away since it doesn't look like it can be added inside JS code:
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25944039

http://stackoverflow.com/q/25937928
answer count: 3
accepted answer: http://stackoverflow.com/a/25937993
has answer: http://stackoverflow.com/a/25938074
has answer: http://stackoverflow.com/a/25937993
has body: How do I modify a value of &lt;option&gt;? I've tried: var example = document.getElementById("test"); // This is the &lt;option&gt; example.value = "Test"; The code above doesn't modify anything. However, if the code above modifies a value of &lt;select&gt;'s displayed value, the value goes blank;
possible better answer: http://stackoverflow.com/a/25938074
type: AnsweredQuestion
downvote count: 0
score: 1
has title: JavaScript: How to modify value in
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/25938137
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25880009
downvote count: 0
has body: In javascript you would just put the variable in between the string. But make sure its a string not an array or something else. So for example you might have var string = "mystring"; outputString = "blah blah " + string + " blah blah blah"; this would output //blah blah mystring blah blah blah
type: Answer
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/25879986
answers question: http://stackoverflow.com/q/25879986
type: AcceptedAnswer

http://stackoverflow.com/comment/40730196
score: 1
has text: No one says you cant have several routes/endpoints for your websockets ;)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26006464

http://stackoverflow.com/q/25958510
has answer: http://stackoverflow.com/a/25958607
has comment: http://stackoverflow.com/comment/40642044
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40641789
has comment: http://stackoverflow.com/comment/40641776
accepted answer: http://stackoverflow.com/a/25958607
has comment: http://stackoverflow.com/comment/40641816
has comment: http://stackoverflow.com/comment/40641842
has comment: http://stackoverflow.com/comment/40641741
tagged with: razor
upvote count: 1
has body: I get a variable from the controller that is a java script code and want to init a variable of java script file with this data as a string. What I mean is: Model.TrialScript is equal to the string of: (I got it from the DB) and then, I want to do the next thing in my js file: var TrialScript = '<%= Model.TrialScript %>'; The problem is that TrialScript is not like I expect: var TrialScript = ' var j = new Date(); assuming I must get the js code as: and not: , how can I solve this issue? Another thing may helps: I want to run this script only when the user press a button (is called: button1) Maybe is there an option to call this script from the js after the button is clicked without saving this script as a variable? any help appreciated!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40641804
tagged with: asp.net-mvc
score: 1
has comment: http://stackoverflow.com/comment/40641723
has title: Set a javascript code as a variable
type: Question

http://stackoverflow.com/q/26026005
score: 0
has answer: http://stackoverflow.com/a/26026211
has title: Expanding hiding elements
type: Question
possible better answer: http://stackoverflow.com/a/26026137
has body: So my question is, how to create an expandable tree while iterating through an array in AngularJS. I mean I could get it work, the problem that they expanded/closed together. my html: [...] &lt;div ng-repeat="item in items"&gt; &lt;div class="item-title" ng-click="setState()"&gt;{{ item.title }}&lt;/div&gt; &lt;div class="item-container" show-me="isShown"&gt; {{ item.content }} &lt;/div&gt; &lt;/div&gt; my js: [...] //in controller: $scope.isshown = false; $scope.setState = function() { $scope.isshown = !$scope.isshown; }; [...] .directive("showMe", function($animate) { return function (scope, element, attrs) { scope.$watch(attrs.showMe, function(newVal) { if(newVal) { $animate.addClass(element, 'show'); } else { $animate.removeClass(element,'show'); } }); }; }); so this basicly opens every items. I was looking for a solution for 3 days now and I really dont want to make exceptionally long jquery thingies with $(div#blabla)-s. Any ideas?
has answer: http://stackoverflow.com/a/26026137
accepted answer: http://stackoverflow.com/a/26026211
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26026146
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/41920950
type: QuestionComment
has text: Here is the link.Please do go by this link. This may be helpful to you. [https://www.npmjs.org/doc/cli/npm-shrinkwrap.html](https://www.npmjs.org/doc/cli/npm-shrinkwrap.html)
comment on: http://stackoverflow.com/q/25897908
score: 0
type: Comment

http://stackoverflow.com/a/25923008
accepted answer of: http://stackoverflow.com/q/25917023
type: Answer
answers question: http://stackoverflow.com/q/25917023
score: 0
has body: You had couple of problems with your code. Main problem being you must initialize the spy before calling injectOption(). it('jquery.addClass called', function () { spyOn($.fn, 'addClass'); injectOption(); expect($.fn.addClass).toHaveBeenCalled(); }); Working Fiddle.
type: AcceptedAnswer

http://stackoverflow.com/comment/40726228
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26004142
has text: It is. For the first d, the b variable is populated with the arrays. The s and t variables are assigned NaN values, though. First the subsequent d iterations (there must be a better way of saying this?) all values go to NaN.

http://stackoverflow.com/comment/40661313
comment on: http://stackoverflow.com/q/25968990
has text: You can iterate over the collection with regular `for loop`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25941369
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40613380
upvote count: 2
has comment: http://stackoverflow.com/comment/40613716
has body: Your tags: must end Final must end EDIT: Answer in the comments: 1 2 3 4 5 Its nessecsary to HTML Escape the '<' and the '>'. This can be achieved with this php Function
has comment: http://stackoverflow.com/comment/40613528
accepted answer of: http://stackoverflow.com/q/25941185
score: 2
answers question: http://stackoverflow.com/q/25941185
type: AcceptedAnswer

http://stackoverflow.com/comment/40745503
comment on: http://stackoverflow.com/q/26011092
type: Comment
type: QuestionComment
has text: I mean the character-encoding header of the response, sorry for being unspecific
score: 0

http://stackoverflow.com/q/25930277
has answer: http://stackoverflow.com/a/25930810
has answer: http://stackoverflow.com/a/25930325
type: UnansweredQuestion
has body: I would like to change the first letter of a word to uppercase. So, I have written some code on keyup() function. Whenever I type inside the text filed, Word's first letter is getting changed to uppercase. I also use autocomplete() function. The problem is, Whenever I choose a word from autocomplete drop down it's first letter is not getting changed to uppercase and also the last text box is getting auto focused. FYI: I am triggering the keyup() function after the autocomplete selection. jsfiddle: http://jsfiddle.net/8ke04mgs/5/
has title: How to trigger keyup() while using autocomplete()
has comment: http://stackoverflow.com/comment/40592907
downvote count: 2
has comment: http://stackoverflow.com/comment/40593034
type: Question
score: -2
has comment: http://stackoverflow.com/comment/40592569
has comment: http://stackoverflow.com/comment/40593028
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40592648
favorite count: 0

http://stackoverflow.com/q/25922963
score: 1
upvote count: 1
type: Question
has body: I am trying to detect whether an image has transparency in it using HTML5 canvas. Here is my code, which is based on logic I have found on the internet for detecting transparent pixels using canvas (for example, this question): //note: this happens during the onload of the element var found = false; if((element.src).indexOf('.png') || element.src.indexOf('.tif')) { var c = document.createElement('canvas'); var ctx = c.getContext('2d'); ctx.drawImage(element,0,0); var imageData = ctx.getImageData(0, 0, element.width, element.height), data = imageData.data; var i = data.length/4 - 1; do { if(data[(i*4) + 3] &lt; 255) { found = true; } } while (i-- &amp;&amp; !found); } return found; The problem is, even when I put in a PNG that does not have any transparency, it returns true. I used a counter to investigate: console.log('total: '+i); do { if(data[(i*4) + 3] === 0) { //found = true; found++; } } while (i-- /*&amp;&amp; !found*/); console.log('found: '+found); //result for http://www.fnordware.com/superpng/pnggrad8rgb.png: //total: 89999 //found: 45000 My question is, how can I reliably detect transparency in PNG and TIF files?
has answer: http://stackoverflow.com/a/25923108
tagged with: javascript
linked to: http://stackoverflow.com/q/7991139
has title: Detecting image transparency using HTML5 canvas has false positives
tagged with: canvas
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25923108
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/q/26011165
has comment: http://stackoverflow.com/comment/40738130
type: Question
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
upvote count: 2
tagged with: viewport
has title: How to check all the elements that are visible in viewport of mobile browser
linked to: http://stackoverflow.com/q/123999
has comment: http://stackoverflow.com/comment/40738072
favorite count: 0
has comment: http://stackoverflow.com/comment/40738011
type: UnansweredQuestion
tagged with: css
has body: I am trying to check if the div containing the image are in the viewport. I tried following code $.fn.is_on_screen = function () { var win = $(window); var viewport = { top: win.scrollTop(), left: win.scrollLeft() }; viewport.right = viewport.left + win.width(); viewport.bottom = viewport.top + win.height(); var bounds = this.offset(); bounds.right = bounds.left + this.outerWidth(); bounds.bottom = bounds.top + this.outerHeight(); return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); }; CheckIt(); function CheckIt() { $('.target').each(function () { if ($(this).find('img').attr('data-src')) { // if target element exists in DOM if ($(this).is_on_screen()) { // if target element is visible on screen after DOM loaded if ($(this).find('img').attr('data-src')) { var source = $('.target').find('img').attr('data-src'); $('.target').find('img').attr('src', source); $(this).find('.log').html(' target element is visible on screen '); } // log info } else { $(this).find('.log').html(' target element is not visible on screen '); // log info } } }); } $(window).scroll(function () { // bind window scroll event CheckIt(); }); Its is rendering even those images that are below view port . Any help why its happening would be appreciated The JsFiddle Thanks & Regards
score: 2
has comment: http://stackoverflow.com/comment/62352077
answer count: 0
downvote count: 0

http://stackoverflow.com/q/25983015
answer count: 3
has comment: http://stackoverflow.com/comment/40687127
has answer: http://stackoverflow.com/a/25983061
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25983056
has title: string.toUpperCase difficulties
has body: I'm making slow progress with my self education and I've run into a problem. I'm attempting to get text input from the user. I then want that input to be check against an uppercase version of itself. I'm running the code through labs.codecademy.com(if that is relevant). Code: function rollerInput() { var input = prompt("Do you want to reroll? You have " + rerolls + " rerolls left. Y/N?"); input = input.toUpperCase; if(input === null) { console.log("Please enter Y or N"); rollerInput(); } else if(input === "") { console.log("Please enter Y or N"); rollerInput(); } else if(input === "Y" &amp;&amp; rerolls !== 1) { rerolls = rerolls -1; reRoller(); } else if(input === "Y" &amp;&amp; rerolls === 1) { console.log("You have no rerolls left."); } } The issue lies with the ifs that check for Y or N. Neither Y nor y produce any reaction. I'm sure I'm missing something simple, but I can't fix it to save my life.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25983056
possible better answer: http://stackoverflow.com/a/25983055
has comment: http://stackoverflow.com/comment/40688825
score: 0
has answer: http://stackoverflow.com/a/25983055

http://stackoverflow.com/comment/40646936
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25950866
has text: @jww simply adding an answer is useless unless the question is updated accordingly so that somebody else finds it. Currently the question isn't even tagged with the plugin having the bug...

http://stackoverflow.com/comment/40513411
score: 0
has text: You should add some more context ,like how and where `animateBullet() ,generateBullet() and removeBullet()` are being called ?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25886389

http://stackoverflow.com/a/26029785
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/51939551
answers question: http://stackoverflow.com/q/26029667
has body: Found a solution by hacking the jquery draggable widget: $('#myDraggable').click(function(event){ var widget = $('#myDraggable').data('ui-draggable'); widget._mouseStart(event); widget._mouseDrag(event); widget._mouseStop(event); });
accepted answer of: http://stackoverflow.com/q/26029667

http://stackoverflow.com/comment/40576282
has text: Ok, I don't know how we were supposed to guess that when you never told us about `arrayfirstname`, `arraylastname`, and `arrayage`. Please strive to include all relevant information in the questions you ask.
type: Comment
comment on: http://stackoverflow.com/q/25920518
score: 0
type: QuestionComment

http://stackoverflow.com/a/25934884
accepted answer of: http://stackoverflow.com/q/25934416
score: 0
answers question: http://stackoverflow.com/q/25934416
has comment: http://stackoverflow.com/comment/40602155
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40601448
has body: If I have understood correctly, I guess this is what you require: jsFiddle. The CSS and the HTML code remains the same and this is the jQuery code which I've used: $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll &gt; 500) { $("#links li:first-child").addClass("current"); } if (scroll &gt; 750) { $("#links li:first-child").removeClass("current"); $("#links li:nth-child(2)").addClass("current"); } var scrollBottom = $(window).scrollTop() + $(window).height(); if (scroll &lt; 500) { $("#links li:first-child").removeClass("current"); } if (scroll &lt; 750) { $("#links li:nth-child(2)").removeClass("current"); } }); Basically what happens is that when you scroll down to 500px, the li:first-child is automatically assigned the current class. You can modify the jQuery to suit your needs by adding more if queries as per your needs. You can target different &lt;li&gt;'s in your list using different child-selectors like li:first-child, li:nth-child(2) etc.
has comment: http://stackoverflow.com/comment/40601015
has comment: http://stackoverflow.com/comment/40601716

http://stackoverflow.com/q/26022029
score: 26
has comment: http://stackoverflow.com/comment/40905845
has comment: http://stackoverflow.com/comment/40835782
has answer: http://stackoverflow.com/a/36584060
upvote count: 26
tagged with: openlayers-3
has answer: http://stackoverflow.com/a/27494894
possible better answer: http://stackoverflow.com/a/35160586
type: Question
has answer: http://stackoverflow.com/a/35160586
has body: I managed to add interactivity to a feature layer added from a remote GeoJSON resource. When I click on a feature I get its ID, fire an AJAX request and display some relevant info about the feature, on the page outside of the map area. I used a Select interaction. I would like to make it even clearer to the user that he can click on the features on the map. Is there any way I can change the mouse cursor to "cursor" of "hand" when the mouse hovers a feature contained in a ol.layer.Vector ? I couldn't find anything in the doc, on this site or by googling.
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40785625
has comment: http://stackoverflow.com/comment/47705335
has answer: http://stackoverflow.com/a/26061291
has answer: http://stackoverflow.com/a/27388993
has answer: http://stackoverflow.com/a/36133032
has answer: http://stackoverflow.com/a/34450989
has answer: http://stackoverflow.com/a/37486944
has answer: http://stackoverflow.com/a/41872087
favorite count: 0
accepted answer: http://stackoverflow.com/a/27388993
answer count: 12
has comment: http://stackoverflow.com/comment/40826706
has answer: http://stackoverflow.com/a/32883393
has answer: http://stackoverflow.com/a/56646758
has title: How to change the cursor on hover in openlayers 3?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53936537

http://stackoverflow.com/q/25999188
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26024675
type: Question
has comment: http://stackoverflow.com/comment/40751993
tagged with: animation
tagged with: css
answer count: 1
has comment: http://stackoverflow.com/comment/40716205
score: 0
has comment: http://stackoverflow.com/comment/40718389
has answer: http://stackoverflow.com/a/26024675
has title: 'Erase' Animation for Raphael JS Path
tagged with: javascript
has body: I've created a line animation with RaphaelJS (see jsfiddle here - http://jsfiddle.net/7n040zdu/). I'm attempting to create a animation that occurs after this one takes place that is basically an erasing of the initial animation. That is, the line animated out the same way that it is animated in - along the same path, the same duration, the same direction. I have tried just animating another path on top, but that solution is not preferable. If the initial path overlaps itself, then erasing with another path would reveal that the animation is not 'erasing' but rather being overlapped. I am having trouble finding something in the Raphael documentation that would achieve anything similar to this. Relevant code below: HTML &lt;body&gt; &lt;div class='drawings' id="draw0"&gt;&lt;/div&gt; &lt;/body&gt; CSS body { background-color: black; } JS var animateLine = function(canvas, colorNumber, strokeWidth, pathString) { var line = canvas.path(pathString).attr({ stroke: colorNumber }); var length = line.getTotalLength(); $('path[fill*="none"]').animate({ 'to' : 1 }, { duration: 1000, step: function (pos, fx) { var offset = length * fx.pos; var subpath = line.getSubpath(0, offset); canvas.clear(); canvas.path(subpath).attr({ stroke: colorNumber, "stroke-dasharray" : "", "stroke-width" : strokeWidth }); } }); } var canvas = new Raphael('draw0', 50,50); var drawPath1 = 'M0.767,0.915 M48.538,20.228L0.767,0.915l3.896,39.312L48.538,20.228L37.663'; animateLine(canvas, '#FFF', '1.5', drawPath1);
tagged with: raphael
has comment: http://stackoverflow.com/comment/40722202
type: AnsweredQuestion

http://stackoverflow.com/comment/40540913
type: QuestionComment
comment on: http://stackoverflow.com/q/25880057
has text: The testing environment in Ember is much different than the normal environment. For the most part, you have to explicitly set up everything involved in a test. I don't use Ember-Data, so I can't tell you how the store is bootstrapped during testing. My guess is that it isn't created at all since you shouldn't be testing the store.
score: 0
type: Comment

http://stackoverflow.com/comment/40531030
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25896458
has text: Thanks! Such a rookie mistake. :/ Works fine now
type: AnswerComment

http://stackoverflow.com/a/25882700
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25882649
has body: Live demo fname is an object, and you need to access its value Therefore, replace: alert("The Field is Valid and Value is "+ fname); by alert("The Field is Valid and Value is "+ fname.value);
answers question: http://stackoverflow.com/q/25882649

http://stackoverflow.com/q/25922223
has answer: http://stackoverflow.com/a/25924133
has body: I am trying to write an isolated directive that will run regex to validate certain input fields. I want the directive to know what regex to match up on and use based on an attribute on the input. a sample input would look like this. &lt;input required tabindex="5" regex-validation regex="validationRegex.zipRegex" ng-model="payment.zip" type="text" /&gt; below is a sample from the directive where it sets up a controller to match on then the directive itself. scope.regex.test logs undefined. module.controller('Controller', function($scope) { $scope.validationRegex = { americanExpressRegex: new RegExp(/^(?!3[47]).*$/), cvvRegex: new RegExp(/^[0-9]{3,4}$/), currencyRegex: new RegExp(/^[$]?\d{0,18}\.?\d{0,2}$/), cityRegex: new RegExp(/^[a-zA-Z]+(?:[\s-][a-zA-Z]+)*$/), zipRegex: new RegExp(/^[0-9]{5}(?:-[0-9]{4})?$/), phoneRegex: new RegExp(/^(\d(\s|\.|\-)?)?\(?\d{3}\)?(\s|\.|\-)?\d{3}(\s|\.|\-)?\d{4}$/), /* jshint ignore:start */ emailRegex: new RegExp("^[A-Za-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$"), /* jshint ignore:end */ numberRegex: new RegExp(/^\d+$/), addressRegex: new RegExp(/^[A-Za-z0-9 \-_\.,]{0,55}$/), bankAccountRegex: new RegExp(/^[0-9]{1,17}$/), routingNumberRegex: new RegExp(/^((0[0-9])|(1[0-2])|(2[1-9])|(3[0-2])|(6[1-9])|(7[0-2])|80)([0-9]{7})$/) }; }) .directive('regexValidation', [function () { return { scope: { regex: "=" }, link: function (scope, element) { element.bind('change', function () { console.log(scope.regex); //grab the element we are working with into a jquery element var ele = $(element); //grab the element value for multiple future use var value = ele.val(); //if we have a value check with regex if (value &amp;&amp; !**scope.regex.test**(value)) { ele.parent().addClass("error"); } //this will set the element back to how it was and check to see if all validation is //complete else { ele.parent().removeClass("error"); } …
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/41023715
has title: AngularJS directive scope property matching
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/41061961
linked to: http://stackoverflow.com/q/14994391
has answer: http://stackoverflow.com/a/25922396
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40579298
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25778149
has comment: http://stackoverflow.com/comment/40984407

http://stackoverflow.com/comment/40712447
type: QuestionComment
has text: You're expected to have done *some* research before posting questions here. It's impossible for you to have not discovered the answer if you'd made *any* attempt to do so. https://www.google.ca/search?q=javascript+array+foreach&oq=javascript+array+foreach&aqs=chrome..69i57j69i60.6828j0j7&sourceid=chrome&es_sm=91&ie=UTF-8
score: 1
comment on: http://stackoverflow.com/q/25997290
type: Comment

http://stackoverflow.com/q/25911632
has answer: http://stackoverflow.com/a/25911753
score: 0
has body: If I have a JQuery object which contains elements already being in the DOM, the remove function will properly remove them from it. However, I would like to remove specific elements which are not yet added to the DOM, only existing in a JQuery object, like the following: var $div = $("&lt;div&gt;&lt;span class='sample'&gt;&lt;/span&gt;&lt;/div&gt;"); $div.remove(".sample"); console.log($div.html()); // prints out the original HTML, inner span is not removed
has answer: http://stackoverflow.com/a/25911695
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has title: How to remove specific elements from a JQuery object which is not yet added to the DOM?
accepted answer: http://stackoverflow.com/a/25911663
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25911695
has answer: http://stackoverflow.com/a/25911663
type: Question
has comment: http://stackoverflow.com/comment/40558419
tagged with: javascript
has answer: http://stackoverflow.com/a/25911715

http://stackoverflow.com/a/25924262
has comment: http://stackoverflow.com/comment/40583009
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40582755
type: Answer
answers question: http://stackoverflow.com/q/25924220
has body: Change var variable in the assignment to this.variable: function caller() { this.variable=123; calledfunction(this); } function calledfunction(caller) { console.log(caller.variable); } caller(); In this case caller is not really generating a new instance/scope so this is actually global which is bad. It would be better to create a new empty object and use that to hold data instead of using this. function caller() { var data = {}; data.variable=123; calledfunction(data); } function calledfunction(values) { console.log(values.variable); } caller(); Alternatively you can use a closure in this case by putting calledfunction inside caller: function caller() { var variable=123; calledfunction(); function calledfunction() { console.log(variable); } } caller();
accepted answer of: http://stackoverflow.com/q/25924220
upvote count: 1
downvote count: 1

cordova
tags question: http://stackoverflow.com/q/25888554
tags question: http://stackoverflow.com/q/25967691
tags question: http://stackoverflow.com/q/25874590
tags question: http://stackoverflow.com/q/25987202
tags question: http://stackoverflow.com/q/25898784
tags question: http://stackoverflow.com/q/26005314
tags question: http://stackoverflow.com/q/25986718
tags question: http://stackoverflow.com/q/25937203
tags question: http://stackoverflow.com/q/26011020
tags question: http://stackoverflow.com/q/25961817
tags question: http://stackoverflow.com/q/25958509
tags question: http://stackoverflow.com/q/26012546
tags question: http://stackoverflow.com/q/26019789
tags question: http://stackoverflow.com/q/26027687
tags question: http://stackoverflow.com/q/25938016
tags question: http://stackoverflow.com/q/25911631
tags question: http://stackoverflow.com/q/25879759
tags question: http://stackoverflow.com/q/25992785
tags question: http://stackoverflow.com/q/25892634
tags question: http://stackoverflow.com/q/26011343
tags question: http://stackoverflow.com/q/26005343
tags question: http://stackoverflow.com/q/25966492
tags question: http://stackoverflow.com/q/25911025
tags question: http://stackoverflow.com/q/25947429
tags question: http://stackoverflow.com/q/25967191
tags question: http://stackoverflow.com/q/25889427
tags question: http://stackoverflow.com/q/25903103
tags question: http://stackoverflow.com/q/25981060
tags question: http://stackoverflow.com/q/26019435
tags question: http://stackoverflow.com/q/26008535
tag name: cordova
tags question: http://stackoverflow.com/q/25962395
tags question: http://stackoverflow.com/q/25897361
tags question: http://stackoverflow.com/q/25908492
tags question: http://stackoverflow.com/q/25986336
tags question: http://stackoverflow.com/q/25945535
tags question: http://stackoverflow.com/q/26033638
tags question: http://stackoverflow.com/q/25933740
tags question: http://stackoverflow.com/q/25883586
tags question: http://stackoverflow.com/q/25894940
tags question: http://stackoverflow.com/q/25895705
tags question: http://stackoverflow.com/q/25972167
tags question: http://stackoverflow.com/q/26026384
tags question: http://stackoverflow.com/q/25897536
tags question: http://stackoverflow.com/q/25886187
tags question: http://stackoverflow.com/q/25970782
tags question: http://stackoverflow.com/q/25914071
tags question: http://stackoverflow.com/q/25910539
tags question: http://stackoverflow.com/q/25998459
tags question: http://stackoverflow.com/q/26027623
tags question: http://stackoverflow.com/q/25910986
tags question: http://stackoverflow.com/q/25968065
tags question: http://stackoverflow.com/q/26013657
tags question: http://stackoverflow.com/q/25991150
tags question: http://stackoverflow.com/q/26010588
type: Tag
tags question: http://stackoverflow.com/q/25876831
tags question: http://stackoverflow.com/q/25968816
tags question: http://stackoverflow.com/q/26017848
tags question: http://stackoverflow.com/q/25911697
tags question: http://stackoverflow.com/q/25909575
tags question: http://stackoverflow.com/q/25910440
tags question: http://stackoverflow.com/q/25901944

http://stackoverflow.com/q/25900154
tagged with: webgl
has comment: http://stackoverflow.com/comment/40541460
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25904125
type: Question
has title: WebGL draw rect & image to one shader
accepted answer: http://stackoverflow.com/a/25904125
has body: Just trying to do some basic webgl where i have two "game objects". A simple sprite, and a rect. Basically what i want to do is draw the sprite image, and then draw a rectangle with a specified color. Both objects have a pos vector, and a width an height. The sprite has an image object, and the rect has a colour object with rgb values of 0 to 1. Sorry for all the code, but here's my draw method: draw: function () { this.resize(); var delta = this.getDeltaTime(); gl.viewport(0, 0, gl.canvas.clientWidth, gl.canvas.clientHeight); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); var shaderProgram = this.shader.shaderProgram; var matrixLocation = gl.getUniformLocation(shaderProgram, "uMatrix"); for (var i = 0; i &lt; this.objects.length; i++) { var planePositionBuffer = gl.createBuffer(); mat3.identity(this.mvMatrix); gl.bindBuffer(gl.ARRAY_BUFFER, planePositionBuffer); var object = this.objects[i]; var x1 = object.pos.x; var y1 = object.pos.y; var x2 = object.pos.x + object.width; var y2 = object.pos.y + object.height; var vertices = [ x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2 ]; gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW); gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, 2, gl.FLOAT, false, 0, 0); var textureBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, textureBuffer); var textureCoords; if (object.image) { var dw = (object.width / object.image.image.width); var dh = 1.0 - (object.height / object.image.image.height); textureCoords = [ 0.0, 1.0, dw, 1.0, 0.0, dh, 0.0, dh, dw, 1.0, dw, dh ]; gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, this.objects[i].image); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoords), gl.STATIC_DRAW); gl.vertexAttribPointer(shaderProgram.textureCoordAttribute, 2, gl.FLOAT, false, 0, 0); } mat3.multiply(this.mvMatrix, this.mvMatrix, [ 2 / gl.canvas.clientWidth, 0, 0, 0, -2 / gl.canvas.clientHeight, 0, -1, 1, 1 ]); gl.uniformMatrix3fv(matrixLocation, fals…
possible better answer: http://stackoverflow.com/a/25902032
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25902032
tagged with: javascript

http://stackoverflow.com/q/25921712
downvote count: 0
favorite count: 0
tagged with: tinymce
type: UnansweredQuestion
has body: I'am using tinymce, so the first time I call tinymce.init({ // initiation code, that makes my textarea a tinymce textarea }) After I add a new textarea and call again tinymce.init - it won't work. How can I convert a newly added textarea into a tinymce textarea?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25989563
score: 1
upvote count: 1
has title: Tinymce how to call init on a new added textarea?
type: Question
has answer: http://stackoverflow.com/a/25991676
tagged with: javascript
has answer: http://stackoverflow.com/a/29601739
answer count: 3

http://stackoverflow.com/comment/40588562
comment on: http://stackoverflow.com/q/25927957
has text: the jQuery library hasn't been referenced in the document / site
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40610580
comment on: http://stackoverflow.com/q/25940129
type: Comment
has text: And why wouldn't you just join them on the server to an array, instead of messing around with invalid JSON on the clientside ?
score: 1
type: QuestionComment

http://stackoverflow.com/a/25883779
has body: Looks like you're missing your body in between your thead and tfoot: Name Position Office Extn.
has comment: http://stackoverflow.com/comment/40508055
has comment: http://stackoverflow.com/comment/40508086
has comment: http://stackoverflow.com/comment/40508264
answers question: http://stackoverflow.com/q/25883732
score: 0
has comment: http://stackoverflow.com/comment/40508099
type: Answer
has comment: http://stackoverflow.com/comment/40508238

http://stackoverflow.com/comment/40505312
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25881579
has text: Not sure why I still didn't get the desired results... still return negative (-1) :( var text = "Hello, My name is steve, I love bill, happy new year!"; var keywords = ["steve, bill"]; var matching = text.search(new RegExp(keywords.join("|"),"i")); console.log(matching); // -1
type: AnswerComment

http://stackoverflow.com/comment/125256115
score: 0
type: Comment
has text: Wow! I never new that a carriage return can be used as a newline character. Thanks for the information though.
type: AnswerComment
comment on: http://stackoverflow.com/a/25921387

http://stackoverflow.com/comment/40694441
comment on: http://stackoverflow.com/q/25986983
has text: http://stackoverflow.com/questions/9047094/node-js-error-enoent
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40753788
score: 2
comment on: http://stackoverflow.com/a/26019821
type: AnswerComment
has text: Then it should have been a comment, not an answer.
type: Comment

http://stackoverflow.com/comment/40680519
has text: Most likely your code just need a small tweak, so why don't you post your code and we will see what's wrong with it
type: Comment
comment on: http://stackoverflow.com/q/25979109
score: 0
type: QuestionComment

http://stackoverflow.com/a/26012765
has body: I made a stupid mistake: There is only error with the names! There is a /product proxy context for the product list, and a /productImages for the images. I use regex to set these names. And the "^/product" will replace the /productImages too. (I put the foo only for testing the rewrite)
answers question: http://stackoverflow.com/q/25996668
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25996668
upvote count: 2
score: 2

http://stackoverflow.com/a/25900664
has body: You could extend underscore. _.isBlank = function (str) { return !!(str||'').match(/^\s*$/); } If you really don't want to create a function as taseenb mentioned use isEmpty with trim. Although this is ugly! _.isEmpty(' '.trim()); Although both these don't work with tabbed spaces
answers question: http://stackoverflow.com/q/25900248
score: 0
type: Answer

http://stackoverflow.com/comment/40786530
comment on: http://stackoverflow.com/a/26019390
score: 0
type: AnswerComment
has text: @Terry: It's very easy. Look at the demo: http://jsfiddle.net/OlegKi/97j49Lot/9/. If needed you can include such `searchoptions.dataInit` in *one grid* only.
type: Comment

http://stackoverflow.com/comment/40733585
type: QuestionComment
comment on: http://stackoverflow.com/q/26008653
has text: In the browser console do you see any error? If there is can you also include that
score: 0
type: Comment

http://stackoverflow.com/a/26017012
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26013412
has body: Here, populating values in dropdown is handled in the javascript itself. I did this to reduce the number of hits on server.But given the large number of records in the hashmaps, is it the correct way to populate data in the dropdowns? It'd bet this is a good idea for Countries: 75 and maybe States: 1,000 and maybe even Divisions: 3,000 but not for Villages: 30,000 Should I do an AJAX call each time a value is selected in a dropdown to populate the values in subsequent dropdown. I'd go for it. Each sublist is a static resource, there's nothing to compute and can be served pretty quickly. If you're lucky, the call takes something like 50-100 milliseconds, i.e., way below human perception. You could also run a AJAX call to get the whole list. This would make you page load fast and the number of requests low. Finally, only measurement can tell you, what works best in you environment. Note, that you don't have to make 4 requests, one for each entity type. You can e.g. put all 75 countries in your page itself and then load everything for the selected country.
upvote count: 1
answers question: http://stackoverflow.com/q/26013412
type: AcceptedAnswer

http://stackoverflow.com/comment/40734011
comment on: http://stackoverflow.com/q/26008837
has text: well i am using their sample which is i have defined in the question to get a country and this is how it works which is working fine but when i am putting this inside a method i am getting nothing
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40566532
has text: Thank you... but a little more resources will help...
comment on: http://stackoverflow.com/q/25915983
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26305812
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25954192
type: Answer
downvote count: 0
score: 1
has body: Its all caused by directwrite, font-family and font-size, an easy test : function checkForDirectwrite(){ var test = document.createElement('div'); test.innerHTML = 'abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ'; test.setAttribute('style','font-size:11px;visibility:hidden;position:absolute;height:auto;width:auto;white-space:nowrap;top:0px;left:-10000px;z-index:-10'); document.body.appendChild(test); var width = test.clientWidth+1; document.body.removeChild(test); return width; } In your page : Google Chrome (enabled Directwrite) --> 317 px Google Chrome (disabled Directwrite) --> 312 px Firefox --> 310 px IExplorer --> 310 px
accepted answer of: http://stackoverflow.com/q/25954192

http://stackoverflow.com/comment/40728341
comment on: http://stackoverflow.com/q/26005594
score: 5
type: Comment
has text: Inside a JavaScript file you don't need ` `.
type: QuestionComment

http://stackoverflow.com/a/26013926
answers question: http://stackoverflow.com/q/26013792
upvote count: 1
downvote count: 1
has body: Nice site. What's happening is your links with href='#' are breaking your scrolling actions. This is normal behavior for a browser to scroll to the top when you click a link with href='#'. You need to disable this default event, and could do so by adding e.preventDefault() to all of your .click() bindings, on your links. Something like this before you initialize all your .click() bindings, should do the trick. $("a[href='#']").each(function(){ $(this).click(function(e){e.preventDefault()}); });
score: 0
type: Answer

http://stackoverflow.com/comment/40609900
comment on: http://stackoverflow.com/q/25939589
has text: BTW: not sure what you are doing with `contador` but it doesn't seem necessary. A simple `clickcount[id]++` should suffice.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40764149
has text: unfortunately, removing `async:false` does not solve the problem. Thanks for your input though :-)
score: 0
comment on: http://stackoverflow.com/q/26023278
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25955269
has answer: http://stackoverflow.com/a/26078396
has comment: http://stackoverflow.com/comment/40639759
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40660166
tagged with: javascript
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26078396
favorite count: 0
has title: Google Chrome extensions possibly messing up my development testing
has comment: http://stackoverflow.com/comment/40639947
has comment: http://stackoverflow.com/comment/40704450
has comment: http://stackoverflow.com/comment/40639427
has comment: http://stackoverflow.com/comment/40645782
tagged with: css
score: -1
type: AnsweredQuestion
downvote count: 2
upvote count: 1
has body: I'm using several Chrome extension, some development, some games and other's like ABP, Trend Micro Toolbar and a few other's like REST, Postman, etc... So I'm trying and test using code from JqueryUI and the Accordion widget will not work. The funny thing is, there are no errors in the dev console. Just an error for an extensions::uncaught_exception_handler:9. This is in a JS file called: extensions:uncaught_exception_handler. Where did this come from? Here's my screen shot of the console: Now the basic Accordion code which I'm implementing directly from the website: http://jqueryui.com/accordion/ That's it... what I get is this: Now finally the code that "should" make the accordion work according to the link above: Section 1 Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. Section 2 Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. Section 3 Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. List item one List item two List item three Any help would be greatly appreciated. UPDATE: OK, I removed the CHROME Apps extension that all that error stuff above goes away but that still doesn't explain why the Accordion doesn't work and there are no errors. The H3 tag (title of the panel) allows me to click but nothing happens anywhere. I'm halfway there. Oh yeah, I'm using Bootstrap 3.0 in this mix. Here's…
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40687609
type: Question

http://stackoverflow.com/q/25984258
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/25984702
accepted answer: http://stackoverflow.com/a/25984702
has body: I'm following this example and trying to convert it to typescript, but I am unable to call the _initPathRoot function to initialize an SVG layer on the map. It works in plain javascript, but not in typescript. Here is the offending line of code: // initialize the SVG layer map._initPathRoot() http://bl.ocks.org/d3noob/9267535 Thanks in advance!
type: AnsweredQuestion
tagged with: typescript
tagged with: leaflet
score: 1
upvote count: 1
type: Question
has title: How do I initialize an SVG layer using leaflet in typescript?
tagged with: .net

http://stackoverflow.com/q/25883683
has answer: http://stackoverflow.com/a/25884411
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: colorbox
tagged with: css
accepted answer: http://stackoverflow.com/a/25884411
type: AnsweredQuestion
score: 0
has title: Colorbox's tabindex="-1" attribute prevents focus and type on form fields
has comment: http://stackoverflow.com/comment/40508037
type: Question
has body: I've a form which works fine appers above the colorbox modal window and i can show it easly with z-index. When user opens the modal window, form submit and etc are usable but fields can not be focusable for typing. I know logic is silly; modal overlaps with and modal form (modalception:) but i think this need to be fixed. I've prepared a sample: http://jsfiddle.net/4g3426j2/ html: Modal Img css: form { position: relative; z-index: 9999; } #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9998;} jQuery: $('.modal-img').colorbox({ width: '80%', height: '80%' }); And here is output html object from colorbox: ... I've detect when i remove tabindex="-1" attribute from colorbox and everything works fine, is there a healthy way to fix this without touching the plugins javascript or can we remove tabindex from colorbox, what is consequences:?
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/24598436

http://stackoverflow.com/q/25921796
has body: I have an object array and I want to create a new array with the ids only. Some records have id and others don't. So I have something like: var myMap = arr.map(function(e) { return e.id; }); console.log(myMap); // [undefined, 2, 3, 4] I'd like it to return just [2, 3, 4], if possible. This JSFiddle should explain a little better: http://jsfiddle.net/dmathisen/Lnmj0w8k/
answer count: 3
has title: jQuery .map() returning without undefined
possible better answer: http://stackoverflow.com/a/25921863
favorite count: 0
upvote count: 4
tagged with: dictionary
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25921951
downvote count: 0
has answer: http://stackoverflow.com/a/25921863
type: Question
has answer: http://stackoverflow.com/a/25921864
accepted answer: http://stackoverflow.com/a/25921864
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 4

http://stackoverflow.com/q/25946548
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/25946567
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Dropdown menu with keyboard input
downvote count: 0
has body: I am learning how to make websites. In order to make a demo website, I tried to develop a form. In the form, user can type say some text. Expected behavior is that a dropdown menu listing some suggestions should show up. I have a basic idea how this can be done. I can use html forms in conjunction with javascript and php (to get suggestions from database). But simple HTML forms just allow me to choose, not type. How to I mix keyboard input with dropdown menu? An example is google search's autocomplete. When I type "sho", I get suggestion in dropdown. The HTML form that I am using is: Select... Michael Florence
tagged with: php
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/25946567

http://stackoverflow.com/comment/40724965
type: QuestionComment
has text: add: }else{ return setTimeout(is_object_loaded.bind(this, objectname),100);}
score: 0
comment on: http://stackoverflow.com/q/26003867
type: Comment

http://stackoverflow.com/q/26010365
tagged with: javascript
duplicate of: http://stackoverflow.com/q/500431
has answer: http://stackoverflow.com/a/26010528
answer count: 1
downvote count: 0
tagged with: web
has comment: http://stackoverflow.com/comment/40736619
favorite count: 0
tagged with: concept
type: AnsweredQuestion
has title: Can someone explain the output of this fiddle?
accepted answer: http://stackoverflow.com/a/26010528
has body: I have this code. I have written the value of 'i' (in comments) that I expected as the correct output. But the outputs/alerts are different. Fiddle: http://jsfiddle.net/e2jbno4a/ Code: var i = 10; function outer() { alert(i); // 10 var i = 5; alert(i); // 5 function inner() { var i = 20; } inner(); alert(i); // 5 if (1) { var i = 30; } alert(i); // 5 setTimout(function () { alert(i); // 5 }, 100); } outer(); Can someone let me know the reason for the output? Or just the pointers where the specific concepts are explained?
score: 1
has comment: http://stackoverflow.com/comment/40736648
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/500431

http://stackoverflow.com/comment/40751850
comment on: http://stackoverflow.com/q/26018564
has text: didn't notice there was more code below there. - can you reproduce the issue inside a jsfiddle
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40570580
comment on: http://stackoverflow.com/q/25916910
score: 0
type: QuestionComment
type: Comment
has text: See my edit for clarification .

http://stackoverflow.com/comment/40720772
comment on: http://stackoverflow.com/q/26001614
score: 0
has text: AFAIK regexes can't do that. You could possibly make it work for numbers between 0 and 999, but not for an arbitrarily large number of digits. Either way, it's probably simpler to just convert to an int and check the value.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40604908
type: Comment
comment on: http://stackoverflow.com/q/25937140
score: 0
has text: can you share the css
type: QuestionComment

http://stackoverflow.com/comment/40522665
has text: Did you try `console.log`-ing the response? Usually your data is on the `data` property of the `response` object in the `$http` callback. Try changing `callback(response)` to `callback(response.data)`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25891995

http://stackoverflow.com/q/25902432
has answer: http://stackoverflow.com/a/25902542
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/25902791
score: 0
has answer: http://stackoverflow.com/a/25902969
accepted answer: http://stackoverflow.com/a/25902969
answer count: 3
upvote count: 1
downvote count: 1
tagged with: variables
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25902542
type: AnsweredQuestion
has title: When Assigning different value to a scope and just call one
type: Question
has body: I'm trying to write for the first time with AngularJS and I'm not a developer at all. I'm very beginning at programming. Here's my problem; I want in var ouinon assign to the $scope.colors, the value of the selected color input by the user in front-office. Of course putting $scope.colors.name doesn't work... (in console.log, it's "undefined") It may seem easy to you, but I don't see what I'm doing wrong. JS Part: function LookCtrl($scope, $http){ $scope.colors = [ {name:'blue', shade:'femme'}, {name:'red', shade:'femme'}, {name:'yellow', shade:'femme'}, {name:'blue', shade:'homme'}, {name:'red', shade:'homme'} ]; $scope.myColor = $scope.colors[2]; var ouinon = "http://api.shopstyle.fr/api/products?pid=uid7689-25635133-51&cat=" + $scope.colors.name + "&limit=60&fl=d0&sort=Popular"; $http.get(ouinon).success(function(data){ $scope.look = data; }); HTML Part: <section ng-controller="LookCtrl" ng-init="init()" class="panel panel-padding left" ng-class="{center:panel==1, right:panel<1}"> Selection:
tagged with: angular-ngmodel

http://stackoverflow.com/comment/40630510
has text: Just to add clarification, frozen mode is turned on specifically for moon.Input controls (via the focus handler of moon.InputDecorator) as we want focus to remain in the input, even if the pointer moves around and hovers another control, until the input is blurred via a 5-way move or pointer click elsewhere.
type: Comment
comment on: http://stackoverflow.com/a/25939252
score: 0
type: AnswerComment

http://stackoverflow.com/a/25908774
type: Answer
has comment: http://stackoverflow.com/comment/40555065
has body: Why not just use javascript (in head) to disable the buttons until page load? &lt;script language="text/javascript"&gt; window.addEventListener("plus", function() { document.getElementById('plus').disabled = false; }, false); window.addEventListener("minus", function() { document.getElementById('minus').disabled = false; }, false); &lt;/script&gt; Then have the buttons disabled by default. &lt;input type="button" class="plus" value="+" disabled="disabled"&gt; &lt;input type="button" class="minus" value="-" disabled="disabled"&gt; The downside of this is any non-JS users will be unable to use the site. Then again, that's likely the case already.
has comment: http://stackoverflow.com/comment/40555730
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40555777
has comment: http://stackoverflow.com/comment/40555278
answers question: http://stackoverflow.com/q/25908621
upvote count: 3

http://stackoverflow.com/q/26026868
tagged with: javascript
has answer: http://stackoverflow.com/a/26027205
has comment: http://stackoverflow.com/comment/40767219
answer count: 3
has comment: http://stackoverflow.com/comment/40767160
has answer: http://stackoverflow.com/a/53539277
accepted answer: http://stackoverflow.com/a/53539277
favorite count: 0
downvote count: 2
has title: JavaScript: Swapping string variables without temporary variables
has comment: http://stackoverflow.com/comment/40767143
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/26027205
has body: I know it's possible in JavaScript to swap two integer values with the XOR option, thus eliminating the need of a temporary variable: a = 14; b = 27; a^=b; b^=a; a^=b; // a == 27 and b == 14 But is there a similar no-temp technique in JavaScript for swapping strings?
type: Question
linked to: http://stackoverflow.com/q/16201656
upvote count: 5
has answer: http://stackoverflow.com/a/62512553

http://stackoverflow.com/q/25937527
has body: I'm a little confused about this and I hope some can help explain this to me. Using jquery $ajax I run something like this (the values here are not relevant): $ajax = $.ajax({ type: type, url: url, data: data, dataType: dataType, success: callBack, cache: cache, error:function (xhr, ajaxOptions, thrownError) { dir(thrownError); dir(xhr); dir(ajaxOptions); } }); How can I run this every few seconds? Should I just wrap it in setInterval() or can I use $ajax.done and pass in the ajax call again recursively? I'm not necessarily asking what the best way is just an example of how I could do this.
downvote count: 1
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25937570
possible better answer: http://stackoverflow.com/a/25937642
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25937642
tagged with: ajax
score: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40605692
has title: Re-run an ajax call with $ajax object?
upvote count: 1
has answer: http://stackoverflow.com/a/25937570
type: AnsweredQuestion

http://stackoverflow.com/comment/40581442
type: AnswerComment
has text: I'm having a hard time understanding this - could you elaborate?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25924003

http://stackoverflow.com/q/25960895
has comment: http://stackoverflow.com/comment/40646139
has comment: http://stackoverflow.com/comment/40646188
has comment: http://stackoverflow.com/comment/40647849
upvote count: 0
has title: Saving float as it is using Javascript
score: -5
tagged with: math
has comment: http://stackoverflow.com/comment/40646177
type: Question
tagged with: decimal
has comment: http://stackoverflow.com/comment/40646337
downvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/25960929
tagged with: tofixed
has comment: http://stackoverflow.com/comment/40654659
has body: Is there anyway to save a float and preserving its decimal place at the same time ? e.g. 1.50 will be saved as 1.50 instead of 1.5. I've tried solution such as toFixed, but they are returning me a variable of typeof string.
answer count: 1
has comment: http://stackoverflow.com/comment/40646140
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25983385
accepted answer of: http://stackoverflow.com/q/25983344
score: 0
type: AcceptedAnswer
type: Answer
has body: function(data){ var newWindow = window.open('','','width=200,height=200'); newWindow.document.write(data); newWindow.print(); }
answers question: http://stackoverflow.com/q/25983344

http://stackoverflow.com/q/25923501
tagged with: yii
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25925593
tagged with: session-variables
tagged with: ajax
type: Question
tagged with: php
score: 0
has answer: http://stackoverflow.com/a/25925593
answer count: 1
has title: yii framework where method isn't saving properly
has body: I am using Yii framework and I am creating a register page for the user. In order for a user to create an account, they need to enter in a ticket code. A widow form pops up and they fill out the ticket code, it ajax validates it properly and stores it as a session variable. The popup window closes and allows the user to fill out the rest of the form and submit it. The form should then validate the information, create the user, reasign the ticket's user_ID to the new user_ID, and load the page /ticket/mytickets. what happens, the ticket is confirmed that it exists, saves it into the session, the user is created, the ticket reassign method gets called, the ticket is never reassigned, and the page reloads. When I echo out the page on the reload, it shows the correct information for the user_ID, and the ticket_ID. Any hints would help for debugging this would be helpful. Thank you //controler public function actionRegister() { $model=new User; $valid = false; //check to see if valid if(isset($_POST['User'])){ $valid = $model-&gt;checkValid(); } if($valid) { $model-&gt;attributes=$_POST['User']; $user_ID = $model-&gt;ID; if($model-&gt;save()){ //save ticket to user $reassigned = Ticket::model()-&gt;reassign_with_IDs($_SESSION['ticket_ID'],$user_ID); if($reassigned){ unset($_SESSION['ticket_ID']); //redirect to mytickets $this-&gt;redirect(array('/ticket/mytickets')); } } } $this-&gt;render('register',array( 'model'=&gt;$model, )); } //model public static function reassign_with_IDs($ticket_ID,$user_ID){ $ticket = Ticket::model()-&gt;findByPK($ticket_ID); $ticket-&gt;user_ID = $user_ID; if($ticket-&gt;save()){ return true; } else{ return false; } }

http://stackoverflow.com/comment/40607382
score: 0
has text: Also please show a sample of the rendered html
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25938290

http://stackoverflow.com/q/26028951
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2276463
tagged with: forms
has title: Form Event Order - Using Form Data on Frontend
type: Question
has answer: http://stackoverflow.com/a/26029098
accepted answer: http://stackoverflow.com/a/26029098
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: My problem is simple, yet annoying. Instead of sending form data to the server, I just want to access the entered data on the front end. I figured I could do that by using the parameters that show up after I submit the form. My jQuery submit event, however, is executing before the parameters change on the URL! My logic, then, doesn't use the correct data. How do I fix this? See below: listen: function() { $('form').submit(this.init.bind(this)) } I need the URL parameters to change first, then have this event execute! How do I fix it?

post
tags question: http://stackoverflow.com/q/25981686
tag name: post
tags question: http://stackoverflow.com/q/25975612
tags question: http://stackoverflow.com/q/25929720
tags question: http://stackoverflow.com/q/26011574
type: Tag
tags question: http://stackoverflow.com/q/25982900
tags question: http://stackoverflow.com/q/25921102
tags question: http://stackoverflow.com/q/25897664
tags question: http://stackoverflow.com/q/25881204

http://stackoverflow.com/comment/40909581
comment on: http://stackoverflow.com/a/26042378
type: AnswerComment
score: 0
has text: this is the error I am getting `Concurrency conflict: [Object has been modified since being read for update in this context] - ConcurrencyConflictException : Modified since read on update : Object Class : com.f4tech.slm.domain.PortfolioItem : ObjectID : 23365091021"length: 1`
type: Comment

http://stackoverflow.com/q/25908981
tagged with: javascript
has comment: http://stackoverflow.com/comment/40554231
accepted answer: http://stackoverflow.com/a/25909538
type: Question
has comment: http://stackoverflow.com/comment/40554389
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25909468
has answer: http://stackoverflow.com/a/25909468
has comment: http://stackoverflow.com/comment/40554050
has body: I want to update the value "customer.signature" but my code does not do, what I want him to do. JSON and HTML are without errors, that influence what I want. The problem is, my JS is not working. "data.signature" is updating fine. but "data.customer.signature" is not. Json (which I get by rest "Accounts"): { "signature": "newAccountSignatur", "signatureEnabled": true, "defaultMsisdn": "08282709909013", "httpForwardingAddress": "http://null.dev.to", "smtpForwardingAddress": "lazarus@null.dev.to", "customer": { "signature": "newCustomerSignatur", "id": 10339, "companyName": "Gerd Webapp Test v2.0.x", "diallingCodeId": 43, }, } Js: $scope.saveSignature = function () { if (AuthService.isAuth()) { Accounts.one().get().then( function (resultOk) { resultOk.data.customer.signature = $scope.newCustomerSig; resultOk.data.signature = $scope.newAccountSig; $log.d("resultOk: ", resultOk.data); resultOk.data.put().then( function (resultOk) { alert("Saved"); $log.d("Accountinfo ok: ", resultOk); $scope.user = resultOk.data; }, function (resultError) { $log.d("Accountinfo error: ", resultError); ErrorService.showApiError(resultError); } ); } ); } }; html: Persönliche Signatur Zweites Beispiel Information für mich: Aktueller Wert in account.signature = Aktueller Wert in account.customer.signature =
tagged with: angularjs
has title: Why can't I change the value of a Json
has answer: http://stackoverflow.com/a/25909538
has comment: http://stackoverflow.com/comment/40553678
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/25922516
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27763100
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/65813349
tagged with: css
score: 2
downvote count: 0
has body: I have the below html which is essentially 3 pages on 1 screen to allow for scrolling. Each of these 3 container divs have a height of 100%. It looks fine on desktop, but in mobile, the browser's address bar constantly hides itself when scrolling. This causes all the divs to change size since height with address bar is different than height without address bar. That makes things extremely jumpy and in general just a terrible experience. How do 1) set the div to be 100% of the view assuming the address bar is not there and 2) make sure the address bar showing doesn't change the height of my divs? I use 100% alot in my page... &lt;body&gt; &lt;div id="top"&gt; &lt;/div&gt; &lt;div id="second"&gt; &lt;/div&gt; &lt;div id="third"&gt; &lt;/div&gt; &lt;/body&gt; I found this link: Background image jumps when address bar hides iOS/Android/Mobile Chrome but it did not help me since $(window).height() changes when the address bar is there or not, and I also am not using a background image. The mobile I am testing on is a mobile chrome browser on android 4.3 galaxy nexus
has title: very jumpy page due to browser address bar constantly changing height of divs
type: Question
linked to: http://stackoverflow.com/q/24944925
tagged with: javascript
tagged with: jquery
upvote count: 2
linked to: http://stackoverflow.com/q/24479085

http://stackoverflow.com/a/26025499
downvote count: 0
answers question: http://stackoverflow.com/q/26025439
upvote count: 6
has body: If you want a non-jQuery approach, this will work from IE8 and above (and of course in any other modern browser): var html = document.querySelector(".quantity-element.quantity-digit").innerHTML;
type: Answer
score: 6

http://stackoverflow.com/q/26013684
has body: I am trying to open a pop up window, doing the basic thing to start with, but instead is showing me the dialog when the page loads, plus the button doesn't trigger anything. $(document).ready(function() { $( "#dialog" ).dialog({ autoOpen: false }); $( "#opener" ).click(function() { $( "#dialog" ).open(); }); }); Here are my elements: open the dialog I'm a dialog This are my imports: the jquery-ui-1.11.1.js contains the Core only and not Widget, Mouse and Position. What I am doing wrong or forgetting to import? Thanks,
upvote count: 1
type: Question
has title: JQuery open pop up dialog not working
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26013705
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: jquery-ui-dialog
accepted answer: http://stackoverflow.com/a/26013705
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26014285
has answer: http://stackoverflow.com/a/26014285
score: 1

http://stackoverflow.com/a/36133032
type: Answer
upvote count: 4
has body: Another way (combined from parts of above answers, but even simpler): map.on("pointermove", function (evt) { var hit = map.hasFeatureAtPixel(evt.pixel); map.getTargetElement().style.cursor = (hit ? 'pointer' : ''); });
downvote count: 0
answers question: http://stackoverflow.com/q/26022029
score: 4
has comment: http://stackoverflow.com/comment/102241632

http://stackoverflow.com/a/26009096
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/26009038
accepted answer of: http://stackoverflow.com/q/26009038
type: Answer
has body: This is JavaScript 1.7, available currently on Firefox, but not on most other browsers. var qns = () =&gt; site + status + "\ " is equivalent, but shorter than: var qns = function() { return site + status + "\n"; } (not sure if newline is valid or not). Arrow functions on MDN let status = true is same as var status = true aside from the scope: it will only be declared for the containing block. For example, if (true) { var x = 1; let y = 2; console.log(x); // =&gt; 1 console.log(y); // =&gt; 2 } console.log(x); // =&gt; 1 console.log(y); // =&gt; undefined By the way, the variable status does not need to be declared before your line; it is enough if it is declared before qns() is invoked later. let statement on MDN
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/26038371
score: 2
upvote count: 2
has body: try this $(function() { $('.animenu li').click(function(e) { $(this).find('> ul').addClass('show'); $(this).addClass('selected'); e.stopImmediatePropogation(); }); $(document).click(function(e) { if ($(e.target).closest('.animenu').length == 0) { $('.animenu .show').parents('li').removeClass('selected'); $('.animenu ul').removeClass('show'); } }) }); .animenu > ul:after { content: ""; display: table; clear: both; } body { -webkit-animation: bugfix infinite 1s; } @-webkit-keyframes bugfix { from { padding: 0; } to { padding: 0; } } .animenu { font: 13px Arial, Helvetica; } .animenu * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .animenu ul { margin: 0; padding: 0; list-style: none; } .animenu li { position: relative; } .animenu li > ul.show { opacity: 1; visibility: visible; margin: 0; } li { outline: none; } .animenu li.selected > a { color: white; background: #ff0000; } .animenu input[type=checkbox] { position: absolute; top: -9999px; left: -9999px; } .animenu label { display: none; cursor: pointer; user-select: none; } .animenu > ul { background: #f1f1f1; } .animenu > ul > li { float: left; } .animenu > ul > li > a { float: left; padding: 1em 3em; text-transform: uppercase; } .animenu > ul a { color: #333; text-decoration: none; } .animenu > ul ul { position: absolute; top: 100%; left: 0; z-index: 1; opacity: 0; visibility: hidden; margin: 2em 0 0 0; background-color: #f1f1f1; background-image: none; -webkit-transition-property: margin, opacity; -moz-transition-property: margin, opacity; -o-transition-property: margin, opacity; transition-property: margin, opacity; -webkit-transition-duration: .15s; -moz-transition-duration: .15s; -o-transition-duration: .15s; transition-duration: .15s; -webkit-transition-timing-function: ease-in-out; -moz-transition-timing-function: ease-in-out; -o-transition-timing-function: ease-in-out; transition-timing-function: ease-in-out; } .animenu > ul ul li { display: block; } .animenu > ul ul…
accepted answer of: http://stackoverflow.com/q/26025372
answers question: http://stackoverflow.com/q/26025372
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/26223654
upvote count: 11
answers question: http://stackoverflow.com/q/25945447
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25945447
has body: Prefix your command with sudo will fix your problem but it is just a quick workaround. Another workaround would be to set the permission of this directory to your user. For instance sudo chown $YOUR_USER -R /usr/lib/node_modules But the best way would be to follow the great advice on the following gist
type: AcceptedAnswer
type: Answer
score: 11

http://stackoverflow.com/comment/40612376
has text: I see error events on all of your sources (chrome 37.0.2062.120 on mac)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25940838

http://stackoverflow.com/comment/40737410
has text: What is `$scope` about?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26010477
type: Comment

http://stackoverflow.com/q/25911025
tagged with: javascript
has answer: http://stackoverflow.com/a/25911419
possible better answer: http://stackoverflow.com/a/25911123
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25911123
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40557143
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40557345
tagged with: android
accepted answer: http://stackoverflow.com/a/25911419
has title: Start new Activity when html button clicked in Cordova
has body: I am trying to build Android Application with Cordova and Java. I want to build intent that start a new Intent when button clicked in the HTML code. This is my HTML code: Demo Phonegap Hello Android test And this is my Java code: public class MyActivity extends DroidGap { /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); super.loadUrl("file:///android_asset/www/index.html"); } public void NewIntent() { Intent i = new Intent(this,HelpActivity.class); startActivity(i); } } How can I call the NewIntent() void from the html file without building plugin. Thanks for answers Haim. EDIT:I using the phonegap for the GUI of my application.I want to call to another activity when button is clicked in the cordova html file.
tagged with: cordova
upvote count: 2
tagged with: java
has comment: http://stackoverflow.com/comment/40557067
has comment: http://stackoverflow.com/comment/40557315

http://stackoverflow.com/a/25949340
has comment: http://stackoverflow.com/comment/40626461
has comment: http://stackoverflow.com/comment/40625789
accepted answer of: http://stackoverflow.com/q/25949167
answers question: http://stackoverflow.com/q/25949167
has comment: http://stackoverflow.com/comment/40625758
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40626506
has comment: http://stackoverflow.com/comment/40626574
type: Answer
has body: later versions of AngularJS: function HomeCtrl($scope, $sce) { $scope.object = { admin: { avatar : '&lt;img src="http://gravatar.com/avatar/9a52267d32ad2aaa4a8c2c45b83396e5?d=mm&amp;amp;s=&amp;amp;r=G" class=" user-1-avatar avatar- photo" width="" height="" alt="Avatar Image" /&gt;' }, fred: { avatar : '&lt;img src="http://gravatar.com/avatar/9a52267d32ad2aaa4a8c2c45b83396e5?d=mm&amp;amp;s=&amp;amp;r=G" class=" user-1-avatar avatar- photo" width="" height="" alt="Avatar Image" /&gt;' }}; $scope.avatar = $sce.trustAsHtml($scope.object.admin.avatar); } HTML: &lt;div ng-bind-html="avatar"&gt;&lt;/div&gt; Working Demo : http://jsbin.com/butuwu/1/edit Older version : HTML: &lt;div ng-bind-html-unsafe="avatar"&gt;&lt;/div&gt; JS: function HomeCtrl($scope) { var object = { admin: { avatar : '&lt;img src="http://gravatar.com/avatar/9a52267d32ad2aaa4a8c2c45b83396e5?d=mm&amp;amp;s=&amp;amp;r=G" class=" user-1-avatar avatar- photo" width="" height="" alt="Avatar Image" /&gt;' }}; $scope.avatar = object.admin.avatar; }
downvote count: 0
score: 1

http://stackoverflow.com/q/25879986
downvote count: 0
tagged with: javascript
tagged with: string
has answer: http://stackoverflow.com/a/25880046
favorite count: 0
has answer: http://stackoverflow.com/a/25880009
has body: In Objective-C I have NSString *string = @"mystring"; self.firstDHOpen.text = [NSString stringWithFormat:@"Closes in %@ min", string]; How would I go about doing this in javascript? Where I have a variable and I want to insert in in-between other strings, or the same for a number or other type of variable.
answer count: 3
accepted answer: http://stackoverflow.com/a/25880009
tagged with: objective-c
score: 2
upvote count: 2
possible better answer: http://stackoverflow.com/a/25880101
has answer: http://stackoverflow.com/a/25880101
type: AnsweredQuestion
has title: What is the equivalent of string with format in javascript
type: Question

http://stackoverflow.com/q/26017789
type: Question
has title: enabling and disabling a button using javascript and php
tagged with: javascript
has comment: http://stackoverflow.com/comment/40750027
has comment: http://stackoverflow.com/comment/40749995
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26017962
has comment: http://stackoverflow.com/comment/40750170
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/26017916
has body: hi i really dont know a lot about javascript so sorry for this amatuer question. im trying to make a quiz page using php with 2 sets of questions. i want to disable the 2nd button for the other quiz and only be enabled when the user passed the first one. this is what i wanted to happen: &lt;?php require 'config.php'; $name = "kevin"; $result =mysql_query("select score from members where Username = '$name' " ); ?&gt; &lt;input name="button1" type="button" value="1" /&gt; &lt;input name="button2" type="button" value="2" disabled="disabled" /&gt; &lt;script type="text/javascript"&gt; if&lt;?php $score is greater than 5 ?&gt;{ $('#button2').removeAttr('disabled'); } else { $('#button2').attr("disabled","disabled"); } }); &lt;/script&gt; any help will be much appreciated, thanks in advance.

http://stackoverflow.com/q/25884768
type: Question
has comment: http://stackoverflow.com/comment/40596221
score: 2
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/16631825
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: I am enjoying Chrome's feature to live edit Javascript files. I have read something about mapping JS resources to local files. Does this mean, it's possible to map the JS files, loaded from the server, to locally stored files and thus be able to live edit Javascript within the browser, save it to disk and hit for page reload, with Chrome loading the locally kept files? This would allow to skip build and deployment of the whole application, if only a small portion of JS is currently being edited. Can someone help with that? Thanks a lot!
tagged with: google-chrome
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/79276120
has title: Chrome DevTools: Javascript live editing, keep changes upon page reload?

http://stackoverflow.com/q/25987451
tagged with: smooth-scrolling
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26032958
favorite count: 0
tagged with: regex
has title: JavaScript Smooth Scroll Explained
score: 2
has body: I have seen the following code snippet on a number of pages. I understand that it is used for smooth scrolling according to different id anchor tags. However, I am still a little confused about what/how the regex replacement, this, and hash variables work. What exactly is this frequent code snippet doing? $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); });
upvote count: 3
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26032958
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/q/25928127
linked to: http://stackoverflow.com/q/9899372
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40589445
score: 0
tagged with: iframe
has answer: http://stackoverflow.com/a/25928761
has comment: http://stackoverflow.com/comment/40589812
type: Question
has title: removing an iframe from the dom
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25928761
tagged with: google-chrome-extension
answer count: 1
has body: I'm simply trying to remove an iframe from the DOM using a chrome extension I'm building. This code isn't removing the iframe. var frame = document.getElementById( "tracking" ); frame.parentNode.removeChild( frame ); My manifest file is set up correctly. I'm able to access other elements on the page like this: var bg = document.getElementById( "someId" ); bg.parentNode.removeChild( bg ); Why can't I remove the iframe?

http://stackoverflow.com/q/25961330
has answer: http://stackoverflow.com/a/25967131
type: Question
tagged with: datagram
tagged with: winjs
answer count: 1
tagged with: javascript
score: 0
has title: Windows RT App does not receive UDP Datagram packets. Ether in my nor in DatagramSample by Microsoft
has body: I have an app for Microsoft Surface to receive data from desktop application. It works fine if the app runs on my laptop with Windows 8.1 system. But when it's started on my Microsoft Surface it doesn not reveive any messages. I can reproduce this with the DatagramSocker for JS example by Microsoft (http://code.msdn.microsoft.com/windowsapps/DatagramSocket-sample-76a7d82b). The app receives message from it's own connection but not from my desktop PC. I also checked Firewall settings. I have no idea.
type: UnansweredQuestion
tagged with: windows-rt

http://stackoverflow.com/comment/40701591
type: Comment
type: QuestionComment
has text: exactly what you described works [here](http://jsfiddle.net/afgpz039/1/) (copied from tablesorder.com demos), check if you have correct paths when including jquery and tablesorter plugin
score: 1
comment on: http://stackoverflow.com/q/25990626

http://stackoverflow.com/a/25924959
score: 0
type: AcceptedAnswer
has body: In your projects.js file: $("#myList").sortable({ stop: function(event, ui){ $.ajax({ type: 'post', // this is your HTTP request type (typically POST if you want to write something) url: 'url_for_your_controller_action_to_receive_ajax_request', data: { 'data_key_you_want_to_pass_to_controller' : the_data_value }, success: function(msg) { // msg is the value of the response from your controller action } }); } }); I would read up on the Rails guides on AJAX for more info.
type: Answer
accepted answer of: http://stackoverflow.com/q/25921985
answers question: http://stackoverflow.com/q/25921985

http://stackoverflow.com/q/25940202
tagged with: jquery
linked to: http://stackoverflow.com/q/8232713
has comment: http://stackoverflow.com/comment/40611594
type: UnansweredQuestion
has body: Hii i need to fix table header but always th go to top of window not top of table I have test with position:relative but not work, i have add div with relative and sub div with absolute but not working 100% My code.js $('.fix').affix({ offset: { top: 100 } }); Css .fix.affix { position: fixed; top: 40px; left:0; right:0; width: 100%; } Html A B C A A A U have a idea plz ? Thanks
answer count: 0
has comment: http://stackoverflow.com/comment/40612224
has comment: http://stackoverflow.com/comment/40611918
has comment: http://stackoverflow.com/comment/40612169
type: Question
has comment: http://stackoverflow.com/comment/40610816
tagged with: javascript
has title: Affix with table header jQuery
score: 0

http://stackoverflow.com/q/25998325
type: Question
has comment: http://stackoverflow.com/comment/40714922
score: 3
tagged with: oop
has answer: http://stackoverflow.com/a/25998583
tagged with: setter
tagged with: javascript
has comment: http://stackoverflow.com/comment/40714478
has comment: http://stackoverflow.com/comment/40714804
has comment: http://stackoverflow.com/comment/40714485
has comment: http://stackoverflow.com/comment/40714790
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40714517
tagged with: defineproperty
favorite count: 0
has comment: http://stackoverflow.com/comment/40714939
has comment: http://stackoverflow.com/comment/40715021
has comment: http://stackoverflow.com/comment/40714562
has body: I need to make it so that every time a specific property on my object is changed - it will call a special method on the same object. Example: MyObject.prototype = Object.create({ specialMethod: function() { /* ... */ } }, { someValue: { set: function(value) { /* HOW DO I ASSIGN THE VALUE TO MyObject HERE?*/ /* I can't do: this.someValue=value, that would create endless recursion */ this.specialMethod(); } } }); How do I assign the value to MyObject within the property setter?
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/40715152
has comment: http://stackoverflow.com/comment/40715000
accepted answer: http://stackoverflow.com/a/25998583
has title: Object create define property setter
has comment: http://stackoverflow.com/comment/40715096
has comment: http://stackoverflow.com/comment/40714677

http://stackoverflow.com/q/25958509
favorite count: 0
has body: I am building a JS app using cordova. I want to open google maps application when user clicks on link. code - $window.location.href = 'comgooglemaps://maps.google.com/maps?saddr=My+Location&daddr=' + destinationAddress destination address is address of the place. Now the above code works fine on ios but google maps doesnt open on android. From documentation it looks like comgooglemaps is iOS specific protocol I have also tried geo urls mentioned in this Android - launch google map via web url as follows Click here for route maps It opens google map application but doesnt show the route. Is there anything that will work on both android and iOS
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40654917
type: Question
has title: Opening google maps app from Angular JS app
answer count: 1
downvote count: 0
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/26994904
has comment: http://stackoverflow.com/comment/42520315
tagged with: android
linked to: http://stackoverflow.com/q/4642481

http://stackoverflow.com/comment/40759854
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26022838
has text: You might be getting the 'undefined is not a function' error because the `querySelectorAll` function is being looked up in the `Array.prototype`. Because `querySelectorAll` is not found, `a.querySelectorAll` will return undefined. Finally, trying to invoke an undefined value will cause that error. Try this (for example): `var und = undefined;` `und();`

http://stackoverflow.com/comment/40756275
score: 0
has text: Any code will be appreciated. Showcase your code in fiddle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26021134

http://stackoverflow.com/a/25894233
has comment: http://stackoverflow.com/comment/40526912
answers question: http://stackoverflow.com/q/25894040
has body: try with this: HTML: &lt;input type="checkbox" id="1" class="main_checkbox_1" val="1" onclick="select_box(id);" name="main_vals[]"&gt;Box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" id="2" val="2" class="main_checkbox_2" onclick="select_box(id);" name="main_vals[]"&gt;Box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" id="3" val="3" class="main_checkbox_3" onclick="select_box(id);" name="main_vals[]"&gt;Box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 JS: select_box = function(id) { console.log(id); if($('.main_checkbox_'+id).is(":checked")) { $('.sub_checkbox_'+id).each(function() { this.checked = true; }); } else { $('.sub_checkbox_'+id).each(function() { this.checked = false; }); } } with id you pass the whole ID to the function, not just the number 1,2,3..so I changed the ID and added the class to the main checkbox, correcting the JS by consequence. you can see a working fiddle here.
score: 0
has comment: http://stackoverflow.com/comment/40526988
type: Answer
has comment: http://stackoverflow.com/comment/40526878

http://stackoverflow.com/comment/40689349
type: QuestionComment
has text: There are many questions on SO that are easy to find that all say that it's not possible to open a popup programmatically.
comment on: http://stackoverflow.com/q/25984133
score: 0
type: Comment

http://stackoverflow.com/a/25917532
has comment: http://stackoverflow.com/comment/40569397
upvote count: 2
type: Answer
has body: Your selector doesn't work because your element hasn't checkbox as tag. Use this._holder.find('[name=my_checkbox]').prop('checked', true); or this._holder.find('[type=checkbox]').prop('checked', true);
answers question: http://stackoverflow.com/q/25917497
score: 1
downvote count: 1

http://stackoverflow.com/comment/40529208
has text: `List<Car> cars= new ArrayList<Car>(); cars= result.getSelectedCars(); Response.setCars(cars);` I think you want to say like this , but it did not work
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25894373

http://stackoverflow.com/comment/40539187
has text: By interact, do you mean click?
comment on: http://stackoverflow.com/q/25900877
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41077669
type: Comment
type: QuestionComment
has text: Apple did the same to my bug, no idea what the status of 18042389 is. will repost the same bug until they ban me, then tweet about being banned - can't think of any other way at present
comment on: http://stackoverflow.com/q/26022261
score: 0

http://stackoverflow.com/comment/40903989
has text: Edited to include the relevant Coffeescript. Thanks for reading it; the script is pretty dense.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26004413
score: 0

http://stackoverflow.com/a/25990751
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25990542
has body: Insted of OnRender you can use below code : $(document).ready(function(){ var now=new Date(); $('#date').DatePicker({ flat: true, date: '2008-07-31', current: '2008-07-31', calendars: 1, startDate: now, starts: 1 }); });

http://stackoverflow.com/comment/40723795
comment on: http://stackoverflow.com/q/26003249
has text: It's parsing it as `<script ` for the opening tag. It's just seeing the second `<script` as an attribute of the ` ` tag.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26015717
has comment: http://stackoverflow.com/comment/40746081
has comment: http://stackoverflow.com/comment/40746098
tagged with: javascript
has comment: http://stackoverflow.com/comment/40746111
answer count: 3
upvote count: 1
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26015956
has comment: http://stackoverflow.com/comment/40746024
favorite count: 0
possible better answer: http://stackoverflow.com/a/26015805
has comment: http://stackoverflow.com/comment/40745988
has body: we have a code that makes some stuff: $(function(){ //websocket connection //ajax requests //other stuff }); if the code was loaded the browser has compiled it, so can the user change this code and reload the page with the altered code? because function that are inside this anonymous jquery function can't be executed in the browser console, thus they are not accessable, the question is: are there any posibilities to hack this type of code?
tagged with: http://stackoverflow.com/tag/html
has title: Can a javascript closure function be altered by a user?
accepted answer: http://stackoverflow.com/a/26015772
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40745964
has answer: http://stackoverflow.com/a/26015805
has answer: http://stackoverflow.com/a/26015772
type: Question

http://stackoverflow.com/comment/40714799
has text: I'm game to try it, but I'm not 100% sure how "src" is working here; Would 'a' or 'b' be replaced by actual URLs? Also, is only a single "$("#"+ link.data("shadow")).attr" needed at the very end? (Is that because "src" is the only thing that needs to change?)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25998366
type: Comment

http://stackoverflow.com/q/25936334
type: Question
has comment: http://stackoverflow.com/comment/40603553
has comment: http://stackoverflow.com/comment/40604119
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/25934817
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/25936508
has body: I'm trying to use this method to get a div to fadeIn when a user mouses over a text field that tells them what sort of information goes into the field. I've got the &lt;div&gt; to follow the cursor while in the text field if the user moves the mouse up or left, but when I move the mouse down or right the &lt;div&gt; disappears during the motion to reappear when the mouse stops. Here is a JSFiddle showing my relevant code and the odd behavior it's yeilding. $(document).ready(function() { $(document).bind("mousemove", function(e) { $(".hover").css({ "left" : e.pageX, "top" : e.pageY }); }); $(".num").hover(function() { $(".hover").stop().html("Enter a number").delay(500).fadeIn(150); }, function() { $(".hover").stop().hide(); }); }); .hover { display: none; position: absolute; float: left; font-family: Calibri, sans-serif; font-size: 0.7em; background-color: rgb(255,255,230); border: 1px solid black; -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.4); box-shadow: 0 0 2px rgba(0,0,0,0.4); padding: 1px 3px; z-index: 50; } input { margin: 30px; } } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"&gt;&lt;/script&gt; &lt;div class='hover'&gt;&lt;/div&gt; &lt;input type="text" class="num" size="2"&gt; I have tried applying the same .hover() JQuery method to other elements in my web page to see if it's a problem with applying it to a text field, but the down/right vanishing behavior persisted. In my full code, the hovering &lt;div&gt; is created dynamically when the user first mouse-overs an element which produces the effect, but I couldn't get that aspect to work is JSFiddle. Since this effect seems easily-produced by others I'd like to know not only how to achieve the correct behavior but also understand why my attempt came out so wonky.
favorite count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/25936518
has answer: http://stackoverflow.com/a/25936518
has title: Cursor-following - Disappears when mouse moves down or right
has answer: http://stackoverflow.com/a/25936508

http://stackoverflow.com/q/25935410
upvote count: 2
type: Question
has body: I am working on a countdown using moment.js. It would be nice if I could have conditional formatting. here is what I have for now var count_down = moment().hour(23).min(30); alert( count_down.format('H[h ]m[min ]s[s]') ); that displays: 0h 43min 20s I would like to know if there is a format expression that would do var format = 'H[h ]m[min ]s[s]'; if (count_down.hour() === 0) format = 'm[min ]s[s]'; alert( count_down.format(format) ); displaying: 43min 20s I have not seen anything like it in the doc though.
accepted answer: http://stackoverflow.com/a/25983833
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25983833
has title: Is there any conditional formatting in moment.js?
tagged with: momentjs
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25997778
has comment: http://stackoverflow.com/comment/40715097
type: Question
has body: I am trying to set a default option in a select menu from the local storage, I am using a GUID as the value. The GUID that gets stored is the same as the GUID that I try to populate the combo box with, however, I have tried three different methods of trying to populate the combo box and none have worked. Any suggestions to why this isn't working as expected? EDIT - Would this method have any effect on it? It's called to populate the combo box with the values: function populateDashboard(data) { var options = $("#cboDashboards"); $.each(data, function () { options.append($(" ").val(this.DashboardGuid).text(this.Name)); }); } I populated some test data - Select dashboard Select dashboard 1 Select dashboard 2 Select dashboard 3 @* Select dashboard *@ and I did : $("#cboDashboards").val('1'); // - Attempt #1 This worked, so I seem to be having a problem with the GUID value?
tagged with: javascript
upvote count: 1
linked to: http://stackoverflow.com/q/901115
answer count: 1
tagged with: jquery
has title: Can't set select option as default
favorite count: 0
has answer: http://stackoverflow.com/a/25998076
accepted answer: http://stackoverflow.com/a/25998076
has comment: http://stackoverflow.com/comment/40715205
tagged with: combobox
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: select

http://stackoverflow.com/a/25962006
has comment: http://stackoverflow.com/comment/40648587
has body: $(document).on('click', function(event) { var idx = event.target.id; //if clicked element is not searchText or searchbtn, but searchtext is visible if (idx !== 'searchText' &amp;&amp; idx !== 'searchBtn' &amp;&amp; $('#searchText').is(":visible")){ $('#searchText').animate({width: '0'}, 500, function() {$(this).hide();}); } }); There are several ways to solve this. Just a hint.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40649367
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25961713
upvote count: 1
answers question: http://stackoverflow.com/q/25961713

http://stackoverflow.com/a/25913483
accepted answer of: http://stackoverflow.com/q/25903015
upvote count: 1
answers question: http://stackoverflow.com/q/25903015
type: AcceptedAnswer
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40576097
score: 1
has body: These three lines: renderer.shadowCameraNear = 3; renderer.shadowCameraFar = camera.far; renderer.shadowCameraFov = 50; should be on your light not the renderer; so directionalLight.shadowCameraNear = 3; directionalLight.shadowCameraFar = camera.far; directionalLight.shadowCameraFov = 50; and since your light is directional you will need: directionalLight.shadowCameraLeft = -500; directionalLight.shadowCameraRight = 500; directionalLight.shadowCameraTop = 500; directionalLight.shadowCameraBottom = -500; and you might need to play around with these values.

http://stackoverflow.com/q/26030128
has comment: http://stackoverflow.com/comment/40772983
answer count: 3
has answer: http://stackoverflow.com/a/26030224
has comment: http://stackoverflow.com/comment/40772890
has comment: http://stackoverflow.com/comment/40772941
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26030168
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40772920
has title: Jquery keyup function not working
accepted answer: http://stackoverflow.com/a/26030224
score: 0
type: Question
has comment: http://stackoverflow.com/comment/40772908
possible better answer: http://stackoverflow.com/a/26030163
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26030163
has body: In the $(':text').keyup(function() { I tried changing the :text into :number doesn't work only works if I remove the &amp;&amp; $('#number').val() != "" &lt;script&gt; $(document).ready(function(event) { $(':text').keyup(function() { if($('#input').val() != "" &amp;&amp; $('#number').val() != "" ){ $('#submit').removeAttr('disabled'); } else { $('#submit').attr('disabled', true); } });}); &lt;/script&gt; HTML &lt;form&gt;&lt;input type=text id='input'&gt; &lt;input type=number id='number'&gt;&lt;br&gt; &lt;input type=button id='submit' value='submit'&gt; &lt;/form&gt; jsfiddle: http://jsfiddle.net/LaLL0v6a/

http://stackoverflow.com/q/25875638
has comment: http://stackoverflow.com/comment/40496412
tagged with: freeze
has body: Internet Explorer 11 seems to execute my ajax call successfully. It runs the code under the success condition all the way up to the last line in that block, updates the HTML DOM structure, but then freezes after that. The error I get in IE is: " is not responding due to a long-running script". My code works in Chrome, Firefox and Safari! Here's how I call function loadContentviaAjax when a user clicks a pagination link: $(document).on('click', '.pagination-top a', function () { //CODE loadContentviaAjax($(this).attr('href'), rawNewURL); console.log('20'); return false; }); Here's part of the codeblock in companysearch.js it concerns: function loadContentviaAjax(furl, rawNewURL) { var webserviceURL = rawNewURL; $.ajax({ type: "GET", url: webserviceURL, data: "", cache: false, contentType: "application/json; charset=utf-8", dataType: "json", error: function () { $("#loadstatus").html($("#whoops").attr('data-message')).addClass('box_error'); }, success: function (data) { console.log('0'); //MORE OF MY CODE console.log('18'); //&lt;-- this line is still logged } }); return false } I tried: - commenting out all code in the success block of my AJAX call - tried settings breakpoints in IE Developer Tools but I can't narrow it down to the line that causes this issue. The line console.log('20'); is also hit, so IE freezes after that, but apart from the loadContentviaAjax I can't narrow down what is causing the freeze....please help!
has comment: http://stackoverflow.com/comment/40494382
has answer: http://stackoverflow.com/a/25920732
accepted answer: http://stackoverflow.com/a/25920732
type: AnsweredQuestion
has title: Internet Explorer 11 executes ajax success condition but then freezes
tagged with: internet-explorer-11
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40494043
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40493432
has comment: http://stackoverflow.com/comment/40493898
has comment: http://stackoverflow.com/comment/40494294

http://stackoverflow.com/q/25943159
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25943550
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I am trying to drop my markers one after another instead of dropping all them at the same time. My drop function() does not seem to be working here. I do not know what is wrong. Please take a look at my code. &lt;script&gt; function initialize() { var myLatlng = new google.maps.LatLng(63.417622, 10.404316); var mapOptions = { zoom: 13, center: myLatlng }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var marker; var locations = []; locations.push ({name: "1", p: new google.maps.LatLng(63.417622, 10.404316)}); locations.push ({name: "2", p: new google.maps.LatLng(63.409868, 10.446512)}); locations.push ({name: "3", p: new google.maps.LatLng(63.429070, 10.390894)}); locations.push ({name: "4", p: new google.maps.LatLng(63.437208,10.452692)}); function addMarker(){ for (var i = 0; i &lt; locations.length; i++){ marker = new google.maps.Marker({position: locations[i].p, map: map, title: locations[i].name, icon: 'cabin_icon.png', animation: google.maps.Animation.DROP}); } } //This put my markers on the map all at once. //Function to drop them at one after another after a few milliseconds. function drop (){ for (var j = 0; j &lt; locations.length; j++) { setTimeout( function(){ addMarker(); }, j * 200); }; }; //But this function is not working. Markers are not even showing up after I have created this function. } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I have tried to edit the code in many different ways but could not get it right. I tried with Google tutorial on this too and have no luck with the code either. So I need your help.
type: Question
has answer: http://stackoverflow.com/a/25943550
tagged with: javascript
tagged with: google-maps
answer count: 1
has title: Google Maps marker DROP

http://stackoverflow.com/a/25967228
has comment: http://stackoverflow.com/comment/40658226
score: 2
downvote count: 0
type: Answer
has body: .load doesn't do what you think it does. Try .ready, like this: $( document ).ready(function() { // Handler for .ready() called. $('.sj-responsive-listing').show(); });
upvote count: 2
answers question: http://stackoverflow.com/q/25967154

http://stackoverflow.com/comment/40694177
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25966662
type: Comment
has text: use id on li and apply in this way: example<li id ="abc" #abc .dropdown-toggle { color: black; } so it will take only for those drop-down-toggle class which has id "abc" and remove the !important from style

http://stackoverflow.com/a/25886797
score: 0
has comment: http://stackoverflow.com/comment/40513438
type: Answer
has comment: http://stackoverflow.com/comment/40514049
answers question: http://stackoverflow.com/q/25886591
has body: I would go with decoding the entities first and then removing them with regexp: function decodeHtml(html) { var txt = document.createElement("textarea"); txt.innerHTML = html; return txt.value; } decodeHtml(" Hi "); " Hi " Then using a simpler regexp would do the job: /[<]\/?[^>]+[>]/g Does the job with Hi => test Example in JS: > var testString = " Hi " > testString.replace(/[<]\/?[^>]+[>]/g,""); < "Hi" check also: Strip HTML from Text JavaScript JavaScript: How to strip HTML tags from string?

http://stackoverflow.com/comment/40607297
comment on: http://stackoverflow.com/q/25938410
type: Comment
has text: There's nothing wrong with that code unless you have a thousand checkboxes and you only need the event bound to a few.
type: QuestionComment
score: 2

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/25931498
tag name: knockout-components

http://stackoverflow.com/comment/40705638
type: Comment
has text: Are you sure it's an array of DOM elements, not an array of jQuery objects?
comment on: http://stackoverflow.com/a/25992943
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40536430
type: Comment
has text: I like JQuery, but I wouldn't load it JUST for this.
comment on: http://stackoverflow.com/a/25899303
type: AnswerComment
score: 0

http://stackoverflow.com/a/26010805
type: Answer
answers question: http://stackoverflow.com/q/26010600
has body: Try this http://jsfiddle.net/1q97q8z6/1/ HTML Status Status2 ABCD JS $( "#but" ).click(function() { $("#orderByItem option[value='ABCD']").remove(); $("#orderByItem").get(0).selectedIndex = 1; var tempVal = $("#orderByItem").val(); alert(tempVal); });
score: 0

http://stackoverflow.com/a/26001604
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40720937
accepted answer of: http://stackoverflow.com/q/26001293
answers question: http://stackoverflow.com/q/26001293
has body: Is JQuery library included in the pages called by AJAX ? That could be the solution simply include on your AJAX pages' tag
has comment: http://stackoverflow.com/comment/40721136

http://stackoverflow.com/q/25912677
type: Question
has title: I need to make my Page load faster, way faster
tagged with: performance
tagged with: javascript
has comment: http://stackoverflow.com/comment/40560276
has comment: http://stackoverflow.com/comment/40560131
answer count: 2
tagged with: load
tagged with: jquery
score: -6
has answer: http://stackoverflow.com/a/25913079
favorite count: 0
has body: I am a very amateurish web designer. Very very.... I got this friend of mine that asked me to do a real estate page for him and well, I did it. Fact is, I used so many .js and css that the page is actually loading extremely slow, at least in the beginning. It looks as if there is nothing going on while it loads so I need to do at least one of these things: Full page Progress bar - Show the user the stuff is loading so he doesn't think the page won't load at all. Make loading way faster - I tried minifying, I tried compressing images, I tried scripts to load unnecssary js only when they are needed...still looks like crap and loads like crap. I know it's not well done...but I'm learning and trying. Please help because I got a deadline going on. I repeat. I know it is far from good, that's why I'm here. I appreciate any feedback and help. site is: http://www.apt-inlisbon.com Edit: Damn..I had forgot about the images size...can't believe it....thanks. I will try that as soon as I get home. Lesson learned. Thank you very much.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40560337
possible better answer: http://stackoverflow.com/a/25912872
has answer: http://stackoverflow.com/a/25912872
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25913079
upvote count: 1
downvote count: 7
has comment: http://stackoverflow.com/comment/40620860

http://stackoverflow.com/q/25948668
tagged with: javascript
has answer: http://stackoverflow.com/a/25949220
has title: Open all Link with specific class in the page
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25948727
tagged with: jquery
tagged with: console
has comment: http://stackoverflow.com/comment/40624738
has body: For example if i have code like this: javascript: var inputs = document.getElementsByClassName('SomeClass'); for(var i=0; i&lt;inputs.length;i++) { inputs[i].click(); } that can click on all inputs in page with "SomeClass" is it possible to do it for link with specific class and open them all in new tabs?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8928386
type: Question

http://stackoverflow.com/comment/40681872
comment on: http://stackoverflow.com/q/25980264
has text: [These search results](https://www.google.com/search?q=where+are+javascript+variables+stored&oq=where+are+javascript+&gs_l=serp.3.0.0l3j0i22i30l7.37509384.37512311.0.37513085.21.19.0.2.2.0.269.1745.11j5j1.17.0....0...1c.1.53.serp..2.19.1747.oBuIhY1Ed0I) should answer this question.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40538140
type: AnswerComment
comment on: http://stackoverflow.com/a/25899949
score: 0
has text: `attr`, among other methods, can take a function as the second argument and D3 passes in the datum and the index of the currently iterated element. The returned value is assigned to the attribute. See updated code in answer.
type: Comment

http://stackoverflow.com/comment/40500008
type: Comment
type: QuestionComment
has text: I think you will have to implement custom routing for that.
comment on: http://stackoverflow.com/q/25878890
score: 0

http://stackoverflow.com/comment/40732357
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26007873
has text: My way worked too,but thanks. The problem is with the Popup section.
type: AnswerComment

http://stackoverflow.com/q/25968205
score: -1
has body: New to Knockout JS, just wondering how to define viewmodel and bind multiple hard-coded inputs text thanks in advance UPDATE: Finally worked out the solution The reason I can't use answer that Rahul provided is the HTML inputs have to be pre-defined/hard-coded. I knew this is against the nature of knockout js, however, the purpose of this data-entry screen is to let patients enter their contact info, so rely on user add contact type on fly is not reliable. var AddressDetailModel = function (FName, LName) { var self = this; self.FName = ko.observable(typeof (FName) != "undefined" ? FName : ""); self.LName = ko.observable(typeof (LName) != "undefined" ? LName : ""); } var EnrolViewModel = function () { var self = this; self.AddressDetails = ko.observable({ "Mother/Carer": new AddressDetailModel(), "Contact 1": new AddressDetailModel() }); } var VM = new EnrolViewModel(); ko.applyBindings(VM); .JSON {width:95%; margin: 15px auto 15px auto} PERSONAL DETAILS First Name Last Name CONTACTS 1 First Name Last Name ViewModel JSON:
accepted answer: http://stackoverflow.com/a/25971221
downvote count: 1
type: AnsweredQuestion
tagged with: knockout.js
has title: Knockout js - two way bind multiple inputs (hard-coded HTML inputs text box) and get JSON array
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25971221
favorite count: 0

http://stackoverflow.com/a/34450989
has body: Simple way to get target element var target = map.getTarget(); target = typeof target === "string" ? document.getElementById(target) : target; target.style.cursor = features.length &gt; 0) ? 'pointer' : '';
answers question: http://stackoverflow.com/q/26022029
type: Answer
upvote count: 2
downvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/74743351

http://stackoverflow.com/q/25981538
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25981566
tagged with: css
possible better answer: http://stackoverflow.com/a/25981599
has body: I am using the code below to allow me to fadein a div when I begin to scroll, which is assign to all of my unordered list. Is there a way I can tell the script to not assign this function to a specific ul Example I want all UL to fade in but would like ul class"test" to not fade, but to just be static. tiles = $("ul li").fadeTo(0, 0); $(window).scroll(function(d,h) { tiles.each(function(i) { a = $(this).offset().top + $(this).height(); b = $(window).scrollTop() + $(window).height(); if (a &lt; b) $(this).fadeTo(500,1); }); });
has answer: http://stackoverflow.com/a/25981599
has title: Assign an animation to all unordered list except a specific ul
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25981566
type: Question
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/40610969
comment on: http://stackoverflow.com/q/25940358
type: QuestionComment
type: Comment
has text: Is there a specific thing on that line that you haven't been able to find documentation for? edit: I'm talking about JavaScript language/standard library documentation
score: 0

http://stackoverflow.com/comment/40749712
has text: Removing that I get another error "TypeError: this.element.prop is not a function this.options.disabled = !!this.element.prop( "disabled" );"
comment on: http://stackoverflow.com/a/26016764
score: 0
type: AnswerComment
type: Comment

function-parameter
type: Tag
tag name: function-parameter
tags question: http://stackoverflow.com/q/25929353

http://stackoverflow.com/comment/40726632
type: AnswerComment
comment on: http://stackoverflow.com/a/26004262
type: Comment
has text: The concole logs `Uncaught ReferenceError: MasterSlider is not defined ` so no JS will run. You must have some variable MasterSlider that is not setup right.
score: 0

http://stackoverflow.com/a/25920105
has comment: http://stackoverflow.com/comment/42963567
score: 0
answers question: http://stackoverflow.com/q/25916993
type: Answer
has body: It turns out the solution to my problem was much simpler than I had expected, and I don't even need javascript. (The existing code I'm working with raised my expectations.) I need only set the width and the iPad automatically takes care of the scaling: &lt;meta id="viewport" name="viewport" content="width=1040,user-scalable=no"&gt; BONUS: I tried this with Android and it doesn't work. In that case one needs to set the scale in javascript.

http://stackoverflow.com/a/25947128
answers question: http://stackoverflow.com/q/25946896
has body: Update: As passatgt mentioned in the comments for newer versions calculateHeight is replaced with autoHeight, here you can find an example: var swiper = new Swiper('.swiper-container', { autoHeight: true, //enable auto height spaceBetween: 20, pagination: { el: '.swiper-pagination', clickable: true, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); Add calculateHeight:true to swiper definition. var tabsSwiper = new Swiper('.swiper-container',{ speed:300, calculateHeight:true, onSlideChangeStart: function(){ $(".tabs li").removeClass('active') $(".tabs li").eq(tabsSwiper.activeIndex).addClass('active') } })
has comment: http://stackoverflow.com/comment/81138196
has comment: http://stackoverflow.com/comment/129024281
type: AcceptedAnswer
downvote count: 0
score: 50
type: Answer
upvote count: 50
accepted answer of: http://stackoverflow.com/q/25946896

http://stackoverflow.com/q/25988748
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40704533
has comment: http://stackoverflow.com/comment/40732531
answer count: 0
has body: now i'm creating comment reply task. but the problem when i click link reply, it show all textarea to every comment. How to show that textarea only based on selecting comment only? tpl file {if $entries.comment|default:''} {foreach from = $entries.comment name = data item = data key=k } <span class="glyphicon glyphicon-share-altreply javascript $(document).ready(function() { $(".a_reply").click(function() { if($(".reply_form").is(":visible")) { $(".reply_form").hide(); } else { $(".reply_form").show(); } return false; }); });
type: UnansweredQuestion
has title: how to show textarea only based on selecting?
tagged with: smarty
has comment: http://stackoverflow.com/comment/40730705
type: Question
tagged with: javascript

http://stackoverflow.com/q/25967248
has answer: http://stackoverflow.com/a/25967599
accepted answer: http://stackoverflow.com/a/25967599
has comment: http://stackoverflow.com/comment/40658497
tagged with: youtube
has comment: http://stackoverflow.com/comment/40658275
type: AnsweredQuestion
has body: I have a website where I was testing my code using the ui.educateglobal.org/youtube_embebd.html Here is the most relevant code snippet. &lt;param name="movie" value="feature=player_embedded"&gt; &lt;embed src="http://www.youtube.com/v/XGSy3_Czz8k&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1&amp;border=0&amp;enablejsapi=1&amp;playerapiid=youtube_player" height="445" width="800" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" name="youtube_player" id="youtube_player"/&gt; &lt;/param&gt; The video plays for me on IE but not on Chrome. I don't know why that is the case.
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40658371
tagged with: javascript
has title: embed youtube link not working on chrome but working on IE
has comment: http://stackoverflow.com/comment/40658564
score: 0
has comment: http://stackoverflow.com/comment/40658906
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40658787
has comment: http://stackoverflow.com/comment/40658872

http://stackoverflow.com/a/26001842
upvote count: 5
downvote count: 1
score: 4
has body: Validate the field is alphanumeric: if(preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $input)){ //Valid } else{ //invalid }
has comment: http://stackoverflow.com/comment/40721157
type: Answer
has comment: http://stackoverflow.com/comment/40721305
answers question: http://stackoverflow.com/q/26001829
has comment: http://stackoverflow.com/comment/40721138

http://stackoverflow.com/q/25991907
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40702946
has comment: http://stackoverflow.com/comment/40702871
linked to: http://stackoverflow.com/q/469059
accepted answer: http://stackoverflow.com/a/25992126
has answer: http://stackoverflow.com/a/25992594
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/58744558
has answer: http://stackoverflow.com/a/25992154
has answer: http://stackoverflow.com/a/25992078
has answer: http://stackoverflow.com/a/25992134
tagged with: javascript
answer count: 6
score: 0
possible better answer: http://stackoverflow.com/a/25992078
has body: I'm trying to use a custom &lt; input type="file" > button. This works in chrome and FF. How do I make it work in IE 10 and above? The problem in IE is that the browse box is not opening. html: &lt;button type="button" id="fileT"&gt;&lt;input type="file" id="file"&gt;&lt;/button&gt; css: #fileT{ overflow: hidden; position: relative; } #fileT input { position: absolute; opacity: 0.1 }
has answer: http://stackoverflow.com/a/25992126
has title: Custom not working in IE
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/15519223
has comment: http://stackoverflow.com/comment/40702968
has comment: http://stackoverflow.com/comment/40702896
linked to: http://stackoverflow.com/q/21842274

http://stackoverflow.com/comment/40708044
comment on: http://stackoverflow.com/a/25994845
has text: Make it useful depending on $index. For example, if you want like 101, 102, 103.. then you can pass getClick($index + 101)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25980452
downvote count: 1
has comment: http://stackoverflow.com/comment/40683686
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40682153
score: -1
type: Question
has title: Onchange event not working on dynamic table row
upvote count: 0
has comment: http://stackoverflow.com/comment/40682245
has answer: http://stackoverflow.com/a/25980558
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25980558
answer count: 1
has body: How do I output the counter variable so that it displays the row count for each row. This is on a dynamically created table row so the js I have posted is the dynamic code: counter = $('#myTable tr').length; var newRow = $(" "); var cols = ""; cols += ' '; cols += ' Display row counter here '; cols += ' '; cols += ' '; cols += ' '; cols += ' '; cols += ' '; cols += ' '; cols += ' #textconstants.customer# #textconstants.quality_control# '; cols += ' #textconstants.pallet# #textconstants.container# '; cols += ' '; cols += ' #textconstants.no_rework# #textconstants.failed_rework# #textconstants.rework_ok# '; cols += ' #textconstants.credit_note# #textconstants.replacement# #textconstants.no_action# '; cols += ' '; newRow.append(cols); counter++; $("table.order-list").append(newRow); $('#url_total_rows').val(parseInt($('#url_total_rows').val(), 10) + 1); }); $("#myTable tbody").on("change", ".myInputbox", function(){ var row = $(this).closest("tr"); var tb1 = row.find("input.quantity").val(); console.log(tb1); }); Any ideas would be appreciated, having a mind block on getting this to output.
has comment: http://stackoverflow.com/comment/40682143

youtube-javascript-api
type: Tag
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/25877584
tags question: http://stackoverflow.com/q/25921548

http://stackoverflow.com/a/26012320
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/26012224
answers question: http://stackoverflow.com/q/26012224
upvote count: 1
type: AcceptedAnswer
has body: Maybe the most simple solution is to use a RayCaster. Simply choose a random direction (basically horizontally or vertically), and draw a line following it from your point. Count how many times it cross a limit : inside if odd, outside if even. Ref : Wiki

http://stackoverflow.com/a/25907430
type: AcceptedAnswer
type: Answer
has body: The function success() dosn't exist however you have a service() function either you change the invocation success() -> service() or you change the function name from function success -> function service
accepted answer of: http://stackoverflow.com/q/25907224
answers question: http://stackoverflow.com/q/25907224
score: 0

http://stackoverflow.com/q/26011408
favorite count: 0
tagged with: ember.js
has answer: http://stackoverflow.com/a/26016181
tagged with: ember-cli
score: 2
downvote count: 0
type: UnansweredQuestion
tagged with: handlebars.js
type: Question
has title: Where to place templates for nested routes in Ember.js apps using pods?
upvote count: 2
has body: Where should the template files be placed for nested routes when using the pod structure in ember-cli? Here is what I have at the moment. Visiting /foo works Expected and actual result: app/foo/template.hbs gets rendered. Visiting /foo/bar does not work, I get "Error: Assertion Failed: The URL '/foo/aa' did not match any routes in your application" Expected result: app/foo/bar/template.hbs gets rendered. Actual result: "Error: Assertion Failed: The URL '/foo/bar' did not match any routes in your application" Router: Router.map(function() { this.resource('foo', function() { this.resource('foo.bar', function() { }); )); /* ... */ }); Folder Structure: /app/pods /foo controller.js route.js template.hbs /bar controller.js route.js template.hbs Should I be defining my routes differently or naming my files differently?
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40708252
has text: Hm, I noticed that you fiddle just works because the JS fails and the cloning does not affect. How do I get the `$rootScope`?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25993504

http://stackoverflow.com/q/25878850
score: 17
has comment: http://stackoverflow.com/comment/40499742
type: Question
has title: AngularJS - How to pass up to date $routeParams to resolve?
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25879006
accepted answer: http://stackoverflow.com/a/25879006
favorite count: 0
upvote count: 17
tagged with: angularjs
type: AnsweredQuestion
has body: How do you pass current $routeParams to resolve so they can be used to do a specific $http.get. Right now I've just tested $routeParams and passed back the param to be logged in my controller to see if it works, but it is a route behind each time. For example, on load it is undefined, and on subsequent routes the param is the previous routes param, so I click a new link and it shows the param from the previous link's route. Route Snippet .when('/something/:paramType', { templateUrl: '/app/views/something.html', controller: 'SomethingController', controllerAs: 'someCtrl', access: { authentication: true }, resolve: { SomeData: function( $routeParams ) { return $routeParams.paramType; } } }) Controller Snippet .controller('SomethingController', ['$scope', 'SomeData', function( $scope, SomeData) { console.log(SomeData); }]) How do you initialize the param on load, and have it sync correctly each time? The reason I want to do this is so I can perform an $http.get and pass the $routeParams to define the returned data.

http://stackoverflow.com/a/25882501
answers question: http://stackoverflow.com/q/25881971
accepted answer of: http://stackoverflow.com/q/25881971
score: 0
has body: I was able to test this on my local machine and it looks like you are using the same XMLHttpRequest for each call to xhrDocOpen and doing so in quick succession will cause the onreadystatechange function to be set to the last one set in the last call to xhrDocOpen before the first call finishes. So a.text will never get set. If you move the var xhr = new XMLHttpRequest(); into the xhrDocOpen function it should work.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40608456
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25937752
has text: @slebetman: Fixed. It just returns `undefined`, so it should just be called.
type: AnswerComment

http://stackoverflow.com/comment/40603022
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25933964
has text: @RobW Cannot reproduce on Win7 with 37.0.2062.120 m (64-bit)

http://stackoverflow.com/q/25975175
has comment: http://stackoverflow.com/comment/40672344
score: 1
type: Question
has body: I've been working with JQuery lately for the first time and encountered problem. I have lots of copies of the same anchor which opens a dialog, the problem is when i click on anyone of them, the dialog opens in as many copies as there are anchors. The code looks like this Script: $(document).ready(function(){ $('div#dialogbox').dialog({ autoOpen: false }); $('#opener').click(function(){ $('div#dialogbox').dialog('open); }); }); Dialog: Sample text Anchor: Click Me
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40673351
possible better answer: http://stackoverflow.com/a/25975266
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
has title: Lots of copies of the same button opening dialog
answer count: 2
upvote count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25975266
has answer: http://stackoverflow.com/a/25975269
accepted answer: http://stackoverflow.com/a/25975269
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40703954
score: 0
type: AnswerComment
type: Comment
has text: Just remove those links
comment on: http://stackoverflow.com/a/25991346

http://stackoverflow.com/a/25906355
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I think the problem is that asp.net has server side controls then get target id this way(and fix other issue also as shown below) : &lt;script type="text/javascript"&gt; $(function() { var sheight = $(window).height(); $("#&lt;%=paneldata.ClientID %&gt;").height((sheight-240) + "px"); }); &lt;/script&gt; OR(If you are using ClientID in Static Mode) then try this only : &lt;script type="text/javascript"&gt; $(function() { var sheight = $(window).height(); $("#paneldata").height((sheight-240) + "px"); // add 'px' with height as shown here }); &lt;/script&gt;
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25906315
has comment: http://stackoverflow.com/comment/40548859
has comment: http://stackoverflow.com/comment/40548786
has comment: http://stackoverflow.com/comment/40549159
answers question: http://stackoverflow.com/q/25906315

http://stackoverflow.com/a/26037345
has comment: http://stackoverflow.com/comment/40949959
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26032884
has comment: http://stackoverflow.com/comment/40992252
answers question: http://stackoverflow.com/q/26032884
type: Answer
has body: hello this is autoload function My text is loading, in case of image you have to tell browser to not cache image.
score: 0

http://stackoverflow.com/a/37566109
upvote count: 1
has comment: http://stackoverflow.com/comment/62668534
has comment: http://stackoverflow.com/comment/62673016
has comment: http://stackoverflow.com/comment/62672239
has comment: http://stackoverflow.com/comment/62672446
type: Answer
has comment: http://stackoverflow.com/comment/62672498
has comment: http://stackoverflow.com/comment/62671868
answers question: http://stackoverflow.com/q/25956441
has comment: http://stackoverflow.com/comment/62668755
has comment: http://stackoverflow.com/comment/62620921
has comment: http://stackoverflow.com/comment/62672330
has body: Now you can attach the extra payload in options.data = {} as key value pairs. self.addEventListener('notificationclick', function(event) { console.log(event); });
score: -1
has comment: http://stackoverflow.com/comment/62672891
downvote count: 2

http://stackoverflow.com/q/25959896
has answer: http://stackoverflow.com/a/25959913
accepted answer: http://stackoverflow.com/a/25959913
tagged with: removeclass
has answer: http://stackoverflow.com/a/25959955
favorite count: 0
answer count: 5
upvote count: 1
type: AnsweredQuestion
has title: Using multiple variables in addClass/removeClass
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/25959952
tagged with: addclass
downvote count: 0
has answer: http://stackoverflow.com/a/25959907
tagged with: javascript
tagged with: jquery
has body: I can use one variable in addClass/removeClass html: Hello and Goodbye css: p { margin: 8px; font-size: 16px; } .selected { color: red; } .highlights { background: yellow; } js: var css1="selected"; var css2="highlights"; $( "p:last" ).addClass(css1); I want use css1 and css2 variables in addClass method. I tried these: $( "p:last" ).addClass(css1 css2); $( "p:last" ).addClass("css1 css2"); They don't work. If I use this: var css3="selected highlights" $( "p:last" ).addClass(css3); it works But how can I use css1 and css2 variables in addClass method ? You can try on http://jsfiddle.net/hasyo1qm/ Thanks.
has answer: http://stackoverflow.com/a/25959993
has answer: http://stackoverflow.com/a/25959952

http://stackoverflow.com/q/25974058
has body: This is my code: function uploadFile(){ var file2 = document.getElementById('file1').files; for(var i = 0; i &lt; file2.length; i++) { var file = file2[i]; var formdata = new FormData(); // This is image formdata.append("file1", file[i]); var ajax = new XMLHttpRequest(); ajax.upload.addEventListener("progress", progressHandler, false); ajax.addEventListener("load", completeHandler, false); ajax.addEventListener("error", errorHandler, false); ajax.addEventListener("abort", abortHandler, false); ajax.open("POST", "file_upload_parser.php"); ajax.send(formdata); } } how to get image width and height from new FormData? i need this for crop image
answer count: 1
tagged with: javascript
tagged with: ajax
has title: How to get width and height with javascript?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25974114
linked to: http://stackoverflow.com/q/623172
type: Question
score: 0

http://stackoverflow.com/comment/40552439
type: Comment
type: QuestionComment
has text: Yes exactly what I wanted thanks
comment on: http://stackoverflow.com/q/25908098
score: 0

http://stackoverflow.com/comment/40625170
comment on: http://stackoverflow.com/q/25949097
has text: Could you please share some code?
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/40724734
type: Comment
comment on: http://stackoverflow.com/a/26003726
type: AnswerComment
score: 0
has text: @showdev yes that makes sense; I only use `.attr()` when I really know I need it (like getting unmolested "href" or "action" attribute values) so I forget the details :) In this case I think it was the removal of the "checked" attribute that caused the problem.

http://stackoverflow.com/a/26033928
upvote count: 1
has comment: http://stackoverflow.com/comment/40782341
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40779566
has body: Yes, you can use bracket notation for that: function Rabbit(type) { this.type = type; this.name = type+"Rabbit"; } var cage = { addAnimal: function(animal) { this[animal.name] = animal; } }; cage.addAnimal( new Rabbit('fat') ); console.log(cage)
has comment: http://stackoverflow.com/comment/40781415
has comment: http://stackoverflow.com/comment/40782663
accepted answer of: http://stackoverflow.com/q/26033735
answers question: http://stackoverflow.com/q/26033735
type: Answer

mongodb
tags question: http://stackoverflow.com/q/25891506
tags question: http://stackoverflow.com/q/25888128
tags question: http://stackoverflow.com/q/25888419
tags question: http://stackoverflow.com/q/25901740
tags question: http://stackoverflow.com/q/25908909
tags question: http://stackoverflow.com/q/25954115
tags question: http://stackoverflow.com/q/25960641
tags question: http://stackoverflow.com/q/25923834
tags question: http://stackoverflow.com/q/25962944
tag name: mongodb
tags question: http://stackoverflow.com/q/26023168
tags question: http://stackoverflow.com/q/25915742
tags question: http://stackoverflow.com/q/25990837
tags question: http://stackoverflow.com/q/25996483
tags question: http://stackoverflow.com/q/25948842
tags question: http://stackoverflow.com/q/26009718
tags question: http://stackoverflow.com/q/25906710
type: Tag
tags question: http://stackoverflow.com/q/26001413
tags question: http://stackoverflow.com/q/25989988
tags question: http://stackoverflow.com/q/25909927
tags question: http://stackoverflow.com/q/25901798
tags question: http://stackoverflow.com/q/25915553
tags question: http://stackoverflow.com/q/25938473
tags question: http://stackoverflow.com/q/25965535
tags question: http://stackoverflow.com/q/25940855
tags question: http://stackoverflow.com/q/25979429
tags question: http://stackoverflow.com/q/25880589
tags question: http://stackoverflow.com/q/25988108
tags question: http://stackoverflow.com/q/26026641
tags question: http://stackoverflow.com/q/26013739
tags question: http://stackoverflow.com/q/25985096
tags question: http://stackoverflow.com/q/25944207
tags question: http://stackoverflow.com/q/26011561
tags question: http://stackoverflow.com/q/26016164
tags question: http://stackoverflow.com/q/26012853
tags question: http://stackoverflow.com/q/26009544
tags question: http://stackoverflow.com/q/25985315
tags question: http://stackoverflow.com/q/25938560
tags question: http://stackoverflow.com/q/25880978
tags question: http://stackoverflow.com/q/25888324
tags question: http://stackoverflow.com/q/25922903

http://stackoverflow.com/q/26008363
type: Question
has body: Okay, I am using WordPress and JSON API to make WordPress as a backend of my application, and now I am dealing with getting dates from post and add class if the post is new or not, and I am wonder if this is a job of a filter or just extend the object to add a property of new, basically iterating through the array of posts and adding a property of isNew Can't get my logic right though. Lets say I am getting posts from a Post service like so $scope.posts = []; Post.getPosts().then(function(posts){ $scope.posts = posts; }); Now before I do this : $scope.posts = posts, I want Angular to extend the properties of each post, adding isNew var today = new Date(); var newMark = new Date(); newMark.setDate(newMark.getDate() - 5); Post.getPosts(5).then(function (re) { angular.forEach(re.posts, function(post, key){ var postDate = new Date(post.date); console.log(today - postDate &lt; newMark); // lol, I don't have quite a logic here. // console.log(postDate - today &lt; today - newMark); }); }); Lol, can't seem to think today.
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26008554
score: 0
answer count: 2
tagged with: php
has title: Determining new posts from old posts in Javascript AngularJS, filter or not
tagged with: wordpress
possible better answer: http://stackoverflow.com/a/26008534
has answer: http://stackoverflow.com/a/26008534
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26008554
tagged with: javascript
has comment: http://stackoverflow.com/comment/40733257

http://stackoverflow.com/a/25975314
upvote count: 2
has body: Remove (): setTimeout(sumfunc,1000); setTimeout()'s first argument takes a function definition, not an execution of one. As your executing sumfunc inside sumfunc, this will cause immediate infinite recursion, which will potentially cause a stack overflow, as you have described. Therefore replace your code with the following: function sumfunc(){ document.body.innerHTML = dosumthin(document.body.innerHTML,false); setTimeout(sumfunc,1000); }
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25975274
has comment: http://stackoverflow.com/comment/40672769
type: Answer
accepted answer of: http://stackoverflow.com/q/25975274
score: 2

http://stackoverflow.com/a/25926585
upvote count: 1
has body: It should be f instead of f1 var f = document.getElementById("myFile1"); As you're checking variable f in conditions. so change it accordingly And you should check file size using following var f = $("#myFile1")[0].files[0].size; $("#myFile1").change(function() { var f1 = document.getElementById("myFile1").value; // will get file input value var size = ($("#myFile1")[0].files[0].size); // get file size here if (size &lt; 1048576) { alert("file size is less than 1mb"); } else { alert("file size should not exceed more than 1mb"); $(this).val($.data(this, 'f')); return false; } }); Demo
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25926529
type: Answer

http://stackoverflow.com/comment/40688681
comment on: http://stackoverflow.com/q/25983603
score: 0
type: Comment
type: QuestionComment
has text: @Duke, all I'm saying is there is more than one approach (ajax vs. server-redirect) and your choice depends on your needs. Modern sites will most likely want to do ajax. Note also that all these answers are saying you **need** jQuery — jQuery's great but there _are_, in fact, other ways to do ajax... though I would indeed use jQuery myself.

http://stackoverflow.com/a/25997507
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40713187
has body: Copy inline: $('#child').get(0).style = $('#parent').get(0).style; But better if you find a CSS way as stated in the other answers. UPDATE: Get all styles: $('#child').get(0).style = window.getComputedStyle($('#parent').get(0), null);
answers question: http://stackoverflow.com/q/25997355

http://stackoverflow.com/comment/40571324
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25918426
has text: Yes you need to add [] since that is a php expects. jQuery does not know that you need [] for the name when it is an array.

http://stackoverflow.com/comment/40916571
has text: Thank you (in advance). From your own answer, it became clear that the list of input field identifiers in your question was significantly simplified from your actual use case and that you needed a generalized function that dealt with any number of input fields in a row. I have updated the code to provide that. It should also make the code useable by others rather than special purpose for just the input IDs you specified. The function now returns an array of Objects with key:value pairs for the field ID:value.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26067164
type: Comment

http://stackoverflow.com/q/25887035
has comment: http://stackoverflow.com/comment/40514608
has comment: http://stackoverflow.com/comment/40514374
score: 0
tagged with: php
tagged with: mysql
linked to: http://stackoverflow.com/q/1917576
has title: how to pass a variable from javascript to php or directly to db
has comment: http://stackoverflow.com/comment/40513685
answer count: 0
has body: I'm trying to pass a variable from javascript to php using this simple code and then I want to put it into my database: &lt;?php mysql_select_db($database_Connessione_server,$Connessione_server); //connection to db $ind = 1; &lt;script&gt; var i = 10; &lt;?php $ind = $GET['i']; mysql_query("INSERT INTO table1 VALUES (".$ind.")"); ?&gt; &lt;/script&gt; but I keep getting the same error: Uncaught SyntaxError: Unexpected token &lt; The connection to the db works, but the GET method doesn't get the value 'i'. Getting the type of the variable 'ind' I get undefined index i. Can someone help me to solve the problem? Is there another method to insert variables into database using javascript? --EDIT--- What I want is to understand why my code doesn't work and what that error means in my case. I already read the answers to the other questions but couldn't find a solution.
tagged with: javascript
duplicate of: http://stackoverflow.com/q/1917576
tagged with: variables
type: UnansweredQuestion
tagged with: get
type: Question

http://stackoverflow.com/q/25947877
accepted answer: http://stackoverflow.com/a/25948167
type: Question
has answer: http://stackoverflow.com/a/25948167
tagged with: javascript
score: 0
answer count: 2
has body: I'm working with AngularJS. One of the (technical) requirements is to fetch the "ng enabled" HTML content from the server, in response to a click event, and inject it into a &lt;div ng-app&gt; via JavaScript. The problem is that the newly injected HTML is not wired, as Angular goes through the compile and link phases only when the page is loaded the first time. Is there a way to trigger them manually? Am I approaching this problem in the wrong way? Is there a more idiomatic way to accomplish what I described? Thanks
tagged with: angularjs
has title: Initialize ng-app after document is loaded
possible better answer: http://stackoverflow.com/a/25948111
has answer: http://stackoverflow.com/a/25948111
type: AnsweredQuestion

http://stackoverflow.com/comment/40654733
has text: Once you type an URL in your browser and press enter a request is sent to the server, it processes anything you may get in the $_REQUEST and then sends back to the client html code (including javascripts and css ofc). If you make an AJAX request you may be treating the data correctly but you are not doing anything with the answer. If you want to see what the server is sending back try printing the value of the responseText. document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
comment on: http://stackoverflow.com/a/25965260
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26028939
score: 0
has comment: http://stackoverflow.com/comment/40770799
has answer: http://stackoverflow.com/a/26028953
tagged with: jquery
has title: I cannot get jQuery or jQuery UI to work
has answer: http://stackoverflow.com/a/26028991
has answer: http://stackoverflow.com/a/26029083
answer count: 4
possible better answer: http://stackoverflow.com/a/26028991
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26028953
has answer: http://stackoverflow.com/a/26029089
tagged with: fadeout
type: Question
has body: I can't seem to get jQuery or jQuery UI to work This is my code: Referenced files: Code I am trying to execute: //Welcome message fading away ( document ).ready(function(){ $( "#welcome" ).click(function() { $( "p" ).fadeOut( "slow", function() { //animation is complete }); }); }); HTML Code Hello, this is a test Click me to make me go away. Any help would be great!
has comment: http://stackoverflow.com/comment/40770774
tagged with: jquery-ui
tagged with: javascript
tagged with: click

http://stackoverflow.com/comment/40853351
type: Comment
has text: @JohannEchavarria I don't know wich tool you mean, Do you have a link?
score: 0
comment on: http://stackoverflow.com/q/25959366
type: QuestionComment

http://stackoverflow.com/q/26023221
score: -1
type: Question
tagged with: iphone
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 0
has title: Website responsiveness - Iphone needs double click for a link to work
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26023455
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/40760673
has body: I am getting this strange issue while testing our webpage on IPhone. There is a "Back to Top" link in bottom right corner of the screen which works very well on all desktop browsers as well on Android phones. But when we test it on IPhone, we have to click that link twice to get it work. You can see the stage site here: http://www.maverick-eng.com.php53-14.dfw1-1.websitetestlink.com/ Please advise. Thanks Sumit

http://stackoverflow.com/q/26026558
has answer: http://stackoverflow.com/a/31972198
tagged with: smooth-scrolling
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40766739
tagged with: jquery
has body: I created this pen at CodePen.io , the page scrolls smoothly to different sections on clicking any item in the nav (navigation) Here is the jQuery code. // Smooth Scroll on clicking navigation items $('nav a').click(function() { var $href = $(this).attr('href'); $('body').stop().animate({scrollTop: $($href).offset().top}, 1000); // add class "active" to nav items on click $('nav a').removeClass('active'); $(this).addClass('active'); return false; }); I have already added the class "active" when someone clicks on any of the links inside the nav, but how to add class active when someone scrolls to that section using the scroll bar not by clicking on the link ? Look at the pen here Your suggestions will be appreciated, Thank you in advance !
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26026737
has comment: http://stackoverflow.com/comment/40766764
has answer: http://stackoverflow.com/a/26026666
type: Question
has title: How to add some CSS Class through jQuery on scrolling the page
linked to: http://stackoverflow.com/q/487073
tagged with: javascript

http://stackoverflow.com/comment/40717003
type: Comment
type: QuestionComment
has text: Have you considered using data-* attributes? Ex: ` - 2 viewing`? Then you can separate data used for calculations from the data used to display UI.
comment on: http://stackoverflow.com/q/25999282
score: 0

http://stackoverflow.com/comment/40646545
has text: Don't run your application on two different ports, or you become a victim of the [SOP](https://en.wikipedia.org/wiki/Same-origin_policy)…
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25961023

http://stackoverflow.com/a/25940189
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25940061
has body: It is safe as long as you correctly escape certain characters when inserting the value in the SQL statement. For example, if your Javascript code is: var foo = 'hello world'; Then you will have to escape the single quotes when building the SQL statement: INSERT INTO snippets (code) VALUES ('var foo = ''hello world'';') In the statement above, two single quotes ('') are the way to represent just a single quote in a string enclosed by single quotes. See the link below for further information on escaping characters: http://dev.mysql.com/doc/refman/5.0/en/string-literals.html EDIT As Stephen P correctly points out, if you use prepared statements on the server side code then the framework under the hood will replace those characters for you.
has comment: http://stackoverflow.com/comment/40610880
score: -1
has comment: http://stackoverflow.com/comment/40610664
downvote count: 2

http://stackoverflow.com/comment/40753098
has text: Related: [What is the difference between null and undefined in JavaScript?](http://stackoverflow.com/q/5076944/1048572) and [Why is null an object and what's the difference between null and undefined?](http://stackoverflow.com/q/801032/1048572)
type: AnswerComment
comment on: http://stackoverflow.com/a/26017306
score: 0
type: Comment

extjs
tags question: http://stackoverflow.com/q/25910023
tags question: http://stackoverflow.com/q/26030449
tags question: http://stackoverflow.com/q/25894024
tags question: http://stackoverflow.com/q/25873621
tags question: http://stackoverflow.com/q/25930695
tags question: http://stackoverflow.com/q/25946385
tags question: http://stackoverflow.com/q/26018186
tags question: http://stackoverflow.com/q/25966686
type: Tag
tags question: http://stackoverflow.com/q/25982342
tags question: http://stackoverflow.com/q/26032973
tags question: http://stackoverflow.com/q/25992749
tags question: http://stackoverflow.com/q/25938145
tags question: http://stackoverflow.com/q/25936007
tags question: http://stackoverflow.com/q/26016142
tags question: http://stackoverflow.com/q/26032236
tags question: http://stackoverflow.com/q/25967655
tags question: http://stackoverflow.com/q/25893550
tags question: http://stackoverflow.com/q/25973090
tags question: http://stackoverflow.com/q/25975905
tags question: http://stackoverflow.com/q/25897362
tags question: http://stackoverflow.com/q/25978723
tag name: extjs
tags question: http://stackoverflow.com/q/25910718
tags question: http://stackoverflow.com/q/26002449
tags question: http://stackoverflow.com/q/25969169
tags question: http://stackoverflow.com/q/26016240
tags question: http://stackoverflow.com/q/25929321
tags question: http://stackoverflow.com/q/25904820
tags question: http://stackoverflow.com/q/25992789
tags question: http://stackoverflow.com/q/25973861
tags question: http://stackoverflow.com/q/25891618
tags question: http://stackoverflow.com/q/25894275

http://stackoverflow.com/a/26020237
score: 0
has comment: http://stackoverflow.com/comment/40767923
type: Answer
answers question: http://stackoverflow.com/q/26019583
has body: Edit, Updated Try v2 if (/^(#congo|#onshore|#sea)$/.test($(this).attr("xlink:href"))) { e.preventDefault(); } Example $('body').on('click','svg a', function(e){ if (/^(#congo|#onshore|#sea)$/.test($(this).attr("xlink:href"))) { e.preventDefault(); $("#other").hide(); console.log($(this).attr("xlink:href")); } else { $("#other").show() } }); #other { display:none; } <rect height="30" width="120" y="0" x="0" rx="15"/> #congo <rect height="30" width="120" y="0" x="0" rx="15"/> #onshore <rect height="30" width="120" y="0" x="0" rx="15"/> #sea <rect height="30" width="120" y="0" x="0" rx="15"/> #other other jsfiddle http://jsfiddle.net/guest271314/qeux09gr/
has comment: http://stackoverflow.com/comment/40767454
has comment: http://stackoverflow.com/comment/40765356

http://stackoverflow.com/a/25980262
answers question: http://stackoverflow.com/q/25980189
downvote count: 0
has comment: http://stackoverflow.com/comment/40682530
type: Answer
has comment: http://stackoverflow.com/comment/40693173
has body: press the tab key on your keyboard instead of enter.
upvote count: 2
score: 2

http://stackoverflow.com/a/25888179
downvote count: 0
has comment: http://stackoverflow.com/comment/40516414
has comment: http://stackoverflow.com/comment/40517375
accepted answer of: http://stackoverflow.com/q/25888095
upvote count: 2
answers question: http://stackoverflow.com/q/25888095
type: AcceptedAnswer
has body: Try this : use .after() $(function(){ $('#r1A').after($('#continue')); });
type: Answer
has comment: http://stackoverflow.com/comment/40517952
score: 2

http://stackoverflow.com/q/25908102
has answer: http://stackoverflow.com/a/25908906
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/40552587
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/25908906
possible better answer: http://stackoverflow.com/a/25908174
has answer: http://stackoverflow.com/a/25908174
has answer: http://stackoverflow.com/a/42743109
score: 0
answer count: 3
has title: anuglar js: ng-repeat doesn't displaying anything
tagged with: javascript
tagged with: angularjs-scope
has body: I'm not really a js guy but i tried to show something with the ng-repeat in angular. But it doesn't display anything. HTML: contact: {{ customer[0].Name }} Label JS var app = angular.module('contact', []); app.controller('ContactController', function($scope){ var customers = myContext.customer.toArray(); $.when(customers).then(function(customers) { $scope.customers = customers; }); }); Debug I tried to find error out with the debug chrome extension: This Image i can see for 1 sec and then it goes away and only the title stays there. Maybe somebody know what i'm doing wrong? Best Regards
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40552622

http://stackoverflow.com/comment/40778049
type: AnswerComment
score: 0
type: Comment
has text: @Denis AppCache is not designed for dynamic content, you can't invalidate cache item directly, the update-cycle is browser-controlled (thus the backend trickery you need to build dynamic manifest). For what it's worth, storing image in IndexedDB isn't a lot of lines of code, I am just looking for a best approach for extracting data and store them.
comment on: http://stackoverflow.com/a/26030760

http://stackoverflow.com/q/25953763
has body: var users = [ {name: tim, password: 123, connected: true}, {name: jim, password: 345, connected: true}, {name: kim, password: 678, connected: true, admin: true}, {name: pim, password: 91011} ]; var connectedUsers = users.filter(function( connectedUser ) { if(!connectedUser.admin) { return connectedUser.connected; //not sure how to return the connected users object without the password attr } }); The above returns all the users connected, this is to build an api for my app, only admin's can access this route and the passwords are encrypted but I would like to exclude them from the request. So how do I filter the object with an exclusion to password attr?
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25953860
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40633461
upvote count: 1
has title: Exclude a property when returning objects from an array?
has answer: http://stackoverflow.com/a/25953829
answer count: 3
has comment: http://stackoverflow.com/comment/40633354
tagged with: object
has answer: http://stackoverflow.com/a/25953818
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/40495813
type: AnswerComment
has text: @PaulS. I appreciate your comments. Unfortunately, I'm not so familiar with Node.js yet, so I'm not sure how to properly substitute prompt in Node.js. Also, the OP didn't specify, I didn't take it into consideration. Please edit the answer to add how to prompt in Node.js Thanks.
type: Comment
comment on: http://stackoverflow.com/a/25876846
score: 0

http://stackoverflow.com/comment/40626116
score: 2
has text: You know what `header: location` does, right?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25949727

http://stackoverflow.com/comment/40713266
score: 0
type: AnswerComment
has text: brilliant. Thank you very much. Here is the demo with your fix: http://jsfiddle.net/ech2htrt/3/
comment on: http://stackoverflow.com/a/25997643
type: Comment

http://stackoverflow.com/q/25915860
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40566227
has answer: http://stackoverflow.com/a/25916131
has title: provide jquery script that won't interrupt client's page
type: AnsweredQuestion
has body: I've got a script started that I will need to offer my customers. The idea is that they drop a line of code in their web page and my script does what it needs for them. (in this case, all it is doing is loading content into a div; an image with a link) so..the customer drops in a &lt;div id="name_of_div"&gt;&lt;/div&gt; and a script tag pointing to this: if (!window.jQuery) { var jq = document.createElement('script'); jq.type = 'text/javascript'; jq.src = "//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"; document.getElementsByTagName('head')[0].appendChild(jq); } if ($('#name_of_div').length) { $('#name_of_div').load('[content url]'); }; } I'm pretty sure this roughly works how I'd like, however, I've been reading some things about "never do things globally" and something about putting this stuff inside a function so it doesn't encroach on the page's DOM.. do I have that right? I'm thinking I can enclose in a function to guarantee my own scope...but what other steps should I take to make sure my script, when included into someone else's page, doesn't block or mess with anything already existing? Secondly, is it better to use jquery.load() or a simple iframe? thanks
accepted answer: http://stackoverflow.com/a/25916131
tagged with: dom
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40513049
has text: you might also be interested in http://api.jquery.com/event.namespace/
comment on: http://stackoverflow.com/q/25886485
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40711954
comment on: http://stackoverflow.com/q/25977088
type: Comment
type: QuestionComment
has text: @gigelsmith I need the chevron-up if current accordion panel is open/active, so for example if has class .in. And I need chevron-down if panel is closed, so at least 2/3 of panels should always have chevron-down and if there's a opened panel, it should have chevron-up in the panel-title right hand side. Sorry for the bad self expression. Hope that clarified. I would be extremely happy and would really appreciate if you could help me.
score: 0

http://stackoverflow.com/q/25973619
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40669515
type: Question
has answer: http://stackoverflow.com/a/25976430
has body: Given an array which contains objects of type A and B, where B can be transformed to a set of A type objects, via an asynchronous call, which would be the best way of transforming the array into an all A objects array (transforming each B object in a set of corresponding A objects) and execute a callback when Bs are transformed? list = [A, B, A, B, A, A, B, A]; function transform (B, callback) { //transform B type object into A type objects array [A, A, A]..... callback([A, A, A]); } transformBObjectsIntoAObjects(list, callback) { // ????????? callback(list); // this should only be A type objects }
accepted answer: http://stackoverflow.com/a/25976430
has title: Javascript asynchronous calls chaining
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25977521
upvote count: 1
has comment: http://stackoverflow.com/comment/40669304
tagged with: asynchronous
favorite count: 0
possible better answer: http://stackoverflow.com/a/25977521
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/40712057
type: AnswerComment
comment on: http://stackoverflow.com/a/25996719
score: 1
type: Comment
has text: You can set an anchor to disabled in bootstrap by adding the class "disabled". ``function AjaxOnCompleteDisableButton() { $("#icalSync").addClass("disabled"); }

http://stackoverflow.com/q/26001309
has comment: http://stackoverflow.com/comment/40722790
has answer: http://stackoverflow.com/a/26002307
has title: JS HTML conditions if else or switch
type: Question
has body: hello I saw the post and I built this code ... but it does not work ... I have a radio and a difference between dates I want to make is that "if the radio number 1 is checked and if the days are between 0 and 1, the price written in the variable is = 40", "if the radio number 1 is checked and if the days are between 2 and 3 the price written in the variable is = 37 "and so on. I tried using if else and switch but it does not work tell me you know something? this is the working example without changing the price according to the days http://www.motoeshopping.com/noleggio.php THANKS HTML &lt;form action="prenotaa.php" name="modpren" id="modpren" method="post"&gt; &lt;br/&gt; &lt;label for="from"&gt;Dal&lt;/label&gt; &lt;input type="text" id="from" name="from" onChange="startEndDate(); calcolo();"&gt; al &lt;label for="to"&gt;&lt;/label&gt; &lt;input type="text" id="to" name="to" onChange="startEndDate(); calcolo();"&gt; &lt;br/&gt;&lt;br/&gt; Seleziona i veicoli di cui richiedere la disponibilità&lt;br/&gt; &lt;input type="radio" name="veicoli" value="46" onClick="calcolo();" id="v1"/&gt; FIAT GRANDE PUNTO 1.3 DIESEL &lt;br/&gt; &lt;input type="radio" name="veicoli" value="55" onClick="calcolo();" id="v2"/&gt; PEUGEOT 208 1.4 DIESEL &lt;br/&gt; &lt;input type="radio" name="veicoli" value="36" onClick="calcolo();" id="v3"/&gt; FIAT PANDA 1.2 BENZINA &lt;br/&gt; &lt;input type="radio" name="veicoli" value="55" onClick="calcolo();" id="v4"/&gt; FIAT SEDICI 1.9 DIESEL &lt;br/&gt; &lt;input type="radio" name="veicoli" value="40" onClick="calcolo();" id="v5"/&gt; HYUNDAI I 10 1.1 BENZINA&lt;br/&gt; &lt;input type="radio" name="veicoli" value="38" onClick="calcolo();" id="v6"/&gt; TOYOTA AYGO 1.0 BENZINA &lt;br/&gt; &lt;input type="radio" name="veicoli" value="38" onClick="calcolo();" id="v7"/&gt; NISSAN MICRA 1.2 BENZINA &lt;br/&gt; &lt;input type="radio" name="veicoli" value="55" onClick="calcolo();" id="v8"/&gt; MULTIPLA 1.9 DIESEL &lt;br/&gt; &lt;input type="radio" name=…
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/8901649
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40751066
type: UnansweredQuestion
score: 0

http://stackoverflow.com/a/25993459
answers question: http://stackoverflow.com/q/25992885
has body: As rails 3 uses jquery and you are writting code in prototype. That might creating issue here. So try convert your code in jquery. Your code might look like. $( document ).ready(function() { // Run code }); But consider below and make your changes as per your need $(window).load(function(){ // Run code ##It will run the js after the whole page is loaded. }); $(document).ready(function(){ // Run code ##It will run the js just after the loading of DOM. });
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25992885
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25971915
has body: Following is my code - exports.saveWeekAvailability = function(req, res){ console.log("-- SAVE WEEK WISE DATA --"); weekData = req.body; var resultArr = []; for(var i=0; i&lt; weekData.length; i++){ Availability(weekData[i]).save(function(err, result){ console.log("------------------------------------------"); console.log(result); resultArr.push(result); }); } console.log("-- Result Arr --"); console.log(resultArr); }; But every time resultArr is an empty array. Let me know what I am doing wrong here.
downvote count: 2
answer count: 1
linked to: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/40666282
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript
has comment: http://stackoverflow.com/comment/40666494
accepted answer: http://stackoverflow.com/a/25972192
type: AnsweredQuestion
upvote count: 0
tagged with: mongoose
tagged with: callback
has title: Data from a callback not storing on an array in js
favorite count: 0
type: Question
score: -2
tagged with: node.js
has answer: http://stackoverflow.com/a/25972192

http://stackoverflow.com/q/25910227
has body: I have ObjectA, and objectB. I want to take control inside ObjectA when ObjectB has finished its tasks. So I have () : ObjectB = function () { this.loaded; // it will be a fun load_end = function () { this.loaded();} } and also I have : ObjectA.set_load_fun = function (ext_fun) { ext_fun = ObjectA.fake_fun;} and the code would be : ObjectA.set_load_fun (ObjectB.loaded); ObjectB.load(); ..... // when ObjectB has finished calls load_end, and then calls this.loaded // but this.loaded is really 'ObjectA.fake_fun' // I don't want to write a event listener.... (or maybe I want to write 'builtin' events??) I want to do the same as ajax, filereader, etc. xhr.onload = function(evt) { }; xhr.onprogress = function (evt) {}; ( In this case, I have not to define addeventlistener (xhr,"onload");} I simply would want to write ObjectB.loaded = ObjectA.fake_fun ObjectB.loaded = global_object.function; ObjectB.loaded = mynamespaced.bla.bla.bla.function; I hope I had explained well.... Any help would be appreciated
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25910799
score: 0
has answer: http://stackoverflow.com/a/25910828
answer count: 3
has title: Javascript Pass a function, store its reference, change its value to another function
possible better answer: http://stackoverflow.com/a/25910828
has answer: http://stackoverflow.com/a/25910989
has answer: http://stackoverflow.com/a/25910799
type: AnsweredQuestion

http://stackoverflow.com/a/25964384
score: 1
answers question: http://stackoverflow.com/q/25964258
has body: The angular parser will not parse "new" expressions. There is a way around this though. Just define a Date() function on your scope that returns a new Date: Controller app.controller('ctrl', function($scope) { $scope.Date = function() { return new Date(); }; $scope.populateTasks = function(date) { alert(date); }; }); HTML &lt;div ng-app="app" ng-controller="ctrl" ng-init="populateTasks(Date())"&gt; &lt;/div&gt;
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25964258
downvote count: 0

http://stackoverflow.com/q/25943270
accepted answer: http://stackoverflow.com/a/25943301
type: AnsweredQuestion
tagged with: onclick
type: Question
tagged with: target
tagged with: javascript
score: 0
answer count: 1
has body: This seems relatively straightforward, but it's giving me trouble. I want to do something on all clicks that fit certain criteria so I start by putting this in the header: This alerts "www.chorizon.com/link?page=155". Now, this works: So why doesn't this work? Is there something I need to do to e.target to use it like a regular string?
has answer: http://stackoverflow.com/a/25943301
has comment: http://stackoverflow.com/comment/40616444
has title: Check to see if the target of a click contains several substrings

http://stackoverflow.com/comment/40626372
type: QuestionComment
comment on: http://stackoverflow.com/q/25949925
score: 0
has text: This is probably a file path issue. Ensure you are stating the correct path from the included directory.
type: Comment

http://stackoverflow.com/a/25934966
score: 1
has comment: http://stackoverflow.com/comment/40601226
type: Answer
has body: Using hover function you can achieve this.i.e. on hover of specific part of the page you add the class to the link present inside the li. e.g. $('#specificPartOfPageId').hover(function(){ $('#links').children().children('a').addClass('current'); }); This would add .current class to every link present inside that UL element. Hope this helps.
upvote count: 1
answers question: http://stackoverflow.com/q/25934416
downvote count: 0

http://stackoverflow.com/comment/40672297
has text: Found it, see my answer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25913264
score: 0

http://stackoverflow.com/comment/40730244
has text: Don't use `document.writeln`.
score: 0
comment on: http://stackoverflow.com/q/26006712
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25994799
favorite count: 0
tagged with: angularjs
upvote count: 2
answer count: 5
has title: count is not incrementing within ng-repeat
accepted answer: http://stackoverflow.com/a/25995262
has answer: http://stackoverflow.com/a/25994878
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25995767
has answer: http://stackoverflow.com/a/25995262
type: Question
downvote count: 0
has answer: http://stackoverflow.com/a/25995120
tagged with: javascript
has answer: http://stackoverflow.com/a/25994845
possible better answer: http://stackoverflow.com/a/25995767
has body: I have created an application in angularjs, here i am having a table which i am trying to put a dynamic id, where the dynamic id is generated within the ng-init in an hyperlink, the application is working fine but the count is not incrementing can anyone please tell some solution for this Working Demo Click {{places.placeName}}
tagged with: angularjs-ng-repeat

http://stackoverflow.com/a/25973303
accepted answer of: http://stackoverflow.com/q/25972417
answers question: http://stackoverflow.com/q/25972417
type: Answer
has comment: http://stackoverflow.com/comment/40676913
has comment: http://stackoverflow.com/comment/40675612
has comment: http://stackoverflow.com/comment/40678610
has body: (\d+\s*(?:[A-Z](?![A-Z]))?) You can try this. See demo. http://regex101.com/r/kM7rT8/13
has comment: http://stackoverflow.com/comment/40676934
has comment: http://stackoverflow.com/comment/40677811
has comment: http://stackoverflow.com/comment/40675812
score: 0
has comment: http://stackoverflow.com/comment/40676993
has comment: http://stackoverflow.com/comment/40678546
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40678016

http://stackoverflow.com/a/66709445
score: 3
answers question: http://stackoverflow.com/q/26018756
upvote count: 3
has body: SIMPLE css only solution Rather than modifying the parent table, Here I have a simple solution The idea is to add z-index to the that holds your dropdown. So that it will be on top of all other elements.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/130131127

http://stackoverflow.com/comment/40754196
type: AnswerComment
has text: to prevent $apply nesting is enough to wrap a function inside $timeout(); manually check for scope.$$phase is considered as bad practice.
comment on: http://stackoverflow.com/a/26019969
type: Comment
score: 0

http://stackoverflow.com/q/25932061
favorite count: 0
has title: Files is deleting before its used in node js
has answer: http://stackoverflow.com/a/25932106
has body: I'm new to node js and i'm trying to do the following: function createPasswordfile(content) { fs.writeFile(passwordFileName,content, function(err) { if(err) { console.log("Failed on creating the file " + err) } }); fs.chmodSync(passwordFileName, '400'); } function deletePasswordFile() { fs.chmodSync(passwordFileName, '777'); fs.unlink(passwordFileName,function (err) { if (err) throw err; console.log('successfully deleted'); }); } and there are three statements which call these functions: createPasswordfile(password) someOtherFunction() //which needs the created password file deletePasswordFile() The problem I'm facing is when I add the deletePasswordFile() method call, I get error like this: Failed on creating the file Error: EACCES, open 'password.txt' successfully deleted Since its non blocking, I guess the deletePasswordFile function deletes the file before other function make use of it. If deletePasswordFile is commented out, things are working fine. How should I prevent this?
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25932106
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25972949
type: Answer
upvote count: 1
has body: Add a success function to the ajax call $.ajax({ url: "ComeAndGo/CreateStamp", type: "POST", dataType: "json", data: { userId: userId }, success: function(data) { // data contains the value returned by the server console.log(data); } }); So if the controller returns return Json("This is a message"); the value of data will be "This is a message". Note the return value can be a complex type or a partial view
answers question: http://stackoverflow.com/q/25972656
accepted answer of: http://stackoverflow.com/q/25972656
has comment: http://stackoverflow.com/comment/40668333
has comment: http://stackoverflow.com/comment/40668500
downvote count: 0
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/40668095

http://stackoverflow.com/q/25961927
tagged with: css
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25962799
type: Question
has title: Google PageSpeed Insights - 1 external CSS file blocking
has comment: http://stackoverflow.com/comment/40661144
has comment: http://stackoverflow.com/comment/40683933
answer count: 1
tagged with: javascript
has body: I'm trying to optimize a website with Google PageSpeed Insight Tool.. There is one point I just can't figure out how to fix 1 external CSS file is blocking Have tried everything.. Moved the &lt;link&gt; down in the bottom with all &lt;script&gt; tags.. Have also tried with an asynchronosly load with https://github.com/filamentgroup/loadCSS/blob/master/loadCSS.js All solutions ends up with more "errors" Here is the page insight https://developers.google.com/speed/pagespeed/insights/?url=www.dynaccount.com
score: 0
has comment: http://stackoverflow.com/comment/40653344
tagged with: http://stackoverflow.com/tag/html
tagged with: seo

http://stackoverflow.com/q/25982524
tagged with: ruby-on-rails
answer count: 1
upvote count: 6
tagged with: link-to-function
has answer: http://stackoverflow.com/a/25982665
linked to: http://stackoverflow.com/q/14324919
tagged with: javascript
score: 6
has title: How to replace link_to_function for rails 4.1
tagged with: assets
has body: I am in the middle of creating my first real Rails app, and I'm learning on the go. I have a situation where I need to create nested attributes on one form, and so have been looking at the railscast episodes relevant to that (196 and 197). In the second episode, he uses a link_to_function method, which is apparently no longer available in rails 4.1. I am wondering how to replace it. I have been trying to link_to, and have tried many of the suggested solutions for others who have posted a similar question, but to no avail. Here is what my view partial looks like at the moment (though, I've tried many things...) &lt;p class="offset1 fields"&gt; &lt;%= f.hidden_field :_destroy %&gt; &lt;%= link_to "remove", '#', onclick: 'remove_fields("this")' %&gt; &lt;/p&gt; And here is my .js.coffee file containing the remove_fields() function: remove_fields = (link) -&gt; $(link).previous("input[type=hidden]").value = 1 $(link).up(".fields").hide This function is supposed to remove a field from the form, but instead just appends the '#' to the url without calling the function. What is the best way to link to a javascript (coffeescript) function in the assets from a view?
accepted answer: http://stackoverflow.com/a/25982665
has comment: http://stackoverflow.com/comment/40688283
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question

http://stackoverflow.com/comment/40527431
comment on: http://stackoverflow.com/a/25879834
score: 0
type: AnswerComment
type: Comment
has text: You have to map it to the isolate scope. https://docs.angularjs.org/guide/directive

http://stackoverflow.com/q/25874177
answer count: 1
has comment: http://stackoverflow.com/comment/40496962
has comment: http://stackoverflow.com/comment/40497046
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40493492
has answer: http://stackoverflow.com/a/25879425
tagged with: knockout.js
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/11189660
tagged with: jquery
tagged with: knockout-subscribe
has title: How do I determine which DOM element corresponds with a Knockout observable array element?
has comment: http://stackoverflow.com/comment/40491604
score: 0
has body: Within my model I have an object array with observable elements. I have a subscribe on one of these elements (a dropdown list) in order to fill in the next dropdown (cascading dropdowns). I now need to get the description of the selected value in these dropdowns. How would I pull that value from the dropdown list? I am trying to avoid running a query against the server if possible. In the past I have done self.deptName($('#AssignedDepartment option:selected').text()); but now this dropdown isn't unique. I could have many to choose from. I am using uniqueName: true on each of the fields. How, within the subscribe, do I determine which dropdown changed? Here is what my subscribe looks like: // Build the hours types when the request type is selected self.RequestType.subscribe(function (newValue) { FindRequestType(newValue, function (record) { // Do stuff }); }); Here is the HTML for the dropdown: &lt;select class="required span12" data-bind="leaveTypeDropDown: RequestType, uniqueName: true"&gt;&lt;/select&gt; Here is the bindingHandler: ko.bindingHandlers.leaveTypeDropDown = { init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { // If we don't have the leave request dropdown data, pull it. if (jsonRequestType === "") { $.ajax({ 'async': false, 'url': '/api/payroll/LeaveRequestTypes/', 'dataType': 'text json', 'type': 'GET', 'success': function (json) { jsonRequestType = json; jsonRequestTypeRecieved = true; } }); } // Fill the drop down list. LoadRequestType(element); // register event handler where bound observable will be changed ko.utils.registerEventHandler(element, 'change', function () { var observable = valueAccessor(); observable(element.value); }); // Select the value from the previous record if there is one. if (selectedRequestType !== null) { element.value = selectedRequestType; ko.utils.triggerEvent(element, 'change'); selectedRequestType = null; } } }; Update 1: Since there is confusion. If I select the value "VAC" with…
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25969775
favorite count: 0
has title: Connection closed before receiving a handshake response
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/41209161
upvote count: 4
tagged with: node.js
downvote count: 0
has comment: http://stackoverflow.com/comment/61498052
has comment: http://stackoverflow.com/comment/40664105
type: Question
has comment: http://stackoverflow.com/comment/40664028
has comment: http://stackoverflow.com/comment/40664394
tagged with: javascript
score: 4
has body: i write a node program,and i encounter a big difficult. the server side code is below: var express=require("express"); var app=express(); var socketio=require("socket.io"); var server=require("http").Server(app); var ws=socketio.listen(server); app.use(express.static('public')); app.listen(3000); ws.on('connection',function(socket){ socket.on("message",function(msg){ console.log("got:"+msg); socket.send('pong'); }); }); the client side code is below: websocket echo websocket echo latency:ms there is the tip in chrome console: WebSocket connection to 'ws://127.0.0.1:3000/' failed: Connection closed before receiving a handshake response (index):16 Client notified socket has closed CloseEvent
has comment: http://stackoverflow.com/comment/40662714
has comment: http://stackoverflow.com/comment/40737111
answer count: 1

http://stackoverflow.com/comment/40608345
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25938948
has text: The browsers process the HTML from top to bottom. Unless you explicitly specify that the script should be loaded *after* the rest of the document was processed, it will be loaded and evaluated right where it is located in the document.
type: Comment

http://stackoverflow.com/a/26028565
has body: You can use this code: var re = /&lt;reference&gt;gscl\/applications\/(\w+)\/containers\/DATA\/congtentInstances\/subscriptions&lt;\/reference&gt;/; var m = str.match(re); if (m) console.log(m[1]); Note that a regexp object is declared between slashes (without enclosing the pattern between quotes). The pattern use the \w character class that contains ascii digits and letters (and the underscore). This class is followed by the quantifier + that means one or more. Finally, to isolate the substring you need, a capture group is used.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26028284
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26028284
type: Answer
has comment: http://stackoverflow.com/comment/40770518
score: 1

http://stackoverflow.com/q/25885082
tagged with: javascript
has answer: http://stackoverflow.com/a/25885148
type: Question
has title: how to open JQuery TreeTable at level one
score: 0
type: UnansweredQuestion
has body: expanding JQuery tree table at level one on page load. when initial state of tree table "collapsed" then it collapse all and only parent showing, but I want to expand at level 1 $("#Grid").treetable({ expandable: true, initialState: "collapsed" });
answer count: 1

http://stackoverflow.com/q/26021449
tagged with: navigation
score: 0
answer count: 3
tagged with: jquery
has title: Is it possible the navigation in webpage using coordinates in HTML5 or jquery?
has body: One of my clients is asking for a webpage in one single page and somehow make the menu "redirect" to some coordinates in the page where is the information about that section. They sent me an example of the idea, but its maded in Flash :( Is it possible to make something similar without flash? I don't want the job made, It will be enough with the name of the HTML tag or a simple example in jquery because I have not idea about how to start.
accepted answer: http://stackoverflow.com/a/26022431
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40757873
has comment: http://stackoverflow.com/comment/40757397
has answer: http://stackoverflow.com/a/26022295
has comment: http://stackoverflow.com/comment/40756828
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40756949
has answer: http://stackoverflow.com/a/26022021
has comment: http://stackoverflow.com/comment/40757286
has comment: http://stackoverflow.com/comment/40758207
type: Question
possible better answer: http://stackoverflow.com/a/26022021
has answer: http://stackoverflow.com/a/26022431
tagged with: javascript

http://stackoverflow.com/comment/40545545
type: Comment
type: QuestionComment
has text: When you say "HTML5 validation", you actually mean input validation but in HTML5, correct? (As opposed to validating your code for compliance with HTML5). You may want to revise the title/tags.
score: 2
comment on: http://stackoverflow.com/q/25904449

http://stackoverflow.com/a/26480677
type: Answer
answers question: http://stackoverflow.com/q/25899639
score: 0
has body: It looks like you're using Digest Access Authentication algorithm. Getting 401 on your first request is a part of algorithm, you have to implement it completely. In WWW-Authenticate header you've got all required fields. I hope this will help you: http://en.wikipedia.org/wiki/Digest_access_authentication What is digest authentication?

http://stackoverflow.com/comment/40801791
type: Comment
comment on: http://stackoverflow.com/a/26030330
has text: It doesn't work. Apparently the stacking function is not called on initialization.
type: AnswerComment
score: 0

asp.net-mvc
tags question: http://stackoverflow.com/q/25904481
tags question: http://stackoverflow.com/q/25917578
tags question: http://stackoverflow.com/q/25958510
tags question: http://stackoverflow.com/q/25919813
tags question: http://stackoverflow.com/q/26022695
tags question: http://stackoverflow.com/q/25927822
tags question: http://stackoverflow.com/q/25993763
tags question: http://stackoverflow.com/q/25930300
tags question: http://stackoverflow.com/q/25901173
tags question: http://stackoverflow.com/q/25972311
tags question: http://stackoverflow.com/q/25960927
tags question: http://stackoverflow.com/q/25916738
tags question: http://stackoverflow.com/q/25956299
tags question: http://stackoverflow.com/q/26029920
tags question: http://stackoverflow.com/q/25890871
tags question: http://stackoverflow.com/q/26030429
tags question: http://stackoverflow.com/q/25972656
tags question: http://stackoverflow.com/q/25941358
tags question: http://stackoverflow.com/q/26000318
tags question: http://stackoverflow.com/q/25969422
tags question: http://stackoverflow.com/q/25882549
tags question: http://stackoverflow.com/q/25888553
tags question: http://stackoverflow.com/q/25923608
tags question: http://stackoverflow.com/q/25930255
tags question: http://stackoverflow.com/q/25928507
tags question: http://stackoverflow.com/q/25905056
tags question: http://stackoverflow.com/q/25939014
tags question: http://stackoverflow.com/q/25991321
tags question: http://stackoverflow.com/q/25899236
tags question: http://stackoverflow.com/q/25944113
tags question: http://stackoverflow.com/q/25886617
tags question: http://stackoverflow.com/q/25934193
tags question: http://stackoverflow.com/q/25886615
tags question: http://stackoverflow.com/q/25916756
tags question: http://stackoverflow.com/q/25892629
tags question: http://stackoverflow.com/q/25936429
tags question: http://stackoverflow.com/q/25936425
tags question: http://stackoverflow.com/q/25887268
tags question: http://stackoverflow.com/q/25953420
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/25969431
tags question: http://stackoverflow.com/q/26032205
tags question: http://stackoverflow.com/q/25899419
tags question: http://stackoverflow.com/q/25982658
tags question: http://stackoverflow.com/q/25999441
tags question: http://stackoverflow.com/q/25876070
tags question: http://stackoverflow.com/q/25914204
tags question: http://stackoverflow.com/q/25892310
tags question: http://stackoverflow.com/q/25984484
tags question: http://stackoverflow.com/q/25927929
tags question: http://stackoverflow.com/q/25940349
tags question: http://stackoverflow.com/q/25999795
tags question: http://stackoverflow.com/q/25908066
tags question: http://stackoverflow.com/q/25980289
tags question: http://stackoverflow.com/q/25890168
tags question: http://stackoverflow.com/q/26032229
tags question: http://stackoverflow.com/q/25990432
tags question: http://stackoverflow.com/q/25914588
type: Tag
tags question: http://stackoverflow.com/q/25913763
tags question: http://stackoverflow.com/q/25940308
tags question: http://stackoverflow.com/q/25955540
tags question: http://stackoverflow.com/q/26005156
tags question: http://stackoverflow.com/q/25999501
tags question: http://stackoverflow.com/q/25919651

http://stackoverflow.com/comment/40741401
has text: I have updated the code to show it. It some how shows the text properly but not the inner div. Please have a look at: http://jsfiddle.net/jfpamqb7/5/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25971212
type: Comment

http://stackoverflow.com/q/26024605
has comment: http://stackoverflow.com/comment/40762813
has comment: http://stackoverflow.com/comment/40763077
upvote count: 1
linked to: http://stackoverflow.com/q/400212
accepted answer: http://stackoverflow.com/a/26042036
type: Question
tagged with: c#
has title: How to select the text from my textbox inside a repeater using Jquery?
tagged with: repeater
tagged with: javascript
has comment: http://stackoverflow.com/comment/40763159
answer count: 3
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26031983
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/26031983
has comment: http://stackoverflow.com/comment/40766773
has answer: http://stackoverflow.com/a/26042036
has body: I have a repeater and inside of it is a textbox that contains my data from the database. Of course at run-time it will generate lots of data meaning lots of textboxes too. <asp:Repeater ID="rpter" runat="server"> <asp:Label ID="lblLegend" runat="server" Text='<%#DataBinder.Eval(Container,"DataItem.Name")%>' Font-Bold="true" /> <asp:TextBox ID="txtMessage" runat="server" Text='<%#DataBinder.Eval(Container,"DataItem.Message")%>' Width="100%" TextMode="MultiLine"></asp:TextBox> <asp:Button ID="btnCopy" runat="server" Text="Copy" CommandName="Copy" OnClientClick="copyClipboard()" /> </asp:Repeater> What I want is to select the text from the textbox besides the copy button when I clicked the button so that I can copy it on clipboard.. function copyClipboard() { CopiedTxt = document.selection.createRange(); CopiedTxt.execCommand("Copy"); }
has answer: http://stackoverflow.com/a/26032571
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/25966022
downvote count: 0
answers question: http://stackoverflow.com/q/25965899
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25965899
score: 1
upvote count: 1
has body: It's very important to make sure you're clear with the components before jumping in and trying to code stuff up or think about implementation. Some shallow tips: MySQL is a RDBMS or a Relational Database Management System. As a Database, it sits on a machine (could be your computer or a server somewhere), and applications connect with it and make transactions with it using the SQL database language. MySQL is for keeping persistent state for a large amount of data. jQuery is a library for JavaScript. It basically decreases the lines of code you need to write for JavaScript, and makes it easier to do common things in JavaScript (it is NOT a framework like Angular or Backbone. jQuery is a library -- a bunch of built in functions basically). jQuery is for making things happen in the browser, often from user input/interaction. So it doesn't make sense to ask if MySQL or JavaScript is the better choice. They have very different roles/responsibilities, and exist at separate levels of a web app's infrastructure.

http://stackoverflow.com/comment/40634042
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25954221
type: QuestionComment
has text: 'Undefined' means you didn't add your code to the question. :)

http://stackoverflow.com/q/25936089
possible better answer: http://stackoverflow.com/a/25936306
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25936552
answer count: 3
has title: How to alert text after slide range?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25936259
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25936306
tagged with: css
has answer: http://stackoverflow.com/a/25936259
has body: How to alert text after slide range [jquery] ? my first question is in picture. And my second question is , When checked checkbox it's will disable slide range, but when user click slide range it's will alert. How to apply code for, If slide range disable it's will not alert when click. and this is my script code Disable Slide Range

replace
tags question: http://stackoverflow.com/q/25998208
tags question: http://stackoverflow.com/q/25894137
tags question: http://stackoverflow.com/q/25963372
tags question: http://stackoverflow.com/q/25973236
type: Tag
tags question: http://stackoverflow.com/q/25990729
tags question: http://stackoverflow.com/q/25986391
tag name: replace
tags question: http://stackoverflow.com/q/25978131
tags question: http://stackoverflow.com/q/25939812
tags question: http://stackoverflow.com/q/25892688
tags question: http://stackoverflow.com/q/25973582
tags question: http://stackoverflow.com/q/26022757

http://stackoverflow.com/comment/40719474
comment on: http://stackoverflow.com/a/26000662
score: 0
type: Comment
has text: your solution worked well..and @DontVoteMeDown's solution worked well too.
type: AnswerComment

http://stackoverflow.com/q/25874547
tagged with: jquery
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42666385
has body: I have resize on my main container, but it works when I first land on that page, but when I go to another page then back the directive fails to load. This seem to be happening with other functions too, I tried jquery way and it still has the same effect. appControllers.directive('resize', function ($window) { return function (scope, element) { var w = angular.element($window); var bb = angular.element(document.querySelector( '#bh' )); scope.$watch( function() { return bb.outerHeight(); }, function (newValue, oldValue) { scope.topHeight = $(window).outerHeight() - bb.outerHeight() + 90; return scope.$apply(); }); bb.bind('resize', function () { scope.$apply(); }); } });
answer count: 0
has comment: http://stackoverflow.com/comment/40491891
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive
tagged with: javascript
has title: Angular directive doesnt work on view change
has comment: http://stackoverflow.com/comment/40492937
downvote count: 0

http://stackoverflow.com/q/25908809
answer count: 1
has comment: http://stackoverflow.com/comment/40554041
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25909343
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40565393
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Drawing on an Image HTML5 using
has body: I have an image and I want to be able to draw on it. I know how to draw on a canvas but my main problem is that currently, when I click on an image, it is not a canvas but an image. How can I get the canvas on top of the image so that I can draw on it? I have this in my HTML: Bart Simpson
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26005529
type: UnansweredQuestion
downvote count: 0
has title: Swagger multiple bodies with different model
score: 1
tagged with: swagger
has body: Hi All I am new to swagger and stuck at one point and need help from experts. This is what I need I want to write a PUT method that accept two different types of bodies one at one time. I am able to do this by making two process_models and defining my bodies bases on them like this &gt; api.process_model('MacBased', &gt; {'id' : 'MacBased', &gt; 'required': [ 'physicalMacAddress'], &gt; 'properties': { &gt; 'physicalMacAddress' : { &gt; 'type' : 'string', &gt; 'description' : 'Mac address.' &gt; }, &gt; 'vlan' : { &gt; 'type' : 'string', &gt; 'description' : 'vlan id ' &gt; } &gt; } }); api.process_model('InterfaceBased', {'id' : 'InterfaceBased', 'required': [ 'interfaceName', 'hostName'], 'properties': { 'interfaceName' : { 'type' : 'string', 'description' : 'physical interface name' }, 'hostName' : { 'type' : 'string', 'description' : 'Name of machine' }, 'vlan' : { 'type' : 'string', 'description' : 'vlan id ' } } }); and then body like this &gt; api.process_api('PUT', { &gt; // general group that this api belongs to &gt; 'group' : "ABC", &gt; 'spec' : { &gt; path : "/config/{name}", &gt; method : "PUT", &gt; notes : "", &gt; produces : ["application/json"], &gt; parameters : [param.path("name", "Name", "string"), &gt; { &gt; "name": "body", &gt; "description": "Mac based", &gt; "required": false, &gt; "type": "MacBased", &gt; "paramType": "body" &gt; }, &gt; { &gt; "name": "body", &gt; "description": "Device based", &gt; "required": false, &gt; "type": "InterfaceBased", &gt; "paramType": "body" &gt; }] Here everything is working fine and I can see two body text boxes in Swagger. Issue is that which ever body I filled swagger tries to validate the JSON for first model that is MacBased so first body data went fine and when I try to post data using second body it fails on parsing. Any idea how to parse the data with the specified model of that body? Thanks
type: Question
has answer: http://stackoverflow.com/a/26411085
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: model

http://stackoverflow.com/q/25991469
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25991939
tagged with: knockout.js
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25991957
accepted answer: http://stackoverflow.com/a/25991957
has comment: http://stackoverflow.com/comment/40702292
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25991939
has title: JSON passing as a null to a method argument
tagged with: ajax
has body: I finally tried to try my hand at using KnockoutJS. I explored for shorter ways to send JSON data to a C# method in MVC 4, but ended up using the AJAX method instead. I have some confusion around the following and was hoping someone could help. Javascript var VM = function () { var self = this; self.ValidateAndCreate = function () { console.log("entered"); var a = { b: "1", c: "2", d: { e: "3" } }; var input = { data: a } console.log(JSON.stringify(input)); $.ajax({ url: '/McAfee/ValidateAndCreatePartner', data: JSON.stringify(input), type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (result) { console.log('success'); } }); } } var viewModel = new VM(); ko.applyBindings(viewModel); C# [HttpPost] public void ValidateAndCreatePartner(string data) { var x = JsonConvert.DeserializeObject(data); RedirectIfSuccess(); } What currently happens is that the ValidateAndCreatePartner fires, but the argument data is null, followed by NewtonSoft.Json.JsonConvert.DeserializeObject failing as a result. How can I resolve this issue?
type: AnsweredQuestion

http://stackoverflow.com/q/25994258
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40706664
has answer: http://stackoverflow.com/a/25994456
type: AnsweredQuestion
has body: I wrote: function myObj() { return 7; } console.log(new myObj()); It returns: myObj {} Why is this happens? How to make new myObj() to return me: 7? I am interesting in specification of new myObj() without calling of additional properties? this task: new myObj() // return 1; new myObj() // return 2; new myObj() + new myObj() = // return 7;
accepted answer: http://stackoverflow.com/a/25994366
has title: How to get specific value of the object?
favorite count: 0
possible better answer: http://stackoverflow.com/a/25994456
type: Question
answer count: 2
downvote count: 6
has answer: http://stackoverflow.com/a/25994366
has comment: http://stackoverflow.com/comment/40708272
score: -6
has comment: http://stackoverflow.com/comment/40708177

http://stackoverflow.com/q/26006955
has answer: http://stackoverflow.com/a/26007844
type: Question
has comment: http://stackoverflow.com/comment/40732202
has body: I have this jQuery DropDown menu that seems to work pretty well with one minor, annoying issue. When you are randomly hovered over the menu the sub menu will fade out. Not always, only randomly. The other times the sub menu seems to show fine. So only randomly does the sub menu disappear. I don't know jQuery all that well, so I was hoping someone could see what I was doing wrong. Thanks! Code: $(document).ready(function(){ $('#solutions-btn').hover(function(){ $('#solutions-drop').css('display','block'); $('#quality-drop').css('display','none'); $('#american-drop').css('display','none'); $('#products-drop').css('display','none'); $('#about-drop').css('display','none'); }); $('#quality-btn').hover(function(){ $('#solutions-drop').css('display','none'); $('#quality-drop').css('display','block'); $('#american-drop').css('display','none'); $('#products-drop').css('display','none'); $('#about-drop').css('display','none'); }); $('#american-btn').hover(function(){ $('#solutions-drop').css('display','none'); $('#quality-drop').css('display','none'); $('#american-drop').css('display','block'); $('#products-drop').css('display','none'); $('#about-drop').css('display','none'); }); $('#products-btn').hover(function(){ $('#solutions-drop').css('display','none'); $('#quality-drop').css('display','none'); $('#american-drop').css('display','none'); $('#products-drop').css('display','block'); $('#about-drop').css('display','none'); }); $('#about-btn').hover(function(){ $('#solutions-drop').css('display','none'); $('#quality-drop').css('display','none'); $('#american-drop').css('display','none'); $('#products-drop').css('display','none'); $('#about-drop').css('display','block'); }); var timer; $('#main-menu a').hover(function(){ $('#drop-menu').fadeIn( 200 ); },function(){ timer = setTimeout(function(){$('#drop-menu').fadeOut( 200 );}, 1500); }); $('#drop-menu').hover(function(){ clearTimeout(timer); },function(){ $('#drop-menu').fadeOut( 200 ); }); }); JS Fiddle link: http://jsfiddl…
has answer: http://stackoverflow.com/a/26009279
accepted answer: http://stackoverflow.com/a/26009279
has answer: http://stackoverflow.com/a/26007904
score: 0
has comment: http://stackoverflow.com/comment/40732081
answer count: 3
tagged with: javascript
tagged with: jquery
has title: jQuery Menu Fading Out While still on links
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26007844

http://stackoverflow.com/q/25971045
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has title: two divs side by side occupying entire container area and handling resizing events too
has body: this is the code for two divs placed side by side such that on minimizing the first div the second should automatically occupy the remaining space. When the first div is brought back to original position, the second should automatically reduce its size. One more constraint here is that, the sizes of the divs are not fixed by pixels, they are infact had to be mentioned as percentages. Can any one help in this regards? Demo here: http://jsfiddle.net/rams10786/wrv8r91r/
tagged with: javascript
tagged with: resize
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25971212
favorite count: 0
tagged with: css
has answer: http://stackoverflow.com/a/25971212

http://stackoverflow.com/q/25987157
has answer: http://stackoverflow.com/a/25987748
has body: I'm having some issues applying TinyMCE onto the textarea element. I have a page with a list of passengers. When you click a passsenger, AJAX is called and it displays info for the passenger, one field which happens to be a textarea element. My problem is that the first passenger (any passenger) you click on loads TinyMCE, but from here on out, it's just a normal textarea with no TinyMCE applied. I don't know what's happening. Here is the following code I have: j$ = jQuery.noConflict(); j$(document).ready(function(e) { tinyMCE.init({ mode : "textareas", theme : "advanced", theme_advanced_buttons1 : "bold, italic, underline, | ,bullist, numlist, | ,outdent, indent, | ,link, unlink, |, code", relative_urls : false, remove_script_host : false, }); j$('.names strong').click(function(e) { //Find passenger ID var customer_ID = j$(this).closest('.passenger_Container').find("input[name='customer_ID']").val(); //Find placement of returned data var insert_Data = j$(this).closest('.passenger_Container').find('.package'); j$.ajax({ type: "POST", url: "/include/passenger_Detail.php", data: { customer_ID_Data : customer_ID }, success: function(data) { //get returned data and add into appropriate place insert_Data.html(data); var oldEditor = tinyMCE.get('notes'); if (oldEditor != undefined) { tinymce.remove(oldEditor); } tinyMCE.execCommand('mceAddControl', false, 'notes'); //re-initialise WYSIWYG editor. Notes is the ID to re-initialize /*tinymce.execCommand('mceRemoveControl',true,'notes'); tinymce.execCommand('mceAddControl',true,'notes');*/ } }); }); }); <?php echo $row['f_Name'].' '.$row['l_Name']; ?> I have left the examples I have tried to get TinyMCE to work. I have a sneaky suspicion bad coding practice is the culprit. Each of the textareas have an ID of #notes which I think is the cause. But looking at documentation I don't think tinyMCE lets you use classes to target textareas. Unless I have to loop through all textareas. I'm just spitballing here. Please inform me if m…
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: tinymce
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: TinyMCE not being added to element on AJAX call

http://stackoverflow.com/comment/40709178
type: Comment
type: QuestionComment
has text: `$(document).on("change", "#what, #ever, #id", function() { ... });`
score: 0
comment on: http://stackoverflow.com/q/25995549

http://stackoverflow.com/q/25935366
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40601771
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25935688
tagged with: css
downvote count: 0
has body: To have a customized input file, I've made it hidden by: input[type="file"]{display:none;} and have put a background for its label: label.uploadfilelabel {background-image:url(../image.jpg);} This approach works fine, But it has introduced another problem: Keyboard tab does not stop on this button and its label. I tried using tabindex="0" with no result. Is there any way to stop keyboard tab on this hidden button? Of course, I prefer a pure CSS solution, but a javascript solution (without jQuery) is also acceptable. Thanks for sharing UPDATE: Here is a fiddle of the problem. I tested, It works in IE and FireFox but not in Chrome
score: 1
has title: How to make a non-displayed input or its label `keyboard tab stoppable`?
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40601535
type: Question
tagged with: tabstop
tagged with: javascript
has comment: http://stackoverflow.com/comment/40602706
has comment: http://stackoverflow.com/comment/40601914

universal-analytics
tag name: universal-analytics
type: Tag
tags question: http://stackoverflow.com/q/25985470

http://stackoverflow.com/comment/40553678
has text: can u post the full json data ... and also check browser console for any errors
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25908981
type: QuestionComment

http://stackoverflow.com/a/25894369
score: 0
answers question: http://stackoverflow.com/q/25893899
has comment: http://stackoverflow.com/comment/40528187
has body: You can use this regex: ^(0?[1-9]|[12]\d|3[0-1])[.](0?[1-9]|1[0-2])(?:[.](?:\d{2}|\d{4})?)?$ RegEx Demo
type: Answer
has comment: http://stackoverflow.com/comment/40528093

http://stackoverflow.com/q/25910697
tagged with: jquery
favorite count: 0
answer count: 5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25910773
accepted answer: http://stackoverflow.com/a/25910856
has answer: http://stackoverflow.com/a/25910773
has title: Jquery: call p element in parent function
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25910805
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25910836
has answer: http://stackoverflow.com/a/25910901
has body: I would like to select the p element in the following html Stg in this JS $('.parent').hover( function() { $(this.p).aFunction(){ }; }); I can't find the correct selector...
tagged with: javascript
has answer: http://stackoverflow.com/a/25910856
downvote count: 0

http://stackoverflow.com/comment/40707872
comment on: http://stackoverflow.com/q/25994909
score: 0
has text: Well technically you can break out of a for each by throwing an error.... 1) Opinion 2) Opinion 3) Opinion.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25948556
has body: I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I want the map to only refresh the image layer. Using the normal way, it is full of refershes. So I managed to get this code working. $('#forms').on('submit',function(e) { $.ajax({ url:'fun.php', data:$('#forms').serialize(), type:'GET', success:function(result){ $('#downloads').html(result); } }); e.preventDefault(); }); And the leaflet image layer here. raster = L.imageOverlay('&lt;?php echo $datafile;?&gt;', [[33.00, 31.00], [43.50, 35.00]]); So the exact problem is, the $datafile couldn't be echoed on leaflet raster layer and I would like to reset the form values after submit. I tried to use setUrl from leaflet method on image layer but it doesn't work. Thank you for the help!
type: Question
tagged with: leaflet
has answer: http://stackoverflow.com/a/26146699
tagged with: forms
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/26146699
type: AnsweredQuestion
has title: How to echo a php form GET data submitted by jquery into another javascript code and URL?
tagged with: php

http://stackoverflow.com/comment/40546780
has text: Your code works fine. I have copied your code into simple html view end it works. But problem is I cannot force this code work in my view in ASP.NET MVC application. Please, take a look on my edit.
comment on: http://stackoverflow.com/a/25902468
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25886495
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40513798
has comment: http://stackoverflow.com/comment/40513715
has comment: http://stackoverflow.com/comment/40513593
possible better answer: http://stackoverflow.com/a/25887343
has comment: http://stackoverflow.com/comment/40513646
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40513936
has comment: http://stackoverflow.com/comment/40514584
has answer: http://stackoverflow.com/a/25887286
upvote count: 7
accepted answer: http://stackoverflow.com/a/25887286
tagged with: foreach
type: AnsweredQuestion
has title: Angular js foreach only returning last item in array
score: 7
has comment: http://stackoverflow.com/comment/40513889
has comment: http://stackoverflow.com/comment/40512913
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/25887343
has comment: http://stackoverflow.com/comment/40512897
type: Question
answer count: 2
has body: I'm trying to return each item object from a JSON and evaluate its value, with the angular.forEach(), but only the last item is returned. And due to that I can't perform any evaluation. Funny enough, if I do console.log(), it shows each item, one by one. How can I get each item and evaluate them? If you know of a better way, please teach me. JS (angularjs): angular.module('bLiApp') .controller('AddDataCtrl', ['$scope', 'DataService', function ($scope, DataService) { DataService.getItems().success(function(data) { $scope.items = data.category.items; angular.forEach($scope.items, function(item) { // This is where I'm having problem with return data... if (item.amount &lt; 600) { $scope.amountchecker = 'low'; } else if (item.amount &gt;= 600 &amp;&amp; item.amount &lt;= 650) { $scope.amountchecker = 'average'; } else if (item.amount &gt; 650) { $scope.amountchecker = 'too high'; } }); }); }]); HTML (angularjs): &lt;div class="add-data" ng-controller="AddDataCtrl"&gt; &lt;div class="data-box clearfix" ng-repeat="item in items"&gt; &lt;article class="item"&gt; &lt;p&gt;{{amountchecker}}&lt;/p&gt; &lt;p&gt;&lt;span class="month"&gt;{{ item.month.substring(0, 3) }}&lt;/span&gt;&lt;/p&gt; &lt;p class="cost"&gt;&lt;/p&gt; &lt;/article&gt; &lt;/div&gt; &lt;/div&gt; Many thanks

http://stackoverflow.com/q/25903163
has title: c.beginPath not a function?? it was a minute ago
downvote count: 1
favorite count: 0
has body: i am getting c.beginPath is not a function, while i was working on this code earlier it was but after some small changes it is not longer a recognized function, anyone know why this is? var canvas=document.getElementById('canvas'); var c = canvas.getContext('2d'); var x = 0, y = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; setInterval(function(){ x = 0 * x + 0 * y + 50; y = 0 * x + 16 * y + 0; a = -15 * a + 26 * b + 57.5; b = 28.3 * a + 23.7 * b - 8.4; c = 19.7 * c + 22.6 + d + 40; d = -22.6 * c + 19.7 * d + 4.9; e = 84.9 * e - 3.7 * f + 7.5; f = 3.7 * e + 84.9 * f + 18.3; c.beginPath(); c.strokeStyle = "green"; c.lineWidth = .5; c.moveTo(50.05, 0); c.lineTo(x, y); c.moveTo(51.7, 6.6); c.lineTo(a, b); c.moveTo(44.55, 18.7); c.lineTo(c, d); c.moveTo(74.8, 102.85); c.lineTo(e, f); c.stroke(); console.log(x); }, 50)
upvote count: 0
has answer: http://stackoverflow.com/a/25903183
accepted answer: http://stackoverflow.com/a/25903183
type: AnsweredQuestion
score: -1
type: Question
tagged with: html5-canvas
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25885914
has title: Google map api v3: Set cursor with custom message
has answer: http://stackoverflow.com/a/25886618
favorite count: 0
has body: Can anyone help me figure out how to set the cursor with some custom message just like below website http://www.rightmove.co.uk/draw-a-search.html They are showing custom message as 'Click and release to place your first point' which later changes to 'Click on map to draw an edge'.
accepted answer: http://stackoverflow.com/a/25886870
possible better answer: http://stackoverflow.com/a/25886618
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25886870
downvote count: 1
type: Question
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/40512352
tagged with: javascript
score: -1

http://stackoverflow.com/comment/40664664
type: Comment
comment on: http://stackoverflow.com/a/25951594
has text: Actually best answer was from @GruffBunny in comment. I didn't know that angular does not allow referencing dom nodes in expression. It's so pity! It's looks like that only solution is to define you own method in controller (or write you own directve of course, but in my situation is not appropriate). So mark you answer as accepted.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40644513
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25952151
has text: @ItsikMauyhas According to your post, it looks like you've managed to get rid of the 404 error. I can't see any problem in your code and the map shows up ( as you can see here [fiddle](http://jsfiddle.net/xUUxn/1786/) ). The only thing I can come up with is that your css is not correct (you're not giving the div any height, for instance). I've also noticed that the map doesn't show up if you use a percentage instead of a fixed height.

http://stackoverflow.com/comment/40764681
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26025554
has text: better to ask on: http://magento.stackexchange.com/
score: 1

http://stackoverflow.com/q/25902549
tagged with: php
type: AnsweredQuestion
has body: I have spent 5 hours on this and cannot get this to work. I just want to submit a form and have it ask to confirm delete with a jquery ui popup and when it is confirmed it proceeds to the form submit and goes to delete.php. I have stripped this down for simplicity: Are you sure you want to delete? I click the Yes button and nothing happens. I have tried changing submit id to the same as the form but read that just loops everything.
tagged with: forms
has title: Submit form after confirming jquery modal popup
type: Question
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25902663
score: 4
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25902663

http://stackoverflow.com/comment/40618631
comment on: http://stackoverflow.com/q/25944540
score: 0
has text: All you need to do is make a simple HTTP request.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25891100
downvote count: 0
has body: Looking at your code, I can see that you set the property dryRun of the message to true: message.dryRun = true; By doing this you are telling the Google servers that this is a testing message to see if all keys are properly configured. If you comment out that line, or set the property to false (its default value) then the message will be handled as a real message. DryRun answers are also easily spotted by their multicast_id, which will always be -1
answers question: http://stackoverflow.com/q/25885830
type: Answer
upvote count: 32
score: 32
accepted answer of: http://stackoverflow.com/q/25885830
type: AcceptedAnswer

http://stackoverflow.com/q/25986868
accepted answer: http://stackoverflow.com/a/25986925
has title: Why is stringified JSON a valid string?
answer count: 1
has body: We're already aware that we cannot add double quotes inside the double quotes: var str = ""hello""; //this will be invalid string but when I stringify an object like this var obj = {"name":"abc"} var str = JSON.stringify(obj). str // returns "{"name":"abc"}" which is valid but shouldn't be. I'm confused as in do JavaScript have some special cases when we stringify a JSON object and omit the string validations on it? Thanks in advance.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40694206
has comment: http://stackoverflow.com/comment/40694327
score: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/25986925
tagged with: javascript

http://stackoverflow.com/comment/40580202
score: 0
type: QuestionComment
has text: You may want to attack this by looking at what you want to keep, rather than what you want to split by.
type: Comment
comment on: http://stackoverflow.com/q/25922837

http://stackoverflow.com/q/25993439
has answer: http://stackoverflow.com/a/25993527
answer count: 4
has answer: http://stackoverflow.com/a/25994064
type: UnansweredQuestion
type: Question
tagged with: object
has title: JavaScript - How to access a specific value in a array of objects
has answer: http://stackoverflow.com/a/25993916
has body: I've this array of objects: var buArray = [{'31': {'1':'VN', '2':'AC'}}, {'33': {'1':'VN', '2':'AC'}}, {'51': {'1':'VN', '2':'AC', '3':'SR', '5':'WIN'}}, {'52': {'1':'VN', '2':'AC', '3':'SR', '4':'JU'}}, {'53': {'1':'VN', '2':'AC', '3':'SR', '5':'WIN'}}, {'54': {'1':'VN', '2':'AC', '3':'SR', '5':'WIN'}}, {'55': {'1':'VN', '2':'AC', '3':'SR', '6':'PP'}}] How can I access for example to this specific object(with id 31) for example: "{'31': {'1':'VN', '2':'AC'}}" ? Best Regards,
score: 0
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25993703

http://stackoverflow.com/a/25908151
type: Answer
has body: I've found a solution using Minimongo, it's the same used by Meteor but it's packaged standalone to be used on plain node.js. https://www.npmjs.org/package/minimongo
score: 0
answers question: http://stackoverflow.com/q/25888324

http://stackoverflow.com/q/25940129
type: AnsweredQuestion
has title: Multiple JSON arrays as reponses - AJAX & PHP
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I have a PHP script setup that echo's JSON responses depending on what the user has done (or not done as the case may be): The responses look like this: {"type":"error","response":"Script error, please reload the page and try again. Code: [NAct]","title":"Exception","hide":false} Each response is generated like this: echo $form -&gt; ajax_response('error', 'Script error, please reload the page and try again.&lt;br&gt;Code: [NAct]', 'Exception', false); This is picked up by pNotify and displayed - lovely. (See below .done function for ajax request) request.done(function(msg) { //validate json response if (!tryParseJSON(msg)) { document.write(msg); } else { var array = json_to_array(msg); } if (array['type'] !== 'none') { if (array['title'] !== null) { pushNotification(array['title'], array['response'], array['type'], array['hide']); } else { pushNotification(ucfirst(array['type']), array['response'], array['type'], array['hide']); } } ready_status(); }); If the response cannot be validated by tryParseJSON(); the reponse is written directly to the page for debugging. The problem is when I echo multiple responses back like this: {"type":"error","response":"Script error, please reload the page and try again. Code: [NAct]","title":"Exception","hide":false} {"type":"error","response":"Script error, please reload the page and try again. Code: [NDat]","title":"Exception","hide":false} tryParseJSON() sees it as mumbo jumbo and prints it to the page. Question How do i pick up the above two lines as separate responses and parse them through my function and sub-sequentially to pNotify without combining them into a single JSON array? Solution As pointed out this was over complicated. Instead I combined each response (PHP side) into a an array: $res['json'][] = $form -&gt; ajax_response('error', 'Script error, please reload the page and try again.&lt;br&gt;Code: [NAct]', 'Exception', false); Then echo'ed it at the end of the script: echo json_encode($res['json'); On client side, …
has answer: http://stackoverflow.com/a/25940256
accepted answer: http://stackoverflow.com/a/25940256
has comment: http://stackoverflow.com/comment/40610627
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40610803
has comment: http://stackoverflow.com/comment/40610756
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40610580
tagged with: php

http://stackoverflow.com/q/25987528
favorite count: 0
has comment: http://stackoverflow.com/comment/40695333
has answer: http://stackoverflow.com/a/25987801
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25987743
answer count: 4
type: AnsweredQuestion
has body: sorry for the midunderstanding. I meant index, not value. Sorry. I am wondering if there is a way to use the value of the shown content ".wbox" of this jsfiddle example to coincide with the hidden value, that when clicked will show the hidden content? For example, When Cont 1 is clicked, hidden box 1 shows. When Cont2 is clicked, hidden box 2 shows... and so forth. Here is my fiddle: http://jsfiddle.net/kqbLtn8b/1/ HTML: Cont 1 Cont 2 Cont 3 one two three jquery: var boxVal = $('.box').val(); Thanks for any help! What I am really trying to do is shorten the code from something like this: $('.one').on('click', function(){ $('.b-one').show() }); and so forth with the rest
has answer: http://stackoverflow.com/a/25987651
accepted answer: http://stackoverflow.com/a/25987651
has title: How to show hidden content according to clicked value jquery?
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40695474
tagged with: javascript
score: -1
upvote count: 0
has answer: http://stackoverflow.com/a/25987850
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25987743
has comment: http://stackoverflow.com/comment/40695526

http://stackoverflow.com/comment/40606690
type: Comment
comment on: http://stackoverflow.com/a/25937996
score: 0
type: AnswerComment
has text: I've no problem with the indexing of the array more rather than the property undefined .. I tried index 0 as well.

http://stackoverflow.com/a/25966385
score: 0
type: AcceptedAnswer
has body: Make sure you are not using "Private Browsing" Mode in Firefox.
type: Answer
accepted answer of: http://stackoverflow.com/q/25966194
answers question: http://stackoverflow.com/q/25966194

http://stackoverflow.com/comment/40684068
has text: I have a text and I want to find a certain word and replace it with a link.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25981313
score: 0

jekyll
tags question: http://stackoverflow.com/q/25991077
tag name: jekyll
tags question: http://stackoverflow.com/q/26007439
tags question: http://stackoverflow.com/q/25909334
type: Tag

http://stackoverflow.com/comment/40498671
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25878136
has text: You did not understand the question. Each model must have the selected property. I just want to avoid that more than one of them had it true at the same time!

http://stackoverflow.com/q/26029610
tagged with: javascript
has answer: http://stackoverflow.com/a/26029755
downvote count: 0
has answer: http://stackoverflow.com/a/26029628
favorite count: 0
has comment: http://stackoverflow.com/comment/40848829
has comment: http://stackoverflow.com/comment/40772009
answer count: 4
accepted answer: http://stackoverflow.com/a/26029755
possible better answer: http://stackoverflow.com/a/26029681
has body: New to JS, and I came across this problem. I know I'm just missing something. I appreciate any help with an answer. I included my attempted code. (Dont laugh.) //Loop through arr removing all values that aren't even //hint x % 2 --&gt; checks for even numbers var arr = [1,2,3,6,22,98,45,23,22,12]; for (var i = 0; i &gt; arr.length; i++) { while (i % 2 !== 0) { arr.splice(i); } } alert(arr);
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40772055
has answer: http://stackoverflow.com/a/26029681
score: 1
has answer: http://stackoverflow.com/a/26029658
upvote count: 1
type: Question
tagged with: arrays
has title: Remove all values from an array that are not even

http://stackoverflow.com/a/26033825
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26033763
answers question: http://stackoverflow.com/q/26033763
type: AcceptedAnswer
downvote count: 0
has body: Upon looking at your markup it seems you're pointing the wrong element. In your jquery you're pointing to the parent. You should point to the previous sibling which is the hidden input. var hidden = $(this).prev(); // point the input var ThisQuestionNumber = hidden.val(); Full: &lt;?php for ($i=1;$i&lt;=10;$i++) { ?&gt; &lt;input type="hidden" class="ThisQuestion" id="GetQuestion-&lt;?php echo $i; ?&gt;" value="&lt;?php echo $i; ?&gt;" /&gt; &lt;a href="javascript:void(0)" class="VerySmallFont"&gt; &lt;div class="SelectNumberBox &lt;?php echo $NumberBoxClass; ?&gt;"&gt;&lt;?php echo $i; ?&gt;&lt;/div&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function() { $(".VerySmallFont").click(function(){ var hidden = $(this).prev(); var ThisQuestionNumber = hidden.val(); // point to the previous sibling var TestID = $("#GetTestID").val(); var ShowCQ = '1'; $.ajax({ type : 'GET', url:'getquestiondata.php', data : {TestID: TestID, ShowCQ: ShowCQ, ThisQuestionNumber: ThisQuestionNumber}, success:function(data) { $("#LoadingImage").hide(); $('#ShowQuestion').html(data); } }); }); }); &lt;/script&gt; Demo
type: Answer
score: 1

http://stackoverflow.com/q/25977065
accepted answer: http://stackoverflow.com/a/25977707
type: Question
tagged with: reactjs
answer count: 1
has body: Warning: I have very limited knowledge about NPM dependencies and I'm trying to wrap my head around this coming from the Ruby world. I'm working on a Chrome extension, using React. At the top of my content.js script, I have this: var React = require("react"); var $ = require("jquery"); var moment = require("moment"); All works fine with the React app, but now I'm trying to add a datepicker to some fields. I found this component: https://www.npmjs.org/package/react-datepicker. I'd like to try it. So I did: npm install react-datepicker --save And that installed it to my package.json. But now at the top of my content.js script, how do I require it? I tried: require("react-datepicker"); But that didn't work and throws: Error in event handler for (unknown): DatePicker is not defined and then I tried sending it to a variable, but then I was even more confused because I'm not sure I need to reference the output of it later. I really just need to load it and use it in the context of the React app.
tagged with: javascript
score: 0
has title: Npm dependencies for plugins
has answer: http://stackoverflow.com/a/25977707
tagged with: npm
has comment: http://stackoverflow.com/comment/40676167
has comment: http://stackoverflow.com/comment/40675977
type: AnsweredQuestion

http://stackoverflow.com/comment/40753287
score: 0
type: AnswerComment
has text: @ChiCha the recursition call is way better but if you really need to use the `for` loop, you can use `.delay` : http://jsfiddle.net/c78oLbg2/9/
type: Comment
comment on: http://stackoverflow.com/a/26018439

http://stackoverflow.com/q/25978111
has comment: http://stackoverflow.com/comment/40678498
has comment: http://stackoverflow.com/comment/40678390
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26040705
has body: I have a form that has file selector. <input type="file" ... Run the code snippet below to see what it does. On Safari on iOS8 there is a known bug that means you cannot read file content with FileReader. This only happens on real hardware, the iOS simulator works fine. On Chrome on iOS8 this code sometimes just completely crashes the browser. I don't want to use agent sniffing to decide whether or not to attempt the function. Is there a better way to write this so that I can gracefully degrade to a simpler version? document.getElementById('files').addEventListener('change', handleFileSelect, false); function handleFileSelect(evt) { var fileList = evt.target.files; for (var i = 0; i < fileList.length; i++) { loadFile(fileList[i]); } } function loadFile(file) { var reader = new FileReader(); reader.onload = function (evt) { document.getElementById('list').innerHTML += "file loaded: " + evt.target.result; }; reader.readAsDataURL(file); // broken in iOS8 && Safari } Choose 1 or more files Loaded files will appear below: It appears SO code snippets don't work on iOS so if you want to run the code, I've copied it to jsbin here: http://jsbin.com/zuyeteheroga/3/edit?html,js,output
tagged with: http://stackoverflow.com/tag/html
tagged with: filereader
score: 2
has comment: http://stackoverflow.com/comment/40678782
upvote count: 2
has comment: http://stackoverflow.com/comment/40700435
tagged with: error-handling
type: Question
tagged with: ios8
has comment: http://stackoverflow.com/comment/40679027
tagged with: javascript
has comment: http://stackoverflow.com/comment/40699903
answer count: 1
downvote count: 0
has title: What's the safest way to use FileReader with iOS8?
linked to: http://stackoverflow.com/q/17567344
favorite count: 0
has comment: http://stackoverflow.com/comment/40680117

http://stackoverflow.com/q/25987208
tagged with: jquery
score: 0
tagged with: events
has answer: http://stackoverflow.com/a/25987271
accepted answer: http://stackoverflow.com/a/25987271
type: AnsweredQuestion
type: Question
has body: This sounds ridiculous, but I can't for the life of me figure how or what to target to create a simple click event. http://jsfiddle.net/ctkY3/2740/ I hid the sp-dd element. What I want to do is when you click the red portion (or any portion, really), the click event initiates displaying the sp-dd. I'm I completely missing something? $('.sp-preview-inner').on('click', function(){ $('.sp-dd').css('display', 'block'); }) This doesn't work...
has title: Spectrum.js target single selector for event
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40761281
type: Comment
comment on: http://stackoverflow.com/a/26022890
score: 0
type: AnswerComment
has text: would be really helpful if you could tell me how to call onClose explicitly from another function :)

http://stackoverflow.com/comment/40753824
comment on: http://stackoverflow.com/q/26019658
type: QuestionComment
type: Comment
has text: ...and FYI, you can use `this.form` to get the form so that you don't need to create a jQuery object and use `.parents()`. And then `this.form.id` will give you the ID. This will be many, many times faster than what you're currently doing.
score: 3

http://stackoverflow.com/comment/40776288
comment on: http://stackoverflow.com/q/26032126
has text: Yeah it is working, see this http://jsfiddle.net/kawadkarbk31/Lo49768r/
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25951100
has body: &lt;input type="text" onKeyDown="endterText()"&gt;&lt;/input&gt; &lt;script&gt; function endterText(){ if (window.event.keyCode === 13) { setTimeout((function(){callFun();}),1000) alert("DONE"); } } function callFun(){ console.log('this is cool') } window.alert = function ( text ) { console.log( 'tried to alert: ' + text ); return true; }; &lt;/script&gt; please follow the link .. http://jsfiddle.net/zcfkzaod/1/ is alert is blocking your code of execution ? do u want to disable your alert(); ? or the code is not working .. ?
answers question: http://stackoverflow.com/q/25950985
has comment: http://stackoverflow.com/comment/40628755
score: 0
has comment: http://stackoverflow.com/comment/40640019
type: Answer

http://stackoverflow.com/q/26025671
has title: Advanced sorting in javascript - Array of array by specific value, and how to setup first by match
has comment: http://stackoverflow.com/comment/40765143
has comment: http://stackoverflow.com/comment/40765616
has comment: http://stackoverflow.com/comment/40765561
type: Question
has comment: http://stackoverflow.com/comment/40764954
linked to: http://stackoverflow.com/q/6974069
has comment: http://stackoverflow.com/comment/40765495
linked to: http://stackoverflow.com/q/5435228
has comment: http://stackoverflow.com/comment/40765637
tagged with: arrays
tagged with: javascript
duplicate of: http://stackoverflow.com/q/5435228
score: 0
linked to: http://stackoverflow.com/q/1129216
has body: I searched something similar accros the stackoverflow, but did not find nothing so specific. Could it be maybe that I ran to it but did not clearly understood that it is a similar case. So I have an array of arrays which have two different type of values. For example, lets say that it looks like this: var stuff = [ ["C", 13.63, 15.12, 17.25, 18.87, 20.13], ["C++", 17.35, 19.13, 21.61, 23.53, 25.1], ["Django", 0.71, 0.77, 0.8, 0.87, 0.97], ["Git", 4.07, 4.31, 4.46, 4.79, 5.45], ["Java", 25.44, 26.97, 29.37, 31.99, 34.61] ] So my first question is how to sort arrays by, for example, second value? In that case Java including array would be first and Django would be last. Second question is: Is it possible to say "if array has value Git, put it as the first of arrays in stuff array?
has comment: http://stackoverflow.com/comment/40764981
has comment: http://stackoverflow.com/comment/40765086
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25947170
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25952518
has body: I am using jsf 2.2 and primefaces to develop a web application. I want depending on the different options the user chooses go to one page or another. How can I do if the user chooses the console PS4 and the city London go to page1.xhtml, and if he chooses console xbox and city paris go to page2.xhtml ? Here is the code: <h:form> Basic <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <p:outputLabel for="console" value="Console:" /> <p:selectOneRadio id="console" value="#{radioView.console}"> <f:selectItem itemLabel="Xbox One" itemValue="Xbox One" /> <f:selectItem itemLabel="PS4" itemValue="PS+" /> <f:selectItem itemLabel="Wii U" itemValue="Wii U" /> </p:selectOneRadio> </h:panelGrid> Basic <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <p:outputLabel for="city" value="city:" /> <p:selectOneRadio id="city" value="#{radioView.city}"> <f:selectItem itemLabel="London" itemValue="london" /> <f:selectItem itemLabel="Paris" itemValue="paris" /> <f:selectItem itemLabel="NY" itemValue=ny" /> </p:selectOneRadio> </h:panelGrid>
has title: JSF and Primefaces conditional navigation
tagged with: jsf
duplicate of: http://stackoverflow.com/q/25952518
tagged with: primefaces
tagged with: navigation
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25947784
score: 0
answer count: 1

http://stackoverflow.com/comment/40537235
score: 0
comment on: http://stackoverflow.com/a/25899231
type: AnswerComment
has text: @Amir: Same problem: *"it seems like you are triggering the click before the event handler is bound"*. You have to trigger the event **after** you bound the event handler. Isn't it obvious that the handler can only be triggered if it is bound at the moment the event is occurring?
type: Comment

http://stackoverflow.com/comment/40682257
has text: "Because with a button works" -- could you post your working button code as well? That will help pinpoint what you don't understand.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25980431
type: QuestionComment

http://stackoverflow.com/comment/40586759
has text: Simply fantastic. I'll mark it as correct in 9 minutes. Can you please recommend me a resource for understanding "this" concept in JavaScript? I've googled around, but never quite understood it.
type: AnswerComment
comment on: http://stackoverflow.com/a/25926956
type: Comment
score: 1

http://stackoverflow.com/q/25916292
has body: I have a doughnut Chart that is 30by30px so the tool tip dont realy have any space to show up It look somewhat like this http://jsfiddle.net/NXPhL/452/ What id like to do if it possible is to have the tooltip static in the midle of the doughtnut. I founded in the chart.js code that there was an tooltipPosition var so i was tried to give it a x and y cordinate like this var options = { animation: false, tooltipPosition:{x:15,y:15} }; But it doesn't work Is this possible ?
type: UnansweredQuestion
answer count: 0
type: Question
tagged with: charts
has comment: http://stackoverflow.com/comment/40571706
tagged with: javascript
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40570407
has title: Graph.js tooltip in center of doughnut chart

http://stackoverflow.com/comment/40676279
has text: see the description at the right side in this link http://regex101.com/r/lG2nG9/1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25977309
score: 4

http://stackoverflow.com/a/26182149
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26008300
answers question: http://stackoverflow.com/q/26008300
has body: The solution we ended up does not address all the broken functionality after sleep mode in IOS8, but rather just ajax requests/setTimeout/setInterval/requestAnimationFrame and their respective clear functions. Other things broken after sleep mode: -webkit-transition opacity causes non-selectable areas worker.postMessage called while keyboard opening permanently kills all WebWorkers window bouncing/panning can kill all WebWorkers. overflowchange/resize events no longer work. You need to rework any logic that depends on them`. To make a semi-working solution: Override setTimeout/setInterval/requestAnimationFrame/clearInterval/clearTimeout/cancelAnimationFrame. All of these functions need to postMessage to a webworker, where the webworker will perform setTimeout/setInterval accordingly. You may need to set up a pausing mechinism for these functions as well, but I'm not 100% its necessary. Override XMLHttpRequest so that when send is called, the request is actually performed on a webworker. Create a pausing mechanism for all webworkers so that the main thread can determine when all webworkers have flushed their messages (Basically need to prevent postMessage from getting called on any worker while the keyboard is up). Prevent keyboard popping up on editable elements. After detecting a tap/click event on an editable element, you need to manually call the focus function. Override focus function on editable elements that open the keyboard. Focus will now call the pause workers function. After all workers are paused, call the browser implementation of focus. Add focusout event listener to editable elements so that resume workers function is called. I have a semi-abstracted version on my github available for others. We are using the github version in our fairly complex/large and heavily animation+ajax dependent application with very few issues. https://github.com/TaDaa/IOS8-FIX
upvote count: 5
score: 5

http://stackoverflow.com/q/25875793
has answer: http://stackoverflow.com/a/25876781
accepted answer: http://stackoverflow.com/a/25876781
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40496248
has comment: http://stackoverflow.com/comment/40493472
linked to: http://stackoverflow.com/q/12463040
has comment: http://stackoverflow.com/comment/40494767
has body: I know it's possible to mimic private variables in JS: function ConstructorPattern() { var privateVar = 'hi there'; this.getVar = function() { return privateVar; }; }; But according to Learning JavaScript Design Patterns when referring to some similar code with class Car and method toString: The above is a simple version of the constructor pattern but it does suffer from some problems. One is that it makes inheritance difficult and the other is that functions such as toString() are redefined for each of the new objects created using the Car constructor. This isn't very optimal as the function should ideally be shared between all of the instances of the Car type. So the solution given in my case would be to add the getVar function via the prototype: ConstructorPattern.prototype.getVar = function() { return privateVar; }; But of course that function has no idea what privateVar is so it doesn't work. I am aware of the module pattern but I specifically want to be able to instantiate multiple instances. Is there any way to use the constructor pattern "properly" with prototypes while still getting "private" functionality? EDIT: If there isn't a way to accomplish this, is it really that bad for methods to be redefined for each class instance? I've recently started working on a code base that takes this approach. It seems like the only thing I'm missing out on is inheritance? EDIT2: Marking as a duplicate based on link from the accepted answer.
has comment: http://stackoverflow.com/comment/40494902
type: Question
linked to: http://stackoverflow.com/q/12180790
has comment: http://stackoverflow.com/comment/40495181
has comment: http://stackoverflow.com/comment/40496168
tagged with: javascript
has title: JavaScript constructor pattern with private variables
duplicate of: http://stackoverflow.com/q/12180790
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40496435
has answer: http://stackoverflow.com/a/25876554
has comment: http://stackoverflow.com/comment/40494505
has comment: http://stackoverflow.com/comment/40496113
possible better answer: http://stackoverflow.com/a/25876554

http://stackoverflow.com/q/25905402
type: Question
has title: how to show a message in popup at a page when a user come to that page but the condition is we have to use Featherlight popup no Colorbox or etc
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: popup
has body: Please visit at this url, there is a 'default' button when you click on this url a popup will appear. I want the same but when i don't want to fire any user event this popup will appear onload http://noelboss.github.io/featherlight/
has answer: http://stackoverflow.com/a/25905636

http://stackoverflow.com/comment/40607972
has text: @JuanMendes - Then one could use `.text()` instead of `html()`.
type: AnswerComment
comment on: http://stackoverflow.com/a/25938637
score: 0
type: Comment

http://stackoverflow.com/comment/40633785
type: Comment
comment on: http://stackoverflow.com/q/25953859
type: QuestionComment
has text: yes i t is json object only. when i remove jsonp i am getting cross browser excelption
score: 0

http://stackoverflow.com/comment/40634036
type: Comment
score: 1
has text: Thanks, "Max call stack size exceeded" is a critical detail for this.
comment on: http://stackoverflow.com/q/25952864
type: QuestionComment

http://stackoverflow.com/q/25989238
tagged with: javascript
upvote count: 2
tagged with: html-table
answer count: 2
favorite count: 0
has body: I have a table and I have there a amount column. I want to export the table with the correct number format because when I do export my table, I only get 100 instead of 100.00. My table look like this: ID Code Amount Time 1 1 100.00 2014-09-22 18:59:25 1 1 100.60 2014-09-22 18:59:25 1 1 100.00 2014-09-22 18:59:25 1 1 12.50 2014-09-22 18:59:25 And the Excel output is like this: ID Code Amount Time 1 1 100 2014-09-22 18:59:25 1 1 100.60 2014-09-22 18:59:25 1 1 100 2014-09-22 18:59:25 1 1 12.5 2014-09-22 18:59:25 This is my code: Is there any way to achieve this? I want my Excel file to look exactly like the data in my table.
accepted answer: http://stackoverflow.com/a/25992294
possible better answer: http://stackoverflow.com/a/25989284
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25992294
downvote count: 0
linked to: http://stackoverflow.com/q/16329293
has title: Exporting HTML table with correct format in Javascript
tagged with: export-to-excel
type: Question
linked to: http://stackoverflow.com/q/354476
has answer: http://stackoverflow.com/a/25989284

http://stackoverflow.com/comment/40726575
type: Comment
comment on: http://stackoverflow.com/q/26004625
score: 0
has text: Do you have a task called "express"?
type: QuestionComment

http://stackoverflow.com/q/25924001
score: 0
has comment: http://stackoverflow.com/comment/40582115
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40581460
has comment: http://stackoverflow.com/comment/40582237
has comment: http://stackoverflow.com/comment/40582210
type: UnansweredQuestion
tagged with: css
has body: I've got a basic webpage that I built with HTML/CSS here. However there's a few things I want to change in order to make it easier to update. The first thing I want to do is to find a way to automate certain elements so that if I change them I don't have to go back and change it on every single page. For instance, if I add twitter to the nav on the left-column, I just want to change it once and have it universally applied across the site. This also goes for the footer, and the share button JavaScript element that I have in the head section. (For the share buttons that appear on the left side.) Would this be done with JavaScript? If so how? I know how to link JavaScript files like a CSS file, but that's as far as my knowledge goes. (Besides knowing HTML, CSS and Java of course.)
linked to: http://stackoverflow.com/q/19286813
answer count: 0
has comment: http://stackoverflow.com/comment/40581921
has comment: http://stackoverflow.com/comment/40581769
has comment: http://stackoverflow.com/comment/40581953
has comment: http://stackoverflow.com/comment/40581817
type: Question
has title: How do I automate webpage elements? (nav, footer, etc.)
has comment: http://stackoverflow.com/comment/40581837
has comment: http://stackoverflow.com/comment/40581903
has comment: http://stackoverflow.com/comment/40581842
linked to: http://stackoverflow.com/q/14079791
tagged with: javascript
has comment: http://stackoverflow.com/comment/40582279

http://stackoverflow.com/comment/40721993
type: QuestionComment
comment on: http://stackoverflow.com/q/26001430
has text: @Bergi but what if I block access to the page for POST requests only. could the script then still send a succesful XHR request?
score: 0
type: Comment

http://stackoverflow.com/comment/40674562
type: Comment
type: AnswerComment
has text: Assuming that simpleLogin is coming from angularFire-seed, getUser() already returns a promise.
score: 0
comment on: http://stackoverflow.com/a/25963503

http://stackoverflow.com/a/25955140
answers question: http://stackoverflow.com/q/25954933
has comment: http://stackoverflow.com/comment/40637077
has body: it's not a bug but an intended behaviour, iron router expects you to implement "loading" of some sort, add this line after you define the Router and the waitOn will work as you expect it. Router.onBeforeAction("loading");
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40637534
has comment: http://stackoverflow.com/comment/40643036

http://stackoverflow.com/a/26002912
answers question: http://stackoverflow.com/q/26002856
has body: Well... here's a really simple example simply redirecting to page on an onchange event. The page that it redirects to is simply the value of the dropdown and the file extension of the target file. $('.select-language').on('change',function(){ var value = $(this).val(); location.href = value +'.html'; //or .php, etc. This will go to a page called en.html }); More specifik target involving the protocol: $('.select-language').on('change',function(){ var value = $(this).val(); location.href = 'http://your-url.com/'+ value +'.html'; //or .php, etc. This will go to a page called en.html });
accepted answer of: http://stackoverflow.com/q/26002856
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/40750347
comment on: http://stackoverflow.com/q/26016896
has text: @Bergi how can your solution help here http://jsfiddle.net/rozboris/26t5nwmx/ ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26008074
accepted answer of: http://stackoverflow.com/q/26008056
answers question: http://stackoverflow.com/q/26008056
has comment: http://stackoverflow.com/comment/40732660
has comment: http://stackoverflow.com/comment/40732712
has body: Try this: $('#billing').change(function() { // Same as Shipping Address if ($(this).is(':checked')) { $('#b_name').prop('required', false); } else { $('#b_name').prop('required', true); } });
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/26025320
favorite count: 0
tagged with: gmail-api
linked to: http://stackoverflow.com/q/29607996
type: Question
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/29772438
has answer: http://stackoverflow.com/a/29772438
accepted answer: http://stackoverflow.com/a/26026876
has title: Add filter to gmail account via HTTP request?
downvote count: 0
tagged with: javascript
score: 1
has body: I'm developing a chrome extension for gmail and I'm aware of the Admin SDK API Admin SDK: managing filters From everything I've read, I can't use this API with a standard @gmail.com address. doing a POST to https://apps-apis.google.com/a/feeds/emailsettings/gmail.com/2.0/me/filter just results in a bad URL. I've allowed access to the admin SDK in the Developer's Console. I have no problem using the other GMail API, my Oauth2 flow seems to work fine. Has anyone had any luck programmatically creating a filter?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26026876

http://stackoverflow.com/comment/40768820
has text: There: http://jsfiddle.net/w8oatxxd/2/ You needed to change the value of newRow to be a clone of the row you had cloned previously.
type: Comment
comment on: http://stackoverflow.com/a/26027500
score: 0
type: AnswerComment

http://stackoverflow.com/a/26011843
answers question: http://stackoverflow.com/q/26011659
has comment: http://stackoverflow.com/comment/40740151
score: 0
has comment: http://stackoverflow.com/comment/40739169
has body: The right code should be - var square = new GULE.Scene(5); square.hey( );
type: Answer
has comment: http://stackoverflow.com/comment/40740435

http://stackoverflow.com/q/25993836
has comment: http://stackoverflow.com/comment/40706003
type: AnsweredQuestion
upvote count: 0
has body: $html .=' '; almost there, but my left caret is missing, I suspect it was caused by the comma. the option is like this navigationText: ["prev","next"] in js
has comment: http://stackoverflow.com/comment/40705986
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25993948
has comment: http://stackoverflow.com/comment/40706271
answer count: 2
downvote count: 1
possible better answer: http://stackoverflow.com/a/25993948
accepted answer: http://stackoverflow.com/a/25994034
favorite count: 0
has comment: http://stackoverflow.com/comment/40706190
tagged with: php
has title: escape comma in concatenation in php
has answer: http://stackoverflow.com/a/25994034

http://stackoverflow.com/q/25939014
tagged with: asp.net-mvc
has title: how do I conditionally disable a button kendo.ui grid based on values from model
answer count: 1
tagged with: javascript
has body: I have a kendo.ui grid and I have a custom command to cretae a button. I need to disable the button based on two values in the model data. columns.Command(command =&gt; command.Custom("Edit").Click("loadDataForEdit")).Width(20); I tried just wrapping it in an if statement but it didn't like that. Has anyone else needed to do this before and if so how?
tagged with: kendo-ui
score: 0
accepted answer: http://stackoverflow.com/a/25939632
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25939632
type: Question

http://stackoverflow.com/q/25935671
score: 2
type: AnsweredQuestion
has title: jQuery $.post() inside w2ui .reload() makes TEXTAREA silently lose focus in Chrome
upvote count: 2
tagged with: google-chrome
type: Question
has body: Note: this question is probably too specialized. The solution (if I ever find one) is unlikely to help anyone but myself. Nonetheless, I believe the workaround described below to apply to several borderline Chrome/jQuery focus loss scenarios. Scenario: I have an input TEXTAREA to enter some text. Meanwhile, a timer makes periodical AJAX calls to the server (one per minute). What happens: In Firefox, everything is hunky dory and the user can type away to his heart's content. On Chrome, when the AJAX request fires, the input focus is lost. It goes... nowhere, apparently. window.activeElement returns nothing, and the cursor indeed disappears from the textarea, until the user clicks it again with the mouse. What I expected: Well, for the focus to stay there. Attempts: One - I have tried setting an event handler on the textarea's [.focusout()][1], only to discover that the event does not fire. It does fire when the user clicks somewhere else, but that doesn't help. Two - I have then tried a less elegant - say rather, brutal - approach: var hasFocus = document.activeElement; if (hasFocus) { var focusKeeper = window.setInterval(function(){ hasFocus.focus(); // JUST. STAY. THERE. $(hasFocus).css("background-color", "red"); }, 10); } The field goes red, so the handler is firing at least. Except that the focus does not come back. It's just as if Chrome isn't even trying. Again, everything works as expected in Firefox. I'll try next on Safari to confirm whether this is a Webkit-related thing. Research and more attempts: I've found several posts on how to overcome focus loss, or how to set the focus in the first place, even on newly created fields (which mine isn't), but my case seems different enough that they either offered no clue, or just plain didn't work. The documentation states that element.focus(); is necessary and sufficient, yet sufficient quite clearly it is not. Someone has suggested setting focus using a zero-delay timeout; I tried, but this did not seem to help. …
tagged with: javascript
linked to: http://stackoverflow.com/q/12075867
has answer: http://stackoverflow.com/a/27575960
has comment: http://stackoverflow.com/comment/40603035
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40602990
linked to: http://stackoverflow.com/q/2074347
accepted answer: http://stackoverflow.com/a/27575960
linked to: http://stackoverflow.com/q/11347149
has comment: http://stackoverflow.com/comment/40602378
linked to: http://stackoverflow.com/q/1433742

http://stackoverflow.com/a/25992602
answers question: http://stackoverflow.com/q/25992525
score: 1
upvote count: 1
downvote count: 0
has body: use: q.style.display = "none"; it will hide your button as you wished to do. and to show button again: q.style.display = "block";
type: Answer

http://stackoverflow.com/a/26027210
has body: The code to add the elements is pretty basic. Here is an example based on your HTML- $('some_element').click(function() { var stuffToAdd = '&lt;br /&gt;&lt;input type="text" name="title[]" /&gt;&lt;br /&gt;&lt;input type="text" name="description[]" /&gt;'; $('input[name="description"]:last').after(stuffToAdd); }); Using after() will place the new elements as the last elements in the form prior to the submit button. Adding the brackets after the title and description will make these post as arrays which you should then be able to extract on the server-side for processing.
score: 0
answers question: http://stackoverflow.com/q/26027118
type: Answer

http://stackoverflow.com/comment/40598959
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25933568
has text: just now i added but also it not showing output

http://stackoverflow.com/q/25994614
has comment: http://stackoverflow.com/comment/40707224
downvote count: 0
has comment: http://stackoverflow.com/comment/40707309
possible better answer: http://stackoverflow.com/a/25996134
score: 1
has title: How do you convert an array of JavaScript objects to a single object?
has answer: http://stackoverflow.com/a/25996134
favorite count: 0
has comment: http://stackoverflow.com/comment/40707469
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/40707275
type: AnsweredQuestion
upvote count: 1
has body: I have this array: var objectArray = [{url:"www.google.com", id: "google"}, {url:"www.apple.com", id: "apple"}, {url:"www.facebook.com", id: "facebook"}]; Is it possible to convert to a JavaScript object that is formed like this: var newObject = {"google": "www.google.com", "apple": "www.apple.com", "facebook": "www.facebook.com"};
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25994656
has comment: http://stackoverflow.com/comment/40707236
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25994656

http://stackoverflow.com/q/26017488
has body: I'm trying to show a pop up (using Jquery UI's dialog() function) when user clicks on content inside a table cell. I'm populating the table using data returned from the Ajax call on a REST url. I get the correct data and the table is displayed correctly. The issue is that the click() function for the text inside the table cell doesn't get called. The culprit seems to be the Ajax call since the the same approach works in case of static data inside the table. Snippets from the html file: $(document).ready(function(){ $("#dlg1").dialog({ autoOpen: false }); $('.linkClass1').click(function() { $("#dlg1").dialog("open"); }); $.ajax({ url: "http://localhost:8080/abc/rest/def", type: "GET", contentType: 'application/json; charset=utf-8', success: function(resultData) { var len = resultData.length; var table = $(' ').addClass('tableClass1'); var hRow = $(' '); var hVar1 = $(' ').addClass('headingClass1').text("col1"); hRow.append(hVar1); table.append(hRow); for(i=0; i<len; i++) { row = $(' '); var var1 = $(' ').addClass('cellClass1'); var linkVar1 = $('') .attr('class', 'linkClass1') .attr('href', '#dummyId') .text(resultData[i].id); var1.append(linkVar1); row.append(var1); table.append(row); } $(table).attr("id","tableId1"); // this table is appended to an html element and is correctly displayed }, }); }); This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon. On clicking the text inside table, nothing happens, just the original url is appended with #dummyId. I also tried using an alert() inside the click function and even that is not shown. Even setting async: false in the Ajax call doesn't help. If anyone can help, thanks.
has answer: http://stackoverflow.com/a/26017631
type: Question
has answer: http://stackoverflow.com/a/26017672
has answer: http://stackoverflow.com/a/26017908
score: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3
has title: Using jquery UI's dialog() function with ajax call
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26017908
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26017631

http://stackoverflow.com/comment/40665055
comment on: http://stackoverflow.com/a/25970950
score: 0
type: AnswerComment
type: Comment
has text: @IrgendwPointer: Sorry, my code has some errors. I have edited it and now you can get the video image to the canvas. From their saving to the file is easy.

http://stackoverflow.com/q/25999853
has body: I am passing an array to Twig, and wish Twig to json_encode it and assign it to a JavaScript variable. When doing so, it is not well formed, and appears as: ["one","two","three"] For my immediate case, the data is not user provided and is assumed safe, however, I might have other occasions where this is not the case. How is this task best performed. PHP File <?php require_once '../../../vendor/autoload.php'; Twig_Autoloader::register(); try { $loader = new Twig_Loader_Filesystem('templates'); $twig = new Twig_Environment($loader, array( 'debug' => true )); $twig->addExtension(new Twig_Extension_Debug()); echo $twig->render('json.html', array('data'=>array('one','two','three'))); } catch (Exception $e) { die ('ERROR: ' . $e->getMessage()); } ?> json.html {{ dump(data) }} Output: array(3) { [0]=> string(3) "one" [1]=> string(3) "two" [2]=> string(5) "three" } string(21) "["one","two","three"]" SyntaxError: syntax error var data=["one","two","three"]
has title: Use Twig to populate JavaScript variable
has comment: http://stackoverflow.com/comment/40723340
tagged with: javascript
has comment: http://stackoverflow.com/comment/40717793
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40717605
type: UnansweredQuestion
tagged with: php
tagged with: twig
downvote count: 0
answer count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/12258225
type: Question
duplicate of: http://stackoverflow.com/q/12258225

http://stackoverflow.com/comment/40722940
type: QuestionComment
comment on: http://stackoverflow.com/q/26002748
score: 0
has text: Can it be you have disabled alerts?
type: Comment

http://stackoverflow.com/a/26025434
has comment: http://stackoverflow.com/comment/40782294
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40782678
has comment: http://stackoverflow.com/comment/40782349
has body: You should use $observe instead : attrs.$observe('skPlaceholder', function (value) { if (value.length &lt; 1) { elem.html(''); }; });
has comment: http://stackoverflow.com/comment/40781014
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40781456
answers question: http://stackoverflow.com/q/26025370
has comment: http://stackoverflow.com/comment/40781097
accepted answer of: http://stackoverflow.com/q/26025370

http://stackoverflow.com/comment/40590064
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25928120
score: 0
has text: First - you will need to link next button , page button all using paginator helper , link of which i have already provided.

http://stackoverflow.com/q/25991363
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40701981
has body: I have fixed layout epub books which am supposed to read on desktop and mobile/web browser. For this project im using the epub.js library available on Git, github.com/futurepress/epub.js but when i load my epub file , it gives some errors as in this image http://tinypic.com/r/le5oy/8 which i don't understand, when i change pre-paginated to reflowable in my content.opf file it renders it as like in this image http://tinypic.com/r/10qyrg4/8. I dont want my text in book jump from one page to another, they should be fixed, and images as well. Could any one please point me in the right direction to resolve this issue, Please add comment if you need more information to dig into it Thanks for your time, /Karan
tagged with: xmlreader
type: Question
answer count: 1
tagged with: javascript
has title: Fixed Layout rendering issue with epub.js Library
has comment: http://stackoverflow.com/comment/40786695
has comment: http://stackoverflow.com/comment/40726241
score: 0
linked to: http://stackoverflow.com/q/14440784
has answer: http://stackoverflow.com/a/27062582
tagged with: epub3
tagged with: epub.js

http://stackoverflow.com/a/25925598
upvote count: 2
has body: It is not a TypeScript problem. We encountered the same problem. Turns out that karma "window.__karma__.files" array includes all files included in the test, including the .js extenstion. Now requireJS does not work when supplying the .js extension. To fix it, in our main-test.js file, we created a variable "tests" by filtering all the *Spec.js files and then we removed the .js from the file name as requireJS needs it to be. More information here: http://karma-runner.github.io/0.8/plus/RequireJS.html Below is how we did it (based on the info supplied in the link above): main-test.js console.log('===========================================') console.log('=================TEST FILES================') var tests = Object.keys(window.__karma__.files).filter(function (file) { return /\Spec\.js$/.test(file); }).map(function (file) { console.log(file); return file.replace(/^\/base\/|\.js$/g, ''); }); console.log('===========================================') console.log('===========================================') require.config({ baseUrl:'/base', paths: { jquery :["http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min", "lib/jquery"], angular : ["https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.14/angular.min", "lib/angular"], angularMocks: 'app/vendors/bower_components/angular-mocks/angular-mocks', }, shim: { 'angularMocks': { deps: ['angular'], exports: 'angular.mock' } }, deps: tests, callback: window.__karma__.start }); Also make sure you have supplied the files to be tested in your karma.config.js file, more details here: http://karma-runner.github.io/0.8/plus/RequireJS.html same as the link above. Hope it helps
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25898378
score: 2

http://stackoverflow.com/q/25978820
has answer: http://stackoverflow.com/a/26176676
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40679164
tagged with: jquery
has title: Bootstrap DateTimePicker: Open one datetimepicker at a time
favorite count: 0
tagged with: datetimepicker
accepted answer: http://stackoverflow.com/a/26176676
possible better answer: http://stackoverflow.com/a/25979618
tagged with: twitter-bootstrap
upvote count: 3
has answer: http://stackoverflow.com/a/25979618
has body: I have an html template with more than one datetimepickers. If I click in the button to open one datetimepicker and after that click in another to open the new one, the first one stays unchanged (it doesn't close). I want to be able to open only one datetimepicker at a time. Here's a JsFiddle Demo $('#datetimepicker1, #datetimepicker2').datetimepicker(); This was standard behaviour for bootstrap datetimepicker 2.5 when working with the moment 2.5 (moment-with-langs) but now it seems not to be working like that. Does anyone have any ideas to workaround this issue? Note: I'm using Eonasdan bootstrap-datetimepicker version 3.0.3 with moment 2.8 (moment-with-locales), jQuery 1.9 and Bootstrap 3 What's tricky here is that bootstrap-datetimepicker appends to &lt;body&gt; a &lt;div&gt; for each datetimepicker initialized that is completely unrelated to its trigger button.
type: AnsweredQuestion
score: 3
tagged with: bootstrap-datetimepicker
type: Question
answer count: 2

http://stackoverflow.com/q/25911736
has body: I want to change a button to a loading state when a synchronous AJAX call is being executed. Except the jQuery code (in Chrome) that change the button to loading state freezes until the AJAX call is finished. So the loading state will show up for maybe 1 ms after de ajax call. I created an example in JSFiddle to check it out. (Check in Chrome) http://jsfiddle.net/b8w9hf01/ $('.button').on('click', function() { // change button text (DOESN'T SHOW) $(this).html('Loading..').delay(10); // do async call $.ajax({ url: 'http://echo.jsontest.com/insert-key-here/insert-value-here/key/value', async: false, dataType: "json", success: function(poResponse){ console.log(poResponse); } }); // change button text $('.button').html('Done'); // put Click here back after a second, for repeation of the test setTimeout(function() { $('.button').html('Click here'); }, 1000); }); Changing it to an async call would work, but will be to much work for now. Does anyone has an solution? Thanks!
has comment: http://stackoverflow.com/comment/40558431
has comment: http://stackoverflow.com/comment/40558648
has comment: http://stackoverflow.com/comment/40558777
has answer: http://stackoverflow.com/a/25911836
favorite count: 0
tagged with: ajax
has title: Code before synchronous AJAX call freezes in Chrome
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25912197
accepted answer: http://stackoverflow.com/a/25912197
has comment: http://stackoverflow.com/comment/40558932
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/25911836
has comment: http://stackoverflow.com/comment/40558861
downvote count: 1
type: Question
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/40558516
has comment: http://stackoverflow.com/comment/40558372
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25878007
score: 0
has comment: http://stackoverflow.com/comment/40498387
has answer: http://stackoverflow.com/a/25878473
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/40933231
upvote count: 1
has body: How add buttons with on click handler to template in directive ? I use this script, but it not work in controller. I'm new in angular. I got this script from https://github.com/khan4019/tree-grid-directive/blob/master/README.md (function() { var module; module = angular.module('treeGrid', []); module.directive('treeGrid', [ '$timeout', '$compile', function ($timeout, $compile) { return { restrict: 'E', //templateUrl:'tree-grid-template.html', //template:" {{expandingProperty}} {{row.branch[expandingProperty]}} {{row.branch[col.field]}} ", template: " \ \ \ \ {{expandingProperty}} \ \ Actions \ \ \ \ \ \ \ {{row.branch[expandingProperty]}}\ \ {{row.branch[col.field]}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ", //template: // " \ // \ // \ // \ // {{expandingProperty}} \ // \ // \ // \ // \ // \ // \ // \ // {{row.branch[expandingProperty]}}\ // \ // {{row.branch[col.field]}} \ // \ // \ // \ // ", replace: true, scope: { treeData: '=', colDefs:'=', expandOn:'=', onSelect: '&', initialSelection: '@', treeControl: '=' }, link: function (scope, element, attrs) { var error, expandingProperty, expand_all_parents, expand_level, for_all_ancestors, for_each_branch, get_parent, n, on_treeData_change, select_branch, selected_branch, tree; error = function(s) { console.log('ERROR:' + s); debugger; return void 0; }; if (attrs.iconExpand == null) { attrs.iconExpand = 'icon-plus glyphicon glyphicon-plus fa fa-plus'; } if (attrs.iconCollapse == null) { attrs.iconCollapse = 'icon-minus glyphicon glyphicon-minus fa fa-minus'; } if (attrs.iconLeaf == null) { attrs.iconLeaf = 'icon-file glyphicon glyphicon-file fa fa-file'; } if (attrs.expandLevel == null) { attrs.expandLevel = '3'; } expand_level = parseInt(attrs.expandLevel, 10); if (!scope.treeData) { alert('no treeData defined for the tree!'); return; } if (scope.treeData.length == null) { if (treeData.label != null) { scope.treeData = [treeDat…
has title: Angular directive doesn't work with click event
has comment: http://stackoverflow.com/comment/40498594
downvote count: 1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40498072
tagged with: javascript

http://stackoverflow.com/a/25959116
has comment: http://stackoverflow.com/comment/40642858
upvote count: 2
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40642837
score: 2
has comment: http://stackoverflow.com/comment/40642848
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25959046
answers question: http://stackoverflow.com/q/25959046
has body: $('#myList').on('click', '.myButton', function () { $(this).closest('li').after(createItem()); }); function createItem() { //return your HTML, a jQuery object or a DOM element representing //the new item to add } Please note that I did not bother with the id number, since I figured you probably don't need the id attribute (I guess they were part of your solution to the problem?).

arrays
tags question: http://stackoverflow.com/q/25978082
tags question: http://stackoverflow.com/q/26003302
tags question: http://stackoverflow.com/q/25908320
tags question: http://stackoverflow.com/q/25881515
tags question: http://stackoverflow.com/q/25932083
tags question: http://stackoverflow.com/q/25937911
tags question: http://stackoverflow.com/q/25997595
tags question: http://stackoverflow.com/q/25906710
tags question: http://stackoverflow.com/q/25929805
type: Tag
tags question: http://stackoverflow.com/q/26005610
tags question: http://stackoverflow.com/q/25920518
tags question: http://stackoverflow.com/q/25990634
tags question: http://stackoverflow.com/q/25993439
tags question: http://stackoverflow.com/q/25961303
tags question: http://stackoverflow.com/q/26019911
tags question: http://stackoverflow.com/q/25948477
tags question: http://stackoverflow.com/q/25931655
tags question: http://stackoverflow.com/q/26006062
tags question: http://stackoverflow.com/q/26009960
tags question: http://stackoverflow.com/q/25933249
tags question: http://stackoverflow.com/q/25962013
tags question: http://stackoverflow.com/q/25881936
tags question: http://stackoverflow.com/q/26031934
tags question: http://stackoverflow.com/q/25989497
tags question: http://stackoverflow.com/q/25951039
tags question: http://stackoverflow.com/q/25923324
tags question: http://stackoverflow.com/q/25918426
tags question: http://stackoverflow.com/q/25902263
tags question: http://stackoverflow.com/q/25982667
tags question: http://stackoverflow.com/q/26008108
tags question: http://stackoverflow.com/q/25985090
tags question: http://stackoverflow.com/q/25978769
tags question: http://stackoverflow.com/q/25910054
tags question: http://stackoverflow.com/q/25923423
tags question: http://stackoverflow.com/q/25952431
tags question: http://stackoverflow.com/q/26033592
tags question: http://stackoverflow.com/q/25911827
tags question: http://stackoverflow.com/q/25985827
tags question: http://stackoverflow.com/q/26026977
tags question: http://stackoverflow.com/q/25978984
tags question: http://stackoverflow.com/q/25934497
tags question: http://stackoverflow.com/q/25955061
tags question: http://stackoverflow.com/q/25943277
tags question: http://stackoverflow.com/q/25883693
tags question: http://stackoverflow.com/q/25952142
tags question: http://stackoverflow.com/q/25913173
tags question: http://stackoverflow.com/q/25905974
tags question: http://stackoverflow.com/q/26011391
tags question: http://stackoverflow.com/q/26008953
tags question: http://stackoverflow.com/q/25980165
tags question: http://stackoverflow.com/q/25989813
tags question: http://stackoverflow.com/q/25887283
tags question: http://stackoverflow.com/q/25912713
tags question: http://stackoverflow.com/q/25903401
tags question: http://stackoverflow.com/q/25889133
tags question: http://stackoverflow.com/q/25926081
tags question: http://stackoverflow.com/q/25922757
tags question: http://stackoverflow.com/q/26002836
tags question: http://stackoverflow.com/q/25887864
tags question: http://stackoverflow.com/q/26006649
tags question: http://stackoverflow.com/q/25888478
tags question: http://stackoverflow.com/q/26032811
tags question: http://stackoverflow.com/q/25992378
tags question: http://stackoverflow.com/q/25932802
tags question: http://stackoverflow.com/q/26012963
tags question: http://stackoverflow.com/q/25876813
tags question: http://stackoverflow.com/q/26025671
tags question: http://stackoverflow.com/q/25895172
tags question: http://stackoverflow.com/q/26020579
tags question: http://stackoverflow.com/q/25974831
tags question: http://stackoverflow.com/q/26009931
tags question: http://stackoverflow.com/q/25898190
tags question: http://stackoverflow.com/q/26029610
tags question: http://stackoverflow.com/q/25969162
tags question: http://stackoverflow.com/q/26021064
tags question: http://stackoverflow.com/q/25915810
tags question: http://stackoverflow.com/q/25996881
tags question: http://stackoverflow.com/q/26009899
tag name: arrays

opsview
tags question: http://stackoverflow.com/q/25909614
type: Tag
tag name: opsview

http://stackoverflow.com/comment/40585185
type: Comment
has text: A little late, and you correctly said the browser blocks the pop-ups, is there a way around this pop-up problem...
type: AnswerComment
comment on: http://stackoverflow.com/a/25925928
score: 0

asp.net
tags question: http://stackoverflow.com/q/25930246
tags question: http://stackoverflow.com/q/26007838
tags question: http://stackoverflow.com/q/25876724
tags question: http://stackoverflow.com/q/25972656
tags question: http://stackoverflow.com/q/25975554
tags question: http://stackoverflow.com/q/25941358
tags question: http://stackoverflow.com/q/26014036
tags question: http://stackoverflow.com/q/25956987
tags question: http://stackoverflow.com/q/25939697
tags question: http://stackoverflow.com/q/25997005
tags question: http://stackoverflow.com/q/25986721
tags question: http://stackoverflow.com/q/25889194
tags question: http://stackoverflow.com/q/25931947
tags question: http://stackoverflow.com/q/25928796
tags question: http://stackoverflow.com/q/25991321
tags question: http://stackoverflow.com/q/25929720
tags question: http://stackoverflow.com/q/25908752
tags question: http://stackoverflow.com/q/26021933
tags question: http://stackoverflow.com/q/25990406
tags question: http://stackoverflow.com/q/25895760
tags question: http://stackoverflow.com/q/25999235
tags question: http://stackoverflow.com/q/25909242
tags question: http://stackoverflow.com/q/25901211
tags question: http://stackoverflow.com/q/26032170
tags question: http://stackoverflow.com/q/25969887
tags question: http://stackoverflow.com/q/25978886
tags question: http://stackoverflow.com/q/26024023
tags question: http://stackoverflow.com/q/26013809
tags question: http://stackoverflow.com/q/25969431
tags question: http://stackoverflow.com/q/26002758
tags question: http://stackoverflow.com/q/25916458
tags question: http://stackoverflow.com/q/25946494
tags question: http://stackoverflow.com/q/25906315
tags question: http://stackoverflow.com/q/25931737
tags question: http://stackoverflow.com/q/25926677
tags question: http://stackoverflow.com/q/25913815
tags question: http://stackoverflow.com/q/25993453
tags question: http://stackoverflow.com/q/25887119
tags question: http://stackoverflow.com/q/25887071
tags question: http://stackoverflow.com/q/25957424
tags question: http://stackoverflow.com/q/25972592
tags question: http://stackoverflow.com/q/25927215
tags question: http://stackoverflow.com/q/25906084
tags question: http://stackoverflow.com/q/25966899
tags question: http://stackoverflow.com/q/25945345
tags question: http://stackoverflow.com/q/26024605
tags question: http://stackoverflow.com/q/25973899
tags question: http://stackoverflow.com/q/25898138
tags question: http://stackoverflow.com/q/25892629
tags question: http://stackoverflow.com/q/26011739
tags question: http://stackoverflow.com/q/25917015
tags question: http://stackoverflow.com/q/26023029
tags question: http://stackoverflow.com/q/25949530
tags question: http://stackoverflow.com/q/25982677
tags question: http://stackoverflow.com/q/25970161
tags question: http://stackoverflow.com/q/25914588
type: Tag
tags question: http://stackoverflow.com/q/26029538
tags question: http://stackoverflow.com/q/25991418
tags question: http://stackoverflow.com/q/25933072
tags question: http://stackoverflow.com/q/25896863
tags question: http://stackoverflow.com/q/26018924
tags question: http://stackoverflow.com/q/25992325
tags question: http://stackoverflow.com/q/25873735
tags question: http://stackoverflow.com/q/25977408
tags question: http://stackoverflow.com/q/25942118
tags question: http://stackoverflow.com/q/25999501
tags question: http://stackoverflow.com/q/26023478
tags question: http://stackoverflow.com/q/26000294
tags question: http://stackoverflow.com/q/25962121
tags question: http://stackoverflow.com/q/25927929
tags question: http://stackoverflow.com/q/25946859
tags question: http://stackoverflow.com/q/25977870
tags question: http://stackoverflow.com/q/25917021
tags question: http://stackoverflow.com/q/25919212
tags question: http://stackoverflow.com/q/26021646
tags question: http://stackoverflow.com/q/25912526
tags question: http://stackoverflow.com/q/25891301
tags question: http://stackoverflow.com/q/26003365
tags question: http://stackoverflow.com/q/25999279

http://stackoverflow.com/comment/40748715
type: Comment
type: QuestionComment
has text: UM..... `$('.tab_container a.select")` Is that what you want?
comment on: http://stackoverflow.com/q/26017209
score: 0

http://stackoverflow.com/a/25946962
type: Answer
has comment: http://stackoverflow.com/comment/40622301
has body: You can use flowing code. You have to put this JavaScript into &lt;head&gt; tag. $(function () { var ScrnHeight = $(window).height(); var ScrnWidth = $(window).width(); if (ScrnWidth &lt;= 360) { // for mobile view $("&lt;link/&gt;", { rel: "stylesheet", type: "text/css", href: "/styles/mobile.css" }).appendTo("head"); } else { // for desktop view $("&lt;link/&gt;", { rel: "stylesheet", type: "text/css", href: "/styles/main.css" }).appendTo("head"); } });
answers question: http://stackoverflow.com/q/25946859
score: 0
has comment: http://stackoverflow.com/comment/40621818

http://stackoverflow.com/a/26029778
answers question: http://stackoverflow.com/q/26029453
has body: Maybe you can use javascript cookies. With them you can keep information with a name for as long as you would like. sessionStorage and localStorage are harder to understand and add to your page, but if you are an expert then you could use those. But as I said, I would recommend using cookies. Good luck with your work!
type: Answer
upvote count: 0
score: -1
downvote count: 1

http://stackoverflow.com/comment/40716460
type: QuestionComment
comment on: http://stackoverflow.com/q/25999360
score: 0
type: Comment
has text: no how, do u understand my question

http://stackoverflow.com/q/26000583
answer count: 2
possible better answer: http://stackoverflow.com/a/26000634
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/40718980
accepted answer: http://stackoverflow.com/a/26000662
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40718971
has title: Load html dynamically according to output of php file
type: Question
has body: I am trying to load php file's output in html div. And I have tried it with jQuery's ($('div').load(url_here)) method and it's working fine, but my php file is as below: &lt;?php for( $i = 0 ; $i &lt; 10 ; $i++ ) { echo date('h:i:s').'&lt;br&gt;'; //flush the output buffer flush(); //send the output buffer ob_flush(); //sleep here sleep(1); } ?&gt; Now this php file prints a single line every second, but when I load this php in html's div, it takes 10 seconds once the page is loaded and then adds 10 lines all together. I want to load div as php file returns a single line every second. I mean, I want html to respond same as php (i.e. load one line every second, so at 1st second it should load 1st line, at 2nd second it should add 2nd line and so on). So, is it possible? (P.S - I am beginner for this dynamic web)
tagged with: javascript
has answer: http://stackoverflow.com/a/26000634
score: 0
has answer: http://stackoverflow.com/a/26000662

http://stackoverflow.com/q/25977834
has answer: http://stackoverflow.com/a/25977967
type: UnansweredQuestion
tagged with: php
has body: I have this php site and i use javascript with it. One of the pages is an entry form with 10 lines to enter data in. One line in this case would be coded in this way: echo " "; Right next to this input field there is a button: echo " Copy Down "; Javascript function copyRow1 is as follows: It copies inputted value from input box ID = price1 into input box ID = price2. I have 10 Javascript functions like this copyRow1(), copyRow2(), copyRow3(), etc.... It works fine but I am trying to optimize all the code to make it easier for modifications and now I want to loop all my lines. So I want change my line script in this way: for ($i = 1; $i <= 10; ++$i){ echo " "; echo " "; echo " Copy Down "; echo " "; } and my function this way: Unfortunately this doesn't work. What am i doing wrong?
has comment: http://stackoverflow.com/comment/40677379
type: Question
has comment: http://stackoverflow.com/comment/40677575
tagged with: javascript
has comment: http://stackoverflow.com/comment/40679364
score: 0
has title: Call Javascript from recurring loop with incremental IDs
answer count: 1
has comment: http://stackoverflow.com/comment/40679380

http://stackoverflow.com/a/25880558
has comment: http://stackoverflow.com/comment/40523761
has comment: http://stackoverflow.com/comment/40523862
downvote count: 0
has comment: http://stackoverflow.com/comment/40504299
answers question: http://stackoverflow.com/q/25880520
has comment: http://stackoverflow.com/comment/40524293
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40524105
score: 1
has comment: http://stackoverflow.com/comment/40524006
has body: Your biggest problem is this: columns: [ {title: "fullname"}, {title: "username"} ] it should be columns: [ {data: "fullname"}, {data: "username"} ] You also have to make sure your table is properly defined (typo &lt;tobdy&gt;) Here's a link to a working fiddle for your example: http://jsfiddle.net/bmartinelle/bjppck3d/1/

http://stackoverflow.com/comment/40510213
score: 0
has text: you can vote up and mark the answer correct if it helped. thanks
type: Comment
comment on: http://stackoverflow.com/a/25884889
type: AnswerComment

http://stackoverflow.com/comment/40539551
type: QuestionComment
has text: take a look at http://www.thymeleaf.org/doc/standardurlsyntax.html , your Inspector is outputting something absolutely different to your path (hence the 404), so you have something wrong, and it looks like URL rewriting, so double-check that
comment on: http://stackoverflow.com/q/25900385
score: 0
type: Comment

asp.net-mvc-5
tags question: http://stackoverflow.com/q/25919651
type: Tag
tags question: http://stackoverflow.com/q/25969956
tags question: http://stackoverflow.com/q/25922382
tags question: http://stackoverflow.com/q/25969431
tag name: asp.net-mvc-5

http://stackoverflow.com/comment/48759868
has text: This looks like a good solution to avoid callback hell. Are there any arguments against using this, or any disadvantages?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25945231
type: Comment

http://stackoverflow.com/comment/40713158
comment on: http://stackoverflow.com/q/25997560
score: 0
has text: Is this about using Simple HTML DOM in PHP, or JavaScript DOM?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25960048
tagged with: jquery
has comment: http://stackoverflow.com/comment/40644927
tagged with: ajax
has body: I'm trying to upload multiple files in a single input field. So far, the code works but it's just sending the first file to the upload.php file. I'm using jQuery. HTML: Carica JavaScript: $("#upload_sub").click(function() { $.ajax({ url: "./src/upload.php", type: "POST", contentType: false, processData: false, data: function() { var data = new FormData(); data.append("carica", $("#carica").get(0).files[0]); return data; // Or simply return new FormData(jQuery("form")[0]); }(), error: function(_, textStatus, errorThrown) { alert("Error"); console.log(textStatus, errorThrown); }, success: function(response, textStatus) { alert("Success"); console.log(response, textStatus); } }); }); PHP: print_r ($_FILES); Output: Array ( [carica] => Array ( [name] => prova.pdf [type] => application/pdf [tmp_name] => /tmp/phpvIlTeL [error] => 0 [size] => 7234 ) ) success
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25960078
has title: Ajax upload only passes first file to php file
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25960078
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/25939342
has comment: http://stackoverflow.com/comment/40626083
score: 0
has body: ******EDIT***** var i; for (i=2; i&lt;=32; i++){ var j=i-1; document.writeln("&lt;td align=\"center\"&gt;&lt;input type=\"text\" onblur=\"add3('p4rm2r" + i + "','p3rm2r" + j + "',this)\"size=\"1\"maxlength=\"4\"&gt;&lt;/td&gt;&lt;td align=\"center\"&gt;&lt;input type=\"text\" onblur=\"subs1('p3rm2r" + i + "','p4rm2r" + i + "',this)\"size=\"1\"maxlength=\"4\"&gt;&lt;/td&gt;&lt;td align=\"center\"&gt; &lt;input type=\"text\"id=\"p3rm2r" + i + "\" readonly size=\"1\"maxlength=\"4\"&gt;&lt;/td&gt;&lt;td align=\"center\"&gt;&lt;input type=\"text\"id=\"p4rm2r" + i + "\"readonly size=\"1\"maxlength=\"4\"&gt;&lt;/td&gt;&lt;/tr&gt;" ); } As I said on how you write it is pretty missy and I stated that you have you quote not properly typed. I did the work for you since you didn't even bother correcting these typos you have and this is what I get in the inputs when running the new code above that I cleaned for you. Running the code it produces these input elements. (I didn't write the td in the output but it should be there when you run your script) As I said you are not properly writing your quotes &lt;input type="text" onblur="add3('p4rm2r2','p3rm2r1',this)" size="1" maxlength="4"&gt; &lt;input type="text" onblur="subs1('p3rm2r2','p4rm2r2',this)" size="1" maxlength="4"&gt; &lt;input type="text" id="p3rm2r2" readonly="" size="1" maxlength="4"&gt; &lt;input type="text" id="p4rm2r2" readonly="" size="1" maxlength="4"&gt; &lt;input type="text" onblur="add3('p4rm2r3','p3rm2r2',this)" size="1" maxlength="4"&gt; &lt;input type="text" onblur="subs1('p3rm2r3','p4rm2r3',this)" size="1" maxlength="4"&gt; &lt;input type="text" id="p3rm2r3" readonly="" size="1" maxlength="4"&gt; &lt;input type="text" id="p4rm2r3" readonly="" size="1" maxlength="4"&gt;
type: Answer
answers question: http://stackoverflow.com/q/25939209

http://stackoverflow.com/comment/40536106
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25898350
has text: this Works But i have to chage $.get to $.getJSON
type: AnswerComment

underscore.js
tags question: http://stackoverflow.com/q/25985513
tags question: http://stackoverflow.com/q/25992378
tags question: http://stackoverflow.com/q/26008687
type: Tag
tags question: http://stackoverflow.com/q/26009899
tags question: http://stackoverflow.com/q/25900248
tags question: http://stackoverflow.com/q/26026357
tag name: underscore.js
tags question: http://stackoverflow.com/q/25891959
tags question: http://stackoverflow.com/q/25939947
tags question: http://stackoverflow.com/q/26013802
tags question: http://stackoverflow.com/q/25877376
tags question: http://stackoverflow.com/q/25960707
tags question: http://stackoverflow.com/q/26003459
tags question: http://stackoverflow.com/q/25932393
tags question: http://stackoverflow.com/q/25916163
tags question: http://stackoverflow.com/q/26018766
tags question: http://stackoverflow.com/q/25944870
tags question: http://stackoverflow.com/q/25929805
tags question: http://stackoverflow.com/q/25963838
tags question: http://stackoverflow.com/q/25915779
tags question: http://stackoverflow.com/q/25938473
tags question: http://stackoverflow.com/q/26017137
tags question: http://stackoverflow.com/q/26005656
tags question: http://stackoverflow.com/q/25881041

http://stackoverflow.com/comment/40759097
type: Comment
has text: switching as in calling java2 first then calling java1
comment on: http://stackoverflow.com/a/26021954
type: AnswerComment
score: 0

http://stackoverflow.com/q/25895172
has answer: http://stackoverflow.com/a/25897379
possible better answer: http://stackoverflow.com/a/25895488
has body: The situation: I have two arrays: availablePersons In this array I have all my available Persons. The Userid is entered here. When I use console.log(availablePersons) I get the following: 0: 6 1: 7 2: 8 summary In this array I have all selected persons and as value the count of how many times they where selected (the Key is the Userid). console.log result is this: 6: 5 7: 1 What I should get I need to check now for each person in availablePersons if they exist in the summary array. So check if each value of the availablePersons Array exists as key in the summary array. When there is one person, which doesn't exists in the summary array I need to do something. My code for (var i=0; i&lt;availablePersons.length; i++){ for (var j=0; j&lt;summary.length; j++){ if(summary[j] !== availablePersons[i]) { $('#person-'+i+' .person-sum').text('0'); $('#person-'+i).fadeIn(); $('#person-'+i).css('background-color', '#FF0000'); console.log( $('#person-'+i) ); } } } The problem The console.log outputs selector: "#person-0" and so on until selector: "#person-2". But it should be the userid (in my case 6, 7 or 8).
has comment: http://stackoverflow.com/comment/40528515
type: AnsweredQuestion
has title: Check if key of one array exists as value in other array
has answer: http://stackoverflow.com/a/25895692
has answer: http://stackoverflow.com/a/25895488
type: Question
accepted answer: http://stackoverflow.com/a/25897379
tagged with: arrays
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3

http://stackoverflow.com/comment/40889265
score: 0
type: Comment
type: QuestionComment
has text: I'm quite sure that `grunt.cli` is the wrong call - there must be a way to trigger a grunt task run without an exit. But: you can start a child and call the `grunt.cli` inside it. Then as a callback give `child.send` and in the parent react on `on('message',...)`.
comment on: http://stackoverflow.com/q/25941378

http://stackoverflow.com/comment/40601297
type: AnswerComment
score: 0
type: Comment
has text: ok that's right this answer is not for your solution but keep it if someone else want on change event extension
comment on: http://stackoverflow.com/a/25934856

http://stackoverflow.com/q/25876900
tagged with: javascript
answer count: 2
tagged with: jquery
has title: Is it possible to queue animations when using velocity.js?
tagged with: velocity.js
has body: I'm working on a project with a push menu. When the content div slides over, the menu buttons have a little animation as they enter the screen. It doesn't take long or anything but the issue I'm having is if the user opens and closes the menu quickly a bunch of times in a row, the items on the list begin disappearing and reappearing in the wrong order. I think this is because the new animation calls are canceling out old ones and in general screwing up the order of things. Ideally, I'd like the animations to always behave properly (i.e. if the menu is opening, clear all previous animations and play the opening animation only). But I'd be satisfied if I could at least get each element to queue its animations properly so that the elements in the menu don't randomly disappear upon opening the menu. Here is a fiddle of the problem: http://jsfiddle.net/9t10zr6m/1/ The top div is transparent because it normally has a background image. And also because I thought it might be easier to see the problem with the menu if you could see what was going on underneath the top div. here is the relevant jQuery code: $(document).ready(function() { $(".expandable-content").on('click', function(){ $(this).children(".internal-content").slideToggle(); }); $(".menu-button").on('click', function(){ var position = $(".blue-box").css("left"); if( position == "0px") { $(".blue-box").velocity({left: "250px"}, 500); $('.side-nav-link').finish(); $('.side-nav-link').velocity('transition.slideUpIn', { stagger: 50 }); } else { $(".blue-box").velocity({left: "0px"}, 500); $('.side-nav-link').finish(); $('.side-nav-link').velocity('transition.slideDownOut', { stagger: 50 }); } }); }); and the relevant html: Julian Ptak Kempis Coder. Simplicity. Purity. Menu Home Work Hobbies Writings Code Contact How do you make jQuery enqueue animations? Or only play the right animation for the right click and skipping all previous ones? I tried .finish() and .stop() but neither seemed to fix my problem. Any ideas? D…
type: UnansweredQuestion
tagged with: animation
tagged with: css
score: 0
type: Question
has answer: http://stackoverflow.com/a/29920324
has answer: http://stackoverflow.com/a/25942246

http://stackoverflow.com/q/25969121
answer count: 0
downvote count: 0
score: 1
has body: I have a WPF application with a WebBrowser control that run a web application that will be displayed in full screen. In the application, I have a iFrame used to display an other website (could be any website...). But I would like to prevent this website to open a new window when a link is clicked and prevent any dialog window to appear. Is there a way to do it ? I have no control on these websites source code...
type: Question
tagged with: browser
tagged with: javascript
has comment: http://stackoverflow.com/comment/40661598
upvote count: 1
has title: iFrame - prevent link to open in new window
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
tagged with: wpf

http://stackoverflow.com/q/25960561
tagged with: ajax
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25960650
tagged with: css
type: AnsweredQuestion
score: 2
upvote count: 2
has title: How to display and hide elements when slide range to 0 And 1001?
type: Question
possible better answer: http://stackoverflow.com/a/25960609
accepted answer: http://stackoverflow.com/a/25960650
has answer: http://stackoverflow.com/a/25960609
has body: How to display and hide elements when slide range to 0 And 1001 ? when slide range to 0 And 1001 ` How to hide id="bottomValue" ,id="topValue" and show id="All_value" My code: $(function(){ $('#rangeslider').slider({ range: true, min: 0, max: 1001, values: [ 600, 890 ], slide: function( event, ui ) { $('#bottomValue').val(ui.values[0]); $('#topValue').val(ui.values[1]); $('#rangeval').html(ui.values[0]+" - "+ui.values[1]); }, change: function(event, ui) { $("#f1id").submit(); } }); }); -
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40607254
type: AnswerComment
comment on: http://stackoverflow.com/a/25938171
type: Comment
has text: @TrueBlueAussie Yep, both worked great, thank you again!
score: 0

http://stackoverflow.com/comment/40655108
has text: @Doctus Thanks this worked perfectly! Didn't take long, just had to add $session = uniqid(); to the main game page and then call that once they get to the highscore page and this prevents them from double posting their score.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25962682
type: QuestionComment

http://stackoverflow.com/a/26061291
upvote count: 10
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26022029
score: 10
has body: Thanks to the example link provided by Azathoth in the comments I worked a solution out: using OL3 pointermove event using jQuery to get the target element and change its cursor style Here is the code : var cursorHoverStyle = "pointer"; var target = map.getTarget(); //target returned might be the DOM element or the ID of this element dependeing on how the map was initialized //either way get a jQuery object for it var jTarget = typeof target === "string" ? $("#"+target) : $(target); map.on("pointermove", function (event) { var mouseCoordInMapPixels = [event.originalEvent.offsetX, event.originalEvent.offsetY]; //detect feature at mouse coords var hit = map.forEachFeatureAtPixel(mouseCoordInMapPixels, function (feature, layer) { return true; }); if (hit) { jTarget.css("cursor", cursorHoverStyle); } else { jTarget.css("cursor", ""); } }); Here is the link to the example on OpenLayers site : http://openlayers.org/en/v3.0.0/examples/icon.html

http://stackoverflow.com/q/26030429
tagged with: asp.net-mvc
tagged with: jqgrid
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
has body: In here i'm going to expand subgrid using InvoiceId but i have no idea how to get InvoiceId and pass it to the subgrid url.my main grid has InvoiceId.This is JqGrid.When i hardcode the Invoice ID to the subgrid url then it's working. &lt;script type="text/javascript"&gt; $(function () { $('#jqgrid').jqGrid({ url: 'Sales/GetAllSalesOrders/', datatype: 'json', mtype: 'GET', //columns names colNames: ['InvoiceId', 'CustomerId', 'SubTotal', 'TotalDiscount', 'VAT', 'NBT', 'Amount', 'Balance'], //columns model colModel: [ { name: 'InvoiceId', index: 'InvoiceId' }, { name: 'CustomerId', index: 'CustomerId',align:'center' }, { name: 'SubTotal', index: 'SubTotal', align: 'right' }, { name: 'FullDiscount', index: 'FullDiscount', align: 'right' }, { name: 'Vat', index: 'Vat', align: 'right' }, { name: 'Nbt', index: 'Nbt', align: 'right' }, //{ name: 'Total', index: 'Total', align: 'left' }, { name: 'NetAmount', index: 'NetAmount', align: 'right' }, { name: 'Balance', index: 'Balance', align: 'right' } ], pager: '#jqgrid', rowNum: 10, sortname: 'InvoiceId', sortorder: 'asc', viewrecords: true, width: 'auto', height: 'auto', gridview: true, rowNum: 50, rowTotal: 200, rowList: [20, 30, 50, 100], rownumbers: false, rownumWidth: 40, loadonce: true, subGrid: true, subgridtype: "json", //subrid model subGridModel: [{ //subgrid columns names // name: ['InvoiceItemId', 'Quantity', 'Rate', 'DiscountAmount', 'Amount'], name: ['InvoiceItemId', 'Quantity','Amount'], width: [100, 100,100], align: ['left', 'right','right'], //postData: { id: 22 } }], //url from which subgrid data should be requested subGridUrl: '/Sales/GetSalesItemsByInvoiceId/' }); My Controller accept Id, [HttpGet] public JsonResult GetSalesItemsByInvoiceId(int InvoiceId) { //Some code here }
type: UnansweredQuestion
has title: Pass Id to Subgrid of Jqgrid
score: 1
has answer: http://stackoverflow.com/a/51748349
has answer: http://stackoverflow.com/a/26031150
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/14194754

http://stackoverflow.com/comment/40728501
type: Comment
has text: This is worse than no security since you'll *think* there's something going on here, but really it's like a locked door with no wall. This has to be done server-side for it to actually do something useful.
comment on: http://stackoverflow.com/q/26005667
score: 0
type: QuestionComment

http://stackoverflow.com/a/25896027
has comment: http://stackoverflow.com/comment/40546561
has comment: http://stackoverflow.com/comment/40562353
answers question: http://stackoverflow.com/q/25895959
type: Answer
has comment: http://stackoverflow.com/comment/40532260
upvote count: 1
has comment: http://stackoverflow.com/comment/40563103
downvote count: 0
has body: function foo(){ //Gather object in variable using javascript getElementById function var obj = getElementById('code'); //Use javascript .innerhtml function to grab the contents of the element obj = obj.innerhtml; //Display text in console to prove working console.log(obj); }
score: 1

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/25903254
tags question: http://stackoverflow.com/q/25995549
tags question: http://stackoverflow.com/q/25943079
tags question: http://stackoverflow.com/q/26008088
tags question: http://stackoverflow.com/q/25990185
tags question: http://stackoverflow.com/q/25906536
tags question: http://stackoverflow.com/q/25958618
tags question: http://stackoverflow.com/q/25908578
tags question: http://stackoverflow.com/q/25970454
tags question: http://stackoverflow.com/q/26018053
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/25926412

http://stackoverflow.com/q/25979138
tagged with: php
has title: Jquery validate plugin, How to check if PHP file returns an error or ok to redirect user to homepage/dashbord
type: Question
tagged with: jquery-plugins
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25979190
has body: First off this is my first question on here so I am sorry for anything I may do wrong. But.... My question is how do I take whats sent back from my PHP file to see if username/password combo exists in the database. My PHP either returns true or false depending on the submitting. That works fine I just do not know how to use the returned data and compare it to either true or false. ////This is my Jquery of my form which works fine validating and sending data to PHP. $("#frmsignin").validate({ rules:{ passin:"required", emailin:{ required:true, email:true } }, messages:{ passin:"Please enter YOUR password", emailin:{ required:"Please enter YOUR email address", email:"Please enter a VALID email address" } }, submitHandler: function(form) { $.post('sign_in.php', $("#frmsignin").serialize(), function(data){$('#results').html(data)}); } }); Right Now I just have my PHP file printing back true/ false just to get the error message or redirection to occur if user signs in correctly.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25979190

http://stackoverflow.com/a/61829845
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26007187
downvote count: 0
upvote count: 2
has body: If you're using axios, you can fetch the head like: const checkUrl = async (url) =&gt; { try { await axios.head(fullUrl); return true; } catch (error) { if (error.response.status &gt;= 400) { return false; } } } You may want to customise the status code range for your requirements e.g. 401 (Unauthorized) could still mean a URL exists but you don't have access.

http://stackoverflow.com/a/25875244
accepted answer of: http://stackoverflow.com/q/25874790
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40517082
has comment: http://stackoverflow.com/comment/40540921
has comment: http://stackoverflow.com/comment/40540956
type: Answer
has comment: http://stackoverflow.com/comment/40502197
has comment: http://stackoverflow.com/comment/40501270
has comment: http://stackoverflow.com/comment/40540950
score: 1
has comment: http://stackoverflow.com/comment/40526142
upvote count: 1
has body: Simply change the value of the element just before it's submitted, and the serialized array will reflect the new value. Then after your ajax (or after you serialize the data for your ajax), you can easily change the value back to the original. Insert your conditional logic as needed... submitHandler: function(form) { var original = $('#e3').val(); // original value $('#e3').val('your new value'); // insert new value // ajax() here // submit via ajax $('#e3').val(original); // change the value back after the ajax is complete } Maybe you'll want to change the value back from within the ajax() complete callback function. DEMO: http://jsfiddle.net/rueL9y0p/4/
answers question: http://stackoverflow.com/q/25874790

http://stackoverflow.com/comment/40767699
type: Comment
type: QuestionComment
has text: @aembke That works! I'm surprised I didn't see that before.
score: 0
comment on: http://stackoverflow.com/q/26027023

http://stackoverflow.com/q/25935378
has body: So I use this code like filter to buttons: &lt;input value="Type1" ng-click="typeF = {type: 'Type1'}" type="button"/&gt; &lt;input value="Type2" ng-click="typeF = {type: 'Type2'}" type="button"/&gt; &lt;input value="Type3" ng-click="typeF = {type: 'Type3'}" type="button"/&gt; &lt;input value="Type4" ng-click="typeF = {type: 'Type4'}" type="button"/&gt; &lt;input value="All" ng-click="typeF = null" type="button"/&gt; And output data by filtering like this: &lt;tr ng-repeat="product in products | filter:search | filter:someN | filter:typeF"&gt; &lt;td&gt;{{product.name}}&lt;/td&gt; &lt;td&gt;{{product.type}}&lt;/td&gt; &lt;td&gt;{{product.someNvalue}}&lt;/td&gt; &lt;/tr&gt; But I need to use this kind of filter too: &lt;input ng-repeat="product in products | unique:'soneNvalue'" value="{{product.soneNvalue}}" ng-click="$parent.someN = {someNvalue: '{{product.someNvalue}}'}" type="button" &gt; ng-click is doing something, but I dod get any output, my list just disapears and all. I use $parent scope but it doesnt help much. Can anyone please help :)
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25935697
has title: Angular JS ng-click not working in ng-repeat like filter
type: AnsweredQuestion
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/25935697
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40601991
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40709539
has text: This looks like it's better suited to be implemented using the [plugin architecture](https://github.com/guidobouman/jquery-plugin-boilerplate).
score: 1
comment on: http://stackoverflow.com/q/25995737
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40732295
comment on: http://stackoverflow.com/q/26001805
score: 0
type: QuestionComment
type: Comment
has text: Please remove the google-chrome-app tag.

http://stackoverflow.com/q/25922127
tagged with: google-analytics
has body: How do I track all users who have logged in to an web application (database is maintained by external company) using Google Analytics or other services? Yes, I have researched and researched. I am not good a developer and I have the following Google Analytic code to track regular web analytics: &lt;script&gt; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXX-2', 'auto'); ga('send', 'pageview'); &lt;/script&gt; I have a login form and the input id is simply "email". I have a submit button. Please help. Please note that I have looked in to the documentation provided by Google Analytics and I am just simply stupid to comprehend.
tagged with: javascript
has answer: http://stackoverflow.com/a/25927876
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/40588340
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: web-services
tagged with: google-analytics-api
has answer: http://stackoverflow.com/a/25922971
score: 1
has title: Tracking user logons through user ID
type: Question

http://stackoverflow.com/a/26008886
score: 2
accepted answer of: http://stackoverflow.com/q/25905572
upvote count: 2
has body: The link you posted is documentation on the D3.js API, as I'm sure you're aware. Specifically the link talks about D3.js helper methods for making SVG paths without having to use the relatively arcane SVG path mini-language. The purpose of these helper methods is to avoid having to write in the SVG path mini-language. The output of these methods is code written in the SVG path mini-language. The input data that you want to use to feed this API is already written in the SVG path mini-language. What you seem to be asking to do is convert data that is already written in one format to a different format so that you can feed it into an API that outputs the data in the format it was originally in. The D3.js helper methods don't work well with the JSON format you're providing them. The d3.svg.line method is only designed to work with arrays of single points, not arrays of point tuples. The point tuples describe Cubic Bezier curves, something the D3.js helper methods don't support, presumably because they're not as intuitive to work with as arcs or diagonals or what have you. EDIT: removed badly hacked example The best way to make this work would be just to feed the raw SVG data back into D3.js. EDIT: You can add id and class attributes to elements using the attr() method: var path = document.getElementById('secnb1l1'); var lineData = path.attributes['d'].value; var svgContainer = d3.select("body").append("svg") .attr("width", 400) .attr("height", 400) .attr("viewBox", "50 440 100 100"); //The line SVG Path we draw svgContainer.append("path") .attr("id", "myId") .attr("class", "myClass") .attr("d", lineData) .attr("stroke", "red") .attr("stroke-width", 2) .attr("fill", "none"); .myClass { outline: 1px solid black; } &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt; &lt;svg width="0" height="0"&gt; &lt;path id="secnb1l1" class="lungon" fill="none" stroke="black" stroke-width="1" d="M 93.00,444.00 C 93.00,444.00 114.00,506.00 114.0…
has comment: http://stackoverflow.com/comment/40772081
has comment: http://stackoverflow.com/comment/40752837
has comment: http://stackoverflow.com/comment/40811664
answers question: http://stackoverflow.com/q/25905572
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40735168
has comment: http://stackoverflow.com/comment/40811335
type: Answer
has comment: http://stackoverflow.com/comment/40799543

http://stackoverflow.com/comment/40557921
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25910799
has text: Could you fall into more details please?
score: 0

http://stackoverflow.com/q/25993763
tagged with: javascript
has answer: http://stackoverflow.com/a/25994011
tagged with: jquery
has body: I have a table where I add and remove rows dynamically: @model AHBReports.Models.AdjustmentModel @using (Html.BeginForm()) { @Html.EditorFor(model => model.Adjustments) } EditorTemplate: @model AHBReports.Models.Adjustment @Html.HiddenFor(x => x.Id, new { @class = "iHidden" }) @Html.AutocompleteFor(model => model.BRANCH, "GetBranches", "Report700H") @Html.EditorFor(model => model.Amount) x Script for table manipulation: function removeRow(selector) { if ($('#container tr').length > 1) { $(selector).closest('tr').remove(); } } $(document).ready(function () { $("#btnAdd").click(function (e) { var ind = $("#container tr:last").find("input.iHidden").val(); var itemIndex = parseInt(ind); itemIndex++; console.log(itemIndex); e.preventDefault(); var newItem = $(" "+ " " + " " + " " + " x " + " "); $("#container").append(newItem); }); }); My add/delete functions work fine visually in my view, as well as when I accept the collection in my POST method: public ActionResult Adjust(AdjustmentModel model) { //working with model.Adjustments } I receive correct values. However, when I try to delete some row, which is in the middle of the table and then sumbit the form, I receive only elements that were above deleted row, for example: id branch amount 0 aaa 500 1 bbb 200 2 ccc 300 --deleted this row 3 ddd 400 Collection receives: id branch amount 0 aaa 500 1 bbb 200 So, the last row is missing. What am I doing wrong?? Thanks a lot
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/25994417
favorite count: 0
has comment: http://stackoverflow.com/comment/40706256
possible better answer: http://stackoverflow.com/a/25994417
downvote count: 0
has comment: http://stackoverflow.com/comment/40706598
has comment: http://stackoverflow.com/comment/40706844
has comment: http://stackoverflow.com/comment/40706183
type: AnsweredQuestion
tagged with: c#
score: 3
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/25994422
has comment: http://stackoverflow.com/comment/40706291
type: Question
has title: delete table row dynamically using jQuery in asp.net mvc
has answer: http://stackoverflow.com/a/25994422

http://stackoverflow.com/comment/40532142
comment on: http://stackoverflow.com/q/25896833
score: 0
type: Comment
type: QuestionComment
has text: You should post your JSON data that you're plot is using.

http://stackoverflow.com/a/25893737
has body: To get the id of the element that was clicked, you can do: $(this).attr('id'); That will return a string. So you could do: if($(this).attr('id') === 'slide-1285') { do something } $('#slide-1285') would return a jquery element, but you want just the id. I think the code above is more what you are looking for.
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25893607

http://stackoverflow.com/q/25989499
has answer: http://stackoverflow.com/a/25989635
upvote count: 1
tagged with: php
downvote count: 1
has answer: http://stackoverflow.com/a/25989803
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25989683
tagged with: forms
type: Question
has body: How to submit form using JavaScript and redirect to a URL ? &lt;form name="f1" method="get" action="aaa.php"&gt; name : &lt;input type="text" name="value_1" value=""/&gt;&lt;br&gt; age: &lt;input type="text" name="value_2" value=""/&gt; &lt;input type="submit" name="submit" value="send"/&gt; &lt;/form&gt; please see image in this link: http://image.ohozaa.com/i/4d0/zCzQIH.jpg after press submit button , i want to redirect page to www.example.com/aaa/robert/21 How can i do that ?
has comment: http://stackoverflow.com/comment/40698648
possible better answer: http://stackoverflow.com/a/25989552
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25989552
favorite count: 0
has title: How to submit form using JavaScript and redirect to a URL?
score: 0
has answer: http://stackoverflow.com/a/25989683
answer count: 4

http://stackoverflow.com/a/25927995
score: 5
has comment: http://stackoverflow.com/comment/40588637
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25927822
answers question: http://stackoverflow.com/q/25927822
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: input { max-width: 300px; width:100%; line-height: 25px; }

http://stackoverflow.com/a/25935590
score: 2
answers question: http://stackoverflow.com/q/25935537
downvote count: 0
has body: This should do the trick Reload
type: Answer
upvote count: 2

http://stackoverflow.com/q/25989280
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26016984
has comment: http://stackoverflow.com/comment/40705974
has title: How to use NanoHTTPD to show log file
accepted answer: http://stackoverflow.com/a/26135879
tagged with: ajax
tagged with: nanohttpd
has comment: http://stackoverflow.com/comment/40700727
tagged with: logging
type: AnsweredQuestion
tagged with: java
has answer: http://stackoverflow.com/a/26135879
type: Question
has body: I have written a java desktop application that accepts http requests using embedded NanoHTTPD web server https://github.com/NanoHttpd/nanohttpd, after receiving http request my desktop application makes some activity and keeps writing to log text file while executing its job, currently client opening the web page has to wait until the whole job is finished and the whole page is sent and log file is viewed, I would like the log data to be sent to client as soon as they are added to the local log file , I know this is done using ajax but I don't have time to learn it yet, simply how to make updates to some object in java reflect directly to the web page without need to send the whole page. import java.util.ArrayList; import java.util.LinkedList; import java.util.Map; import common.Logging; import common.TextFiles; import fi.iki.elonen.NanoHTTPD; import fi.iki.elonen.ServerRunner; import fi.iki.elonen.SimpleWebServer; public class TestServer extends NanoHTTPD { static boolean isDoingAJob=false; public TestServer() { super(8080); } @Override public Response serve(IHTTPSession session) { Method method = session.getMethod(); Map<String,String> params = session.getParms(); String uri = session.getUri(); System.out.println(method + " '" + uri + "' "); String msg = " Remote Test Service "; Map<String, String> parms = session.getParms(); for(String paramKey:parms.keySet()){ String job=params.get(paramKey); msg+="Status: "+(isDoingAJob?"Waited in queue.":"Immediate run."); if ("tcl".equalsIgnoreCase(paramKey)){ try { //if another request is being executed wait until finished while(isDoingAJob){ Thread.sleep(3000); } //Raise a flag while executing a test run isDoingAJob=true; SomeJobClass.doSomeWork(job.split(" ")); isDoingAJob=false; ArrayList<String> lines=TextFiles.load(Logging.getLogFile().toString()); for(String line: lines){ msg+=" "+line+" "; } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } else{ //echo help if parameter key is not tc…
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26016984

http://stackoverflow.com/a/25994085
answers question: http://stackoverflow.com/q/25993976
type: Answer
has body: If ? mean any character, you can use this regex: var regExpType = new RegExp("^ouvert|ferm.$","i");
score: 0

http://stackoverflow.com/q/25908861
has comment: http://stackoverflow.com/comment/40553912
linked to: http://stackoverflow.com/q/20644029
linked to: http://stackoverflow.com/q/123999
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/178325
has answer: http://stackoverflow.com/a/25909505
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40553432
has comment: http://stackoverflow.com/comment/40553404
tagged with: css
has title: HTML style="overflow:hidden" accessing elements inside overflow with JavaScript/jQuery?
answer count: 4
score: 2
has answer: http://stackoverflow.com/a/25909054
type: Question
has answer: http://stackoverflow.com/a/25909443
has body: I have a &lt;div&gt; that has style="overflow:hidden" and the &lt;body&gt; is a fixed size, the idea for it is to be a multi-screen display with no UI. Is there a way to access these "non-visible" elements to know which is the first element that doesn't fit on the page? I'm sure its probably something very simple, but I'm new to html and JavaScript so it makes searching for things difficult.
has answer: http://stackoverflow.com/a/25908952
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/30885559
upvote count: 3
downvote count: 0
has body: I've experienced this problem before and the solution I found was to use Blobs to download the CSV. Essentially, you turn the csv data into a Blob, then use the URL API to create a URL to use in the link, eg: var blob = new Blob([data], { type: 'text/csv' }); var hiddenElement = document.createElement('a'); hiddenElement.href = window.URL.createObjectURL(blob); Blobs aren't supported in IE9, but if you just need Chrome support you should be fine.
answers question: http://stackoverflow.com/q/26003255
type: Answer
score: 3

http://stackoverflow.com/comment/40819350
has text: @lavrton: thank you for looking at my code. Weird that you don't see the bouncing problem. I captured it in a screencast : https://vid.me/yVJ I guess it also has something to do with multiple tweens playing simultaneously. This happens when you wheel just faster than very slowly.
type: Comment
comment on: http://stackoverflow.com/q/26020017
score: 0
type: QuestionComment

http://stackoverflow.com/q/25882662
score: 3
type: Question
has body: I have a large csv file that contains a country and a corresponding piece of data for that country. In the form (excel example): [Country1, Data1], [Country2, Data2] etc How would use a loop with the csv file to produce each item in the Geocharts array. Instead of writing them all out as in the example below. function drawRegionsMap() { var data = google.visualization.arrayToDataTable([ ['Country', 'Popularity'], ['Germany', 200], ['United States', 300], ['Brazil', 400], ['Canada', 500], ['France', 600], ['RU', 700] ]); I'm not really sure how to work with the csv file as I haven't worked with them in js before, however I did stumble upon the jquery-csv tool at https://github.com/evanplaice/jquery-csv but am not really understanding it fully.
has title: How can I loop a csv file with countries and data in a Google Geochart?
tagged with: google-visualization
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
answer count: 1
tagged with: jquery-csv
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25944002

http://stackoverflow.com/a/25985555
score: 0
answers question: http://stackoverflow.com/q/25985387
type: Answer
type: AcceptedAnswer
has body: Change var li = $(this).contents(); to var li = $(this); .contents() doesn't work because it returns the children of the matched element(s) (e.g. the a tag in this case).
accepted answer of: http://stackoverflow.com/q/25985387

http://stackoverflow.com/q/25939672
tagged with: css
has comment: http://stackoverflow.com/comment/40609949
has comment: http://stackoverflow.com/comment/40609775
duplicate of: http://stackoverflow.com/q/754607
type: Question
tagged with: javascript
tagged with: jquery
has body: I'm wondering whether there is a JQuery function that I can use to apply the CSS from a given element to another element. I'm talking about the exact CSS; nothing more applied due to inheritance. To be more specific: Here is some text. Here is some other text. If JQuery has such a function, it will save me an hour of trying to use my own stylesheet (I'm using a CMS that has a master style sheet that I can't change) to figuring out how to override/add a million properties.
upvote count: 2
score: 0
downvote count: 2
has answer: http://stackoverflow.com/a/25939830
linked to: http://stackoverflow.com/q/754607
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40609861
favorite count: 0
has title: Is there a JQuery function to give a selected element the same CSS as another element?
type: UnansweredQuestion

http://stackoverflow.com/a/25937397
has comment: http://stackoverflow.com/comment/111951566
score: 18
has comment: http://stackoverflow.com/comment/116803088
answers question: http://stackoverflow.com/q/25924057
upvote count: 19
has comment: http://stackoverflow.com/comment/115163231
type: Answer
has comment: http://stackoverflow.com/comment/112266296
has body: This feature is implemented by defining a custom function and then using it as a tag (dontIndent above). The code blow is from Zenparsing's gist: function dedent(callSite, ...args) { function format(str) { let size = -1; return str.replace(/\n(\s+)/g, (m, m1) =&gt; { if (size &lt; 0) size = m1.replace(/\t/g, " ").length; return "\n" + m1.slice(Math.min(m1.length, size)); }); } if (typeof callSite === "string") return format(callSite); if (typeof callSite === "function") return (...args) =&gt; format(callSite(...args)); let output = callSite .slice(0, args.length + 1) .map((text, i) =&gt; (i === 0 ? "" : args[i - 1]) + text) .join(""); return format(output); } I've successfully tested it in Firefox Nightly:
downvote count: 1

http://stackoverflow.com/comment/40761002
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26023689
has text: That did the trick. I will store it in my mind for future reference ;) Thanks a lot!
type: AnswerComment

http://stackoverflow.com/q/25899437
has comment: http://stackoverflow.com/comment/44963847
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40536710
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: HTML PAGE: &lt;div&gt; &lt;ul ng-repeat='label in artifactClassification' &gt; &lt;li &gt; &lt;div ng-repeat='ClassificationTree in goTillRoot(label)'&gt;{{ClassificationTree}}&lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; Above is the HTML template that I have. To give you a quick idea artifactClassification is an JSON. label is an object. I am passing this label in an function in JS that return ClassificationTree which is an array of strings (of any size). What I am trying to do is create a table like structure that will display this array of array of string. The restriction is there could only be two columns. This should look something like: xyz xyz1 abc abc1 pqr pqr1 mno dsh asd 234 as3 ff4 as3 ass The above represents an array( here we have 5 arrays of string). The number could be anything. I need help design this structure. Not sure what to use or where to begin from The output that i am getting right now : xyz abc asd asd a1d sad sad
answer count: 0
type: UnansweredQuestion
type: Question
has title: Designing a table like structure for an array of array of strings

http://stackoverflow.com/comment/40526142
comment on: http://stackoverflow.com/a/25875244
score: 0
type: Comment
has text: @user1032531, I've edited my answer accordingly. I don't need to know why you cannot do this on the server side. However, I'm very curious why you're changing a value on a form. Why not just validate the form so that the value is entered correctly in the first place? In other words, what's the point of having a form to collect data if you're going to over-ride it?
type: AnswerComment

http://stackoverflow.com/a/25912941
answers question: http://stackoverflow.com/q/25903370
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25903370
has comment: http://stackoverflow.com/comment/53648682
type: Answer
upvote count: 11
has comment: http://stackoverflow.com/comment/53648558
score: 11
has comment: http://stackoverflow.com/comment/43283099
has body: CasperJS doesn't use Safari. In fact, it can only use PhantomJS and SlimerJS headless browsers for its automation. Therefore, it cannot work with Chrome either. You are probably hitting a site that does user-agent detection. When a browser makes an HTTP request, it typically includes a request header called User-Agent which contains information used to identify the browser and other technologies and their versions. For instance: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 As you have discovered, you can configure your user-agent string in CasperJS using: casper.userAgent('Your User-Agent String Here'); There are many lists online of well known user-agent strings.

http://stackoverflow.com/comment/40568659
type: Comment
has text: I have now tried posting a message, an activity and tried to get the current user. All of the requests come back access denied. The latest is pretty simple: function getUser() { yam.request({ url: "https://www.yammer.com/api/v1/users/current.json", method: "GET", success: function (msg) { alert("Get was Successful!: " + msg); }, error: function (msg) { console.dir(msg); } }) }
type: AnswerComment
comment on: http://stackoverflow.com/a/25916579
score: 0

http://stackoverflow.com/comment/40597455
type: QuestionComment
has text: Thanks Alnitak, what would be the correct way to refer to the object from methods within itself?
type: Comment
comment on: http://stackoverflow.com/q/25931873
score: 0

http://stackoverflow.com/a/25993039
type: Answer
has comment: http://stackoverflow.com/comment/40706880
has comment: http://stackoverflow.com/comment/40704959
score: 0
has body: jConfirm doesn't create alert boxes, it creates a HTML element which looks like an alert box. The important difference here is that an alert() box will stop Javascript execution until it's closed, so alert(1); console.log(2); will alert first, then log to the console. Since jConfirm doesn't use alert(), if you call jConfirm(1, ...); console.log(2) it will show the confirm box (HTML), then write to the console a split-second later. The complicated-words version of this is that alert() is synchronous - it locks the script execution until you've chosen something from the alert. jConfirm is asynchronous, and the script execution continues independently of your choice until you choose something, at which point it triggers a callback function.
has comment: http://stackoverflow.com/comment/40707165
has comment: http://stackoverflow.com/comment/40705432
has comment: http://stackoverflow.com/comment/40707252
has comment: http://stackoverflow.com/comment/40705179
has comment: http://stackoverflow.com/comment/40704863
has comment: http://stackoverflow.com/comment/40707862
has comment: http://stackoverflow.com/comment/40705491
has comment: http://stackoverflow.com/comment/40705278
answers question: http://stackoverflow.com/q/25992970
has comment: http://stackoverflow.com/comment/40706138

http://stackoverflow.com/comment/40527195
has text: "You sure found an excellent way to complicate that one" lol thanks for the help. As you can tell I'm new to web dev!
comment on: http://stackoverflow.com/a/25894438
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25954434
type: Answer
answers question: http://stackoverflow.com/q/25954221
has comment: http://stackoverflow.com/comment/40634483
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40639189
has body: Fortunately, english numbering is resonably consistent, apart from the tens. You would need to define the strings for 'one' to 'nineteen', all the tens from 'twenty' to 'ninety', 'hundred', 'thousand', 'million', etc. Then, for the parser, parse the string to tokens (basically split it). If you like, you can convert the tokens to numbers, or you can leave them as strings if you like. I use numbers here, because it's a bit shorter. :) So, if you have a string of "four thousand hundred and eighty five", you could parse this to the tokens: 4 1000 100 80 5 (you can discard the word 'and', as well as commas and other noise.) Then, you can process this string from the back in the following very simplified pseudo code. Total = 0; Multiplicator = 1; repeat Number = ReadNumber || 1; Total += Multiplicator * Number; Multiplicator = ReadMultiplicator; The multiplicator are 10, 20, 30 .. 100, 1000, 1000000 The numbers are 1 .. 19. These are optional. If there is no number found, treat it as if one was read. So in the end, you should treat the string as 4 1000 1 100 1 80 5 Which should be processed as 5 + 1 * 80 + 1 * 100 + 4 * 1000 I said the pseudo code is very simplified. First of all, your parsed needs to be able to 'peek' ahead. If the preceding token isn't a number, it must be a multiplicator, so it should not be skipped. Furthermore, you want some extra checks. After all, numbers until 100 are special. You wouldn't want to parse the string "three eighty four" to 244. And then you need some extra layer. What about "eighty five thousand"? It looks like you shouldn't read just one number before a multiplicator, but actually all tokens that are smaller than the multiplicator, and parse them together, so one hundred sixty thousand Should be parsed as (1 100 1 60) 1000 You might add extra checks in that piece later, although you can do without at first. After all, "thousand million" is actually a "billion", but it will parse correctly and even give the right outcome. So, I thin…
accepted answer of: http://stackoverflow.com/q/25954221

http://stackoverflow.com/comment/40658667
comment on: http://stackoverflow.com/q/25967298
score: 0
type: Comment
type: QuestionComment
has text: Maybe its wrong url? try `loadScript("http://cdnjs.cloudflare.com/ajax/libs/q.js/1.0.1/q.js");`

http://stackoverflow.com/q/25966410
possible better answer: http://stackoverflow.com/a/25966436
has answer: http://stackoverflow.com/a/25966436
tagged with: javascript
tagged with: jquery
score: 2
has answer: http://stackoverflow.com/a/25967285
has answer: http://stackoverflow.com/a/25966506
accepted answer: http://stackoverflow.com/a/25966467
downvote count: 0
has title: Move element to the end of parent element
favorite count: 0
has answer: http://stackoverflow.com/a/25966748
upvote count: 2
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: I have the following HTML in my application: I'd like to take any element that has class text-container, and if it's the first element under work-item, move it after the div with class image-container, so that every div element looks like I tried just removing it first with this: $(".work-item .text-container:first-child").remove(); And that worked fine, but when I tried to move it with this, it didn't work at all, nothing happened: $("#work .work-item .text-container:first-child").insertAfter($(this).parent()["last-child"]); Anyone know what I'm doing wrong here?
has answer: http://stackoverflow.com/a/25966467
type: Question

http://stackoverflow.com/q/26014033
favorite count: 0
has title: How to handle onclick even in bootstrap multiselect?
possible better answer: http://stackoverflow.com/a/26015290
type: AnsweredQuestion
score: 1
tagged with: bootstrap-multiselect
type: Question
accepted answer: http://stackoverflow.com/a/26015293
has answer: http://stackoverflow.com/a/26015290
tagged with: javascript
has body: I have a drop down for which i have added bootstrap multiselect. All all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 all_content1 separate_content1 separate_content2 I have added multiselect like this, $("#selectoption").multiselect(); In bootstrap multiselect they have their own select all option which i don't want to use it here. I want "select-all" logic which toggles the selection up to "opt8". Please help.
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26015293
downvote count: 0

http://stackoverflow.com/comment/40624887
has text: Hey thanks by the way, it's also working. I don't mind implementing it with jquery.
type: AnswerComment
comment on: http://stackoverflow.com/a/25948619
type: Comment
score: 1

http://stackoverflow.com/comment/40814709
comment on: http://stackoverflow.com/a/25949819
score: 0
type: AnswerComment
has text: @XtraSimplicity: in a good answer it's required to explain your code and why is it working.
type: Comment

http://stackoverflow.com/q/25989713
has answer: http://stackoverflow.com/a/25989900
accepted answer: http://stackoverflow.com/a/25989812
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25989812
possible better answer: http://stackoverflow.com/a/25989839
type: Question
score: -2
has title: JavaScript Module issue?
has body: Module = (function () { var Method = function () { this.doSomething =function () { return "doSomething"; }; } return { Method:Method }; })(); var value=Module.Method.doSomething; console.log(value); New to Javascript, coming from a java background. Why is value coming back as undefined? Cheers.
answer count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/25989839
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/26013347
has comment: http://stackoverflow.com/comment/40744643
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/40741831
tagged with: vbscript
type: Question
has comment: http://stackoverflow.com/comment/40742815
downvote count: 0
tagged with: powershell
tagged with: javascript
linked to: http://stackoverflow.com/q/2969321
tagged with: windows
duplicate of: http://stackoverflow.com/q/2969321
favorite count: 0
has body: I was interested in being able to take a screenshot of the screen, or of the active window (as you would do with Alt+PrtSc), using only standard Windows "tools"/scripts. VB Script? PowerShell? No 3rd party software or something like that. You shouldn't have to install anything or need any admin permission that you normally wouldn't have. The reason for this is for people who have issues on their computer (and who aren't close to computer gurus) would be able to send in a ticket to the helpdesk just using a button on a website for example. For some people to find the right buttons to take a screenshot and attaching it in an email is surprisingly cumbersome. I found a very nice solution to this but it only works in browsers and not in other application windows: Using HTML5/Canvas/JavaScript to take screenshots Thanks in advance!
tagged with: screenshot
type: UnansweredQuestion
has title: Take screenshot of screen or active window not using 3rd party software
upvote count: 1
has comment: http://stackoverflow.com/comment/40749076

http://stackoverflow.com/q/25929863
has title: What event is fired by Safari when the bottom sidebar disappears?
favorite count: 0
accepted answer: http://stackoverflow.com/a/25929895
tagged with: events
has body: In Safari (iOS7, iOS8) a bottom bar is present at the loading off the page. Once you scroll down, it disappear, switching the viewport to a greater height. Is there an event fired by the browser that we can catch and use to execute some code (to take advantage of the greater space created) ?
upvote count: 1
tagged with: safari
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25929895
type: Question
tagged with: ios
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25952597
type: AcceptedAnswer
type: Answer
has body: You can use textContent and not var keyword to read the x value. → document.getElementById('Test').textContent=x; Insert Given: Insert Statement to Prove: Submit Step Number Step Explaination 1 Given
answers question: http://stackoverflow.com/q/25952520
accepted answer of: http://stackoverflow.com/q/25952520
score: 0

http://stackoverflow.com/q/26028032
tagged with: regex
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9002771
has title: Why does String.match return duplicate item in result array?
accepted answer: http://stackoverflow.com/a/26028099
score: 1
has comment: http://stackoverflow.com/comment/40769359
has body: Why does "abc123".match(/(\d{3})/) return [ "123", "123" ] instead of just ["123"] Isn't the expression equivalent to find exactly three digits?
type: Question
has answer: http://stackoverflow.com/a/26028099
tagged with: javascript
upvote count: 3
downvote count: 2
duplicate of: http://stackoverflow.com/q/9002771
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/65724769
type: Comment
comment on: http://stackoverflow.com/a/25898717
has text: I feel a little more info on what ^1.0.0 does would have been great for the people that come to this question when googling for help on npm.
type: AnswerComment
score: 4

http://stackoverflow.com/a/25955225
downvote count: 0
has body: If you just want integers, you can use an object of key values to build the numbers from individual words- function wordsToNumber(s){ var w= s.toLowerCase().replace(/(thousand|[mbr]illion),?/g, '$1,'); var n= 0, nArray= w.split(/,/), sub= 0, tem, segment, nwords={ billion: 1e9, eight: 8, eighteen: 18, eighty: 80, eleven: 11, fifteen: 15, fifty: 50, five: 5, forty: 40, four: 4, fourteen: 14, hundred: 100, million: 1e6, nine: 9, nineteen: 19, ninety: 90, one: 1, quadrillion: 1e15, seven: 7, seventeen: 17, seventy: 70, six: 6, sixteen: 16, sixty: 60, ten: 10, thirteen: 13, thirty: 30, thousand: 1e3, three: 3, trillion: 1e12,twelve: 12, twenty: 20, two: 2, zero: 0 }; while(nArray.length){ sub= 0; segment= nArray.shift().match(/[a-z]+/g) || []; segment.forEach(function(w2){ tem= nwords[w2.trim()]; if(isFinite(tem)){ if(tem<100) sub+= tem; else sub*= tem; } }); n+= sub; } return n; } var str= 'twenty two thousand one hundred and fifty one'; wordsToNumber(str); /* returned value: (Number) 22151 */ For more capability, you can write more code- Number Words
answers question: http://stackoverflow.com/q/25954221
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40639338

http://stackoverflow.com/a/25962792
answers question: http://stackoverflow.com/q/25962562
has comment: http://stackoverflow.com/comment/40650370
type: Answer
has comment: http://stackoverflow.com/comment/40650239
has comment: http://stackoverflow.com/comment/40650255
has comment: http://stackoverflow.com/comment/40650518
has comment: http://stackoverflow.com/comment/40650265
has body: based on your last comment, the easiest logic would be something like this: var changed=false; $('#title-editable').on('vclick',function(event){ event.preventDefault(); console.log("First handler fired."); changed=true; }); $(document).on("vclick",function(){ if(changed){ console.log("Second handler fired."); //here you can revert your actions and then the next line changed=false; } }); UPDATE: The Second Theory: you said that an ancestor gets a class on click of #title-editable so you can try the code below: $(document).on("vclick",function(event){ if($('#title-editable').parent().hasClass('givenClass')){ //assuming the class is called "givenClass" and the ancestor is the parent of "#title-editable" (you need to sort that out) console.log("Second handler fired."); //here you can revert your actions and then the next line } else{ event.preventDefault(); console.log("First handler fired."); } }); The Third Theory: $(document).on("vclick",function(event){ if(!$('#title-editable').is(':visible')){ console.log("Second handler fired."); //here you can revert your actions and then the next line } else{ event.preventDefault(); console.log("First handler fired."); } }); The Fourth Theory: $(document).on("vclick",function(event){ if(!$('#title-editable').is(event.target) || !$('#title-editable').has(event.target)){ console.log("Second handler fired."); //here you can revert your actions and then the next line } else{ event.preventDefault(); console.log("First handler fired."); } });
score: 0
has comment: http://stackoverflow.com/comment/40649949

http://stackoverflow.com/a/26027553
type: Answer
answers question: http://stackoverflow.com/q/26017715
score: 0
has body: The user should get a choice of where to save files. Its only fair, since the download is going onto their machine. In Chrome and Firefox there is a choice in settings that (in Firefox) defaults to always saving the files to the Downloads folder. The user chose to always save to the same folder by not changing that setting. They could just as easily change to the next setting saying "Always ask me where to save files." But THEY choose, not the website. If Microsoft had a similar option the user could choose it, but you (i.e. any server-side code) cannot.

http://stackoverflow.com/comment/40571780
type: Comment
comment on: http://stackoverflow.com/q/25918596
has text: post your html please
score: 0
type: QuestionComment

http://stackoverflow.com/a/25959177
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25959156
upvote count: 2
has body: Use bind to perform partial function application. ShowPopupWithCallback("MyController/Load", alertCallback.bind(null, "My Message"));
type: Answer

http://stackoverflow.com/q/26017193
has body: I want to remove array item on each click. Onclick of get_values button, displays array items in front of delete button/link. I need to remove those item on each click of delete button. It deletes whole item, but i want one by one. Plz help me. I am new to jquery. Name State Color
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/25970814
has comment: http://stackoverflow.com/comment/40749022
type: Question
has comment: http://stackoverflow.com/comment/40748724
has answer: http://stackoverflow.com/a/26017346
has title: remove array items from array list in jquery using javascript
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/40631474
has text: Hard to say without the full code, but you need to understand why the "external" parameter of the function apply_link is void in your not working exemple.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25920021

http://stackoverflow.com/comment/40822732
score: 0
type: AnswerComment
has text: Yes OK I did the changes... I probably made a mistake... OK :)
type: Comment
comment on: http://stackoverflow.com/a/25937170

http://stackoverflow.com/comment/40669489
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25973724
has text: I agree, but this is not done on server-side so I cannot store any token for an invitation which I can use later. I have read that the facebook invite feature can be done only via JS and not on server side. So I cannot know in advance which user received an invitation and which didnt and who sent it.

http://stackoverflow.com/comment/40732677
has text: If you want someone to review your code you should ask on [codereview.se]
score: 0
comment on: http://stackoverflow.com/q/26008070
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/106909899
type: Comment
score: 1
comment on: http://stackoverflow.com/a/44410762
type: AnswerComment
has text: This packages contains literally 8 lines of code. Everything else is tests, package description, license, readme and other stuff.

http://stackoverflow.com/comment/40629898
type: QuestionComment
comment on: http://stackoverflow.com/q/25951490
has text: @dandavis: Yes, I know about that. At least Socket.IO has a [documentation page](http://socket.io/docs/using-multiple-nodes) for this.
score: 0
type: Comment

http://stackoverflow.com/a/25891706
has body: Try the following Code to Insert $count = $pdo-&gt;exec("INSERT INTO $STAT_TABLE(ip, email, prgm, options, datasize, date) VALUES ('$ip','$email',$prgm_name,'$prgm_options','$datasize',$now)))"); /*** echo the number of affected rows ***/ echo $count;
score: 0
has comment: http://stackoverflow.com/comment/40523437
answers question: http://stackoverflow.com/q/25891150
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40532147
has comment: http://stackoverflow.com/comment/40529354

http://stackoverflow.com/q/25914429
tagged with: jquery
favorite count: 0
has body: I'm trying to get the zoom and panning working on a Flot plot with a logarithmic x-axis. However, whenever I zoom or pan all the points on the plot vanish and I have to refresh. Link to jsfiddle is below. I have the following options set up where I have hard coded the ticks: var options1 = { lines: { show: true }, yaxis:{ panRange: [0,6000] }, xaxis :{ panRange: [0,20], ticks:[0.00000001, 0.0000001, 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1.0], transform: function (v) { return Math.log(v); }, }, zoom: {interactive: true}, pan: {interactive: true} }; JSFiddle link Any help would be greatly appreciated!
accepted answer: http://stackoverflow.com/a/25916573
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25916573
has title: Flot zooming and panning with logarithmic axis
tagged with: flot
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40587187
comment on: http://stackoverflow.com/q/25927195
type: QuestionComment
type: Comment
score: 3
has text: will always `lastChecked = this; `

http://stackoverflow.com/a/26006802
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26006385
has comment: http://stackoverflow.com/comment/40730470
answers question: http://stackoverflow.com/q/26006385
type: AcceptedAnswer
type: Answer
has body: Try $(document).ready(function() { var pList = new Object(); pList["test"] = "test"; //this is being deleted from BOTH instances of the Obj pList["test1"] = "test1"; pList["test2"] = "test2"; pList["test3"] = "test3"; pList["test4"] = "test4"; // extend `pList` to `_pList` object var _pList = $.extend({}, pList); displayData(_pList); console.log(pList, "original"); }); function displayData(badData){ delete badData.test; console.log(badData, "extended"); } jsfiddle http://jsfiddle.net/guest271314/rwux4rta/6/
score: 1
upvote count: 1

http://stackoverflow.com/comment/40619639
has text: Put it in your HTML file where you now have nullcheck() and make sure the id= attributes in the form match those in `document.getElementById()`.
type: Comment
comment on: http://stackoverflow.com/a/25944045
type: AnswerComment
score: 0

http://stackoverflow.com/q/25881707
has title: Class use in different element (other jQuery selector not working)?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25881764
score: 0
has answer: http://stackoverflow.com/a/25881744
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25881759
has body: Can someone explain to me or point me to other solution for this: class fruit is in two different tag element, and one element has add class use in jquery selector, but the alertbox is not showing. ("add is clicked") Apple Apple 2 Banana Banana 2 Also when i clicked the Apple link, i want the two alert box to show. see this FIDDLE for demo. $('.add').off("click").on("click", function () { alert("add is clicked"); }); $('.fruit').off("click").on("click", function () { alert("fruit is clicked"); });
has answer: http://stackoverflow.com/a/25881786
type: Question
has answer: http://stackoverflow.com/a/25881770

http://stackoverflow.com/a/25935546
upvote count: 4
has comment: http://stackoverflow.com/comment/40605120
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40633134
type: Answer
score: 4
accepted answer of: http://stackoverflow.com/q/25935445
has comment: http://stackoverflow.com/comment/40605997
answers question: http://stackoverflow.com/q/25935445
has body: Use a setTimeout and a clearTimeout. var t = null; window.onResize(function() { if (t!= null) clearTimeout(t); t = setTimeout(function() { ... }, 500); }} During the dragging the timeout is Always cleared and nothing happen. But when the user stop dragging it run the last setTimeout and will execute your code.

http://stackoverflow.com/q/25974572
possible better answer: http://stackoverflow.com/a/25974660
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25974660
tagged with: loops
accepted answer: http://stackoverflow.com/a/25974619
type: Question
tagged with: for-loop
tagged with: javascript
has comment: http://stackoverflow.com/comment/40672158
has title: Loop by user input problems?
has answer: http://stackoverflow.com/a/25974633
score: 0
answer count: 3
tagged with: user-input
has answer: http://stackoverflow.com/a/25974619
has body: I'm trying to make a small program to take 3 user inputs, and make a loop out of it. For example, user says he wants to start from the number 5 up to the number 25 and count by 5, so the program will execute : "5 10 15..." But I seem to fail and I couldn't find what I'm doing wrong. HTML/JS Counter The Counter Start from Up to Count By Start the Counter! CSS fieldset { width: 50%; margin-left: auto; margin-right: auto; } input { width: 20%; color: red; } h1 { text-align: center; } button { margin-left: auto; margin-right: auto; } Thanks.
linked to: http://stackoverflow.com/q/86513

http://stackoverflow.com/comment/40691238
score: 0
type: Comment
type: QuestionComment
has text: You dont need `$scope.$apply()` there. See this http://plnkr.co/edit/g1pBmU?p=preview I have deliberately wrapped in setTimeout, which does not trigger any digest cycle itself. Your issue could be elsewhere. digest cycle gets invoked after every promise chain.
comment on: http://stackoverflow.com/q/25985152

http://stackoverflow.com/q/26032964
type: AnsweredQuestion
has body: I am new to nodeJS and grunt. I have this Gruntfile in this project and I want to do live reload for all the html files in my project, so that I do not have to refresh my browser all the time to detect new changes. Somehow I encounter error with the following code: module.exports = function (grunt) { // Project configuration. grunt.initConfig( { // Task configuration. jshint: { options: { curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, sub: true, undef: true, unused: true, boss: true, eqnull: true, browser: true, globals: {} }, gruntfile: { src: 'Gruntfile.js' }, lib_test: { src: ['lib/**/*.js', 'test/**/*.js'] } }, connect: { server: { options: { hostname: 'localhost', port: 80, base: 'src', keepalive: true, livereload: true } } }, watch: { options: { livereload:true } } }); // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-watch'); // Default task. grunt.registerTask('default', ['connect', 'watch']); }; It seems that when I start 'grunt default' it would not execute task watch because during connect it is keepalive. I will be grateful if any1 can explain to me why I have this error when JSHint check my code and suggest a solution to this.
has title: Live reload using grunt-contrib-connect and grunt-contrib-watch
type: Question
tagged with: grunt-contrib-connect
accepted answer: http://stackoverflow.com/a/26512014
tagged with: javascript
tagged with: gruntjs
score: 4
possible better answer: http://stackoverflow.com/a/26033379
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/26512014
downvote count: 0
favorite count: 0
tagged with: grunt-contrib-watch
has answer: http://stackoverflow.com/a/26033379
tagged with: node.js

http://stackoverflow.com/q/25899588
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has body: I am using angular.js. I have a controller for my navbar which looks as follows. var controllers = angular.module('controllers', []); controllers.controller('NavbarController', ['$scope', '$http', function ($scope, $http) { $http.get('/api/courses') .success(function(data) { $scope.courses = data.objects; }); } ]); This will give me all the courses which have been created. I put it on the navbar like so: &lt;ul class="dropdown-menu"&gt; &lt;li ng-repeat="course in courses"&gt; &lt;a href="#/course/course_id/{{ course.id }}"&gt;{{ course.name }}&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; This works when I load my page. However, I have a form to create a NEW course, which also works. However, after this has been successfully submitted, the navbar will not contain the class until I completely reload the page. This is my controller which creates a new course. controllers.controller('CreateCourseController', ['$scope', '$http', function($scope, $http) { $scope.form_data = {}; $scope.submitForm = function() { $http.post('/api/courses', $scope.form_data). success(function(data) { // here, I want to add this item into the navbar selection somehow }); } } ]); what would be the best way in angular to add this newly added class into the navbar, cleanly?
tagged with: javascript
tagged with: jquery
has title: How do I reload my navbar upon a successful form submission?
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25900570
tagged with: angularjs
has answer: http://stackoverflow.com/a/25900570

popup
tags question: http://stackoverflow.com/q/26021705
type: Tag
tag name: popup
tags question: http://stackoverflow.com/q/26029469
tags question: http://stackoverflow.com/q/25975471
tags question: http://stackoverflow.com/q/25945321
tags question: http://stackoverflow.com/q/25905402
tags question: http://stackoverflow.com/q/25990695
tags question: http://stackoverflow.com/q/26016970
tags question: http://stackoverflow.com/q/26007391

http://stackoverflow.com/comment/40671789
score: 0
has text: `$(this).index()` will return the index compared to all it's siblings regardless if it's hidden or not - by doing `$(".getIndex").not('.hidden').index(this)` you are getting the index of the current element compared to the set of elements in the selector
type: Comment
comment on: http://stackoverflow.com/a/25974870
type: AnswerComment

http://stackoverflow.com/comment/69712444
has text: long click and ctrl+click works in Network too, but only if you enable multiselect..
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25988854
type: Comment

http://stackoverflow.com/a/26016615
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40747812
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40751439
accepted answer of: http://stackoverflow.com/q/26016280
has comment: http://stackoverflow.com/comment/40747685
answers question: http://stackoverflow.com/q/26016280
has body: use the below funcition, i.e $('.label-pointer') instead of list.find('label') $('.label-pointer').click(function () { if ($(this).siblings('ul').length &gt; 0) { console.log($(this).siblings('ul')); $(this).siblings('ul').toggle(); } }) instead of list.find('label').click(function () { if ($(this).siblings('ul').length &gt; 0) { console.log($(this).siblings('ul')); $(this).siblings('ul').toggle(); } })

http://stackoverflow.com/comment/40703799
type: Comment
has text: then `redirect('/main/accsettings');` should work, you are trying to redirect page on same action `main/accsettings` this is wrong..
comment on: http://stackoverflow.com/a/25991606
type: AnswerComment
score: 0

http://stackoverflow.com/comment/67650522
type: Comment
has text: Which version of chart.js are we talking about?
type: QuestionComment
comment on: http://stackoverflow.com/q/25880767
score: 0

http://stackoverflow.com/comment/40678110
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25977707
has text: That makes sense. I added `var DatePicker = require("react-datepicker");` and when I compile, I get: `path.js:313 throw new TypeError('Arguments to path.resolve must be strings');`
type: AnswerComment

http://stackoverflow.com/a/26003233
has body: You don't need to be connected or use Oauth2 to search something with the YouTube API. You only need an api key. A sample example : function googleApiClientReady() { var apiKey = 'YOUR_API_KEY'; gapi.client.setApiKey(apiKey); gapi.client.load('youtube', 'v3', function() { isLoad = true; }); request = gapi.client.youtube.search.list({ q: q, part: 'snippet' }); request.execute(function(response) { //your code to here }); } Don't forget to add this file to your index.html and add this following line after : &lt;script src="https://apis.google.com/js/client.js?onload=googleApiClientReady"&gt;&lt;/script&gt; From doc YouTube API
has comment: http://stackoverflow.com/comment/40730804
type: Answer
accepted answer of: http://stackoverflow.com/q/26002924
answers question: http://stackoverflow.com/q/26002924
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25977358
answers question: http://stackoverflow.com/q/25976215
has body: If I understand what you are trying to achieve, you want to be able to get an array of all those campaigns that exist after the non-applicable ones have been filtered out? If so, you could declare you campaign select like this: Then you have the filtered array aviable in the scope property filteredCampaigns. Here is an attempt to demonstrate this in action. I made some assumptions about how you are trying to do this, since you didn't mention your controller or view code. var app = angular.module('app', []); app.controller('MainCtrl', function($scope) { $scope.filter = { 'campaign.id': [] } $scope.campaigns = [{ client_id: 1, id: 1, name: 'campaign 1' }, { client_id: 1, id: 2, name: 'campaign 2' }, { client_id: 1, id: 3, name: 'campaign 3' }, { client_id: 2, id: 4, name: 'campaign 4' }, { client_id: 2, id: 5, name: 'campaign 5' }, { client_id: 3, id: 6, name: 'campaign 6' }, ]; $scope.clientIds = [1]; $scope.$watch('filteredCampaigns', function(val) { $scope.filter['campaign.id'] = val.map(function(item) { return item.id }); }); }) .filter('campaignFilter', function() { return function(options, client_ids) { if (client_ids == null) { return options; } else { filtered = []; angular.forEach(options, function(option) { if (client_ids.indexOf(option.client_id) > -1) { filtered.push(option); }; }); return filtered; } } }); Campaign Client id: filter['campaign.id']: {{ filter['campaign.id']}}
type: Answer
has comment: http://stackoverflow.com/comment/40678164
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40676892
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25976215
has comment: http://stackoverflow.com/comment/40678975

http://stackoverflow.com/q/25940068
has body: I am trying to draw a Google visualization pie chart based on below JSON. I am having issues since Google takes numerical data, instead of just plain objects. For example, I want a pie chart based on UseCase. Pie chart will list VDI,Upgrade,DEMO and show its proportion related to total. Please help. Here is the JSON example [{"Id":0,"ProcessedTime":"2012/01","Approver":"zoo","POC":"POC1","UseCase":"VDI"},{"Id":0,"ProcessedTime":"2012/02","Approver":"zoo","POC":"POC1","UseCase":"Upgrade"},{"Id":0,"ProcessedTime":"2012/03","Approver":"zoo","POC":"POC2","UseCase":"DEMO"},{"Id":0,"ProcessedTime":"2012/04","Approver":"victor","POC":"POC2","UseCase":"DEMO"},{"Id":0,"ProcessedTime":"2012/05","Approver":"victor","POC":"POC3","UseCase":"VDI"},{"Id":0,"ProcessedTime":"2012/06","Approver":"victor","POC":"POC3","UseCase":"Upgrade"},{"Id":0,"ProcessedTime":"2012/05","Approver":"tom","POC":"POC3","UseCase":"VDI"},{"Id":0,"ProcessedTime":"2012/06","Approver":"tom","POC":"POC3","UseCase":"Upgrade"}] // Full source google.setOnLoadCallback(drawChart); function drawChart() { $.get('/Home/GetData', {}, function (data) { var tdata = new google.visualization.DataTable(); tdata.addColumn('string', 'UseCase'); tdata.addColumn('int', 'Count'); // Reservation based on UseCase var ReservationByUseCase = []; for (var i = 0; i &lt; data.length; i++) { var d = data[i]; // If not part of array.. Add it if ($.inArray(d.UseCase, ReservationByUseCase) === -1) { var UseCaseValue = d.UseCase; var UseCaseCountValue = 1; ReservationByUseCase.push({ UseCase: UseCaseValue, UseCaseCount: UseCaseCountValue }); } // If part of the array.. Increase count if ($.inArray(d.UseCase, ReservationByUseCase) !== -1) { var cUseCase = ReservationByUseCase[$.inArray(d.UseCase, ReservationByUseCase)]; cUseCase.UseCaseCount = cUseCase.UseCaseCount + 1; ReservationByUseCase[$.inArray(d.UseCase, ReservationByUseCase)] = cUseCase } } for (var i = 0; i &lt; ReservationByUseCase.length; i++) { tdata.addColumn(ReservationByUse…
tagged with: javascript
has answer: http://stackoverflow.com/a/25942619
has answer: http://stackoverflow.com/a/25940175
score: 0
answer count: 2
type: UnansweredQuestion
has title: Processing javascript objects with google charts
type: Question
tagged with: google-visualization

http://stackoverflow.com/q/26011610
tagged with: javascript
has body: I couldn't find the similar question to this one, if there's one please guide me to the light. I have following snippet of code: var GUD = function() { var all = [1,2,3,4,5]; return { getAll : function() { return all; } } }(); So a simple function hidding all variable and exposing the same through getAll method. Why is it possible to alter the all array by using: GUD.getAll() //[1, 2, 3, 4, 5] GUD.getAll().splice(0,1) //[1] GUD.getAll() //[2, 3, 4, 5] Thanks
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/26011907
accepted answer: http://stackoverflow.com/a/26011907
possible better answer: http://stackoverflow.com/a/26011778
type: AnsweredQuestion
has title: JS : Data being altered through exposed method?
score: 1
has answer: http://stackoverflow.com/a/26011778
type: Question
answer count: 2
tagged with: closures
downvote count: 0

http://stackoverflow.com/a/52779171
has body: You can also use this /(kr|$|£|€)/. currencySymbol = format.match(/(kr|$|£|€)/);
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25910808

http://stackoverflow.com/comment/40539711
type: AnswerComment
type: Comment
score: 0
has text: Yes, absolutely. As mentionned my solution is a quick one. You could create a custom function to apppend/remove class names if you need to support multiple class names, or use classList.
comment on: http://stackoverflow.com/a/25900910

http://stackoverflow.com/q/25899411
has answer: http://stackoverflow.com/a/25900938
tagged with: css
has body: Okay, I've seen a few things that sort of * answer my question, but none of them quite do what I want to do / I'd like to understand how to do this myself from start to finish as a learning exercise. I'm a novice at all this, so bear with me! What I'm Trying to Do: I have a black page and I'd like 20-30 small, white div boxes to fadeIn at random positions on the page (like stars is sort of the vibe I'm going for). Ideally, they wouldn't overlap and they would be randomly sized between 5px and 10px, but I recognize that this might be getting a little too complicated. Here's what I have so far I've been working off this jsfiddle and well as this one. This is what I've come up with (that doesn't work, they all fade in equally spaced in a line and don't stay confined from to the site) Here's my jsfiddle, code below function randomPosition() { var h = $(window).height()-10; var w = $(window).width()-10; var newHeight = Math.floor(Math.random() * h); var newWidth = Math.floor(Math.random() * w); return [newHeight, newWidth]; } $(document).ready(function() { var newPosition = randomPosition(); $('.star').css( { 'margin-left':newPosition[1]+'px', 'margin-top':newPosition[0]+'px' }).each(function(index) { $(this).delay(1500*index).fadeIn('slow'); }) }); CSS body { background-color: black; } .star { height: 10px; width: 10px; background-color: white; display: none; } HTML (is there a way to do this with just a for loop or something similar?) &lt;div class="star"&gt; &lt;/div&gt; &lt;div class="star"&gt; &lt;/div&gt; &lt;div class="star"&gt; &lt;/div&gt; &lt;div class="star"&gt;&lt;/div&gt;
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40536375
accepted answer: http://stackoverflow.com/a/25899627
type: Question
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40537031
has title: DIVs to randomly fadeIn on page
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/25899627
favorite count: 0
possible better answer: http://stackoverflow.com/a/25900938
upvote count: 2

http://stackoverflow.com/comment/40758065
has text: Why are you saying `var` and then not declaring a variable?
comment on: http://stackoverflow.com/q/26022160
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40584172
has text: @Lukas Right I read that as well, so it sounds like it would be a good way to replace the 'hacky' code. I just have never personally used it (unlike `for` loops and duplicate id's which I've used/done extensively)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25925297

http://stackoverflow.com/q/25984449
has body: I'd like to output log messages to console when debugging. Works fine in controllers but can't get it to work in a module config block, e.g. angular.module('MyApp', []) .run(function($state){ // run stuff here }); .config(function($logProvider){ $log.debug('Config debug message'); }); I get an error: error TypeError: Cannot read property 'debug' of undefined Is it possible to use the logProvider in the config block of a module?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25984664
tagged with: angularjs-service
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25984664
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40690140
favorite count: 0
tagged with: angularjs
has title: Is it possible to use $logProvider for logging in config block of the module?
score: 6
upvote count: 6

http://stackoverflow.com/comment/61923607
type: AnswerComment
type: Comment
has text: What is `offsetX` and `offsetY`?
comment on: http://stackoverflow.com/a/26029699
score: 0

http://stackoverflow.com/a/25895496
has body: See this question I don't think you can export the chart but you can try exporting the chart data.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25895251

http://stackoverflow.com/comment/40673674
has text: Heres a reference that we can all agree on is quite good though: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25975882
score: 1

http://stackoverflow.com/q/25951751
has body: I'm beginner in HTML and I wanted to know, how I can make a paragraph in the HTML-Body equal to a text that the user has written into a textbox in the HTML-Body using a JavaScript function. Are there any ways to do that? And another question: What is happening, when the user clicks on a "Submit" button? Does HTML write all the input of the user into variables? (EDIT) So, here's my code (HTML): JavaScript: var inp = document.getElementById('uA1'); var p = document.getElementById('paragraph'); inp.addEventListener('input', function() { p.textContent = inp.value; }); It still doesn't work.
has comment: http://stackoverflow.com/comment/40629396
has answer: http://stackoverflow.com/a/25952068
has answer: http://stackoverflow.com/a/25951942
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: input
tagged with: user-input
type: Question
has title: JavaScript/HTML | Making HTML paragraph equal to User Input
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/a/25929594
accepted answer of: http://stackoverflow.com/q/25920007
score: 1
answers question: http://stackoverflow.com/q/25920007
type: AcceptedAnswer
has body: Solved. I forgot to add hook to support other css properties: jQuery.Color.hook( "stroke" ); Then $(".svg-path").animate({ 'stroke': 'blue' }, 200); works pretty well!
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/25935999
has body: As I can see, it is common to see this line: if (err) return done(err); But as I understand it right, I can do this: if (err) throw err; Which looks pretty and works good. So what's a difference? And yea, I know about promises and I like 'em, but still, I want to know answer for this question.
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25936084
has answer: http://stackoverflow.com/a/25936083
accepted answer: http://stackoverflow.com/a/25936083
tagged with: exception
has title: Node-style callbacks: done(exception) or throw exception?
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25936084
type: Question
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/40571977
comment on: http://stackoverflow.com/q/25918794
has text: HTTP's "200, OK" is the response you need.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40566712
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25904778
has text: Have you looked at the docs for [ordered data](https://www.firebase.com/docs/web/guide/retrieving-data.html#section-ordered-data) and priorities? What did you try? What didn't work?
score: 0

http://stackoverflow.com/comment/102241632
has text: This is the correct way to fo it with OpenLayers 5.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/36133032

http://stackoverflow.com/comment/40896772
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25917737
type: QuestionComment
has text: bacause also php is powerfull.. and i can write php .. i write in php since various years... more than 15... and also php can do that.. (comunicate with ffmpeg). Again.. 1.How to get the framerate/duration/frames FROM FFMPEG OR FFPROBE. 2.how to know exactly know when the conversion is finished. there is no need for python. i added a sample output generated by php....

http://stackoverflow.com/q/26026451
accepted answer: http://stackoverflow.com/a/26026732
tagged with: case-statement
type: Question
has answer: http://stackoverflow.com/a/26026627
has title: Dealing with combining cases & duplicate cases in switch statements
possible better answer: http://stackoverflow.com/a/26026603
tagged with: switch-statement
has answer: http://stackoverflow.com/a/26026603
downvote count: 0
has answer: http://stackoverflow.com/a/33247528
tagged with: javascript
has answer: http://stackoverflow.com/a/26026732
favorite count: 0
tagged with: optimization
score: 3
has body: Is it okay to combine cases that share assignments and repeat the case for assignments that are not shared, or is it preferred to just keep each separated? To illustrate with a simple example.. case 0 and 180 both include w = 330 so they have been combined; the value assigned to x is different for each so they are repeated to do the x assignment. switch(window.orientation) { case 0: case 180: w = 330; //break case 0: x = '-180px'; //break case -90: case 90: w = 480; x = '0'; break; case 180: x = '-80px'; break; }
answer count: 4
has comment: http://stackoverflow.com/comment/40766547
type: AnsweredQuestion
upvote count: 3

http://stackoverflow.com/q/25928481
has comment: http://stackoverflow.com/comment/40589686
has comment: http://stackoverflow.com/comment/40591342
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40590045
favorite count: 0
has comment: http://stackoverflow.com/comment/40590111
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25920541
has comment: http://stackoverflow.com/comment/40589946
has comment: http://stackoverflow.com/comment/40589505
has title: Getting html content using jquery?
has answer: http://stackoverflow.com/a/25928537
has comment: http://stackoverflow.com/comment/40589489
has comment: http://stackoverflow.com/comment/40589576
has comment: http://stackoverflow.com/comment/40589535
has comment: http://stackoverflow.com/comment/40589731
downvote count: 3
upvote count: 1
has body: I have below example. http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_html_set Here I am taking Html as string using Jquery html() method. On click of hello button, It gives below output. hello This is a paragraph. This is another paragraph. Here if we look at tag, it is ignoring end tag. How can i get output as hello This is a paragraph. This is another paragraph. Thanks!
type: Question
has comment: http://stackoverflow.com/comment/40589422
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40513577
score: 0
type: AnswerComment
type: Comment
has text: not running good your fiddle. 1- select cars--> dont get radio buttons till you check buy and sell again. 2- when you select cars and then check buy and then jump to select others you lose the sell buy radio buttons.
comment on: http://stackoverflow.com/a/25886903

http://stackoverflow.com/comment/40684553
comment on: http://stackoverflow.com/q/25981556
score: 0
has text: Before 19 September, MDN was right. Then Bountin made [a wrong edit](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find$compare?to=668997&from=662477).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40964534
type: QuestionComment
score: 0
has text: @asgallant I got it kind of working but I can't work out how I can get a second filter to also have influence on the state of the chart displayed.
comment on: http://stackoverflow.com/q/25945390
type: Comment

http://stackoverflow.com/q/25953770
has answer: http://stackoverflow.com/a/25953815
has comment: http://stackoverflow.com/comment/40633191
tagged with: python
accepted answer: http://stackoverflow.com/a/25953815
has comment: http://stackoverflow.com/comment/40633208
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40633209
has body: I see this in JavaScript 2-(1/3 * 1) // =&gt; Returns 1.66666666667 but, 4-(1/3 * 7) // =&gt; Returns 1.6666666667 This is one less 6 than the previous result. This is awkard, because both expressions are suposed equal to 5/3 I tried to do the same thing using Python, and both expressions returned the same result.
has comment: http://stackoverflow.com/comment/40633281
has comment: http://stackoverflow.com/comment/40633212
type: Question
has comment: http://stackoverflow.com/comment/40633166
tagged with: javascript
has title: JavaScript math issue
score: 0
has comment: http://stackoverflow.com/comment/40633162
has comment: http://stackoverflow.com/comment/40633236
answer count: 1
has comment: http://stackoverflow.com/comment/40633194

http://stackoverflow.com/comment/40666866
score: 0
type: AnswerComment
has text: Thx..but to be very honest I tried ang googled before..but dont know this is a case of `closure`..so how do users expect from a novice to search with the right term and then downvote the question :(
type: Comment
comment on: http://stackoverflow.com/a/25972192

http://stackoverflow.com/a/25878409
has body: Approach adding an error element for visual reference var radios = $mainElem.find(':radio'); var radioNames={}; radios.each(function(){ radioNames[this.name] = true; }); for( name in radioNames){ var radioGroup=$mainElem.find('[name=' + name + ']'); if( !radioGroup.filter(':checked').length ){ radioGroup.parent().append('Ooooops'); } } DEMO
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25877990
accepted answer of: http://stackoverflow.com/q/25877990

http://stackoverflow.com/q/25928611
answer count: 0
score: 1
upvote count: 1
has body: In ios application, I have implemented simple iScoll Demo in UIWebView. Now when I select text, and scroll, the selection remains at same position on the screen and text move up with scrolling. In below screenshot, I have selected text, and scrolled up, the selection remains at same place on screen and text moves upwards. Refer Screenshot. Is there any solution for this, so that selection moves along with text? You can fine my sample project here https://github.com/vaibhavsilar/helloworld.git
type: Question
tagged with: iscroll
tagged with: javascript
downvote count: 0
has title: Text selection does not move on scrolling iScroll in iOS application
favorite count: 0
type: UnansweredQuestion
tagged with: objective-c
tagged with: css

http://stackoverflow.com/q/25891848
score: 0
tagged with: object-literal
linked to: http://stackoverflow.com/q/500504
has comment: http://stackoverflow.com/comment/40522275
has answer: http://stackoverflow.com/a/25892052
has answer: http://stackoverflow.com/a/25892910
accepted answer: http://stackoverflow.com/a/25892083
answer count: 5
possible better answer: http://stackoverflow.com/a/25892052
has comment: http://stackoverflow.com/comment/40522384
type: AnsweredQuestion
tagged with: object
has title: How can this javascript object be reconstructed
has comment: http://stackoverflow.com/comment/40523081
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/25892113
tagged with: arrays
has answer: http://stackoverflow.com/a/25892083
tagged with: javascript
has body: I have an object type as below: { "1": { "ref": "1", "active": "1", "showorder": "1", "title": "Test 1" }, "2": { "ref": "2", "active": "1", "showorder": "2", "title": "Test 2" }, "3": { "ref": "3", "active": "1", "showorder": "4", "title": "Test 4" }, "4": { "ref": "4", "active": "1", "showorder": "9", "title": "Test 9" }, "5": { "ref": "5", "active": "1", "showorder": "7", "title": "Test 7" } } On the basis of showorder property i need it to be arranged as follows: { "1": { "ref": "1", "active": "1", "showorder": "1", "title": "Test 1" }, "2": { "ref": "2", "active": "1", "showorder": "2", "title": "Test 2" }, "3": { "ref": "3", "active": "1", "showorder": "3", "title": "Test 3" }, "4": { "ref": "4", "active": "1", "showorder": "4", "title": "Test 4" }, "5": { "ref": "5", "active": "1", "showorder": "5", "title": "Test 5" } } And here is my failed attempt thought i would pass the object to this function : function reArrangeTilesObject(tilesObj){ var newObj = []; for(var i in tilesObj){ var j = 1; if(j == tilesObj[i].showorder){ newObj.push(tilesObj[i]); j++; } } return newObj; } Sorry if i am being unclear. The object is created in a random manner. So what i want is the object to be arranged as per the showorder property. so if showorder is 4 it should come in the key of 4 and not have the object of showorder 9. showorder 9 should come under the key of 9. Thanks
has answer: http://stackoverflow.com/a/25892144

http://stackoverflow.com/comment/62668534
type: AnswerComment
has text: as far as i know its working for 44+, and for 50+ you can also attach 2 cta buttons with actions, which you can access in event listener
type: Comment
comment on: http://stackoverflow.com/a/37566109
score: 0

http://stackoverflow.com/a/25909635
has comment: http://stackoverflow.com/comment/128751156
has comment: http://stackoverflow.com/comment/107449252
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/25909341
has comment: http://stackoverflow.com/comment/40556333
answers question: http://stackoverflow.com/q/25909341
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/107469568
has body: Case of preventing mouse scroll down (for mouse scroll up just change comparison operator to '&lt;'): $(window).on("wheel mousewheel", function(e){ if(e.originalEvent.deltaY &gt; 0) { e.preventDefault(); return; } else if (e.originalEvent.wheelDeltaY &lt; 0) { e.preventDefault(); return; } }); We need to check for two values because of cross-browser issues. jsFiddle link P. S. Warning. Since later versions of Chrome decides to treat all window events as passive by default, the code above won't work in Chrome. Will come with a better solution and update this answer ASAP.

http://stackoverflow.com/q/25919625
has comment: http://stackoverflow.com/comment/40573787
has body: I'm experimenting a bit with aligning elements in a circle using jQuery's cos and sin functions. The problem that I'm currently having is that my "dots" are not alligned correctly. I'm calculating the angle by dividing the number of total dots with the total - 360 deg circle radius. It's somehow causing me trouble and I can't seem to find the answer. var paper = Raphael('svg', '100%', '100%'); var circles = 20; var angle = 360 / circles; for (i = 0; i &lt; circles; i++) { var x = 200 + 100 * Math.sin(angle * i); var y = 200 + 100 * Math.cos(angle * i); console.log(angle * i); paper.circle(x, y, 10).attr({ fill: 'green' }); } .wrapper { width:100%; height:100%; position:absolute; } #svg { width:100%; height:100%; position:relative; background:gray; } &lt;div class="wrapper"&gt; &lt;div id="svg"&gt;&lt;/div&gt; &lt;/div&gt;
accepted answer: http://stackoverflow.com/a/25919833
type: AnsweredQuestion
tagged with: raphael
type: Question
answer count: 1
tagged with: javascript
tagged with: alignment
tagged with: jquery
has answer: http://stackoverflow.com/a/25919833
score: 0
has title: Aligning elements around circle
tagged with: css

http://stackoverflow.com/q/26031518
has body: How to show loading image and disable button for 3 sec before start send post data from another page using ajax post ? After press ok button i want to display loading image and disable for 3 sec and then start send requests to data.php How can i do that ? index.php data.php <?PHP if(isset($_POST['products_color'])) { if ( $_POST['products_id'] != '' ) { if ( $_POST['products_type'] != '' ) { ?> PRODUCTS DATA OK <?PHP } else { ?> NO PRODUCTS type <?PHP } } else { ?> NO PRODUCTS ID } } else { ?> NO PRODUCTS COLOR } ?>
has answer: http://stackoverflow.com/a/26031680
answer count: 3
has title: How to show loading image and disable button for 3 sec before start send post data from another page using ajax post?
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/26031630
tagged with: php
has comment: http://stackoverflow.com/comment/40775234
type: UnansweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/26031610
tagged with: javascript

http://stackoverflow.com/comment/40616926
has text: Unrelated: Your `load` calls are malformed. If your goal is to (at first) load the page and use its `#playerList` element as the only content, you need a space before the `#`: `.load(document.URL + ' #playerList')`. Similarly the next `.load` with `.table-information`. But doing two `.load` calls like that one right after another doesn't make any sense, they'll occur chaotically and you'll only see the result of the second one that finishes.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25943586

http://stackoverflow.com/a/26002064
has comment: http://stackoverflow.com/comment/40722531
has comment: http://stackoverflow.com/comment/40721609
has body: I think one of the two solutions seen in the code at Bin below may work for you: http://jsbin.com/buqexusamuda/1/ HTML Card: Flip Hello Card 2: Mirror Hello CSS .card, .card2 { position: relative; animation: all 2.5s; perspective: 1000; transition: 0.6s; transform-style: preserve-3d; width: 90px; height: 32px; text-align: center; line-height: 32px; z-index: 1; background-color: #ccc; color: #666; } .card2 { transform-origin: right center; } .card.flip { transform: rotateY(180deg); } SCRIPT jQuery(".card").click(function(){ $(this).toggleClass("flip"); });
answers question: http://stackoverflow.com/q/26001486
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40760117

http://stackoverflow.com/comment/40751215
comment on: http://stackoverflow.com/a/26016807
type: Comment
has text: @MattO: Sorry, but what "posting" you mean. If required you can use `editrules` to **validate** the results. I don't understand exactly your requirements and what you do at the end. You use custom editing control in come column. Do you use it in editing or in Edit/Add form? Do you consider to specify `defaultValue` in `editoptions` for Add form or for input other as `Yes`/`No`? If you use `defaultValue` you will create radio button with always one selected value. Moreover the current custom editing control is not full. You need implement `"set"` and `"get"` operation in `myvalue` function.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25886351
has body: // Check the required fields function check_inputs() { var errors = false; $('#wiz-action .required').each(function () { var input = $(this); if (input.val().length &lt; 1) { input.addClass('error'); errors = true; } else { input.removeClass('error'); errors = false; } }); if (errors == false) { return true; } } // Check fields on change $('#wiz-action input.required').change(function () { var input = $(this); input.removeClass('error'); if (input.val().length &lt; 1) { input.addClass('error'); } else if (!input.val().match(/^\d+$/)) { input.addClass('error'); } else { input.removeClass('error'); } check_inputs(); }); // Check fields by clicking "next" link $('#next-link').click(function (e) { if (check_inputs() == true) { // Do something } else { $('.error-message').fadeOut(200).fadeIn(200); } });
score: 0
answers question: http://stackoverflow.com/q/25885692
type: Answer

http://stackoverflow.com/a/26633304
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25960025
type: Answer
accepted answer of: http://stackoverflow.com/q/25960025
has body: Have a look at this code.It is almost the same but much simplier: $(document).ready( function(){ $(".ranges").change(function(){ $tl=$("#tl").val()+"px "; $tr=$("#tr").val()+"px "; $bl=$("#bl").val()+"px "; $br=$("#br").val()+"px "; $code=$tl+$tr+$bl+$br; $("#generator").css("border-radius",$code); }); });

http://stackoverflow.com/comment/40598276
type: AnswerComment
has text: Why wrap function to docready? And there is no difference if function is in header or footer, it can still be called
type: Comment
comment on: http://stackoverflow.com/a/25933614
score: 0

http://stackoverflow.com/q/25980264
has title: Where are variables stored?
type: Question
has body: Where are variables stored in javascript when we run pages in the browser? Also, where I need further insight into memory organisation in terms of javascript variables , usgae and scope, and storage. Like we say in C/C++ : local variables are stored in Stack, Dyanamic memory allocation in Heap area, and program code are stored in program area.
has comment: http://stackoverflow.com/comment/40684885
has comment: http://stackoverflow.com/comment/40682820
has comment: http://stackoverflow.com/comment/40682576
tagged with: dom
has comment: http://stackoverflow.com/comment/40682828
upvote count: 2
score: 0
has comment: http://stackoverflow.com/comment/40684119
downvote count: 2
has comment: http://stackoverflow.com/comment/40687257
has comment: http://stackoverflow.com/comment/40681910
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40774972
has comment: http://stackoverflow.com/comment/40687193
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40683331
linked to: http://stackoverflow.com/q/500431
has comment: http://stackoverflow.com/comment/40681872
has comment: http://stackoverflow.com/comment/40684258
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40695017

http://stackoverflow.com/comment/40763782
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26024914
has text: try to also unbind 'DOMMouseScroll'

http://stackoverflow.com/comment/40609588
type: Comment
type: QuestionComment
has text: did you add all the templates as well, as it is saying 404 for the script templates over here
score: 0
comment on: http://stackoverflow.com/q/25939581

http://stackoverflow.com/q/25951106
has answer: http://stackoverflow.com/a/25951710
has comment: http://stackoverflow.com/comment/40628399
has comment: http://stackoverflow.com/comment/40628213
has comment: http://stackoverflow.com/comment/40628790
type: AnsweredQuestion
upvote count: 3
has body: I'm currently using JSHint and JSCS (javascript code style checker) but none of them can detect this kind of unused variables: describe('XX', function () { var XXunused; beforeEach(inject(function ($injector) { XXunused = $injector.get('XXunused'); })); // XXunused is (as the name says) not used in any other way in this block. }); Someone knows any tool that can flag automatically these variables?
has title: Detect and flag unused JS variables
has comment: http://stackoverflow.com/comment/58337003
has comment: http://stackoverflow.com/comment/40628319
type: Question
has comment: http://stackoverflow.com/comment/40628816
tagged with: javascript
score: -1
tagged with: unused-variables
accepted answer: http://stackoverflow.com/a/25951710
downvote count: 4
tagged with: lint
answer count: 1
favorite count: 0

http://stackoverflow.com/q/25928509
has comment: http://stackoverflow.com/comment/40589869
upvote count: 1
has comment: http://stackoverflow.com/comment/40589518
tagged with: php
has comment: http://stackoverflow.com/comment/40598864
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40594358
has comment: http://stackoverflow.com/comment/40599108
has title: Symfony2 password encoder function in Javascript
has answer: http://stackoverflow.com/a/25937167
accepted answer: http://stackoverflow.com/a/25937167
type: Question
answer count: 2
tagged with: password-encryption
downvote count: 0
possible better answer: http://stackoverflow.com/a/25930782
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40598695
has body: I created a Symfony2 application using FOSUserBundle and FOSRestBundle. I'd like to connect other application with my Symfony application using rest api. I need to write the Symfony password encoder function in Javascript. Actually in PHP, it goes like: $salt = "secret"; $password = "azerty"; $salted = $password.'{'.$salt.'}'; $digest = hash('sha512', $salted, true); for ($i = 1; $i &lt; 5000; $i++) { $digest = hash('sha512', $digest.$salted, true); } $digest = base64_encode($digest); return $digest; In Javascript, I tried to use CryptoJS library. My code is: var salt = 'secret', password = 'azerty', salted = password + '{' + salt + '}' digest = CryptoJS.SHA512(salted); for (var i=1; i&lt;5000; i++) { digest = CryptoJS.SHA512(digest+salted); } digest = digest.toString(CryptoJS.enc.Base64); return digest; But guess what ? It does not work and i don't know why. Can anyone help please ? :) Regards, Colzak.
has comment: http://stackoverflow.com/comment/40598922
tagged with: symfony
has answer: http://stackoverflow.com/a/25930782
tagged with: cryptojs

http://stackoverflow.com/q/25895649
favorite count: 0
tagged with: angularjs
has title: How to interpolate string in Angular
type: AnsweredQuestion
has body: I have an angular web application, so I would like to use angular also for string interpolations. For example, I would like to make some replacements in myTemplate: var myTemplate = "Make something awesome with a = '{{scope.a}}' and b = '{{scope.b}}'."; var scope = { a: 1, b: 2 }; I know how to do this with underscore.js: _.template(myTemplate)(scope); I'm wondering if it is possible in angular?
possible better answer: http://stackoverflow.com/a/25895783
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25895783
has answer: http://stackoverflow.com/a/25895792
accepted answer: http://stackoverflow.com/a/25895792
tagged with: javascript
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/26004607
favorite count: 0
linked to: http://stackoverflow.com/q/1519114
has comment: http://stackoverflow.com/comment/40727726
has answer: http://stackoverflow.com/a/26004731
has comment: http://stackoverflow.com/comment/40854737
has comment: http://stackoverflow.com/comment/40726523
has comment: http://stackoverflow.com/comment/40726399
type: UnansweredQuestion
upvote count: 7
score: 3
has comment: http://stackoverflow.com/comment/40726454
has comment: http://stackoverflow.com/comment/40726517
tagged with: javascript
has title: How to write JavaScript apps that are not memory hungry?
has body: Are there rules or best practices to write JavaScript code that is not memory hungry? Back in time when I had to allocate and deallocate each byte in my software, I had a good picture of memory usage in my mind. But now I am alsways uncertain. All those cross and circular references, closures, duck typing, I got used to those great features but always feel uncertain about the memory effectivnes.
type: Question
downvote count: 4
answer count: 1
has comment: http://stackoverflow.com/comment/40851739

http://stackoverflow.com/a/25950011
score: 1
has comment: http://stackoverflow.com/comment/40630201
upvote count: 1
answers question: http://stackoverflow.com/q/25945720
type: AcceptedAnswer
downvote count: 0
has body: Adding to Peppe's answer, the same thing happens on the server. If you want to declare something as global, omit the var when declaring the variable: some_global_thing = {} This will add that to window (or global if the code is on the server) object, which will make it globally available. The same thing runs for functions. Think about this: function my_fn() {} will be sent as: (function(){ alert("This is file 2.") })() So, to make them globally available you have to declare them as: my_fn = function() {}
type: Answer
accepted answer of: http://stackoverflow.com/q/25945720
has comment: http://stackoverflow.com/comment/40630430

http://stackoverflow.com/comment/40684597
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/41yr3y3n/3/
comment on: http://stackoverflow.com/q/25980937
score: 0

http://stackoverflow.com/comment/40765846
comment on: http://stackoverflow.com/q/26021781
type: Comment
type: QuestionComment
score: 0
has text: Do you have any more information, like what the solution may be or how to begin going about fixing it?

http://stackoverflow.com/q/25972826
tagged with: validation
tagged with: javascript
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: onsubmit not running the validation script
possible better answer: http://stackoverflow.com/a/25972987
has answer: http://stackoverflow.com/a/25972932
tagged with: onsubmit
has answer: http://stackoverflow.com/a/25972987
type: AnsweredQuestion
has body: Name: Date of Birth: Year ... 1960 Month January ... December Day 1 ... 31 E-mail: I am trying to demonstrate form validation using javascript. But the problem is that the script doesn't run. Why doesn't the script run to stop invalid forms from being sent?
has answer: http://stackoverflow.com/a/25973003
accepted answer: http://stackoverflow.com/a/25973003
tagged with: forms
has comment: http://stackoverflow.com/comment/40667977
type: Question
has comment: http://stackoverflow.com/comment/40667954

http://stackoverflow.com/a/25995072
has comment: http://stackoverflow.com/comment/40708179
type: Answer
has body: With datatables you set the columns like so $('#example').dataTable( { "columns": [ { "width": "20%" }, null, null, null, null ] } ); Which sets the width of the first column and leaves the other columns auto. You may need to redraw the table after changing the width if you do it after initialization though. $('#example').DataTable().columns.adjust().draw();
has comment: http://stackoverflow.com/comment/40708257
answers question: http://stackoverflow.com/q/25994649
has comment: http://stackoverflow.com/comment/40708323
score: 0

http://stackoverflow.com/comment/40541128
comment on: http://stackoverflow.com/q/25901944
score: 0
type: Comment
type: QuestionComment
has text: put them into another file, this new file the hook will use to do it's thing when it's changing the index over.. Not allot of experience in writing stuff in node so don't know how successful ill be, ill check in later

http://stackoverflow.com/comment/40659197
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25967532
has text: Excellent improvement! Thx. I'm still learning github so might be better with filing an issue for now. You might show that `r.value()` should only be accessed inside an `if (r.fulfilled())` since you pretty much have to use it that way with `.settle()` since you can't already know its state.
score: 0

http://stackoverflow.com/comment/40555007
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25909550
type: AnswerComment
has text: @user3218288 This should work in both the cases as we are opening the file to be downloaded in a new tab using `target="_blank"`.

http://stackoverflow.com/q/25970919
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25975137
has title: How to launch Camera app from my windows phone app?
has body: I am trying to launch the built in camera app from within my custom windows phone app to allow the user to capture a photo, save it to disk and then return back to my app to process this new captured image. The problem is that "CameraCaptureUI" is not supported on windows phone! Any work around for that? Thanks in advance!
tagged with: windows-phone-8.1
type: Question
tagged with: winjs

http://stackoverflow.com/comment/40541026
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25901839
has text: `\n` and `\r` are already in the `\s` set.

http://stackoverflow.com/q/25893831
favorite count: 0
type: UnansweredQuestion
has body: I am cloning rows in my input form and in this row there are multiple multiselect elements. After only cloning and setting the values to the same as in previous row the multiselect elements are not working, so i have to use 'refresh' option, but this creates a new multiselect element my code $($row[last]).after($newRow); var multiselectValuesW = ($('.multiselectWorkers',$row[last]).val()); $('.multiselectWorkers', $newRow).val(multiselectValuesW); $('.multiselectWorkers',$newRow).multiselect('refresh'); Any suggestion?? Thank you
has title: bootstrap multiselect on refresh creates new multiselect element
tagged with: multi-select
tagged with: twitter-bootstrap
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25894852
answer count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40601351
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25934764
has text: YE.. i have a class called 'disabled='

http://stackoverflow.com/q/25980289
has body: I have the following script in my Main View which works great to create cascading dropdownlists. However, I cannot get it to execute on the partial view after it is loaded. From what I have read online, it seems that I need some sort of Ajax call in the partial view (which I am completely clueless on how to write). Any Assistance would be greatly appreciated. My Main View is: @model CollateralRowViewModel @*@Html.Partial("_SideBarView.cshtml"); @Html.Partial("_CommentsView.cshtml");*@ @using (@Html.BeginForm()) { Collateral @Html.LabelFor(model => model.CollateralClass) @Html.LabelFor(model => model.CollateralType) @Html.LabelFor(model => model.Description) @Html.LabelFor(model => model.MarketValue) @Html.LabelFor(model => model.PriorLiens) @Html.LabelFor(model => model.AdvanceRate) @Html.Label("Grantor (if not Borrower)") @Html.DropDownListFor(model => model.SelectedCollateralClass, Model.CollateralClass) @Html.DropDownListFor(model=>model.SelectedCollateralType, Model.CollateralType) @Html.TextBoxFor(model => model.Description) @Html.TextBoxFor(model => model.MarketValue) @Html.TextBoxFor(model => model.PriorLiens) @Html.TextBoxFor(model => model.AdvanceRate) @Html.TextBoxFor(model => model.GrantorFirstName) @Html.TextBoxFor(model => model.GrantorMiddleName) @Html.TextBoxFor(model => model.GrantorLastName) } My partial looks like: @model CollateralRowViewModel @Html.DropDownListFor(model=>model.SelectedCollateralClass, Model.CollateralClass) @Html.DropDownListFor(model=>model.SelectedCollateralType, Model.CollateralType) @Html.TextBoxFor(model=>model.Description) @Html.TextBoxFor(model=>model.MarketValue) @Html.TextBoxFor(model=>model.PriorLiens) @Html.TextBoxFor(model=>model.AdvanceRate) @Html.TextBoxFor(model=>model.GrantorFirstName) @Html.TextBoxFor(model=>model.GrantorMiddleName) @Html.TextBoxFor(model=>model.GrantorLastName) The Controller Action is: [AcceptVerbs(HttpVerbs.Get)] public async Task<ActionResult> GetCollateralTypesByClass(Guid collateralClassId)…
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26002796
has comment: http://stackoverflow.com/comment/40683657
score: 0
answer count: 1
tagged with: ajax
has comment: http://stackoverflow.com/comment/40682522
has comment: http://stackoverflow.com/comment/40683578
has comment: http://stackoverflow.com/comment/40684075
has answer: http://stackoverflow.com/a/26002796
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40681936
has comment: http://stackoverflow.com/comment/40682612
type: Question
has comment: http://stackoverflow.com/comment/40684721
has title: Execute Script on Partial View
has comment: http://stackoverflow.com/comment/40684232
tagged with: asp.net-mvc

http://stackoverflow.com/comment/40525521
has text: Thanks, it works, is possible to add animation to the redrawing?
type: Comment
comment on: http://stackoverflow.com/a/25893368
score: 0
type: AnswerComment

http://stackoverflow.com/q/25964159
has comment: http://stackoverflow.com/comment/40652419
has comment: http://stackoverflow.com/comment/40652404
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: stackexchange-api
score: 2
has body: I want to fetch a user's activity on Stack Overflow, using the /users/{ids}/timeline method. The problem is that this method only accepts a user id, yet I want to pass a username, so anybody could just write their nickname and get the relevant stats. The API doesn't seem to support getting a user id by supplying the username either. Is there any workaround to get a user's id given their username?
has title: How can I get a user's id given their username from the Stack Exchange API?
has comment: http://stackoverflow.com/comment/40652324
type: Question
has answer: http://stackoverflow.com/a/25964489
has comment: http://stackoverflow.com/comment/40652340
tagged with: javascript

http://stackoverflow.com/q/25989996
tagged with: nested-forms
has title: Detect a change in my HTML form using jQuery
has answer: http://stackoverflow.com/a/25991444
has comment: http://stackoverflow.com/comment/40699783
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40699546
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/25990032
has comment: http://stackoverflow.com/comment/40701606
has body: I have a form which I only want to allow users to upload 3 images (max), after which the add more button should then be hidden so that they cannot upload any more. When the user clicks the add more button an input field is generated (with a link to remove that input field). What I would like to happen is the following 1) Hide the add more button if nested_field_destroy_num and nested_field_num if the count is >=3 2) if a user clicks add more and the count is >= 3 but then clicks remove field then the add more button should reappear I have this working (to a point) when the DOM is ready but am having some issues getting it to work 'live' so to speak. I'm not sure what event handler I can use to detect the changes on the fly. $(document).ready(function(){ var show_add_button = function() { var nested_field_destroy_num = $("input[id$='__destroy']").length; var nested_field_num = $('.animal_file').length; if(nested_field_destroy_num + nested_field_num >= 3){ $('.add_nested_fields').hide(); } else { $('.add_nested_fields').show(); } } show_add_button(); }); What event handler could I use here? Update This is the HTML structure with the user having 2 images uploaded Remove Image Remove Image // Add Another input field Add Another Image
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26000172
has title: PHP $_POST status: Request was cancelled
tagged with: netbeans
answer count: 0
type: UnansweredQuestion
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/40718815
has comment: http://stackoverflow.com/comment/40718386
has comment: http://stackoverflow.com/comment/40718751
tagged with: javascript
tagged with: jquery
has body: I want to send information with a form written in HTML5 with a script, that it read if it is send or not. The problems is that it seems the information is not sending to PHP so I think the script don't work because that or script is the problem. This is the PHP block contacto.php <?php // $mensaje = $_POST('mensaje'); $mensaje = filter_input (INPUT_POST, 'mensaje'); // $mensaje.= "\n--------------\n"; $mensaje.= filter_input (INPUT_POST,"\n--------------\n"); // $mensaje.= "\nDe: ". $_POST['nombre']; $mensaje.= "\nDe: ". filter_input (INPUT_POST,"nombre"); // $mensaje.= "\nE-mail: ". $_POST['email']; $mensaje.= "\nE-mail: ". filter_input (INPUT_POST,"email"); //En la siguiente linea ingresamos nuestra casilla de correo $destino= "sora_ryu@hotmail.com"; // $remitente = $_POST ['email']; $remitente = filter_input (INPUT_POST,"email"); // $asunto = "Mensaje enviado por: ".$_POST['nombre']; $asunto = "Mensaje enviado por: ". filter_input (INPUT_POST,"nombre"); mail ($destino,$asunto,$mensaje, "FROM: $remitente"); //El mensaje que se mostrara al confirmar el envio echo "Mensaje enviado. Gracias por contactarse."; ?> This is de script.js var imported = document.createElement('script'); imported.src = 'js/vendor/jquery-2.1.1.min.js'; document.head.appendChild(imported); function cargaSendMail(){ $("#c_enviar").attr("disabled", true); $(".c_error").remove(); var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+.[A-Za-z0-9_.]+[A-za-z]$/; var s_email = $('#c_mail').val(); var s_name = $('#c_name').val(); var s_msg = $('#c_msg').val(); if (filter.test(s_email)){ sendMail = "true"; } else{ $('#c_mail').after("Ingrese e-mail valido."); //aplicamos color de borde si el se encontro algun error en el envio $('#contactform').css("border-color","#e74c3c"); sendMail = "false"; } if (s_name.length === 0 ){ $('#c_name').after( "Ingrese su nombre." ); var sendMail = "false"; } if (s_msg.length === 0 ){ $('#c_msg').after( "Ingrese mensaje." ); var sendMail = "false"; } if(sendMail === "true"){…
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40718352

http://stackoverflow.com/comment/40517085
type: QuestionComment
score: 2
has text: `string.split(')').shift().replace(/\D/g, '')`
comment on: http://stackoverflow.com/q/25889081
type: Comment

http://stackoverflow.com/q/25889081
has comment: http://stackoverflow.com/comment/40517085
tagged with: jquery
tagged with: string
has title: Splitting a string and get a number
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25889135
has answer: http://stackoverflow.com/a/25889322
has answer: http://stackoverflow.com/a/25889135
type: Question
tagged with: javascript
has body: I have a string how this: string = "(NUMBER_ID) Comments ... (a number can be here...)"; I'd like to get NUMBER_ID, only the first content between ()
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25889322

http://stackoverflow.com/q/25940061
has answer: http://stackoverflow.com/a/25940674
has body: I'm working on a code playground type of application where a user(web developer/designer) can input HTML, CSS and Javascript and view the result on an iframe. The inputted code will be saved in the database (MySQL) and rendered back again in an iframe on a show_results view/action. Now the question: Is it safe to save javascripts directly in the database? If not, then where/how should I save it?
tagged with: mysql
tagged with: ruby-on-rails
type: Question
score: 1
has answer: http://stackoverflow.com/a/25941317
upvote count: 2
has comment: http://stackoverflow.com/comment/40610741
has title: Is it safe to save user created javascript in database?
has answer: http://stackoverflow.com/a/25940189
answer count: 3
downvote count: 1
tagged with: javascript
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25876173
score: 5
has body: You can grab the full AudioBuffer after decodeAudioData and just go through the samples that way (using getChannelData()). The samples will be floats from -1 to +1. All you really have to do is group the samples into buckets of n length, where n is the total length of the AudioBuffer divided by the total number of pixels you want to render the waveform into. Then just find the maximum absolute value in each bucket and those are the values you'll draw. No AnalyserNode needed for that, so you can do it all really quickly instead of having to do it in real-time.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25875972
accepted answer of: http://stackoverflow.com/q/25875972
type: Answer
has comment: http://stackoverflow.com/comment/40494394
upvote count: 5

http://stackoverflow.com/comment/40671590
has text: @user3253002 Thanks for your comment. I try this the problem is it only shows a drop down box
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25973973

http://stackoverflow.com/comment/40745169
has text: It's all a bit confusing, but what I see at once is that you use `$index` in your HTML, whereas you use `index` when you call `select` in your code.
comment on: http://stackoverflow.com/q/26015048
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/137194467
type: AnswerComment
score: 0
type: Comment
has text: how would you do it vice versa? from client to server?
comment on: http://stackoverflow.com/a/26004253

http://stackoverflow.com/comment/40771479
comment on: http://stackoverflow.com/a/26029360
type: Comment
has text: Good point that this is an easy change. But, what do you think would be a preferred way to make this change: fork angular-mocks and use the fork? Thank you!
score: 0
type: AnswerComment

http://stackoverflow.com/a/26023760
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26023630
type: Answer
has comment: http://stackoverflow.com/comment/40761408
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40761160
has comment: http://stackoverflow.com/comment/40761449
has comment: http://stackoverflow.com/comment/40767254
has body: $.msgBox({ title:"Hello", content:"Hello World!" afterShow: function () { //close it when reach this $(".msgButton").trigger('click'); }, }); use .trigger() to close the dialog.
accepted answer of: http://stackoverflow.com/q/26023630

http://stackoverflow.com/q/25913815
tagged with: asp.net
has title: Data attribute for bulletlist in ASP.NET
upvote count: 2
downvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25913998
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25913998
has body: I have a ASP.NET BulletedList, when I add List Items to it, it just displays there text in the markup, so I am not able to get the value of listitem using JS or JQuery. Is there anyway I could add any data attribute to bulletlist, so that I could get it back when needed ? Not able to find any related property here - http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.bulletedlist_properties(v=vs.110).aspx

http://stackoverflow.com/comment/40620100
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25945398
type: AnswerComment
has text: So you don't want to show the text in the pop-up? which attribute do you want to put it in?

http://stackoverflow.com/a/25959696
accepted answer of: http://stackoverflow.com/q/25959434
has body: Click event is attached before dom element is render. So it isn't fired. $(".c") is a html element so after click, it will load another page. In that case ajax request may not reach the server. To prevent this js code should be in $( document ).ready() event and use return false; from click event to block page load: &lt;script&gt; $( document ).ready(function(){ $(".c").click(function(){ var href = this.href; $.ajax({ url: 'http://example.com/m35.php', type: 'POST', data: { subject: href }, success: function (data) { setTimeout(function (){ $(".container").html(data) }, 1000); } }); return false; // prevent load to another page }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/25959434
has comment: http://stackoverflow.com/comment/40646094
type: Answer
has comment: http://stackoverflow.com/comment/40646251
upvote count: 2
has comment: http://stackoverflow.com/comment/40644028
has comment: http://stackoverflow.com/comment/40644073
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25937052
answers question: http://stackoverflow.com/q/25936124
score: 0
has comment: http://stackoverflow.com/comment/40606422
has body: @Mey, without the benefit of seeing your code it will be difficult to pinpoint what your problem is. That said, window.top is a reference to the topmost window. It seems to be supported by all major browser (see here). You're absolute correct. This does not work on windows created by window.open(). How about this solution: have the opener window set a property on the opened window to keep track of the top most window, immediately after open. That way if any of the intermediate window is closed the opened window already has a reference to the top most window. Let me show you what I mean. From top most window: var c1 = window.open(...); c1.window.topMost = window; From first popup: c1 var c2 = window.open(...); c2.window.topMost = window.topMost; From second popup: c2 var c3 = window.open(...); c3.window.topMost = window.topMost; Now, let say you close c1 or c2, c3 will still have a reference to window.topMost.
type: Answer

http://stackoverflow.com/q/25996483
has comment: http://stackoverflow.com/comment/40755878
tagged with: shell
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25996842
has comment: http://stackoverflow.com/comment/40711110
score: 1
type: Question
tagged with: mongodb
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25997784
has comment: http://stackoverflow.com/comment/40759735
has title: Bash and mongodb script evaluation with variables
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: linux
tagged with: bash
has body: Im trying to make an add user function with a combination of mongodb shell script and bash it looks like this: (Bash) function addUser { read -p "email(username): " email read -p "name: " name read -p "password: " password read -p "role (customer/merchant): " role salt=$(node node/getSalt) passHash=$(node node/getHash salt password) export as="var email='$email', hashedPassword='$passHash', role='$role', name='$name', salt='$salt';" echo $as mongo --nodb --quiet --eval $as adduser.js } adduser.js is just an empty script right now i need to get the variables into this script.: email(username): regre name: reger password: ergher role (customer/merchant): reg var email='regre', hashedPassword='Vql40+ypE8cVoDw5jPEs0s+YbycG+pzjPVBRMIROJ/+XqiDHc7UD0aZeKY2/enKdSC3V8qMwmLJNc3D67VPHVQ==', role='reg', name='reger', salt='9QgI52o2zgIH8RORVeg1Eg=='; Tue Sep 23 00:39:03.210 SyntaxError: Unexpected end of input The script echos the value of $as which looks correct, hovever the mongodb shell script seems unable to evaluate this expression. How can i successfully pass this expression from bash to the mongodb shell script for evaluation? When I just call the mongo shell script like this I get no errors: mongo --nodb --quiet --eval "var email='regre', hashedPassword='Vql40+ypE8cVoDw5jPEs0s+YbycG+pzjPVBRMIROJ/+XqiDHc7UD0aZeKY2/enKdSC3V8qMwmLJNc3D67VPHVQ==', role='reg', name='reger', salt='9QgI52o2zgIH8RORVeg1Eg==';" adduser.js

http://stackoverflow.com/a/26427822
type: Answer
has comment: http://stackoverflow.com/comment/117229010
accepted answer of: http://stackoverflow.com/q/25983199
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25983199
upvote count: 1
type: AcceptedAnswer
has body: The property minimized is exposed in Gjs. In LookingGlass ([Alt]+[F2], then "lg") try this : global.screen.get_active_workspace().list_windows()[0].minimized

http://stackoverflow.com/comment/40559003
type: AnswerComment
type: Comment
has text: I already said that in the question: "Changing it to an async call would work, but will be to much work for now"
comment on: http://stackoverflow.com/a/25911836
score: 0

http://stackoverflow.com/q/25963838
has comment: http://stackoverflow.com/comment/40655279
type: AnsweredQuestion
tagged with: underscore.js
score: 7
has title: Underscore - Find from a sorted array of objects
upvote count: 7
has answer: http://stackoverflow.com/a/25964113
type: Question
has answer: http://stackoverflow.com/a/25964093
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25964113
answer count: 2
accepted answer: http://stackoverflow.com/a/25964093
downvote count: 0
has comment: http://stackoverflow.com/comment/40651812
has comment: http://stackoverflow.com/comment/40652287
favorite count: 0
has body: Underscore provides the function sortBy to sort an array of objects. However once I have this sorted array, is there a way to find an element using binary search? The function find does not leverage the fact that the array is sorted, while the function indexOf does, but it does not provide a way to specify the sort key. Am I missing something? Is there any other JS library that allows to do this easily?

http://stackoverflow.com/comment/40682913
has text: I am not clear about your requirements? do you want to put the result any of these input fields?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25980693

http://stackoverflow.com/comment/40594091
score: 1
comment on: http://stackoverflow.com/q/25931082
has text: post the code including mark up....
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25955477
answer count: 3
has answer: http://stackoverflow.com/a/25955560
has answer: http://stackoverflow.com/a/25955538
has body: Based on the HTML Selection form field below, I need to reset a text field value when the selection field is set to any value besides Completed or Cancelled Open In Progress Future_Project Cancelled Completed The Text input that I need to set the value to empty/nothing looks like this... I can use jQuery or regular JavaScript. I would appreciate any help, I think this should be pretty simple?
possible better answer: http://stackoverflow.com/a/25955538
has comment: http://stackoverflow.com/comment/40636676
type: AnsweredQuestion
has title: Clear a text input field when a DropDown Selection field is set to a certain value?
has answer: http://stackoverflow.com/a/25955653
type: Question
accepted answer: http://stackoverflow.com/a/25955653
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25952975
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: You are applying ng-class to div of ng-repeat hence it is assigned to all div's. You need to create a child div, add ng-class to that div with your condition. it will toggle the class of only that child div {{show.name}}
accepted answer of: http://stackoverflow.com/q/25952200
answers question: http://stackoverflow.com/q/25952200

http://stackoverflow.com/q/25894184
tagged with: javascript
tagged with: jquery
has title: Working with events when clicking an item within a list javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25894438
has body: So, right now I have an html list and some javascript code to go with it. When an item in this list is clicked, it is bolded. This all works fine. apple orange banana But, when I add some html to a div using javascript: $(document).ready(function () { document.getElementById("result").innerHTML = ""; $(result).html(" apple orange banana "); }); the onclick bolding doesn't work for the items in this list. I'm not sure why. Here is a fiddle to show what I mean. The "dropdown" list isn't clickable but the bottom list is. http://jsfiddle.net/avfyvk2v/11/ Any idea how to make the dropdown list item bold on click? UPDATE I'm thinking it might be because I grab var list = document.getElementsByTagName("li"); before I add the new list. Working now, let me know if you have input. Thanks!
type: Question
score: 0
possible better answer: http://stackoverflow.com/a/25894420
has answer: http://stackoverflow.com/a/25894420
has answer: http://stackoverflow.com/a/25894402
has comment: http://stackoverflow.com/comment/40526872
has answer: http://stackoverflow.com/a/25894438
answer count: 4
has comment: http://stackoverflow.com/comment/40526808
has answer: http://stackoverflow.com/a/25894365

http://stackoverflow.com/a/26010854
downvote count: 2
has comment: http://stackoverflow.com/comment/40737391
has comment: http://stackoverflow.com/comment/40738647
has comment: http://stackoverflow.com/comment/63266185
has comment: http://stackoverflow.com/comment/40739293
has comment: http://stackoverflow.com/comment/40737780
score: 5
upvote count: 7
has body: CSS3 animations are faster and smoother than JavaScript animations because they can be optimised and potentially hardware accelerated by the browser/GPU. JS animations on the other hand are usually a little less smooth because each frame of the animation has to be explicitly interpreted an rendered. Also, JS animations are used mainly for older browsers which don't support CSS3, which is relatively new.
has comment: http://stackoverflow.com/comment/40739592
type: Answer
has comment: http://stackoverflow.com/comment/43876970
answers question: http://stackoverflow.com/q/26010738

http://stackoverflow.com/q/25941559
upvote count: 24
favorite count: 0
downvote count: 0
tagged with: contenteditable
has body: Context is Chrome 37.0.2062.120 m. I'm using execCommand to insert html into an editable div. My execCommand call looks like this: function insertHTML(){ document.execCommand('insertHTML', false, 'hi'); } When the editable div looks like this: some [insertion point] content and I use execCommand to insert html into a contenteditable div, all of the attributes of the HTML are inserted as expected and I end up with this: some hi content When, however, I insert the exact same html into this structure: some content more [insertion point] content The attributes are removed from the span being inserted and it ends up looking like this: some content more hi content Is there any way to keep this from happening?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42732567
linked to: http://stackoverflow.com/q/8543252
score: 24
type: Question
has title: Is there a way to keep execCommand("insertHTML") from removing attributes in chrome?
answer count: 2
has answer: http://stackoverflow.com/a/25943182
tagged with: execcommand
accepted answer: http://stackoverflow.com/a/25943182
tagged with: javascript
possible better answer: http://stackoverflow.com/a/42732567

timer
tag name: timer
tags question: http://stackoverflow.com/q/25954539
tags question: http://stackoverflow.com/q/25907187
tags question: http://stackoverflow.com/q/25995525
tags question: http://stackoverflow.com/q/25937316
type: Tag
tags question: http://stackoverflow.com/q/25891561
tags question: http://stackoverflow.com/q/25884992
tags question: http://stackoverflow.com/q/25986222
tags question: http://stackoverflow.com/q/25958261

http://stackoverflow.com/q/25927062
tagged with: javascript
type: AnsweredQuestion
has body: I am trying to get NicEdit to work only for all textareas with IDs of 'r_desc'. Currently this occurs only for the first instance of a form that is generated within a while loop, and not the others. What am I doing wrong? JavaScript PHP/HTML $i=0; while($i<5){ ?> <? $i++; } I have also tried: bkLib.onDomLoaded(function () { var textareas = document.getElementsByID("r_desc"); for(var i=0;i<textareas.length;i++) { var myNicEditor = new nicEditor(); myNicEditor.panelInstance(textareas[i]); } });
has answer: http://stackoverflow.com/a/25927654
type: Question
tagged with: nicedit
accepted answer: http://stackoverflow.com/a/25927654
tagged with: php
answer count: 1
has title: Make NicEdit appear in all instances given the same ID
score: 0

http://stackoverflow.com/comment/40683948
type: QuestionComment
comment on: http://stackoverflow.com/q/25980923
score: 0
has text: yes exactly like that, thank you!
type: Comment

http://stackoverflow.com/comment/40670283
type: QuestionComment
has text: @ChakravarthySM take a look at [docs](http://api.jquery.com/click/#click) to see what is going on, when you call `.click()` without arguments.
score: 0
comment on: http://stackoverflow.com/q/25974063
type: Comment

safari
tags question: http://stackoverflow.com/q/25920245
tags question: http://stackoverflow.com/q/25916949
tags question: http://stackoverflow.com/q/25920949
tags question: http://stackoverflow.com/q/25931699
tags question: http://stackoverflow.com/q/26002968
tags question: http://stackoverflow.com/q/25982861
tags question: http://stackoverflow.com/q/25970466
tags question: http://stackoverflow.com/q/25967653
tags question: http://stackoverflow.com/q/25929863
type: Tag
tags question: http://stackoverflow.com/q/25999163
tags question: http://stackoverflow.com/q/25911929
tags question: http://stackoverflow.com/q/26032513
tags question: http://stackoverflow.com/q/25999162
tags question: http://stackoverflow.com/q/26002958
tags question: http://stackoverflow.com/q/26023359
tag name: safari
tags question: http://stackoverflow.com/q/26032971

http://stackoverflow.com/a/26015279
answers question: http://stackoverflow.com/q/26013955
has comment: http://stackoverflow.com/comment/40792877
has comment: http://stackoverflow.com/comment/40750068
has body: Try the below code. [updated] function showTrips(){ var argument = document.getElementById("Numberoftrips"); var value = argument.options[argument.selectedIndex].text; var ni = document.getElementById("container"); var mains = document.getElementsByClassName("row"); var innerHt=mains[0].innerHTML; var newdiv = document.createElement('div'); var divs=[]; while (ni.firstChild) { ni.removeChild(ni.firstChild); } for (var i = 1; i < value; i++) { var newdiv = document.createElement('div'); newdiv.innerHTML = innerHt; var divIdName = 'my'+i+'Div'; newdiv.className="row"; newdiv.setAttribute('id',divIdName); divs[i]=newdiv; ni.appendChild(divs[i]); } } Number_Of_Trips: 1 2 3 4 5 Trip Details
has comment: http://stackoverflow.com/comment/40788416
has comment: http://stackoverflow.com/comment/40794050
has comment: http://stackoverflow.com/comment/40794030
has comment: http://stackoverflow.com/comment/40747897
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40778524
has comment: http://stackoverflow.com/comment/40753884
has comment: http://stackoverflow.com/comment/40801324
has comment: http://stackoverflow.com/comment/40792971
has comment: http://stackoverflow.com/comment/40793440

http://stackoverflow.com/a/25877039
upvote count: 1
type: AcceptedAnswer
has body: You likely have bad HTML in your handlebars, mismatched tags is the biggest reason for this. Your secret template has two opening div tags.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25876333
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25876333

http://stackoverflow.com/q/25910656
has answer: http://stackoverflow.com/a/25911101
duplicate of: http://stackoverflow.com/q/2495402
tagged with: javascript
score: 0
answer count: 3
has title: validating a sting for decimal input Javascript
type: UnansweredQuestion
has body: I want to validate user input for correct decimal form like user can enter values like -123.4 or 123.4 but not --123.4 or -.234 or ..234 Here is what I have done so far but its not working properly var input = control.value; var indexM = input.match((/-/g) || []).length; var indexD = input.match((/./g) || []).length; if(indexM &gt; 1 || indexD &gt;1 ) { control.value=""; alert('Invalid Value') }
has answer: http://stackoverflow.com/a/25910966
linked to: http://stackoverflow.com/q/2495402
type: Question
has answer: http://stackoverflow.com/a/25911130

http://stackoverflow.com/comment/83820080
type: Comment
has text: i got this "http://localhost:8000/#!/game-over" why this -> '/#!/' ??
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25929771

http://stackoverflow.com/q/25926898
has answer: http://stackoverflow.com/a/25927942
has comment: http://stackoverflow.com/comment/40586875
tagged with: javascript
type: Question
score: 0
tagged with: textarea
answer count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/14259580
has comment: http://stackoverflow.com/comment/40587010
tagged with: php
has body: I've tried multiple javascript and jquery methods for limiting the lines but mostly either there is a bug on it or there is an issue with copy/paste and etc. Please let me know how it should be for client side .. mostly patched from copy/paste, restrict additional line if you dont press enter but keep writing and etc ... Also, that's my server side check only at the moment, so please let me know if i can improve it as well? $lines = array_slice(explode("\n", trim( $_POST['description'])), 0, 10); // max 10 lines foreach ($lines as $key =&gt; $value) { $lines[$key] = substr(trim($value), 0, 100); // max 100 chars } $insert['teams_descr'] = implode("\n", $lines); $this-&gt;db-&gt;update( 'teams', $insert, array( 'teams_id' =&gt; $this-&gt;user-&gt;leader_team_id() ) );
type: UnansweredQuestion
tagged with: codeigniter
has title: Limit textarea lines server side (php) and in html?

http://stackoverflow.com/q/25979658
upvote count: 2
has comment: http://stackoverflow.com/comment/40680805
score: 2
has answer: http://stackoverflow.com/a/25979970
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40681286
has comment: http://stackoverflow.com/comment/40680875
type: Question
has body: In all versions of IE (I'm testing IE11 at the moment) new line breaks inside of textarea elements aren't working... function id_(id) { var r = false; if (document.getElementById(id)) { r = document.getElementById(id); } return r; } window.onload = function() { for (i in document.getElementsByTagName('audio')[0]) { id_('test').value = id_('test').value + '\n' +i; } } How can I force IE to break lines in a textarea element? No frameworks. I've tried \n\r, \r\n, \r and \n.
downvote count: 0
tagged with: javascript
has title: Internet Explorer \n line breaks not working
possible better answer: http://stackoverflow.com/a/25979806
answer count: 3
has answer: http://stackoverflow.com/a/25980297
has comment: http://stackoverflow.com/comment/40681008
has answer: http://stackoverflow.com/a/25979806
linked to: http://stackoverflow.com/q/5583040
favorite count: 0
accepted answer: http://stackoverflow.com/a/25980297

http://stackoverflow.com/comment/40656128
type: AnswerComment
comment on: http://stackoverflow.com/a/25925278
score: 0
type: Comment
has text: @tcand sorry, I'm not very familiar with the 'smart-table' and in the plunker that I've set everything seems to be working fine, so I don't quite understand what the issue is, however if you want to provide me with a plunker were I can see your issue replicated, I will try to help you to solve that issue. Thanks!

http://stackoverflow.com/q/25923572
tagged with: asp.net-mvc-4
accepted answer: http://stackoverflow.com/a/25924560
has title: How to call function from div on load in angularjs
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
has body: I am trying to pull value in div element and once I get value I would like to call a function to get data. I am unable to call function inside div element HERe is my Html stats.html &lt;div class="ItemsList" data-ng-init="GetStatsData({{menu.result}})"&gt; {{myitems}} &lt;div&gt; RootController.js function GetStatsData(resultval) { homeService.getitemsData(resultval) .success(function (data, status, headers, config) { $scope.myitems = data }); } I am getting data when calling function directly but when I try to use div tag and invoke the function I cannot get this working, Its never calling that function. My main goal is to get value in myitems passing menu.result in function. I appreciate any help to get this resolved
tagged with: javascript
has answer: http://stackoverflow.com/a/25924560
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40580908
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/41057975
score: 0
type: Comment
type: QuestionComment
has text: @Origineil - wow, that's cool. Post this as an answer and I'll give you the bounty (even if it's not exact match, I'd hate for the points to go to waste, and I appreciate the effort)
comment on: http://stackoverflow.com/q/26006568

http://stackoverflow.com/comment/40658584
has text: This is only ios specific. I would like something that will work both on iOS and android
score: 0
comment on: http://stackoverflow.com/a/25967292
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40663227
has text: My "appending type of skill" varies from language to language
comment on: http://stackoverflow.com/q/25970044
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25989849
has body: I am displaying countdown timer for one post at a time. How to display multiple countdown timers to all posts which are coming from while loop. each post having one date so var end = new Date('10/19/2014 10:1 AM'); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance < 0) { clearInterval(timer); document.getElementById('countdown').innerHTML = 'EXPIRED!'; return; } var days = Math.floor(distance / _day); var hours = Math.floor((distance % _day) / _hour); var minutes = Math.floor((distance % _hour) / _minute); var seconds = Math.floor((distance % _minute) / _second); // document.getElementById('days').innerHTML = days + 'days '; // document.getElementById('hours').innerHTML += hours + 'hrs '; // document.getElementById('min').innerHTML += minutes + 'mins '; //document.getElementById('countdown').innerHTML += seconds + 'secs'; document.getElementById('days').innerHTML = days ; document.getElementById('hours').innerHTML = hours; document.getElementById('min').innerHTML = minutes; } timer = setInterval(showRemaining, 1000); Days h : m by using that date display countdown time.
accepted answer: http://stackoverflow.com/a/26093925
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
favorite count: 0
has title: Multiple countdown timer in onepage using javascript with setintervals
type: Question
has answer: http://stackoverflow.com/a/26093925
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: -1
has comment: http://stackoverflow.com/comment/40699307
downvote count: 1
answer count: 1

http://stackoverflow.com/comment/40709493
type: Comment
type: AnswerComment
has text: @andrex what Pointy said above. If you modify your JSFiddle demo to log the length of the output of `escape()` on both of those characters, the length of the first is `1` whereas the length of the second is `7`. Your own `console.log()` is logging the length of the same value and is unrelated to the values of the data you're returning in the `alert()`.
score: 1
comment on: http://stackoverflow.com/a/25995538

http://stackoverflow.com/q/25911406
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25913001
type: Question
has comment: http://stackoverflow.com/comment/40561596
has comment: http://stackoverflow.com/comment/40558940
has answer: http://stackoverflow.com/a/70287594
score: 3
has comment: http://stackoverflow.com/comment/40557739
tagged with: javascript
has body: I googled for this but without luck. I have a textarea in a form that I'm trying to send via ajax with jQuery. My problem is when the textarea contains ampersand (&amp;) it breaks. That is any text contained after &amp; will not be fetched including the ampersand (&amp;). I am sending the data as follows: message = "What are the concerns you are looking to address? "+othr+".\n"; var dataString = 'name=' + name + '&amp;email=' + email + '&amp;company=' + company + '&amp;message=' + message + '&amp;othr=' + othr + '&amp;vpb_captcha_code=' + vpb_captcha_code + '&amp;submitted=1'; $.ajax({ type: "POST", url: "contactus-contact-form.php", data: dataString , I read encodeURIComponent() and tried implementing the same but it does not work. Any pointers? EDIT:The following fails to obtain the text values: message = "What are the concerns or security issues you are looking to address? "+othr+".\n"; var data0 = {name: + name + email: + email + company: + company + message: + message + othr: + othr + vpb_captcha_code: + vpb_captcha_code + submitted: "1"}; $.ajax({ type: "POST", url: "contactus-contact-form.php", data: data0, contentType: "application/json; charset=utf-8", dataType: "json",
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/25912110
has title: Allowing ampersand (&) in textarea
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40557832
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40558222

http://stackoverflow.com/a/25978522
type: Answer
has comment: http://stackoverflow.com/comment/40681631
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40680584
has body: When using a data protocol with the image encoded in base64, it does not have a domain or URL or path. For example, if you copy a data URL into Chrome, it will display the image directly without reaching out into the Internet to download it. Try it: [binary] If you want to create your own data URL image, there are plenty of free tools online.
accepted answer of: http://stackoverflow.com/q/25978447
answers question: http://stackoverflow.com/q/25978447
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/26033955
has comment: http://stackoverflow.com/comment/40784018
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40779627
answer count: 0
has comment: http://stackoverflow.com/comment/40814431
has title: Javascript not loaded completely
type: Question
has comment: http://stackoverflow.com/comment/40817067
tagged with: javascript
has comment: http://stackoverflow.com/comment/40787330
has comment: http://stackoverflow.com/comment/40818840
score: 0
tagged with: websphere
tagged with: rad
has comment: http://stackoverflow.com/comment/40780187
has comment: http://stackoverflow.com/comment/40795595
has body: I am facing issue while running my Application in Local environment. The Javascript errors start popping when I login to application. Getting errors like.. Message: Unterminated string constant Line: 2374 Char: 46 Code: 0 Message: Expected '}' Line: 2373 Char: 1 In Actual file the function starts at 2372 which is : function isAlphaNumericWithDash(checkStrValue) { var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZab"; //cdefghijklmnopqrstuvwxyz0123456789- var checkStr = checkStrValue; //Some more lines } But in Actual loaded file the file is ending at line 2374, the code lines are : function isAlphaNumericWithDash(checkStrValue) { var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZab" Similar error getting in every flow. When I refresh the screen, sometimes screen start appearing, but not functioning properly. When I am checking the js files, found that these files are not loaded completely. Wondering what can be the reason. Info : RAD Version : Version: 8.0.4.2 iFix1 Build ID: RADO8042iFix1-I20130214_1904 Server : WebSphere Application Server v8.0 at localhost OS: Windows 7 Enterprise 64 bit operating system Model : win7 *64 1.7 RAM: 4 GB Lines in incomplete loaded file : 2374 Size of incomplete loaded file: 64.0 KB (65,536 bytes) Lines in complete file : 4456 Size of Complete file : 124 KB (126,976 bytes ** The same Application is working in other machines except few machine configured for one new team. ** This is not browser related issue, as testing and Production environment url are working perfectly in same browsers(IE 8, 9, Chrome, Mozzila etc.). Any help will be appreciated.
has comment: http://stackoverflow.com/comment/40786632

http://stackoverflow.com/comment/40766638
has text: thanks bojan! you and caeth provided exactly what i was hoping for. i appreciate it.
type: Comment
comment on: http://stackoverflow.com/a/26026407
type: AnswerComment
score: 0

http://stackoverflow.com/q/25874686
linked to: http://stackoverflow.com/q/48956036
has answer: http://stackoverflow.com/a/61983280
downvote count: 0
tagged with: javascript
has title: How can I simulate key events with selenium in a CodeMirror Editor
has comment: http://stackoverflow.com/comment/40492483
favorite count: 0
has answer: http://stackoverflow.com/a/30848547
answer count: 3
has body: There are plenty of examples around that show how to use the following to enter text using selenium driver.execute_script('cm.setValue("text")'); This works, but isn't very "selenium" of us. We want to simulate actual keyboard key presses like the send_keys function in selenium. We created a enterFormData that gets an element and types to it using driver.send_keys()(e.g. a textarea with an ID we can easily simulate typing). How can we simulate actual key presses into the CodeMirror editor? We also want to be able to test HotKeys (e.g. Ctrl-Shift-M) and then take a driver.get_screenshot_as_base64()
tagged with: python
tagged with: codemirror
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: selenium
type: Question
has answer: http://stackoverflow.com/a/57621139

http://stackoverflow.com/comment/40740026
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26010660
has text: @Derek朕會功夫 You're right, I was mixing the largest possible integer and number ...
score: 0

http://stackoverflow.com/comment/40498433
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25877489
has text: This is just a simplified code. Somedata is just a dummy-name and it is an array of objects
type: Comment

http://stackoverflow.com/comment/40813442
type: Comment
comment on: http://stackoverflow.com/q/26015645
score: 0
type: QuestionComment
has text: z-indez :100 works fine.

innerhtml
tags question: http://stackoverflow.com/q/25883246
type: Tag
tags question: http://stackoverflow.com/q/25955612
tags question: http://stackoverflow.com/q/25954728
tags question: http://stackoverflow.com/q/26011985
tags question: http://stackoverflow.com/q/25908350
tags question: http://stackoverflow.com/q/25933160
tag name: innerhtml

http://stackoverflow.com/comment/40593323
score: 0
has text: Okey, but with this code, it`s possible to load local json files? this is the error i get..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25923562

http://stackoverflow.com/comment/40603240
type: Comment
type: QuestionComment
has text: They mean nothing, they're just a character.
comment on: http://stackoverflow.com/q/25936289
score: 0

http://stackoverflow.com/q/25950085
tagged with: http-status-codes
type: UnansweredQuestion
tagged with: php
has title: What is best practice in sending ajax response?
tagged with: error-handling
has comment: http://stackoverflow.com/comment/40626737
type: Question
has comment: http://stackoverflow.com/comment/40626779
has body: I have a webapp that calls php thus: var jqxhr = $.getJSON( url ) .done( function( data, status ) { if( status == 'success' ) { rv = true; // initialise the user object app.user = new User( data ); // post login-processing app.postLogin(); } else { // login failed console.log( "autologin failed!" ); } }) .fail( function() { console.log( "autologin fail" ); }); // end var jqxhr = and I'm wondering what is accepted as best practice in the php script? For example, if all works well, my php returns: header('Content-type: application/json; charset=utf-8'); print json_encode($row); If there's an unexpected error, such as bad SQL, my php returns: header('HTTP/1.1 500 Internal Server Error'); header('Content-Type: application/json; charset=UTF-8'); etc. prior to calling die(). I then handle this in .fail(). But what if I want to return an EXPECTED error, such as 'Invalid username or password'? Is it ok to use 'Internal Server Error', or should I be using some kind of json response protocol to inform the javascript of the error, and looking for this in .done()? Any advice much appreciated. Thanks Mini
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25950167
tagged with: ajax

interactive
tags question: http://stackoverflow.com/q/25980903
type: Tag
tag name: interactive

http://stackoverflow.com/comment/40498288
comment on: http://stackoverflow.com/q/25877187
type: QuestionComment
has text: @dandavis well, originally I thought that I could get datatables to cache the results for that one datatables instantiation. The data could change, but if I wanted up-to-date data, I would just reload the page entirely (thus wiping cache).
score: 0
type: Comment

knockout.js
tags question: http://stackoverflow.com/q/25915402
tags question: http://stackoverflow.com/q/25982011
tags question: http://stackoverflow.com/q/25991469
tags question: http://stackoverflow.com/q/25983964
tags question: http://stackoverflow.com/q/25886183
tags question: http://stackoverflow.com/q/26024634
tags question: http://stackoverflow.com/q/25884546
tags question: http://stackoverflow.com/q/25922224
tags question: http://stackoverflow.com/q/25978413
tags question: http://stackoverflow.com/q/25910334
tags question: http://stackoverflow.com/q/25917529
tags question: http://stackoverflow.com/q/25939644
tags question: http://stackoverflow.com/q/25955946
tags question: http://stackoverflow.com/q/25988869
tags question: http://stackoverflow.com/q/25945252
tags question: http://stackoverflow.com/q/25876121
tags question: http://stackoverflow.com/q/25990585
tag name: knockout.js
tags question: http://stackoverflow.com/q/25906521
tags question: http://stackoverflow.com/q/25985378
tags question: http://stackoverflow.com/q/26032229
tags question: http://stackoverflow.com/q/25976110
tags question: http://stackoverflow.com/q/25993837
tags question: http://stackoverflow.com/q/25974135
tags question: http://stackoverflow.com/q/25915669
tags question: http://stackoverflow.com/q/26015955
tags question: http://stackoverflow.com/q/25931498
tags question: http://stackoverflow.com/q/25920931
tags question: http://stackoverflow.com/q/25912216
tags question: http://stackoverflow.com/q/25959902
tags question: http://stackoverflow.com/q/25877404
tags question: http://stackoverflow.com/q/25908320
tags question: http://stackoverflow.com/q/25952050
tags question: http://stackoverflow.com/q/25874177
tags question: http://stackoverflow.com/q/25888185
type: Tag
tags question: http://stackoverflow.com/q/25968205
tags question: http://stackoverflow.com/q/25946802
tags question: http://stackoverflow.com/q/25892801
tags question: http://stackoverflow.com/q/25890871
tags question: http://stackoverflow.com/q/25924288
tags question: http://stackoverflow.com/q/25989119

http://stackoverflow.com/q/25992162
has title: What's getting placed in the initialization stage of JavaScript?
accepted answer: http://stackoverflow.com/a/25992328
type: AnsweredQuestion
tagged with: interpreter
has comment: http://stackoverflow.com/comment/40703445
type: Question
tagged with: function
answer count: 1
tagged with: javascript
tagged with: variables
has answer: http://stackoverflow.com/a/25992328
score: 0
has body: I'm reading about function declarations and function expressions. It say's that function declarations get placed in the initialization stage of JavaScript. Later I found out that variables also get placed in there, but they get the value of undefined, and when the interpreter reaches that variable it will then be assigned. I can't find a good article about it. Now I'm wondering what else gets in the initialization stage of JavaScript?
tagged with: initialization

http://stackoverflow.com/q/25903801
duplicate of: http://stackoverflow.com/q/12953704
has title: How to access property with odd characters like "#name"?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25903822
type: Question
has body: I want to display JSON result in HTML table using plain JavaScript without using JQuery or any other libraries, I have JSON response like below: { "topalbums": { "album": [ { "name": "Konvicted", "playcount": "61503", "mbid": "13141107-58e2-4984-bb90-55aa59fc03f6", "url": "http://www.last.fm/music/Akon/Konvicted", "artist": { "name": "Akon", "mbid": "1138a764-2212-4d0a-b02d-0dc14df91e08", "url": "http://www.last.fm/music/Akon" }, "image": [ { "#text": "http://userserve-ak.last.fm/serve/34s/55550849.png", "size": "small" }, { "#text": "http://userserve-ak.last.fm/serve/64s/55550849.png", "size": "medium" }, { "#text": "http://userserve-ak.last.fm/serve/126/55550849.png", "size": "large" }, { "#text": "http://userserve-ak.last.fm/serve/300x300/55550849.png", "size": "extralarge" } ], "@attr": { "rank": "1" } }, I want to access the first image URL as seen above, I tried using it like below but did not worked: var text; for (i = 0; i &lt; json.topalbums.album.length; i++) { text += json.topalbums.album[i].name + " "+json.topalbums.album[i].image[1].#text+"&lt;br&gt;"; } Can anyone suggest some solution?.
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40544458
has answer: http://stackoverflow.com/a/25903822
linked to: http://stackoverflow.com/q/12953704

http://stackoverflow.com/comment/72933727
has text: But these days you need '/me?scope=email' instead of just '/me'
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25961817

http://stackoverflow.com/a/25994242
score: 5
answers question: http://stackoverflow.com/q/25992003
type: AcceptedAnswer
upvote count: 5
has body: Since your modal is set to have its own controller, and therefore its own scope, when you execute the function 'check' it tries to alert $scope.new, $scope.new isn't set on the modal scope. one way to overcome this is to pass the new variable into the function, and let the function alert the passed value. here's a fixed plunkr when calling check(), pass in the new variable: check and in your controller change check function: $scope.check = function(text) { alert(text); };
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25992003

http://stackoverflow.com/q/25908621
has body: I have 2 buttons, one + and one - that increments the quantity of items. I also have a "Price" of the item and a span that displays the price of the item. What i need is: When the user clicks the + or - buttons, it increments the quantity of items and the total price. So far my code looks like this: HTML: &lt;input type="number" size="4" class="input-text qty text" title="Cantidad" value="1" name="quantity" min="1" step="1"&gt; &lt;input type="button" class="plus" value="+"&gt; &lt;input type="button" class="minus" value="-"&gt; &lt;span class="price"&gt;90.00&amp;nbsp;€&lt;/span&gt; JS function inc() { var price = "price"; var elems = document.getElementsByTagName('*'), i; for (i in elems) { var a = document.getElementsByName("quantity")[0].value; if((' ' + elems[i].className + ' ').indexOf(' ' + price + ' ') &gt; -1) { var valOfItem = parseInt(elems[i].innerHTML); var x = a * valOfItem; elems[i].innerHTML = x; } } } I haven't tried it yet but i guess everything will be working as soon as i add my func() to the onClick event on those buttons, i was hoping to do it with jQuery after the document is done loading but i'm not sure how. Any ideas?
has comment: http://stackoverflow.com/comment/40553361
upvote count: 1
type: Question
type: AnsweredQuestion
has title: Add onclick event to button after document is ready with JS/JQuery selecting by class
has answer: http://stackoverflow.com/a/25910183
score: 1
accepted answer: http://stackoverflow.com/a/25910183
possible better answer: http://stackoverflow.com/a/25908774
answer count: 2
has answer: http://stackoverflow.com/a/25908774
has comment: http://stackoverflow.com/comment/40555183
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: events

http://stackoverflow.com/a/25888982
accepted answer of: http://stackoverflow.com/q/25886973
has body: Resolved this problem by using , myScroll = new IScroll('#scrollinginside', { scrollbars: true, mouseWheel: true, interactiveScrollbars: true, shrinkScrollbars: 'scale', fadeScrollbars: false, checkDOMChanges: true }); myScroll.on ('scrollStart', function () { console.log('Started'); }); myScroll.on ('scrollEnd', function () { console.log('Ended'); });
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25886973
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/25945398
has comment: http://stackoverflow.com/comment/40620100
has body: HTML for the pop-up &lt;div id="popup"&gt;&lt;/div&gt; CSS for the pop-up #popup {display:none; position:fixed; top:30%; left:50%; z-index:9999} You can adjust the top, left, z-index according to you jQuery $('a').click(function(){ $('#popup').html($(this).html()); $('#popup').show(); }); This is probably a simple version of the required implementation to give you the guidance, but hopefully you can improvise and improve upon this.
has comment: http://stackoverflow.com/comment/40619770
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40627311
answers question: http://stackoverflow.com/q/25945321
type: Answer
accepted answer of: http://stackoverflow.com/q/25945321

http://stackoverflow.com/a/67517374
type: Answer
has body: await browser.actions().mouseMove(Element).doubleClick().perform(); await browser.actions().doubleClick(Element.getWebElement()).perform(); the above 2 codes works properly to double click on any element when it's visible on screen. Here Element is "let Element = element(by.xpath("locator"));" Below code did not works as a msg is shown saying "Failed: JavaScript error: arguments[0].dblclick is not a function" whereas when checked in console similar scripts did worked to double click the item: "$($x(element(by.xpath("locator")))).dblclick()". Will update my comment if able to find the exact JavaScript syntax to make below code run. await browser.executeScript("arguments[0].dblclick();", Element.getWebElement());
score: 0
answers question: http://stackoverflow.com/q/25894403

http://stackoverflow.com/tag/q
tags question: http://stackoverflow.com/q/25917711
type: Tag
tag name: q
tags question: http://stackoverflow.com/q/25967298
tags question: http://stackoverflow.com/q/25998032
tags question: http://stackoverflow.com/q/26030992
tags question: http://stackoverflow.com/q/25975696

http://stackoverflow.com/comment/40804429
type: Comment
score: 0
has text: Ok, one follow up question I have: with your help, (and MDN docs) I've successfully created event listeners that _override_ themselves. **However**, I'd like the original listener to be discarded and be able to proceed with the new one. According to MDN the second listener is ignored: `If multiple identical EventListeners are registered on the same EventTarget with the same parameters, the duplicate instances are discarded....`
type: AnswerComment
comment on: http://stackoverflow.com/a/26007456

ruby-on-rails
tags question: http://stackoverflow.com/q/26009324
tags question: http://stackoverflow.com/q/25926412
tags question: http://stackoverflow.com/q/25958618
tags question: http://stackoverflow.com/q/25878416
tags question: http://stackoverflow.com/q/26021854
type: Tag
tags question: http://stackoverflow.com/q/25999836
tags question: http://stackoverflow.com/q/25967082
tags question: http://stackoverflow.com/q/25953762
tags question: http://stackoverflow.com/q/25968773
tags question: http://stackoverflow.com/q/25951147
tags question: http://stackoverflow.com/q/25884754
tags question: http://stackoverflow.com/q/25895014
tags question: http://stackoverflow.com/q/25948913
tags question: http://stackoverflow.com/q/25940061
tags question: http://stackoverflow.com/q/25891281
tags question: http://stackoverflow.com/q/25894466
tags question: http://stackoverflow.com/q/25943079
tags question: http://stackoverflow.com/q/25956290
tags question: http://stackoverflow.com/q/25899521
tags question: http://stackoverflow.com/q/25976104
tags question: http://stackoverflow.com/q/26008088
tags question: http://stackoverflow.com/q/25902616
tags question: http://stackoverflow.com/q/25906536
tags question: http://stackoverflow.com/q/25938290
tags question: http://stackoverflow.com/q/26022329
tags question: http://stackoverflow.com/q/25908578
tags question: http://stackoverflow.com/q/26028123
tags question: http://stackoverflow.com/q/25944997
tags question: http://stackoverflow.com/q/25966688
tags question: http://stackoverflow.com/q/26004991
tags question: http://stackoverflow.com/q/25954744
tags question: http://stackoverflow.com/q/26011382
tags question: http://stackoverflow.com/q/25980546
tags question: http://stackoverflow.com/q/26032495
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/25882758
tags question: http://stackoverflow.com/q/26014626
tags question: http://stackoverflow.com/q/25970454
tags question: http://stackoverflow.com/q/25880143
tags question: http://stackoverflow.com/q/25959805
tags question: http://stackoverflow.com/q/26004413
tags question: http://stackoverflow.com/q/25921985
tags question: http://stackoverflow.com/q/25989996
tags question: http://stackoverflow.com/q/25958925
tags question: http://stackoverflow.com/q/25950780
tags question: http://stackoverflow.com/q/25963466
tags question: http://stackoverflow.com/q/25879763
tags question: http://stackoverflow.com/q/25982524
tags question: http://stackoverflow.com/q/25992885
tags question: http://stackoverflow.com/q/25905940
tags question: http://stackoverflow.com/q/25930992
tags question: http://stackoverflow.com/q/26020664
tags question: http://stackoverflow.com/q/25990185
tags question: http://stackoverflow.com/q/25874883

http://stackoverflow.com/a/25915956
accepted answer of: http://stackoverflow.com/q/25915543
has body: There is a variety of ways to achieve this, example: Now I have never used Cordova Facebook Plugin so I'm not sure if you need to run the api function after the log in, or how those procedures need to be ordered. But I wanted to show you an example of how to retrieve the data from the factory using your code sample. Hope that helps Edit 2: I have changed my code to using promises that way we make sure that we don't call one without the other being completed, I am not a fan of chaining the login and api functions within one function since it is possible(?) that you may need to call login() but don't want to call api(), please try my code and paste in your console logs in the bottom of your question. Factory: // Let's add promises to our factory using AngularJS $q .factory('Fbdata', ['$q', function($q){ // You could also just replace `var service =` with `return` but I thought this // would make it easier to understand whats going on here. var service = { // I generally nest result to keep it clean when I log // So results from functions that retrieve results are stored here data: { login: [], api: [] }, api: function() { var q = $q.defer(); facebookConnectPlugin.api("me/?fields=id,email,name,picture", ["public_info","user_birthday"], function (results) { // assign to the object being returned service.data.api = results; // The data has returned successfully so we will resolve our promise q.resolve(results); }, function (error) { // We reject here so we can inform the user within through the error/reject callback q.reject(error); console.error('FB:API', error); }); // Now that we have either resolved or rejected based on what we received // we will return the promise return q.promise; }, login: function () { var q = $q.defer(); facebookConnectPlugin.login(["email"], function (results) { // assign to the object being returned service.data.login = results; q.resolve(results); }, function(err) { q.reject(error); console.error('FB:Login', err); }); return q.promise; } }; …
has comment: http://stackoverflow.com/comment/40568595
answers question: http://stackoverflow.com/q/25915543
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40610466
has comment: http://stackoverflow.com/comment/40609269

http://stackoverflow.com/q/25916458
tagged with: javascript
tagged with: asp.net
favorite count: 0
score: 0
has title: Radio Button Input control Client Side Validation
linked to: http://stackoverflow.com/q/1423777
has answer: http://stackoverflow.com/a/25917369
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has body: In my ASPX page, I've an input radiobutton control : &lt;input type="radio" name="rbBool" value="Yes" runat="server" id="rbpYes" /&gt; Yes &lt;input type="radio" name="rbBool" value="No" runat="server" id="rbpNo" /&gt; No I want to do client side validation to check that the user has selected a single option when i click this button: &lt;asp:Button runat="server" ID="bnSavePopup" Text="Save" OnClick="BnSaveCarClassDetailsClick" ValidationGroup="CheckControls"/&gt; Can someone suggest how this can be done with javascript?
type: Question
answer count: 1

http://stackoverflow.com/comment/40764911
has text: Chrome shows: $( "#timeframe_slider" ).slider({ Uncaught TypeError Orientation:
score: 0
comment on: http://stackoverflow.com/q/26025612
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40731118
type: AnswerComment
comment on: http://stackoverflow.com/a/26007043
has text: Now I do get the same page back again with GET but I can only view it in the "Network" tab. ICYMI, I have the markup and the JS-script in same file
score: 0
type: Comment

http://stackoverflow.com/q/25980718
tagged with: d3.js
has title: How to align d3js tooltip in center of time divisions?
upvote count: 1
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26024630
has body: I'm creating a tooltip that shows the y-value as you mouse over the graph region. However, I notice that the jump in value occurs on the x0 value tick, rather than the middle, between the x0 and x1 value ticks. If you look at the image below, you can see the red line represents the x-position of the cursor and how the y-value is incorrectly placed for x0+1px to (x1+x0)/2 [where x0 is the 15th and x1 is the 16th]. Here is my code, which is borrowing heavily from this example. AC.bisectDate = d3.bisector(function(d) { return d.date; }).left; function mousemoveall(){; var x0 = AC.charts[0].x.invert(d3.mouse(this)[0]); AC.charts.forEach(function(thisChart){ mousemove(thisChart,x0); }); } function mousemove(thisChart,x0){ var i = AC.bisectDate(thisChart.chartData, x0, 1), d0 = thisChart.chartData[i - 1], d1 = thisChart.chartData[i], d = x0 - d0.date &gt; d1.date - x0 ? d1 : d0; var mydata = thisChart.chartData[i][AC.props[thisChart.id]]; thisChart.focus.attr("transform","translate(" + (thisChart.x(d.date) + thisChart.margin.left) + "," + (thisChart.margin.top + (thisChart.height * thisChart.id) + (10 * thisChart.id) + thisChart.y(mydata) ) + ")"); thisChart.focus.select("text").text(mydata); } How would I go about having the y-value jump take place exactly between the 15th and the 16th, rather than at the 15th?
has answer: http://stackoverflow.com/a/25988352
answer count: 2
tagged with: tooltip
downvote count: 0
tagged with: javascript
score: 1
possible better answer: http://stackoverflow.com/a/25988352
favorite count: 0
accepted answer: http://stackoverflow.com/a/26024630

http://stackoverflow.com/a/25904460
upvote count: 1
answers question: http://stackoverflow.com/q/25902788
has body: Meteor.users.allow({ update: function(userId, user){ // to allow update user just to user, you get it ;)? right? // return user._id == userId; // to allow all updates return true; }, insert: function(userId, user){ /* same as above*/ } }); You can put that on initialization code.
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/51213503
accepted answer of: http://stackoverflow.com/q/25902788
type: Answer

http://stackoverflow.com/q/26033840
tagged with: javascript
score: 27
possible better answer: http://stackoverflow.com/a/26034300
accepted answer: http://stackoverflow.com/a/26034344
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26034344
has body: I have created jQuery UI autocomplete which is working very good. But my requirement is that what I display as list should also select same in text box. But it is not selecting For example list like XXX (XYZ) but when I select it only select XXX not XXX (XYZ) what I am missing !! function getDeptStations() { $("#txDestination").autocomplete({ source: function (request, response) { var term = request.term; var Query = ""; if (lang === "en") Query = "City_Name_EN"; else if (lang === "fr") Query = "City_Name_FR"; if (lang === "de") Query = "City_Name_DE"; if (lang === "ar") Query = "City_Name_AR"; var requestUri = "/_api/lists/getbytitle('Stations')/items?$select=City_Code," + Query + "&amp;$filter=startswith(" + Query + ",'" + term + "')"; $.ajax({ url: requestUri, type: "GET", async: false, headers: { "ACCEPT": "application/json;odata=verbose" } }).done(function (data) { if (data.d.results) { response($.map(eval(data.d.results), function (item) { return { label: item[Query] + " (" + item.City_Code + ")", value: item[Query], id: item[Query] } })); } else { } }); }, response: function (event, ui) { if (!ui.content.length) { var noResult = { value: "", label: "No cities matching your request" }; ui.content.push(noResult); } }, select: function (event, ui) { $("#txDestination").val(ui.item.label); cityID = ui.item.id; }, minLength: 1 }); }
has comment: http://stackoverflow.com/comment/61329940
upvote count: 27
has answer: http://stackoverflow.com/a/26034300
linked to: http://stackoverflow.com/q/36860915
type: AnsweredQuestion
has title: jQuery autocomplete selection event
has answer: http://stackoverflow.com/a/41065003
type: Question
answer count: 3
tagged with: jquery-ui
tagged with: autocomplete

http://stackoverflow.com/a/25916573
answers question: http://stackoverflow.com/q/25914429
accepted answer of: http://stackoverflow.com/q/25914429
has body: When using a transform function you also need an inverseTransform function: inverseTransform: function (v) { return Math.exp(v); }, See the updated fiddle or the code snippet below. This is also described in the Documentation. var d1 = [ [20.0000000000000, 6.14194000000000], [19.5000000000000, 6.12697000000000], [19.0000000000000, 6.10850000000000], [18.5000000000000, 6.08726000000000], [18.0000000000000, 6.06277000000000], [17.5000000000000, 6.03597000000000], [17.0000000000000, 6.00640000000000], [16.5000000000000, 5.97021000000000], [16.0000000000000, 5.94094000000000], [15.7500000000000, 5.91888000000000], [15.5000000000000, 5.89996000000000], [15.2500000000000, 5.88077000000000], [15.0000000000000, 5.86918000000000], [14.9000000000000, 5.86075000000000], [14.8000000000000, 5.85275000000000], [14.7000000000000, 5.84439000000000], [14.6000000000000, 5.83664000000000], [14.5000000000000, 5.82853000000000], [14.4000000000000, 5.81990000000000], [14.3000000000000, 5.81143000000000], [14.2000000000000, 5.80261000000000], [14.1000000000000, 5.79600000000000], [14.0500000000000, 5.79209000000000], [14.0000000000000, 5.78578000000000], [13.9000000000000, 5.77702000000000], [13.8000000000000, 5.76902000000000], [13.7000000000000, 5.76138000000000], [13.6000000000000, 5.75354000000000], [13.5000000000000, 5.74083000000000], [13.2500000000000, 5.72250000000000], [13.0000000000000, 5.70458000000000], [12.7500000000000, 5.68757000000000], [12.5000000000000, 5.66951000000000], [12.2500000000000, 5.65803000000000], [12.0000000000000, 5.64834000000000], [11.7500000000000, 5.64222000000000], [11.5000000000000, 5.63983000000000], [11.2500000000000, 5.64106000000000], [11.0000000000000, 5.64696000000000], [10.7500000000000, 5.65821000000000], [10.5000000000000, 5.67426000000000], [10.2500000000000, 5.69558000000000], [10.0000000000000, 5.72321000000000], [9.75000000000000, 5.75670000000000], [9.50000000000000, 5.79626000000000], [9.25000000000000, 5.84289000000000], [9.00000000000…
score: 0
type: AcceptedAnswer
type: Answer

addition
tags question: http://stackoverflow.com/q/25961143
tags question: http://stackoverflow.com/q/25934416
type: Tag
tag name: addition

http://stackoverflow.com/q/25874989
upvote count: 0
has comment: http://stackoverflow.com/comment/40492164
possible better answer: http://stackoverflow.com/a/25875403
type: Question
has comment: http://stackoverflow.com/comment/40492167
has answer: http://stackoverflow.com/a/25875294
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25875264
accepted answer: http://stackoverflow.com/a/25875264
answer count: 3
has body: In the following code, I would like to reload the siteadmin pages with the function siteAdmin.reloadPages() only after the storing of the pages porperties CQ.form.SlingSubmitAction(dialog.form, config);is executed sucessfully. the following function submits a form and then calls a callback() function, which in turn reloads the siteadmin pages: function foo(dialog, config, callback) { var action = new CQ.form.SlingSubmitAction(dialog.form, config); dialog.form.doAction(action); dialog[dialog.closeAction](); callback(); } function call: foo(dialog,action, function() { var siteAdmin = CQ.Ext.getCmp(window.CQ_SiteAdmin_id); siteAdmin.reloadPages(); }); The problem is that the siteadmin pages are not reladed after the pageProperties (dialog.form) has been successfully submitted. For example the pageTitle loaded is the old value. How to reload siteadmin pages only after the form has been successfully submitted?
downvote count: 1
has title: How to call function only after the executing of the other function is completly finished
favorite count: 0
tagged with: aem
has answer: http://stackoverflow.com/a/25875403
type: AnsweredQuestion

http://stackoverflow.com/a/25918132
score: 1
has comment: http://stackoverflow.com/comment/40570918
has body: However, would this actually end up being a performance increase Probably. Having a large constant-access data structure (even if costly to build) is generally faster than repeatedly iterating all "hundreds of thousands" of nodes. If you could however optimize the recursive lookup function, e.g. by deriving the parent node's location from the guid, it might not be a that large benefit. or could this potentially cause memory problems? Yes, large data structures can always cause memory problems on low-memory devices. It shouldn't be a problem however if you don't have any problems with your original JSON data.
downvote count: 0
answers question: http://stackoverflow.com/q/25917921
has comment: http://stackoverflow.com/comment/40571957
type: Answer
upvote count: 1

http://stackoverflow.com/a/26006972
accepted answer of: http://stackoverflow.com/q/26006908
answers question: http://stackoverflow.com/q/26006908
type: AcceptedAnswer
downvote count: 0
has body: One way is to use a combination of split() and join(): var url = "https://www.example.com/test1/something?asd=1"; var result = url.split("/",4).join("/"); Here's a JSFiddle of it in action: http://jsfiddle.net/msm3jsvw/
type: Answer
upvote count: 3
score: 3

acrobat
type: Tag
tags question: http://stackoverflow.com/q/25937189
tag name: acrobat
tags question: http://stackoverflow.com/q/25999034

http://stackoverflow.com/q/25875018
has answer: http://stackoverflow.com/a/25875082
has answer: http://stackoverflow.com/a/25875157
possible better answer: http://stackoverflow.com/a/25875082
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Iterate Constructor Chain Up
type: Question
accepted answer: http://stackoverflow.com/a/25875157
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40492231
has body: Assuming I have something like this: function A() {} function B() {} B.prototype = Object.create(A.prototype); function C() {} C.prototype = Object.create(B.prototype); var inst = new C(); I can now do inst instanceof C == true, inst instanceof B == true, instanceof C == true. But how could I "iterate" the constructor functions up starting from the instance of C() so that it'd return function C(), function B(), function A() which I could then use to instantiate another instance.
linked to: http://stackoverflow.com/q/4944278
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26031065
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/26031579
has comment: http://stackoverflow.com/comment/40774590
has comment: http://stackoverflow.com/comment/40775189
possible better answer: http://stackoverflow.com/a/26031579
has comment: http://stackoverflow.com/comment/40774927
accepted answer: http://stackoverflow.com/a/26032454
has body: Currently, only the h1 gets linked to the post. I would like the entire div post-info to be clickable. I've been working with this, but for some reason nothing changes. The entire div still isn't clickable; only the h1. JS $("article.has-post-thumbnail .post-info").click(function() { window.location = $(this).find("a").attr("href"); return false; }); HTML Post Title August 14, 2014 September 24, 2014 CSS article { background: #EE7A1D; float: left; height: 200px; margin: 0 2px 2px 0; overflow: hidden; position: relative; width: 312px; } article .post-info { display: none; left: 50%; position: absolute; top: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); z-index: 100; } article .post-info h1 { line-height: 1.4; font-size: 20px; font-size: 2rem; } article .post-info a { color: #FFF; } article .post-info span { font-style: italic; } article .post-info a { color: #FFF; } article > img { width: 100%; } .updated:not(.published) { display: none; } Edit: Here's a fiddle I created: http://jsfiddle.net/jaL5bd3z/1/
favorite count: 0
has comment: http://stackoverflow.com/comment/40776028
has comment: http://stackoverflow.com/comment/40775239
downvote count: 1
type: AnsweredQuestion
has title: Make entire div clickable for WordPress posts, not just the title?
tagged with: wordpress
has answer: http://stackoverflow.com/a/26032454
type: Question

http://stackoverflow.com/comment/40610816
type: QuestionComment
has text: You know you're missing the `thead` and `tbody` elements ?
comment on: http://stackoverflow.com/q/25940202
score: 0
type: Comment

http://stackoverflow.com/comment/40495181
type: Comment
type: QuestionComment
has text: Make your life easier and just don't try to do something that the language doesn't support (yet) ;)
comment on: http://stackoverflow.com/q/25875793
score: 0

http://stackoverflow.com/q/26026065
tagged with: prototype
type: Question
duplicate of: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/40765784
has body: After reviewing a couple of relevant SO questions, I still am not completely clear how I should be handling "this" in callbacks within prototype functions. Here is a self contained example (in node.js), which works fine, but uses the "var self = this" approach, which seems unsatisfying. var http = require('http'); var myClass = function(){ this.results = null this.options = { host: 'stackoverflow.com', path: '/questions/11553985/prototype-callback-function-replace-this-value' }; }; myClass.prototype.request = function(callback) { var self = this; // oof. var d; req = http.request(this.options, function(response, error) { if(error) throw(error); response.on('data', function (data) { d = d + data; }); response.on('end', function() { self.results = d; // my real use case does a bit more with 'd' // this is just a trivial example callback(); }); }); req.end(); } myCallback = function() { console.log(inst.results); } inst = new myClass; inst.request(myCallback); I tried the approach here: javascript: prototypes with callbacks and 'this' By adding this directly before the req.end() line above: req.myinstance = this; // refer to myself in the request object And then in the response call back: response.on('end', function() { this.myinstance.results = d; callback(); }); But this.myinstance.results was then undefined. Is the var self = this acceptable form? What different solutions are there to keeping track of the "parent" object within a function's callback in situations such as this?
tagged with: javascript
tagged with: callback
linked to: http://stackoverflow.com/q/10014552
tagged with: this
has title: this in javascript prototype function callback
has comment: http://stackoverflow.com/comment/40767709
answer count: 0
type: UnansweredQuestion
score: 0
linked to: http://stackoverflow.com/q/20279484

http://stackoverflow.com/a/25953224
type: Answer
answers question: http://stackoverflow.com/q/25953156
has comment: http://stackoverflow.com/comment/40642132
has body: Your general problem is that you're operating on all elements with a class, not just the ones in the current DIV in the .each iteration. You need to use $(this).find() to restrict yourself to the current DIV: $("#list-view-button").click(function() { $( ".archive-view-container" ).each(function() { $( this ).removeClass().addClass("col-xs-12 list-item box archive-view-container list"); $(this).find( ".country" ).show(); $(this).find( ".product-categories" ).show(); $(this).find( ".vehicle-categories" ).show(); $(this).find( ".date" ).show(); $(this).find( ".country-flag" ).hide(); $(this).find( ".archive-kit-info" ).addClass( "list" ).removeClass( "grid" ) .nextAll().wrappAll("&lt;table&gt;"); }); }); Note that this creates an invalid DOM -- the children of &lt;table&gt; have to be table elements like &lt;tbody&gt; or &lt;tr&gt;. You'll need to convert all the DIVs into rows, and their contents into &lt;tr&gt; elements.
score: 0

http://stackoverflow.com/q/25946167
has comment: http://stackoverflow.com/comment/40621113
has comment: http://stackoverflow.com/comment/40620672
has title: Amazon S3 upload image - using angular js directly from browser
downvote count: 0
answer count: 1
tagged with: javascript
score: 1
tagged with: amazon-web-services
accepted answer: http://stackoverflow.com/a/25946295
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25946295
has body: I am trying to upload images from my browser to Amazon S3 directly, using angular js. Below is my code. function _upload($files) { $scope.file = $files[0]; $scope.creds = { access_key: '***', secret_key: '***', bucket: 'sabari-test' }; var bucket = new AWS.S3({ params: { Bucket: $scope.creds.bucket } }); AWS.config.accessKeyId = $scope.creds.access_key; AWS.config.secretAccessKey = $scope.creds.secret_key; AWS.config.region = 'us-west-2'; // AWS. if ($scope.file) { // Perform File Size Check First var fileSize = Math.round(parseInt($scope.file.size)); if (fileSize &gt; $scope.sizeLimit) { console.log('Sorry, your attachment is too big.'); return false; } // Prepend Unique String To Prevent Overwrites var uniqueFileName = 'hai' + '-' + $scope.file.name; var params = { Key: uniqueFileName, ContentType: $scope.file.type, Body: $scope.file, ServerSideEncryption: 'AES256' }; bucket.putObject(params, function(err, data) { if (err) { console.log(err.message); return false; } else { // Upload Successfully Finished console.log('File Uploaded Successfully'); } }) } else { // No File Selected console.log('Please select a file to upload'); } } I get the below error: "Missing credentials in config" Please let me know what is the missing credential? Thanks.
tagged with: amazon-s3

http://stackoverflow.com/comment/40495691
has text: I hate to do this to you a second time, but I think `prompt` also works a bit differently, too.. https://www.npmjs.org/package/prompt
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25876846
score: 0

http://stackoverflow.com/comment/40613716
type: AnswerComment
has text: The code tag just highlight the text into the html tags inside, the mark up render normally
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25941369

http://stackoverflow.com/comment/40757501
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26019658
type: QuestionComment
has text: ...you should also be aware that you can associate data directly with elements using the `.data()` method. This seems to be what you're after since you were hoping to name the variable after the element's ID. I don't particularly like to use `.data()` for various reasons, but it may be suitable for whatever it is you need.

http://stackoverflow.com/comment/40729342
type: QuestionComment
has text: @Tom do you want to do this server-side or client-side? If server-side you could check out NodeJS's file API
comment on: http://stackoverflow.com/q/26005480
score: 0
type: Comment

http://stackoverflow.com/a/30261430
score: 2
has body: mrt add bootstrap-3 is worked for me. Hope this help!
downvote count: 0
answers question: http://stackoverflow.com/q/25880163
type: Answer
upvote count: 2

http://stackoverflow.com/q/25980923
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40683948
has comment: http://stackoverflow.com/comment/40684210
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25988957
accepted answer: http://stackoverflow.com/a/25988957
has title: Google maps API console.log(stateClicked)
favorite count: 0
has body: LOST IN THE MAPS API... I need to be able to interact with an existent Google map of the US. When a state is clicked on, I would like to pass its state name to a function which does some dynamic stuff based on the state that was actually clicked (shows or hides features belonging to that clicked region). I read a few related posts and searched else where however I have come up empty handed. Hope someone can help! Sorry I do not have any code to go off for this one...
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40683400
has comment: http://stackoverflow.com/comment/40686026
type: Question
tagged with: google-maps
tagged with: api

http://stackoverflow.com/comment/40672398
type: Comment
comment on: http://stackoverflow.com/a/25975277
score: 1
type: AnswerComment
has text: You don't have to use `.parseFloat()`; you can simply skip the call to `.toFixed()`.

http://stackoverflow.com/q/25926713
has body: JS var health = document.getElementById("health") $(document).ready(function(){ $('.heal').click(function(){ var healthval = +document.getElementById('health').getAttribute('value') console.log(healthval) if (healthval === 1) { alert("It's already full!"); } else { document.getElementById('health').setAttribute('value', healthval + 0.1); alert("You give your critter some food!"); } if (healthval > 1) { healthval = 1; } if (healthval === 0) { alert("Your critter has died! Oh no!"); } }); }); HTML Heal Me I'm using the above code for a 'health bar' in a little project I'm working on. I'm pretty happy with it as the health does up / down as it's supposed to. Only thing is, for some reason, the alert("It's already full!"); and alert("Your critter has died! Oh no!"); parts aren't happening when they should be....but the alert("You give your critter some food!"); triggers every time. What am I doing wrong?
has answer: http://stackoverflow.com/a/25927291
has comment: http://stackoverflow.com/comment/40586348
upvote count: 1
has comment: http://stackoverflow.com/comment/40586361
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25927291
score: 1
has comment: http://stackoverflow.com/comment/40586437
possible better answer: http://stackoverflow.com/a/25927453
type: Question
has answer: http://stackoverflow.com/a/25927453
has comment: http://stackoverflow.com/comment/40586442
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has title: JavaScript Alert won't trigger

http://stackoverflow.com/comment/40550653
type: QuestionComment
has text: @Tapaswini if you check downloadify in example folder that will work in all browser
type: Comment
comment on: http://stackoverflow.com/q/25906503
score: 0

http://stackoverflow.com/comment/40724740
has text: thanks for everything so far! it runs well but once it would cease to work once I put the code in the $(".isotope-reset").click(function(){ }); --- Latest fiddle @ http://jsfiddle.net/yk9f2dof/1/
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26003362

http://stackoverflow.com/q/26017622
score: 0
accepted answer: http://stackoverflow.com/a/26017770
has answer: http://stackoverflow.com/a/26017701
tagged with: http://stackoverflow.com/tag/html
answer count: 5
has answer: http://stackoverflow.com/a/26017770
has answer: http://stackoverflow.com/a/26018338
has body: I want to make the disappear when Other Countries is selected. This is my HTML Portugal Other Countries VAT (23%) And this is my script (which I found here on stackoverflow) And I don't know why but it isn't working, it just stays there.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40749911
possible better answer: http://stackoverflow.com/a/26017701
has answer: http://stackoverflow.com/a/26017914
type: Question
has title: Change attribute depending on Select Option
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26017838

ternary-operator
tags question: http://stackoverflow.com/q/25901945
tag name: ternary-operator
tags question: http://stackoverflow.com/q/25998276
type: Tag

http://stackoverflow.com/comment/40776098
comment on: http://stackoverflow.com/q/26031934
score: 0
type: Comment
type: QuestionComment
has text: @ slebetman , can you please show me a sample code please

http://stackoverflow.com/comment/40615864
type: Comment
type: QuestionComment
score: 0
has text: Same issue with .on()
comment on: http://stackoverflow.com/q/25942792

http://stackoverflow.com/comment/40820618
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26016648
type: AnswerComment
has text: I just use the normal characters (So I used € instead of &euro;) and save the file in UTF-8 with BOM and now it works perfectly.

http://stackoverflow.com/q/25960683
favorite count: 0
downvote count: 4
upvote count: 0
has answer: http://stackoverflow.com/a/25960765
tagged with: var
score: -4
has comment: http://stackoverflow.com/comment/40645995
has body: lets say i have multiple vars: var a = 1; var b = 2; var c; var d = 4; var e; I want to check if one of them (or more) is empty, in this case var c and var e. is it possible to check them all at once? thanks!
type: AnsweredQuestion
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40645990
has comment: http://stackoverflow.com/comment/40645823
has comment: http://stackoverflow.com/comment/40645873
has comment: http://stackoverflow.com/comment/40646066
has answer: http://stackoverflow.com/a/25960837
accepted answer: http://stackoverflow.com/a/25960837
has title: Js check if one or more vars are undefined
type: Question
possible better answer: http://stackoverflow.com/a/25960765
answer count: 2
has comment: http://stackoverflow.com/comment/40646057
has comment: http://stackoverflow.com/comment/40645906
tagged with: javascript

http://stackoverflow.com/comment/40560301
type: QuestionComment
has text: @cookie monster Yeah I tried solving that all day with no luck..
comment on: http://stackoverflow.com/q/25912713
score: 0
type: Comment

http://stackoverflow.com/q/25905447
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25905595
has comment: http://stackoverflow.com/comment/40547292
favorite count: 0
has body: I have a TreeView in my php file and i want to get selected tree value in my php code to for further process. I am able to see my selected value in alert box but not receiving in php script. I am using zTree. Any help! Thanks in advance here's my js function function showLog(str) { alert(str); // str variable as Selected Value in alert box // i want this str value in php code. }
tagged with: php
has answer: http://stackoverflow.com/a/25905577
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25905595
possible better answer: http://stackoverflow.com/a/25905577
linked to: http://stackoverflow.com/q/13840429
has title: Passing javascript Variable value to php variable
upvote count: 1
downvote count: 1
type: Question
answer count: 2
duplicate of: http://stackoverflow.com/q/13840429

http://stackoverflow.com/a/25987753
answers question: http://stackoverflow.com/q/25983155
has comment: http://stackoverflow.com/comment/50590614
type: AcceptedAnswer
downvote count: 0
has body: You can have a look at the headObject() method in the AWS JavaScript SDK, but if the file is publicly accessible, a simple HEAD request (using ajax) will also do. You can work out the cross domain issues by specifying a CORS policy on your bucket.
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40854547
score: 2
has comment: http://stackoverflow.com/comment/40859674
accepted answer of: http://stackoverflow.com/q/25983155

http://stackoverflow.com/q/25900829
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/25902485
type: AnsweredQuestion
has title: Backbone - aggregator event firing for all models in collection
tagged with: backbone-events
tagged with: backbone-views
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25902485
answer count: 1
has body: I'm trying to use the event aggregator to fire a method off of a model's view. The problem is, when I fire the update or save method for the ItemView, it iterates through all models in the collection. How do I get it to not only fire properly for the model which the view represents (or a new modal in the save method's case), but also prevent it from firing for every model in the collection? This application consists of a collection of Items, each Item has a model which is rendered into an ItemView and listed on the page. If a user clicks the edit item icon, then a ModalView is instantiated and the current Item model data is injected into the ModalView. The ModalView which gets loaded with a template for the respective task. For this instance, i'm loading a template to edit the Item. Here's a summary of the relevant code: var ModalView = Backbone.View.extend({ tagName: "section", className: "modal", events: { 'click .close': 'close', 'click .minimize': 'minimize', 'click .maximize': 'maximize', 'click .save-item': 'saveItem', }, html: null, initialize: function(options) { this.template = _.template(ModalTemplate); this.vent = options.vent; }, saveItem: function() { this.vent.trigger('item.save'); }, }); The item collection's view is here: var ItemsView = Backbone.View.extend({ tagName: 'ul', className: 'item-items', render: function(){ var self = this; // Make it flex GRRRR this.$el.addClass('flex-item'); this.collection.each(function(item) { var date = item.get('created_at'); var itemView = new ItemView({ model: item, vent: App.vent }); this.$el.append(itemView.render().el); }, this); return this; } }); Finally, the item model's view which contains the edit method that fires the ModalView var ItemView = Backbone.View.extend({ tagName: 'li', className: 'item', events: { 'click .edit-item': 'edit' }, initialize: function(options) { this.template = _.template(ItemTemplate); options.vent.bind("item.save", this.save); options.vent.bind("item.update", this.update); }, sav…

http://stackoverflow.com/comment/40762125
type: AnswerComment
type: Comment
has text: This was not the answer. I've updated to include the entire code for the page.
comment on: http://stackoverflow.com/a/25981772
score: 0

http://stackoverflow.com/comment/40733647
has text: @DeDevelopers just reenable the buttons after you done, thats just it, check out arun's answer
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26008653

http://stackoverflow.com/q/25885014
tagged with: css
has body: I just made a website from scratch. I used HTML, CSS, jquery, javascript and php. I haven't published that yet. I just ran it in my localhost with all commonly used browser, and it works fine. Now before I publish that online I need to know few things. 1. DO I need to do anything special in order to be able to run that on public server? 2. Will my site work fine in all mobile phone browsers?
score: -1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Is HTML5 fully functinable in all mobile browser?
has comment: http://stackoverflow.com/comment/40510420
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25885107
has comment: http://stackoverflow.com/comment/40510316
has answer: http://stackoverflow.com/a/25885063
type: UnansweredQuestion
downvote count: 2
tagged with: mobile-browser
upvote count: 1

http://stackoverflow.com/comment/40746655
has text: you can set the required time zone in php and you can convert the dateTime in required timezone dateTime in Jquery and Javascript. first tell what do you want ?
comment on: http://stackoverflow.com/q/26015977
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40766917
score: 1
comment on: http://stackoverflow.com/q/26026734
type: Comment
type: QuestionComment
has text: Please don't use inline event handling like that -- it's god awful to read and maintain.

http://stackoverflow.com/comment/55989147
comment on: http://stackoverflow.com/a/26040287
type: AnswerComment
type: Comment
has text: I'm using iOS9 and I'm having this problem when reading iCloud file (i.e. dot numbers file). It is giving me an error code 4. No issue if the file is an image from camera roll though.
score: 0

http://stackoverflow.com/comment/40559881
type: AnswerComment
comment on: http://stackoverflow.com/a/25904508
score: 0
type: Comment
has text: Thank you, that's quite insightful.

http://stackoverflow.com/comment/40748688
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26017137
has text: You can always do it manually by iterating through all object keys (and "subkeys" and so on). It will probably be the fastest solution.
score: 4

http://stackoverflow.com/comment/40642900
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25958385
type: Comment
has text: That seems a little more complicated for the average Joe to implement. I'm writing a module for anyone, even those without coding skills trying to implement our product. `ZOO.override('errorHandler', function(msg) { console.log('After: ' + msg); });` Most people know what `override` means especially if they've watched a villain movie, so it seems more meaningful.

http://stackoverflow.com/a/26017053
score: 2
has body: Maybe if you update your jquery selector $("#MyTable &gt; tbody:first")
answers question: http://stackoverflow.com/q/26016985
upvote count: 2
downvote count: 0
type: Answer

http://stackoverflow.com/a/26004942
score: 10
answers question: http://stackoverflow.com/q/26004519
has comment: http://stackoverflow.com/comment/40740676
upvote count: 10
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40740323
has body: Just call .end on the process.stdin stream To me, this is a more straightforward (and documented) way of ending the stream. console.log('Press Enter to allow process to terminate'); process.stdin.once('data', callback); function callback (data) { console.log('Process can terminate now'); process.stdin.end(); } It's also worth noting that node sets the stream as the context for the callback function, so you can just call this.end console.log('Press Enter to allow process to terminate'); process.stdin.once('data', callback); function callback (data) { // `this` refers to process.stdin here console.log('Process can terminate now'); this.end(); } You could also emit an end event which has additional benefits like being able to call a function when the stream is finished. console.log('Press Enter to allow process to terminate'); process.stdin.once('data', function(data) { console.log('Process can terminate now'); this.emit("end"); }); process.stdin.on('end', function() { console.log("all done now"); }); This would output Press Enter to allow process to terminate Process can terminate now all done now A final solution would be to use process.exit. This allows you to terminate a program whenver you want. for (var i=0; i&lt;10; i++) { process.stdout.write( i.toString() ); if (i &gt; 3) process.exit(); } Output 01234 This would work inside of a stream callback, as part of a child process, or any other bit of code.

http://stackoverflow.com/comment/40570882
type: Comment
comment on: http://stackoverflow.com/q/25917803
type: QuestionComment
score: 1
has text: Why the downvote ? The fact that google yields no answers is why I'm here asking on stackoverflow. If I could find an answer on google I wouldn't ask here.

http://stackoverflow.com/q/25909810
accepted answer: http://stackoverflow.com/a/25910238
score: 0
has title: hide/show textarea via checkboxes with same classes for different sections
has body: Well, I have a form of interest and when I select an option from select list (e.g cars, motors) it gives me content relating to option. Here is the test page -> Here I also have created checkboxes for each section (from above instance) and I want when I check a specific checkbox (.other) to display a text box for details (.textbox) and when I uncheck it to get hidden by default. I gave to this specific checkbox and each textarea the same class for each section. For checkbox -> .other and for textarea -> .textbox This is the code (of checkboxes) for each section: Cars text <input type="checkbox" name="odiki-car" id="odiki-car"text text **Other details** Motors text **Other details** And I tried this JS code: But I do something wrong. What do you suggest? Thanks in advance.
possible better answer: http://stackoverflow.com/a/25909896
has answer: http://stackoverflow.com/a/25909896
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40555080
has comment: http://stackoverflow.com/comment/40555068
answer count: 3
has answer: http://stackoverflow.com/a/25910473
has answer: http://stackoverflow.com/a/25910238
tagged with: checkbox
type: AnsweredQuestion

http://stackoverflow.com/comment/40648259
has text: Hello! the thing is that I am trying to combine all those .js files and cache it locally, so I use that unique and with expiration cache. What you suggest are still externan resources without expiration cache.. thanks anyway for your time!
type: Comment
comment on: http://stackoverflow.com/a/25961473
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40520448
score: 0
comment on: http://stackoverflow.com/a/25890951
has text: Does not matter, browser will ignore the unknown attribute and all will run fine. The language attribute has also been deprecated for awhile now.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40533790
has text: What do you expect `room.table+i = {};` to do? What do you mean by "increment object"? Because that doesn't really make sense.
type: QuestionComment
comment on: http://stackoverflow.com/q/25898047
score: 1
type: Comment

http://stackoverflow.com/comment/40534524
type: Comment
has text: I appreciate your help for me..plz check my comment on your 2nd answer. I am writing it again here " s5.postimg.org/60cl5vxbb/freelancingcare_2014_09_17.jpg Look that bro.. there still i can add same date there :( I want user cant add same date again and again. Please look that jsfiddle.net/SirDerpington/h3wGx/4 jsfiddle there you cant select same day. I want this similar way in my script."
comment on: http://stackoverflow.com/a/25878467
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40530451
type: QuestionComment
has text: @AvinashRaj - Well, its not supposed to match `-5` because there is no `-` in your regex. And of course there is only a single digit `5` when the regex is looking for `\d{2}`
score: 0
comment on: http://stackoverflow.com/q/25895593
type: Comment

http://stackoverflow.com/a/26010636
accepted answer of: http://stackoverflow.com/q/26010565
type: AcceptedAnswer
has body: Try this out:- http://jsfiddle.net/adiioo7/jLLyzm7p/ var myAppModule= angular.module('ControllerExample', []).controller('SimpleController', SimpleController); function SimpleController($scope) { $scope.customers = [{ name: 'Customer 1', city: 'Gampaha' }, { name: 'Customer 2', city: 'Negombo' }, { name: 'Customer 3', city: 'Gampaha' }, { name: 'Customer 4', city: 'Gampaha' }, { name: 'Customer 5', city: 'Kadawatha' }]; }
downvote count: 0
answers question: http://stackoverflow.com/q/26010565
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/40650304
has text: you're right, i forgot to declare the image variable. i edited my answer.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25962843
type: Comment

http://stackoverflow.com/comment/40527614
type: Comment
type: QuestionComment
has text: Changed a bit of CSS. Should I post it as answer because it would be difficult to explain in comment?
score: 0
comment on: http://stackoverflow.com/q/25893395

http://stackoverflow.com/a/26004011
has comment: http://stackoverflow.com/comment/40741278
has body: Since the table renderer does not support html values for th elements, it sets explicitely the textContent property of th you must create your own renderer. You have two choices: 1.Create a renderer based on Table renderer code and change textContent to innerHTML. I will use a jsfiddle snippet since the render function is pretty big: http://jsfiddle.net/u3pwa0tx/ 2.Reuse existing Table renderer which displays the html as plain text but before returning it to the parent to be appended, move all th text to th html. Edit: I created a pull request on main repository https://github.com/nicolaskruchten/pivottable/pull/214 $(function(){ var rendererHtml = function(){ var result = pivotTableRenderer2.apply(this,arguments); $(result).find('th').each(function(index,elem){ var $elem = $(elem); $elem.html($elem.text()); }) return result; } $("#output").pivotUI( [ {product: "product1", image: "&lt;img src='image1' alt='' height='42' width='42'&gt;"}, {product: "product2", image: "&lt;img src='image2' alt='' height='42' width='42'&gt;"} ],{ renderers:{ 'table2Renderer': rendererHtml } } ); });
answers question: http://stackoverflow.com/q/26002789
has comment: http://stackoverflow.com/comment/40740842
upvote count: 5
has comment: http://stackoverflow.com/comment/40736053
score: 5
has comment: http://stackoverflow.com/comment/40740673
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40736098
has comment: http://stackoverflow.com/comment/40735078
has comment: http://stackoverflow.com/comment/40735162
accepted answer of: http://stackoverflow.com/q/26002789
has comment: http://stackoverflow.com/comment/40736164

http://stackoverflow.com/q/25941891
has answer: http://stackoverflow.com/a/25941964
downvote count: 3
has body: I have a table as follows: Remove And I have a hyperlink: Add What I need to do is to add the into the table each time I click on the and remove a row when I click on the corresponding to that row. I tried as follows : But on clicking the hyperlink the text ".sample" gets written into the table. How can I do it ?
has comment: http://stackoverflow.com/comment/40614061
has title: Add a sample row to a table dynamically
has answer: http://stackoverflow.com/a/25942096
score: -3
has answer: http://stackoverflow.com/a/25942005
answer count: 4
has answer: http://stackoverflow.com/a/25942141
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40614492
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25942096
has comment: http://stackoverflow.com/comment/40614077
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25941964

http://stackoverflow.com/q/26004959
tagged with: javascript
tagged with: asp.net
score: 0
has body: I'm making a tool to automate some things at work, we need an aspx webpage where we fill in some information. Then we click on the submit button, which launches a javascript download dialog to download an xml file. I would like to capture the download url so I can open the xml with my application to extract the important information. I'm using a WebBrowser event. Because this is a javascript call the Navigating event, the Navigated event and the DocumentCompleted event dont occur, only the FileDownload event occurs but the url stays the same like the main aspx page. Does anybody know how I can catch the URL of the download and cancel the download dialog? Thanks in advance!
tagged with: download
has title: Capture automated download webBrowser
type: UnansweredQuestion
tagged with: c#
has answer: http://stackoverflow.com/a/30216755
type: Question
tagged with: browser
answer count: 1

http://stackoverflow.com/q/25891499
tagged with: angularjs
type: UnansweredQuestion
tagged with: requirejs
has comment: http://stackoverflow.com/comment/40526973
has comment: http://stackoverflow.com/comment/40597222
answer count: 0
type: Question
tagged with: javascript
has title: RequireJS with AngularJS
score: 0
has body: I'm having problem to implement angular with require. When the screen starts not imprime the message of controller. Below following my codes. [Scripts/Main.js] require.config({ paths: { 'angular': 'angular.min' }, shim: { 'angular': { exports : 'angular' } } }); require([ '../App/Controller/mainController' ]) [App/Controller/MainController.js] require(['../app/app'], function (app) { app.controller('MainController', function ($scope) { $scope.message = 'Hello world'; }); }); [App/App] define(['angular'], function (angular) { return angular.module('MyApp', []); }); [HTML] &lt;div class="row" ng-app="MyApp"&gt; &lt;div ng-controller="MainController"&gt; {{message}} &lt;/div&gt; &lt;/div&gt;

http://stackoverflow.com/q/25982342
favorite count: 0
tagged with: extjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25983557
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25983557
score: 3
has title: EXT JS 5 - Override ViewController definition?
tagged with: javascript
tagged with: inheritance
tagged with: class
has body: I want all my ViewControllers to have two custom methods. I tried to accomplish this by creating a class that extends from the ViewController, called CustomViewController, and then having my other ViewControllers extend my CustomViewController class, but then I get a warning message in the console saying: [W] Overriding existing mapping: 'controller.login' From 'MyApp.view.mybutton.MyButtonController' to 'MyApp.view.override.CustomViewController'. Is this intentional? And the component I tested it with didn't even load. I realize I could do this straight from the ext-all-debug.js library that's inside the ext folder in my app's root folder, but then when I use Sencha CMD to build the app it'll use my original library that's in my workspace, and not the one I have in my app's folder, so my changes will only work while developing and won't carry on to production. What's the proper way of doing this? Is there a standard?
upvote count: 3
answer count: 1

http://stackoverflow.com/q/25976477
has title: Creating a hierarchy array of JSON objects
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I am almost finished with the JavaScript code to create my final array of JSON formatted objects. From my source array, I have created a top-level parent and its respective child records. I now need to push additional records onto one of more child records. Here's where I'm having trouble. Here is my target data, where "id": 29 being my top-level node. Then the "children" array falls below : [ { "id": 29, "field0": "$ALL$", "field1": 1564.92711931719, "field2": -171.934775655824, "field3": -292.877167373888, "children": [ { "id": 0, "field0": "Goldman", "field1": 0, "field2": 0, "field3": 0 }, { "id": 1, "field0": "IBM", "field1": 0, "field2": 0, "field3": 0 }, { "id": 2, "field0": "JP Chase", "field1": 0, "field2": 0, "field3": 0 }, { "id": 4, "field0": "Merrill", "field1": 0, "field2": 0, "field3": 0 }, { "id": 5, "field0": "Nokia", "field1": 0, "field2": 0, "field3": 0 }, { "id": 6, "field0": "Pequot", "field1": 0, "field2": 0, "field3": 0 }, { "id": 9, "field0": "Deutsche", "field1": 0, "field2": 0, "field3": 0 }, { "id": 16, "field0": "General Insurance", "field1": 0, "field2": 0, "field3": 0 }, { "id": 18, "field0": "AIG", "field1": 0, "field2": 0, "field3": 0 }, { "id": 19, "field0": "Andor", "field1": 0, "field2": 0, "field3": 0 }, { "id": 20, "field0": "BARCLAYS", "field1": 92.7731197209214, "field2": -10.1717767200607, "field3": 616.369427825382 }, { "id": 26, "field0": "CSFB", "field1": 3.35029024626419, "field2": -0.367366071961442, "field3": -132.725310207512 }, { "id": 27, "field0": "BLOSOFL", "field1": 0, "field2": 0, "field3": 0 }, { "id": 28, "field0": "GRMOBND", "field1": 0, "field2": 0, "field3": 0 }, { "id": 32, "field0": "GM", "field1": 0, "field2": 0, "field3": 0 }, { "id": 33, "field0": "GE", "field1": 0, "field2": 0, "field3": 0 }, { "id": 34, "field0": "BHPBMGRP", "field1": 1468.80370935, "field2": -161.395632863801, "field3": -776.521284991759 }, { "id": 35, "field0": "PIMCO", "field1": 0, "field2": 0, "field3": 0 } ] } ] I am now left with…
downvote count: 1
type: Question
tagged with: javascript
score: 0
upvote count: 1
tagged with: arrays
answer count: 1
has answer: http://stackoverflow.com/a/25981229
favorite count: 0

http://stackoverflow.com/comment/40561966
type: Comment
type: QuestionComment
has text: Just use a ` `
comment on: http://stackoverflow.com/q/25913683
score: 0

http://stackoverflow.com/comment/40765976
comment on: http://stackoverflow.com/q/26026193
has text: HTML and JSON is just text, so while it's possible, it doesn't necessarily make sense.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25986074
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25985341
has comment: http://stackoverflow.com/comment/40714079
has body: I think you're looking for this: UnixTimeStamp = DateDiff("s","01/01/1970",Now()) * 1000

http://stackoverflow.com/a/25966608
downvote count: 0
score: 1
upvote count: 1
has body: Try this: $('#msg').keyup(function(){ var msg = $.trim($(this).val()); // remove left and right blank spaces. $('#btn1').prop('disabled', msg == "" ? true : false); });
type: Answer
answers question: http://stackoverflow.com/q/25966474

http://stackoverflow.com/comment/40677310
type: AnswerComment
score: 0
type: Comment
has text: If you got an answer please submit it.
comment on: http://stackoverflow.com/a/25977741

http://stackoverflow.com/comment/40773448
type: QuestionComment
comment on: http://stackoverflow.com/q/26029920
score: 0
has text: @StephenMuecke Thanks for pointing out, you're right. Case solved.
type: Comment

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/25920006

http://stackoverflow.com/comment/40534822
score: 0
has text: Oriol, your comment just made me think that I was looking for something that is not even there. This custom element was just contained in outer DIV. The intent was to calculate the width of container at run time and then set width of this custom element based on some other algorithm using container width as base. I have changed the code to use $("#elemId").parent().width().
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25898313

http://stackoverflow.com/comment/40679643
has text: no, the inputs I am writing are not generated by the server, the server interprets them as and either way, why does that matter
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25979021

http://stackoverflow.com/comment/40552078
type: AnswerComment
comment on: http://stackoverflow.com/a/25907817
type: Comment
has text: It should be `$('.clicked').css("opacity", 0.7).removeClass('clicked');`
score: 1

http://stackoverflow.com/q/25885341
has answer: http://stackoverflow.com/a/25885784
has title: validate file size before upload for input type=file using angularjs
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3717793
type: Question
tagged with: angularjs-directive
upvote count: 9
has comment: http://stackoverflow.com/comment/40511067
accepted answer: http://stackoverflow.com/a/25885784
score: 9
has body: I have an input type=file element in my form. I want to create a custom directive for checking the file size as soon as I select a file using the input element. I know how to create a create a custom directive, but is there any way in angularjs to determine the file size of the selected element. No Jquery is to be used. The js code: app.directive('checkFileSize',function(){ return{ require: 'ngModel', link: function(scope, elem, attr, ctrl) { // add a parser that will process each time the value is // parsed into the model when the user updates it. ctrl.$parsers.unshift(function (value) { //i want to do something like this var fileSize= // get file size here if(fileSize&gt;threshold){ ctrl.$setValidity('checkFileSize',false); } // return the value to the model, return someValue; }); } } });
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/48202769
tagged with: javascript
favorite count: 0
tagged with: angularjs
tagged with: file-type

http://stackoverflow.com/comment/40761858
type: Comment
type: QuestionComment
score: 1
has text: Always always always validate on the server side.
comment on: http://stackoverflow.com/q/26023687

http://stackoverflow.com/comment/40498374
type: QuestionComment
score: 0
has text: I've been given my requirements and have to stick to them, unfortunately! As is tradition in the dev world. Single input box. Placeholders won't cut it, either.
comment on: http://stackoverflow.com/q/25878046
type: Comment

http://stackoverflow.com/comment/40778054
type: Comment
type: QuestionComment
has text: You are welcome! I formulated my comment into extended answer ;-)
comment on: http://stackoverflow.com/q/26023611
score: 0

http://stackoverflow.com/a/65436420
answers question: http://stackoverflow.com/q/25927895
has body: Create a new class (as a separate TS-file) like so: import { Control, defaults as defaultControls } from 'ol/control'; export class RotatControl extends Control { constructor() { super({}); var button = document.createElement('button'); button.innerHTML = 'N'; var element = document.createElement('div'); element.className = 'blahclass'; element.appendChild(button); Control.call(this, { element: element }); button.addEventListener('click', this.rotate.bind(this), false); } rotate() { super.getMap().getView().setRotation(0); }; } Then import this control in your component - you dont't need t feed the constructor any arguments at all.
score: 0
has comment: http://stackoverflow.com/comment/117609270
type: Answer

http://stackoverflow.com/comment/40689618
comment on: http://stackoverflow.com/a/25984298
has text: Yes, the `if` will also return early. But that's a pretty long condition I think.
type: AnswerComment
score: 0
type: Comment

pivottable.js
tag name: pivottable.js
type: Tag
tags question: http://stackoverflow.com/q/26002789

http://stackoverflow.com/a/25896252
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40530732
type: Answer
has body: You could use a Node.js on the backend with socket.io, using websockets, and stream the real-time (see how I did that!?). Then your client side JS would connect to the websocket and just stream the time out from the server.
answers question: http://stackoverflow.com/q/25896079
downvote count: 0

http://stackoverflow.com/comment/40588362
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25927852
score: 1
has text: what is `link`? is it a function?

http://stackoverflow.com/comment/40543868
score: 1
comment on: http://stackoverflow.com/q/25903352
type: Comment
type: QuestionComment
has text: You have a choice. If you wish to have the question closed and marked as solved, I can put in an answer. If not, it will remain in the unanswered category. @user3889677 it's your call.

http://stackoverflow.com/comment/40606078
type: Comment
comment on: http://stackoverflow.com/q/25937396
has text: I've add more background and examples to the question. Upvote back pls :)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40759760
type: AnswerComment
score: 0
type: Comment
has text: What does the [key] refer to?
comment on: http://stackoverflow.com/a/26022909

http://stackoverflow.com/comment/40555655
type: Comment
type: QuestionComment
has text: So should I focus on making it (somehow) and jQuery object? Or focus on iterating the object I got allready. There should be a best practice here I am missing.
score: 0
comment on: http://stackoverflow.com/q/25909859

http://stackoverflow.com/comment/40591539
comment on: http://stackoverflow.com/a/25922939
score: 0
has text: ...The trick is the last parameter of `animateOne` there we define what happens after animation and after animation we call `animate` again. More clear now?
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25966171
has comment: http://stackoverflow.com/comment/40656312
answers question: http://stackoverflow.com/q/25966100
score: 0
has body: It's still registering your information because you never stop executing if an error is encountered. How you go about doing it can vary depending on if you only want to show a single error message or all error messages back to the user, but a possible simple solution could be something like below: $error = false; if(empty($_POST['username'])) { $error = "Please enter a username"; } if(empty($_POST['password'])) { $error = "Please enter a password"; } // .. further validation .. if(!$error) { // Insert new user } else { // Redirect back to form with error message(s) set }
type: Answer
has comment: http://stackoverflow.com/comment/40656281

http://stackoverflow.com/comment/40562479
has text: Love this, however are thr above answers that require less code a better solution? Although they are doing some slightly different. This works great, thank you.
type: AnswerComment
comment on: http://stackoverflow.com/a/25913932
score: 0
type: Comment

http://stackoverflow.com/q/25880049
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/38289991
tagged with: facebook
has answer: http://stackoverflow.com/a/25880416
score: 3
has comment: http://stackoverflow.com/comment/40501880
type: Question
answer count: 2
has body: I am getting user info but unable to get friend list. user getting logged in but Unable to display facebook friends list. Code was working before new sdk. using invitable_friends before it was me/friends. anyone please help. and also is there any way besides this ?
tagged with: javascript
has title: Get facebook friends list in js api
has comment: http://stackoverflow.com/comment/40501832
tagged with: jsapi
downvote count: 1
upvote count: 4

http://stackoverflow.com/comment/40729755
type: QuestionComment
has text: Try increasing the interval, 50ms in way too fast anyway!
comment on: http://stackoverflow.com/q/26006347
score: 0
type: Comment

http://stackoverflow.com/comment/40569994
score: 0
has text: Yes, every alerts are triggered.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25917578

http://stackoverflow.com/q/25900800
type: Question
answer count: 2
downvote count: 0
tagged with: ng-style
tagged with: javascript
has title: Can I use data from API call in Angular ng-style directive?
accepted answer: http://stackoverflow.com/a/25901047
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25901156
tagged with: angularjs
has body: I'm attempting to set the border color and box-shadow color around images pulled from an API based on other data from the API. Basically, I want these colors to be loaded dynamically. Through research I know that ng-style is the way to go and I'm 90% of the way there. I'm having problems using data returned from my API call in the CSS of ng-style. See below: relevant html: &lt;a href="{{item.link}}" target="_blank"&gt; &lt;img src="{{item.images.standard_resolution.url}}" alt="" class="img-responsive" ng-style="homeColors" id="image"&gt; &lt;/a&gt; relevant code from Angular controller: Stadia.get($scope.id).success(function(response) { $scope.shadow = response.prim_hex; $scope.border = response.sec_hex; $scope.homeColors = { "border": "2px solid response.prim_hex", "box-shadow": "3px 3px 7px response.sec_hex", "margin": "6px", "padding": "0" } I'm stumbling over how to get the API results (response.prim_hex and response.sec_hex) into my CSS object, homeColors, so they are loaded in my ng-style directive.
tagged with: css
possible better answer: http://stackoverflow.com/a/25901156
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25901047
upvote count: 1

http://stackoverflow.com/a/25974832
accepted answer of: http://stackoverflow.com/q/25974831
type: Answer
answers question: http://stackoverflow.com/q/25974831
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40690394
score: 8
upvote count: 8
has body: In Typescript you would instantiate a 2x6 Matrix / Multidimensional array using this syntax: var matrix: number[][] = [ [ -1, 1, 2, -2, -3, 0 ], [ 0.1, 0.5, 0, 0, 0, 0 ] ]; //OR var matrix: Array&lt;number&gt;[] = [ [ -1, 1, 2, -2, -3, 0 ], [ 0.1, 0.5, 0, 0, 0, 0 ] ]; The equivalent in JavaScript would be: var matrix = [ [ -1, 1, 2, -2, -3, 0 ], [ 0.1, 0.5, 0, 0, 0, 0 ] ]; The JavaScript syntax is also valid in TypeScript, since the types are optional, but the TypeScript syntax is not valid in JavaScript. To get different lengths you would use the same syntax in JS and TS: var matrixLength = matrix.length; // There are two dimensions, so the length is 2. This is also the column size. var firstDimensionLength = matrix[0].length; // The first dimension row has 6 elements, so the length is 6 var secondDimensionLength = matrix[1].length; // The second dimension row has 6 elements so the length is 6

http://stackoverflow.com/comment/55395102
type: AnswerComment
type: Comment
has text: dimple.newSvg("#chartContainer", "100%", "100%"); AND myChart.draw(0, true); work together. Thanks
score: 0
comment on: http://stackoverflow.com/a/26018604

http://stackoverflow.com/comment/40559461
comment on: http://stackoverflow.com/a/25911843
score: 1
type: AnswerComment
has text: It is the most common way used to check if a variable exists.
type: Comment

http://stackoverflow.com/q/25932990
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40599333
has comment: http://stackoverflow.com/comment/40607757
favorite count: 0
linked to: http://stackoverflow.com/q/2373074
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25933184
has title: Delegated event's handler not called on dynamically injected HTML
has body: In my HTML I have a div, in which I dynamically insert a collapsible with an extra button. Here is the original HTML: And here is the injected HTML: Biatorbagy(65 - 312) Year 1997 Path For the extra button I would like to bind an event handler, and as there will be multple collapsible inserted, I decided to attach a delegated event handler (based on JQuery help). I added this in $(document).ready(function()) as below with JQuery's on method: $(document).ready(function () { $('#resultList').on('click','a.resultZoomButton',function(e){ alert(e.type + 'event fired!') }); }); But the event handler is not called. Why? I would think that if the div with resultList id already exists when the event handler is defined, then in the bubbling phase of the event it should filter for a elements with resultZoomButton class. (I also tried e.preventDefault() with no success.) jsfiddle attached: http://jsfiddle.net/bsimo/5LwLmu2s/4/ JQuery: 1.9.1. JQM: 1.4.0
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40598792
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/25933184
has comment: http://stackoverflow.com/comment/40597955
has comment: http://stackoverflow.com/comment/40598761
tagged with: jquery-mobile
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40600567

http://stackoverflow.com/comment/40491891
score: 0
type: Comment
type: QuestionComment
has text: This doesn't feel like good way to achieve what you are trying to achieve. Plus directive is not supposed to be programmed for specific element but it should be attachable to any element. Can you create plnkr for it? BTW I guess refreshing the page after pressing back button works and you are using angular routing.
comment on: http://stackoverflow.com/q/25874547

http://stackoverflow.com/comment/40644527
type: Comment
comment on: http://stackoverflow.com/a/25959955
has text: @TJ You are right. It's really useless ^^ I deleted it asap
type: AnswerComment
score: 0

python
tags question: http://stackoverflow.com/q/25968941
tags question: http://stackoverflow.com/q/25945720
tags question: http://stackoverflow.com/q/25954792
tags question: http://stackoverflow.com/q/25985022
tag name: python
tags question: http://stackoverflow.com/q/25925050
tags question: http://stackoverflow.com/q/26022975
tags question: http://stackoverflow.com/q/25900639
tags question: http://stackoverflow.com/q/25993415
tags question: http://stackoverflow.com/q/25874686
tags question: http://stackoverflow.com/q/25925996
tags question: http://stackoverflow.com/q/25897149
tags question: http://stackoverflow.com/q/25918284
tags question: http://stackoverflow.com/q/25958703
tags question: http://stackoverflow.com/q/25964032
tags question: http://stackoverflow.com/q/26023168
tags question: http://stackoverflow.com/q/26000700
tags question: http://stackoverflow.com/q/25948674
tags question: http://stackoverflow.com/q/25975185
type: Tag
tags question: http://stackoverflow.com/q/25909927
tags question: http://stackoverflow.com/q/25909614
tags question: http://stackoverflow.com/q/25954142
tags question: http://stackoverflow.com/q/25967347
tags question: http://stackoverflow.com/q/25948412
tags question: http://stackoverflow.com/q/25953770
tags question: http://stackoverflow.com/q/25952328
tags question: http://stackoverflow.com/q/26017664

http://stackoverflow.com/q/26006780
tagged with: http://stackoverflow.com/tag/html
has title: Does a jQuery Slider with Ken Burns Effect Setting Per Image Exist?
tagged with: css
has comment: http://stackoverflow.com/comment/40731970
has body: There are several options as for a jquery based ken burns slider, such as: https://github.com/toymakerlabs/kenburns and http://kthornbloom.com/smoothslides/ However, I can't seem to find one that allows to set options per image. The auto/random thing is nice, but that doesn't work for every image. I would love to see something that would allow to set the effects in the markup. Maybe something like: Does anyone know of a jquery solution with such per image options or something along that line? I would appreciate any suggestions. Thank you
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: canvas
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40632886
type: Comment
type: QuestionComment
has text: I hope this is just an exercise and not designed to actually keep anyone out.
score: 4
comment on: http://stackoverflow.com/q/25953643

http://stackoverflow.com/q/26016623
has comment: http://stackoverflow.com/comment/40749492
tagged with: unit-testing
has comment: http://stackoverflow.com/comment/40748807
has title: How to test a service in Angular with $q
linked to: http://stackoverflow.com/q/25598353
has answer: http://stackoverflow.com/a/26023519
type: Question
tagged with: testing
tagged with: javascript
tagged with: jasmine
score: 0
answer count: 1
tagged with: angularjs
has body: I have a simple service: .factory('list', function($q, $timeout) { return { get: function() { var dfd = $q.defer(); $timeout(function () { dfd.resolve(['label1', 'label2']); }, 10); return dfd.promise; } }; }); and want to test it. So I created: describe('list', function() { var list, labels; beforeEach(module('app')); beforeEach(inject(function($q, _list_) { list = _list_; spyOn(list, 'get').and.callThrough(); list.get().then(function(result) { labels = result; }); })); describe('getting list of labels', function() { it('should return list of labels', function() { expect(labels).not.toBe(undefined); expect(Array.isArray(labels)).toBeTruthy(); }); }); }); But the problem is, that the callback in then function isn't executed, even though the get method in service returns promise. Am I doing something wrong? I read about callFake method in Jasmine, but to be honest I don't see a point in using it. Could you explain what are some benefits of using it? Btw I have Jasmine 2.0 and latest angular with angular-mocks.
type: UnansweredQuestion

http://stackoverflow.com/comment/40748183
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26011092
score: 0
has text: @Bergi it only says `text/html`

http://stackoverflow.com/comment/40704987
score: 0
comment on: http://stackoverflow.com/q/25992915
type: QuestionComment
type: Comment
has text: in the named function when I click on the div it expands and when I click any where on the body except the div it contracts back to its original size .. this was going well till I started to have many divs so I made a named function and now nothing works..

http://stackoverflow.com/comment/40713475
score: 0
has text: The expression: "var email='$email', hashedPassword='$passHash', role='$role', name='$name', salt='$salt';" are valid javascript if the bash variables are evaluated? What im trying to do here is to execute the mongo shell script and init variables through the eval functionality
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25997784

http://stackoverflow.com/comment/58079404
comment on: http://stackoverflow.com/a/25948356
has text: Great answer. I think @jacknkandy should accept it.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26028644
accepted answer: http://stackoverflow.com/a/26028963
tagged with: scroll
tagged with: opacity
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26028963
has title: Fade element opacity on scroll based off window width
has body: I'm trying to fade in an element based off when it first enters the viewport then have it equal 100% opacity by the time it hits the end of the viewport. I have working as far as reaching 100% opacity when it gets to the end. However, when it starts animating, it starts out at about 60% which I know is because I am basing it off the scroll position. So my question is how can I calculate the opacity starting at 0 once it enters the viewport? This is what I have so far: $('.left-cont').each(function() { var $this = $(this), leftPos = $this.offset().left, fadeStart = leftPos - winWidth, fadeUntil = leftPos, opacity; console.log( winWidth - (leftPos - scrollPos)); console.log(fadeStart); if( scrollPos &lt;= fadeStart ) { opacity = 0; } else { opacity = scrollPos/fadeUntil; } $this.css({ 'opacity': opacity }); }); I can provide more context if needed. Any help is appreciated.
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion

http://stackoverflow.com/q/25956768
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25960854
linked to: http://stackoverflow.com/q/25712888
has body: I have two arrays in my application I would like to observe changes: $scope.a = [{id: 1, text: 'test a - 1'}, ...]; $scope.b = [{id: 1, text: 'test b - 1'}, ...]; function changed(){ // notify application about changes in a or b } I have to call the changed() function when a or b have been changed. $scope.$watchCollection('a', changed); $scope.$watchCollection('b', changed); The changed() callback will be triggered twice if I have changes in a and b as well as on init step. I would like to combine two watches in one, something like this: $scope.$watchCollection('a, b', changed); How can I do this with Angular?
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40730028
accepted answer: http://stackoverflow.com/a/25960854
upvote count: 1
type: AnsweredQuestion
has title: How to $watch more than one collection in Angular?
possible better answer: http://stackoverflow.com/a/25956904
score: 1
has answer: http://stackoverflow.com/a/25956904
tagged with: angularjs-scope
type: Question

http://stackoverflow.com/comment/40629489
type: Comment
score: 0
has text: I know, but $.inArray is not the appropriate method in order to compare to arrays. Because It didn't accepts an array as it's first argument. [Jquery Official Website](http://api.jquery.com/jquery.inarray/)
comment on: http://stackoverflow.com/a/25951872
type: AnswerComment

http://stackoverflow.com/q/25895688
upvote count: 4
answer count: 2
linked to: http://stackoverflow.com/q/23663311
favorite count: 0
tagged with: security
tagged with: google-chrome-app
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4873555
has answer: http://stackoverflow.com/a/25933937
score: 2
linked to: http://stackoverflow.com/q/16381282
has answer: http://stackoverflow.com/a/25895720
downvote count: 2
linked to: http://stackoverflow.com/q/13063689
has comment: http://stackoverflow.com/comment/40534225
has title: How to secure some code in Chrome app?
type: Question
has comment: http://stackoverflow.com/comment/40543938
linked to: http://stackoverflow.com/q/194397
has body: If all of my behavior is managed by JavaScript run on the client-side, I'm not seeing a way to blackbox code that I may not want the world to see (e.g. internal details about a hardware device plugged in). Is there a way to save some items from being exposed in right-click -&gt; inspect element? Normally, proprietary parts of a webapp are handled server-side (where there may also be greater computing power). Is everything I write on the chromeapp open for the world to manipulate?
tagged with: javascript

http://stackoverflow.com/comment/53069578
has text: Make that console log on `element.files[0].size` as Prashant sugested and come back with the news please
type: QuestionComment
comment on: http://stackoverflow.com/q/25905412
score: 0
type: Comment

http://stackoverflow.com/a/26003814
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40724975
has comment: http://stackoverflow.com/comment/40725015
has comment: http://stackoverflow.com/comment/40725576
has comment: http://stackoverflow.com/comment/40724869
upvote count: 2
has body: Toggle an additional class, which performs the rotation. CSS: .flipped { transform: rotateY(180deg); } JS: $('#teleprompter').toggleClass('flipped'); http://jsfiddle.net/mblase75/4pru4hap/
has comment: http://stackoverflow.com/comment/40725194
answers question: http://stackoverflow.com/q/26003672
type: Answer
has comment: http://stackoverflow.com/comment/40725086

http://stackoverflow.com/q/25886591
linked to: http://stackoverflow.com/q/5002111
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25886797
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/822452
has title: Trim the HTML tags and character entites together Javascript Regular expression
tagged with: regex
has body: I have a regex in place that trims the html tags correctly: /&lt;\/?[^&gt;]+(&gt;|$)/g But it won't trim the HTML character-enteties. Can anyone please suggest a way to modify this regex to accomplish this task of mine? Thanks in advance!
downvote count: 1
type: Question

http://stackoverflow.com/q/25908350
has title: php javascript change innerHTML with select value from table
score: 0
accepted answer: http://stackoverflow.com/a/25908591
tagged with: innerhtml
tagged with: php
has answer: http://stackoverflow.com/a/25908800
type: AnsweredQuestion
has body: I've got a form with a input field(FIELD1). When the user types in FIELD1 it filters values in FIELD2. Then they click on FIELD2 and it display's the value selected via javascript (this tutorial: http://www.tizag.com/javascriptT/javascript-innerHTML.php). The problem I'm having is that the value of FIELD2 is the companyID in the table - how do I include the javascript to lookup the company name from the table. Picture attached. 2 Type in the box below to narrow the list of names: SELECTED: NONE Select the apropriate name: <?php include 'cv_con.php'; $get = mysqli_query($con,"SELECT * FROM cv_companies order by compname"); $result = mysqli_query($con,"SELECT * FROM cv_companies order by compname"); //$option = ''; while($row = mysqli_fetch_array($result)) { $option .= ' '.$row['compname'].' '; } ?> <?php echo $option; ?>
possible better answer: http://stackoverflow.com/a/25908800
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25908591
tagged with: javascript

http://stackoverflow.com/a/25949014
has body: You forgot a bracet and green needs to be a string, so: &lt;script type="text/javascript"&gt; window.rowcount=function(){ var exam=new XMLHttpRequest(); exam.onreadystatechange=function(){ if(exam.readyState==4){ var i=document.getElementById("newdata").innerHTML=exam.responseText; } if(i==1){ document.getElementsById("newdata").style.backgroundColor="green"; } } } exam.open("GET", "demo1.php?", true); exam.send(); &lt;/script&gt;
answers question: http://stackoverflow.com/q/25948960
score: 0
type: Answer

http://stackoverflow.com/comment/40623871
score: 0
type: AnswerComment
has text: Also POST allows more data to be posted
type: Comment
comment on: http://stackoverflow.com/a/25948247

http://stackoverflow.com/q/25917281
has body: We can know if user has switched from current tab to another by using document.hidden. When user switches between app document.hidden remains false. But how can we check if user has switched to another app from current browser ? Example: Am on my test-page, it has some javascript, it should set some flag on some event when I switch from my browser to say Skype or any other app. I do not require info about other app.
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/40569057
linked to: http://stackoverflow.com/q/1060008
type: Question
upvote count: 4
downvote count: 0
tagged with: javascript
score: 4
has title: How can I know if user has switched to other application from current browser?
duplicate of: http://stackoverflow.com/q/1060008
favorite count: 0

http://stackoverflow.com/comment/40555873
comment on: http://stackoverflow.com/q/25910174
has text: @user1858864 what language
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25911313
answers question: http://stackoverflow.com/q/25910808
score: 2
upvote count: 2
has body: You could use an addon like XregExp.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25910808
type: Answer

http://stackoverflow.com/comment/40742703
score: 0
type: AnswerComment
has text: @Maged: see the demo.
type: Comment
comment on: http://stackoverflow.com/a/26013705

http://stackoverflow.com/comment/40512730
type: Comment
comment on: http://stackoverflow.com/a/25876237
type: AnswerComment
has text: 'My requirement is page should get refreshed and should not postback too' I am having little difficulty in understanding this requirement. if you are looking some thing like the below. in your javascript function add the following line after alert statement . window.location.href = 'http://SamepageUrlyoucangive' and no need to keep return false statement
score: 0

http://stackoverflow.com/q/25902378
has body: I am trying to store some part of my HTML in an array using jQuery. I have this in my HTML: IMAGE 1 IMAGE 2 IMAGE 3 If I do this inside a for loop: $(".image").html(); I get: [IMAGE 1, IMAGE 2, IMAGE 3] And if I do: $("#slide").html(); I get: [ IMAGE 1 IMAGE 2 IMAGE 3 , IMAGE 1 IMAGE 2 IMAGE 3 , IMAGE 1 IMAGE 2 IMAGE 3 ] I want my array to look like: [ IMAGE 1 , IMAGE 2 , IMAGE 3 ] which means I want the whole div to be one element.
has answer: http://stackoverflow.com/a/32953270
accepted answer: http://stackoverflow.com/a/25902528
has comment: http://stackoverflow.com/comment/40541876
has title: Accessing elements inside a div and appending to a list with jQuery
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40542544
has comment: http://stackoverflow.com/comment/40541943
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25902471
has answer: http://stackoverflow.com/a/25902528
has answer: http://stackoverflow.com/a/25902471
score: 0
has comment: http://stackoverflow.com/comment/40541981
has comment: http://stackoverflow.com/comment/40550859
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25974837
type: Answer
answers question: http://stackoverflow.com/q/25966850
upvote count: 1
has body: Two quick searches on Google and here you can find the solutions you need: Mini-question 1 (copy to clipboard) is a duplicate of How do I copy to the clipboard in JavaScript?. Mini-question 2 (adjust width of text input) is a duplicate of Adjust width of input field to its input. Sorry, I don't understand the B part of the second mini-question, nor the two following paragraphs (are they even questions?) About the concerns that we raised in the previous question (and that personally should be considered a top priority over these mini-questions) is that you have serious security problems in the code as it is subject to XSS and SQL injection.
score: 1
downvote count: 0

http://stackoverflow.com/a/27085387
has body: This can be achieved using 'error.form.bv' event. Inside this event handler we can remove unnecessary validations on empty fields. $('#someForm').bootstrapValidator({ // some code }).on('error.form.bv', function(e) { if($('#someClass') &amp;&amp; $('#someClass').val().length == 0 &amp;&amp; $('#someClass').parents('.form-group').hasClass('has-success')){ $('#someClass').parents('.form-group').removeClass('has-success'); $('#someClass').parents('.form-group').find('.form-control-feedback[data-bv-icon-for="someClass"]').hide(); } }).on('success.form.bv', function (e) { // some code });
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25905561
accepted answer of: http://stackoverflow.com/q/25905561
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25933455
type: Question
answer count: 1
tagged with: button
tagged with: javascript
tagged with: jquery
has title: Adding additonal Selected value in Select2 on button click?
tagged with: jquery-select2
score: 0
has comment: http://stackoverflow.com/comment/40598718
has body: The scenario is, I need to append a value (a selected Value) to select2 by just clicking a button. What happen is if I click my button, the other values I selected are gone/cleared. Only 1 value is selected which is the value in my button function. I could select multiple values when typing directly to my select2 textbox, but then if i clicked the button, its value doesn't add to select2. How do i append a value or push an additional value to data already selected in select2 on my click Button? a new value should be added to select2 selected values everytime I click the button. I hope my code below, and my description to what im looking for kinda help you guys. Thank you. I'm using Northwind DataBase, for testing it. (Robert King is under Employee Table) &lt;input type="button" onclick="Passvalue();"/&gt; &lt;input type="text" id="eq" name="eq" style="width: 200px;" /&gt; &lt;script&gt; $(function () { $("#eq").select2({ minimumInputLength: 3, multiple: true, ajax: { url: '/Employee/GetAllEmployees/', dataType: 'json', type: "GET", data: function (searhTerm) { return { query: searhTerm }; }, results: function (data) { return { results: data}; }, }, initSelection: function (element, callback) { var id=$(element).val(); //element value will be 'Robert'; if (id!=="") { $.ajax('/Employee/GetAllEmployees/', { data: { query: id }, dataType: "json", type: "GET", }).done(function(data) { callback(data); }); } }, createSearchChoice: function (term) { return {id: term, text: term + ' (new)', title: term }; }, formatResult: FormatContact, formatSelection: FormatContactSelection, escapeMarkup: function(m) { return m; } }); }); function FormatContact(contact) { return contact.text + "&amp;nbsp;(" + contact.title + ")"; } function FormatContactSelection(contact) { return " &amp;nbsp; &amp;nbsp;"+ contact.text; } function Passvalue() { var test2 = "Robert"; //just an example, value 'Robert' to be passed on select2 for query $('#eq').select2("val", [test2]); } &lt;/script&gt; My Ac…
has answer: http://stackoverflow.com/a/26082329
accepted answer: http://stackoverflow.com/a/26082329
type: AnsweredQuestion

http://stackoverflow.com/q/25939045
score: 1
type: Question
tagged with: cheerio
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
has body: I am trying to run a simple scrape on my webpage, but the issue I am running into is that I can't seem to bee selecting the HTML elements with my scraper correctly. I thought that I was grabbing the attributes correctly from my , but I'm getting an undefined value for each of my object properties. I'm looking to grab the data-name, data-address and data-url values. scrape.js var request = require('request'); var cheerio = require('cheerio'); request('http://personalSite.com', function (error, response, html) { if (!error && response.statusCode == 200) { var $ = cheerio.load(html); $('li').each(function(i, element){ var li = $(this).contents(); var name = li.attr('name'); var address = li.attr('address'); var url = li.attr('url'); var metadata = { name : name, address : address, url : url }; console.log(metadata); }); } }); html: Jerry's Food 5120 West 43rd Street Mike's Pizza 13482 Seventh Avenue
favorite count: 0
has title: Node Jquery Scraping Issue
type: UnansweredQuestion
upvote count: 1
tagged with: request
tagged with: node.js
has answer: http://stackoverflow.com/a/25939104

http://stackoverflow.com/q/26016292
has comment: http://stackoverflow.com/comment/40747195
score: 0
has title: Is it possible to change the type of an AngularJS variable in run time?
has body: Is it possible to change the type of an AngularJS variable in run time? $scope.addedDate = $scope.model.AddedDate; $scope.addedDate = new Date(); $scope.addedDate is created by assigning @scope.model.AddedDate and its a string field and I want to convert @scope.AddedDate into a date field.
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40747119
has comment: http://stackoverflow.com/comment/40747194
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40747855
type: Question
tagged with: .net
answer count: 1
has answer: http://stackoverflow.com/a/26016710
accepted answer: http://stackoverflow.com/a/26016710
tagged with: javascript

http://stackoverflow.com/q/25983105
score: 1
type: Question
tagged with: javascript
tagged with: fullcalendar
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: bower
has title: Extend Fullcalendar jquery plugin
has body: I need to sort all day events by priority. Here I found solution. My problem is that I run bower to keep my packages up to date. Is there a way to implement the solution without messing with the plugin core file(s)?
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/40494064
comment on: http://stackoverflow.com/a/25876020
has text: This will include the braces in the extracted string, which is not what OP wants.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25992046
has answer: http://stackoverflow.com/a/25992482
possible better answer: http://stackoverflow.com/a/25993392
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25994330
has answer: http://stackoverflow.com/a/25993392
upvote count: 2
answer count: 5
has body: I am trying to bind JavaScript event on page load in C# i have tried this code Response.Write(" " + newSubMenuItem.Text + " "); after execution the following output is generated in my html page (on browser). Copyrights Filing the variable SubMenu.FormCaption contains string value 'Copyrights filing' but the browser is adding a double-quote when the variable contains a space, and the value becomes 'Copyrights" filing'. What is the problem with the code?
has answer: http://stackoverflow.com/a/25992207
has title: How to bind JavaScript event on page load using asp.net C#
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/25992482
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25992564

http://stackoverflow.com/comment/40791360
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26030509
has text: Questions are supposed to be asked *after* performing research. Did you do *any*?
score: 0

http://stackoverflow.com/q/26032973
tagged with: javascript
has comment: http://stackoverflow.com/comment/40778315
has title: EXTJS tabpanel.items.items[0] undefined
score: 0
tagged with: extjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40779214
answer count: 0
has comment: http://stackoverflow.com/comment/40778231
has body: I'm pretty much new to extjs stuff. I have a problem with getting textarea in my tabpanel. Tabpanel.items is defined and has two objects in items[]. But when I try get it directly to tabpanel.items.items[0] it is undefined. I tried finding this items by ComponentQuery and by using down with those itemId's. If needed I can update some code. Any ideas? Edit: I don't get it. In firebug in DOM i see that tabpanel.items has lenght equals 2 when i do console.log(tabpanel.items.length) i get 0. I run this pice of code: var items = formPanel.getComponent('tabpanel-dialoglang').items; console.log('tabpanel: ',formPanel.getComponent('tabpanel-dialoglang')); console.log('tabpanel.items: ',items); console.log('tabpanel.items.length',items.length); console.log('tabpanel.items.items:', items.items); console.log('tabpanel.items.items[0]', formPanel.getComponent('tabpanel-dialoglang').items.items[0]); and get in console: tabpanel: Object { xtype="tabpanel", name="tabpanel-dialoglang", itemId="tabpanel-dialoglang", ...} tabpanel.items: Object { allowFunctions=false, initialConfig={...}, items=[0], ...} tabpanel.items.length 0 tabpanel.items.items: [] tabpanel.items.items[0] undefined but when i go to DOM of tabpanel.items it has two objects with I'm interested in. Edit2: creating tabpanel: 'new-dialog': { afterrender: function(panel) { var storeb = Ext.create('RBT.store.language.LanguageStore'); storeb.load({ params:{}, callback: function(records){ storeb.each(function (rec) { var pp; pp = {xtype: 'dialog-lang', title: rec.raw.lcid,itemId:rec.raw.lcid, id:rec.raw.id}; panel.down('#tabpanel-dialoglang').add(pp); panel.down('#tabpanel-dialoglang').setActiveTab(panel.down('#tabpanel-dialoglang').child('dialog-lang')); }); } }); } }, The problem was i tried to get items before it was fully renderd I get timeout for one sec before geting the info and it work as I want.
type: Question

http://stackoverflow.com/q/26030449
has comment: http://stackoverflow.com/comment/82802823
has body: New to Ext JS and 5.0.1 is new, did not find much help. Wanted to know is there any way to control the visibility or add/remove of Widget in Ext.grid.column.Widget column ? Normally would be using renderer function of simple column to add remove widget like button. How to do it with this new feature. Thank you in advance.
score: 2
answer count: 0
upvote count: 2
tagged with: widget
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40779051
tagged with: grid
has title: Ext.grid.column.Widget add remove widget or show hide widget
tagged with: javascript
has comment: http://stackoverflow.com/comment/40774011
type: Question
downvote count: 0
favorite count: 0
tagged with: extjs

http://stackoverflow.com/comment/40635591
has text: Of course! Also, please have a look at my answer, after all having that service could be quite useful, since it would make your code in the controller cleaner and easier to maintain. Thanks!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25954807

http://stackoverflow.com/comment/40501337
has text: Your inputs don't have value.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25879773
score: 0

http://stackoverflow.com/comment/40638370
comment on: http://stackoverflow.com/q/25956434
score: 1
has text: jQuery UI dialog does all you want.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25925133
has title: infinite scrolling using translateY()
type: Question
linked to: http://stackoverflow.com/q/487073
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/704758
has comment: http://stackoverflow.com/comment/40584794
has comment: http://stackoverflow.com/comment/40584670
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40583713
tagged with: css
has body: I have 3 divs at an absolute position and a translateY() on a requestAnimationFrame I move them via the translateY() css declaration relative to the mouse position but for the life of me I can't figure out how to loop the divs after passing the viewport I have the following code in the requestAnimationFrame street.each(function(i,el){ // an array of the divs var bounds = el.getBoundingClientRect(); // get the bounds // here is where it gets tricky. i'm trying to detect when the div's view port has passed // the screen so as to start it over var yPos = bounds.top &gt;= h? -y - bounds.height * 2 : (y - bounds.height * i); // y is the position of the mouse from 0,0 $(el).css($.fx.cssPrefix + 'transform','translateY(' + yPos +'px)'); // set the translation of Y //console.log('street',i,'y', y, 'top: ', bounds.top, 'bottom',bounds.bottom,); });
has comment: http://stackoverflow.com/comment/40584424

http://stackoverflow.com/a/26025833
has body: If you toggle 'cover1', you basically toggle between having and not having 'cover1' on the element. That does not imply that you automatically get cover2 when you remove cover1. You have to do that yourself. Fortunately, toggleClass has a second parameter that accepts a boolean. This allows you to easily toggle classes on or off based on your conveniently introduced boolean. Furthermore, this makes the click handler for both elements the same: var clickOnSettings = false; $( ".settings_link, #coverup" ).click(function() { event.preventDefault(); clickOnSettings = ! clickOnSettings; //Toggle all classes. $( "#coverup" ).toggleClass( "cover1", clickOnSettings); $( "#settingani" ).toggleClass( "settings1", clickOnSettings); $( "#coverup" ).toggleClass( "cover2", !clickOnSettings); $( "#settingani" ).toggleClass( "settings2", !clickOnSettings); }); http://jsfiddle.net/5dzt1v6f/20/
has comment: http://stackoverflow.com/comment/40766058
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40765459
downvote count: 0
has comment: http://stackoverflow.com/comment/40765512
accepted answer of: http://stackoverflow.com/q/26025739
type: Answer
has comment: http://stackoverflow.com/comment/40765761
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/26025739

http://stackoverflow.com/comment/40520118
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25889813
has text: If you just started learning programming today, NodeJS is not a good option because it's very low level language

http://stackoverflow.com/a/25942831
has comment: http://stackoverflow.com/comment/40621063
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40621018
has body: Like this: scope.element1=1; scope.element2=2; scope.$watchGroup(['element1','element2'], function(){/* your code here */}); Update: Bare in mind that $watchGroup started being available in AngularJS 1.3, if you are using a previous version it won't work. Example of how to use $watchGroup in a directive: angular.module ('testApp' , []) .directive ('testDirective', function (){ return{ restrict:'A', replace:true, template: '&lt;div ng-click="inc()"&gt;{{element1}} &lt;br/&gt; {{element2}}&lt;/div&gt;', link: function(scope, element, attrs){ scope.element1=0; scope.element2=0; scope.inc = function(){scope.element1++;scope.element2--}; scope.$watchGroup(['element1', 'element2'], function(){ console.log('something changed!'); }); } } }); PLUNKER
type: Answer
has comment: http://stackoverflow.com/comment/40616066
has comment: http://stackoverflow.com/comment/40616527
has comment: http://stackoverflow.com/comment/40616093
score: 5
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25942122
has comment: http://stackoverflow.com/comment/40615935
answers question: http://stackoverflow.com/q/25942122

http://stackoverflow.com/comment/40754689
has text: No styles are being applied, I don't think it's a css problem as inline styles would overwrite any that were messing with it anyway. I scroll - zero css applied to the div.
score: 0
comment on: http://stackoverflow.com/a/26020130
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40774927
has text: Does it work if you change it to `.on("click", function() {...})`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26031065
score: 0

http://stackoverflow.com/q/26002097
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26044574
has body: I want to use the velocity.js sequences, with transition.slideUpDown. If I use it in this way, it works. $($element).velocity("transition.slideUpDown", 500); But if I want to use it with sequences I can not get it to work. elements: $Element, properties: { translateX: -100 // this works //does not work transition: { slideUpDown: 500 } }, options: { duration: 1000 loop: 5 } Has anyone an idea? Thanks
favorite count: 0
tagged with: velocity.js
tagged with: sequences
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26044574
score: 1
upvote count: 1
type: Question
has title: velocity.js sequences transitions
tagged with: javascript

http://stackoverflow.com/a/25902702
accepted answer of: http://stackoverflow.com/q/25902647
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25902647
type: Answer
score: 3
downvote count: 0
has body: It's a bad idea to give form elements names that conflict with standard form property or method names. For example, avoid giving elements the following names: submit, method, action, reset. If you must, get the attribute value using the .getAttribute() method instead: function init() { alert( document.forms['form-load'].getAttribute("action") ); }
upvote count: 3

http://stackoverflow.com/comment/40581226
type: Comment
score: 3
has text: Think about what you are passing to `jQuery`: `jQuery('inputTest')`. Does that look right to you? Which elements would that select?
type: QuestionComment
comment on: http://stackoverflow.com/q/25923823

http://stackoverflow.com/a/25981306
type: Answer
has comment: http://stackoverflow.com/comment/40752799
has body: Try this: var div1 = document.getElementById('Div1'), div2 = document.getElementById('Div2'); function switchVisible() { if(!div1) return; if (getComputedStyle(div1).display == 'block') { div1.style.display = 'none'; div2.style.display = 'block'; } else { div1.style.display = 'block'; div2.style.display = 'none'; } } document.getElementById('Button1').addEventListener('click', switchVisible); #Div2 { display:none; } Div 1 Div 2 However, this approach may be better: var wrapper = document.getElementById('wrapper'); function switchVisible() { wrapper.classList.toggle('switched'); } document.getElementById('Button1').addEventListener('click', switchVisible); #wrapper > :last-child { display: none; } #wrapper.switched > :last-child { display: block; } #wrapper.switched > :first-child { display: none; } Div 1 Div 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40753682
has comment: http://stackoverflow.com/comment/40744096
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40752224
answers question: http://stackoverflow.com/q/25981198

http://stackoverflow.com/comment/40764164
has text: google it first before you post here
comment on: http://stackoverflow.com/q/26025193
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40575223
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25920387
has text: using MVC > try this answer: http://stackoverflow.com/questions/3604562/download-file-of-any-type-in-asp-net-mvc-using-fileresult

http://stackoverflow.com/q/25925408
has comment: http://stackoverflow.com/comment/40584130
tagged with: this
answer count: 1
has comment: http://stackoverflow.com/comment/40584051
tagged with: jquery
has body: Take this function: $(document).on('change', '#ele1, #ele2', function() { if (this.value == "") { $('.link').bind('click', false); } else { $('.link').unbind('click', false); } }); How would I reference the elements #ele1 and #ele2 separately using this?
has comment: http://stackoverflow.com/comment/40584031
has answer: http://stackoverflow.com/a/25925555
has comment: http://stackoverflow.com/comment/40584060
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40584173
tagged with: event-delegation
has comment: http://stackoverflow.com/comment/40584097
has comment: http://stackoverflow.com/comment/40584043
type: Question
has title: Referencing multiple elements in function using 'this' - JavaScript
tagged with: javascript
has comment: http://stackoverflow.com/comment/40584083
has comment: http://stackoverflow.com/comment/40584106
score: 0

http://stackoverflow.com/q/25904271
tagged with: javascript
has title: How to print html as plain text as xml parser?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: web
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
has body: Firstly sorry for my english! not so good. But basically, i want to get html from http://st.chatango.com/profileimg/k/p/kpyto/mod1.xml in javascript. The body tag, and i've managed to do that, i also unescaped the encoded text. So it will display, but when i print it on the screen it show as html and renders it. I want to see the html as just text. If anyone can help me, that would be awesome :) my html file: http://pastebin.com/Y4t28mEM
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25904338
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25904338
downvote count: 0

http://stackoverflow.com/comment/40586554
score: 0
has text: use dataType: jsonp for cross-domain request, that means request to different domain and dataType: json for same domain-same origin request. i suggest to use, dataType: 'json'
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25926257

http://stackoverflow.com/q/26019658
answer count: 6
has comment: http://stackoverflow.com/comment/40753824
has answer: http://stackoverflow.com/a/26020014
downvote count: 0
has comment: http://stackoverflow.com/comment/40753604
possible better answer: http://stackoverflow.com/a/26019874
tagged with: jquery
has answer: http://stackoverflow.com/a/26020086
favorite count: 0
has title: Get element's ID and set it as variable
has answer: http://stackoverflow.com/a/26019874
has comment: http://stackoverflow.com/comment/40753861
has comment: http://stackoverflow.com/comment/40753740
has answer: http://stackoverflow.com/a/26019881
linked to: http://stackoverflow.com/q/12393303
has answer: http://stackoverflow.com/a/26020089
score: 6
tagged with: php
accepted answer: http://stackoverflow.com/a/26020014
upvote count: 6
has comment: http://stackoverflow.com/comment/40757501
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40753843
has answer: http://stackoverflow.com/a/26020406
type: Question
has comment: http://stackoverflow.com/comment/40753639
has body: I have a button: &lt;button class="btn btn-info continue"&gt; &lt;i class="ace-icon fa fa-check bigger-110"&gt;&lt;/i&gt; Continue &lt;/button&gt; Onclick: $(".continue").click(function(e) { currForm = $(this).parents('form'); e.preventDefault(); }); I can get the id pretty easily: currForm.attr('id');, but can I set the value of this id as a variable. Something like php's variable variables: $a = 'hello'; $$a = 'world'; echo $hello; Edit: I don't want to change element's id. I want to get this ID and use it as a name for a javascript variable. For example, the element I provided above is in a form that has ID='example_id'. currForm.attr('id') will give me example_id and I want to set a variable example_id and assign a value to it. var example_id = 'some value';
has comment: http://stackoverflow.com/comment/40753481
tagged with: javascript

http://stackoverflow.com/comment/40611900
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25938496
score: 0
has text: Some implementations have historically shown reduced performance when invoking a function created using `.bind()` compared to one that simply closes over the object. I don't know if that's still the case, but it would only be a relevant issue in uniquely performance critical applications. I'll give a demo of my second comment in a moment...

http://stackoverflow.com/q/26002725
favorite count: 0
has answer: http://stackoverflow.com/a/26002788
type: AnsweredQuestion
has body: I'm building a set of jQuery objects using .add(): var $set= $([]); $set = $set.add('&lt;div id="a"&gt;&lt;/div&gt;'); $set = $set.add('&lt;div id="b"&gt;&lt;/div&gt;'); $set = $set.add('&lt;div id="c"&gt;&lt;/div&gt;'); I need to be able to get specific elements in this set, however, .find() will not work unless the jQuery set has some sort of hierarchical structure. Here is a jsfiddle illustrating what im talking about: http://jsfiddle.net/3uope6xv/ Is there any way to get a jQuery element in a 'flat' set of jQuery elements?
has answer: http://stackoverflow.com/a/26002760
accepted answer: http://stackoverflow.com/a/26002760
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/26002788
tagged with: javascript
has title: jQuery find() for parentless set of elements
answer count: 2
upvote count: 1
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/25923297
has answer: http://stackoverflow.com/a/25923382
tagged with: cookies
score: 1
type: Question
downvote count: 0
has title: How to set a temporary cookie?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25923382
answer count: 1
favorite count: 0
has body: How can i add a temporary cookie, so once user closes the page it should be expired. function setTempCookie() { addCookie("temp",''); } function addCookie(cname,cvalue,exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname+"="+cvalue+"; "+expires; } I used empty value but it doesn't work for me.
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/40650390
type: AnswerComment
has text: As others commented, `getElementById` could also return null.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25962030

http://stackoverflow.com/comment/40724719
score: 0
has text: I actually am not able to test the code at the minute because I only have fragments, but I was wondering if anyone could answer from pure theory
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26003739

http://stackoverflow.com/comment/40631237
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25945777
type: Comment
has text: you can write javascript in the jsp page saying window.parent.dialogClose()

http://stackoverflow.com/a/26003725
upvote count: 1
has body: I see this in gallery.css: div img { opacity: 0; } If I remove that the image appears. A remedy is to add this CSS to somewhere relevant: .fancybox-image { opacity: 1; } I'm not sure why it broke in the first place.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40725000
type: Answer
accepted answer of: http://stackoverflow.com/q/26003676
score: 1
answers question: http://stackoverflow.com/q/26003676

http://stackoverflow.com/comment/40500235
comment on: http://stackoverflow.com/a/25879038
has text: Just wanted to add that there's also a [`rawContents`](https://github.com/zootreeves/Objective-C-HMTL-Parser/blob/master/HTMLNode.h#L78-L79) property if you want the HTML as a string.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40672984
comment on: http://stackoverflow.com/q/25975471
has text: @epascarello Mainly Googling a lot and didn't find anything relevant or working. 98% of them were about `focus` and `blur`. Wait… Are those suppose to work?!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25984484
tagged with: asp.net-mvc
tagged with: javascript
linked to: http://stackoverflow.com/q/14745178
has body: I'd like to auto-generate some JavaScript files, with proper .js extensions in their URLs, using ASP.NET MVC 5. Here's my problem; I'm using require.js throughout my site and it's working pretty well. However, not all of my JavaScript files are real files on disk. Some of them must be generated at runtime. So I've written a controller which generates the dynamic JavaScript files, and serves them when using the default routing; // ~/Resource/CommonRes -- from ResourceController.CommonRes() define([], function() { return { "menuItemConfiguration":"Configuration", "menuItemAdmin":"Admin", "manageAccount":"Manage Account", "logOff":"Log off" ... }; }); However, I need to have the route available as ~/Scripts/Resources/CommonRes.js -- the .js extension is vital since I'm actually returning a require.js module, to be invoked like this; require(['Resources/CommonRes'], function(commonRes) { // code the uses the resource file }); And in this case, the module named Resources/CommonRes will always be looked for at ~/Scripts/Resources/CommonRes.js. Hence the need to serve it up with that extension. I can't seem to get the routing correct. I've tried the following but to no avail; routes.MapRoute( name: "Resource Scripts", url: "Scripts/Resource/{action}", defaults: new { controller = "Resource" }, namespaces: new string[] { "AITrackRecord.Controllers" } );
answer count: 1
downvote count: 0
has title: Create a MVC route ending ".js" and returning JavaScript?
favorite count: 0
has answer: http://stackoverflow.com/a/25985368
score: 6
upvote count: 6
type: AnsweredQuestion
tagged with: requirejs
tagged with: url-routing
accepted answer: http://stackoverflow.com/a/25985368
tagged with: asp.net-mvc-routing
type: Question

http://stackoverflow.com/q/25920262
score: 0
answer count: 1
has body: I'm running ubuntu 14.04 and have installed jshint using "sudo npm install jshint -g". However when running jshint in console with the commands: $ jshint &lt;.js file&gt; I observe no output after the command returns. Doing: $ which jshint returns /usr/local/bin/jshint. Any advice would be appreciated, thanks.
accepted answer: http://stackoverflow.com/a/26026699
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26026699
tagged with: jshint
type: Question
has title: No output when running jshint
has comment: http://stackoverflow.com/comment/40574841
tagged with: javascript
has comment: http://stackoverflow.com/comment/40582385

http://stackoverflow.com/q/25966100
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/25966171
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: php
score: 2
tagged with: mysql
type: Question
has title: Does not show error when registering on website PHP
tagged with: javascript
has body: I have a database setup and I'm making a site where the user has to register with their username, email and password. However, for some reason, whenever I click on register without entering any information, it still registers into the database without showing the error. Here is the code. &lt;?php // First we execute our common code to connection to the database and start the session require("common.php"); // This if statement checks to determine whether the registration form has been submitted // If it has, then the registration code is run, otherwise the form is displayed if(!empty($_POST)) { // Ensure that the user has entered a non-empty username if(empty($_POST['username'])) { // Note that die() is generally a terrible way of handling user errors // like this. It is much better to display the error with the form // and allow the user to correct their mistake. However, that is an // exercise for you to implement yourself. $username_error = "Please enter a username"; } // Ensure that the user has entered a non-empty password if(empty($_POST['password'])) { $password_error = "Please enter a password"; } // Make sure the user entered a valid E-Mail address // filter_var is a useful PHP function for validating form input, see: // http://us.php.net/manual/en/function.filter-var.php // http://us.php.net/manual/en/filter.filters.php if(!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { $invalid_email = "Invalid email"; } // We will use this SQL query to see whether the username entered by the // user is already in use. A SELECT query is used to retrieve data from the database. // :username is a special token, we will substitute a real value in its place when // we execute the query. $query = " SELECT 1 FROM users WHERE username = :username "; // This contains the definitions for any special tokens that we place in // our SQL query. In this case, we are defining a value for the token // :username. It is possible to insert $_POST['username'] directly into // your $que…
has answer: http://stackoverflow.com/a/25966161

http://stackoverflow.com/q/25901945
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40541057
upvote count: 3
type: Question
has answer: http://stackoverflow.com/a/25901991
score: 2
tagged with: javascript
tagged with: jquery
has title: How does JavaScript parse chained ternary expressions?
has body: I'm reading through the jQuery source code for jQuery.filter and I stumbled upon this heaping pile of jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 &amp;&amp; elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; })); }; So in short we have return "a" &amp;&amp; "b" ? "c" ? "d" : "e" : "f"; where each string could be a varying value My question isn't how to decipher this code, but my brain is tying in knots trying to evaluate the logic being used here. Can anyone help me understand how JavaScript evaluates this return expression?
answer count: 1
tagged with: ternary-operator
has comment: http://stackoverflow.com/comment/40541071
favorite count: 0
accepted answer: http://stackoverflow.com/a/25901991
has comment: http://stackoverflow.com/comment/40541058
downvote count: 1

http://stackoverflow.com/comment/40937900
has text: According to the error-message and some snooping around in the sourcecode of Firefox, this is an issue with a cached item, that hasn't finished loading/being written. Nothing in the posted code suggests you are using any resources that might not have been loaded, so I think we will be hard pressed to help you any further unless we get to see a little more of the code.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25968454

http://stackoverflow.com/comment/40691890
type: AnswerComment
type: Comment
has text: @Segfault: fair 'nuf... the important point in my answer is keeping the function pure.
comment on: http://stackoverflow.com/a/25985442
score: 0

http://stackoverflow.com/comment/40510162
comment on: http://stackoverflow.com/q/25884892
has text: I am sorry, I am not sure what you mean. Can you please elaborate?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25950429
has body: I'm learning Backbone.Marionette and I need to understand how can I show Models in the template using LayoutView. Based on this example: App.js: //VIEWS ArticleView = Backbone.Marionette.ItemView.extend({ template: "#articleTemplate", tagName: 'li', }); SelectedView = Backbone.Marionette.ItemView.extend({ template: "#selectedTemplate", tagName: 'li', }); var AppLayoutView = Backbone.Marionette.LayoutView.extend({ template: "#layout-view-template", regions: { articles: "#articles", selecteds: "#selecteds" } }); myApp.addInitializer(function(options) { var layoutView = new AppLayoutView(); layoutView.render(); layoutView.articles.show(new ArticleView(options.articles)); layoutView.selecteds.show(new SelectedView(options.selecteds)); }); nsApp.start({ articles: Articlescollection, selecteds: SelectedsCollection }); index.html: Layout template and ItemViews templates: I'm really confused here!
score: 1
has answer: http://stackoverflow.com/a/25952822
type: Question
accepted answer: http://stackoverflow.com/a/25952822
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: marionette
favorite count: 0
has title: How to show Collections using LayoutView?
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/40675738
score: 0
comment on: http://stackoverflow.com/a/25976750
type: Comment
has text: @Shai I just run it on my XP machine with compatibility to IE 8 why did it ever work if it's not compatible? I wonder
type: AnswerComment

http://stackoverflow.com/q/25881991
tagged with: javascript
has body: I'm beginner on use vlc web plugin, so I have a problem in my code and I don't know how to solve. I play a video on browser using the VLC web plugin, but I need to get the length of the video and then close the browser when the video is finished. To know the video length, I used the "get_length()" function, but when the returned value is printed, it is undefined. To know if the video is playing, I used the "isPlaying()" function, but when the returned value is printed, it is undefined. I'm using these functions in the wrong way? I need to parse the returned value? Below is my code commented: <TITLE>First Video Thanks in advanced for your help.
score: 0
tagged with: plugins
tagged with: web
type: UnansweredQuestion
tagged with: vlc
tagged with: video
has title: How to get video length and get video state using the VLC web plugin
has answer: http://stackoverflow.com/a/25882176
has answer: http://stackoverflow.com/a/25882119
type: Question
answer count: 2

http://stackoverflow.com/comment/40671992
type: QuestionComment
has text: I didn't even know that was possible. Thanks guys!
score: 0
comment on: http://stackoverflow.com/q/25974971
type: Comment

http://stackoverflow.com/a/25898716
accepted answer of: http://stackoverflow.com/q/25895916
has comment: http://stackoverflow.com/comment/40535714
type: AcceptedAnswer
upvote count: 5
type: Answer
downvote count: 0
score: 5
has body: I made some changes (changed the icon and edited the CSS) in you code to be easier to test: http://jsfiddle.net/q1d06npq/4/ Instead of $.ajax().done() the best option in you case is to use the $.ajax().always() that is executed even if the ajax fails. The code $(this) inside the callback function will not point to the button, to solve that you can use something like this: var elem = $(event.currentTarget);
answers question: http://stackoverflow.com/q/25895916
has comment: http://stackoverflow.com/comment/40535578

http://stackoverflow.com/a/25965556
accepted answer of: http://stackoverflow.com/q/25965439
has body: You need to reference the first match group in order to print the match result only. var re = new RegExp('/v/(.*)/'); var r = 'https://vine.co/v/Mipm1LMKVqJ/embed'.match(re); if (r) console.log(r[1]); //=&gt; "Mipm1LMKVqJ" Note: If the url often change, I recommend using *? to prevent greediness in your match. Although from the following url, maybe consider splitting. var r = 'https://vine.co/v/Mipm1LMKVqJ/embed'.split('/')[4] console.log(r); //=&gt; "Mipm1LMKVqJ"
type: Answer
answers question: http://stackoverflow.com/q/25965439
downvote count: 0
score: 17
type: AcceptedAnswer
upvote count: 17

http://stackoverflow.com/a/25893152
accepted answer of: http://stackoverflow.com/q/25892956
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25892956
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40526345
has body: Well, if all you want to do is break at either spaces or commas, and the date will always be in that format, then you can do this: "September 8, 1951".split(/,? /); Which will return an array of 3 strings, of the form [month, day, year]. The /,? / is a regular expression that finds spaces and commas. However, for more reliable date parsing, you could go with the built-in Date class: new Date("September 8, 1951"); And then use its getMonth, getDate and getFullYear methods to parse the info out. Note: @apsillers mentioned that this is not a standard date format. This is true, but almost all browsers accept it, including nodejs.
type: Answer

http://stackoverflow.com/a/25969542
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25967970
has comment: http://stackoverflow.com/comment/40664018
has body: please see here http://plnkr.co/edit/rv6esLxJuE6NLlxwhZkh?p=preview you can use ng-init ie: ng-init="category.isOpen=$first" HTML: I can have markup, too! I'm the button This is just some content to illustrate fancy headings.
answers question: http://stackoverflow.com/q/25967970
has comment: http://stackoverflow.com/comment/40664363
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40666445
has comment: http://stackoverflow.com/comment/40666846
has comment: http://stackoverflow.com/comment/40666202

http://stackoverflow.com/q/25989497
has comment: http://stackoverflow.com/comment/40700677
has answer: http://stackoverflow.com/a/25989972
has comment: http://stackoverflow.com/comment/40700650
tagged with: field
has title: jQuery when filling form to all required fileds (if empty) add class redBorder except filled
has answer: http://stackoverflow.com/a/25991739
has answer: http://stackoverflow.com/a/25989932
tagged with: input
has comment: http://stackoverflow.com/comment/40700916
has comment: http://stackoverflow.com/comment/91216485
has body: this is my very first question here in stackoverflow, please treat with understanding. What i've already done HTML. My form: Surname Name Phone E-mail City Question captcha send JS. I added an array of required fileds (this is for programmers so they can add all required fileds into this array by themselves) and as long as user has not filled all the fields in array the "send" button is disabled. var requiredFields = ["surname", "name", "phone", "email", "city", "verifyCode", "question"]; JS. Here is my each function which runs through all elements of the array: $.each( requiredFields, function( i, l ) { $(".formInput[name*='form[" + l + "]']").each(function () { $(this).keyup(function () { $("#submit").prop("disabled", chkAllFields()); }); }); }); JS. Here is my function chkAllFields() which runs again((( through all elements of the array and check if fields empty or not: function chkAllFields() { var valid = false; $.each( requiredFields, function( i, l ) { $(".formInput[name*='form[" + l + "]']").each(function () { if (valid) { $("#submit").addClass('disabled'); if ($(".formInput[name*='form[" + l + "]']").val() == '') { $(this).addClass('redBorder'); } else { $(this).removeClass('redBorder'); } return valid; } else { $("#submit").removeClass('disabled'); var input = $.trim($(this).val()); valid = !input; } }); }); return valid; } What i need for finish I need to add "redBorder" class to all required and empty fileds (while user types) exept the field which is now filled; And on "blur" method when user "unfocus" any filed all "redBorder" classes must be removed. For now it works with mistakes (red borders are strange) and i dont know where to find the fix.. JS Fiddle Here is my example of code on JSFIDDLE Thanks in advance.
answer count: 4
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40701844
has comment: http://stackoverflow.com/comment/40701654
accepted answer: http://stackoverflow.com/a/25991739
upvote count: 2
possible better answer: http://stackoverflow.com/a/25989932
has comment: http://stackoverflow.com/comment/40701363
type: Question
tagged with: arrays
tagged with: javascript
tagged with: jquery
downvote count: 0
has comment: http://stackoverflow.com/comment/40699785
has comment: http://stackoverflow.com/comment/40701249
favorite count: 0
has answer: http://stackoverflow.com/a/25990155

http://stackoverflow.com/q/25950866
has body: I have this function. I don't understand why the form is submitted twice. Infact the request I see at the server hapijs is double. $(function(){ $('form').on('submit', function(event){ event.preventDefault(); var $form = $(this); $.post('/send-message', { data: $form.serialize() }, function(data) { }) .fail(function(data){ }); }); }); EDIT: I have realized that placing the script at the top is executed just once. Why?
has comment: http://stackoverflow.com/comment/40628962
linked to: http://stackoverflow.com/q/1510094
has comment: http://stackoverflow.com/comment/40627896
upvote count: 3
has comment: http://stackoverflow.com/comment/40628059
downvote count: 1
has comment: http://stackoverflow.com/comment/40646817
has comment: http://stackoverflow.com/comment/40646936
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/41281481
has comment: http://stackoverflow.com/comment/40627913
score: 2
has comment: http://stackoverflow.com/comment/40646966
answer count: 0
tagged with: javascript
has title: Form submitted twice in jquery when the script is at the bottom of the page
tagged with: jquery
has comment: http://stackoverflow.com/comment/40629186
has comment: http://stackoverflow.com/comment/40628842
favorite count: 0
has comment: http://stackoverflow.com/comment/40646993
type: Question

http://stackoverflow.com/q/25958507
type: AnsweredQuestion
downvote count: 0
score: 9
type: Question
tagged with: parsley.js
has title: Preventing form submission after validation by parsley.js
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/25958860
possible better answer: http://stackoverflow.com/a/57862274
favorite count: 0
has answer: http://stackoverflow.com/a/57862274
upvote count: 9
has answer: http://stackoverflow.com/a/25971244
accepted answer: http://stackoverflow.com/a/25971244
has body: I have used parsley.js many times and have literally copied the code from my last use of parsley. However, every time I submit the form the page refreshes. preventDefault seems to work on my other pages and stops the page from refreshing but for some reason when I tried now it won't work. Can anyone figure out why not? &lt;script&gt; $(function(){ $("#register_signup").submit(function(e){ e.preventDefault(); var form = $(this); if ($('#rform').parsley( 'isValid' )){ alert('valid'); } }); }); &lt;/script&gt; &lt;form id='rform' name='rform' data-parsley-validate&gt; &lt;input id='reg_password' class='register_input' type='text' autocomplete="off" data-parsley-trigger="change" placeholder='Password' required&gt; &lt;input id='reg_cpassword' class='register_input' type='text' name="reg_cpassword" placeholder='Confirm password' data-parsley-equalto="#reg_password" required&gt; &lt;input id='register_signup' type="submit" onClick="javascript:$('#rform').parsley( 'validate' );" value='Sign Up' /&gt; &lt;/form&gt;

http://stackoverflow.com/a/25887014
score: 3
accepted answer of: http://stackoverflow.com/q/25886801
upvote count: 3
has body: Try $(function () { var $checks = $('#list1, #list2, #list3').change(function () { $('#pay-button').prop('disabled', $checks.is(':not(:checked)')); }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;input name="list1" id="list1" type="checkbox" value="" &gt; &lt;input name="list2" id="list2" type="checkbox" value="" &gt; &lt;input name="list3" id="list3" type="checkbox" value="" &gt; &lt;input id="pay-button" type="image" disabled="disabled" src="//placehold.it/32/fff000" value="" name="save"&gt; you can simplify the selector #list1, #list2, #list3 by adding a common class to those elements and then by using a class selector
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40516209
downvote count: 0
answers question: http://stackoverflow.com/q/25886801
type: Answer
has comment: http://stackoverflow.com/comment/40513709

http://stackoverflow.com/a/25922704
has body: Okay, I figured it out. I moved the window.resize call to the init method, and then added a var that = this and then called the getHeight using that.getHeight(). I would be interested to know if this is the correct way to do this. ;(function ( $, window, document, undefined ) { "use strict"; var pluginName = "rigallery", defaults = { transition: "ease" }; function Plugin ( element, options ) { this.element = element; this.settings = $.extend( {}, defaults, options ); this._defaults = defaults; this._name = pluginName; this.init(); } Plugin.prototype = { init: function() { var that = this; this.createGallery(); this.slidesTransition(); $(window).resize(function() { console.log(that.getHeight()); }); }, getHeight: function() { var height = $(this.element).find("li:first img").height(); return height; } }; $.fn[ pluginName ] = function( options ) { this.each(function() { if ( !$.data( this, "plugin_" + pluginName ) ) { $.data( this, "plugin_" + pluginName, new Plugin( this, options ) ); } }); return this; }; })( jQuery, window, document );
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25921731

http://stackoverflow.com/comment/40762296
type: Comment
type: QuestionComment
has text: Primitive variables are not passed by reference, but by value only, meaning you can't pass the variable like that and change the original etc.
comment on: http://stackoverflow.com/q/26024346
score: 4

http://stackoverflow.com/a/25910222
score: 1
has comment: http://stackoverflow.com/comment/40555757
answers question: http://stackoverflow.com/q/25910028
accepted answer of: http://stackoverflow.com/q/25910028
has comment: http://stackoverflow.com/comment/40556360
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40556455
has comment: http://stackoverflow.com/comment/40555824
has body: You can add this &lt;script&gt; at the end of the page: &lt;script&gt; var url = window.location.search; if (url.length) { url = url.replace("?v=", ""); document.getElementById("main_heading").innerHTML = "Export Your Goods To " + url; } else { document.getElementById("main_heading").innerHTML = "Export Your Goods"; } &lt;/script&gt; Provided that you have heading as follows: &lt;h2 id="main_heading"&gt;&lt;/h2&gt;
type: Answer
upvote count: 1

http://stackoverflow.com/q/25985223
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40759637
possible better answer: http://stackoverflow.com/a/26028645
type: Question
has comment: http://stackoverflow.com/comment/40758937
tagged with: rhino
has comment: http://stackoverflow.com/comment/40759042
has answer: http://stackoverflow.com/a/26028599
score: -1
accepted answer: http://stackoverflow.com/a/26028599
answer count: 2
downvote count: 2
has title: Traverse XML Structure
upvote count: 1
has comment: http://stackoverflow.com/comment/40715748
has comment: http://stackoverflow.com/comment/40692272
tagged with: javascript
has answer: http://stackoverflow.com/a/26028645
favorite count: 0
has body: I have the following XML doc: Baking Extravagant Pastries with Kumquats Contino Chuck 238 Emu Care and Breeding Case Justin 115 To get the title for example, I use: myXML.book[0].title[0] How can I get the ISBN (the "0942407296") using the myXML.book...?

http://stackoverflow.com/comment/40814269
score: 0
type: AnswerComment
has text: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment).
type: Comment
comment on: http://stackoverflow.com/a/25949819

http://stackoverflow.com/q/26014688
tagged with: javascript
has answer: http://stackoverflow.com/a/26036682
type: Question
tagged with: regex
possible better answer: http://stackoverflow.com/a/26036682
tagged with: actionscript-3
score: 0
answer count: 2
tagged with: apache-flex
has answer: http://stackoverflow.com/a/26014805
accepted answer: http://stackoverflow.com/a/26014805
has title: Regexp for finding out space and '/' character in user input using actionscript 3
has body: UserID should not have space as well as '/' (forward slash) characters. I'm trying out a regexp in actionscript (as3) to test the user input. I tried out something like this.. /[^\s\/]/ I'm new to actionscript3. Could someone please give your valuable suggestions..
type: AnsweredQuestion

http://stackoverflow.com/q/26024488
tagged with: mobile-safari
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40765513
tagged with: ios
tagged with: javascript
has title: Get object value by property reference not working on iOS
has comment: http://stackoverflow.com/comment/40765365
has comment: http://stackoverflow.com/comment/40762643
answer count: 0
type: UnansweredQuestion
has body: This is my object: var charsObj = {"drive":{"status":"inprogress","data":"some data","history":"the text of my history"}} function getNote(x) { if ( x in charsObj) { console.log(charsObj[x]) } else { console.log('nothing', charsObj[x]) } } if I call getNote('drive') it returns my object value as expected EXCEPT iOS returns 'nothing', undefined. How do I get this to work on iOS?
tagged with: object
tagged with: ios7

http://stackoverflow.com/q/25958556
has body: Is there anyone here who knows a good js library for streaming ip camera on web side? I own a Wanscam HW0033 Image Compression: H264
type: AnsweredQuestion
has title: Ip cam in JavaScript, is it possible?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40641925
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40641952
has answer: http://stackoverflow.com/a/25958610
accepted answer: http://stackoverflow.com/a/25958610

http://stackoverflow.com/comment/40725124
type: Comment
has text: Its var radio1 = document.getElementsByName("0") which will give an array of all elements with name "0" like [ , ], we might need to check the value of these radio buttons, this might help `var radio1 = document.getElementsByName("0")[0].value`
comment on: http://stackoverflow.com/a/26003873
score: 0
type: AnswerComment

http://stackoverflow.com/a/26330955
has comment: http://stackoverflow.com/comment/41328215
accepted answer of: http://stackoverflow.com/q/26003437
type: Answer
answers question: http://stackoverflow.com/q/26003437
score: 0
type: AcceptedAnswer
has body: I'm afraid the documentation to DriveApp.createFile mentions Throws an exception if content is larger than 10MB for all variants except the Blob one, but I suspect it's just an oversight. It looks related to the POST quota and is mentioned anyway in several support tickets (see for instance #552, #2806).

http://stackoverflow.com/a/25968665
accepted answer of: http://stackoverflow.com/q/25958554
answers question: http://stackoverflow.com/q/25958554
score: 0
type: AcceptedAnswer
type: Answer
has body: I found the problem. I set voucherImageCanvas.width = imageSize; voucherImageCanvas.height = imageSize; to voucherImageCanvas.width = voucherImageWidth; voucherImageCanvas.height = voucherImageHeight; Works perfectly. Thanks :)

http://stackoverflow.com/q/26012224
answer count: 2
tagged with: gwt
has answer: http://stackoverflow.com/a/26012342
tagged with: java
tagged with: javascript
has answer: http://stackoverflow.com/a/26012320
possible better answer: http://stackoverflow.com/a/26012342
has comment: http://stackoverflow.com/comment/40739937
tagged with: google-maps
type: AnsweredQuestion
has body: I want to write a class that defines a geographical point is in a zone or out of it; I save the point in sequence that they connected to each other when create zone ; no how can i determine that a point is in zone or out of zone ; this picture depicts the mentioned zone thanks in advance
has comment: http://stackoverflow.com/comment/40739844
type: Question
has title: how to define that a point in out of a zone in google map
has comment: http://stackoverflow.com/comment/40739890
accepted answer: http://stackoverflow.com/a/26012320
score: 0

http://stackoverflow.com/a/25969679
upvote count: 1
type: Answer
has body: XMLHttpRequest is an Http Request :O It's not called XMLLocalFileRequest :) try using http://localhost/ajax_info.txt as a url .. a filename by itself is not a url.
downvote count: 0
answers question: http://stackoverflow.com/q/25969620
has comment: http://stackoverflow.com/comment/40663293
score: 1

http://stackoverflow.com/q/25894487
score: 0
has body: I would like to use the Closure-Library to encode data with AES. When studying the library I found this aes-test: https://github.com/google/closure-library/blob/master/closure/goog/crypt/aes_test.js and the implementation with following warning: WARNING: This is ECB mode only. If you are encrypting something longer than 16 bytes, or encrypting more than one value with the same key (so basically, always) you need to use this with a block cipher mode of operation. See goog.crypt.Cbc. I wonder how I can use this library to encode larger blocks with the AES algorithm. I would like to use an IV, like this CryptoJS example does: var encoded = CryptoJS.AES.decrypt(DATA, KEY, IV); I also could use parts of the end-to-end library ( https://code.google.com/p/end-to-end/source/browse/javascript/crypto/e2e#e2e%2Fsymmetric ) which also provides an aes encryption. However, I have don't know how to work with this implementation either.
tagged with: google-closure-library
tagged with: cryptography
tagged with: cryptojs
tagged with: aes
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25961088
has title: How to use the Closure-Library to encode with AES?
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40662152
type: Comment
type: QuestionComment
score: 0
has text: Have you heard about ` `?
comment on: http://stackoverflow.com/q/25943344

http://stackoverflow.com/comment/40665972
has text: First of all, you don't parse HTML with regexes. Especially not in JavaScript. Is this something that has to be done automatically? Since you're building a new project, why not copy the HTML and just remove the angular code, yourself?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25971721
score: 0

http://stackoverflow.com/q/25886121
tagged with: typescript
has answer: http://stackoverflow.com/a/25899227
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25899227
has comment: http://stackoverflow.com/comment/40512543
has title: How to pass innerText from a dxTextArea into a function in Javascript?
has comment: http://stackoverflow.com/comment/40512855
has answer: http://stackoverflow.com/a/25886213
type: Question
possible better answer: http://stackoverflow.com/a/25886213
tagged with: textarea
tagged with: javascript
has body: we are using javascript/typescript and have been unable to pass the 'in-putted text' from a dxTextArea in a DevExtreme (Typescript) Project. We are using: With the function "saveMyData" defined as: However, the alert only contains text is We have also tried textContent, but got the same results. Anyone got an idea(s) of why this is happening? there isn't an error on screen, so we don't think it's a declaration error. (N.B. this code has been simplified for demonstration purposes). Below is a link to the 'most helpful/detailed' docs: Link to dxTextArea documentation please feel free to ask for clarification/details as I know i'm pretty bad at explaining myself 'on paper'. I would post a fiddle only it doesn't/won't recognise the dxTextArea nor dxButton, so pretty useless! EDIT using innerHTML as suggested gives:
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40512952
has comment: http://stackoverflow.com/comment/40512452
has comment: http://stackoverflow.com/comment/40512729
has comment: http://stackoverflow.com/comment/40513062
tagged with: devextreme

http://stackoverflow.com/q/26003977
has comment: http://stackoverflow.com/comment/55966400
upvote count: 2
has comment: http://stackoverflow.com/comment/40725449
linked to: http://stackoverflow.com/q/17295056
answer count: 1
has title: Representing a 2D point as an array
tagged with: performance
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34108550
score: 2
has comment: http://stackoverflow.com/comment/40725217
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40730015
has body: In Javascript I can represent a 2D point (1,2) either as an object {x:1, y:2} or as an array [1,2]. Is the last one significantly better when it comes to performance? If at some point of my program I decide to add a property to a point v (such as v.next = u) and v is represented as an array, will I loose that [*] performance gain? [*] assuming the answer to 1 is YES.
type: Question
has comment: http://stackoverflow.com/comment/40725533

http://stackoverflow.com/q/25892634
type: Question
tagged with: google-analytics
tagged with: google-tag-manager
has comment: http://stackoverflow.com/comment/42243009
has title: How to implement Google Tag Manager In Cordova
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/30104159
has comment: http://stackoverflow.com/comment/42176200
favorite count: 0
tagged with: android
upvote count: 13
tagged with: cordova
type: UnansweredQuestion
score: 13
linked to: http://stackoverflow.com/q/38437505
has body: I read Google Tag Manager v4 - Getting Started and Integrating Google Tag Manager and Google Analytics in a SPA I am not sure how it handle at the Javascript side even I could. So I want to handle at the native side. But Google's documentation little bit confusing. I find nothing about Cordova and GTM article. Any thoughts? or a step by step guide?

adblock
tags question: http://stackoverflow.com/q/25955716
type: Tag
tag name: adblock

http://stackoverflow.com/a/26048553
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26027947
upvote count: 1
has body: GO <?php $numElements=5; $array = array("This is the first statement", "This is the second statement","This is the third statement","This is the fourth Statement", "Last statement here"); for($i=0;$i<$numElements;$i++){ $divId='state'.$i; $sId='q'.$i; $nextInt=$i+1; $prevInt=$i-1; $nextDiv='state'.$nextInt; $curDiv='state'.$i; $prevDiv='state'.$prevInt; if($i==0){ echo " $array[$i] Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) No answer Previous Next ";} else if($i==$numElements-1){ echo " $array[$i] Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) No answer Previous Next ";} else{ echo " $array[$i] Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) No answer Previous Next "; } } ?> Again,here's the answer

http://stackoverflow.com/q/25940985
tagged with: javascript
score: 0
tagged with: jquery
tagged with: file-upload
tagged with: dropzone.js
type: UnansweredQuestion
answer count: 0
has body: We're using dropzone.js to upload files to the server. It's working, mostly, except for a minor visual thing. When the user uploads one or more files, preview elements are added to the dropzone-previews list. We're listing to "addedfile", and displaying information about the uploaded files in a datatable. If the user uploads more files, these also are added to the dropzone-previews list, and we also add information about them to our datatable. The problem is that the dropzone-previews list grows indefinitely, for no good purpose. We want the list, to show the success or failure of each file upload, but we'd like to clear out the list at the start of every upload. That is, if the user uploads three files, we'd want to see three files in the list. And if the user then uploaded two files, we'd like to see the previews for the first three to be removed, and then the two new uploaded files displayed. This would be simple, if there was an event that fired prior to the first file upload, but from what I can see, "addedfile" is the first event that always fires, but it fires for each file, and it fires after the preview has been added to the list. At this point, the only thing I can think of to do is to tag every &lt;li&gt; with a custom class in the "complete" event, and then to clear every &lt;li&gt; with that event in "addedfile". I think that would work, but it seems rather round-about, and I'm wondering if I've missed seeing an easier way to do this.
has title: How to clear dropzone-previews?
has comment: http://stackoverflow.com/comment/40647802
type: Question
has comment: http://stackoverflow.com/comment/40612947

http://stackoverflow.com/comment/40716102
score: 3
comment on: http://stackoverflow.com/q/25999214
type: Comment
has text: Show us what you have tried and why it isn't working.
type: QuestionComment

http://stackoverflow.com/q/25934816
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/72948837
favorite count: 0
has body: How can I add text or hyper-links to the bottom right of Google Maps when using API V3. That is, add text or hyper-links next to "Map data (c)2014 Google" shown in the screen shot below. Here is my code: EC Bus Locations
has comment: http://stackoverflow.com/comment/40601089
has title: Add text to Google Maps
has answer: http://stackoverflow.com/a/25935187
downvote count: 0
has comment: http://stackoverflow.com/comment/40600559
type: UnansweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40601041
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps

http://stackoverflow.com/comment/40644030
type: Comment
comment on: http://stackoverflow.com/a/25959557
type: AnswerComment
score: 0
has text: I added a Stack Snippet that you can run right from the answer.

http://stackoverflow.com/comment/40674095
comment on: http://stackoverflow.com/a/25975451
has text: Oh, I misread your original questions. You don't care about the marker but the infotext below the map :-) So please forget everything and bind to the `boundschanged` event of your map. Inside that handler you have to check your markers and discard the addresses that are not currently visible on the map.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25922470
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40579476
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40578955
favorite count: 0
upvote count: 3
has body: I'd like to catch the "ERR_EMPTY_RESPONSE" error when i do $.post. My jquery $.post code is: $.post( "parseRequest", { request: "myFile.xml" }, function( data ) { //do something with json data }, "json"); Sometimes, if the file doesn't exist for example, the server will send back a blank response. I'll receive this on the client side: POST http://localhost:8081/parseRequest net::ERR_EMPTY_RESPONSE Is there a way to catch this? I tried using .ajaxError(), but am not using it right... this is what I tried: $.post( "parseRequest", { request: "myFile.xml" }, function( data ) { //do something with json data }, "json").ajaxError(function() { console.log( "** Triggered ajaxError handler." ); }); But I get a 'function undefined' error when i try this. I'm using jquery 1.11.1 Relevant pages: $.post: http://api.jquery.com/jquery.post/ $.ajaxError: http://api.jquery.com/ajaxError/ Any help? Thanks!
has comment: http://stackoverflow.com/comment/40582343
downvote count: 0
answer count: 0
type: UnansweredQuestion
has title: Catch error with $.post using $.ajaxError

http://stackoverflow.com/comment/40641406
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25958240
score: 0
has text: Not even being called I don't think. The function and timeout is working fine, If put an alert in the function it shows, but the load doesn't seem to be calling...

http://stackoverflow.com/comment/40761710
score: 1
comment on: http://stackoverflow.com/q/26024023
has text: @mason -- True - should've mentioned postbacks...I just assume now-a-days no one wants a postback :D
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40526226
type: Comment
type: QuestionComment
has text: What is your specific question?
comment on: http://stackoverflow.com/q/25893904
score: 0

fancybox-2
tags question: http://stackoverflow.com/q/25942452
type: Tag
tags question: http://stackoverflow.com/q/25920021
tag name: fancybox-2
tags question: http://stackoverflow.com/q/25884088
tags question: http://stackoverflow.com/q/26003676
tags question: http://stackoverflow.com/q/26030829

http://stackoverflow.com/comment/40690112
has text: `Array.push` is not a function that exists.
type: Comment
comment on: http://stackoverflow.com/a/25984538
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40715480
score: 0
comment on: http://stackoverflow.com/q/25996029
type: QuestionComment
type: Comment
has text: If you can reproduce the issue in a [JSFiddle](http://jsfiddle.net) that will help. Without the code it's hard to tell...

http://stackoverflow.com/q/25959831
tagged with: angularjs
has answer: http://stackoverflow.com/a/25960071
possible better answer: http://stackoverflow.com/a/25959982
has body: I made tabs using angular js, problem is that i need to set value sel=1 at page load to show first content when page load. How can i resolve this. First Second Third This is first content... This is second content... This is third content...
has answer: http://stackoverflow.com/a/25959982
type: AnsweredQuestion
has title: Set value on page load in angular js
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25960071
downvote count: 0
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/40691848
comment on: http://stackoverflow.com/q/25985341
type: Comment
has text: use that code and go here to compare http://www.mbari.org/staff/rich/utccalc.htm
score: 0
type: QuestionComment

http://stackoverflow.com/q/25924623
has body: Here is my site: http://stage.samkeddy.com/ It's responsive using a couple media queries and a mobile menu button powered by javascript. Here is the javascript for the menu button: function toggleMenu () { if (menuIsVisible == false) { collapsibleMenu.style.height = 'auto'; content.style.paddingTop = '290px'; menuIsVisible = true; } else { collapsibleMenu.style.height = '0'; content.style.paddingTop = '80px'; menuIsVisible = false; } } so you can see that I need to adjust the padding at the top of the content div, in order to offset the menu But if resize to the mobile size, open the menu, and then resize back to the desktop size, the padding isn't fixed by the media query, because there's still an inline style from the javascript. I tried making the padding on the desktop version !important, but it the padding still doesn't change when resized, even though according to this !important beats inline. You can test for yourself by opening the size (how it should look), resizing to a mobile width(the nav will disappear, and you will see the menu button), clicking the menu button (leave the menu open), then resize the site back to a desktop width. You will see the padding is still there. If you inspect it, you can see the original padding is crossed out in favor of the inline style. I know this would be possible by monitoring the width with javascript and setting the padding then, but I really don't want to do that, and don't think I should have to. EDIT: solved First, I should have been adding classes, rather than adding CSS with my javascript. Then I assumed that putting !important outside of a media query would make it only show up on desktop, but it took over all media queries. So placing just this in a query made it work. Note that if I was using 2 separate menus (mobile/desktop), I wouldn't need this, but since it was fixed and the #content needed padding, it had to be done. But using this technique you can also use only a single menu, but doing the height for the …
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25925081
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40582673
tagged with: javascript
has title: CSS specificity beat inline with !important
has comment: http://stackoverflow.com/comment/40582566
accepted answer: http://stackoverflow.com/a/25924713
has comment: http://stackoverflow.com/comment/40582646
answer count: 2
possible better answer: http://stackoverflow.com/a/25925081
downvote count: 0
has comment: http://stackoverflow.com/comment/73258207
has answer: http://stackoverflow.com/a/25924713
favorite count: 0
tagged with: css-specificity
has comment: http://stackoverflow.com/comment/40582611
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/25958618
has body: Added two layout in layout folder layouts/application.html.erb layouts/location.html.erb location.html for Location controller My stylesheets stylesheets/application.css stylesheets/locations.css application.css application.css *= require tree *= require normalize *= require foundation.min *= require select2 */ location.css *= require tree *= require normalize *= require sortable_tree *= require nested_options *= require foundation.min */ layouts/application.html.erb &lt;%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt; layouts/location.html.erb &lt;%= stylesheet_link_tag 'location', media: 'all', 'data-turbolinks-track' =&gt; true %&gt; i've also added javascript_include_tag same added application.js and location.js got error message Asset filtered out and will not be served
tagged with: javascript
has answer: http://stackoverflow.com/a/25960527
has comment: http://stackoverflow.com/comment/40642524
type: Question
tagged with: ruby-on-rails-4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25960527
has comment: http://stackoverflow.com/comment/40642482
score: -1
favorite count: 0
tagged with: ruby
tagged with: ruby-on-rails
answer count: 1
has comment: http://stackoverflow.com/comment/40642562
has comment: http://stackoverflow.com/comment/40642343
has title: Rails 4, Adding custom layout, got error message
downvote count: 1
has comment: http://stackoverflow.com/comment/40642164
has comment: http://stackoverflow.com/comment/40642185
upvote count: 0

http://stackoverflow.com/comment/40553584
type: QuestionComment
has text: yes sir how do we do on live websites
score: 0
comment on: http://stackoverflow.com/q/25906084
type: Comment

http://stackoverflow.com/comment/40684782
type: AnswerComment
comment on: http://stackoverflow.com/a/25981582
has text: when i refresh page comments are showed with extra characters....jQuery110205576835575724747_1411410901236
score: 0
type: Comment

http://stackoverflow.com/q/25959227
accepted answer: http://stackoverflow.com/a/25959264
possible better answer: http://stackoverflow.com/a/38011824
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/38011824
has body: In my PHP script, I am trying to encode my multiply news array into JSON. My news array: $news[1]["header"] = "First header"; $news[1]["content"] = "First news content"; $news[2]["header"] = "Second header"; $news[2]["content"] = "Second news content"; I use this function to encode this array: json_encode($news); After that, I send this JSON data in my JS script. var result = JSON.parse(xmlHttp.responseText); // Here is my JSON object How can I get, for example first news header in my JavaScript code? Thanks for any help. It is really hard for me to unserstand json syntax.
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: JSON and PHP encode multiply array
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25959264
tagged with: parsing
tagged with: encode
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40644790
has text: Now that I took more care about the code you were using, I see how the code you took provides support for callbacks. The solution you've got here supports just the "root" folderName. So, the solution can be extended to support subfolders...
comment on: http://stackoverflow.com/a/25958982
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25932825
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25932753
has body: Use HTML DOM document.getElementById(id).style.property=new style Example: &lt;script&gt; document.getElementById("p2").style.color = "blue"; &lt;/script&gt;
downvote count: 0

http://stackoverflow.com/comment/40493475
type: QuestionComment
has text: well what effort have you made on that front?
comment on: http://stackoverflow.com/q/25875809
score: 0
type: Comment

http://stackoverflow.com/q/25982675
has title: How to load new page with transition?
has comment: http://stackoverflow.com/comment/40686875
type: Question
has comment: http://stackoverflow.com/comment/40688073
has comment: http://stackoverflow.com/comment/40686710
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40686779
has body: I would like to load external webpages withe preloaders when links are clicked, something like after clicking MetroUI in the site: http://www.melonhtml5.com/ But with a complete different page / external link. So far I was trying to do it with jquery by using: $(function() { $("#changepage").click(function() { $("#preloader").show(); $('body').load('./anotherPage.html'); return false; }); }); But it only loads content without css styling. New page is a html game, so also need new js imports, etc. Including them in different divs on same file is not an option. How can I achieve this? Regards
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40688148

http://stackoverflow.com/comment/40658123
score: 1
type: QuestionComment
has text: Consider using [*substr*](http://ecma-international.org/ecma-262/5.1/#sec-15.5.4.15) instead of *slice* as it's compatible with older browsers and takes the same arguments.
comment on: http://stackoverflow.com/q/25967129
type: Comment

http://stackoverflow.com/q/26030882
score: 0
has body: how would I display the output of the sum of three textboxes? This is my current javascript code function sum() { var result = parseInt(text1) + parseInt(text2) + parseInt(text3); if(!isNaN(result)) { document.getElementByID(sum).value = result; } I have named the three textboxes in HTML as "text1" "text2" and "text3" accordingly Also, I want to output this in HTML next to 'The sum of the numbers are:' how could i do this?
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26031108
has comment: http://stackoverflow.com/comment/40774282
has comment: http://stackoverflow.com/comment/40774138
has title: Displaying output of the sum of three textboxes - Javascript
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40600583
has text: I really wanted to use javascript, but this is an excellent alternative thank you!
type: AnswerComment
comment on: http://stackoverflow.com/a/25934925
score: 0
type: Comment

http://stackoverflow.com/a/79531977
answers question: http://stackoverflow.com/q/26018756
has body: Soluction: https://github.com/twbs/bootstrap/issues/33636#issuecomment-2088899114 .table-responsive { overflow: auto; .dropdown { @extend .position-static; } }
type: Answer
score: 0

http://stackoverflow.com/comment/40528223
has text: Yes, but I was talking about the value called "cars", make sure that it is always a list, even when there is only one car (Or no cars for that matter).
type: Comment
comment on: http://stackoverflow.com/a/25894373
score: 0
type: AnswerComment

http://stackoverflow.com/q/25920196
tagged with: loops
type: Question
has comment: http://stackoverflow.com/comment/40574891
linked to: http://stackoverflow.com/q/6425062
tagged with: for-loop
has comment: http://stackoverflow.com/comment/40574718
tagged with: javascript
has comment: http://stackoverflow.com/comment/40575605
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: intervals
has comment: http://stackoverflow.com/comment/40575060
answer count: 0
type: UnansweredQuestion
has title: javascript - execute a for loop with time intervals
has body: I have this "for" loop that calls a function for ids named b1,b2,b3 for (var i = 1; i &lt;= 3; i++) { editorfunction("b" + i); } But the effect of this code need to be run with intervals of time. That means after editorfunction affects b1, there should be 1 second time space and then the action should be applied for b2, like that. I tried this for (var i = 1; i &lt;= 3; i++) { //editorfunction("b" + i); setInterval(function () {editorfunction("b" + i);}, 1000; } } But it does not work. How can I make it work?
linked to: http://stackoverflow.com/q/750486
duplicate of: http://stackoverflow.com/q/750486

http://stackoverflow.com/q/25949017
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40625289
score: 0
has answer: http://stackoverflow.com/a/25949375
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25949181
has comment: http://stackoverflow.com/comment/40625110
answer count: 2
has body: For example, I need to match 3 groups of characters each one space separated, on this text: This is also true for humans, who can (...) hear only a limited range [12^] of sounds as well. Dogs, dolphins and other creatures can hear different frequencies than we do, for example. There is some scientific evidence our brains are receiving a much wider range of frequencies than we are able to perceive. Michael Weliky from the University of Rochester conducted a study which led him to conclude that perhaps as much as 80% of the frequencies we receive are locked in our heads, unable to be perceived. and I found this syntax which gives me the result I want: [^ ].+?(?= ).+?(?= ).+?(?= ) but I wonder if it could be improved seems it looks quite redundant. My RegEx101
possible better answer: http://stackoverflow.com/a/25949181
accepted answer: http://stackoverflow.com/a/25949375
has title: Match fixed groups of characters space separated
tagged with: regex

http://stackoverflow.com/comment/40649371
has text: Got rid of the href, and used a button tag instead. That worked. <img src="<?php bloginfo('stylesheet_directory'); ?>/images/menu_icon2.png" width="33" height="33" />
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25962155

http://stackoverflow.com/q/26029846
answer count: 3
tagged with: ajax
has comment: http://stackoverflow.com/comment/40773063
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/26029956
has comment: http://stackoverflow.com/comment/40772722
has answer: http://stackoverflow.com/a/26030101
type: Question
has answer: http://stackoverflow.com/a/26030218
has title: Submitting form and writing to a file
has comment: http://stackoverflow.com/comment/40772992
tagged with: javascript
tagged with: jquery
has body: I'm trying to get a form to write to a text file using PHP. That works fine but the page reloads to a blank page. Now we already have a message that appears after the form is submitted using jQuery. The goal is to make it so the page doesn't reload and the jQuery message fades in. Now I'm not sure if AJAX is they way to do it but here is my JS and HTML: HTML: Number of Attendees Can you help us out as a sponsor? Submit JS $(document).ready(function() { $('form').bind('click', function(event){ event.preventDefault(); $.ajax({type: 'POST', url: '../form.php', data: }); }); });
has comment: http://stackoverflow.com/comment/40772562
score: 0

http://stackoverflow.com/comment/69373274
comment on: http://stackoverflow.com/a/32687741
score: 0
type: Comment
has text: Thanks @everett1992 , this solution works great. The vast majority of the time I run the dev build, then when I'm done I use the -p flag to spit out a minified production build. No need to create two separate Webpack configs!
type: AnswerComment

http://stackoverflow.com/q/25993436
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40705661
has title: jquery. how to equal .text() .val()
has answer: http://stackoverflow.com/a/25994029
type: Question
has answer: http://stackoverflow.com/a/25993505
answer count: 2
has body: I need to equal two value, but it's not work.. var rowID = $("#@idSelectObjectGuid").val(); $($(".ls-grid-body tr").children(".@vcTable.PrimaryKey")).each(function () { alert($(this).text() + " == " + rowID); if ($(this).text() == rowID) { $(".ls-grid-body tr").removeClass("lst-state-selected"); $(this).addClass("lst-state-selected"); } }); alert result: df5ebd84-14a1-4e57-9f38-32d4e84e1503 - 41 == df5ebd84-14a1-4e57-9f38-32d4e84e1503 - 36 Why first lenght is 41 and why they not equal... How to do it?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25994029
tagged with: jquery
has comment: http://stackoverflow.com/comment/40705434
accepted answer: http://stackoverflow.com/a/25993505
tagged with: text

http://stackoverflow.com/a/25972941
has body: Just change post increment to preincrement: modal_cookie = modal_cookie++; to modal_cookie = ++modal_cookie; Also cookie returns a string value, to be safe use parseInt to compare int value. and avoid reading cookie multiple times, save it in a varible. Short: demoPopupInit: function() { if (!$.cookie('modal-popup')) { $.cookie('modal-popup',1) ; } var curval = parseInt($.cookie('modal-popup')); if ( curval &lt;= 3 ) { // return; $("#intro_index").modal({backdrop:true}); $.cookie('modal-popup', ++curval); } },
has comment: http://stackoverflow.com/comment/40689651
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25972657
type: Answer
has comment: http://stackoverflow.com/comment/40679005
answers question: http://stackoverflow.com/q/25972657
has comment: http://stackoverflow.com/comment/40677664
downvote count: 0
score: 1

http://stackoverflow.com/comment/40625878
type: Comment
has text: DOM manipulation iside controller is considered as bad practice and I tottally agree with that. Of course using javascript code in html is cosidered bad too. But many times it's very convenient and it's angular way.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25949414

ssao
type: Tag
tag name: ssao
tags question: http://stackoverflow.com/q/25900589

http://stackoverflow.com/a/25915248
has comment: http://stackoverflow.com/comment/40565005
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25915079
has body: Use textContent instead of innerText
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25915079
score: 1
downvote count: 1

http://stackoverflow.com/q/25909239
has comment: http://stackoverflow.com/comment/40554508
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25909322
accepted answer: http://stackoverflow.com/a/25909322
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25909408
answer count: 2
has body: I may be close but since apparently nobody asked something like this, perhaps I may ask with the wrong wording. I have a tabber with categorys which are dynamic and fancy box-galleys which also have dynamic attributes (shown here as divs with the attribute lala="xyz"). So how can I show on click on the tabber (here as first and last buttons) only the matching gallerys (in my code the first two or the last two divs should diapear)? NOTE: the attributes are not predictable. My html: This is my box. There are many like it, but this one is mine. 1 This is my box. There are many like it, but this one is mine. 2 This is my box. There are many like it, but this one is mine. 3 This is my box. There are many like it, but this one is mine. 4 Show all SHOW ONLY UI SHOW ONLY UIBUI And my jquery: jQuery(function ($) { $('.showall').click(function() { $('.box').show(); }); $('.mybutton').click(function () { var myattr = $(this).attr('lala'); $(".box[lala]").not([myattr = "lala"]).hide(); }); }); Thanks in advance!
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
tagged with: css
has answer: http://stackoverflow.com/a/25909408
has title: How to show only divs which dynamic attribute match
type: AnsweredQuestion

http://stackoverflow.com/a/53539277
downvote count: 0
score: 4
type: Answer
has body: Here comes a ES6 solution We can do the Destructuring Assignment and swap like a boss. var a = "Hello", b = "World!"; console.log(a, b); // Hello World! [a, b] = [b, a]; // console.log(a, b); // World! Hello
answers question: http://stackoverflow.com/q/26026868
accepted answer of: http://stackoverflow.com/q/26026868
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/q/25978723
has title: Best way to identify the caller of a JavaScript function
linked to: http://stackoverflow.com/q/280389
tagged with: extjs
type: Question
has body: I have a JavaScript function that needs to behave differently if is called from another function. I have no control of the invocation of my function, so I can't do that based on parameter passing. So, I was planning on identifying which function is doing the call, and behaving differently if that call comes from this specific function. To do that, I found these approaches: Get the reference through arguments.caller, but I found it is a soon-to-be deprecated attribute. Get the reference through Function.caller, but it is not a standard. So every approach I found seems to have a pitfall. Which is the recommended approach for that? By the way, I'm using ExtJS Framework, maybe there's an specific way for doing that there.
has answer: http://stackoverflow.com/a/25985466
score: 0
has comment: http://stackoverflow.com/comment/40679244
answer count: 1
has comment: http://stackoverflow.com/comment/40679104
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/25886097
has title: Why this promise does not work?
score: 0
has comment: http://stackoverflow.com/comment/40520205
answer count: 1
tagged with: promise
has comment: http://stackoverflow.com/comment/40517397
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40512201
has comment: http://stackoverflow.com/comment/40516873
has answer: http://stackoverflow.com/a/25886146
has comment: http://stackoverflow.com/comment/40519846
has body: I'm playing with Promise. This is my code : APC.UTIL.AutoDOM = { step: -1, PROMISES : [], add: function (fun) { this.PROMISES.push (fun); }, run: function () { this.step = 0; this.nn = this.PROMISES.length-1; this.PROMISES.push ( function() {this.end();}); Promise.all( this.PROMISES).then ( function ( ) { APC.UTIL.AutoDOM.step++; console.log("OK"+APC.UTIL.AutoDOM.step);} ).catch( function(err) { console.log(err);} ); }, end: function () { this.PROMISES.clear(); } } And used so : APC.UTIL.AutoDOM.add ( function () {console.log("hello1");} ); APC.UTIL.AutoDOM.add ( function () {console.log("hello2");} ); APC.UTIL.AutoDOM.add ( function () {console.log("hello3");} ); APC.UTIL.AutoDOM.run(); Only works one time.... OK1 Anybody can fix my code ? TH
has comment: http://stackoverflow.com/comment/40528007
has comment: http://stackoverflow.com/comment/40516768
type: Question
has comment: http://stackoverflow.com/comment/40519720
has comment: http://stackoverflow.com/comment/40518280
tagged with: javascript

http://stackoverflow.com/a/25971219
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25970368
has body: A more readable approach (at least for me): &lt;script&gt; $("#zoom_01").elevateZoom({ gallery:'gallery_01', zoomEnabled: ( $(window).width() &gt;= 600 ), cursor: 'pointer', galleryActiveClass: 'active' }); &lt;/script&gt; but to be fair: read a javascript tutorial or 2 and you could've figured this out yourself.

http://stackoverflow.com/q/25889616
type: AnsweredQuestion
tagged with: wordpress
possible better answer: http://stackoverflow.com/a/25889747
has body: What I want to accomplish is basically create 'a kind' of infinite scroll on my single.php (wordpress) file. I don't want to use the infinite scroll plugin because if applied to single.php it either won't work either it'll create glitches regarding URL. Instead, I wanna use jquery to detect if user has reached the bottom of the page and then somehow initialize an action to "click" on the 'next article' link. I'm still at the beginning when it comes to coding so currently I have managed to only create the bottom check code and I got stuck. Any suggestion on how to finish this? $(document).ready(function() { $(window).scroll(function() { if($(window).scrollTop() + $(window).height() == $(document).height()) { alert("bottom!"); } }); });
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25889708
accepted answer: http://stackoverflow.com/a/25889708
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40518067
has title: Initialize jquery action at bottom of page
has answer: http://stackoverflow.com/a/25889747

http://stackoverflow.com/a/25999242
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25998521
type: AcceptedAnswer
upvote count: 1
has body: for binding event you need to select elements. You can use the selector - li.submenu or just .submenu, and search for these two strings in all the JavaScript files. There should be some place where these selectors are used with jQuery's on or bind or other event binding methods like addEventListener
type: Answer
answers question: http://stackoverflow.com/q/25998521

http://stackoverflow.com/q/26024793
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40764023
has comment: http://stackoverflow.com/comment/40764230
has body: Im new to JS and trying to learn. The spec requires the following: Write a function that takes another function* as an argument and creates a version of the function that can only be called one time. Repeated calls to the modified function will have no effect, returning the value from the original call. How could you do this without using a closure? Is it even possible? How could you do this with a closure? *Note: This original input function should not have any parameters. This is what I have: var divide = function () { var x = 2; var y = 6; return y/x; } var mainFunc = function (func) { return func(){ return y/x + 1; } } var output = mainFunc(divide); console.log(divide()); console.log(output()); console.log(output()); I'm getting an "Unexpected token{" error at "return func(){" I don't quite understand what i'm doing wrong? Per the spec, I am passing divide() to mainFunc() and setting it to a reference variable output. I then call the divide() and output() multiple times to test if the closure works and that modified function only happens once. What am I missing or not understanding? Thanks for the help.
has comment: http://stackoverflow.com/comment/40763902
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26025565
has title: Runtime error when executing simple closure in Javascript
tagged with: closures
has comment: http://stackoverflow.com/comment/40763647
answer count: 1
tagged with: higher-order-functions

http://stackoverflow.com/comment/40686993
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25982956
has text: This is not an answer IMO. first sample is also modular in its own way
score: 0

http://stackoverflow.com/comment/40543188
score: 0
has text: Thanks, do you know if socket method is faster than file io? Would save me some time to set both up and compare.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25902778

http://stackoverflow.com/comment/40516290
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25888398
score: 0
has text: Ajax? I need the page HTML rendered by the user's browser; I don't need to send it elsewhere, for now.

http://stackoverflow.com/q/25975964
has answer: http://stackoverflow.com/a/25976459
has answer: http://stackoverflow.com/a/25976234
has body: I'm using ngRoute to filter through a list of stories into one specific story when clicked, as below: myApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/stories', { templateUrl: '/partials/stories.html', controller: 'StoryListCtrl' }). when('/stories/:storyID', { templateUrl: '/partials/story.html', controller: 'StoryDetailCtrl' }); }]); This works fine, but how can I get the "next" and "previous" stories. The user needs to be able to swipe left and right between the stories, but I can't simply load them all - I need to load each story and one either side of it. Then, when the user swipes either way, one story is removed and a new one is added. Is this possible with Angular? I've searched like crazy but can't find any reference to this online anyway. Thanks for your time!
has title: Get "next" and "previous" items in AngularJS?
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25976459
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25977888
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25976234

http://stackoverflow.com/a/25919304
accepted answer of: http://stackoverflow.com/q/25919103
answers question: http://stackoverflow.com/q/25919103
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Just add another line in your existing code that will split each of the parts by |, so that you get an array of the ABC:(n) parts: var arr = oObj.split(","); arr = $.map(arr, function(item) { return item.split("|"); }); // or, in native JS: arr = Array.prototype.concat.apply([], arr.map(function(item) { return item.split("|"); })); No regex required at all!
downvote count: 0
score: 1

http://stackoverflow.com/comment/40676233
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25976750
type: Comment
has text: Here with case sensitive... "black" is also "BLACK" - verified by button click action --- http://jsfiddle.net/1819tb2m/2/

http://stackoverflow.com/comment/40781380
score: 0
has text: You might consider putting in the implied closing brackets into your formatting. Even if it is just something like "... }". Helps with copy/pasting the code so we can give it a run. Anyway, definitely +1 upvote worthy.
comment on: http://stackoverflow.com/q/25938473
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40729558
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26006300
has text: So what is the *actual* cookie expiration time after you run this code?

http://stackoverflow.com/comment/40725856
comment on: http://stackoverflow.com/q/25959906
has text: I don't know any options, I need to know which options are available. Is you who have to tell me how to do! ;)
score: 0
type: Comment
type: QuestionComment

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/25996357
tags question: http://stackoverflow.com/q/25877622
type: Tag
tags question: http://stackoverflow.com/q/25968682
tags question: http://stackoverflow.com/q/25958001

http://stackoverflow.com/comment/40534003
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25898009
has text: Thanks this did what I needed!! I'm not sure who downnvoted this? Thanks for your help

http://stackoverflow.com/q/25988431
score: 0
accepted answer: http://stackoverflow.com/a/25991030
has comment: http://stackoverflow.com/comment/40720282
has answer: http://stackoverflow.com/a/25988730
has comment: http://stackoverflow.com/comment/40696977
possible better answer: http://stackoverflow.com/a/25988730
has body: I'm trying to return a list of movie showtimes playing in a given radius. I have a JavaScript class that I'm building to display the data from an API. I actually followed the example given from here. I know this is a scoping issue of some kind, because if I move my callback function (dataHandler) outside of the class then it works fine. Here is my class (dumbed down) – If I run this code as it is here I'm getting a reference error, "dataHander is undefined". Thanks in advance! Hope there's enough info here to help.. function Locator() { // Init function init(){ test(); }; function test() { // construct the url with parameter values var apikey = "myapikey"; var baseUrl = "http://data.tmsapi.com/v1"; var showtimesUrl = baseUrl + '/movies/showings'; var zipCode = "78701"; var d = new Date(); var today = d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate(); // send off the query $.ajax({ url: showtimesUrl, data: { startDate: today, zip: zipCode, api_key: apikey, jsonp: "dataHandler" }, dataType: "jsonp", }); // callback to handle the results function dataHandler(data) { console.log(data); } }; init(); // Return return { }; };
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25991030
tagged with: gracenote
type: Question
answer count: 2
has title: $.ajax callback inside class undefined – scope issue
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40708842
comment on: http://stackoverflow.com/q/25995137
has text: @originof, yes i can use jQuery or JavaScript. But, I want to know how it is done using Angular. By using $scope,$watch or $broadcast?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40709944
comment on: http://stackoverflow.com/a/25995538
score: 1
type: AnswerComment
type: Comment
has text: @andrex we're not sitting next to you so we don't know :) In the jsfiddle you posted, in the `alert()` call, the right-hand string was different from the left-hand string. Why? I don't know. Yes, the strings **look** the same, but if you cut-and-paste carefully you'll see that the right string is 2 characters long. The second character is Unicode 775, "combining dot above".

http://stackoverflow.com/comment/40707091
score: 0
has text: I have tried a few things in this direction. The syntax as you write it does not work as such. Using "self: this," makes it syntactically correct but then I'm not able to follow up with the self.myFunction as this has to be done in some other way. You might be pointing in the right direction here, I'll see if I can figure out how the self.myFunction would go and where that leads me.
type: Comment
comment on: http://stackoverflow.com/a/25994290
type: AnswerComment

http://stackoverflow.com/comment/40552292
score: 0
has text: Ok, I just created a small example here: http://jsfiddle.net/ge44j2wc/8/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25902444

http://stackoverflow.com/a/67378284
type: Answer
answers question: http://stackoverflow.com/q/25955732
downvote count: 0
score: 1
has body: If you want some programatically, if you are looking for some span simply appearing in the screen: var esp=document.createElement("span"); document.getElementById("mydiv").appendChild(esp); esp.innerHTML="This is my span";
upvote count: 1

http://stackoverflow.com/q/26023417
has answer: http://stackoverflow.com/a/27449747
tagged with: typeerror
has body: I have this script for a Slick Carousel within some Ajax Tabs and I keep getting the Uncaught TypeError: undefined is not a function error, not quote sure what it's referring to? $(document).ready(function(){ $('.single-item').slick({ dots: true, infinite: true, speed: 300, slidesToShow: 1, slidesToScroll: 1, autoplay: false, autoplaySpeed: 7000 }); });
answer count: 1
tagged with: carousel
type: UnansweredQuestion
has title: Slick Carousal Uncaught TypeError: undefined is not a function?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40760450
type: Question
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/25944630
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25945192
has title: skipping columns in table javascript
score: 0
has answer: http://stackoverflow.com/a/25945192
has body: Good day, I was trying to skip some columns on my table for it not to be stored into my variable but I cant make it to work. I just want to add a "skip" class on every "th" element that I want to skip, then that column shouldn't be included on the loop. but I am stuck on iterating my array that my condition will be false on the next loop causing for it to be stored in my variable on the next loop. heres the js var i = []; var value = []; $('.report-table tr').each(function(){ $('th', this).each(function(index){ if($(this).hasClass('skip')) { console.log(index); i.push(index); } else { value.push($(this).text()); } }); $('td', this).each(function(index){ if(i.length!=0){ //this is where i am stuck right now for(var t = i.length-1; t>=0;t--){ if(i[t]==index) { console.log("skip :"+index); } else{ value.push($(this).text()); } } } else{ value.push($(this).text()); } }); }); and the html Period Ending Jan 31, 2010 Feb 31, 2011 Mar 31, 2012 Apr 31, 2010 May 31, 2011 Jun 31, 2012 Jul 31, 2010 Aug 31, 2011 Sep 31, 2012 Asset 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 Current Assets 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 Bank Accounts 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25944740
accepted answer: http://stackoverflow.com/a/25944740
type: Question

http://stackoverflow.com/comment/40763965
type: Comment
type: QuestionComment
has text: Or `$('#myElement').click();`
score: 1
comment on: http://stackoverflow.com/q/26025193

http://stackoverflow.com/comment/40621065
score: 0
type: QuestionComment
has text: @TheRealPapa can you show how you output the JSON to the page after you've retrieved it from the database?
type: Comment
comment on: http://stackoverflow.com/q/25946389

http://stackoverflow.com/a/25994433
answers question: http://stackoverflow.com/q/25994036
type: Answer
has body: Firstly, Make sure you are also including the relevant jquery UI... Secondly, look at this fiddle, it shows you the solution. $(document).ready(function () { // next add the onclick handler $("#quote_dialog").click(function() { $("#dialog").dialog(); return false; }); }); http://jsfiddle.net/k0nzhtLw/ Hope it helps :)
accepted answer of: http://stackoverflow.com/q/25994036
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40501689
type: Comment
has text: Similar fiddle over at http://jsfiddle.net/3z3765yn/ Only real difference is checking and setting of null for workerCheck variable rather than relying on uninitialized values.
comment on: http://stackoverflow.com/a/25879943
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40507052
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25883174
has text: What template are you using?

http://stackoverflow.com/q/26019279
accepted answer: http://stackoverflow.com/a/26019782
answer count: 1
has body: I am building an app using Firebase, Firebase's Authentication Service (simple email/password login), and storing user information in a manner pretty similar to what is described here. Part of my functionality will need to allow looking up another user based on an email address. Is there a straightforward way to use an email to lookup the Firebase defined uid (i.e. 'simpleLogin:9') without having to iterate over all users, or being able to actually log them in?
favorite count: 0
linked to: http://stackoverflow.com/q/11587775
upvote count: 2
tagged with: firebase
score: 2
type: AnsweredQuestion
tagged with: firebasesimplelogin
has answer: http://stackoverflow.com/a/26019782
type: Question
linked to: http://stackoverflow.com/q/25272919
downvote count: 0
tagged with: javascript
has title: Firebase Authentication Service - lookup uid from email without login

http://stackoverflow.com/q/25961429
downvote count: 0
has body: I am writing several similar versions of a certain recursive function, for comparison purposes. My functions look like this: function rec1(n) { /* some code */ rec1(n-1); } Then, to create another version, I copy &amp; paste and get: function rec2(n) { /* some other code */ rec2(n-1); } etc. Instead of having to change the name of the function in each version, I wonder if there is some way to refer to the "current function" (just as in a Unix script it is possible to refer the the "current script" with the $0 variable), so that I can write: function rec1(n) { /* some code */ $this_function$(n-1); }
has comment: http://stackoverflow.com/comment/40647270
type: AnsweredQuestion
tagged with: recursion
score: 3
type: Question
answer count: 1
linked to: http://stackoverflow.com/q/103598
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25961479
upvote count: 3
has title: Is there a way to refer to the current function?
has answer: http://stackoverflow.com/a/25961479
tagged with: node.js
favorite count: 0

http://stackoverflow.com/a/25970915
answers question: http://stackoverflow.com/q/25970782
has body: Your project should look like this: MyApp -&gt; www -&gt; index.html -&gt; platforms -&gt; Android -&gt; www -&gt; other folders -&gt; ios -&gt; wwww and other folders -&gt; other stuff... Once you did your changes in MyApp->www->index.html you should run cordova build android; cordova run --device android;
upvote count: 1
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/40611015
comment on: http://stackoverflow.com/q/25940358
score: 0
type: Comment
type: QuestionComment
has text: Thanks Felix, Got That - notice my question on top.

http://stackoverflow.com/comment/40610526
type: Comment
score: 0
has text: you can upload to both an existing album or a newly created. All you need to post photos is an album ID.
comment on: http://stackoverflow.com/a/25927179
type: AnswerComment

http://stackoverflow.com/q/25951151
has comment: http://stackoverflow.com/comment/40641583
has comment: http://stackoverflow.com/comment/40629045
has comment: http://stackoverflow.com/comment/40628409
score: 0
tagged with: ember.js
tagged with: client-side
answer count: 0
type: UnansweredQuestion
type: Question
has title: Is it safe to define application model in Ember.js and javascript generally speaking?
has body: I'm used to ASP.NET MVC, Razor, server-side programming and I'm currently building a Presentation Layer using Ember.js. All the underlying layers are "safe" on a ASP.NET server and I'm exposing a REST API using Web API. However I'm seriously wondering if using a javascript client-side framework is a good idea as far as Intellectual Property is concerned. What bothers me the most is that I am required to write my data model in Ember.js to use Ember-Data conveniently. Isn't it giving my app for free to people ? Even if my business code is on the server, if people have access to my model isn't it already too much ? One idea I had was to reduce the properties I replicate on the client-side to the minimum necessary, but I don't know if it will have drawbacks on the long run. So basically here are my two questions : What is the best way to minimize the risk induced by the fact of putting the model on the client-side, and do you agree that it's really a risk ? Why do you use these frameworks knowing this fact ? Having developed several front-end using ASP.NET MVC, I can tell that using Web API + Ember.js is a much more straightforward, convenient and productive way of doing things. I find that I develop the user interface much more quickly. However, I wonderer if it is an intelligent and acceptable solution if we consider Intellectual Property. PS: When I say risk, I'm mostly thinking of people who would like 'steal' the app. I feel that if they know the model, they can "easily" guess the architecture and have an idea of how I'm doing stuff. Security matters are okay.
tagged with: javascript

http://stackoverflow.com/comment/42409874
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25976755
has text: I'm in the same situation, but this does not seem to work for me. My `pollServer()` fires a `$resource(...).get()` request that is not fulfilled until the server wants to send a notification. (I.e. _never_ in the test.)
type: AnswerComment

http://stackoverflow.com/a/26017085
type: Answer
answers question: http://stackoverflow.com/q/26015924
score: 1
upvote count: 1
has body: Since you already seem to know about AJAX (you added the tag), I think you have your answer there. You can just use AJAX to get any chunk of data from the server and add it to the page. Since you are working together with a server-side programmer, I think each of you could build their own part independantly. All you need is an API that you can use, to which you can specify the offset of items to load, so you could call /getitems?offset=12&amp;count=4 to get the next 4 items from item 12. You can then just make a simple page that returns dummy data. getitems.php can just return the same constant items every time, and all you need to do is add those items at the bottom of your list. At the same time, the PHP programmer can actually implement that page so it returns the same data. He can make it in such a way that it also works for non-AJAX request, so he can easily test it without needing your front-end code.
downvote count: 0

http://stackoverflow.com/a/26026507
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26026404
has body: if (document.Entry.number.value==””) { msg+=”You must enter the number \n”; document.Entry.number.focus(); document.getElementById(‘number’).style.color=”red”; result = false; } change this to if (document.Entry.number.length != 4){ msg+="Number must be exactly 4 characters \n"; document.Entry.number.focus(); document.getElementById('number').style.color="red"; result = false; }

http://stackoverflow.com/comment/40698376
comment on: http://stackoverflow.com/a/25925139
type: AnswerComment
type: Comment
score: 0
has text: Do you mean not assigning it to a variable? Yes, obviously. And... the module name is 'pickadate', NOT 'pickdate'.

http://stackoverflow.com/comment/40655546
type: QuestionComment
type: Comment
has text: Both of these comments are true. In the end, the interpreter is just trying to help by pointing out what's broken. But your code is equally broken either way.
score: 0
comment on: http://stackoverflow.com/q/25965724

http://stackoverflow.com/a/25891704
type: Answer
has body: I think using the Java scriptlet inside javascript is not good practice, instead you can use the $(InformeAmenazasAGR) to set the request attribute value to a hidden element and put the hidden element anywhere inside your html &lt;body&gt; like this, &lt;input type="hidden" id="jsonData" value="${InformeAmenazasAGR}"&gt; then, get the hidden element value like, var DatosAmenazas = new String($('#jsonData').val()); if you need the request attribute InformeAmenazasAGR to be converted into json data then instead of above you can change your above line as, var DatosAmenazas = JSON.parse($('#jsonData').val()); FYI: Java scriptlets run on server side while javascript on client side
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25891618
has comment: http://stackoverflow.com/comment/40522527
accepted answer of: http://stackoverflow.com/q/25891618
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40544419

http://stackoverflow.com/a/26753419
type: Answer
accepted answer of: http://stackoverflow.com/q/25969949
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
has body: The answer provided by apendua worked. It's a total hack, and not recommended for most cases, but great for long-term memory leaks. Put this inside your startup script: var restartFrequency = 1000 * 60 * 24; // 1 day (1000 millsec * 60 min * 24 hour) setTimeout(function(){ process.exit(); }, restartFrequency);
answers question: http://stackoverflow.com/q/25969949
has comment: http://stackoverflow.com/comment/53614527

http://stackoverflow.com/comment/40730245
comment on: http://stackoverflow.com/q/26006347
score: 0
type: Comment
type: QuestionComment
has text: The console is the web console. This is a webpage. The ads array right now just contains two ads and cycles through them.

http://stackoverflow.com/a/25884071
type: Answer
has body: Use main_div.append(download_button); Instead of main_div.appendTo(download_button); Update - DEMO
answers question: http://stackoverflow.com/q/25884013
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/25889245
tagged with: mobile
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: devextreme
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25898910
has title: How to return to homepage using a dxAction dxButton?
has body: there seems to be such little documentation on the DevExtreme website about how to go about linking/returning to the 'Main Page' after the user has 'finished' the app (i.e. got to last page and wants to return home - and yes, i nkow in most phones there is a 'home' button in the nav bar, but i am looking to remove this!). I have been creating a dxButton such as: &lt;div data-bind="dxButton: { text: 'Button1' }, dxAction: '#myNextPage/'"&gt;&lt;/div&gt; However, there doesn't seem to be a way of 'returning' to the home page through this type of link? I have already tried using dxAction: '#home/' - and yes, it does go to the home page - but it leave a 'Back' button at the top of the page (which obviously isn't there when you first start up the app). I have tried other alternatives, such as dxAction: '#/' etc, but none seem to have worked. has anyone found a way of doing this (seemingly) simple task?
type: Question
upvote count: 2

http://stackoverflow.com/q/25916043
tagged with: yammer
has comment: http://stackoverflow.com/comment/40566821
type: UnansweredQuestion
has title: Can't post yammer message
has body: I am trying to post a message from an html page. I am already logged in in another IE window. So the login is successful. I am getting a failure when I post. Can someone take a quick look at this JS and see what might be the issue? Also, All that comes back from msg is that it is an object. How can I find out the properties of this object so I can help debug this myself. function post() { yam.getLoginStatus(function (response) { if (response.authResponse) { alert(1); yam.request({ url: "https://www.yammer.com/api/v1/messages.json", method: "POST", data: { "body": "HelloTest" }, success: function (msg) { alert("Post was Successful!: " + msg); }, error: function (msg) { alert("Post was Unsuccessful..." + msg); } Console.log(msg); }); } else { alert(2); yam.login(function (response) { if (!response.authResponse) { yam.request({ url: "https://www.yammer.com/api/v1/messages.json", method: "POST", data: { "body": "HelloTest" }, success: function (msg) { alert("Post was Successful!: " + msg); }, error: function (msg) { alert("Post was Unsuccessful..." + msg); } }); } }); } }); }
type: Question
has answer: http://stackoverflow.com/a/25916579
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/25974079
answer count: 1
tagged with: jquery
has body: I have HTML as: &lt;input id="SLOCriteriaOtherText" name="SLOCriteriaOtherText" style="width: 100%;" type="text" data-role="autocomplete" placeholder="Enter name for 'other' metric..." class="k-input" autocomplete="off" role="textbox" aria-haspopup="true" aria-disabled="false" aria-readonly="false" aria-owns="SLOCriteriaOtherText_listbox" aria-autocomplete="list"&gt; I just wanted to validate it for blank textbox checking. Above textbox has placeholder as: Enter name for 'other' metric... I have done validation as for blank textbox checking as: if ($("#SLOCriteriaOtherText").val() == "") { alertMessageText += "Please enter Other criteria text. \n"; } It works fine on Chrome. But does not work on Internet Explorer. When i alert the value of SLOCriteriaOtherText from internet explorer, It shows me value of placeholder. I.E. Enter name for 'other' metric... By this validation fails on Internet explorer and works on crome. Please help me. How can i take value of SLOCriteriaOtherText without placeholder on internet Explorer (Version 9)
has answer: http://stackoverflow.com/a/25974155
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40670177
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25974155
tagged with: internet-explorer
tagged with: javascript
has comment: http://stackoverflow.com/comment/40670216
score: 0
has title: IE-9 taking value of placeholder as a value

http://stackoverflow.com/a/25964925
answers question: http://stackoverflow.com/q/25964815
downvote count: 0
score: 1
upvote count: 1
has body: Actually found the solution ! I am very silly. Since it is a key-value pair I have to do the following: var keyval = {} keyval[country_name] = '#1caf9a' and then jQuery('#vmap').vectorMap('set', 'colors', keyval);
type: Answer

http://stackoverflow.com/comment/40713219
comment on: http://stackoverflow.com/q/25982567
score: 0
has text: I tried adding a class to a random div inside the modal the buttonGroup is in, and it also didn't work for that. I was wondering if something is wrong with jQuery, but the .val() function is working so that's not it.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/138520259
comment on: http://stackoverflow.com/a/26056010
score: 0
type: AnswerComment
has text: it was driving me insane when I dropped it to an element and it triggered a drop to the element next to it. Thanks for the answer.
type: Comment

http://stackoverflow.com/a/31228568
score: 166
has comment: http://stackoverflow.com/comment/110383882
answers question: http://stackoverflow.com/q/25956937
downvote count: 2
has comment: http://stackoverflow.com/comment/71978773
has comment: http://stackoverflow.com/comment/60292439
has comment: http://stackoverflow.com/comment/61794872
has comment: http://stackoverflow.com/comment/80818645
upvote count: 168
has body: You can use a single config file, and include the UglifyJS plugin conditionally using an environment variable: const webpack = require('webpack'); const TerserPlugin = require('terser-webpack-plugin'); const PROD = JSON.parse(process.env.PROD_ENV || '0'); module.exports = { entry: './entry.js', devtool: 'source-map', output: { path: './dist', filename: PROD ? 'bundle.min.js' : 'bundle.js' }, optimization: { minimize: PROD, minimizer: [ new TerserPlugin({ parallel: true }) ] }; and then just set this variable when you want to minify it: $ PROD_ENV=1 webpack Edit: As mentioned in the comments, NODE_ENV is generally used (by convention) to state whether a particular environment is a production or a development environment. To check it, you can also set const PROD = (process.env.NODE_ENV === 'production'), and continue normally.
has comment: http://stackoverflow.com/comment/91123902
type: Answer
has comment: http://stackoverflow.com/comment/79675477
has comment: http://stackoverflow.com/comment/137938827
has comment: http://stackoverflow.com/comment/58542172

http://stackoverflow.com/q/25880767
has body: I went over the Chart.js documentation and did not find anything on number formatting ie) 1,000.02 from number format "#,###.00" I also did some basic tests and it seems charts do not accept non-numeric text for its values Has anyone found a way to get values formatted to have thousands separator and a fixed number of decimal places? I would like to have the axis values and values in the chart formatted.
score: 43
has answer: http://stackoverflow.com/a/48996024
upvote count: 43
possible better answer: http://stackoverflow.com/a/51462444
downvote count: 0
has answer: http://stackoverflow.com/a/51462444
has title: Chart.js number format
has answer: http://stackoverflow.com/a/79475016
favorite count: 0
has comment: http://stackoverflow.com/comment/41024561
has answer: http://stackoverflow.com/a/69770189
has answer: http://stackoverflow.com/a/28860563
has answer: http://stackoverflow.com/a/43457756
type: AnsweredQuestion
tagged with: chart.js
linked to: http://stackoverflow.com/q/25722415
has answer: http://stackoverflow.com/a/26567557
tagged with: formatting
has comment: http://stackoverflow.com/comment/67650522
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/32815942
tagged with: charts
accepted answer: http://stackoverflow.com/a/26567557
tagged with: javascript
tagged with: number-formatting

http://stackoverflow.com/a/25886585
answers question: http://stackoverflow.com/q/25886480
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It's a security feature. Some browsers don't allow a non-manual click on file inputs. You can read more about it here and here. Why isn't it possible to programmatically trigger the file input selection? Most browsers prevent submitting files when the input field didn't receive a direct click (or keyboard) event as a security precaution. Some browsers (e.g. Google Chrome) simply prevent the click event, while e.g. Internet Explorer doesn't submit any files that have been selected by a programmatically triggered file input field. Firefox 4 (and later) is so far the only browser with full support for invoking "click"-Events on a completely hidden (display: none) file input field.
has comment: http://stackoverflow.com/comment/40513128
score: 18
upvote count: 18
accepted answer of: http://stackoverflow.com/q/25886480

http://stackoverflow.com/q/25887709
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40544290
downvote count: 0
answer count: 1
has body: I have a trouble with dialog jquery, this is my code : $(function () { showModalUserNickName(); }); function showModalUserNickName() { $("#dialog").dialog({ modal: true, buttons: { Ok: function () { $(this).dialog("close"); alert("it's OK"); } } }); } what wrong with my code, I hope you can help my problem thank's before
favorite count: 0
has comment: http://stackoverflow.com/comment/40514782
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25889583
score: 1
has title: [ASP .NET]Jquery UI Modal Dialog not working
upvote count: 1

http://stackoverflow.com/comment/40742602
score: 0
type: AnswerComment
has text: The dialog is simply showing when you load the page as a regular DIV
type: Comment
comment on: http://stackoverflow.com/a/26013705

http://stackoverflow.com/comment/40516441
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25888690
has text: i had checked with some alert box
type: AnswerComment

http://stackoverflow.com/q/25890936
has comment: http://stackoverflow.com/comment/40525226
has body: Hi Please see my code below for my auto populate drop down menus. It works fine in this JSfiddle but for some reason I am not getting the options to select for the first drop down when I put the code on my site, Any ideas? here's the fiddle = http://jsfiddle.net/fvL0qgrx/3/ Script var products = [ { label: 'BP-1 Battery Pack for Xbox Controller (BP1XB3-11)', category: 'Charge', devices: ['Xbox 360'] }, { label: 'BP-2 PLAY & CHARGE BATTERY KIT (BP2XB1-11)', category: 'Charge', devices: ['Xbox One'] }, { label: 'BP-3 Battery Power Pack for Mobile Devices (BP3MOB-11)', category: 'Charge', devices: ['Mobile'] }, { label: 'DC-1 DUAL CHARGING DOCK (DC1PS4-11)', category: 'Charge', devices: ['PS4'] }, { label: 'AC-1 Ammo Clip USB for PS3 (DFCPS3-22)', category: 'Charge', devices: ['PS3 '] }, { label: 'AC-1 Ammo Clip USB for PS3 (Street King) (DFCPS3-23)', category: 'Charge', devices: ['PS3'] }, { label: 'AC-1 Ammo Clip USB for Xbox 360 (DFCXB3-22)', category: 'Charge', devices: ['Xbox 360'] }, { label: 'AC-1 Ammo Clip USB for Xbox 360 (Street King) (DFCXB3-23)', category: 'Charge', devices: ['Xbox 360'] }, { label: 'EX1-RS Universal Mobile Headset BT3.0 (E1RMOB-11)', category: 'Headset', devices: ['Mobile'] }, { label: 'EX1-RT Universal Mobile Headset With Noise Cancellation (E1RMOB-21)', category: 'Headset', devices: ['Mobile'] }, { label: 'EX-03R WIRED INLINE MESSENGER HEADSET FOR PS4 (E3RPS4-11)', category: 'Headset', devices: ['PS4'] }, { label: 'EX-05S WIRED HIGH DEFINITION STEREO HEADSET FOR PS4 (E5SPS4-11)', category: 'Headset', devices: ['PS4'] }, { label: 'EX-05S Universal Wired Stereo Headset (E5SUNI-11)', category: 'Headset', devices: ['Multiformat'] }, { label: 'EX-05S Universal Wired Stereo Headset (Street King) (E5SUNI-12)', category: 'Headset', devices: ['Multiformat'] }, { label: 'EX-05S Wired Stereo Headset (PC, MAC, PS3, PS4,XB360) (E5SUNI-13)', category: 'Headset', devices: ['Multiformat'] }, { label: 'EX-05S Universal Wireless Stereo Headset (E5SUNI-21)…
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40520607
tagged with: forms
type: Question
has title: Script is working in jsfiddle but not in browser for autopopulate drop down form
score: 0
has comment: http://stackoverflow.com/comment/40523258
has comment: http://stackoverflow.com/comment/40525195
has comment: http://stackoverflow.com/comment/40520623
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40729341
comment on: http://stackoverflow.com/q/26000430
has text: http://jsfiddle.net/qzbrzm4x/1/ There you can see the behavior, also when selecting the cursor area, it stops at spaces, i've noticed, any thoughts on that too?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25997411
downvote count: 0
score: 6
answers question: http://stackoverflow.com/q/25997355
has comment: http://stackoverflow.com/comment/40712882
has comment: http://stackoverflow.com/comment/40713081
has body: is this enough? #parent, #parent &gt; div { /* your properties */ }
has comment: http://stackoverflow.com/comment/40712649
upvote count: 6
has comment: http://stackoverflow.com/comment/40712635
has comment: http://stackoverflow.com/comment/40712970
type: Answer

http://stackoverflow.com/q/25956969
has title: Get host from NodeJS request
upvote count: 2
has comment: http://stackoverflow.com/comment/40639034
answer count: 1
tagged with: http
accepted answer: http://stackoverflow.com/a/25957058
has comment: http://stackoverflow.com/comment/40639015
tagged with: javascript
type: AnsweredQuestion
score: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25957058
has comment: http://stackoverflow.com/comment/40639080
type: Question
has body: I have a basic http server that runs on a server where multiple domains point to. I need to find the host of the request (the domain where the request is coming from). require("http").createServer(function (req, res) { console.log(req.headers.host); res.end("Hello World!"); }).listen(9000); req.headers.host's value is 127.0.0.1:9000 instead of the domain name (example.com or so). How can I get the domain name from request object? The node server is proxied via nginx. The configuration is like this: server { listen 80; server_name ~.*; location / { proxy_pass http://127.0.0.1:9000; } }
tagged with: node.js

http://stackoverflow.com/a/25891649
has body: XPath is case-sensitive: Choose an Option id="ServiceTypeId_chzn" //div[@Id='ServiceTypeId_chzn'] Should be: //div[@id='ServiceTypeId_chzn']
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40557729
has comment: http://stackoverflow.com/comment/40560437
answers question: http://stackoverflow.com/q/25890026

http://stackoverflow.com/comment/40558263
type: Comment
has text: I don't think you can have a DIV inside a table unless it is nested inside a TD or TH - unless you are going to use CSS tables then you would need to append a TR element to the table rather than replacing the innerHTML.
type: AnswerComment
comment on: http://stackoverflow.com/a/25893491
score: 0

http://stackoverflow.com/comment/40668500
type: Comment
has text: I not sure why you use `return Json(new { Message = validateMsg });`? It can be just `return Json(validateMsg);` then the value of data will be `validateMsg`, but with your code I suspect you need to use `data.Message` to get the value of `validateMsg`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25972949

http://stackoverflow.com/comment/127959061
type: AnswerComment
type: Comment
score: 1
has text: In my case, I was using Bootstrap's `btn-group` in my ` ` which had the position as `relative`, changing it to `static` solved my problem. +1
comment on: http://stackoverflow.com/a/68374588

http://stackoverflow.com/q/25904039
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25905880
has title: Scrollup to textarea when keyboard is up
has comment: http://stackoverflow.com/comment/40547752
has comment: http://stackoverflow.com/comment/40544956
type: AnsweredQuestion
tagged with: firefox-os
tagged with: scroll
accepted answer: http://stackoverflow.com/a/25905880
has comment: http://stackoverflow.com/comment/40546631
has comment: http://stackoverflow.com/comment/40547616
type: Question
has comment: http://stackoverflow.com/comment/40547009
tagged with: javascript
has body: In my ToDo list app, I have a text area that is appended at the end of the list. The problem right now is that when I tap on the textarea, the keboard shows up but the textarea is behind the keyboard and the page doesnt scrollup unless I start typing. As you can imagine, this is not a good UX. How do I scrollup to the textarea as soon as the keyboard shows up? EDIT: This is an observation in the simulator version 2.0

http://stackoverflow.com/a/26015005
has comment: http://stackoverflow.com/comment/40755720
score: 3
has body: I was able to reproduce a working copy based on an off-the-shelf solution from the wiki along with your very own code. I've packaged the whole thing here. The files you might be interested are home_controller.rb, application.js and home/index.html.erb. It seems your understanding of channel-based websockets is correct. About the code, make sure to load the websocket javascript files and to enclose your code inside a document.ready. I had the exact same problem you're having without the latter. //= require websocket_rails/main $(function() { // your code here... }); Let me know if it works. Best Luck!
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25899521
accepted answer of: http://stackoverflow.com/q/25899521
type: Answer
has comment: http://stackoverflow.com/comment/40757607
upvote count: 3

google-maps
tags question: http://stackoverflow.com/q/25923840
tag name: google-maps
tags question: http://stackoverflow.com/q/25894518
tags question: http://stackoverflow.com/q/25964902
tags question: http://stackoverflow.com/q/26007193
tags question: http://stackoverflow.com/q/25922382
tags question: http://stackoverflow.com/q/26027805
tags question: http://stackoverflow.com/q/26011694
tags question: http://stackoverflow.com/q/25973569
tags question: http://stackoverflow.com/q/25926519
tags question: http://stackoverflow.com/q/25990252
tags question: http://stackoverflow.com/q/25952064
tags question: http://stackoverflow.com/q/25931259
tags question: http://stackoverflow.com/q/25972446
tags question: http://stackoverflow.com/q/25970730
tags question: http://stackoverflow.com/q/25911667
tags question: http://stackoverflow.com/q/25982103
tags question: http://stackoverflow.com/q/25961268
tags question: http://stackoverflow.com/q/25990288
tags question: http://stackoverflow.com/q/25908691
tags question: http://stackoverflow.com/q/25957424
tags question: http://stackoverflow.com/q/25980923
tags question: http://stackoverflow.com/q/25933840
tags question: http://stackoverflow.com/q/25923083
tags question: http://stackoverflow.com/q/25975569
tags question: http://stackoverflow.com/q/25990128
tags question: http://stackoverflow.com/q/25898540
tags question: http://stackoverflow.com/q/26013031
tags question: http://stackoverflow.com/q/26005887
tags question: http://stackoverflow.com/q/25981050
tags question: http://stackoverflow.com/q/25938548
tags question: http://stackoverflow.com/q/25983887
tags question: http://stackoverflow.com/q/26009355
tags question: http://stackoverflow.com/q/25991578
tags question: http://stackoverflow.com/q/25981381
tags question: http://stackoverflow.com/q/26005678
tags question: http://stackoverflow.com/q/25974008
tags question: http://stackoverflow.com/q/26030172
tags question: http://stackoverflow.com/q/25909438
tags question: http://stackoverflow.com/q/25990570
tags question: http://stackoverflow.com/q/25945079
tags question: http://stackoverflow.com/q/26022727
tags question: http://stackoverflow.com/q/26012224
tags question: http://stackoverflow.com/q/25993183
tags question: http://stackoverflow.com/q/26025896
tags question: http://stackoverflow.com/q/26012147
tags question: http://stackoverflow.com/q/25934816
tags question: http://stackoverflow.com/q/25943159
tags question: http://stackoverflow.com/q/25955350
type: Tag
tags question: http://stackoverflow.com/q/25900309
tags question: http://stackoverflow.com/q/25961510
tags question: http://stackoverflow.com/q/25999457
tags question: http://stackoverflow.com/q/26027627
tags question: http://stackoverflow.com/q/25930567
tags question: http://stackoverflow.com/q/25907574
tags question: http://stackoverflow.com/q/25878179
tags question: http://stackoverflow.com/q/25951631
tags question: http://stackoverflow.com/q/25975554
tags question: http://stackoverflow.com/q/25996029
tags question: http://stackoverflow.com/q/26014325
tags question: http://stackoverflow.com/q/26022362
tags question: http://stackoverflow.com/q/25915110
tags question: http://stackoverflow.com/q/25910053
tags question: http://stackoverflow.com/q/25976465
tags question: http://stackoverflow.com/q/25875923
tags question: http://stackoverflow.com/q/25956601
tags question: http://stackoverflow.com/q/25967191
tags question: http://stackoverflow.com/q/25873750
tags question: http://stackoverflow.com/q/26024374
tags question: http://stackoverflow.com/q/26027589

http://stackoverflow.com/comment/49073560
type: Comment
has text: Thanks Dehli. I could work it out. I had to replace centerPoint with my column name and get rid of that kilometer method which returned error. Otherwise it is working fine now.
score: 0
comment on: http://stackoverflow.com/a/25878657
type: AnswerComment

http://stackoverflow.com/q/25911863
favorite count: 0
has title: InDesign Script extract stories if paragraph style
accepted answer: http://stackoverflow.com/a/25915041
score: 1
upvote count: 1
type: Question
has body: Struggling with the below script. I modified a script found so that it extracts all stories as txt files and saves the txt file with the filename of the the text in the paragraph. It turned out we didn't want all stories extracted however the ones we did want had a set paragraph style for the first paragraph of story. The part im struggling with is the syntax of the if statement that checks what the currently applied paragraph style is. any help appreciated, sorry if my problem is unclear main(); function main(){ //Make certain that user interaction (display of dialogs, etc.) is turned on. app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; if(app.documents.length != 0){ if (app.activeDocument.stories.length != 0){ myDisplayDialog(); } else{ alert("The document does not contain any text. Please open a document containing text and try again."); } } else{ alert("No documents are open. Please open a document and try again."); } } function myDisplayDialog(){ with(myDialog = app.dialogs.add({name:"ExportAllStories"})){ //Add a dialog column. myDialogColumn = dialogColumns.add() with(myDialogColumn){ with(borderPanels.add()){ staticTexts.add({staticLabel:"Export as:"}); with(myExportFormatButtons = radiobuttonGroups.add()){ radiobuttonControls.add({staticLabel:"Text Only", checkedState:true}); radiobuttonControls.add({staticLabel:"RTF"}); radiobuttonControls.add({staticLabel:"InDesign Tagged Text"}); } } } myReturn = myDialog.show(); if (myReturn == true){ //Get the values from the dialog box. myExportFormat = myExportFormatButtons.selectedButton; myDialog.destroy; myFolder= Folder.selectDialog ("Choose a Folder"); if((myFolder != null)&amp;&amp;(app.activeDocument.stories.length !=0)){ myExportAllStories(myExportFormat, myFolder); } } else{ myDialog.destroy(); } } } //myExportStories function takes care of exporting the stories. //myExportFormat is a number from 0-2, where 0 = text only, 1 = rtf, and 3 = tagged text. //myFolder is a refere…
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/25915041
answer count: 1
downvote count: 0
tagged with: adobe-indesign

http://stackoverflow.com/comment/40749011
has text: You don't want a "namespace" (which means dotted access on an object in JavaScript), you just want a *scope* (which my solution offers you).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26016896
type: QuestionComment

http://stackoverflow.com/comment/40609775
has text: No, JQuery doesn't have such a function.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25939672

http://stackoverflow.com/a/25903174
downvote count: 0
has body: knockout template binding has support of afterRender callback (and many other callbacks). http://knockoutjs.com/documentation/template-binding.html You may want to wrap your view in a template in order to access afterRender callback. In fact, knockout foreach binding internally uses template binding to support those callbacks.
accepted answer of: http://stackoverflow.com/q/25884546
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25884546
has comment: http://stackoverflow.com/comment/40583582
type: AcceptedAnswer

http://stackoverflow.com/comment/40615676
type: QuestionComment
comment on: http://stackoverflow.com/q/25942671
has text: "evaluate /Date(1425715200000)/ this to output 3/7/15" Where did you find a 3 in your date ???
score: 0
type: Comment

http://stackoverflow.com/comment/40719553
comment on: http://stackoverflow.com/a/26000634
score: 0
type: AnswerComment
type: Comment
has text: can't vote up (don't have 15 reputations yet).But your both solutions worked. Just a question, these both solutions gives same output that replaces same line again and again, is it possible to have new results in new lines?

http://stackoverflow.com/a/25999984
score: 4
has comment: http://stackoverflow.com/comment/40717962
has body: 1 function($){})(jQuery) etc is an Immediately Invoked Function Expression (IIFE) and simply provides a locally scoped $ variable for jQuery to avoid clashes of $ with other plugins. Yes, it is just an anonymous function that is called immediately to provide scope for other declarations. An IIFE is basically calling an anonymous function like this one (it has no name): function(){} wrapped in parenthesis to make it referenceable: (function(){}) so you can do this to run it immediately: (function(){})(); You can of course pass parameters to it as well: (function(param1, param2){ // param1 = 1 // param2 = 2 })(1,2); So their example is doing this: (function($){ // $ is now the same as jQuery! })(jQuery); Yes. That function should only be available within the scope of the outer function. None I can think of. The naming can be anything so long as it does not clash. (I usually use ProperCase for the class-function and pascalCase for the .fn extension). $('.cloud-zoom, .cloud-zoom-gallery').CloudZoom() calls the following function with this being the jQuery object/collection returned from $('.cloud-zoom, .cloud-zoom-gallery'): $.fn.CloudZoom = function (options) { .... var $thisIsTheSelectorResult = this; // == $('.cloud-zoom, .cloud-zoom-gallery') };
has comment: http://stackoverflow.com/comment/40717697
answers question: http://stackoverflow.com/q/25999935
has comment: http://stackoverflow.com/comment/40718185
upvote count: 4
has comment: http://stackoverflow.com/comment/40717779
accepted answer of: http://stackoverflow.com/q/25999935
has comment: http://stackoverflow.com/comment/40717716
downvote count: 0
has comment: http://stackoverflow.com/comment/40718036
has comment: http://stackoverflow.com/comment/40718311
has comment: http://stackoverflow.com/comment/40717922
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40718198
has comment: http://stackoverflow.com/comment/40717713
has comment: http://stackoverflow.com/comment/40718492
has comment: http://stackoverflow.com/comment/40717860
has comment: http://stackoverflow.com/comment/40718289
has comment: http://stackoverflow.com/comment/40718130
type: Answer

http://stackoverflow.com/q/26008980
linked to: http://stackoverflow.com/q/14529358
favorite count: 0
has answer: http://stackoverflow.com/a/26012581
linked to: http://stackoverflow.com/q/13761222
has body: { name: 'EmployeeInformation', index: 'EmployeeInformation', width: 15, sortable: true, editable: false, formatter: 'showlink', formatoptions: { //show an modal popup } } This is a table column in my jqgrid. What I want is when i click the link button (EmployeeInformation) it will show a modal popup.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26012581
linked to: http://stackoverflow.com/q/16241155
has comment: http://stackoverflow.com/comment/40770089
upvote count: 1
downvote count: 1
type: Question
has title: showing a modal popup when a user clicks on a link jqgrid
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40734251
linked to: http://stackoverflow.com/q/9038063
score: 0
answer count: 1

http://stackoverflow.com/comment/40662445
comment on: http://stackoverflow.com/a/25969289
has text: and one more thing if you are dynamically adding class help-inline inside DOM then when you are adding class help-inline there only make its css display none otherwise there must be a event on which you want class help-inline to be hidden.????..@Richlewis
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25883750
has answer: http://stackoverflow.com/a/25886652
score: 0
has title: How to add a button ("X") - close window, close operation?
upvote count: 1
downvote count: 1
answer count: 1
tagged with: button
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has body: How to add a button ("X") - close window, close operation to this slider? This button has view look like ('X'). Please suggest me a way to improve this code. < >
tagged with: javascript

http://stackoverflow.com/comment/40618618
score: 1
has text: What? When do you think `$digest` will be triggered?
type: AnswerComment
comment on: http://stackoverflow.com/a/25944534
type: Comment

http://stackoverflow.com/comment/40496705
comment on: http://stackoverflow.com/a/25877339
score: 1
type: AnswerComment
type: Comment
has text: This looks like bad advice. If you define `verygoodCategories1` as a new array in the location you suggest, it will wipe out the contents each time it loops...

http://stackoverflow.com/a/25877733
upvote count: 2
has comment: http://stackoverflow.com/comment/40497415
type: Answer
has body: This code: var count = 0; $('.something input').each(function() if($(this).val().length = 0) { count++; } });
score: 2
answers question: http://stackoverflow.com/q/25877594
downvote count: 0
has comment: http://stackoverflow.com/comment/40497475

http://stackoverflow.com/a/25894249
type: Answer
upvote count: 1
downvote count: 0
has body: "new SomeFunction()" is creating a new object, and calling SomeFunction with that object as "this". Consider this: function SomeFunction() { this.hello = "Hello, world"; } var myObj = new SomeFunction(); myObj.hello; // "Hello, world" var myObj2 = {}; SomeFunction.call(myObj2); myObj2.hello; // "Hello, world"
answers question: http://stackoverflow.com/q/25894175
score: 1

http://stackoverflow.com/comment/40608780
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25938918
score: 0
has text: If you are going with different "groups", then something like `if((c_sav <= 4 && val_c > 4) || (c_sav > 4 && val_c <= 4))`

http://stackoverflow.com/q/25984072
has body: I have this HTML: Displaying maths $$y-y_0=m(x-x_0)$$ And I want to display the result in an Android TextView. I tried to use Html.fromHtml() but don't work. it's: http://mathscribe.com/author/jqmath.html
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40694524
tagged with: http://stackoverflow.com/tag/html
tagged with: textview
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: android
upvote count: 1
score: 1
has title: Android TextView with HTML and JavaScript
type: Question

http://stackoverflow.com/a/26032457
answers question: http://stackoverflow.com/q/26032229
type: Answer
upvote count: 1
score: 1
has body: you can pass it as query string parameter: var Cid = $(this).val(); $.ajax({ url: '@Url.Action("PopulateDropDown", "Pepmytrip")' + '?cID=' + Cid, ... server side: public JsonResult PopulateDropDown(Wrapper wrapper, string cID) { wrapper.Destinations = new SelectList(context.Destinations.Where(c=&gt;c.CountryId == cID), "id", "Name").ToList(); return Json(wrapper); } OR add a new property to your Wrapper object as Gavin Fang suggested: var Cid = $(this).val(); viewModel.Cid = Cid; var jdata = ko.mapping.toJSON(viewModel); server side code: public JsonResult PopulateDropDown(Wrapper wrapper) { var cid = wrapper.Cid; wrapper.Destinations = new SelectList(context.Destinations.Where(c=&gt;c.CountryId == cID), "id", "Name").ToList(); return Json(wrapper); }
accepted answer of: http://stackoverflow.com/q/26032229
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25889950
accepted answer: http://stackoverflow.com/a/25890049
has comment: http://stackoverflow.com/comment/40518707
type: AnsweredQuestion
tagged with: recursion
tagged with: settimeout
has body: I'm trying to do something like that : I want to call the doSomething() function only when the tab has loaded class (it may take 3 or 5 seconds). function addInfosSinistre(msg){ addInfosSinistreRecursive(msg, 0); } function addInfosSinistreRecursive(msg, nbCalls) { if ($("#tab").hasClass('loaded')) { doSomething(); }else if (nbCalls &lt; 10) { setTimeout(addInfosSinistreRecursive(msg, nbCalls+1),500); } } This is not working, it seems like the timer doesn't work. Is there something wrong here ?
score: 1
linked to: http://stackoverflow.com/q/3800512
possible better answer: http://stackoverflow.com/a/25890051
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40518616
answer count: 2
has title: setTimeout and recursive function with parameters
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/1190642
has answer: http://stackoverflow.com/a/25890051
favorite count: 0
has answer: http://stackoverflow.com/a/25890049

http://stackoverflow.com/comment/138639221
comment on: http://stackoverflow.com/a/25937289
score: 0
type: AnswerComment
has text: Waw what a strange expectation your users have there. I have _never in my life_ expected a browser tab openend by another program to close itself, unless its one of those "log in to browse" OS generated browser views. Security is a trade off, and this is one of them. The downsides of letting anyone just do that far outweigh the small subset of use cases where you would consider it potentially useful. Just print an end-screen like everyone else: "Thanks for participating, you may now close this window!".
type: Comment

http://stackoverflow.com/comment/40555158
has text: @Quentin: Yes it was invalid because of my sloppy original attribute values/typos, but not because the concept is invalid. I would be surprised if there is a support problem or lack of adequate documentation for `object` in any context where `iframe` can be used too.
type: AnswerComment
comment on: http://stackoverflow.com/a/25909583
score: 0
type: Comment

http://stackoverflow.com/a/26029766
has comment: http://stackoverflow.com/comment/40772823
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Each round has many Questions, and each Question has many choices (and point values), and each Player has many Choices where you add up the score of each. function Round(questions){ this.questions=questions;//array of Question instances } function Question(question){ this.question=question;//the question "What's a green animal?" this.choices=choices;//array of choice instances } function Choice(question,choice,pointsWorth){ this.question=question;//the question it belongs to---the parent class this.choice=choice;//"Alligator" this.pointsWorth=pointsWorth;//the correct answer is worth 5, wrong answers 0? } function Player(){ this.choices=[]; } Player.prototype.chooseChoice=function(choice){ this.choices.push(choice); } Player.prototype.score=function(){ return sum(this.choices);//You gotta write this function. this.choices[0].pointsWorth+this.choices[1].pointsWorth etc }
answers question: http://stackoverflow.com/q/26029717
has comment: http://stackoverflow.com/comment/40772951

http://stackoverflow.com/comment/40663700
type: Comment
comment on: http://stackoverflow.com/a/25962525
has text: Nothing at all? That's funny. Does print_r($_GET) send out anything at all? Could you write that sentence before the first foreach and tell us what the alert says? Thanks.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40656809
comment on: http://stackoverflow.com/q/25966265
has text: It does have a property `name`, but since you didn't name the function, it's an empty string.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25921108
accepted answer of: http://stackoverflow.com/q/25921017
type: AcceptedAnswer
has body: the return in your $.each(... is returning from the internal function. you need a way to return false from your outer function. something like this $("#refer").click(function() { var input_emails = $('#friend_emails').val(); if (input_emails === "") { alert("Please enter at least one friend's email to send invites") return false; } else { var success = true; var parsed_emails = input_emails.split(','); $.each(parsed_emails, function( index, email_value ) { var trimmed_email = $.trim(email_value) var atpos = trimmed_email.indexOf("@"); var dotpos = trimmed_email.lastIndexOf("."); if (atpos&lt; 1 || dotpos=trimmed_email.length) { alert(trimmed_email + " " + "is not a valid email format, please correct and resubmit"); success = false; } }); return success; } });
answers question: http://stackoverflow.com/q/25921017
score: 0
type: Answer

http://stackoverflow.com/comment/40642121
has text: See at https://github.com/glenswift/imageloader. Maybe it helps you
comment on: http://stackoverflow.com/q/25958431
score: 0
type: Comment
type: QuestionComment

sidebar
type: Tag
tags question: http://stackoverflow.com/q/26032204
tag name: sidebar

http://stackoverflow.com/comment/40570865
type: Comment
comment on: http://stackoverflow.com/a/25918219
has text: Understood but are they purposefully using an array? OP never said that.
type: AnswerComment
score: 1

http://stackoverflow.com/comment/40596396
type: Comment
type: QuestionComment
has text: Yes...on separate line from the text not each other; I apologize for the confusion
comment on: http://stackoverflow.com/q/25930484
score: 0

http://stackoverflow.com/comment/40624442
comment on: http://stackoverflow.com/a/25948520
type: Comment
score: 0
type: AnswerComment
has text: I'm currently getting broken images when looking for the last image. I adding the function to the above question.

http://stackoverflow.com/comment/40582343
has text: "error" didn't catch the error :/ and "fail" made $.post fail :( The server would give no response and halt x.x I'll keep experimenting
comment on: http://stackoverflow.com/q/25922470
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40553340
type: Comment
has text: @Sameera Thilakasiri Answer is more reliable. But with id its also working.
comment on: http://stackoverflow.com/a/25908800
type: AnswerComment
score: 0

http://stackoverflow.com/q/25954337
has body: I have a JSON object called $graphData, and when I use &lt;?php echo var_dump(json_decode($graphData)); ?&gt; I get the following: object(stdClass)[987] public 'myself' =&gt; object(stdClass)[984] public '1' =&gt; object(stdClass)[986] public 'id' =&gt; string '999999999' (length=9) public 'value' =&gt; string '4.2' (length=3) public 'name' =&gt; string 'Myself' (length=6) public 'owner' =&gt; string '' (length=0) public 'type' =&gt; int 1 public 'children' =&gt; array (size=0) ... public 'my_teams' =&gt; array (size=0) empty public 'my_units' =&gt; array (size=0) empty public 'companies' =&gt; array (size=1) 0 =&gt; object(stdClass)[982] public 'id' =&gt; string '66' (length=2) public 'name' =&gt; string 'Company' (length=8) public 'owner' =&gt; string 'Name Name' (length=13) public 'value' =&gt; string '4.2' (length=3) public 'type' =&gt; string '4' (length=1) public 'children' =&gt; array (size=0) ... How can I access the string labeled 'value', and with value 4.2? Thanks //Edit: I need to use it in php or js code
score: 0
answer count: 1
has title: Get string from JSON object
tagged with: php
has answer: http://stackoverflow.com/a/25954364
has comment: http://stackoverflow.com/comment/40634202
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40634211
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25954364
tagged with: javascript

http://stackoverflow.com/comment/40607438
type: QuestionComment
comment on: http://stackoverflow.com/q/25938410
has text: Add value to you radio boxes. Then instead of check if each radio is checked. You can just get the value `jQuery(this).val() and use the value like this` if(value == 'onetime')jQuery('#onetime').hide()`
score: 0
type: Comment

http://stackoverflow.com/q/25968984
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: datepicker
type: UnansweredQuestion
has title: jQuery UI datepicker range selector issue
linked to: http://stackoverflow.com/q/25446566
has answer: http://stackoverflow.com/a/25969123
has body: Created date picker with range selector with help from this answer When we select date from "1st May" and to "1st Aug", user not able to change "from" date previous than 1st May. Is there any solution in this case that instead of not allowing user browse the date than min date. User should be allowed to go prev. date but with alert or notification that they have selected wrong date range. Code snippet : credit $(function() { $("#from-datepicker").datepicker({ dateFormat: "dd-M-yy", maxDate: "-1d", onClose: function (selectedDate) { // Set 'TO' minDate $("#to-datepicker").datepicker("option", "minDate", selectedDate); // Set 'TO' maxDate at 3 months if before yesterday var dt = new Date($(this).datepicker("getDate")); dt.setMonth(dt.getMonth() + 3); if(dt &lt; Date.now()) { $("#to-datepicker").datepicker("option", "maxDate", dt); } } }); $("#to-datepicker").datepicker({ dateFormat: "dd-M-yy", maxDate: "-1d", onClose: function (selectedDate) { // Set 'FROM' maxDate $("#from-datepicker").datepicker("option", "maxDate", selectedDate); // Set 'FROM' minDate at 3 months if before yesterday var dt = new Date($(this).datepicker("getDate")); dt.setMonth(dt.getMonth() - 3); if(dt &lt; Date.now()) { $("#from-datepicker").datepicker("option", "minDate", dt); } } }); }); http://jsfiddle.net/4Ln0cxpq/
has answer: http://stackoverflow.com/a/25969145
tagged with: date
type: Question
has answer: http://stackoverflow.com/a/25969272

http://stackoverflow.com/a/25982843
upvote count: 3
type: AcceptedAnswer
type: Answer
has body: You can do this with injectBoundHTML(): ... this.injectBoundHTML(' ', this.$.container); It's not documented yet, but more info is here: https://github.com/Polymer/docs/issues/607
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25981318
accepted answer of: http://stackoverflow.com/q/25981318

http://stackoverflow.com/comment/40673935
has text: My first edit was because I posted my question too quickly, and thought of another way to try and force it to do what I wanted (though I knew it probably wouldn't work). The second update was because you wanted me to provide something simple and easy to assume as it was not a part of the problem set. My last update was trying to make my problem clearer as it seems as though you were unable to understand what I was trying to achieve (which is understandable as my head was spinning some).
comment on: http://stackoverflow.com/q/25974979
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40656109
type: Comment
type: QuestionComment
has text: Can you post the link provided in the stacktrace?
comment on: http://stackoverflow.com/q/25966083
score: 0

http://stackoverflow.com/comment/40512602
comment on: http://stackoverflow.com/q/25885705
score: 0
type: QuestionComment
has text: is your `params.id` filled? can you see it in the controller?
type: Comment

http://stackoverflow.com/q/25959926
upvote count: 1
type: Question
tagged with: javascript
has body: This isn't homework, purely for my side project. I'm implementing the Permutation Crossover Operator for genetic algorithm (solving travelling salesman, where each number represents a city index) and I'm having some problem with the boundary case when there isn't a 1-for-1 mapping. Consider the two genomes below, and assuming the final two entries are switched. Thus, 5 is mapped to 6, and 6 is mapped to 7. So what happens when I hit a number 6 - should I change it to 5 or 7, and this can lead to an invalid tour where a city is visited twice. //initial case GenomeA: [ 2, 3, 1, 4, 0, 7, 5, 6 ] GenomeB: [ 1, 2, 0, 3, 4, 5, 6, 7 ] 5 &lt;--&gt; 6 6 &lt;--&gt; 7 //after mapping GenomeA: [ 2, 3, 1, 4, 0, 6, 6, 7 ] GenomeB: [ 1, 2, 0, 3, 4, 6, 5, 6 ] Should I randomly select another number if a number is already mapped? Or should I not switchover any numbers that already has been mapped? For instance, a) Evaluate first set of numbers (5 &lt;--&gt; 6) b) Since 5 has not been mapped, map 5 to 6 and vice versa c) Evaluate second set of numbers (6 &lt;--&gt; 7) d) Since 6 is already mapped to 7, ignore this set of numbers
downvote count: 0
answer count: 1
tagged with: traveling-salesman
has answer: http://stackoverflow.com/a/25960506
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40705437
score: 1
tagged with: genetic-algorithm
has title: Permutation crossover operator (genetic algorithm) problems when there isn't 1-for-1 mapping

http://stackoverflow.com/comment/40603744
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25936065
type: AnswerComment
has text: You mean placing the image on a ` ` element?

http://stackoverflow.com/q/25991194
favorite count: 0
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
tagged with: google-chrome
type: Question
tagged with: xampp
tagged with: apache
downvote count: 0
tagged with: javascript
has title: Enable Cors Support
has body: I run xampp 3.2.1 on Windows 8.1. I want to use untainted Canvas elements in javascript. But I don't get it run. However I did this to check it. And there it worked. I enabled the switches shown in enable-cors.org and installed the Chrome Allow-Control-Allow-Origin extension and didn't help. But that didn't help. If I want to extract a canvas to an image using toDataURL() or toBlob still shows me the error: Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. What is configured wrong? How can I solve it? I also tried this example which didn't work either. Further the server and the client browser are running local on the same system. My httpd.conf is shown here: # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., "c:/apache" instead of "c:\apache"). # If a drive letter is omitted, the drive on which httpd.exe is located # will be used by defau…

http://stackoverflow.com/comment/40680805
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25979658
has text: http://jsfiddle.net/ff5kqtru/ this seems to work in IE11. What are u trying to achieve by that loop?

http://stackoverflow.com/comment/40635455
score: 0
has text: Might I ask why you want this to happen? And is the stuff added after the first click always going to be 'Re', or will that string vary?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955006

http://stackoverflow.com/q/25991981
tagged with: date
tagged with: type-conversion
has body: I am a newbie and want to convert 2014-09-25T09:54:00 into 9:54 AM Thu, 25th Sep.. can someone please suggest me a way to do it in javascript. Thanks
has answer: http://stackoverflow.com/a/25992848
has comment: http://stackoverflow.com/comment/40703220
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25992114
type: Question
linked to: http://stackoverflow.com/q/1576753
tagged with: datetime
linked to: http://stackoverflow.com/q/10657357
upvote count: 1
has title: javascript convert date and time into specific format
linked to: http://stackoverflow.com/q/2587345
linked to: http://stackoverflow.com/q/476105
answer count: 3
has answer: http://stackoverflow.com/a/25992157
linked to: http://stackoverflow.com/q/3552461
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/40614323
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25941937
type: Comment
has text: Progress! Rather than having a discussion in the comments here, please delete this question and ask a new, more specific one when you need help.

http://stackoverflow.com/comment/40563229
has text: I think the problem with the code closer to the WebView creation, rather than the content of the url for the WebView. Can you post that code as well?
comment on: http://stackoverflow.com/q/25896759
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40692644
has text: the module is defined as: var appMain= angular.module("appMain", ['ngRoute', 'ngAnimate','ngDraggable', 'SharedServices', 'DataServices' ]);
score: 0
comment on: http://stackoverflow.com/q/25974141
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40753258
type: Comment
has text: And where is googleLoginCtrl?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26018812

http://stackoverflow.com/comment/40734110
comment on: http://stackoverflow.com/a/25959881
score: 0
type: AnswerComment
has text: I've tried some thing with .html() and .reset() but I am still quite lost as to how to refresh a div, I've even tried creating a separate partial to replace the partial but I can't get the 'post' :locals to work :(
type: Comment

http://stackoverflow.com/a/25908174
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40553152
has comment: http://stackoverflow.com/comment/40552671
answers question: http://stackoverflow.com/q/25908102
upvote count: 1
type: Answer
has body: Your customer variable is not an array, it is already one of the customers. Try with contact: {{ customer.Name }} and all should be good.
has comment: http://stackoverflow.com/comment/40553882

http://stackoverflow.com/comment/40763206
comment on: http://stackoverflow.com/q/26024120
has text: @barman Oh I missreaded your comment, that's interesting. Didn't noticed that it worked asynchronously, is there a way to make it synchronous? So loop must wat until ajax finished to begin next iterate?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25903010
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40552343
has body: you can see the blog 'http://www.cnblogs.com/xiyangbaixue/p/3959954.html',as you did, window.open(,'_blank') will open a new window, you should remove the param of '_blank'
answers question: http://stackoverflow.com/q/25902607

http://stackoverflow.com/q/26000192
tagged with: recaptcha
tagged with: jquery
has answer: http://stackoverflow.com/a/26000267
accepted answer: http://stackoverflow.com/a/26000267
has comment: http://stackoverflow.com/comment/40718127
tagged with: php
has comment: http://stackoverflow.com/comment/40718203
type: AnsweredQuestion
tagged with: captcha
has title: Captcha check - Form is submitting to a server page I do not have access to
type: Question
tagged with: javascript
score: 0
has body: My client needs me to implement captcha on his form. The form's action is set to an external page, to which we do not have access. I wanted to use Google's reCaptcha but it seems that piece of code (which does the checking) needs to be placed in the targed page (which we cannot access). What is the solution? I tried with using some simple Javascript array and jQuery checking of the value but it seems that spammers after couple of months learned how to dig the values out of the page code (yes, the values are written there, it's javascript - and I do not know better way) because the spam is arriving again. A good client-side way would be even better. If you know a script or some code to be used here it'd be very appreciated.
answer count: 1

http://stackoverflow.com/q/25938676
tagged with: jquery
has answer: http://stackoverflow.com/a/25938819
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/40607888
downvote count: 0
has answer: http://stackoverflow.com/a/25939067
has answer: http://stackoverflow.com/a/25938923
answer count: 5
has title: use button to pass td data
possible better answer: http://stackoverflow.com/a/25938801
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25938801
has comment: http://stackoverflow.com/comment/40608391
score: 1
has body: I have a table that I want to give the user the ability to select. I added an button, value="Update", to the beginning of the row, and assigned an onclick value. My problem is that I want to send other items(in td>s on the same row) from the row to the function called by the button. How do I get the information from the row the button is on? I would like to pass the "Name" and "Last Update Time" to the function the button calls. I tried using the following: $("#Report input[name=btn_id]").closest('td').attr('text') but it returns "undefined," which I am not surprised by, as I think this is due to it not knowing what row of the table to pull from. Here is a view of the table: Here is the code behind the table: Update Name Info location Last Update Time Test1 None Desktop 2014-06-30 18:22:39 Test1 None Server 2014-03-30 16:20:15 Any help would be appreciated.
type: Question
has answer: http://stackoverflow.com/a/25938799
accepted answer: http://stackoverflow.com/a/25938799
tagged with: javascript

http://stackoverflow.com/q/25991257
has answer: http://stackoverflow.com/a/25991391
type: Question
has answer: http://stackoverflow.com/a/25991346
possible better answer: http://stackoverflow.com/a/25991391
has body: Trying to implement radial responsive menu DEMO unable to pass additional parameters like menu position(bottom right etc) form this page Prameters menu is not working with bottom-right parameter $('#radial-menu').radialResponsiveMenu({ 'circleRadius': 70, 'togglePosition': bottom-right });
score: -2
has answer: http://stackoverflow.com/a/25991513
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25991526
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Need help on implementing jquery parameters of responsive radial menu
favorite count: 0
accepted answer: http://stackoverflow.com/a/25991346
tagged with: css
answer count: 4
type: AnsweredQuestion
downvote count: 2

http://stackoverflow.com/a/25894791
has comment: http://stackoverflow.com/comment/40528613
score: 0
has body: Create your own function for doing it. var myAjax = function (options) { if (typeof options.data !== "undefined") { options.data = encodeURIComponent(options.data); } return $.ajax(options); }; Then in your code replace: $.ajax({ type: 'POST', url: url, data: Json.stringify(Values), dataType: 'json' }); With: myAjax({ type: 'POST', url: url, data: Json.stringify(Values), dataType: 'json' }); Whatever you do, don't monkey patch!
type: Answer
answers question: http://stackoverflow.com/q/25894713

http://stackoverflow.com/q/25972417
linked to: http://stackoverflow.com/q/6542419
favorite count: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/40667987
linked to: http://stackoverflow.com/q/13153338
accepted answer: http://stackoverflow.com/a/25973303
type: AnsweredQuestion
has title: Best javascript regex for an address number
tagged with: street-address
upvote count: 1
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/9397485
has comment: http://stackoverflow.com/comment/40667374
tagged with: javascript
linked to: http://stackoverflow.com/q/10201427
has body: I have a collection of all uppercase address names and numbers and I want to extract just the first encountered address number for each address. The following examples show what I would like to extract from each: 80 ROSE COTTAGE -> 80 80A ROSE COTTAGE -> 80A 80 A ROSE COTTAGE -> 80 A 80ROSE COTTAGE -> 80 (accidental no-space) [ANY OTHER TEXT] 80 ROSE COTTAGE -> 80 I have found some similar questions answered here and elsewhere on the internet, but they always deal with an address as a whole as opposed to specifically just address name and number: Match each address from the address number to the 'street type' regex street address match Regular Expression: Any character that is NOT a letter or number javascript regular expressions address number JavaScript regex to validate an address The last one makes reference to a lookahead, which lead me to construct a negative look ahead for any alphanumeric characters following a potential single text character(eg. 80 A) in my JavaScript regex. However without adding the alternative "digits only found" group (\d+) my fourth example above does not return just the number. (?:\d+\s*[A-Z]?(?![A-Z0-9]))|(?:\d+)) Is there a way to combine these two groups into a single regex expression? Or is this not possible in JavaScript's regex implementation? Any help with this would be greatly appreciared.
score: 0
has answer: http://stackoverflow.com/a/25973303
answer count: 1
linked to: http://stackoverflow.com/q/2991901

http://stackoverflow.com/q/25958811
favorite count: 0
has answer: http://stackoverflow.com/a/25958944
upvote count: 2
has comment: http://stackoverflow.com/comment/40642409
has comment: http://stackoverflow.com/comment/40642386
tagged with: css
has comment: http://stackoverflow.com/comment/40642268
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40642329
score: 2
has body: I would like to change the color of the div, over which the mouse cursor is. But only one element, I dont want to apply the new color to the parent elements. I tried this, but I have no idea, how to solve this. HTML: a b c d e CSS: div { padding: 5px; border: 1px solid black; } div:hover { background: green; } JSFiddle: http://jsfiddle.net/Lurwp7ey/
accepted answer: http://stackoverflow.com/a/25958944
type: Question
has answer: http://stackoverflow.com/a/25959273
has comment: http://stackoverflow.com/comment/40642450
has comment: http://stackoverflow.com/comment/40642561
has answer: http://stackoverflow.com/a/25958885
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40642435
has comment: http://stackoverflow.com/comment/40642370
possible better answer: http://stackoverflow.com/a/25958885
answer count: 3
has title: Dont apply hover effect to parent
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25909468
has body: You can try this example : jsbin var data ={ "signature": "newAccountSignatur", "signatureEnabled": true, "defaultMsisdn": "08282709909013", "httpForwardingAddress": "http://null.dev.to", "smtpForwardingAddress": "lazarus@null.dev.to", "customer": { "signature": "newCustomerSignatur", "id": 10339, "companyName": "Gerd Webapp Test v2.0.x", "diallingCodeId": 43, }, }; data.customer.signature="newsign"; console.log(data.customer.signature); alert(data.customer.signature);
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25908981

http://stackoverflow.com/comment/40609210
has text: i tried like xmlHttp.send("n1=" + value1 + "&n2=" + value2); still the same
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25934645

http://stackoverflow.com/q/26029383
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26036372
tagged with: javascript
linked to: http://stackoverflow.com/q/26059129
score: 4
has body: So I'm currently using CF11 and CFWheels 1.1, the "Global Script Protection"(GSP) server feature does an awful job of covering the XSS bases. I would like to extend it to block any and all tags/vectors for JS from being inserted into the database. CF11 offers antiSamy protection via the getSafeHTML() function which applies a xml policy file specified in application.cfc but I would still need to modify every single varchar cfqueryparam in the application to use it right? Is there a way to get CF11 to enable the antisamy features server or application wide in a similar way that the GSP feature works? What I mean by this is GSP automatically strips tags out of input submitted to the app without having to modify all the queries/form actions. I'd like a way to apply the antisamy policy file or getSafeHTML() in the same way. Thanks!
upvote count: 4
tagged with: xss
has answer: http://stackoverflow.com/a/26048652
answer count: 3
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26036372
has comment: http://stackoverflow.com/comment/40832912
has comment: http://stackoverflow.com/comment/40790857
possible better answer: http://stackoverflow.com/a/26038474
tagged with: coldfusion
has answer: http://stackoverflow.com/a/26038474
tagged with: antisamy
has title: Can I get robust XSS protection in CF11 that I can apply to an entire site without touching every query or input?
tagged with: cfwheels

http://stackoverflow.com/comment/40673859
type: AnswerComment
type: Comment
has text: From what we see, that div has no size. That would make it not visible/not clickable.
comment on: http://stackoverflow.com/a/25975997
score: 0

http://stackoverflow.com/q/25889191
has comment: http://stackoverflow.com/comment/40517255
has answer: http://stackoverflow.com/a/26079511
downvote count: 1
has comment: http://stackoverflow.com/comment/40522300
has title: confused about this javascript closure pattern
has comment: http://stackoverflow.com/comment/40522227
tagged with: closures
score: -1
type: Question
answer count: 2
has body: h = function(){ x = function(){ alert("try"); }(); x; }; I'm confused about this behavior: the inner function is immediately invoked, and it's ok. But why i must have an assignment? Why i can't write it anonymously?
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25889292
has comment: http://stackoverflow.com/comment/40517301
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40764516
has text: That prevented the error AND got the table populated. So that's fixed - Thanks! I noticed, however that the console output for notesArray.length is still the count for each of the characters in the array elements, even though the values got to the correct table cells. Any idea about this behavior?
comment on: http://stackoverflow.com/a/26020347
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40628712
type: AnswerComment
comment on: http://stackoverflow.com/a/25951303
has text: you can define global variables in js with path and keep all in one place, i think.
score: 0
type: Comment

http://stackoverflow.com/comment/40628599
has text: For the record, YT works just fine over HTTPS.
comment on: http://stackoverflow.com/q/25951010
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25970722
score: 1
has body: Use before() $('#maintable tbody tr&gt;:last').before(result); The FIDDLE DEMO will help you
has comment: http://stackoverflow.com/comment/40664364
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25970381
answers question: http://stackoverflow.com/q/25970381

http://stackoverflow.com/comment/40717860
comment on: http://stackoverflow.com/a/25999984
type: AnswerComment
type: Comment
score: 1
has text: Thanks you very much, I almost got it ... together with an headache :) Can you add some more details on point 1 ?

http://stackoverflow.com/comment/40537294
score: 0
comment on: http://stackoverflow.com/q/25896664
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61447/discussion-between-meg-ann-and-matthias-h).
type: Comment

http://stackoverflow.com/comment/40544451
score: 0
type: AnswerComment
has text: Here is the http://jsfiddle.net/SPViradiya/qx7zq/1/ . If you do not want on click, remove the click word or use the above code.
type: Comment
comment on: http://stackoverflow.com/a/25903809

http://stackoverflow.com/q/25934905
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40601007
has answer: http://stackoverflow.com/a/25936344
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40600724
has answer: http://stackoverflow.com/a/25936498
has comment: http://stackoverflow.com/comment/40600627
has comment: http://stackoverflow.com/comment/40601825
tagged with: css
linked to: http://stackoverflow.com/q/21818897
has comment: http://stackoverflow.com/comment/40603032
has title: styling the input box autocomplete
type: Question
has comment: http://stackoverflow.com/comment/40602752
has comment: http://stackoverflow.com/comment/40601736
has comment: http://stackoverflow.com/comment/40601965
linked to: http://stackoverflow.com/q/17838380
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/40600554
tagged with: javascript
has comment: http://stackoverflow.com/comment/40602124
has body: I was wondering if it's at all possible to style the autocomplete box that appears from input fields. ( I know This question is the same but that doesnt have a answer and since its a few months old i figured i made a new post about it) That image is of my login screen with the autocomplete box being all square and bulky compared to my input field. If it's not possible to style the box i'll simply turn autocomplette off but if it's at all possible i would be very interested. New screenshot:
score: 0

http://stackoverflow.com/q/26010090
score: 0
has answer: http://stackoverflow.com/a/26010161
linked to: http://stackoverflow.com/q/14645011
has comment: http://stackoverflow.com/comment/40736278
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40736084
tagged with: web-services
has answer: http://stackoverflow.com/a/26010404
has title: Send a ajax when leave button is clicked onbeforeunload jquery
type: Question
tagged with: browser
has body: I am using following code on a html page window.onbeforeunload = function() { return "You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes"; } when a user try to leave the current page the i ask the user a confirmation either he/she want to leave the page or not. there are two button 'leave the page' and 'cancle' How can i know if user click on the leave button then i have to send a ajax request (that ajax request do some action in DB) . Thanks in advance.
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/q/25884059
has comment: http://stackoverflow.com/comment/40509840
has comment: http://stackoverflow.com/comment/40509679
has comment: http://stackoverflow.com/comment/40509999
tagged with: angularjs-ng-options
type: Question
score: 5
upvote count: 5
has body: With angular I would like to make a select list with value that takes the id of my choice (actual id property of an object) and I would like to bind it correctly with ng-model directive. Here is what I've tried : $scope.People = [ { name : "Fred", id : 1 }, { name : "Joe", id : 2 }, { name : "Sandra", id : 3 }, { name : "Kacey", id : 4 }, { name : "Bart", id : 5 } ]; $scope.setTo1 = function(){ $scope.selectedPersonId = 1; } http://jsfiddle.net/b7dyadnr/ Here select option value is the correct value (value is the id of person in people) and text is correct. But the binding doesn't work so if I set the value of $scope.selectedPersonId the selection is not reflected on the list. I know I can make it work like this : http://jsfiddle.net/rgtbn2f5/ There it works I can set $scope.selectedPersonId and the changes are reflected on the list. But then the id used in the select list option value is not the id of the actual person ! Fred Joe ... I want to use it like this except that I want angular to use the true id of the person in the select option value and not the index of the array or whatever thing it uses. If you wonder why I want to use it like this it is because the id is sent to an API and the model can also be set using querystring so I must make it work like this.
tagged with: javascript
downvote count: 0
answer count: 1
has title: ng-options select list value set to the id of my choice and binding it correctly with ng-model
tagged with: selectlist
favorite count: 0
has answer: http://stackoverflow.com/a/25885647
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40509752
has comment: http://stackoverflow.com/comment/40509121

http://stackoverflow.com/q/25967988
has answer: http://stackoverflow.com/a/59284736
type: Question
tagged with: javascript
score: 0
has body: I am trying to create an MRAID (v2) compliant SDK for Android, which if integrated with any android app will display rich media ads. Also, at the backend there will be a platform that will let advertisers create MRAID compliant ads/creatives, which can then be served to the SDK for display purpose. I have gone through the spec document and I am still not totally clear about the functioning and flow of the entire system as I am new to this digital ads industry. So it will be great if someone can explain me how the entire MRAID ads works - data flow (who raises initial request for ads, how this request travels and fetches the ads, etc.) and what all components are required to create entire platform - SDK, ad creation platform etc. Thanks!!
answer count: 2
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: android
tagged with: mraid
tagged with: ads
has comment: http://stackoverflow.com/comment/43802965
has title: MRAID 2 architecture and data flow
has answer: http://stackoverflow.com/a/26123652

http://stackoverflow.com/comment/40691804
type: QuestionComment
comment on: http://stackoverflow.com/q/25985251
has text: Would the user see the scrollbar? (That they're at the bottom of the page?) Could they draw the "thumb" to scroll back up to the top? (Or, do you want that hidden?)
score: 0
type: Comment

http://stackoverflow.com/q/25969162
tagged with: arrays
downvote count: 5
tagged with: javascript
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/40661628
tagged with: jquery
favorite count: 0
tagged with: multidimensional-array
has comment: http://stackoverflow.com/comment/40661635
score: -5
has answer: http://stackoverflow.com/a/25969226
type: UnansweredQuestion
has title: Fetch all values based on key in multidimensional array Javascript
type: Question
has answer: http://stackoverflow.com/a/25969245
has body: Input Array : [ Object { kid="16145", tid="5045", kname="best landlord insurance rates", more... }, Object { kid="22586", tid="5045", kname="car insurance deals", more... }, Object { kid="49004", tid="5045", kname="landlord and tenant insurance", more... } ] In above array i need to fetch all values having key 'kid'. required Output : array(16145,22586,490004); **Without looping the input array using array map or array search or any other JS array/Object functions only Thanks.

http://stackoverflow.com/comment/40721295
type: Comment
has text: Maybe there's a mistake in the `jsp` code? You should [ask a new question](http://stackoverflow.com/questions/ask), post the HTTP request and your serverside code there.
comment on: http://stackoverflow.com/a/26001727
type: AnswerComment
score: 0

http://stackoverflow.com/q/25997467
has comment: http://stackoverflow.com/comment/40712991
answer count: 1
has title: Ajax is not updating data
has comment: http://stackoverflow.com/comment/40712941
has comment: http://stackoverflow.com/comment/40713151
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25997801
has comment: http://stackoverflow.com/comment/40713046
has comment: http://stackoverflow.com/comment/40712951
has comment: http://stackoverflow.com/comment/40714114
type: AnsweredQuestion
tagged with: jquery
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/40713234
tagged with: php
has body: I've got a forum in which user is allowed to edit and delete only his comments, I've defined an "edit" button, that by a click of mouse brings down a modal, and in that modal user is allowed to get access to the data's he/she has been sent before, I've written an ajax to target these field and update them whenever the users clicks on "edit" button, code totally makes sense, but so far the functionality doesn't, to make it more clear, user clicks, modal comes down, whatever he/she has been posted will appear in fields, and there is an "edit" button at the bottom of modal, which is responsible for changing and updating data. here is the modal code : &lt;button id="btn-btnedit" class="btn btn-primary " data-toggle="modal" data-target="#myModal&lt;?php echo $list['id']; ?&gt;"&gt; Edit &lt;i class="fa fa-pencil-square-o"&gt;&lt;/i&gt; &lt;/button&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="myModal&lt;?php echo $list['id']; ?&gt;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&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" id="myModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="container"&gt; &lt;form style="width: 550px;" action="" method="post" id="signin-form&lt;?php echo $list['id']; ?&gt;" role="form"&gt; &lt;input type="hidden" name="commentID" value="&lt;?php echo $list['id']; ?&gt;"&gt; &lt;div class="from-group"&gt; &lt;label for="title"&gt;Title: &lt;/label&gt; &lt;input class="form-control" type="text" name="title" id="txttitle" value="&lt;?php echo $list['title']; ?&gt;" placeholder="Page Title"&gt; &lt;/div&gt; &lt;div class="from-group"&gt; &lt;label for="label"&gt;Label: &lt;/label&gt; &lt;input class="form-c…
has answer: http://stackoverflow.com/a/25997801
has comment: http://stackoverflow.com/comment/40712815
has comment: http://stackoverflow.com/comment/40713056
tagged with: twitter-bootstrap
score: 0

http://stackoverflow.com/comment/40593541
score: 0
type: Comment
type: QuestionComment
has text: Your URl is codrrect? ` var link = '/DashBoard'` ??? Is return correct data???
comment on: http://stackoverflow.com/q/25927929

http://stackoverflow.com/comment/40612300
comment on: http://stackoverflow.com/q/25902232
type: Comment
type: QuestionComment
score: 1
has text: i was thinking, you can use a clear canvas and show off-site images behind the canvas using an tag. you would then draw on the canvas, it would look like you're drawing on the image, and you could get the marking using the imageData interface.

http://stackoverflow.com/a/25901473
upvote count: 1
answers question: http://stackoverflow.com/q/25901387
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40540225
has body: call function onclick() and submit with document.getElementById("myForm").submit(); if true else give error!
has comment: http://stackoverflow.com/comment/40689859

http://stackoverflow.com/a/27906264
answers question: http://stackoverflow.com/q/25883732
score: 0
type: Answer
has body: It seems like the sSource value is not passed properly. sSource is basically the "ajax" url value in DataTables.js. My solution to this is to re-add the sSource back from the DataTable ajax value on line 796 in the columnFilter.js file: sSource = sSource ? sSource : oTable.fnSettings().ajax; So it would look something like: oTable.fnSettings().fnServerData = function (sSource, aoData, fnCallback) { sSource = sSource ? sSource : oTable.fnSettings().ajax; .... }

http://stackoverflow.com/comment/40546682
score: 1
comment on: http://stackoverflow.com/a/25904794
type: AnswerComment
type: Comment
has text: Yes, because they're all local.

http://stackoverflow.com/a/25916148
has comment: http://stackoverflow.com/comment/40566852
has comment: http://stackoverflow.com/comment/40578814
has body: Would there be one distinct function per permutation, or might several permutations call the foo function? If the former, I prefer your method to using if/else or switch. If the latter, I might do something like this on your last line: if('a1b2c5 a3b0c3 a2b2c5'.indexOf(propName) &gt; -1) foo(). That may reduce your program's memory usage, and a string lookup may be faster than an object lookup.
answers question: http://stackoverflow.com/q/25915275
type: Answer
score: 0

http://stackoverflow.com/a/26026146
has body: The scope is shared across all the instances of your directive, so every showMe checks the same isshown variable. An easy solution would be to modify your code like this: &lt;div ng-repeat="item in items"&gt; &lt;div class="item-title" ng-click="setState(item)"&gt;{{ item.title }}&lt;/div&gt; &lt;div class="item-container" show-me="isShown(item)"&gt; {{ item.content }} &lt;/div&gt; &lt;/div&gt; And in the controller: $scope.setState = function(item) { item.isshown = !item.isshown; }; $scope.isShown = function(item) { return item.isshown; }; Here you use the item as a data source as well as an object holding the state of the "openness". The directive's watch will call the isShown function in your controller, where you would extract the state for that item. Optionally you could use an array somewhere else where each shown item is stored (and of course removed on hide), and the isShown just checks if the array has that item in it.
score: 0
answers question: http://stackoverflow.com/q/26026005
type: Answer

http://stackoverflow.com/comment/40588972
type: QuestionComment
has text: @user2314737 hi i was wondering is this possible to achieve
comment on: http://stackoverflow.com/q/25927941
score: 0
type: Comment

http://stackoverflow.com/comment/40600362
score: 0
comment on: http://stackoverflow.com/q/25933496
type: Comment
type: QuestionComment
has text: Do you mean bottom navigator? It's supported only in Highstock. In Highcharts you can use [this workaround](http://www.highcharts.com/demo/dynamic-master-detail). Or maybe you just want to set `xAxis.min` and/or `xAxis.max` ?

http://stackoverflow.com/a/25917842
has comment: http://stackoverflow.com/comment/40570050
has comment: http://stackoverflow.com/comment/40570110
answers question: http://stackoverflow.com/q/25917758
score: 0
has body: The word Elements in getElementsByTagName is plural. It doesn't return an element, it returns a NodeList, which is like an array. Loop over it (for (var i = 0; i &lt; nodelist.length; i++)) and deal with each member in turn.
type: Answer

http://stackoverflow.com/a/25927508
has body: From you to write the code to see nothing wrong, maybe the type of file isn't object but string, you can try the method JSON.parse(file) and then get the key of width.
has comment: http://stackoverflow.com/comment/40652753
type: Answer
answers question: http://stackoverflow.com/q/25927381
score: 0

http://stackoverflow.com/q/26023015
has comment: http://stackoverflow.com/comment/40759906
has answer: http://stackoverflow.com/a/26025854
upvote count: 2
has comment: http://stackoverflow.com/comment/40759721
has body: Alright, is this possible? I have this html page: ` Enter text here: Press enter to capture HTML. ` This page simply captures the current html after a post and then displays it for viewing. Hence the replace statements that change < and > into < and > . The point of this page is to capture the current HTML. And when I enter "Yabadabdoo!" in the text box and press enter, I get the following result in the html: But what I wanted to get was: Am I doing something wrong, or can JQuery/Javascript even capture values from INPUTS?
has comment: http://stackoverflow.com/comment/40760802
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40760377
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Capture INPUT value in raw html
score: 2
has comment: http://stackoverflow.com/comment/40760016
downvote count: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/40775734
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26031665
has text: @jao I'm not sure what to post, It's taken me a very long time to post this and a lot of different files (several HTML, CSS & JS files)
score: 0

http://stackoverflow.com/comment/40732398
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/26007873
score: 0
has text: the demo also includes the code for a standard popup.

http://stackoverflow.com/q/25981413
type: UnansweredQuestion
has title: jqGrid : setting submitted field name when submitting the edit form as a json
has comment: http://stackoverflow.com/comment/40684138
downvote count: 0
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/40712412
type: Question
has comment: http://stackoverflow.com/comment/40686574
has comment: http://stackoverflow.com/comment/40684183
tagged with: jqgrid
tagged with: javascript
upvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40684628
favorite count: 0
has body: I want to submit the form in json format. Everything is ok. json data is generating and being submitted in the server side. I need to catch the submitted data in server side too. And for this i need a field name of the json data. But I found that in jqGrid side its submitting a json but the json object is not associated with any field. How can i set a field against that json data. So that I can try to get the json field in server side.

http://stackoverflow.com/a/25926202
answers question: http://stackoverflow.com/q/25925802
type: Answer
has comment: http://stackoverflow.com/comment/40603563
score: 0
has body: i think you should need to do this by using gome function which are specially made for this: NO YES javascript: var addtxt = function(){ var positiontext(parent) = document.getElementById("positiontext"); var textarea(child) = document.createElement("textarea"); textarea(child).addAttribute("style", "(some properties)") //there are other ways also to add some attribute but for now use this positiontext(parent) .appendChild("textarea(child)") }

http://stackoverflow.com/comment/40569090
type: QuestionComment
comment on: http://stackoverflow.com/q/25917210
score: 0
has text: Just because font-awesome uses it, it does not make it valid. Please see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option The `strong` tag is a different story from the `option` tag. Here is the what the link says "Permitted content: Text with eventually escaped characters (like &eacute;)."
type: Comment

http://stackoverflow.com/comment/40555479
type: QuestionComment
comment on: http://stackoverflow.com/q/25909341
type: Comment
has text: Not really, I need to disable separate directions of mouse-wheel.
score: 0

http://stackoverflow.com/comment/40646085
comment on: http://stackoverflow.com/a/25960730
type: AnswerComment
score: 0
has text: Where are you calling the code to change the title ? Do you have a link where we can see it in action ?
type: Comment

http://stackoverflow.com/comment/40765337
type: Comment
has text: Was to exclude a problem with the hover event.
score: 0
comment on: http://stackoverflow.com/q/26021533
type: QuestionComment

http://stackoverflow.com/comment/40528577
type: QuestionComment
has text: If I write `I like turtles` in your text box, how do you plan to know if the `I` is a word or a roman numeral?
score: 1
comment on: http://stackoverflow.com/q/25895168
type: Comment

http://stackoverflow.com/comment/40586628
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25926891
score: 0
has text: The opening and closing braces for the function `showfield` is missing.

http://stackoverflow.com/q/25947957
has body: I'm building a chat system with websockets but a can't find how to keep runing the file that starts the websocket server. I'm using php, javascript and cpanel. Can anyone help me how to run the websocket server from cpanel and keep it runing like forever. Thanks
has title: WebSocket Server php script
has comment: http://stackoverflow.com/comment/40623424
has comment: http://stackoverflow.com/comment/40660834
score: 2
downvote count: 0
answer count: 1
tagged with: websocket
tagged with: javascript
tagged with: cpanel
favorite count: 0
tagged with: php
upvote count: 2
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27819222

http://stackoverflow.com/q/25887027
tagged with: javascript
has answer: http://stackoverflow.com/a/25887354
score: 0
tagged with: validation
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40514542
has body: Is there a simple way with Angularjs to Validate a radiogroup that has been instanciated in an extra directive ? Validation requirement: The User cannot submit unless one of the radioboxes has been clicked. Here is how I built it : HTML document : JS document: Directives.directive('radiotrigger', function() { return { restrict: 'E', scope: {}, compile: function(element, attrs) { var templateText = ' ' + attrs.label + ' '; element.replaceWith(templateText); } }; }); thanks a lot for your support.
has title: AngularJs Radiobox group Validation
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/40514240

http://stackoverflow.com/comment/40561225
type: QuestionComment
comment on: http://stackoverflow.com/q/25912673
score: 0
has text: It works for only the first product in the cart. It does not work for second and other products after that.
type: Comment

http://stackoverflow.com/q/26017837
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I'm currently building a @user tagging system. I have almost got it working with one little thing I can't get my head around. I know what the problem is, just can't think how I could rectify it. So I put the @ sign in the div box enter a name, select it, and then its inserted in to the content area &lt;div cols="40" rows="5" name="newmsg" id="newmsg" placeholder="Say something &lt;? echo $data['first']; ?&gt;..." contenteditable="true"&gt;&lt;/div&gt; That all works fine. But after the name has inserted and I want to type it doesn't type straight away until I click on the div again and on every click of any key it searches and the msgbox with data shows content. 1.How could I stop the msgbox showing if the div already has a .addname selected and inputed. 2.And how can I change my code to not make it search after every key press. I really don't know how facebook does it. All I know is they use a textarea and once you've inserted a name you can type normally straight away after that tagged person/s. JS: $(document).ready(function () { var start = /@/ig; // @ Match var word = /@(\w+)/ig; //@abc Match $("#newmsg").on("keyup", function () { var content = $(this).text(); //Content Box Data var go = content.match(start); //Content Matching @ var name = content.match(word); //Content Matching @abc var dataString = 'searchword=' + name; //If @ available if (go.length &gt; 0) { $("#msgbox").slideDown('show'); $("#msgbox").html('&lt;img src="load.gif" /&gt;'); //if @abc avalable if (name.length &gt; 0) { $.ajax({ type: "POST", url: "textareausernameinsert.php", // Database name search data: dataString, cache: false, success: function (data) { $("#msgbox").hide(); $("#msgbox").html(data).show(); } }); } } return false; }); //Adding result name to content box. $(".addname").live("click", function () { var username = $(this).attr('title'); var old = $("#newmsg").html(); var content = old.replace(word, "@"); //replacing @abc to (" ") space $("#newmsg").html(content); var E = "&lt;…
accepted answer: http://stackoverflow.com/a/26018720
linked to: http://stackoverflow.com/q/8438371
has answer: http://stackoverflow.com/a/26018720
tagged with: php
has title: tagging user with @
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40750021
type: Question
has comment: http://stackoverflow.com/comment/40754864
upvote count: 1
linked to: http://stackoverflow.com/q/499126
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40643357
type: Comment
has text: possible duplicate of [jQuery callback on image load (even when the image is cached)](http://stackoverflow.com/questions/3877027/jquery-callback-on-image-load-even-when-the-image-is-cached)
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25959408

http://stackoverflow.com/comment/40633629
has text: The status bar isn't part of a WebView, so I'd be very surprised if anything about it can be accessed by Javascript.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25954000

http://stackoverflow.com/a/48158360
score: 3
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/25956937
type: Answer
has body: I had the same issue, and had to satisfy all these requirements: Minified + Non minified version (as in the question) ES6 Cross platform (Windows + Linux). I finally solved it as follows: webpack.config.js: const path = require('path'); const MinifyPlugin = require("babel-minify-webpack-plugin"); module.exports = getConfiguration; function getConfiguration(env) { var outFile; var plugins = []; if (env === 'prod') { outFile = 'mylib.dev'; plugins.push(new MinifyPlugin()); } else { if (env !== 'dev') { console.log('Unknown env ' + env + '. Defaults to dev'); } outFile = 'mylib.dev.debug'; } var entry = {}; entry[outFile] = './src/mylib-entry.js'; return { entry: entry, plugins: plugins, output: { filename: '[name].js', path: __dirname } }; } package.json: { "name": "mylib.js", ... "scripts": { "build": "npm-run-all webpack-prod webpack-dev", "webpack-prod": "npx webpack --env=prod", "webpack-dev": "npx webpack --env=dev" }, "devDependencies": { ... "babel-minify-webpack-plugin": "^0.2.0", "npm-run-all": "^4.1.2", "webpack": "^3.10.0" } } Then I can build by (Don't forget to npm install before): npm run-script build
has comment: http://stackoverflow.com/comment/87525827

http://stackoverflow.com/comment/46007707
type: AnswerComment
type: Comment
has text: I use normally it for formatting money quantities, but the function works equals for a formatting numbers.
comment on: http://stackoverflow.com/a/28860563
score: 0

http://stackoverflow.com/q/25980784
accepted answer: http://stackoverflow.com/a/25980883
has title: Most optimized way to split a string change a piece of it across an array
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40682813
type: Question
tagged with: javascript
has body: I have some data coming in from an API, where for mobile devices I must change a number inside a string, to render out proper images. The data looks like this: http://akimages.shoppe.com/dyn_rppi/650.0.85.0/Store/large/140921_p06mw2_CT_hbqz7.jpg http://akimages.shoppe.com/dyn_rppi/650.0.85.0/Store/large/1556_q0622_HZ_avez2.jpg There will always be a 650.0.85.0 inside the string. I need to target the 650 directly and change them all to 380 What is the most optimized way to filter through all these strings and exchange 650 for 380?
has answer: http://stackoverflow.com/a/25980883
answer count: 1
has comment: http://stackoverflow.com/comment/40682829

http://stackoverflow.com/comment/40624256
comment on: http://stackoverflow.com/q/25941342
score: 0
type: Comment
has text: @Benjamin the link you provided is already more than 1 year old. The author might be using a different version of angularJS which behaves differently. Did you just try removing the `{{ }}` to see if anything changes ? See this question : http://stackoverflow.com/questions/17444394/angularjs-ng-show-ng-hide-expression-not-evaluated
type: QuestionComment

http://stackoverflow.com/q/26018369
has answer: http://stackoverflow.com/a/26018475
possible better answer: http://stackoverflow.com/a/26018437
answer count: 5
has answer: http://stackoverflow.com/a/26018437
has body: I wanted exactly the same functionality as in http://jsfiddle.net/8nqkA/2/ (coded by someone) So, I tried something like in http://jsfiddle.net/c78oLbg2/4/ I am not understanding where is the mistake in my code. May be there is something very trivial and I don't know as I am a newbie here: no_of_p = $('div#mydiv p').length; for (i = 0; i < no_of_p; i++) { $('div#mydiv p:eq(i)').fadeIn(1000); $('div#mydiv p:eq(i)').fadeOut(1000); }; #mydiv p { position: absolute; display: none; } para 1 para 2 para 3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40751405
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26018439
has comment: http://stackoverflow.com/comment/40751261
has answer: http://stackoverflow.com/a/26018638
tagged with: javascript
has title: .fadeIn() and .fadeOut() not working in for loop
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26018439
favorite count: 0
has answer: http://stackoverflow.com/a/26018542

http://stackoverflow.com/comment/40702237
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25988057
has text: Sorry late. I have added it.
score: 0

http://stackoverflow.com/q/25890712
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40520095
has title: position element to the right of another
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25890811
has body: Say I have an dropdown menu like this: Blah The #container div has position: 'relative' and #drop-down has position: 'absolute', how can I position the #dropdown-menu in such a way that the right of the element is at the right of the #container element. They should be right aligned with #container at the top and #dropdown-menu directly below but right aligned?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40520092
type: Question
has comment: http://stackoverflow.com/comment/40520192

http://stackoverflow.com/a/25921234
has comment: http://stackoverflow.com/comment/40576798
has body: If you just need it to trigger once then it is quite easy function addElement() { $( "body" ).append( element ); element.on( "touchmove", doStuff ); element.trigger("touchmove"); } http://jsfiddle.net/rx4qdtuj/8/ I checked this on my ipad simulator. I replaced the alert with append so you don't get constantly alerted on ipad. If you want it to continually trigger, the only possible thing I can think of was to fake the touchmove on the created element http://jsfiddle.net/rx4qdtuj/9/ var element = $("&lt;div class='element' /&gt;"); $( "body" ).on( "touchstart", addElement ); $(".wrapper").on("touchmove", addElement); function addElement() { $( "body" ).append( element ); element.on( "touchmove", doStuff ); element.trigger("touchmove"); } function doStuff() { $('body').append('a ') } HTML &lt;div class="wrapper"&gt;&lt;/div&gt; CSS .wrapper { position: absolute; top: 100px; left: 100px; width: 300px; height: 300px; } The move actually triggers on the already created div wrapper which is in the same spot as the created element
score: 0
has comment: http://stackoverflow.com/comment/40576874
has comment: http://stackoverflow.com/comment/40576921
type: Answer
has comment: http://stackoverflow.com/comment/40577172
answers question: http://stackoverflow.com/q/25919955
has comment: http://stackoverflow.com/comment/40577017
has comment: http://stackoverflow.com/comment/40577243
has comment: http://stackoverflow.com/comment/40577141
has comment: http://stackoverflow.com/comment/40577053

http://stackoverflow.com/q/25944436
has comment: http://stackoverflow.com/comment/40631756
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40618464
has title: jquery UI syntax
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40618448
type: Question
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40618493
has body: I have the following code on my page that seems to work fine in Chrome, but not any other browser. Did I miss-key something? http://jsfiddle.net/fg823c3y/ setTimeout(function() { $( "#container" ).draggable( { handle: "#handle", containment: "body", scroll: false }); $('head').append('&lt;style type="text/css"&gt;#handle:hover{cursor: move;}&lt;/style&gt;'); }, 1000);
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40619143
tagged with: jquery
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/40618369
has comment: http://stackoverflow.com/comment/40618352
has answer: http://stackoverflow.com/a/25945107

http://stackoverflow.com/comment/40743737
type: Comment
comment on: http://stackoverflow.com/a/26014498
has text: See the link in my answer.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40701926
score: 0
comment on: http://stackoverflow.com/a/25980448
type: AnswerComment
has text: You understood my question. But sir, it does not work.
type: Comment

http://stackoverflow.com/comment/40585384
comment on: http://stackoverflow.com/a/25925928
type: AnswerComment
has text: There is no solution to that as far as I know, If your users trust your site and accept popups are required, then they can configure their browsers to allow popups from your site. But that has to be done individually by each user.
score: 0
type: Comment

http://stackoverflow.com/comment/40582238
type: QuestionComment
has text: Did you try the support forums? https://mixitup.kunkalabs.com/support/
comment on: http://stackoverflow.com/q/25924360
score: 0
type: Comment

http://stackoverflow.com/a/26028144
upvote count: 1
score: 1
has body: The final solution was to use Angular's $q to return a promise: In the controller: .controller('LaunchformController', ['$scope', '$q', 'geocoder', function ($scope, $q, geocoder) { $scope.getLocation = function(val) { var deferred = $q.defer(); geocoder.geocode({ address: String(val), componentRestrictions: {'country':'US'} }, function(callbackResult) { deferred.resolve(callbackResult); }); return deferred.promise; }; }]) In the service: .service('geocoder',function() { this.geocode=function(georequest, outerCallback) { var geocoder = new google.maps.Geocoder(); geocoder.geocode( georequest, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var f = ''; var addresses = []; angular.forEach(results, function(item){ if (item.types[0] == 'locality') { for (f=1;f&lt;item.address_components.length;f++) { if (item.address_components[f].types[0] == "administrative_area_level_1") { addresses.push(item.address_components[0].short_name + ', ' + item.address_components[f].short_name); break; } } } }); outerCallback(addresses); } else { outerCallback({success:false, err: new Error('Geocode was not successful for the following reason: ' + status), results: null}); } }); }; })
downvote count: 0
answers question: http://stackoverflow.com/q/26006707
type: Answer

http://stackoverflow.com/q/25954728
has answer: http://stackoverflow.com/a/25954902
accepted answer: http://stackoverflow.com/a/25954902
type: Question
has comment: http://stackoverflow.com/comment/40655857
has comment: http://stackoverflow.com/comment/40636452
tagged with: javascript
has comment: http://stackoverflow.com/comment/40635115
has comment: http://stackoverflow.com/comment/40634985
has comment: http://stackoverflow.com/comment/40655838
score: 0
has comment: http://stackoverflow.com/comment/40634936
has comment: http://stackoverflow.com/comment/40635279
answer count: 1
has title: change innerHTML with text on squarespace
has comment: http://stackoverflow.com/comment/40634994
has comment: http://stackoverflow.com/comment/40636455
tagged with: http://stackoverflow.com/tag/html
tagged with: squarespace
type: AnsweredQuestion
has body: i'm trying to take "sold out" on this page and change it to "coming soon." right now i have the following but it's not working. window.onload = function() { document.getElementsByClassName("product-mark sold-out").innerHTML = "Coming Soon"; };
tagged with: innerhtml

http://stackoverflow.com/comment/40725960
has text: So what does your code actually do? What error messages are you seeing (if any)? What *exactly* are you having trouble with.
score: 0
comment on: http://stackoverflow.com/q/26004342
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40622848
type: Comment
comment on: http://stackoverflow.com/a/25941566
has text: thank you vary much mate. about the accept attribute - i want it to be suppurted in ie8 at least
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40776218
has text: Please post your solution as an answer and [accept it](http://meta.stackoverflow.com/questions/5234/how-does-accepting-an-answer-work)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26025896

http://stackoverflow.com/q/25942121
linked to: http://stackoverflow.com/q/21270767
has title: Responsive DIv Containing 2 images
has body: I am working on a Joomla based website template called xtec from www.crosstec.de that does not like me using JQuery based code inserted into any articles. I am trying to create a responsive div that has 2 images in it and am trying to do it entirely in css. This is what I am trying to acheive. 1) Normal width screen/browser has both images each 465px wide x 507 pixel in height - side by side with a 2 pixel gap between them centered horizontally in the browser window 2) As I reduce the screen/browser width the images should both shrink proportionally until at the point of screen / browse rreaching 850px wide then images should move to a single column and then both images are aligned vertically on top of each other, as I reduce the screen / browser they continue to reduce proportionally in size, still centered in the column. I used the code from "2-column CSS responsive layout with a responsive image" as a starter My site URL is http://www.clickandrent.mobi and the 2 images I am trying to perform this on are below the full width slider and above the bottom 2 images. Many Thanks - Martyn
score: 0
has comment: http://stackoverflow.com/comment/40615191
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25942232
has comment: http://stackoverflow.com/comment/40621491
type: Question
has answer: http://stackoverflow.com/a/25942232
tagged with: javascript

http://stackoverflow.com/q/25881309
tagged with: validation
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25881351
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25881351
score: 1
has title: Issue On Validating Text Field Using Custom Validation Function
has body: Can you please take a look at This Demo and let me know what I am doing wrong in this Custom Function to validate the Text input? $(function () { var fname = $('#fname').val(); var lname = $('#lname').val(); var proceed = true; function nameInput(inputData) { var textBox = $.trim($(inputData).val()) if (textBox == "") { alert('Field Can Not be Empty'); } } $("#pro").on("click", function (e) { nameInput(fname); e.preventDefault(); }); }); apparently the nameInput() is returning Field Can Not be Empty in both empty and filled format of the fname input. Thanks
type: Question

http://stackoverflow.com/a/25955474
type: Answer
has body: As Brad, says, there is currently no way to make an http request from the ECMAScript non-web implementations, even though there is a working draft at http://www.w3.org/TR/XMLHttpRequest/ to integrate XMLHttpRequest to these implementations as well (I guess through external bindings). What I did was to create a global function and implement it in the Web version like this: function SendBackendRequest( url, parameters, func ) { var request=new ajaxRequest(); request.onreadystatechange=function() { if (request.readyState == 4) { if ( request.status == 200 || window.location.href.indexOf("http") ==-1 ) { func.call( this, request.responseText ); } else { func.call( this, "" ); } } } request.open( "POST", "http://localhost" + url, true ); request.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" ); request.send( parameters ); }; ajaxRequest=function() { var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; if ( window.ActiveXObject ) { // --- IE for (var i=0; i&lt;activexmodes.length; i++) { try { return new ActiveXObject(activexmodes[i]) } catch(e) { //suppress error } } } else { if (window.XMLHttpRequest) // --- Mozilla, Safari etc return new XMLHttpRequest(); else return false; } }; On the Desktop side I just implemented SendBackendRequest() as well and inside my client code can use the same code to communicate with the backend.
score: 0
answers question: http://stackoverflow.com/q/25944540

http://stackoverflow.com/q/25937063
has comment: http://stackoverflow.com/comment/40605457
downvote count: 1
has comment: http://stackoverflow.com/comment/40605210
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25938407
has comment: http://stackoverflow.com/comment/40605158
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: lightbox
tagged with: javascript
tagged with: jquery
has body: Long story short, I have an image that is stored as a string in a database. I am then displaying the image in a jcarousellite carousel. When the user clicks the image, it pops up in lightbox. When the image is displayed in the carousel, it renders the whole image perfectly (the image is sized much smaller in the carousel). When the image is clicked, it only renders the top 10(ish) pixels of the image in IE. I know that there is a 32kb limit to the IE and data URIs. Is there a way to get around this and be able to display the image correctly? If you need any source code, I am more than happy to provide some. Thanks, ZS EDIT var oDataQuery = /*Query*/ var carouselul = $("#carousel-ul"); var parentBody = window.parent.document.getElementsByTagName("body")[0]; var outterDiv = document.createElement("div"); // Execute the OData query for the images $.getJSON(oDataQuery, function (data) { var results = data.d.results; // Add the results to the carousel ul for (var i = 0; i &lt; results.length; i++) { var noteId = results[i].AnnotationId; var noteSubject = results[i].Subject; var src = "data:" + results[i].MimeType + ";base64," + results[i].DocumentBody; var li = document.createElement('li'); var ahref = document.createElement('a'); ahref.href = '#'; ahref.addEventListener('click', function () { return false; }); var img = document.createElement('img'); img.src = src; img.width = '100'; img.height = '100'; img.style.border = '1px solid'; img.style.margin = '1px'; img.addEventListener('click', function() { $("#img" + noteId, window.parent.document).trigger('click'); }); ahref.appendChild(img); li.appendChild(ahref); carouselul.append(li); var innerDiv = document.createElement("div"); innerDiv.id = "div" + noteId; var img2 = "&lt;a href='" + src + "' data-title='" + noteSubject + "' id='" + noteId + "' data-lightbox='images'&gt;&lt;img id='img" + noteId + "' src='"; img2 += src; img2 += "' width='100' height='100' style='border: 1px solid; margin: 1px; visibility: hidden' al…
favorite count: 0
has comment: http://stackoverflow.com/comment/40605475
has comment: http://stackoverflow.com/comment/40604865
has title: ie 32kb limit to data uri
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40605613
has answer: http://stackoverflow.com/a/25938407

http://stackoverflow.com/comment/40777011
score: 0
type: AnswerComment
has text: Thank you, these answers have been quite helpful. and it was the removing of the B tags which was fairly difficult, but i seem to understand your method, will take me a while to implement myself but its a great reference.
type: Comment
comment on: http://stackoverflow.com/a/26032246

http://stackoverflow.com/q/25941321
answer count: 3
has answer: http://stackoverflow.com/a/25941473
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25941530
type: AnsweredQuestion
has title: How can i insert javascript inside a PHP echo function?
accepted answer: http://stackoverflow.com/a/25941473
type: Question
possible better answer: http://stackoverflow.com/a/25941427
has body: I can not get the button clicked when i insert it inside an echo.. echo '&lt;input onclick="window_target = document.basicForm.maparea1; window_name = window.open("search.php", "window_name", "resizable=0,location=0,directories=0,status=0,top=30,left=100,toolbar=no,width=180,height=480,menubar=no,scrollbars=no" ); window_name.window_target = window_target " value="Select" type="button"&gt;';
has comment: http://stackoverflow.com/comment/40613626
has answer: http://stackoverflow.com/a/25941427
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40581975
type: QuestionComment
has text: Where are you putting into the cache?
comment on: http://stackoverflow.com/q/25924270
score: 0
type: Comment

http://stackoverflow.com/q/26017249
has comment: http://stackoverflow.com/comment/40767349
tagged with: parse-platform
has body: I'm approaching Parse Cloud Code at the moment and to learn i'm checking some basic examples. I have a class named MeetingObject in my parse data base. This class has a field "meetingDateAndTime". I created a background job that check for objects older than the current time and destroy them. I would like the see in the parse Info Log the objectId of the destroyed objects but i can only see the success message, not the log. I tried also using result.objectId. Maybe the "result" variable i'm using is not an Array. What am i doing wrong? Parse.Cloud.job("deleteOldMeetings", function(request, status) { var query = new Parse.Query("MeetingObject"); var currentDate = new Date(); query.lessThan("meetingDateAndTime", currentDate); query.find({ success:function(results) { for (var i = 0, len = results.length; i &lt; len; i++) { var result = results[i]; console.log("Destroyed object.objectId: "+result.get("objectId")); result.destroy({}); } status.success("Success."); }, error: function(error) { status.error("Uh oh, something went wrong."); console.log("Failed!"); } }) });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40761897
type: Question
has comment: http://stackoverflow.com/comment/40757672
score: 0
has title: Reading parse objects with cloud code
has answer: http://stackoverflow.com/a/26034018
answer count: 1
accepted answer: http://stackoverflow.com/a/26034018
tagged with: javascript
has comment: http://stackoverflow.com/comment/40757780
has comment: http://stackoverflow.com/comment/40761009

http://stackoverflow.com/comment/40745916
score: 0
has text: Edited a few times. I hope you get the newest version :-D
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26015042

http://stackoverflow.com/a/26567557
has comment: http://stackoverflow.com/comment/106911350
answers question: http://stackoverflow.com/q/25880767
score: 28
has comment: http://stackoverflow.com/comment/59786053
accepted answer of: http://stackoverflow.com/q/25880767
type: Answer
has comment: http://stackoverflow.com/comment/129212399
has comment: http://stackoverflow.com/comment/67650531
has comment: http://stackoverflow.com/comment/47381062
has body: There is no built-in functionality for number formatting in Javascript. I found the easiest solution to be the addCommas function on this page. Then you just have to modify your tooltipTemplate parameter line from your Chart.defaults.global to something like this: tooltipTemplate: "&lt;%= addCommas(value) %&gt;" Charts.js will take care of the rest. Here's the addCommas function: function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length &gt; 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; }
upvote count: 31
has comment: http://stackoverflow.com/comment/55891230
has comment: http://stackoverflow.com/comment/69002088
downvote count: 3
has comment: http://stackoverflow.com/comment/107585973
type: AcceptedAnswer

http://stackoverflow.com/comment/40697613
comment on: http://stackoverflow.com/q/25988907
has text: I don't see any font-awesome class in the code.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40751186
type: AnswerComment
type: Comment
has text: That fixes a syntax error but doesn't answer the question.
score: 0
comment on: http://stackoverflow.com/a/26018437

http://stackoverflow.com/q/25994547
has answer: http://stackoverflow.com/a/25994603
has comment: http://stackoverflow.com/comment/40707324
accepted answer: http://stackoverflow.com/a/25994603
has comment: http://stackoverflow.com/comment/40707809
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40707247
favorite count: 0
has comment: http://stackoverflow.com/comment/40708225
answer count: 5
has answer: http://stackoverflow.com/a/25994969
has title: how to access to "$(this)" object from event handler passed to "on" method?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40707128
has answer: http://stackoverflow.com/a/25994626
downvote count: 0
has answer: http://stackoverflow.com/a/25994588
has comment: http://stackoverflow.com/comment/40707968
type: Question
has body: When Event Handler set a not anonymous function, then error occurred by accessing to $(this) object. function TextBoxChangeEventHandler(id) { var value = $(this).val(); //...do something } $("#object_position :input[type='text']") .on("change", function(){TextBoxChangeEventHandler("id");}); //other some object set TextBoxChangeEventHandler... Error log: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined jquery-2.1.1.min.js:4 Is there a workaround?
possible better answer: http://stackoverflow.com/a/25994588
score: 1
has answer: http://stackoverflow.com/a/25994622

http://stackoverflow.com/a/25955719
has comment: http://stackoverflow.com/comment/40637064
has body: You're calling push(), which generates a unique key and child location. What you want to do is call set(), which will add the data at that location. var createGroup = function() { var newGroup = groupRef.push({ "Name" : newGroupName.val() }); var groupID = newGroup.name(); var owner = groupRef.child(groupID).set({ // &lt;-- change to set "Name" : currentUser }); };
answers question: http://stackoverflow.com/q/25955016
type: Answer
accepted answer of: http://stackoverflow.com/q/25955016
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25924970
has comment: http://stackoverflow.com/comment/40583304
tagged with: calculator
has comment: http://stackoverflow.com/comment/40648977
has answer: http://stackoverflow.com/a/25925118
type: UnansweredQuestion
has body: I'm guessing the onload function is not properly implemented. Entering numbers or letters do not get the appropriate error or calculation response. This is my code as of now: http://jsfiddle.net/907yn57r/ var $ = function (id) { return document.getElementById(id); } var calculateTaxAndTotals = function () { var taxRate = parseFloat($("taxRate").value); //The tax rate, as a percentage (e.g. 8.5) var subTotal = parseFloat($("itemPrice").value); //An item price ex $5.95 $("salesTax").value = ""; $("totalItemCost").value = ""; if (isNaN(taxRate) || taxRate &lt;= 0) { document.taxCalc.taxRate.focus(); document.$("taxRateMessage").firstChild.nodeValue = "Please enter a valid value."; } else if (isNaN(itemPrice) || itemPrice &lt;= 0) { document.$("priceMessage").firstChild.nodeValue = "Please enter a valid value."; } else { var salesTax = subTotal * (taxRate / 100); var totalItemCost = salesTax + itemPrice; $("orderTotal").focus(); alert(totalItemCost); } } window.onload = function () { calculateTaxAndTotals(); }
has comment: http://stackoverflow.com/comment/40584252
type: Question
has comment: http://stackoverflow.com/comment/40583835
has comment: http://stackoverflow.com/comment/40583631
has comment: http://stackoverflow.com/comment/40583214
tagged with: javascript
has comment: http://stackoverflow.com/comment/40583338
score: 0
has title: javascript 101: sales tax calculator does not respond to data entry
answer count: 1

http://stackoverflow.com/comment/40550282
has text: Your form is right now getting posted to same page without making the ajax call. Is it your case like you want to make an ajax call to `demo.php` and make the form to post to itself? Both actions are required?
type: QuestionComment
comment on: http://stackoverflow.com/q/25906987
type: Comment
score: 0

http://stackoverflow.com/comment/40706300
type: AnswerComment
type: Comment
has text: Yes, I think.. :) Maybe you can use "mousemove" event of body element as an "user interaction".
comment on: http://stackoverflow.com/a/25980833
score: 1

http://stackoverflow.com/comment/40758397
type: AnswerComment
has text: Martin, this works great, the table cell resembles that of the first text entered in the first text area but now the end result has alful &nbsp;'s in front of my text appearing in the second textarea. Anyway to also convert them into proper text spacing?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26022307

http://stackoverflow.com/comment/40708770
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25995263
has text: For that you can simply use jQuery.

http://stackoverflow.com/comment/40529447
score: 0
comment on: http://stackoverflow.com/q/25895593
type: QuestionComment
type: Comment
has text: Doesn't look like a valid regex to me, you probably should escape the `/` ?

http://stackoverflow.com/q/25895695
has title: AJAX Fires Error No Response Text
accepted answer: http://stackoverflow.com/a/25896523
upvote count: 1
type: AnsweredQuestion
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25896523
tagged with: ajax
has body: I have an API I am calling, all is well. I receive the token and the status code returned is a 200 (verified in Fiddler). What I am stuck on is, the AjaxError fires, but the responseText is empty. Also, complete fires successfully. I believe the label is populating, however a Postback or something is erasing it. I will see the value post to the label then disappear (some of the time). This is pure JS and HTML nothing else is being used. What gives? $(document).ajaxComplete(function (event, xhr, options) { alert("HEEEY COMPLETE"); $("#tokenLabel").html("XXXXX"); }); $(document).ajaxError(function (event, xhr, options) { alert(xhr.responseText); }); $('#SubmitButton').click(function () { var userName = $("#userNameTextBox").val(); var passWord = $("#passwordTextBox").val(); populateCreds(userName, passWord); login(); }); function populateCreds(userName, passWord) { creds = { "Username": userName, "Password": passWord }; } // Login function login() { return $.ajax({ type: "POST", url: "http://localhost/APIService/api/token", dataType: "json", contentType: "application/json", processData: false, data: JSON.stringify(creds), success: function (xhr) { console.log(xhr.tokenValue); } }); }
answer count: 1
score: 1
favorite count: 0

http://stackoverflow.com/q/26007030
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/31107000
has comment: http://stackoverflow.com/comment/40730819
tagged with: visual-studio-cordova
type: UnansweredQuestion
tagged with: oracle-database
has body: Opening a sample Javascript project created by Microsoft, I get the error message: "Oracle Java SDK A more recent version of this software is required" I click on requirements link, then I accept Oracles download requirements. I download the x86 version (per Microsoft), though I have the newest 64-bit machine. I run it but no change, same error message. What am I missing in this process? Thanks for your help.
has comment: http://stackoverflow.com/comment/40731759
has comment: http://stackoverflow.com/comment/40730993
tagged with: visual-studio-2013
tagged with: java
type: Question
has title: Visual Studio 2013 Enterprise: Oracle Java SDK A more recent version of this software is required
tagged with: javascript
has answer: http://stackoverflow.com/a/27113659
has answer: http://stackoverflow.com/a/30673124

http://stackoverflow.com/a/26030530
answers question: http://stackoverflow.com/q/26028209
has comment: http://stackoverflow.com/comment/40997294
has comment: http://stackoverflow.com/comment/41021391
has comment: http://stackoverflow.com/comment/41019048
has comment: http://stackoverflow.com/comment/41019674
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40921045
has comment: http://stackoverflow.com/comment/41022349
has comment: http://stackoverflow.com/comment/40913905
has body: I already have a demo set up for that here $( function() { // using .on() which requires jQuery 1.7+ $( 'table' ).on( 'tablesorter-initialized', function() { // class name to add on tr when checkbox is checked var highlightClass = 'checked', // resort the table after the checkbox is modified? resort = true, // if a server side database needs to be updated, do it here serverCallback = function( table, inputElement ) {}, $table = $( this ), c = this.config, wo = c &amp;&amp; c.widgetOptions, // include sticky header checkbox; if installed $sticky = c &amp;&amp; wo.$sticky || '', doChecky = function( c, col ) { $table .children( 'tbody' ) .children( 'tr:visible' ) .children( 'td:nth-child( ' + ( parseInt( col, 10 ) + 1 ) + ' )' ) .find( 'input[type=checkbox]' ) .each( function() { this.checked = c; $( this ).trigger( 'change' ); }); }; $table .children( 'tbody' ) .on( 'change', 'input[type=checkbox]', function() { // ignore change if updating all rows if ( $table[0].ignoreChange ) { return; } var col, $this = $( this ); $this.closest( 'tr' ).toggleClass( highlightClass, this.checked ); $this.trigger( 'updateCell', [ $this.closest( 'td' ), resort ] ); // if your server side database needs more parameters, add them here sent to the callback serverCallback( $table[0], this ); // uncheck header if any checkboxes are unchecked if ( !this.checked ) { $table.add( $sticky ).find( 'thead input[type=checkbox]' ).prop( 'checked', false ); } }) .end() .add( $sticky ) .find( 'thead input[type=checkbox]' ) // Click on checkbox in table header to toggle all inputs .on( 'change', function() { // prevent updateCell for every cell $table[0].ignoreChange = true; var c = this.checked, col = $( this ).closest( 'th' ).attr( 'data-column' ); doChecky( c, col ); // update main &amp; sticky header $table.add( $sticky ).find( 'th[data-column=' + col + '] input[type=checkbox]' ).prop( 'checked', c ); $table.children( 'tbody' ).children( 'tr:visible' ).toggleClass( highlightClass, c ); // update …
type: Answer
has comment: http://stackoverflow.com/comment/40997149
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/41019022
has comment: http://stackoverflow.com/comment/40907630
has comment: http://stackoverflow.com/comment/40907738
accepted answer of: http://stackoverflow.com/q/26028209

http://stackoverflow.com/comment/40769963
type: QuestionComment
score: 0
has text: http://stackoverflow.com/questions/6263539/how-to-set-a-collections-url
comment on: http://stackoverflow.com/q/26026641
type: Comment

http://stackoverflow.com/comment/40554934
type: Comment
type: QuestionComment
has text: @LarsKotthoff: that's simply it!! thanks
comment on: http://stackoverflow.com/q/25905671
score: 0

http://stackoverflow.com/q/25997355
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26002476
type: Question
answer count: 6
has answer: http://stackoverflow.com/a/25997391
has body: My html, &lt;div id="parent"&gt; &lt;div id="child"&gt; &lt;/div&gt; &lt;/div&gt; css looks like, #parent{ height:100px; width:200px; any-aother-property1:something; any-aother-property2:something; any-aother-property3:something; } Is there is any way to inherit all the properties to child at once , means can I do like, $('#child').properties= $('#parent').properties
has title: Inherit all css properties from parent div to child div
score: 18
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/58319411
has answer: http://stackoverflow.com/a/46533865
has answer: http://stackoverflow.com/a/25997411
upvote count: 18
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25997507

http://stackoverflow.com/q/25943018
downvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/25943069
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: deferred
tagged with: promise
has title: jQuery Promises and Deferred, confusion
accepted answer: http://stackoverflow.com/a/25943069
has body: I thought I'd finally got my head around promises but it seems I'm straying a little. Can anyone put me out of my misery and explain what I'm doing wrong here: t010 = { myGet: function(url) { var result = new $.Deferred(); result.resolve(ajaxRequest(url)); } } Which is then called by my main method as so: $.when(t010.myGet(seatId), t010.myGet(roomId)).then(function(d1, d2) { console.log(d1); } I just console log undefined every time. I think what i'm trying to achieve is fairly obvious, I want to call myGet twice and when both are complete do something with the results. Thanks all!
upvote count: 1

http://stackoverflow.com/a/26005918
has body: Just use a regular jQuery selector to find the desired tag, call get(0) on the result of that selector, and get the property pathname from the returned element. For example, the HTML you provided here has only one tag, so it's pretty trivial to select it: $('a').get(0).pathname Obviously, in a more complex document, the jquery selector will be a bit more detailed than $('a'). To change all literal '.' (dots) into '-' (dashes), just use normal JS string replacement: $("div.collection-name a").get(0).pathname.replace('.', '-') works just fine, as you can see from the example code snippet embedded in this answer; further assistance would require you explaining how what has been provided fails to meet your expectation. console.log($("div.collection-name a").get(0)) $("#found").text( $("div.collection-name a").get(0).pathname.replace('.', '-') ); Wool Found the value:
answers question: http://stackoverflow.com/q/26005769
has comment: http://stackoverflow.com/comment/40733767
accepted answer of: http://stackoverflow.com/q/26005769
has comment: http://stackoverflow.com/comment/40729427
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40729094
type: Answer
score: 0

http://stackoverflow.com/comment/40501178
comment on: http://stackoverflow.com/a/25879656
type: Comment
score: 0
type: AnswerComment
has text: I thought of this but boy would it be a lot of work. I suppose it's necessary work, though. And I have to agree, that is a neat feature; beats jsfiddle links.

http://stackoverflow.com/comment/40656358
comment on: http://stackoverflow.com/q/25966191
type: QuestionComment
score: 0
has text: `if (/[^0-9]/.test(temp)) { /* failed validation */ }`
type: Comment

http://stackoverflow.com/comment/40758141
score: 0
comment on: http://stackoverflow.com/q/26022160
type: Comment
type: QuestionComment
has text: Even if I remove `var`, I am getting the error: `io.listen(server); ReferenceError: io is not defined`

http://stackoverflow.com/comment/40762626
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26024239
has text: It doesn't reassign the class after the next click?

http://stackoverflow.com/comment/40771894
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26029558
has text: +1 I didn't even know `aaa:"bbb"` was valid js syntax. Also don't mix up JSON (which is a data interchange format) with JavaScript syntax like object literals and such.

http://stackoverflow.com/a/25947819
answers question: http://stackoverflow.com/q/25947399
upvote count: 1
score: 1
has body: Change the script part with this piece of code.... you need to call ev.preventDefault(); before ajax call.... &lt;script type="text/javascript"&gt; var frm = $('#form'); frm.submit(function (ev) { ev.preventDefault(); $.ajax({ type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), success: function (data) { alert('ok'); } }); }); &lt;/script&gt;
downvote count: 0
type: Answer

http://stackoverflow.com/a/25877779
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25877396
answers question: http://stackoverflow.com/q/25877396
type: Answer
has body: There is no events firing when changing value programmaticaly. AngularJS can do this by using it's watch methods. You can slightly modify your code to this: View events events: { //other event handlers "change td input#purchasePayment": "updatePurchasePay" }, There is no way of triggering oninput event programmaticaly (but you can try by reading this post), so you can trigger change event. And your sagnalr client code: chat.client.addNewMessageToPage = function (message) { $('#purchasePayment').val(message).change(); $('#purchasePayment').text(message); }

http://stackoverflow.com/q/25964593
has comment: http://stackoverflow.com/comment/40653634
has body: I have an ajax script on index.html to retrieve content from content.php every 60 seconds and fill it into corresponding spans: repeatAjax(); function repeatAjax(){ jQuery.ajax({ type: "POST", url: 'content.php', dataType: 'json', success: function(resp) { jQuery('div.out1').html(resp[0]); jQuery('div.out2').html(resp[1]); jQuery('div.out3').html(resp[2]); }, complete: function() { setTimeout(repeatAjax,60000); //After completion of request, time to redo it after a second } }); } and the content.php: $volume1=1; $speed1=2; $progress1=3; $data1=array($progress1,$speed1,$volume1); echo json_encode($data1); and my html looks like: test test test For some reason ajax is not working and text doesn't get changed in target spans. I know that array $data1 in content.php is true, so it gets stuck somewhere on ajax part. Please help! Here I tried to setup jsfiddle, not sure if this is correct, never set up it for ajax before.
answer count: 0
has comment: http://stackoverflow.com/comment/40653751
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40653271
has comment: http://stackoverflow.com/comment/40653173
tagged with: php
has title: Ajax timed reload of php page and populating data
has comment: http://stackoverflow.com/comment/40653525
has comment: http://stackoverflow.com/comment/40653229
type: Question
has comment: http://stackoverflow.com/comment/40653466
has comment: http://stackoverflow.com/comment/40653257
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40653814
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40653320
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40653122

http://stackoverflow.com/comment/40712859
has text: I see where you're coming from now and have updated my answer accordingly.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25997163

http://stackoverflow.com/a/25997391
score: 1
has comment: http://stackoverflow.com/comment/40712690
has body: As far as I know there is no such a thing but you can always do something like this: #parent, #child{ height:100px; width:200px; any-aother-property1:something; any-aother-property2:something; any-aother-property3:something; } Add both id's to have the same properties.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25997355
downvote count: 0

http://stackoverflow.com/q/25992970
has comment: http://stackoverflow.com/comment/40704602
has body: Here is what I'm trying to do.... function myFunction() { var x=jConfirm('Can you confirm this?', 'Confirmation Dialog', function (r) { y=r; alert(y); }); alert(x); } Why does alert(x) runs first(I'm beginner in javascript) and it alerts "undefined", and after I press Ok it alerts "True", and "False" when I press Cancel..? Is there any way I can make jConfirm return true or false...ie x to be trur or false? I'm using the "http://abeautifulsite.net/" plugin for jConfirm.
has answer: http://stackoverflow.com/a/25993039
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40704642
score: 0
type: Question
has title: jConfirm doesn't return true or false
tagged with: javascript
tagged with: jconfirm
answer count: 1
has comment: http://stackoverflow.com/comment/40704606
linked to: http://stackoverflow.com/q/14220321

http://stackoverflow.com/comment/40767160
type: QuestionComment
score: 3
has text: This might help you out. http://stackoverflow.com/questions/16201656/how-to-swap-two-variables-in-javascript
comment on: http://stackoverflow.com/q/26026868
type: Comment

http://stackoverflow.com/comment/40826614
score: 3
comment on: http://stackoverflow.com/q/26015471
type: Comment
type: QuestionComment
has text: @NickMaroulis - This simply isn't possible. The browser dictates how a link is handled if you are putting restrictions on a popup window (width, height, hide address bar, etc.). Thus, it will be a matter of the user having their browser configured to open new windows in a new tab. There just isn't anyway to force a tab over a window, not yet. As for making an `iframe` link register as having happened outside the frame, you can make a pseudo frame to emulate the functionality of an `iframe` while maintaining standard page functionality.

http://stackoverflow.com/comment/40538981
has text: No, but try this caveman idea since you don't have too many divs....in the each() function insert alert($(this).attr("class")); See if the class .on is actually applied to all div elements and is alerted
score: 0
comment on: http://stackoverflow.com/a/25900587
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25933242
answers question: http://stackoverflow.com/q/25933064
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: Hope you are getting value in from_value. Then you could try this $("#from_value").change(function() { var from_value = $("#from_value").val(); var opts = ''; for(var i = from_value; from_value <=10; i++) { opts = opts+' ' + i + ' '; } $("div.to_value").html(' To Value ' + opts + ' '); });

events
tags question: http://stackoverflow.com/q/25987208
tags question: http://stackoverflow.com/q/26016354
tags question: http://stackoverflow.com/q/25929863
tags question: http://stackoverflow.com/q/25983608
tags question: http://stackoverflow.com/q/25925266
tags question: http://stackoverflow.com/q/25925677
tags question: http://stackoverflow.com/q/26006523
tags question: http://stackoverflow.com/q/25962562
tags question: http://stackoverflow.com/q/26003055
tags question: http://stackoverflow.com/q/25899698
tags question: http://stackoverflow.com/q/25920511
tag name: events
tags question: http://stackoverflow.com/q/25880666
tags question: http://stackoverflow.com/q/26007391
tags question: http://stackoverflow.com/q/26006654
tags question: http://stackoverflow.com/q/25981126
tags question: http://stackoverflow.com/q/25936586
type: Tag
tags question: http://stackoverflow.com/q/25956429
tags question: http://stackoverflow.com/q/25945079
tags question: http://stackoverflow.com/q/26020697
tags question: http://stackoverflow.com/q/25963073
tags question: http://stackoverflow.com/q/25908621

http://stackoverflow.com/a/79470069
upvote count: 0
answers question: http://stackoverflow.com/q/25934817
type: Answer
has body: You can use Hoverbee. It's minimal and I developed it inspired by this very thread. In order to stick an element to the cursor (given it is visible in the viewport), you can use following configurations. hoverbee({ element: "div", // a css selector or Element instance strengh: 90, // 100 makes the element move in tandom with the cursor duration: 200, }) body { box-sizing: border-box; min-height: 100vh; display: flex; align-items: center; justify-content: center; font-family: sans-serif; } div { font-size: 5rem; font-weight: bolder; text-transform: uppercase; letter-spacing: -10px; } &lt;script src="https://unpkg.com/hoverbee/hoverbee.min.js"&gt;&lt;/script&gt; &lt;div&gt; Hover me &lt;/div&gt;
downvote count: 1
score: -1

http://stackoverflow.com/a/25944039
type: Answer
has body: getElementsByTagName does not accept CSS selector syntax. You're looking for querySelectorAll but you'll have to iterate over the returned list to assign the style, and it's not completely supported across browsers. ...which is why everyone uses jQuery. Example, assuming you want to modify just the first matched element: document.querySelectorAll(".mainclass .secondaryclass div td")[0].style.color = '#ffffff'; Note the change from : to =, and wrapping the color value in quotes. JavaScript has different syntax from CSS; I suggest that you take some time to learn it.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40617712
downvote count: 0
answers question: http://stackoverflow.com/q/25944022

http://stackoverflow.com/a/26031920
has comment: http://stackoverflow.com/comment/40775932
downvote count: 0
has body: You can't use routeProvider for the old world, since angular routes only direct you within the actual same page. You could make a placeholder angular route for each legacy route, then in the controller, inject $window and do something like: $window.location.href = destinationUrl; Something like: (go to the old world on logout) app.controller('LogoutCtrl', function ($scope, $window) { var destinationUrl = 'https://mywebsite.com/'; $window.location.href = destinationUrl; }); Vice versa, to go back to the angular world, just use a normal link to your angular route: Link If you want a catch-all route to redirect to the outside, you can do the following: otherwise({ controller: 'NotFoundCtrl' }); ... app.controller('NotFoundCtrl', function($scope, $location, $window) { var path = $location.path(); $window.location.href="http://test.com" + path; })
has comment: http://stackoverflow.com/comment/40776971
has comment: http://stackoverflow.com/comment/40776137
type: Answer
answers question: http://stackoverflow.com/q/26031748
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40776110

http://stackoverflow.com/comment/40624702
comment on: http://stackoverflow.com/q/25948725
score: 0
type: Comment
type: QuestionComment
has text: It works for me, what's the matter?

titanium
type: Tag
tags question: http://stackoverflow.com/q/25973128
tag name: titanium
tags question: http://stackoverflow.com/q/25904932
tags question: http://stackoverflow.com/q/25931762
tags question: http://stackoverflow.com/q/25939287
tags question: http://stackoverflow.com/q/25986705
tags question: http://stackoverflow.com/q/25927055
tags question: http://stackoverflow.com/q/25896759

http://stackoverflow.com/comment/40580066
type: QuestionComment
comment on: http://stackoverflow.com/q/25923157
type: Comment
has text: http://jsfiddle.net/oz62o2yd/3/ <- here is the second link I meant to post but couldnt due to the fact I have 1 rep
score: 0

http://stackoverflow.com/comment/40509098
type: QuestionComment
has text: try to paste code with proper formatting.
score: 0
comment on: http://stackoverflow.com/q/25884322
type: Comment

http://stackoverflow.com/a/25986779
answers question: http://stackoverflow.com/q/25986733
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25986733
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40694067
has comment: http://stackoverflow.com/comment/40694122
has body: You can use the loop.index and if condition like {% for usermembershiptype in usermembershiptypes %} {{ usermembershiptype.description}} ${{ usermembershiptype.price }}/year {% if loop.index == 1 %} {% else %} {% endif %} {% endfor %} Note: not tested Using loop.first {% for usermembershiptype in usermembershiptypes %} {{ usermembershiptype.description}} ${{ usermembershiptype.price }}/year {% if loop.first %} {% else %} {% endif %} {% endfor %}

http://stackoverflow.com/q/25926048
type: UnansweredQuestion
has title: Prevent scrolling but allow swipe event in JQuery
has comment: http://stackoverflow.com/comment/40585419
answer count: 0
has comment: http://stackoverflow.com/comment/40585333
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/40585394
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40585304
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40585243
has body: I'm working on a mobile version of a webpage, and one of the features we have is a slide out sidebar. On my Android device, when the sdiebar is visible it is still possible to scroll the background using the part of the body that's still visible. To solve this, I disable scrolling on the page using: $(document).bind('touchmove', function (e) { e.preventDefault(); }); When the sidebar is opened, and then unbind it when the sidebar is closed. Recently I wanted to try and add in the ability to swipe and close the sidebar. Using jQuery Mobile functionality, I subscribed tot he swipeleft event like so: $(document).on("swipeleft", swipeLeftHandler); function swipeLeftHandler(event) { if (isSidebarOpen()) { toggleSidebar(); } } I'm intentionally subscribing to the entire page since it doesn't matter where they swipe. This doesn't work when I'm preventing touchmove, but does when I remove that code. Obviously the downside to that is that a user can still scroll the main page behind the sidebar. To implement the sidebar, I'm using the JQuery slide event and have it inside a div that's floating to the left and has a fixed position. Is there any way I could disable scrolling but still allow for the swipeleft event to work?

http://stackoverflow.com/comment/40704568
comment on: http://stackoverflow.com/a/25992797
type: Comment
has text: @Jimi no, sorry, could you please give me an example? I thought that the number in the parenthesis was supposed to be the number of items that have that property... There are 2 items that 'have chicken', therefore 2... And 2 that 'have bakery', that's why the other 2... Could you please give me an example of what you want? Thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/q/25989098
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27426324
tagged with: node-webkit
tagged with: node.js
has title: Node-webkit: ReferenceError: _ is not defined
score: 1
upvote count: 1
type: Question
answer count: 2
has body: When I try to run my app with node-webkit I have error: Node-webkit: ReferenceError: _ is not defined. I think it is about Lo-dash, but on browser everything work fine. Here is my index.html code: In components.min.js i have all components I need - lodash, angular etc. When I run it by browsers or appJS i haven't any error, only on node-webkit.
tagged with: javascript
has answer: http://stackoverflow.com/a/25996825
tagged with: webkit
downvote count: 0

http://stackoverflow.com/comment/40720326
score: 0
type: Comment
has text: Example updated to have quick 5 number zip as well: http://jsfiddle.net/4xbv0tgL/18/ -- This is obviously not production zip validation, but a quick example to show how different directives can be used for validation. To take it a step further, you could make a helper function to return the linking function for you where you can pass it formatter and parser functions, but that might be overkill.
comment on: http://stackoverflow.com/a/25980772
type: AnswerComment

http://stackoverflow.com/q/26017567
has answer: http://stackoverflow.com/a/26019632
has title: Open "small" browser from Outlook
type: Question
tagged with: browser
tagged with: outlook
possible better answer: http://stackoverflow.com/a/26019544
tagged with: .net
tagged with: javascript
score: 0
answer count: 2
has body: I am going to make an Outlook add-in very soon. It has the option, that if a user press a button, a browser should be opened, and the user should fill out the required forms on the URL. Now I don't imagine it is any problem to open a browser from Outlook itself. But I suppose that if you just open a link, then the whole browser will be loaded up, with all tabs, full size and so on. Is it possible to just open a small browser window, almost like a popup? No tabs or anything. It should just use the users default browser. I hope you understand my question, and can guide me to a solution :)
accepted answer: http://stackoverflow.com/a/26019632
tagged with: outlook-addin
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26019544

http://stackoverflow.com/comment/40734103
type: QuestionComment
has text: http://jsfiddle.net/philcyb/c0wfe7wv/1/ ooops. sorry. incomplete. here's the updated one. forgot to save.
comment on: http://stackoverflow.com/q/26008977
score: 0
type: Comment

http://stackoverflow.com/q/26027042
has comment: http://stackoverflow.com/comment/40767515
score: 0
answer count: 1
has title: drawing clicks on a responsive page comes wrong
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26043026
has comment: http://stackoverflow.com/comment/40767566
type: Question
has body: I built a simple tracker that records the X and Y for each click on an .html page then a function that draws the clicks which work great, the problem is when I resize the screen then well... everything gets messed up of course. I was wondering if anyone has any suggestions on how to do this ? I was thinking about implementing something with .resize : $( window ).resize(function() { var r_width = $( window ).width(); }); To calculate the width of the window then use it ? any ideas or suggestions? kind of stuck and trying to keep moving forward. thanks a lot in advance !!
tagged with: canvas
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40567086
type: QuestionComment
score: 1
has text: Are you sure that `#calendar` is in the DOM when you try to do things with `$('#calendar')`? All the `fullCalendar` calls should be in your view and they should probably be `this.$('#calendar').fullCalendar()` calls in `render` and `remove`.
comment on: http://stackoverflow.com/q/25915779
type: Comment

dom-events
tags question: http://stackoverflow.com/q/26002748
tags question: http://stackoverflow.com/q/25985656
tags question: http://stackoverflow.com/q/25972879
tags question: http://stackoverflow.com/q/25975594
tags question: http://stackoverflow.com/q/25914332
tags question: http://stackoverflow.com/q/26017864
type: Tag
tags question: http://stackoverflow.com/q/26001767
tags question: http://stackoverflow.com/q/25958786
tags question: http://stackoverflow.com/q/25986725
tag name: dom-events
tags question: http://stackoverflow.com/q/25912429
tags question: http://stackoverflow.com/q/25976564
tags question: http://stackoverflow.com/q/25980182

http://stackoverflow.com/q/25937539
tagged with: javascript
answer count: 2
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25937655
has comment: http://stackoverflow.com/comment/40605903
favorite count: 0
type: UnansweredQuestion
score: -3
tagged with: css
has body: How do you move the move the button to the bottom of the page? I tried and its not working. I have tried margin-bottom: 0px; but the button still not move the bottom Fistname *: Password *: Note: Please make sure your details are correct before submitting form and that all fields marked with * are completed! Submit
downvote count: 3
has answer: http://stackoverflow.com/a/25937684
type: Question
has title: Trying to move the submit button to the bottom of the page
has comment: http://stackoverflow.com/comment/40605653

http://stackoverflow.com/a/25940977
has body: In your second example, you're calling checkValue without a parameter, so it's going to return undefined, which is a falsey value, and the callback to each never returns anything. Then again, it doesn't normally need to return anything anyway. _.each returns the list it operates on. _.each is like a for-loop; consider treating it more like one. function checkValue_original1(arr, val) { for (var i = 0; i &lt; arr.length; i++) { if (val == arr[i]) return true; } return false; } function checkValue_original2(arr, val) { return arr.indexOf(val) &gt;= 0; } function checkValue_us_each(arr, val) { var found = false; _.each(arr, function(element, index, list) { if (element == val) found = true; }); return found; }
type: Answer
answers question: http://stackoverflow.com/q/25939947
score: 0

http://stackoverflow.com/q/25945252
type: Question
accepted answer: http://stackoverflow.com/a/25945395
score: 0
has title: Knockoutjs: the $data in foreach binding is not updating underlying element
answer count: 1
tagged with: javascript
has body: I have below js code $(document).ready(function () { var viewModel = { predefinedGrades: [ ko.observable("Excellent"), ko.observable("Good"), ko.observable("OK"), ko.observable("Average"), ko.observable("Bad")], observable: ko.observable("good") }; ko.applyBindings(viewModel); }); Below is my view &lt;div data-bind="foreach: predefinedGrades"&gt; &lt;input type="text" data-bind="value: $data, valueUpdate: 'keyup'"/&gt; &lt;/div&gt; &lt;input type="text" data-bind="value: observable, valueUpdate: 'keyup'"/&gt; The problem is that when I update the text in the input of foreach binding, the underlying array won't change. But if I change the text with the last text input of the binding observable, the observable field can change after keyup event. How so? What am I missing?
has answer: http://stackoverflow.com/a/25945395
type: AnsweredQuestion
tagged with: knockout.js

http://stackoverflow.com/comment/40615860
has text: Nvm, got my answer on my last try to search a good keyword.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25942764
score: 0

http://stackoverflow.com/comment/40662988
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25969887
has text: The question is incomplete, how are u sending data?? If say u are trying to send as name value pair, it has to be a json object, it can't be the same as when you call with URL.

http://stackoverflow.com/a/25910831
has body: var url = 'search' $.getJSON(url, The URL is search (which a query string created from the data in the second argument) which will be computed relative to the URL of the document the script is running in. The Net tab of your browser's developer tools will show you the absolute URL being requested.
answers question: http://stackoverflow.com/q/25910804
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25910804

http://stackoverflow.com/comment/40635319
type: QuestionComment
comment on: http://stackoverflow.com/q/25954354
has text: Not sure if this will work, but perhaps you could try pre-pending an empty DOM element, with 0px height, and overflow hidden first; then insert the new content within it (it wont show as the height is at 0px); then increase its height and scroll by 1px at a time to reveal it?
score: 0
type: Comment

http://stackoverflow.com/a/25890240
has body: That looks like you have magic_quotes_gpc on, which drives php to escape some characters of GET, POST and COOKIES (especially quotes) automatically. It's very unlikely that the escaping is done in your Javascript. Have a look at the php-manual: http://php.net/manual/de/security.magicquotes.disabling.php You can disable that feature on server basis and manually in your scripts but that is a bit ugly. The preferable solution is to change your php.ini or to search for such option in your hosting providers panel if you don't have access to the ini-file. Hope i could help
accepted answer of: http://stackoverflow.com/q/25888508
answers question: http://stackoverflow.com/q/25888508
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40519878
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25970461
answers question: http://stackoverflow.com/q/25965351
has body: You are seeing expected behavior. The documentation states, regarding the callback function: If you specify the responseCallback parameter, it should be a function that looks like this: function(any response) {...}; any response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message. There are 3 possible results of sendMessage executing. There was a listener, and it called sendResponse. Then, the callback is called with the response as a parameter. There was a listener, and it terminated without calling sendResponse (synchronously or asynchronously). Then, the callback is not called at all. There was some sort of error sending the message. Then, the callback is called with no arguments and chrome.runtime.lastError set. If you need your callback to execute in any circumstance, you'll need a "default" case in your listeners that calls sendResponse.
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/40664002
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40665505
type: Answer
has comment: http://stackoverflow.com/comment/40674678
accepted answer of: http://stackoverflow.com/q/25965351
has comment: http://stackoverflow.com/comment/40674846

http://stackoverflow.com/q/25905287
has body: ons okt 01 2014 10:00 AM This is wed oct 01 2014 10:00 AM in danish language. var dt = new Date("ons okt 01 2014 10:00 AM"); the above line gives me "invalid date". What to do to get proper date in dt variable?
accepted answer: http://stackoverflow.com/a/25905593
has title: Danish date to new DATE()
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25905593
type: Question
has answer: http://stackoverflow.com/a/25905607
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25905607

http://stackoverflow.com/comment/40576301
type: QuestionComment
has text: What for? I send html content to another servlet that gives me it back as pdf
comment on: http://stackoverflow.com/q/25920541
score: 0
type: Comment

http://stackoverflow.com/a/52592326
has comment: http://stackoverflow.com/comment/92125655
answers question: http://stackoverflow.com/q/25938560
has body: Native solution in Java8 Date.from(ZonedDateTime.parse("1994-11-05T08:15:30+05:30").toInstant()) Date.from(ZonedDateTime.parse("1994-11-05T13:15:30Z").toInstant())
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/92175144
type: Answer
has comment: http://stackoverflow.com/comment/92175559
upvote count: 2

http://stackoverflow.com/q/25922382
score: 0
answer count: 1
tagged with: editorfor
tagged with: asp.net-mvc-5
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
accepted answer: http://stackoverflow.com/a/25923373
type: AnsweredQuestion
has body: I am developing an ASP.NET 4.0 (.NET 4.5) web application with MVC 5 / Razor 3, Bootstrap 3.x. In this particular controller I make use of the Google Maps API v3. Basically among many other things I have two textboxes, one for Latitude the other for Longitude. Then I also have a Google Map with ONE marker. When the user right clicks on a spot I want the current click Lat/Long to be set for the marker and update the Lat/Long textboxes and center the map there. When the user drags the marker to a new location the same thing should happen, both textboxes get updated with the new marker location. Other than having added the Google Map, the rest of the form is exactly the same as the Visual Studio "Add View with EF CRUD" template. Now the problem... The textbox control code created by the VS template does not let you set a control ID that I can use with the jQuery/Javascript code to update the textboxes but all the map behaviour (marker replacement, centering, etc.) works: @Html.EditorFor(model =&gt; model.longitude, new { htmlAttributes = new { @class = "form-control" } }) Somewhere in this site someone suggested another person to use TextBoxFor instead of EditorFor which appears to let you specify an ID for the textboxes. However, that renders both textboxes in standard form which is totally discordant with the look of the other textboxes. So I then opted for another suggestion to replace that code for this: @Html.EditorFor(model =&gt; model.latitude, null, "mylatitude", new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model =&gt; model.latitude, "", new { @class = "text-danger" }) @Html.EditorFor(model =&gt; model.latitude, null, "mylongitude", new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model =&gt; model.longitude, "", new { @class = "text-danger" }) With this form the textboxes look like the others AND when I move the marker or right click the latitude/longitude textboxes get updated with t…
type: Question
has title: Html.EditorFor with textbox ID for use in jQuery
has answer: http://stackoverflow.com/a/25923373

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/26027307
tags question: http://stackoverflow.com/q/25943769

http://stackoverflow.com/a/25954193
has body: After reviewing the most popular github js repositories (> 300 stars) I found that the following lib/frameworks could meet the following constraints: Use data-* to bind js Play wells with Jquery Has strong community support Ideally can be used in unobtrusive ways but I am not 100% sure about this. The list is: Knockout (http://knockoutjs.com/documentation/binding-syntax.html) - 5 457* stars on Github Backbone + Epoxy.js (http://epoxyjs.org/index.html) - 477* stars on Github Rivets.js (http://rivetsjs.com/) - 1 820* stars on Github intercooler.js (http://intercoolerjs.org/) - 372* stars on Github *As of 21/09/2014. From what I've seen Knockout is very well documented and is a good start for beginning with JS framework/libraries.
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25942756
accepted answer of: http://stackoverflow.com/q/25942756

http://stackoverflow.com/comment/40613713
comment on: http://stackoverflow.com/q/25941185
score: 0
type: Comment
type: QuestionComment
has text: So its only 'style'?

http://stackoverflow.com/comment/48303741
comment on: http://stackoverflow.com/a/27194032
type: AnswerComment
type: Comment
has text: I think it would work since I'm not using original image width and height in pan calculations, they are recalculated after the image is zoomed out/in.
score: 0

http://stackoverflow.com/a/26035862
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25982103
score: 2
answers question: http://stackoverflow.com/q/25982103
has comment: http://stackoverflow.com/comment/40783904
upvote count: 2
type: AcceptedAnswer
has body: There is no such option, according to the documentation and a lot of similar questions here on the stackoverflow, you can't bind click action to waypoints. I have a workaround for that problem. The main idea is to add markers instead of waypoints and change their icon. Marker has much more options than waypoint. So I removed waypoints and added markers. Note that you have to be much more precise when adding marker's location options without waypoints: options: {origin: {lat:49.9, lng: 14.9}, destination: {lat: 50.1, lng: 15.1}, travelMode: google.maps.DirectionsTravelMode.DRIVING }, added markers with a new icon and click event: marker:{ values:[ {latLng:[49.96485, 14.88392], data:"Waypoint1", options:{icon: "http://mt.google.com/vt/icon/name=icons/spotlight/directions_transfer_icon_10px.png&amp;scale=1"}}, {latLng:[49.97730, 14.88185], data:"Waypoint2", options:{icon: "http://mt.google.com/vt/icon/name=icons/spotlight/directions_transfer_icon_10px.png&amp;scale=1"}} ], options:{ draggable: false }, events:{ click: function(marker, event, context){ var map = $(this).gmap3("get"), infowindow = $(this).gmap3({get:{name:"infowindow"}}); if (infowindow){ infowindow.open(map, marker); infowindow.setContent(context.data); } else { $(this).gmap3({ infowindow:{ anchor:marker, options:{content: context.data} } }); } } } } Here is my workaround for that problem : DEMO
type: Answer

http://stackoverflow.com/q/25929353
favorite count: 0
has answer: http://stackoverflow.com/a/25929555
upvote count: 2
has answer: http://stackoverflow.com/a/25929422
has answer: http://stackoverflow.com/a/25930204
has title: JavaScript action function as parameter
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25929422
has body: I've created a function that loops through an objects members, and their arrays as a separate function to be used as a util. In this function I would like to use a parameter; let's call it action, that is a reference to another function that manipulates strings, in the arrays of the object members being looped. For instance I override String, using String.prototype.functionThatDoesSomething, so I can use it in the loop: arrayOfStrings[i].functionThatDoesSomething(). How would I pass a function like that into the util function as an argument? Something like this is what I am after: objLoop(myObj, String.prototype.functionThatDoesSomething); function objLoop(obj, action) { var modData = {}; var list = []; for (var key in obj) { list = obj[key]; var i, n = list.length; for (i=0; i&lt;n; i+=1) { list[i] = list[i].action(); // e.g. functionThatDoesSomething() } modData[key] = list; } return modData; }
accepted answer: http://stackoverflow.com/a/25929555
type: Question
tagged with: overriding
tagged with: function-parameter
tagged with: javascript
answer count: 3
downvote count: 0

http://stackoverflow.com/q/25939361
has body: Can I have a option between two template URL. Something like : angular.factory('SAMPLE',function(){ return { getnDetails:function($http){ return $http({ method: 'GET', url: url }); } )}; angular.directive() { controller : function($scope) { SAMPLE. getnDetails().sucess(){ }.error() { templateURL: "zbx.html" } templateUrl : "xyz.html" } such that when my http request is an error load entirely different template. What would be the best way to something like this.
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25939664
tagged with: angular-template
downvote count: 0
score: 1
has title: Optional/multiple template URL in single directive Angular JS
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/33133927
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/40613221
type: Comment
comment on: http://stackoverflow.com/a/25941292
score: 0
type: AnswerComment
has text: a better approach is to wrap the code making change outside of the angular scope in a $timeout with no interval set. This is the recommend way to get a digest to run after change outside scope, in a safe manner.

http://stackoverflow.com/comment/40509786
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25884798
has text: show your html as well
type: Comment

http://stackoverflow.com/q/26022818
has title: How to prevent GWT from obfuscating code/Where to find the GWT Compiler
tagged with: google-chrome
type: Question
tagged with: gwt
accepted answer: http://stackoverflow.com/a/26024090
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40761056
tagged with: java
has comment: http://stackoverflow.com/comment/40761179
has body: I am currently working to find a bug in my code, and upon inspecting element on my browser (FF and GC), I found that the java source code is obfuscated by GWT in order to increase parse speed. From researching online, i found that: If you prefer not to have GWT obfuscate its output, then you can use the -style flag on the GWT Compiler. This flag has one of three possible values: OBF (for obfuscated), the default PRETTY, which makes the output readable to a human DETAILED, which improves on PRETTY with even more detail (such as very verbose variable names) I am wondering where I can find the GWT compiler.
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26024090
has comment: http://stackoverflow.com/comment/40759499

http://stackoverflow.com/comment/40555954
score: 0
comment on: http://stackoverflow.com/q/25910174
type: Comment
type: QuestionComment
has text: @ Royi Namir it's injected with ajax and jquery so I can change this part of code.

http://stackoverflow.com/comment/40638726
score: 0
type: Comment
type: QuestionComment
has text: Fork and finish this: http://jsfiddle.net/mplungjan/zorun1h6/ - add the html in question
comment on: http://stackoverflow.com/q/25956434

http://stackoverflow.com/q/25986726
score: 0
answer count: 1
has body: I have a very simple popup, I would like to set a cookie, so when the visitor visits the page / category for the first time he will be able to see the popup and if he navigates out of the page and comes back, the popup won't appear until he ends the session (closes the browser). Thanks! &lt;script type="text/javascript"&gt; var link; var element; t = setTimeout(openPopUp, 3000); function openPopUp() { element = document.getElementById("background"); element.style.display = "block"; element = document.getElementById("popup"); element.style.display = "block"; } function closePopUp() { element = document.getElementById("popup"); element.style.display = "none"; element = document.getElementById("background"); element.style.display = "none"; } &lt;/script&gt; Edit: From comments: var createCookie = Openpopup(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (60 * 1000)); expires = "; expires = " + date.toGMTString(); } else { expires = ""; } document.cookie = name + "=" + value + expires + "; path=/"; }
accepted answer: http://stackoverflow.com/a/25990529
favorite count: 0
has comment: http://stackoverflow.com/comment/40697142
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4825683
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40694995
has comment: http://stackoverflow.com/comment/40694508
type: Question
has title: Popup cookie once per browser session
tagged with: javascript
has answer: http://stackoverflow.com/a/25990529

http://stackoverflow.com/comment/40742084
type: QuestionComment
has text: @Lankymart: There [is a difference](http://en.wikipedia.org/wiki/JScript), though, purely for the fact that it is server side and can use services and objects on the server. Saying that JavaScript and JScript are the same is like saying that Firefox and Chrome are the same - though they both display the same web pages there are big differences in how they work (I know - an extreme example there, but you know what I mean!). Confusing JScript with JavaScript and attempting to open databases on the client side could be ... interesting!
score: 0
comment on: http://stackoverflow.com/q/26005391
type: Comment

http://stackoverflow.com/comment/40601448
score: 0
type: AnswerComment
type: Comment
has text: Please check my updated answer with the new jsFiddle link. Basically between 500px-750px, the `li:first-child` is assigned the `current` class and after 750px, when I believe your next page would begin, the `li:nth-child(2)` is given the `current` class. Similarly, when you scroll back to the top, the classes are removed when you pass their areas.
comment on: http://stackoverflow.com/a/25934884

http://stackoverflow.com/comment/78955002
comment on: http://stackoverflow.com/a/40789529
has text: Is there any way to use simple click instead of long click for multiple selection ?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/26019788
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/40753671
score: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/26019724
answers question: http://stackoverflow.com/q/26019724
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40753628
has body: Completed ^^^^---- spot the difference Completed. ^^^^--- spot the difference

http://stackoverflow.com/comment/40728234
has text: How could we possibly answer if you don't tell us what `time.position` is?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26005508
type: Comment

http://stackoverflow.com/comment/40498531
type: AnswerComment
has text: This does seem much more elegant, however you do have the 'this.element' compromise.
type: Comment
comment on: http://stackoverflow.com/a/25875585
score: 0

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/26020696

http://stackoverflow.com/comment/40513035
has text: OK, I have now redone the script and understand why you made your suggestions. The load is actually faster and is much smoother thanks so much for going the extra mile! I will post my working code in my question for all to see.
type: Comment
comment on: http://stackoverflow.com/a/25885555
score: 0
type: AnswerComment

http://stackoverflow.com/a/25899416
accepted answer of: http://stackoverflow.com/q/25899336
has body: It's really simple. You need to also use position: relative. Add it to #right-pane and then make #orphan a child of #right-pane. How absolute positioning works is the top and left attributes correlate to the top and left corner of the first non-static parent. That would be #right-pane because we gave it position:relative. Relative positioning doesn't effect flow or change the rendered position unless you add top, left, etc. to it, so our parent isn't effected. We have to change it to relative (or absolute or fixed) because the default is position:static. Hopefully that all makes sense. Demo #right-pane { width:300px; float:left; position: relative; } Edit: I also changed the #orphan style rule to use percent based width and height. You can do that because of the absolute positioning with the relative parent. Both top, left, right, and bottom and width and height become relative to the parent. #orphan { width:100%; height:100%; /* changed width and height to be dynamic */ display:none; background:blue; color:white; }
type: Answer
answers question: http://stackoverflow.com/q/25899336
score: 6
downvote count: 0
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/q/25914449
has answer: http://stackoverflow.com/a/25914535
has title: Unable to get data in foreach in codeigniter
tagged with: php
has body: here is my code in html, i am newbie in codeigniter i dont know what mistake i am making in my code. its a simple query to get records from table. please help me. &lt;?php foreach($records as $r):?&gt; &lt;tr&gt; &lt;td&gt;&lt;?=$r['id']?&gt;&lt;/td&gt; &lt;td&gt;&lt;?=$r['name']?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php endforeach;?&gt; my controller code public function index(){ /*$this-&gt;load-&gt;view('student/student_view');*/ $data['records']=$this-&gt;student_model-&gt;getAll(); $data['student']=0; $this-&gt;load-&gt;view('student/student_view',$data); } and my modal code function getAll(){ $query = $this-&gt;db-&gt;get('stud'); return $query-&gt;result(); }
has answer: http://stackoverflow.com/a/25914568
accepted answer: http://stackoverflow.com/a/25914568
type: AnsweredQuestion
score: 1
tagged with: codeigniter
upvote count: 1
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25914535
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/26022392
tagged with: single-page-application
tagged with: durandal
score: 1
accepted answer: http://stackoverflow.com/a/26025748
has body: How can I build the main-build.js file within a Durandal application? Here is the file that I am referring to: exports.config = function(weyland) { weyland.build('main') .task.jshint({ include:'App/**/*.js' }) .task.uglifyjs({ include:['App/**/*.js', 'Scripts/durandal/**/*.js'] }) .task.rjs({ include:['App/**/*.{js,html}', 'Scripts/durandal/**/*.js'], loaderPluginExtensionMaps:{ '.html':'text' }, rjs:{ name:'../Scripts/almond-custom', //to deploy with require.js, use the build's name here instead insertRequire:['main'], //not needed for require baseUrl : 'App', wrap:true, //not needed for require paths : { 'text': '../Scripts/text', 'durandal': '../Scripts/durandal', 'plugins': '../Scripts/durandal/plugins', 'transitions': '../Scripts/durandal/transitions', 'knockout': 'empty:', 'bootstrap': 'empty:', 'jquery': 'empty:' }, inlineText: true, optimize : 'none', pragmas: { build: true }, stubModules : ['text'], keepBuildDir: true, out:'App/main-built.js' } }); } I already looked at this page (Building with Weyland), but it is insufficient.
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
has title: Building main-build.js within Durandal Application
answer count: 1
downvote count: 0
tagged with: .net
has answer: http://stackoverflow.com/a/26025748
favorite count: 0

http://stackoverflow.com/comment/40684589
type: Comment
comment on: http://stackoverflow.com/q/25981556
score: 0
has text: @Oriol: Yeah, that happens a lot on MDN. I don't know why they don't have tighter control over who can edit. They end up with a good bit of bad information.
type: QuestionComment

http://stackoverflow.com/q/26009967
accepted answer: http://stackoverflow.com/a/26010107
has title: Replace on Array In Jquery without using loop
has body: I have a array on Jquery that have some values .Now i want to replace a character from all the items in the array if it have in the array. var arrayData = [ "Safi Landmark Hotel and Suites", "Safi Landmark Hotel Suites", "Safi Landmark Hotel and Suites" ]; This is my array now i want to replace 'and' from the items with '&amp;' .How can we do this without using loop.
has comment: http://stackoverflow.com/comment/40735848
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26010272
has answer: http://stackoverflow.com/a/26010272
has comment: http://stackoverflow.com/comment/40735904
type: Question
has comment: http://stackoverflow.com/comment/40735944
has answer: http://stackoverflow.com/a/26010107
tagged with: javascript
has comment: http://stackoverflow.com/comment/40735837
score: 0
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/26010131

http://stackoverflow.com/comment/40677800
has text: http://stackoverflow.com/questions/5424488/javascript-search-for-a-string-inside-an-array-of-strings
comment on: http://stackoverflow.com/q/25978100
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/81500839
score: 114
type: AnswerComment
has text: It's also however preventing windows from closing themselves, which *doesn't* seem like a very useful security measure, and I'm relatively sure that's what 99% of the people are finding this about.
type: Comment
comment on: http://stackoverflow.com/a/25937289

http://stackoverflow.com/q/25927333
type: Question
tagged with: sails.js
has body: I want to process AJAX data in my sailsJS app but the ajax post data always stop at pending state here is my code at my view. &lt;script type="text/javascript"&gt; $('#submit').click(function(){ $.ajax({ url: 'users/create', type: 'POST', data: JSON.stringify($('#username').val()), contentType: 'application/json', dataType: 'json', cache: false, success: function(data){ alert('Success!'); } ,error: function(jqXHR, textStatus, err){ alert('text status '+textStatus+', err '+err); } }); }); &lt;/script&gt; and here is the code at my controller var UsersController = { create: function (req, res) { console.log(req); } }; module.exports = UsersController;` do i missed something? i also set the policies to true all over my controller
has comment: http://stackoverflow.com/comment/40587597
has answer: http://stackoverflow.com/a/25938856
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40587552
has title: SailsJS pending ajax post (NodeJS)
tagged with: ajax
score: 0
tagged with: node.js
type: UnansweredQuestion

http://stackoverflow.com/q/25984039
type: Question
has comment: http://stackoverflow.com/comment/40730478
tagged with: masonry
has comment: http://stackoverflow.com/comment/40717845
has answer: http://stackoverflow.com/a/26001691
tagged with: yii
tagged with: javascript
has title: masonry + isotope + imagesLoaded not defined yii
score: 0
has comment: http://stackoverflow.com/comment/40713552
answer count: 1
tagged with: jquery-isotope
has comment: http://stackoverflow.com/comment/40708773
has comment: http://stackoverflow.com/comment/40720959
has body: Hello i´m new to web development. I´m struggling with a JS function using Yii 1.1: isotope-jquery. Trying to show a masonry image gallery with infinite scrolling. If i leave it as it is it works, but when using images they get all overlapped at the end. i should use imagesLoaded, but applying it´s being a pain... Original code: $defaultCallback=" function( newElements ) { /* hide new items while they are loading*/ var newElems = jQuery( newElements ); \$isoContainer.isotope( 'appended', newElems, true ); {$this-&gt;infiniteCallback} }"; Modified: function( newElements ) { /* hide new items while they are loading*/ var newElems = jQuery( newElements ); \$newElems.imagesLoaded(function(){ \$isoContainer.masonry( 'insert', newElems); }); {$this-&gt;infiniteCallback} }" Error on browser console: ["math:", 222, 2853] jquery.infinitescroll.js:171 ["math:", 0, 2853] jquery.infinitescroll.js:171 ["heading into ajax", Array[2]] jquery.infinitescroll.js:171 ["Using HTML via .load() method"] jquery.infinitescroll.js:171 ["contentSelector", div.items.isotope] jquery.infinitescroll.js:171 Uncaught ReferenceError: $newElems is not defined index.php?r=products:112(anonymous function) index.php?r=products:112opts.callback jquery.infinitescroll.js:159infscr_loadcallback jquery.infinitescroll.js:327infscr_ajax_callback jquery.infinitescroll.js:501jQuery.extend.each jquery.js:595jQuery.fn.jQuery.each jquery.js:241jQuery.ajax.complete jquery.js:7465fire jquery.js:974self.fireWith jquery.js:1084done jquery.js:7818callback i´ve tried several things, defining the var inside, passing parameters, but i cannot make it work... probably it´s a newbie issue... thanks for your help
has comment: http://stackoverflow.com/comment/40689119
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26001691
tagged with: yii-extensions
has comment: http://stackoverflow.com/comment/40720763
has comment: http://stackoverflow.com/comment/40710726

http://stackoverflow.com/q/26014190
score: 0
answer count: 2
has title: Translate javascript function in php
has answer: http://stackoverflow.com/a/26014379
tagged with: javascript
linked to: http://stackoverflow.com/q/1732348
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: UnansweredQuestion
has body: I have the following code in jS : function stripHTMLWithLinks(c) { var BodyContents = /([\s\S]*\&lt;body[^\&gt;]*\&gt;)([\s\S]*)(\&lt;\/body\&gt;[\s\S]*)/i ; var h = c.match(BodyContents); if (h != null &amp;&amp; h[2]) { c = h[2]; } c = c.replace(/&lt;a\s.*?href\s*=\s*"(.*?)".*?&gt;(.*?)&lt;\/a&gt;/gi, "$2 [$1]"); c = c.replace(/&lt;a\s.*?href\s*=\s*'(.*?)'.*?&gt;(.*?)&lt;\/a&gt;/gi, "$2 [$1]"); c = c.replace(/\/\/--\&gt;/gi, ""); c = c.replace(/(\n)/gi,""); c = c.replace(/(\r)/gi,""); c = c.replace(/&lt;title[^\&gt;]*\&gt;[\s\S]*\&lt;\/title\&gt;/gi,""); c = c.replace(/&lt;br\s*\/\s*&gt;/gi,"\n"); c = c.replace(/(&lt;\/h.&gt;|&lt;\/p&gt;|&lt;\/div&gt;)/gi, "$1\n\n"); c = c.replace(/&lt;[^&gt;]+&gt;/g,""); c = c.replace(/&amp;lt;/g,"&lt;"); c = c.replace(/&amp;gt;/g,"&gt;"); c = c.replace(/&amp;nbsp;/g," "); return c; } I need a function that will extract the body content. All the examples that I saw here were kinda fixed on a particular example , and i need it on dynamic basis. This function can do it for me, I just need it in php.
has answer: http://stackoverflow.com/a/26014334
type: Question

http://stackoverflow.com/comment/40522228
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25891758
score: 0
has text: I'm not really sure what you are trying to accomplish here. The first block of example code creates an object that is stored in NewVar. The functions you define in that object can than be called, but the returned values will not be set in NewVar, because that is the object containing the functions itself. So if you call var returnedValue = NewVar.myVar(), the value will be set in returnedValue, not in NewVar.

http://stackoverflow.com/comment/40538134
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25900316
has text: @JuanMendes: Well, the OP suggested that wasn't happening, so... But I agree, just looking at it, that's how I'd read that line, yeah. Would be really good to know what the `cc` lib was.
type: AnswerComment

http://stackoverflow.com/comment/40678714
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25977850
has text: I'm probably going to get kicked by someone for this, but have you considered using a ` ` for better compatibility? More sensibly, what about `display:inline-block`?
score: 0

http://stackoverflow.com/q/25891561
has answer: http://stackoverflow.com/a/25892176
tagged with: javascript
has answer: http://stackoverflow.com/a/25891763
upvote count: 2
answer count: 3
has title: javascript countdown timer goes negative
has answer: http://stackoverflow.com/a/25891679
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: timer
type: UnansweredQuestion
tagged with: css
has body: I'm trying to implement a countdown timer on my mobile site using javascript. I've got this but the timer goes into negative, it doesn't stop. I want it to stop at 0:0. JavaScript // set minutes var mins = 5; // calculate seconds var secs = mins * 60; function countdown() { setTimeout('Decrement()',1000); } function Decrement() { if (document.getElementById) { minutes = document.getElementById("minutes"); seconds = document.getElementById("seconds"); // if less than a minute remaining if (seconds &lt; 59) { seconds.value = secs; } else { minutes.value = getminutes(); seconds.value = getseconds(); } secs--; setTimeout('Decrement()',1000); } } function getminutes() { // minutes is seconds divided by 60, rounded down mins = Math.floor(secs / 60); return mins; } function getseconds() { // take mins remaining (as seconds) away from total seconds remaining return secs-Math.round(mins *60); } HTML &lt;div id="timer"&gt; This is only valid for the next &lt;input id="minutes" type="text" style="width: 14px; border: none; background-color:transparent; font-size: 16px; font-weight: bold;"&gt; minutes and &lt;input id="seconds" type="text" style="width: 26px; border: none; background-color:none; font-size: 16px; font-weight: bold;"&gt; seconds. &lt;/div&gt; And I'm also trying to change the font color countdown minute to red but it doesn't seem to change? &lt;input id="minutes" type="text" style="width: 14px; border: none; background-color:transparent; font-size: 16px; **font-color:red;** font-weight: bold;"&gt;
score: 2
downvote count: 0
type: Question

http://stackoverflow.com/a/25958840
upvote count: 2
type: Answer
score: 2
has body: You can use a regular expression in the $httpBackend.expectGet() method: var regex = new RegExp('/service/home/autolaunch\\?rnd=.*'); httpBackend.expectGET(regex).respond(...);
has comment: http://stackoverflow.com/comment/40642740
answers question: http://stackoverflow.com/q/25958733
accepted answer of: http://stackoverflow.com/q/25958733
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40510069
type: AnswerComment
comment on: http://stackoverflow.com/a/25884841
type: Comment
has text: Thanks. I think adding a span is the best. Thanks alot again
score: 0

http://stackoverflow.com/a/26032597
has body: $("#formTest").ajaxForm({ success : function(status) { console.log(status.statusCode); if (status.statusCode == 0) { testRow.find("td").eq(1).text(''); testRow.find("td").eq(2).text(''); testRow.find("td").eq(3).text(''); testRow.find("td").eq(4).text(''); testRow.find("td").eq(1).text($('#testName').val()); testRow.find("td").eq(2).text($('#questionNo').val()); testRow.find("td").eq(3).text($('#testTime').val()); testRow.find("td").eq(4).html('&lt;input type="image" src="../resources/img/icons/edit.png" alt="Edit" onclick="editTest('+status.object.id+'); return false;" /&gt;'); $('#testName').val(''); $('#questionNo').val(''); $('#testTime').val(''); $('#statusMsg').text("Data Updated!"); }else{ $('#statusMsg').text("No Change"); } }, dataType : 'json' }).submit();
score: 0
answers question: http://stackoverflow.com/q/26030489
type: Answer

http://stackoverflow.com/a/25911573
downvote count: 0
answers question: http://stackoverflow.com/q/25889533
has body: Right, what they do in the question you posted in the comments, is just marking a row when it's clicked. That's not really what focus means in webdevelopment... Anyway, they just toggle a css class to achieve the result, like this (click on a table cell to see what it's doing): jQuery(document).ready(function($) { $('td').on('click', function(e) { $(this).toggleClass('focus'); }); }); table { border-collapse: collapse; } td, th { border: 1px solid #000; padding: 5px; } td.focus { background: red; } id name email 1 Pete pete@gmail.com 2 John john@live.com 3 Bill bill@yahoo.com 4 Dave dave@gmail.com
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40559196

http://stackoverflow.com/comment/40579707
comment on: http://stackoverflow.com/q/25922040
has text: Use a local css file
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25930017
type: Answer
has body: I'd go with $.ajax( ... data: {data: JSON.stringify({1: a, 2: b, 3: c, 4: d};)} ) And then on the server side I'd use json_decode function to get the data
score: 0
answers question: http://stackoverflow.com/q/25929874

http://stackoverflow.com/q/25961143
upvote count: 3
type: Question
has title: Why does the difference of two rounded numbers not respected the rounded values in JavaScript?
tagged with: rounding
has comment: http://stackoverflow.com/comment/40646799
tagged with: javascript
linked to: http://stackoverflow.com/q/588004
has comment: http://stackoverflow.com/comment/40646803
downvote count: 0
tagged with: subtraction
has body: I created a round function and it works fine in simple rounding. If I round two numbers A and B, and then I add them, the result is fine. But, if I "subtract" them, the result is weird. It is not rounded like it should. I show you the function: function round(x, p) { return parseFloat(x.toFixed(p)); }; Weird result: var a = 5.0007; var b = 2.048 var result = round(5.0007, 3) - round(2.048, 2); // expected result: 2.951 // obtained result: 2.9510000000000005 Here is a JSFiddle! Would you please help me understand why this subtraction shows a weird result? Thanks
favorite count: 0
has comment: http://stackoverflow.com/comment/40646917
type: UnansweredQuestion
tagged with: addition
duplicate of: http://stackoverflow.com/q/588004
score: 3
answer count: 0
has comment: http://stackoverflow.com/comment/40646724

http://stackoverflow.com/comment/40605898
comment on: http://stackoverflow.com/a/25899589
score: 0
type: Comment
type: AnswerComment
has text: @CristianBenítez If it worked don't forget to accept the answer, so people know that your problem is solved.

http://stackoverflow.com/q/25874590
type: Question
tagged with: java
has title: Phonegap Java call to Javascript
score: 0
has body: I'm using Phonegap to develop an app. I've downloaded a camera plugin, however, I'd like to make a Javascript call from within the plugin. In the Java file for the camera plugin I have done the following; private class sendJS extends CordovaActivity { public void sendcommand() { this.sendJavascript("alert('1337')"); } } @Override public void onClick(View v) { sendJS test = new sendJS(); test.sendcommand(); } However, when the onclick is triggered nothing happens... I've also tried super.sendJavascript() and super.loadUrl() but it didn't work. Thanks.
answer count: 1
tagged with: javascript
tagged with: phonegap-plugins
has answer: http://stackoverflow.com/a/25894243
has comment: http://stackoverflow.com/comment/40498794
tagged with: cordova-plugins
tagged with: cordova
has comment: http://stackoverflow.com/comment/40491428
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40491508

http://stackoverflow.com/comment/40747246
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26016420
has text: Thanks Neil. I was expecting you to know this instantly =)
type: AnswerComment

http://stackoverflow.com/comment/40537111
comment on: http://stackoverflow.com/q/25898326
score: 0
type: Comment
type: QuestionComment
has text: I added a plunkr: http://plnkr.co/edit/qOhZuVyi3oUVWBftIxBV?p=preview basically, there is no event triggered by hand, these directives are just embeded, this should possible with the same scope (scope=false)

http://stackoverflow.com/comment/40630964
has text: can you [edit] your question and post the code there, in a formatted and readable way? Thanks :-)
score: 0
comment on: http://stackoverflow.com/q/25950985
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40686588
score: 0
type: Comment
has text: What do you know about the elements and its container?
comment on: http://stackoverflow.com/a/25982680
type: AnswerComment

http://stackoverflow.com/comment/40797124
type: Comment
comment on: http://stackoverflow.com/a/26019254
score: 0
type: AnswerComment
has text: that worked to communicate with server - but response comes as "undefined"

http://stackoverflow.com/q/26029920
has comment: http://stackoverflow.com/comment/40773448
has comment: http://stackoverflow.com/comment/40773014
score: 0
accepted answer: http://stackoverflow.com/a/26039562
linked to: http://stackoverflow.com/q/4710447
has title: Set Value to Html.HiddenField not Bind to Model After Submit The Form
has comment: http://stackoverflow.com/comment/40773156
tagged with: c#
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40772856
tagged with: javascript
has body: I have class SubsidiaryClient and Client which relate one-to-many, as seen in picture below I'm developing using MVC 5, and in Create SubsidiaryClient page, to get ClientID, click the button browse to look up the client (using modal form). After select the client, I'm using javascript to set the clientID in the @Html.HiddenField(model =&gt; model.ClientID), fill the rest field and submit. Before submit I print out the ClientID and the value is 1. Then after submit the form, ClientID is not bind correctly. The value is still 0, why? How to bind ClientID correctly? Create.cshtml (View) @model Sales.ViewModels.SubsidiaryClientViewModel @using (Html.BeginForm()) { @Html.AntiForgeryToken() &lt;div class="form-horizontal"&gt; &lt;h4&gt;Subsidiary Client&lt;/h4&gt; &lt;hr /&gt; @Html.ValidationSummary(true) &lt;div class="form-group"&gt; @Html.LabelFor(model =&gt; model.ClientID, new { @class = "control-label col-md-3" }) &lt;div class="col-md-9"&gt; &lt;div class="form-inline"&gt; @Html.HiddenFor(model =&gt; model.ClientID) @Html.EditorFor(model =&gt; model.Client.Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } }) &lt;button class="btn btn-primary" id="btnLookupClient" data-toggle="modal" data-target="#clientModal"&gt;...&lt;/button&gt; &lt;/div&gt; @Html.ValidationMessageFor(model =&gt; model.Client.Name) &lt;/div&gt; &lt;/div&gt; &lt;div class="form-group"&gt; @Html.LabelFor(model =&gt; model.Name, new { @class = "control-label col-md-3" }) &lt;div class="col-md-9"&gt; @Html.EditorFor(model =&gt; model.Name) @Html.ValidationMessageFor(model =&gt; model.Name) &lt;/div&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;div class="col-md-offset-3 col-md-9"&gt; &lt;input type="submit" value="Create" class="btn btn-default" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; } @section Scripts { &lt;script&gt; function setClient(clientID, name) { document.getElementById("ClientID").value = clientID; document.getElementById("Client_Name").value …
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40778002
tagged with: jquery
has answer: http://stackoverflow.com/a/26039562
type: Question
answer count: 1

http://stackoverflow.com/a/25922396
score: 2
has body: Get rid of jQuery and never look back. You'll make it a lot further with Angular. Angular is already working with the changing value of the input and running it through a pipeline. You need to use that pipeline to interact with the value, rather than attaching an event listener. Check out the ngModelController documentation here. I explain this process in a lot more detail and with a demo here. If you're using a recent version of Angular, you'll use a $validator for this. For older versions, you would use a $parser. Rather than adding a class to declare the state, use ngModel's $error state. Here's an example to get you started. Live demo .controller('myCtrl', function($scope) { $scope.foo = 'abc'; // in my example, it's always going to be invalid $scope.fooValidity = false; }) .directive('myDirective', function() { var directive = { scope: { isValid: '=myDirective' }, require: 'ngModel', link: function($scope, $element, $attrs, $ngModel) { // "whatever" is the property which will be assinged on the ngModel $error object $ngModel.$validators.whatever = function(val) { // write your validation logic here // return true or false for valid / invalid return $scope.isValid; }; } }; return directive; }) ; Markup: It's invalid!
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25922223

http://stackoverflow.com/comment/40504337
type: QuestionComment
comment on: http://stackoverflow.com/q/25881489
score: 0
has text: `fadeOut` it runs only once
type: Comment

http://stackoverflow.com/comment/40518991
type: Comment
type: QuestionComment
has text: console.log(Object.getPrototypeOf(obj)); has the name and message properties. it's part of the Error.prototype object
comment on: http://stackoverflow.com/q/25890107
score: 0

http://stackoverflow.com/q/25893629
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I've seen this issue crop up a few times but haven't been able to solve it myself- or I don't quite understand the answers. Many things talk about using .empty().append() rather than .html() and stuff about making sure to always refer to the view's $el value rather than directly accessing the DOM. Still no dice. If you take a look at this jsbin, you'll see that changing the select box value re-renders the wrapper view the first time, but then does nothing on subsequent changes- it loses its events. http://jsbin.com/fuvoba/7/edit (apologies to any coffeescript haters) Any idea why this could be happening? Many thanks and internet pints in advance, as always :) Edit- thought I'd include the code inline too: class ArchivesDropdownView extends Backbone.View template: ' One Two ' initialize: () -> console.log 'Initialised the select dropdown' render: () -> this.$el.find('#dropdown').empty().append @template console.log 'Rendered the select dropdown' return this events: 'change select': 'updateSelect' updateSelect: () -> console.log 'Updated select dropdown.' wrapperView.render() class WrapperView extends Backbone.View template: 'Please select: <%=randomNum%> ' render: () -> console.log 'Rendered the wrapper' this.$el.empty().append _.template(@template)(randomNum: Math.random()) if !this.archivesDropdownView this.archivesDropdownView = (new ArchivesDropdownView().render()) this.archivesDropdownView.render() return this wrapperView = new WrapperView() $('body').empty().append wrapperView.render().$el
tagged with: backbone.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25895289
has title: Backbone view events losing delegation on parent view re-render
score: 1
has answer: http://stackoverflow.com/a/25895042
tagged with: coffeescript
upvote count: 1
type: Question
tagged with: javascript
answer count: 2

tinymce
tags question: http://stackoverflow.com/q/25873969
tag name: tinymce
tags question: http://stackoverflow.com/q/25893340
type: Tag
tags question: http://stackoverflow.com/q/25874668
tags question: http://stackoverflow.com/q/25916412
tags question: http://stackoverflow.com/q/25924605
tags question: http://stackoverflow.com/q/25987157
tags question: http://stackoverflow.com/q/25921712

http://stackoverflow.com/q/25903370
tagged with: casperjs
has comment: http://stackoverflow.com/comment/40544070
has answer: http://stackoverflow.com/a/25912941
has comment: http://stackoverflow.com/comment/40550999
has comment: http://stackoverflow.com/comment/40544402
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40544387
has body: I found out that the default browser of casperjs is safari, because when I tried to access this site https://z1.expertchoice.com using casper and created a screenshot. How can I change the default browser to chrome?
type: Question
score: 5
has comment: http://stackoverflow.com/comment/40544438
accepted answer: http://stackoverflow.com/a/25912941
upvote count: 5
tagged with: javascript
has title: Change the default browser of casperjs to chrome (Change the user-agent string)
answer count: 2
possible better answer: http://stackoverflow.com/a/33739886
downvote count: 0
has comment: http://stackoverflow.com/comment/40544430
has answer: http://stackoverflow.com/a/33739886
favorite count: 0
has comment: http://stackoverflow.com/comment/40544488

http://stackoverflow.com/q/25994069
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I have a quick question. On some pages I read that the prototype function in js comes from a framework called prototype written in 2005. But you can use it without loading an external script. Now my question is: is prototype now standardized in javascript? So that you don't need to load external scripts? Maybe my question is: Is a framework only a framework if it is included as a script?
tagged with: prototype
accepted answer: http://stackoverflow.com/a/25996755
favorite count: 0
has title: Prototype framework or included in js
has answer: http://stackoverflow.com/a/25996372
possible better answer: http://stackoverflow.com/a/25996372
type: AnsweredQuestion
tagged with: prototypejs
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25996755

http://stackoverflow.com/q/25880195
type: AnsweredQuestion
has title: Why does this comparison function return the wrong result?
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40502054
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25880222
has comment: http://stackoverflow.com/comment/40502073
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25880219
favorite count: 0
has answer: http://stackoverflow.com/a/25880219
score: 0
has comment: http://stackoverflow.com/comment/40502002
has body: 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"; } } } }; Where am I going wrong?
accepted answer: http://stackoverflow.com/a/25880222

http://stackoverflow.com/a/25892840
accepted answer of: http://stackoverflow.com/q/25892237
score: 1
answers question: http://stackoverflow.com/q/25892237
upvote count: 1
has comment: http://stackoverflow.com/comment/40526200
type: AcceptedAnswer
downvote count: 0
has body: After success trim your data by using data.trim(), might be there is whitespace
type: Answer

http://stackoverflow.com/a/26034719
upvote count: 1
has comment: http://stackoverflow.com/comment/40781062
has body: This is an absolute mess.. JavaScript code should not have HTML tags in it unless it's inside of a string. Also you have a typo - it's location.href not location.herf. Furthermore if you're defining a function in JavaScript it should have a function keyword, function name, function arguments and then the function body. If you want to redirect with JavaScript you can simply use window.location. Fix your JavaScript part to the following: &lt;script&gt; function go_lobby() { window.location = "lobby.html"; } &lt;/script&gt; You also have a typo in your HTML. posistion should be position. Empty element attributes are redundant if they aren't set beforehand. Also if your setting an event event for an event like onclick then the spaces that you have there are just useless and can lead to problems. Fix your HTML to: &lt;body&gt; &lt;div style="position:absolute; z-index = 99;"&gt; &lt;img src="map.png" /&gt; &lt;/div&gt; &lt;div style="position:absolute; z-index = 10;"&gt; &lt;img src="go_lobby.png" onclick="go_lobby()" /&gt; &lt;/div&gt; &lt;/body&gt; After this the image onclick event should trigger the redirect.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26033164
type: Answer

http://stackoverflow.com/q/25911322
has body: I've read some articles on how different scopes are used when using directive's transclude property. While debugging my code I've created following code snippet. The weird thing is that _object and _string variables behave differently. _object is being updated in the parent scope, while _string is not. Here's a demo http://jsbin.com/ruvixilukaci/1/edit HTML: Object: {{ _object }} String: {{ _string }} Controller/Directive source code: angular.module('app', []) .controller('MainCtrl', function($scope) { $scope._object = { _string: 'Object string' }; $scope._string = 'Default string'; }) .directive('directiveExample', function() { return { restrict: 'EA', transclude:true, template: ' ' }; }); Do you have any clue of what is going on? I've tried various versions of Angular.JS also. Any help would be appreciated.
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25911454
upvote count: 1
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/25911454
tagged with: javascript
tagged with: angularjs-scope
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: Object and string do not work in the same way when using transclude property

http://stackoverflow.com/a/26119255
has comment: http://stackoverflow.com/comment/109049866
type: Answer
upvote count: 3
downvote count: 1
score: 2
has body: They have defined exactly how to do it in their documentation: $("#example3").handsontable({ data: getCarData(), startRows: 7, startCols: 4, colHeaders: ["Car", "Year", "Chassis color", "Bumper color"], columns: [ { type: 'autocomplete', source: function (query, process) { $.ajax({ //url: 'php/cars.php', //commented out because our website is hosted on static GitHub Pages url: 'json/autocomplete.json', dataType: 'json', data: { query: query }, success: function (response) { console.log("response", response); //process(JSON.parse(response.data)); //JSON.parse takes string as a argument process(response.data); } }); }, strict: true }, {} /*Year is a default text column*/, {} /*Chassis color is a default text column*/, {} /*Bumper color is a default text column*/ ] });
accepted answer of: http://stackoverflow.com/q/25977052
answers question: http://stackoverflow.com/q/25977052
type: AcceptedAnswer

http://stackoverflow.com/q/25979451
accepted answer: http://stackoverflow.com/a/26058391
score: 0
has title: reload polymer-elements or ajax call from a custom element
tagged with: polymer
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25987397
has answer: http://stackoverflow.com/a/25987397
tagged with: cookies
type: Question
answer count: 2
has body: I has been working on this for days and nothing good get out of my head! I have an application that uses cookies for the session handling. The application use several custom elements that I import in the header, some of them need to use information form the cookie session to make an ajax-core call. The problem is when the cookie is not set (case: first start) so, I log into the app and I must reload the page in order to start getting the 'core-ajax auto' results. I dont know how to do a listener or how to reload all the custom elements or how to reload specifics core-ajax calls. some one of you guys had/have similiar situations? which is the best way to fix it? Thanks in advance!
has answer: http://stackoverflow.com/a/26058391
tagged with: javascript

sorting
tags question: http://stackoverflow.com/q/26000225
tags question: http://stackoverflow.com/q/26012963
tags question: http://stackoverflow.com/q/25933231
tags question: http://stackoverflow.com/q/25908440
tags question: http://stackoverflow.com/q/25992107
tags question: http://stackoverflow.com/q/26025516
tags question: http://stackoverflow.com/q/25964418
tags question: http://stackoverflow.com/q/25941142
type: Tag
tags question: http://stackoverflow.com/q/25898002
tags question: http://stackoverflow.com/q/26006062
tags question: http://stackoverflow.com/q/25899402
tags question: http://stackoverflow.com/q/26033592
tag name: sorting
tags question: http://stackoverflow.com/q/26008361

http://stackoverflow.com/q/25946412
has comment: http://stackoverflow.com/comment/40621049
score: 1
possible better answer: http://stackoverflow.com/a/25946468
has body: On my page im working on, are a lot of input-forms. I want to check the user inputs before submit. Example HTML/PHP &lt;input type="text" name="adress" id="adress"&gt; &lt;input type="text" name="amount" id="amount"&gt; and actually im doing the following in Javascript Javascript function dataValidation() { error=false; var adress = document.getElementById('adress').value; var amount = document.getElementById('adress').value; if (adress == ""){ error=true; } if (amount &gt;0 &amp;&amp; amount &lt; 999){ } else { error=true; } if (error == false){ document.forms["myForm"].submit(); } } So, basically this works fine for my, but the problem is, i have to create that function for every form, and add a IF for every field So, im looking for a better solution Idea 1 : Add a list, wich provides the types of input, like adress = not empty, amount = &gt;0 &amp;&amp; &lt;999, and then create a function, which checks all fields with that list Idea 2: Add a tag or something directly to the input field, what it should contain. and then create a function which checks all the fields Does somebody have a Idea how this can be done, and would like to help/advise me?
upvote count: 1
accepted answer: http://stackoverflow.com/a/25947139
tagged with: php
has answer: http://stackoverflow.com/a/25946468
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25946533
has comment: http://stackoverflow.com/comment/40621045
tagged with: forms
has title: Validate Form Inputs on a good and reliable way
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25947139
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/26029699
has body: You can handle right-clicks by listening for contextmenu events on the canvas: // listen for contextmenu requests canvas.addEventListener('contextmenu', handleMouseDown, false); Here's an example that alerts differently for 2 different canvas rectangles: var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var canvasOffset=$("#canvas").offset(); var offsetX=canvasOffset.left; var offsetY=canvasOffset.top; var rects=[]; rects.push({x:50,y:50,width:50,height:50,color:"red"}); rects.push({x:150,y:100,width:75,height:75,color:"blue"}); ctx.clearRect(0,0,canvas.width,canvas.height); for(var i=0;i<rects.length;i++){ var rect=rects[i]; ctx.beginPath(); ctx.fillStyle=rect.color; ctx.rect(rect.x,rect.y,rect.width,rect.height); ctx.fill(); } // listen for contextmenu requests canvas.addEventListener('contextmenu', handleMouseDown, false); function handleMouseDown(e){ // get mouse position relative to the canvas var x=parseInt(e.clientX-offsetX); var y=parseInt(e.clientY-offsetY); // check each rect for hits for(var i=0;i<rects.length;i++){ var rect=rects[i]; var rectRight=rect.x+rect.width; var rectBottom=rect.y+rect.height; // check each rect for hits if(x>=rect.x && x<=rectRight && y>=rect.y && y<=rectBottom ){ alert("Context menu request on the "+rect.color+" rectangle."); } } // prevents the usual context from popping up e.preventDefault() return(false); } body{ background-color: ivory; } canvas{border:1px solid red;} Right click in either rectangle.
accepted answer of: http://stackoverflow.com/q/26029654
has comment: http://stackoverflow.com/comment/40772676
answers question: http://stackoverflow.com/q/26029654
has comment: http://stackoverflow.com/comment/61923607
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/61923765
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40772382

http://stackoverflow.com/q/26012306
accepted answer: http://stackoverflow.com/a/26012516
type: Question
has body: I am trying to pass on JQuery values to hidden textboxes (to send as a form later) as well as divs t hat displays on the front end. I also want to tally these items as the value is passed to them. I have Frankensteined this bit of code which passes on the value to the the input boxes and the divs and it also tallies them onclick. I am just struggling to get the sum to display in #total_div. Can anyone point me in the right direction please? My pretty front end ADD THIS VALUE 1 ADD THIS VALUE 2 VALUE 1: VALUE 1 GOES HERE VALUE 2: VALUE 2 GOES HERE TOTAL: SUM MUST GO HERE My hidden Form Value 1: Value 2: Total: EDIT Ok so thanks to the advice I got the above working but now I need to clear the amounts. This is what I have done, it is almost there I think but I'm getting the incorrect sum. $('#clear').click(function() { $('#my_value_1').val('0'); $('#my_value_1_div').html( "0" ); $('#clear').click(minusNumbers('total')); }); function minusNumbers() { var minval1 = parseInt(document.getElementById("my_value_1").value); var minval2 = parseInt(document.getElementById("total").value); var minansD = document.getElementById("total"); minansD.value = minval2 - minval1; $('#total_div').text(minansD.value); }
tagged with: http://stackoverflow.com/tag/html
has title: Passing JQuery value to html and then tally the totals with onclick
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/26012516
has answer: http://stackoverflow.com/a/26012673
has comment: http://stackoverflow.com/comment/40742090
has comment: http://stackoverflow.com/comment/40742058
has comment: http://stackoverflow.com/comment/40742904
possible better answer: http://stackoverflow.com/a/26012376
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26012376
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25920137
favorite count: 0
linked to: http://stackoverflow.com/q/15792498
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has comment: http://stackoverflow.com/comment/40576122
has comment: http://stackoverflow.com/comment/40574939
has body: Good Morning, I am having difficulty firguring out why this following Javascript method is not working. Realtor Inquiry Agree with the Terms & Conditions What im am trying to accomplish with the code above is when the checkbox is checked a prompt will appear. I did'ny quite know how to search for this specific answer I was looking for.
has answer: http://stackoverflow.com/a/25920473
has title: Javascript Method Not Working - Checkbox
has comment: http://stackoverflow.com/comment/40574606
downvote count: 1
has answer: http://stackoverflow.com/a/25920404
possible better answer: http://stackoverflow.com/a/25920278
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25920278
score: -1
tagged with: forms
tagged with: methods
type: Question
answer count: 3
upvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25920404

http://stackoverflow.com/q/25964863
has answer: http://stackoverflow.com/a/25965808
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40802288
type: Question
has title: Isotope with dynamic hover
tagged with: javascript
has comment: http://stackoverflow.com/comment/40653755
score: 0
has body: I have the following problem: I want to make a page where the images are dynamically fixed as in this web: http://www.fosterandpartners.com/projects/ and, at the same time, each of these images should have a hover containing certain information to the image. After googling a bit I found a Js called Isotope allows me to do the arrangement of the pictures, even though I do not have a way to make the hover without being so problematic. Can you help me with this?
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25965808
has comment: http://stackoverflow.com/comment/40653722
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/25973582
tagged with: javascript
has comment: http://stackoverflow.com/comment/40669330
tagged with: replace
score: 0
answer count: 1
has body: I have a JSON string with many segments as shown below: "@rid":{"cluster":13,"position":0} I want all these to be replaced with "@rid":"#13:0" '13' and '0' are just taken as example, there can be any number in place of them and all such segments in JSON can have different numbers, so if we generalize, the problem is to replace "@rid":{"cluster":&lt;&lt;X&gt;&gt;,"position":&lt;&lt;Y&gt;&gt;} with "@rid":"&lt;&lt;X&gt;&gt;:&lt;&lt;Y&gt;&gt;" Note X and Y should remain intact after replacement.
has title: How to keep few things intact in javascript replace function
has comment: http://stackoverflow.com/comment/40669351
type: UnansweredQuestion
tagged with: regex
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25974188
type: Question

http://stackoverflow.com/comment/40696710
comment on: http://stackoverflow.com/q/25988375
type: Comment
has text: Can you show us what you have tried so far?
type: QuestionComment
score: 2

http://stackoverflow.com/comment/40720879
type: AnswerComment
score: 0
type: Comment
has text: and how javaScript will pass or call my method to perform the insert?
comment on: http://stackoverflow.com/a/26000918

http://stackoverflow.com/q/25896259
has body: I am trying to retrieve the URL of a picture from Amazon s3. When I run the script below, I get an error: Missing required Key in params This is what I have so far: Click me!
type: Question
accepted answer: http://stackoverflow.com/a/25896456
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25896456
upvote count: 1
answer count: 1
has title: Retrieve data from Amazon s3
favorite count: 0
type: AnsweredQuestion
tagged with: amazon-s3
score: 1

http://stackoverflow.com/a/25999481
type: Answer
accepted answer of: http://stackoverflow.com/q/25998936
has body: I would consider adding the code for maxlength to the jquery plugin. From what I can see this is controlled in the function createEditorElement so just add that createEditorElement: function() { if (-1 === $.inArray(this.settings.field_type, ['text', 'textarea', 'select'])) throw "Unknown field_type &lt;fnord&gt;, supported are 'text', 'textarea' and 'select'"; var editor = null; if ("select" === this.settings.field_type) editor = this.createSelectEditor(); else if ("text" === this.settings.field_type) editor = $('&lt;input type="text" ' + this.inputNameAndClass() + ' size="' + this.settings.text_size + '" maxlength="' + this.settings.text_max + '" /&gt;'); else if ("textarea" === this.settings.field_type) editor = $('&lt;textarea ' + this.inputNameAndClass() + ' rows="' + this.settings.textarea_rows + '" ' + ' cols="' + this.settings.textarea_cols + '" maxlength="' + this.settings.textarea_max + '"/&gt;'); return editor; } Then add the default values for text_max and textarea_max to the top default settings object $.fn.editInPlace.defaults = { text_max: 180, textarea_max: 180, .... rest of defaults .... }
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25998936

http://stackoverflow.com/comment/40720019
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26001118
has text: It can be done, what arguments would you want to pass? Can you clarify your use case?
type: AnswerComment

http://stackoverflow.com/comment/40710396
has text: yes, but where is the problem, that with an Array doesn't work?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25992943

http://stackoverflow.com/q/26030209
has comment: http://stackoverflow.com/comment/40773552
has answer: http://stackoverflow.com/a/26030835
has title: HTML and JS: surrounding every word in the document with a tag
type: Question
accepted answer: http://stackoverflow.com/a/26030835
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40773242
has comment: http://stackoverflow.com/comment/40773139
tagged with: javascript
has comment: http://stackoverflow.com/comment/40773000
possible better answer: http://stackoverflow.com/a/26031464
has comment: http://stackoverflow.com/comment/40773522
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26031464
tagged with: regex
has comment: http://stackoverflow.com/comment/40773493
has comment: http://stackoverflow.com/comment/40773480
has comment: http://stackoverflow.com/comment/40773114
has comment: http://stackoverflow.com/comment/40773340
has comment: http://stackoverflow.com/comment/40773028
linked to: http://stackoverflow.com/q/7563169
has body: I am trying to use Javascript to modify an existing HTML document so that I can surround every word of text in the web page with a span tag that would have a counter. This is a very specific problem so I am going to provide an example case: hello, change this This should change to: hello, change this I am thinking or regex solutions but they get truly complicated and I am not sure of how to ignore tags and change text without completely breaking the page. Any thoughts appreciated!
type: AnsweredQuestion

http://stackoverflow.com/q/25897801
has comment: http://stackoverflow.com/comment/40533589
score: 0
answer count: 1
has body: I came from javascript background and I started d3.js While practice I written the following code. html code : js code : var theData = [ 1, 2, 3 ]; var p = d3.select("body").selectAll("p") .data(theData) .enter() .append("p") .text( function (d) { return d; } ); console.log(p); My motivation was, I want to append p nodes in between #firstP,#secondP,#thirdP elements. but after I execute above I am getting null how d3 handling this I didn't understand. For my testing, I removed last p node from html file, the output coming 2 null values and 1 p node appending with corresponding data(3) . I didn't understand how d3.js will handle this things. can anyone help me. Thanks.
tagged with: javascript
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25898027
has title: D3.js executing in different manner
type: Question

http://stackoverflow.com/comment/40567947
comment on: http://stackoverflow.com/q/25916385
has text: Using three letters would be very confusing.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25887376
accepted answer of: http://stackoverflow.com/q/25886802
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40514857
answers question: http://stackoverflow.com/q/25886802
has comment: http://stackoverflow.com/comment/40530208
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40527824
has body: If you do not want to fiddle around with string operations, you can also use the DOM Interface. Interface PathSegList From there you can iterate over the path elements path segments list and create a json string from that. var path = document.getElementById(&lt;pathid&gt;), seglist = path.pathSegList, length = seglist.numberOfItems, i = 0, seg, out = [], data, type; for (; i &lt; length; i++) { seg = seglist.getItem(i); type = seg.pathSegTypeAsLetter; data = { type: seg.pathSegTypeAsLetter }; switch (type) { case 'M': case 'm': case 'l' : case 'L' : data.x = seg.x; data.y = seg.y; break; case 'C': case 'c': data.x = seg.x; data.y = seg.x; data.x1 = seg.x1; data.y1 = seg.y1; data.x2 = seg.x2; data.y2 = seg.y2; break; /* * to * be * continued */ } out.push(data); } return JSON.stringify(out); I have not test the code above, it should outline the basic process of iterating the Paths' segments. Since there are quite a couple of different types of segments, you can, as outlines above, »switch« over the type and create suitable data from there. Or, instead of path.pathSegList you could use path.normalizedPathSegList what return a list of segments, where each segment is converted to the type of cubic Bezier, but when tried it the last time, I got an »Not yet implemented Error«. I have created a fiddle showing that the code works!

http://stackoverflow.com/comment/40677329
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25977643
type: AnswerComment
has text: It still seems to skip over the clearly empty name field and send the form when everything other than the name form reaches minimum requirements.

http://stackoverflow.com/a/32013005
has body: In case you don't have a master (dynamic models from server), and you want to reset the form but only the binded part of the model you can use this snippet: function resetForm(form){ _.forEach(form, function(elem){ if(elem !== undefined && elem.$modelValue !== undefined){ elem.$viewValue = null; elem.$commitViewValue(); } }); } And then you can use it with a standard reset button like so: reset
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/90621672
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/26015010

http://stackoverflow.com/comment/40751987
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26018336
has text: Thanks, pretty much what I was searching for! I've only had JS for 1 week in university now, that's probably why I had some basic bugs. Trying my best, thanks for the help :)

http://stackoverflow.com/a/25954168
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25953859
type: Answer
answers question: http://stackoverflow.com/q/25953859
has comment: http://stackoverflow.com/comment/40634059
has body: ne1410s is correct: the URL serves JSON, not JSONP. You have three choices: Get a URL that serves JSONP Get the server to support CORS (Cross-Origin Resource Sharing) Write your own server-side script that fetches the data, and then gives it to your script FROM THE SAME DOMAIN AS THE SCRIPT I believe there's a fourth choice, but, honestly, it just gets more hack-ish from here. To get the server to support CORS, you would want to add some stuff to the header, such as: Access-Control-Allow-Origin: http://excelonlineclasses.com/ Access-Control-Allow-Methods: GET Access-Control-Allow-Headers: content-type Access-Control-Max-Age: 10 ...but it doesn't end there. Browsers can send an OPTIONS request (in addition to GET or POST) to find out how the server feels about CORS. The above is really what the server should return in that case. If you want to set up CORS, I suggest reading something like http://enable-cors.org/
has comment: http://stackoverflow.com/comment/40633917

http://stackoverflow.com/q/25893006
has comment: http://stackoverflow.com/comment/40531683
has comment: http://stackoverflow.com/comment/40564739
has comment: http://stackoverflow.com/comment/40524507
has body: I set an iframe on my page and use below script to remove the double navigation bars. It works well on any browser, but doesn't work on Chrome, it shows double vertical navigation bars! function calcHeight() { //find the height of the internal page var the_height = document.getElementById('the_iframe').contentWindow. document.body.scrollHeight; //change the height of the iframe document.getElementById('the_iframe').height = (the_height + 30) +"px"; } I get 2 errors messages in Chrome: First error message: Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. and it points out the error at: var the_height = document.getElementById('the_iframe').contentWindow. document.body.scrollHeight; Second error message, it is located in jquery-1.10.2.js: Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. It points out the error message at: elem.contentDocument || elem.contentWindow.document :
type: Question
score: 9
tagged with: same-origin-policy
answer count: 2
upvote count: 9
downvote count: 0
linked to: http://stackoverflow.com/q/17950598
tagged with: javascript
has comment: http://stackoverflow.com/comment/40534070
has answer: http://stackoverflow.com/a/33596858
has answer: http://stackoverflow.com/a/30543210
has title: Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/40539467

http://stackoverflow.com/q/25959308
tagged with: node.js
score: 2
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25976885
tagged with: javascript
upvote count: 2
answer count: 2
has body: I'm having a look at the docs of node.js: process event exit. Emitted when the process is about to exit. There is no way to prevent the exiting of the event loop at this point, and once all exit listeners have finished running the process will exit. Therefore you must only perform synchronous operations in this handler. This is a good hook to perform checks on the module's state (like for unit tests). The callback takes one argument, the code the process is exiting with. Basic usage looks like this: process.on('exit', function(code) { console.log('About to exit with code:', code); }); Despite the info in docs I can't think of a real life example where I'd like to do some unit tests inside of the callback. I'd like to make my app as robust as possible. What do you use the exit event for?
favorite count: 0
has answer: http://stackoverflow.com/a/25959599
type: UnansweredQuestion
has title: What's the purpose of the process exit event in node js?

http://stackoverflow.com/q/25891281
possible better answer: http://stackoverflow.com/a/62462672
has answer: http://stackoverflow.com/a/62462672
accepted answer: http://stackoverflow.com/a/25892976
tagged with: ruby-on-rails
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/38392434
has comment: http://stackoverflow.com/comment/40521405
type: Question
tagged with: capybara
has comment: http://stackoverflow.com/comment/40521249
answer count: 2
has comment: http://stackoverflow.com/comment/40521560
has body: I use binding.pry in somewhere in Cabypara code for debugging, and i want to check the value of html element using jQuery. I can't use debugger, then check the value from browser, because this code is Cabybara code for testing as example: When /^(?:|I )select "([^"]*)" from "([^"]*)"$/ do |value, field| select(value, :from =&gt; field) binding.pry end How can i check the value of this field by jQuery code as $("##{field}").val() on rails console ?
tagged with: javascript
tagged with: jquery
score: 0
has title: JavaScript code on rails console
has answer: http://stackoverflow.com/a/25892976

http://stackoverflow.com/a/26001034
upvote count: 5
accepted answer of: http://stackoverflow.com/q/26000937
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40719984
score: 5
has body: You can : get the containing table $(this).closest("table") then get all other tables : $("table").not($table) finally, uncheck all inputs from these tables : ... .prop("checked", false). This should give some code like this : $('input[type=checkbox]').on('click', function () { var $table = $(this).closest("table"); // Current table $("table").not($table) // Other tables .find("input[type=checkbox]:checked") // Checked input of these tables .prop("checked", false); // Uncheck them }); See this fiddle : http://jsfiddle.net/69o3e5y4/2/
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26000937
has comment: http://stackoverflow.com/comment/40720256

http://stackoverflow.com/q/25897353
has comment: http://stackoverflow.com/comment/40532852
answer count: 1
has body: How to set value of slide range to php variable ? i want to set value of slide range in to $amount http://jsfiddle.net/b63u9krv/ $(function() { $( "#slider-range-min" ).slider({ range: "min", value: 0, min: 0, max: 700, slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.value ); } }); $( "#amount" ).val( "$" + $( "#slider-range-min" ).slider( "value" ) ); }); &lt;input type="hidden" name="amount" id="amount" value="&lt;?PHP echo $amount; ?&gt;"&gt;
type: UnansweredQuestion
tagged with: php
has title: How to set value of slide range to php variable?
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25897488
score: 0

http://stackoverflow.com/q/25960374
has body: Is there any way to detect the combo key press and notify user using Angular JS. For example I want to notify user when they press "ctrl+c" or "cmd+c" on selected text that they are copied to clipboard. So far I have tried using https://github.com/mgonto/mgo-mousetrap. But problem is that it invokes the function but doesn't copy selected text to clipboard. Help would be really really appreciated. Following is sample code http://jsfiddle.net/meetgodhani/7ypfcjgm/3/. HTML http://www.sample.com SCRIPT angular.module('superapp', ['mgo-mousetrap']); function MyCtrl($scope) { $scope.superCoolAction = function(event) { event.preventDefault(); alert("Super cool"); } } Thank you.
score: 0
has comment: http://stackoverflow.com/comment/40650069
has answer: http://stackoverflow.com/a/25960820
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40649545
has comment: http://stackoverflow.com/comment/40645935
has title: How to notify when user is pressing "Cmd + c" or "ctrl + c" on selected text in Angular?
type: Question
tagged with: angularjs-directive
tagged with: javascript
has comment: http://stackoverflow.com/comment/40645407

object
tags question: http://stackoverflow.com/q/26029717
tags question: http://stackoverflow.com/q/25985090
tags question: http://stackoverflow.com/q/25935624
tags question: http://stackoverflow.com/q/25929400
tags question: http://stackoverflow.com/q/25916719
tag name: object
tags question: http://stackoverflow.com/q/25955514
tags question: http://stackoverflow.com/q/25988979
tags question: http://stackoverflow.com/q/26022096
tags question: http://stackoverflow.com/q/26001074
tags question: http://stackoverflow.com/q/25980414
tags question: http://stackoverflow.com/q/25933249
tags question: http://stackoverflow.com/q/26017571
tags question: http://stackoverflow.com/q/26003084
tags question: http://stackoverflow.com/q/25931873
tags question: http://stackoverflow.com/q/25918587
tags question: http://stackoverflow.com/q/25956436
tags question: http://stackoverflow.com/q/26008953
tags question: http://stackoverflow.com/q/25903401
tags question: http://stackoverflow.com/q/25887864
tags question: http://stackoverflow.com/q/25891848
tags question: http://stackoverflow.com/q/26024488
tags question: http://stackoverflow.com/q/25955718
tags question: http://stackoverflow.com/q/25938803
tags question: http://stackoverflow.com/q/25946683
tags question: http://stackoverflow.com/q/25954108
tags question: http://stackoverflow.com/q/25900905
tags question: http://stackoverflow.com/q/25891103
tags question: http://stackoverflow.com/q/25921770
tags question: http://stackoverflow.com/q/25953763
tags question: http://stackoverflow.com/q/25882257
tags question: http://stackoverflow.com/q/25920931
tags question: http://stackoverflow.com/q/25916868
tags question: http://stackoverflow.com/q/25950273
tags question: http://stackoverflow.com/q/25877218
type: Tag
tags question: http://stackoverflow.com/q/25969539
tags question: http://stackoverflow.com/q/25991124
tags question: http://stackoverflow.com/q/25993439
tags question: http://stackoverflow.com/q/25998892
tags question: http://stackoverflow.com/q/25900665

http://stackoverflow.com/comment/40560572
has text: I think I got it. Still have to figure out how to use IIFE. I wouldn't find the answer you suggested because I wouldn't know what to search for exactly.
comment on: http://stackoverflow.com/q/25912015
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40734132
type: AnswerComment
score: 0
type: Comment
has text: But, this way only one filter is applied not multiple. Only one filter should be applied only when the "Others" is selected, but with rest multiple selections should be allowed. Also when I select (click on) the filter again it does not deselect it.
comment on: http://stackoverflow.com/a/26002921

http://stackoverflow.com/comment/40706271
has text: I'm not sure I understand the motivation behind concatenating these strings at all -- why not `navigationText: [\'\', ...` -- in other words just remove all the `'.'` occurrences.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25993836
type: Comment

http://stackoverflow.com/comment/40658682
has text: please please please dont parse html with regex. HTML is not a regular language
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25967464

http://stackoverflow.com/comment/40529232
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25881021
has text: I tried with "undefined" but it didn't work. `null` did the trick. Thanks!
type: AnswerComment

http://stackoverflow.com/q/25930729
type: Question
accepted answer: http://stackoverflow.com/a/25930848
tagged with: canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/40593479
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25930848
has title: Move a rotating object in a HTML Canvas
type: AnsweredQuestion
has body: I have an HTML canvas. Inside it I've drawn a hexagon. The hexagon rotates in place. Well now I want this rotating hexagon to move along a set path. I want to be able to track it's location. Normally when you want to move an object you say: (object.x+howmuchtomove) and it will simply move by that much, and you can track it's whereabouts by just adding object.x+howmuchtomove to get the x coord. Well in this case I'm using translate and rotate to give it the rotating effect. So adding +2 to it's x location simply makes it rotate in a bigger circle. Here is what I've got, thanks! retObject.draw = function() { // Wipe the canvas ctx.fillStyle = "rgba(0, 0, 0, 1)"; ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.fillRect(0, 0, canvas.width, canvas.height); // Draw rotating shape ctx.save(); // Don't rotate everything ctx.strokeStyle="red"; // Set Color ctx.translate(356.5, 700); // Center pivot inside hexagon ctx.rotate(rotValue*(Math.PI/180)); // Rotate ctx.translate(-356.5, -700); // Un-Translate for (i=0;i&lt;3;i++) { ctx.beginPath(); ctx.moveTo(300, 700); ctx.lineTo(330, 650); ctx.lineTo(383, 650); ctx.lineTo(413, 700); ctx.lineTo(383, 750); ctx.lineTo(330, 750); ctx.lineTo(300, 700); ctx.stroke(); // Draw Hexagon } ctx.restore(); // Get back normal } Note that draw() is inside of a loop so that it gets called every frame. So, for simplicity sake, say I just want this rotating hexagon to drop straight down. Basically I'm wanting to add +1 to it's y coordinate every frame.

http://stackoverflow.com/q/25969949
has comment: http://stackoverflow.com/comment/40790331
tagged with: meteor
favorite count: 0
downvote count: 0
score: 6
has title: How to restart Meteor server from within Meteor.js
tagged with: node.js
accepted answer: http://stackoverflow.com/a/26753419
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26753419
has body: A project I've made with Meteor has a memory leak that slowly accumulates over the course of a month or two. After sinking days into finding the leak, I'm throwing in the towel in favor of just adding an auto-restart that happens once a month. Yes this is bad practice, etc. Is there a way to simply restart from within the server's codebase? Ideally this will also trigger a refresh for connected clients (similar to regular deployment updates). Then I assume this command could just be nested in a good old JS timeout function.
has comment: http://stackoverflow.com/comment/40665516
answer count: 1
upvote count: 6
tagged with: javascript

http://stackoverflow.com/q/25996436
has title: Why is my tabset tag coming up as unknown
has comment: http://stackoverflow.com/comment/40801137
score: 0
has comment: http://stackoverflow.com/comment/48333361
has comment: http://stackoverflow.com/comment/40713246
has comment: http://stackoverflow.com/comment/40711172
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40712914
has comment: http://stackoverflow.com/comment/40711028
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40801087
has comment: http://stackoverflow.com/comment/40710791
has answer: http://stackoverflow.com/a/58096289
type: Question
has body: I am currently trying to create a set of tabs using the 'tabset' tag with ui-bootstrap-0.9.0.min.js but eclipse keeps marking it as an unknown tab. When I launch the page on my browser all I get is {{tabcontent}}. Below is how I have called upon the bootstrap script along with how I am calling upon the tabset tag. What am I doing wrong? {{tab.content}}
answer count: 1
tagged with: javascript
tagged with: angular-ui-bootstrap

http://stackoverflow.com/a/25978629
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25944019
answers question: http://stackoverflow.com/q/25944019
has body: After a while of tinkering with it, I figured out a solution. By placing the misbehaving images inside their own div tags, then performing the same z-index switches on them it works correctly in the WebBrowser control: HTML Change: Javascript Change: if (rotation >= 180) { $('#c').hide(); $('#e').css('z-index', 3); $('#e2').css('z-index', 3); if (rotation >= 360) { $('#e').hide(); } }
type: AcceptedAnswer

http://stackoverflow.com/comment/40709039
has text: What exactly did you try? Can you post the code you used?
comment on: http://stackoverflow.com/q/25995525
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26025420
has title: d3.behavior.zoom dynamic offset of mousewheel zoom center
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790654
tagged with: zooming
has answer: http://stackoverflow.com/a/26127879
has comment: http://stackoverflow.com/comment/40993091
has comment: http://stackoverflow.com/comment/40766657
downvote count: 0
score: 1
favorite count: 0
tagged with: d3.js
upvote count: 1
has comment: http://stackoverflow.com/comment/40789505
accepted answer: http://stackoverflow.com/a/26127879
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40791950
has comment: http://stackoverflow.com/comment/40789699
has body: Does anyone know how to dynamically modify the center property of d3.behavior.zoom in order to mousewheel zoom to a point offset from mouse position by specified x and y values? The zoom should still track on the mouse position as usual, but offset by dynamically generated values. I'm working with multiple coordinate spaces in a node tree plot using a library called webcola, which extends d3. In order to implement smooth node dragging in addition to pan/zoom, I have buffered translate coordinates and merge them after node dragging. (rather than using the stopPropagation() method which is not implemented in cola). The network drag + pan fix works, however that offsets the d3.behavior.zoom center. Now I want to offset the zoom target on mousewheel by specified x and y to restore proper cursor tracking on mousewheel zoom. For example, if mouse is at position 100,100 but the coordinate space is shifted by 50,50, then mousewheel should zoom to 150,150, rather than actual mouse position of 100,100. This offset target should be updated dynamically on pan/drag of nodes. function zoomCoords() { // generate the zoom coords based on the merged coordinate space - doesn't work console.log("d3.mouse"); console.log(d3.mouse); return [0,0]; } var zoom = d3.behavior.zoom() .scaleExtent([0.2, 3]) // .center(zoomCoords()) // set dynamically ??? .on("zoom", zoomed); svg.call(zoom); ...... function zoomed() { if (enablePanning === true) { // we're dragging on the background, not a node. // zoom.center=newCoords; // doesn't work // zoom.center(newCoords); // doesn't work newCoords=[(d3.event.translate[0]-translateBuffer[0]),(d3.event.translate[1]-translateBuffer[1])]; container.attr("transform", "translate(" + newCoords + ")scale(" + d3.event.scale + ")"); } else { // dragging on a node. save the translation to apply to the next container drag translateBuffer[0]=(d3.event.translate[0]-newCoords[0]); translateBuffer[1]=(d3.event.translate[1]-newCoords[1]); } } Thanks
type: Question
has comment: http://stackoverflow.com/comment/40993187

http://stackoverflow.com/a/43063848
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25922224
downvote count: 0
score: 1
has body: Try this: myFunction: KnockoutComputed&lt;string&gt; = ko.computed(() =&gt; { // return any string value });

http://stackoverflow.com/comment/40554389
score: 0
type: Comment
type: QuestionComment
has text: oh kay, thanks! didnt know
comment on: http://stackoverflow.com/q/25908981

http://stackoverflow.com/comment/40762722
comment on: http://stackoverflow.com/q/26024541
has text: You don't need PHP for any of this. You could use javascript to extract the variable from the original url and set the value in the text box, when you change it just make a request to the url with your new value. Adding PHP into the mix is complicating this.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40717828
comment on: http://stackoverflow.com/a/25999898
score: 0
type: AnswerComment
has text: So here's is what I have `var d=new Date(); var day = d.getDay(); if (day !=0 && day !=6) return "Weekday";`
type: Comment

http://stackoverflow.com/a/25979806
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25979658
type: Answer
has body: In IE, \n does indeed generate line breaks in textarea elements. That is, this code: default text here does, in IE, result in a textarea which holds the value default text here for an unimaginably short time followed by the value: a b If you really want to test your browser, I have put this on a JSFiddle at: http://jsfiddle.net/91mj2arh/

http://stackoverflow.com/q/26020755
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: hover
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40755625
has answer: http://stackoverflow.com/a/26023228
linked to: http://stackoverflow.com/q/2011142
type: Question
has comment: http://stackoverflow.com/comment/40755731
tagged with: javascript
has body: I have a dynamic part of my website that shows a table if there are values and hides the table if there are no values. When it shows the table, the values in the table are in different colors that represent different definitions. I want to be able to add hover text with a color key for these definitions. Originally, I wanted a hover to have a little square of that color with the definition next to the color. I thought that might be too difficult after looking around, so I've resorted to just trying to change the actual color of the definition in order to show the link between the value/color/definition . However...I can't even figure out how to do that. i need the hover to occur on mouseover, so right now i have this until I figure out how to get colors / change the color text IN the hover paragraph: $myResults.find('.Solutions').bind("mouseover", function(){ $(".myTable").attr('title', 'blue - value1 \n red - value2 \n olive - value3 \n'); }); I tried using tooltipster and couldn't get that to work.
score: 0
has comment: http://stackoverflow.com/comment/40756004
answer count: 1
accepted answer: http://stackoverflow.com/a/26023228
tagged with: jquery
has comment: http://stackoverflow.com/comment/40755584
has title: How to create a color key within a javascript hover?
has comment: http://stackoverflow.com/comment/40755534

http://stackoverflow.com/comment/40797971
comment on: http://stackoverflow.com/a/26042229
score: 0
type: AnswerComment
has text: I appreciate the suggestion. I'll ask the users if they would like to use autocomplete instead.
type: Comment

http://stackoverflow.com/comment/40565776
has text: It was in my PHP file. The is not being sent anymore thank you
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25915396
type: QuestionComment

http://stackoverflow.com/q/26027349
favorite count: 0
accepted answer: http://stackoverflow.com/a/26028255
type: Question
has comment: http://stackoverflow.com/comment/41443783
has comment: http://stackoverflow.com/comment/40768083
has comment: http://stackoverflow.com/comment/40781172
has comment: http://stackoverflow.com/comment/40768109
upvote count: 1
has title: Assign new value to null javascript object members
answer count: 1
has answer: http://stackoverflow.com/a/26028255
tagged with: http://stackoverflow.com/tag/json
type: AnsweredQuestion
has body: I am having issues figuring out how to find the nulls in my object and replace them with 0's. I was able to access the correct member at one point but once it left the loop their were no longer assigned the 0. I am fairly new to working with objects in js so I am pretty lost. Any help would be greatly appreciated. var data = { 0 : { Day1: { Hours: 6, Minutes: null }, Day2: { Minutes: 45 }, Day3: { Hours: 8, Minutes: 15 }, 1 : { Day1: { Hours: 6, Minutes: 20 }, Day2: { Hours: 45 Minutes: null }, Day3: { Hours: 8, Minutes: 15 } }; for (var item in data) { for (var item2 in item) { item[item2].Hours = item[item2].Hours || 0; item[item2].Minutes = item[item2].Minutes || 0; } } //Ignore this line. Just assigning onject to angular scope when finished $scope.timeInfo = data;
downvote count: 0
tagged with: javascript
score: 1

http://stackoverflow.com/a/25993137
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25991578
has body: So thanks thriqon i understood the problem, and have come up with this solution which i'm not sure how correct it is, but it does what i need it to do. It calls for the address once they hover over the point in the background without popping up the infowindow and when they click, tada, the address is shown in the infowindow! hope this helps some people! messsssy code map.data.addListener('mouseover', function(event) { var lat = event.latLng.lat(); var lng = event.latLng.lng(); function getReverseGeocodingData(lat, lng) { var latlng = new google.maps.LatLng(lat, lng); // This is making the Geocode request var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'latLng': latlng }, function (results, status) { if (status !== google.maps.GeocoderStatus.OK) { alert(status); } // This is checking to see if the Geoeode Status is OK before proceeding if (status == google.maps.GeocoderStatus.OK) { console.log(results[0].formatted_address); address = (results[0].formatted_address); return address; } }); } getReverseGeocodingData(lat, lng); map.data.addListener('click', function(event) { infoWindow.setContent("Address: " + address + "&lt;br&gt;Vehicle: " + event.feature.getProperty('deviceID') +"&lt;br&gt; Speed: "+event.feature.getProperty('speedKPH')+"&lt;br&gt; Heading:"+event.feature.getProperty('heading')); infoWindow.setPosition(event.latLng); infoWindow.setOptions({pixelOffset: new google.maps.Size(0,-34)}); infoWindow.open(map); }); });
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25991578
has comment: http://stackoverflow.com/comment/40711415

http://stackoverflow.com/q/25894367
has comment: http://stackoverflow.com/comment/40527863
tagged with: jquery-mobile
has answer: http://stackoverflow.com/a/25894857
has comment: http://stackoverflow.com/comment/40527398
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
has comment: http://stackoverflow.com/comment/40527795
has body: Can you please advise what would be the code to disable all form input elements in the jQuery Mobile tab that are not currently visible, given that there could be nested tabs with the same functionality when the tabs are just initiated, the inputs in the first tab should be enabled, others - disabled. Selecting another tab should switch enabled inputs to those visible there could be hidden inputs (input type "hidden"), select dropdown lists etc. there could be several forms on a page Sorry I can't even imagine what to start from (confused by the docs being a novice) Thanks! See the tabs markup below. The .serializeForm() is written based on other advice here and is said to exclude the disabled controls, which I need Действия Скрипт разговора Вы должник? да нет каков ваш пол Пол: Обещаете оплатить? да нет Фиксируем обещание ФИКСИРУЕМ!!! Причина: Не брал кредит Немотивированный отказ Уверенность: Нет Да Сколько Вам лет? Возраст UPDATE the business meaning of this is a talk script for a contact center. Choosing a tab is answering a question and in a tab there could be inputs and other tabs for subsequent questions. The script is defined by a tree-like json, I'd share this if it would be a fully javascript solution, but actually tabs are built by serverside java, so javascript people won't apreciate it =)
has answer: http://stackoverflow.com/a/25894551
tagged with: jquery
has comment: http://stackoverflow.com/comment/40527337
type: Question
score: 0
answer count: 2
has title: Disable form inputs when tab is not selected in jQuery mobile

http://stackoverflow.com/comment/40720035
type: AnswerComment
type: Comment
has text: The directive is specifically for phones. Why would you want it to say something different than "telephone" for error? If you want to make similar directives (e.g. to validate zip code), you have the template above and you can validate however you need for other field requirements... The post above answers your posted question.
comment on: http://stackoverflow.com/a/25980772
score: 0

http://stackoverflow.com/comment/40680318
score: 2
has text: is that a question? It looks like you just described how to do it... if your looking for someone here to code it for you , they won't . write the code yourself , then paste it here with specific parts you're having problems with
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25979425

http://stackoverflow.com/comment/40501377
has text: haim770 previously had an answer, but he must have deleted it. Something like `data.forEach(function(i) { if (i.name === 'e3') i.value = '333' })`. Seemed like he was on to something, just needed to correct the jQuery, no?
type: Comment
comment on: http://stackoverflow.com/a/25875147
score: 0
type: AnswerComment

http://stackoverflow.com/a/25948102
score: 0
type: Answer
has body: For multiple background image you should use the following structure: background-image:url(1), url(2), ...; background-repeat: no-repeat(1), no-repeat(2) , ...; background-size: 50% 50% (1),50% 50%(2) ,...; background-position: left center(1), right center(2), ....; OR background: url(1) 600px 10px no-repeat, /* On top, like z-index: 4; */ url(2) 10px 10px no-repeat, /* like z-index: 3; */ url(3); Using JQuery var top_header = ''; $(document).ready(function () { top_header = $('header'); }); $(window).scroll(function () { var st = $(window).scrollTop(); top_header.css({ 'background-position': "left center," + "right " + (st * .5) + "px" }); }); $("#btnAdd").click(function () { var bg = $("header").css('background-image'); $("header").css('background-image', bg + ', url("http://www.wired.com/wp-content/uploads/images_blogs/rawfile/2013/11/offset_RonnyRitschel_23712-1-660x660.jpg")'); }); In demo first click Add bg and scroll page to see result DEMO
answers question: http://stackoverflow.com/q/25947946
has comment: http://stackoverflow.com/comment/40623631

http://stackoverflow.com/q/26022577
tagged with: typeahead
type: UnansweredQuestion
answer count: 0
tagged with: angular-ui-typeahead
has comment: http://stackoverflow.com/comment/40760184
type: Question
has body: I'm using AngularJS typeahead, I made an autocomplete input with it, using custom templates (to add the photo and the name of the person that I'm typing) and it's working fine. &lt;input ng-model="data.friend" typeahead="recipient as recipient.Name for recipient in loadStudents($viewValue)" typeahead-template-url="/Content/js/inbox/partials/typeaheadTemplate.html" typeahead-wait-ms="300" typeahead-editable="false" typeahead-min-length="1" type="text" class="col_100 input radius2x transition boxsizing" auto-focus /&gt; But now I need it to be for more than one person, which means a tag-like system. How can I do that with Angular typeahead?
has comment: http://stackoverflow.com/comment/40761123
tagged with: javascript
has title: AngularJS typeahead tags
score: 0
tagged with: angular-ui
tagged with: angularjs

http://stackoverflow.com/comment/40704749
score: 0
type: Comment
has text: For the problem #1 I know how to do. What I don't know is what to call on callback for plugin "Inline Google Spreadsheet Viewer" (that use Google Chart, because the spreadsheet works).
comment on: http://stackoverflow.com/a/25945818
type: AnswerComment

http://stackoverflow.com/q/25993861
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/48704352
has answer: http://stackoverflow.com/a/59842669
favorite count: 0
has answer: http://stackoverflow.com/a/59668474
has comment: http://stackoverflow.com/comment/40706121
accepted answer: http://stackoverflow.com/a/25994697
tagged with: typescript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/45127760
has answer: http://stackoverflow.com/a/45127760
has answer: http://stackoverflow.com/a/25995555
has answer: http://stackoverflow.com/a/63221157
type: Question
has title: How do I get typescript to stop complaining about functions it doesn't know about?
tagged with: javascript
score: 27
has body: I'm using Typescript for a web app that needs to use the JavaScript full screen API. The full screen API isn't officially supported yet, so you have to use vendor prefixes. Here's my code, based on the sample from MDN: function toggleFullScreen(element: JQuery) { var fs = element[0]; if (!document.fullscreenElement &amp;&amp; // alternative standard method !document.mozFullScreenElement &amp;&amp; !document.webkitFullscreenElement &amp;&amp; !document.msFullscreenElement) { // current working methods if (fs.requestFullscreen) { fs.requestFullscreen(); } else if (fs.msRequestFullscreen) { fs.msRequestFullscreen(); } else if (fs.mozRequestFullScreen) { fs.mozRequestFullScreen(); } else if (fs.webkitRequestFullscreen) { fs.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } } else { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } } } However in my IDE (Visual Studio, but this would happen anywhere), I get errors like: The property 'fullscreenElement' does not exist on value of type 'Document'. The property 'mozFullScreenElement' does not exist on value of type 'Document'. The property 'webkitFullscreenElement' does not exist on value of type 'Document'. Of course TypeScript can't know that these functions exist, but nor do I want to re-declare document as any just to get rid of these errors, because then I'll lose all the other type hints. What is the solution here? How do I get TypeScript to stop complaining but keep as many type annotations as I can?
upvote count: 27
has answer: http://stackoverflow.com/a/25994697

http://stackoverflow.com/q/25943397
score: 6
tagged with: officedev
type: Question
upvote count: 6
tagged with: javascript
has body: I am trying to use the taxonomy Picker example from Office PnP. I just want to bind one field to one managed metadata term. The errors I got are here: http://screencast.com/t/nOaTusUH4V The code I have is: Learning bootstrap body> Create project site Project name Domain As you can see I have the hidden field. And my App.js file is: // variable used for cross site CSOM calls var context; // variable to hold index of intialized taxPicker controls var taxPickerIndex = {}; //Wait for the page to load $(document).ready(function () { //Get the URI decoded SharePoint site url from the SPHostUrl parameter. var spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl')); var appWebUrl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl')); var spLanguage = decodeURIComponent(getQueryStringParameter('SPLanguage')); //Build absolute path to the layouts root with the spHostUrl var layoutsRoot = spHostUrl + '/_layouts/15/'; //load all appropriate scripts for the page to function $.getScript(layoutsRoot + 'SP.Runtime.js', function () { $.getScript(layoutsRoot + 'SP.js', function () { //Load the SP.UI.Controls.js file to render the App Chrome $.getScript(layoutsRoot + 'SP.UI.Controls.js', renderSPChrome); //load scripts for cross site calls (needed to use the people picker control in an IFrame) $.getScript(layoutsRoot + 'SP.RequestExecutor.js', function () { context = new SP.ClientContext(appWebUrl); var factory = new SP.ProxyWebRequestExecutorFactory(appWebUrl); context.set_webRequestExecutorFactory(factory); }); //load scripts for calling taxonomy APIs $.getScript(layoutsRoot + 'init.js', function () { $.getScript(layoutsRoot + 'sp.taxonomy.js', function () { //bind the taxonomy picker to the default keywords termset //$('#taxPickerKeywords').taxpicker({ isMulti: true, allowFillIn: true, useKeywords: true }, context); $('#taxPickerContinent').taxpicker({ isMulti: false, allowFillIn: false, useKeywords: false, termSetId: "51f18389-f28a-4961-a903-ee535f7c620d", leve…
tagged with: sharepoint
has answer: http://stackoverflow.com/a/26016553
has answer: http://stackoverflow.com/a/25946677
has title: Uncaught ReferenceError: Type is not defined in sp.runtime.js
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26016553
accepted answer: http://stackoverflow.com/a/26512704
favorite count: 0
has answer: http://stackoverflow.com/a/26012688
has answer: http://stackoverflow.com/a/26512704
answer count: 4
type: AnsweredQuestion
tagged with: sharepoint-apps
downvote count: 0

http://stackoverflow.com/q/25972311
score: 0
tagged with: modal-dialog
has comment: http://stackoverflow.com/comment/40669403
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40668701
has body: Let me show you an image of what I'm talking about It's really weird since I'm using a very similar code to the one shown in a tutorial. @{ ViewBag.Title = "My Routine"; Layout = "~/Views/shared/_BootstrapLayout.basic.cshtml"; } ×Close Tracking de Agua Actualice la cantidad de agua que ha ingerido: @using (Html.BeginForm()) { @Html.ValidationSummary(true) @foreach (var property in Model.VisibleProperties()) { using (Html.ControlGroupFor(property.Name)) { @Html.Label(property.Name.ToSeparatedWords(), new { @class = "control-label" }) @if (property.Name == "Quantity") { @Html.Editor(property.Name, new { @class = "input-small" }) Lts @Html.ValidationMessage(property.Name, null, new { @class = "help-inline" }) } else if (property.Name == "Date") { { Model.Date = DateTime.Now; } @Html.HiddenFor(m => m.Date); } } } Cerrar Guardar } Recomendaciones Se debe mantener una correcta hidratación cuando se realice una actividad física ya que puede producirse un aumento de temperatura corporal y sufrir un golpe de calor. Es fundamental evitar la sensación de sed bebiendo líquido a lo largo del día, ya que cuando ésta aparece quiere decir que ya se ha producido cierto grado de deshidratación en el organismo. Se deben consumir alimentos ricos en agua como las frutas y verduras, caldos, sopas, gazpachos… Can someone enlighten me as to why this is happening and how can I get rid of it?
has comment: http://stackoverflow.com/comment/40669527
answer count: 0
type: Question
tagged with: c#
has title: Bootstrap Modal appears inside another scrollable window
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/40670117

http://stackoverflow.com/a/25995253
type: Answer
has comment: http://stackoverflow.com/comment/40708834
has comment: http://stackoverflow.com/comment/40714633
answers question: http://stackoverflow.com/q/25995220
accepted answer of: http://stackoverflow.com/q/25995220
has body: Use: var len=$('.grid-items .item').length; $('.grid-items .item').each(function(i){ $(this).css('z-index',len-i) }); Solution 2: Much Better approach by Squint. var len=$('.grid-items .item').length; $('.grid-items .item').css('z-index', function(i){ return len-i; }) Working Demo
upvote count: 5
has comment: http://stackoverflow.com/comment/40709149
has comment: http://stackoverflow.com/comment/40708636
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40709676
has comment: http://stackoverflow.com/comment/40709928

http://stackoverflow.com/comment/40593599
comment on: http://stackoverflow.com/q/25930460
type: Comment
type: QuestionComment
score: 0
has text: Are you trying to load JSON data or a fragment of HTML?

angular-ui-bootstrap
tags question: http://stackoverflow.com/q/25957266
tags question: http://stackoverflow.com/q/25979540
tags question: http://stackoverflow.com/q/26019419
type: Tag
tags question: http://stackoverflow.com/q/25881775
tags question: http://stackoverflow.com/q/25996436
tags question: http://stackoverflow.com/q/25967970
tags question: http://stackoverflow.com/q/25995409
tag name: angular-ui-bootstrap
tags question: http://stackoverflow.com/q/26006595

http://stackoverflow.com/comment/40580679
type: QuestionComment
comment on: http://stackoverflow.com/q/25923319
type: Comment
has text: @turkey3 you wrote `current[menu][0].src`? Why do you think that should work?
score: 0

http://stackoverflow.com/comment/40539341
has text: Would this register the click if the user was interacting with any child elements like datepickers, spinners, or text field?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25900946

http://stackoverflow.com/q/25953156
tagged with: php
has answer: http://stackoverflow.com/a/55771841
type: Question
has answer: http://stackoverflow.com/a/25953224
score: 0
answer count: 2
has title: .wrapAll() is not working properly in jQuery
tagged with: javascript
tagged with: jquery
has body: I have this code: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <a href="<?php the_permalink(); ?>"> <img class="box-img" src="<?php the_field('postGridImage'); ?>" alt="<?php the_title();?>" title="<?php the_title();?>"> <?php the_field('kitName'); ?> <?php if ( has_term( 'none', 'countries' ) ) {} else { ?> <img class="country-flag" src="<?php bloginfo('stylesheet_directory'); ?>/images/country_flags/<?php $terms = get_the_terms( $post->ID , 'countries' ); foreach ( $terms as $term ) { echo $term->name; } ?> Flag.png" alt="><?php $term = get_field('country_of_origin');?><?php echo $term->name; ?> Flag"> <?php } ?> <div class="label-feature scale CB-<?php $terms = get_the_terms( $post->ID , 'scales' ); foreach ( $terms as $term ) { echo $term->slug; } ?>"> <?php $terms = get_the_terms( $post->ID , 'scales' ); foreach ( $terms as $term ) { echo '' . $term->name . ''; } ?> <div class="label-feature manufacturer CB-<?php $terms = get_the_terms( $post->ID , 'manufacturers' ); foreach ( $terms as $term ) { echo $term->slug; } ?>"> <?php $terms = get_the_terms( $post->ID , 'manufacturers' ); foreach ( $terms as $term ) { echo '' . $term->name . ''; } ?> <div class="label-feature country CB-<?php $terms = get_the_terms( $post->ID , 'countries' ); foreach ( $terms as $term ) { echo $term->slug; } ?>"> <?php $terms = get_the_terms( $post->ID , 'countries' ); foreach ( $terms as $term ) { echo '' . $term->name . ''; } ?> <?php if ( has_term( '', 'product_categories' ) ) { ?> <div class="label-feature product-categories <?php $terms = get_the_terms( $post->ID , 'product_categories' ); foreach ( $terms as $term ) { echo 'CB-' . $term->slug . ' '; } ?>"> <?php $terms = get_the_terms( $post->ID , 'product_categories' ); foreach ( $terms as $term ) { echo '' . $term->name . ''; } ?> <?php } else {}?> <?php if ( has_term( '', 'vehicle_categories' ) ) { ?> <div class="label-feature vehicle-categories <?php $terms = get_the_terms( $post->ID , 'vehicle_categorie…
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40632002
tagged with: wrapall
type: UnansweredQuestion

regex
tags question: http://stackoverflow.com/q/26006908
tags question: http://stackoverflow.com/q/25972515
tags question: http://stackoverflow.com/q/25910613
tags question: http://stackoverflow.com/q/25895272
tags question: http://stackoverflow.com/q/25888766
tags question: http://stackoverflow.com/q/25918914
tags question: http://stackoverflow.com/q/25973582
tags question: http://stackoverflow.com/q/25959320
tags question: http://stackoverflow.com/q/26021937
tags question: http://stackoverflow.com/q/25968615
tags question: http://stackoverflow.com/q/25960473
tags question: http://stackoverflow.com/q/25898061
tags question: http://stackoverflow.com/q/25996046
tags question: http://stackoverflow.com/q/25987451
tags question: http://stackoverflow.com/q/25893899
tag name: regex
tags question: http://stackoverflow.com/q/25918391
tags question: http://stackoverflow.com/q/25913175
tags question: http://stackoverflow.com/q/25949017
tags question: http://stackoverflow.com/q/26023754
tags question: http://stackoverflow.com/q/26020079
tags question: http://stackoverflow.com/q/25986122
tags question: http://stackoverflow.com/q/25895168
tags question: http://stackoverflow.com/q/25987632
tags question: http://stackoverflow.com/q/25928086
tags question: http://stackoverflow.com/q/25970794
tags question: http://stackoverflow.com/q/25894941
tags question: http://stackoverflow.com/q/25978320
tags question: http://stackoverflow.com/q/25917071
tags question: http://stackoverflow.com/q/25976078
tags question: http://stackoverflow.com/q/25972417
tags question: http://stackoverflow.com/q/26029096
tags question: http://stackoverflow.com/q/25911820
tags question: http://stackoverflow.com/q/25977309
tags question: http://stackoverflow.com/q/25904704
tags question: http://stackoverflow.com/q/25927329
tags question: http://stackoverflow.com/q/25910808
tags question: http://stackoverflow.com/q/26011214
tags question: http://stackoverflow.com/q/26000415
tags question: http://stackoverflow.com/q/25965439
tags question: http://stackoverflow.com/q/25950194
tags question: http://stackoverflow.com/q/26000752
tags question: http://stackoverflow.com/q/25893066
tags question: http://stackoverflow.com/q/25897866
tags question: http://stackoverflow.com/q/25937396
tags question: http://stackoverflow.com/q/26004412
tags question: http://stackoverflow.com/q/25999327
tags question: http://stackoverflow.com/q/25914124
tags question: http://stackoverflow.com/q/25922292
tags question: http://stackoverflow.com/q/25970543
tags question: http://stackoverflow.com/q/25932658
tags question: http://stackoverflow.com/q/25881193
tags question: http://stackoverflow.com/q/26025463
tags question: http://stackoverflow.com/q/26007149
tags question: http://stackoverflow.com/q/25963372
tags question: http://stackoverflow.com/q/25875809
tags question: http://stackoverflow.com/q/25940895
tags question: http://stackoverflow.com/q/25915873
tags question: http://stackoverflow.com/q/25885280
tags question: http://stackoverflow.com/q/26030209
tags question: http://stackoverflow.com/q/25911524
tags question: http://stackoverflow.com/q/25986391
tags question: http://stackoverflow.com/q/25877030
tags question: http://stackoverflow.com/q/25931155
tags question: http://stackoverflow.com/q/25921559
tags question: http://stackoverflow.com/q/26014078
tags question: http://stackoverflow.com/q/25950324
tags question: http://stackoverflow.com/q/26001614
tags question: http://stackoverflow.com/q/25912692
tags question: http://stackoverflow.com/q/25877376
tags question: http://stackoverflow.com/q/25922995
tags question: http://stackoverflow.com/q/26001437
tags question: http://stackoverflow.com/q/25883442
tags question: http://stackoverflow.com/q/25900961
tags question: http://stackoverflow.com/q/25998790
tags question: http://stackoverflow.com/q/26022975
tags question: http://stackoverflow.com/q/25967464
tags question: http://stackoverflow.com/q/26033204
tags question: http://stackoverflow.com/q/25993976
tags question: http://stackoverflow.com/q/25988636

http://stackoverflow.com/q/25882758
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40508084
linked to: http://stackoverflow.com/q/21099822
tagged with: ruby-on-rails
tagged with: forms
has comment: http://stackoverflow.com/comment/40507504
linked to: http://stackoverflow.com/q/5221227
type: Question
score: 0
tagged with: javascript
tagged with: wicked-gem
has body: I'm building a wizard form with wicked gem. Basically, i need to add two button on one form page. Wicked gem suggests we can use link_to, but link_to doesn't save the form. and then we wrote a javascript function for link_to so that clicking button will submit, but the problem was the two buttons both redirect to the next same step instead of the steps we specified. Now we find this link saying using button_to would work. Here comes the problem, first, here's our code, %td =button_to "Add Task", project_wizard_path(@project, :add_task), :class =&gt; "btn btn-primary" %td =button_to "Proceed To Budget", project_wizard_path(@project, :budget_estimates), :class =&gt; "btn btn-primary" it is fine for the "add task" button, but for the second buttion, it goes to the url "projects/project_name/wizard/budget_estimates" and says routing error. This link suggests we should add method: :get, and yes it does work but it doesn't save the form and also the url will be with all the parameters if data is saved. So i also tried to add method: :put, it skips the budge_estimates and goes to the next step after budget_estimates. So what would be problem? the request Post and Get should be almost same i suppose and they are supposed to submit the form, right? need some help here! :) :o
has title: two submit buttons in a wizard form page, but not working and saving data
answer count: 0

http://stackoverflow.com/a/25898101
downvote count: 0
has comment: http://stackoverflow.com/comment/40535097
type: Answer
has comment: http://stackoverflow.com/comment/40611205
answers question: http://stackoverflow.com/q/25897664
has comment: http://stackoverflow.com/comment/40535717
has comment: http://stackoverflow.com/comment/40534655
score: 1
accepted answer of: http://stackoverflow.com/q/25897664
has comment: http://stackoverflow.com/comment/40534730
upvote count: 1
has comment: http://stackoverflow.com/comment/40535478
has body: Try add in your manifest.json: "permissions": [ "http://*.disk.yandex.net/" ] Read about: https://developer.chrome.com/extensions/xhr Read this in Yandex API The only exception is for Chromium-based browser extensions: Origin headers that begin with the schema chrome-extension:// are simply ignored. So the only thing missing was set permissions in your manifest.json. Note: PUT is only part of the instruction in "verb" of the HTTP protocol, it alone nothing. This is what sets the SERVER-SIDE language. PUT and POST are similar. POST requires the times (depends on how you will send the file, eg. RAW): .overrideMimeType("multipart/form-data"); .setRequestHeader("Content-type", "application/x-www-form-urlencoded"); In others words, try this: xmlhttp.open("PUT", p.href, false); if (xmlhttp &amp;&amp; xmlhttp.overrideMimeType) { xmlhttp.overrideMimeType("multipart/form-data"); } xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(formData); Note: Prefer use Async, like this: xmlhttp.open("PUT", p.href, true);//Async requires "true" xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { console.log("OK", xmlhttp.responseText); } else if (xmlhttp.readyState == 4) { console.log("ERROR", xmlhttp.status); } }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(formData); Note: Async xmlhttp.open("PUT", p.href, true); Note: Sync xmlhttp.open("PUT", p.href, false); Error 500 can be a problem in htaccess (if apache) or other config in your server.
has comment: http://stackoverflow.com/comment/40535368
type: AcceptedAnswer

http://stackoverflow.com/q/26015010
has comment: http://stackoverflow.com/comment/40745605
has answer: http://stackoverflow.com/a/27956151
has title: angularjs form reset error
has answer: http://stackoverflow.com/a/34991468
has answer: http://stackoverflow.com/a/60049997
score: 40
has answer: http://stackoverflow.com/a/32013005
has answer: http://stackoverflow.com/a/26015723
type: Question
upvote count: 40
possible better answer: http://stackoverflow.com/a/27956151
linked to: http://stackoverflow.com/q/18648427
has answer: http://stackoverflow.com/a/35204424
tagged with: javascript
has answer: http://stackoverflow.com/a/26015103
answer count: 13
has answer: http://stackoverflow.com/a/35478333
has answer: http://stackoverflow.com/a/35357358
tagged with: validation
has answer: http://stackoverflow.com/a/31600032
has answer: http://stackoverflow.com/a/35879747
has body: i'm trying to do a form with validations using angularjs and so far i did a good job. But when i commit my reset button all the fields reset except for the error messages i get from my validation part. How can i get rid of all the fields and error messages when i reset my form. This is how it is when i press my reset button this is my code Give us your Feedback Name* You name is required. Email Enter a valid email. Description Description is too short. Description is too long. Reset Submit My controller .controller('ContactCtrl', function($scope,$state,$ionicPopup, $timeout) { $scope.showfeedback = function() { $state.go('app.sfeedback'); }; $scope.submitForm = function(isValid) { $scope.submitted = true; // check to make sure the form is completely valid if (!isValid) { var alertPopup = $ionicPopup.alert({ title: 'Invalid data entered!', }); } else { var alertPopup = $ionicPopup.alert({ title: 'Feedback submitted', }); } }; $scope.reset = function() { var original = $scope.user; $scope.user= angular.copy(original) $scope.userForm.$setPristine() }; })
downvote count: 0
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/26058835
has comment: http://stackoverflow.com/comment/40748061
has comment: http://stackoverflow.com/comment/40747151
has answer: http://stackoverflow.com/a/39236487
accepted answer: http://stackoverflow.com/a/26015103
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40744687
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40744651

http://stackoverflow.com/q/25960464
type: UnansweredQuestion
tagged with: css
type: Question
tagged with: javascript
has title: JavaScript templates vs web components
score: 0
tagged with: web-component
answer count: 1
tagged with: templates
has body: Newbie in web dev. I need to implement a sliding window with more data when the user presses on item within a graph. Already have this nice slidingview with css and all now trying to figure out how to populate data in that on each item press. Saw javascript template and would like to ask would that be a good way to approach? Maybe I should implement web component for that sliding view? I'm not sure I understand the differences (besides css is encapsulated in the web component..)
tagged with: client-side
has answer: http://stackoverflow.com/a/28301474

http://stackoverflow.com/a/26012876
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/40741280
has comment: http://stackoverflow.com/comment/40741075
upvote count: 7
has body: The closest equivalent is probably Array.prototype.filter which allows you to test each element of an array with a function: var elementToExclude = something; arrayOfElements.filter(function (elem) { return elem !== elementToExclude; }).forEach(doSomething);
has comment: http://stackoverflow.com/comment/40741135
type: Answer
answers question: http://stackoverflow.com/q/26012799
has comment: http://stackoverflow.com/comment/109016596

http://stackoverflow.com/comment/40706598
comment on: http://stackoverflow.com/q/25993763
has text: Well, I didn't notice the `form`. Actually because instead of rendered HTML (which is important and should be shown) there is `@using (Html.BeginForm())` and so on...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25953541
downvote count: 0
favorite count: 0
has body: I have a form and I want to catch it submission, check validation of data and than submit form to the action inside the HTML form. Send Message and my js: var app = angular.module('bloompyApp', []); app.controller("contactCtrl", function($scope, $http) { $scope.email = ""; $scope.name = ""; $scope.message = ""; $scope.left = function() {return 100 - $scope.message.length;}; $scope.clear = function() {$scope.message = "";}; $scope.save = function(ev) { ev.preventDefault(); console.log(angular.element(document.querySelector('body'))); if ($scope.contactForm.$valid) { $http.get("/posts/") .success(function(response) {console.log(response);}); } }; });
tagged with: angularjs
upvote count: 3
type: UnansweredQuestion
has title: angularjs get form action and submit to it
type: Question
score: 3
has answer: http://stackoverflow.com/a/25953581
tagged with: javascript
has answer: http://stackoverflow.com/a/25953577
has answer: http://stackoverflow.com/a/25953606
answer count: 3

http://stackoverflow.com/a/26016806
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26010514
has body: I have given up trying to use dojo/aspect. I have instead opted to modify the code of our custom base widget to incorporate snippets such as the one below. They are automatically removed when creating a release-build in which console-calls and their content are removed: console.log( function(){ (this._debugInfo = this._debugInfo|| {}).postCreate=true; }.call(this) ); A simple method in boilerplate code I added near the unittests is available so that I can call it on all mycompany.widgets.basewidget instances in their respective unittests.

http://stackoverflow.com/comment/40566453
type: Comment
has text: If you're using jQuery then go for it but dont add jQuery to your site just for ajax. Using the XmlHttpRequest object is pretty straight-forward and works in all browsers. Some more info on using it here https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
comment on: http://stackoverflow.com/a/25915705
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40611746
type: Comment
has text: @General_Twyckenham thank you both for your comments. I have not been able to try the fixes out yet. But yes, what is happening is that once the accordion was put into the loop and one panel is clicked the active class is applied to all of them.
comment on: http://stackoverflow.com/q/25925297
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40713640
comment on: http://stackoverflow.com/q/25981677
score: 0
has text: Even if I'm calling again with the 'onclick' event?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25973300
has comment: http://stackoverflow.com/comment/40668810
type: Question
has title: Can I use the 'in' keyword to test a property in an (tree) object
linked to: http://stackoverflow.com/q/86513
tagged with: javascript
has answer: http://stackoverflow.com/a/25973994
has answer: http://stackoverflow.com/a/25973403
score: 0
answer count: 2
type: UnansweredQuestion
has body: Let's say I've got the following object: Variables.settings.backend.url = 'http://localhost'; What I would do to test is url is available, is do to the following: if ('settings' in Variables &amp;&amp; 'backend' in Variables.settings &amp;&amp; 'url' in Variables.settings.backend) { // true } This is quite cumbersome. If this was PHP, i could just do if (!empty($variables['settings']['backend']['url']) { //true } Can this be done any simpler in JS?
has comment: http://stackoverflow.com/comment/40668778

express
tags question: http://stackoverflow.com/q/25941378
tags question: http://stackoverflow.com/q/25967425
tags question: http://stackoverflow.com/q/25920955
tags question: http://stackoverflow.com/q/25966676
tags question: http://stackoverflow.com/q/25891768
tags question: http://stackoverflow.com/q/25953179
tags question: http://stackoverflow.com/q/25941010
tags question: http://stackoverflow.com/q/25952639
tags question: http://stackoverflow.com/q/25979402
tags question: http://stackoverflow.com/q/25891506
tags question: http://stackoverflow.com/q/25984334
tags question: http://stackoverflow.com/q/25874666
tags question: http://stackoverflow.com/q/25990837
tags question: http://stackoverflow.com/q/25934414
tags question: http://stackoverflow.com/q/25959753
tags question: http://stackoverflow.com/q/25988995
tags question: http://stackoverflow.com/q/25955715
tags question: http://stackoverflow.com/q/25954540
tags question: http://stackoverflow.com/q/25893033
tags question: http://stackoverflow.com/q/25874241
tags question: http://stackoverflow.com/q/25952046
tags question: http://stackoverflow.com/q/25915208
tags question: http://stackoverflow.com/q/25955405
tags question: http://stackoverflow.com/q/25940855
tags question: http://stackoverflow.com/q/25952255
tags question: http://stackoverflow.com/q/25961981
tags question: http://stackoverflow.com/q/25961006
tag name: express
tags question: http://stackoverflow.com/q/25949378
tags question: http://stackoverflow.com/q/25944668
type: Tag
tags question: http://stackoverflow.com/q/25922847
tags question: http://stackoverflow.com/q/25951397
tags question: http://stackoverflow.com/q/25956589
tags question: http://stackoverflow.com/q/25960473
tags question: http://stackoverflow.com/q/26025068
tags question: http://stackoverflow.com/q/25993668
tags question: http://stackoverflow.com/q/25957313
tags question: http://stackoverflow.com/q/25982818

http://stackoverflow.com/a/26022394
type: AcceptedAnswer
downvote count: 0
score: 6
has body: You might consider providing your own CSS to adjust the Grid. I've provided an example here. The main CSS that would interest you being: .k-grid table { table-layout: fixed; } .k-grid tbody tr{ height: 50px; } .k-grid td{ white-space: nowrap; text-overflow: ellipsis; } You can read more about this on the Telerik forums
type: Answer
has comment: http://stackoverflow.com/comment/40778740
upvote count: 6
accepted answer of: http://stackoverflow.com/q/26017895
answers question: http://stackoverflow.com/q/26017895
has comment: http://stackoverflow.com/comment/40758538

http://stackoverflow.com/a/26021740
has comment: http://stackoverflow.com/comment/40758110
has comment: http://stackoverflow.com/comment/40773489
has comment: http://stackoverflow.com/comment/40758817
downvote count: 0
score: 1
has body: The each function accepts two parameters, the first is the collection (called result here), the second is an anonymous function which you want to add key, value parameters to, then you'll be able retrieve those key/value pairs and iterate over them. jsfiddle is here $(document).ready(function() { $.ajax({ url: 'http://openexchangerates.org/api/currencies.json', dataType: 'jsonp', success: function(result) { $.each(result, function(key, value) { $("#drpDown").append( $('&lt;option/&gt;', { value: key, html: value }) ); }); } }); });
answers question: http://stackoverflow.com/q/26021524
has comment: http://stackoverflow.com/comment/40758030
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40780609

http://stackoverflow.com/comment/40620025
has text: what is the actual problem you are facing ... your form in not submitting or something else??
comment on: http://stackoverflow.com/q/25945655
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/40624065
has text: Than you for your answer Apsillers. Already I used "localStorage.getObject("user").name". Thanks anyway. Have a nice day..
type: Comment
comment on: http://stackoverflow.com/a/25941454
score: 0
type: AnswerComment

http://stackoverflow.com/a/25989792
has comment: http://stackoverflow.com/comment/40782657
has comment: http://stackoverflow.com/comment/69028228
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/69077469
has comment: http://stackoverflow.com/comment/69078316
accepted answer of: http://stackoverflow.com/q/25988293
type: Answer
upvote count: 7
has comment: http://stackoverflow.com/comment/69149300
score: 7
has body: In my case, I use grunt to inject a config file (shared with the server) in an angular constant module : Using grunt-preprocess : I having a config.tpl.js with : angular.module('app.config', []) .constant('appConfig', { // clientside specific constants var1 : 'value1', var2 : [1,2,3], sharedVars : /* @echo SHARED_VARS */ }); Then, in my gruntFile : preprocess: { options: { context: { SHARED_VARS: grunt.file.read('config.json'), } }, config: { src: 'src/config.tpl.js', dest: 'src/config.js' // true file generated and loaded in index.html } }, That way you can inject a full config file in an angular constant module, or pick only the vars you want.
answers question: http://stackoverflow.com/q/25988293

http://stackoverflow.com/q/26019362
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26019501
has title: Why this toggle menu dont work?
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/26019395
has body: I found a toggle menu and it looks really nice,but when i tried it,it didnt worked as i expected,because he is not toggling: Here is the original script click Even if i just copy and paste it,it still not working and i dont know why (here is another try in jsfiddle)click First i thought it must be something with the syntax: &lt;script src="myscripts.js"&gt;&lt;/script&gt; But after i tried in jsfiddle too,i realize its not and i cant figure out what seems to be the problem..
possible better answer: http://stackoverflow.com/a/26019466
has answer: http://stackoverflow.com/a/26019466
downvote count: 3
score: -3
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26019395

http://stackoverflow.com/comment/40677241
type: QuestionComment
comment on: http://stackoverflow.com/q/25977784
has text: i need to pass this callback to other method
score: 0
type: Comment

http://stackoverflow.com/comment/40585334
comment on: http://stackoverflow.com/a/25926163
has text: Fantastic, that worked, thanks. I suppose that technically inputName[] is not really a javascript array, but is instead written that like for PHP purposes.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26013489
accepted answer of: http://stackoverflow.com/q/26012729
answers question: http://stackoverflow.com/q/26012729
type: Answer
has comment: http://stackoverflow.com/comment/40743015
downvote count: 0
score: 1
has body: Not sure what you are trying to achieve. In IE you can successfully do this: var id = document.selection.createRange().parentElement().id Like this: $("#myButton").on("click", function () { var node = document.selection.createRange().parentElement(); if (node &amp;&amp; node.id) { window.console &amp;&amp; console.log("node_ " + node.id) } }); in Chrome it seems to be trickier. I have a solution which you may be able to use. It will break if there are more than one field with the same value FIDDLE $(document).on("mouseup", "input", function () { var node = document.selection ? document.selection.createRange().parentElement() : window.getSelection().focusNode.parentNode; if (!node.id) { var sel = window.getSelection().toString(); $("input").each(function () { if (this.value.indexOf(sel) != -1) { node = this; return false; } }); } window.console &amp;&amp; console.log("node:" + node.id) });
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25931856
tagged with: java-8
has answer: http://stackoverflow.com/a/25934962
tagged with: java
has body: I am newbie to nashorn engine.In my java code i specify the javascript path in filereader but it throws filenotfoundexception in runtime.If i put my javascript in desktop and give that location my code is works.but If i put my javascript function in one of the folder in project it's not work throws file not found exception. Here is my error code engine.eval(new FileReader("res/nashorn1.js")); Here is my working code engine.eval(new FileReader("C:/Users/selva/Desktop/res/nashorn1.js")); I am using java stand alone application. My Code public class Nashorn1 { public static void main(String[] args) throws Exception { ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn"); engine.eval(new FileReader("C:/Users/selva/Desktop/res/nashorn1.js")); Invocable invocable = (Invocable) engine; Object result = invocable.invokeFunction("fun1", "Peter Parker"); System.out.println(result); System.out.println(result.getClass()); invocable.invokeFunction("fun2", new Date()); invocable.invokeFunction("fun2", LocalDateTime.now()); invocable.invokeFunction("fun2", new Person()); } } nashorn1.js var fun1 = function(name) { print('Hi there from Javascript, ' + name); return "greetings from javascript"; }; var fun2 = function (object) { print("JS Class Definition: " + Object.prototype.toString.call(object)); }; Any help would be Greatly Appreciated!!
upvote count: 1
downvote count: 1
type: Question
tagged with: nashorn
tagged with: javascript
has title: File not found exception in executing javascript in Nashorn
score: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25992987
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25992915
has comment: http://stackoverflow.com/comment/40704634
has body: Your named function needs to take a parameter e, just like the anonymous function does: function myFunction(e) { // do some work e.stopPropagation(); } $("body").on("click", "#grumpy", myFunction);
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25992915

http://stackoverflow.com/comment/40639509
type: AnswerComment
has text: I'm looking for a solution that doesn't involve another plug-in but thanks anyway.
type: Comment
comment on: http://stackoverflow.com/a/25956365
score: 0

http://stackoverflow.com/comment/40770809
has text: `new Date('2014-10-24 00:00:00')` returns *invalid date* in Safari and Firefox.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26028466

http://stackoverflow.com/q/25915465
linked to: http://stackoverflow.com/q/14994391
accepted answer: http://stackoverflow.com/a/25916404
has body: I'm new to angular, been trying to fix this for about an hour now but can't get it working. I have some html code: 8 ... The notification pop-dialog is hidden by default and the following JQuery shows it when the .notification-dropdown is clicked $(document).on("click", ".notification-dropdown", function (e) { e.preventDefault(); e.stopPropagation(); // hide all other pop-dialogs $(".notification-dropdown .pop-dialog").removeClass("is-visible"); $(".notification-dropdown .trigger").removeClass("active"); var $dialog = $(this).children(".pop-dialog"); $dialog.toggleClass("is-visible"); }); For some reason, this code does not work when I put the html into AngularJS's ng-view loaded as a partial into a main html document. I've already loaded the JQuery lib before Angular. I've tried to shorten the code for simplicity, I can show more code if needed.
upvote count: 1
answer count: 1
has title: JQuery not working on elements inside ng-view
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25916404
has comment: http://stackoverflow.com/comment/40565932
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25886973
has answer: http://stackoverflow.com/a/25888982
has body: I am using iScroll v5.1.1, and I want event when user started and ended scrolling activity on the page. Here is my javascript, myScroll = new IScroll('#scrollinginside', { scrollbars: true, mouseWheel: true, interactiveScrollbars: true, shrinkScrollbars: 'scale', fadeScrollbars: false, checkDOMChanges: true, onScrollStart: function () { console.log('scrolling is started'); }, onScrollEnd: function () { console.log('scrolling stopped'); } }); But when I tried to scroll across the page no event is registred. Whats wrong with my javascript ? Am I missing something ?
answer count: 1
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 1
upvote count: 1
has title: get event on scrollstart and scrollend - iscroll
type: Question
accepted answer: http://stackoverflow.com/a/25888982
tagged with: iscroll
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25957050
tagged with: javascript
tagged with: webgl
has comment: http://stackoverflow.com/comment/40645937
score: 0
has comment: http://stackoverflow.com/comment/40645977
tagged with: 3d
upvote count: 1
downvote count: 1
answer count: 1
has title: Mesh becomes very angular after substracting with ThreeCSG
tagged with: web
has answer: http://stackoverflow.com/a/25959721
favorite count: 0
has body: I experience a problem when substracting a mesh from an other mesh using ThreeCSG. My main mesh is a ring and the mesh to substract is a diamond. Before the process to scene looks like this: Mesh fine. But after substracting the meshes the ring becomes angular: Mesh Broken. I do apply the same material / shading as before. Here is the code I use: var ring_bsp = new ThreeBSP(ring); var stone_bsp = new ThreeBSP(stone); var substract_bsp = ring_bsp.subtract( stone_bsp ); var result = substract_bsp.toMesh( ringMaterial ); result.geometry.computeVertexNormals(); result.material.needsUpdate = true; result.geometry.buffersNeedUpdate = true; result.geometry.uvsNeedUpdate = true; result.scale.x = result.scale.y = result.scale.z = 19; scene.remove(ring); scene.add(result); Update one: If I remove "result.geometry.computeVertexNormals();" the result looks even worst: link. Update two: I created a jsfiddle with a minimal case Update three: After looking some more into the problem and Wilts last update, I saw that after I use ThreeBSP the vertexes are messed up. You can see this very well in this fiddle. Update four: The problem seems to be within the "fromGeometry / toGeometry" functions as I get the same broken mesh if I don't do any substraction at all.
type: UnansweredQuestion
tagged with: three.js
type: Question

http://stackoverflow.com/q/25979812
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/25981188
tagged with: javascript
has title: How to return string with accent from controller to View via Ajax JSon
answer count: 2
has comment: http://stackoverflow.com/comment/40681834
possible better answer: http://stackoverflow.com/a/25980286
tagged with: non-ascii-characters
has answer: http://stackoverflow.com/a/25980286
has answer: http://stackoverflow.com/a/25981188
type: AnsweredQuestion
has body: My problem is that the words that are returned from my controller to view via JsonResult are losing their accent, instead of accent it's getting converted for a symbol. This word "Finalizar_Saída" is been wrong rendered this way = "Finalizar_Sa�da". My initial return call: return Json(Object); I Already tried things like this: Add in HTML page: &lt; META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;script src="@Url.Content("~/path/fileName.js")" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; Add in document javascript: contentType: "application/json; charset=ISO-8859-1", dataType: "json", Add in web.config this text: &lt;globalization culture="pt-BR" uiCulture="pt-BR" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" fileEncoding="iso-8859-1" /&gt; or &lt;globalization enableClientBasedCulture="false" requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" responseHeaderEncoding="utf-8" enableBestFitResponseEncoding="true" culture="es-MX" uiCulture="es-MX"/&gt; Add in C# : I've changed the return call like this: Json(Object, "application/json", Encoding.UTF8); Do someone know a way to figure this out?
score: 0
tagged with: http://stackoverflow.com/tag/json
tagged with: asp.net-mvc-3

http://stackoverflow.com/comment/40508743
comment on: http://stackoverflow.com/a/25884216
score: 0
type: Comment
has text: hi Zee Tee , Thanks for reply but how can I use this in my case?
type: AnswerComment

http://stackoverflow.com/comment/40607305
type: Comment
comment on: http://stackoverflow.com/a/25923975
has text: Thank you! I was able to take that bit of info and chart out specific days. I'm updating my original post
type: AnswerComment
score: 0

http://stackoverflow.com/comment/131249118
type: Comment
has text: If I navigate back and then forward in the same tab, the page's onload would be triggered and we would wrongly consider the tab as duplicated right?
comment on: http://stackoverflow.com/a/64747261
type: AnswerComment
score: 0

http://stackoverflow.com/a/25953612
has comment: http://stackoverflow.com/comment/40632833
has comment: http://stackoverflow.com/comment/40632852
has comment: http://stackoverflow.com/comment/40632909
answers question: http://stackoverflow.com/q/25953444
has body: I know this is an ugly solution: $(window).scroll(function() { $('#message').text("Current scroll position: " + $(this).scrollTop());//added to see the scroll position var pixels_to_top = $(this).scrollTop(); var your_value_min = 810; var your_value_max = 857; if (pixels_to_top &gt; your_value_min &amp;&amp; pixels_to_top&lt;your_value_max){ $("body").css("overflow","auto"); } else{ $("body").css("overflow","hidden"); } }); http://jsfiddle.net/Loy6z2kt/18/ You have to adjust the min and max values to your needs.
type: Answer
has comment: http://stackoverflow.com/comment/40633151
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40637516

http://stackoverflow.com/comment/40724156
type: AnswerComment
score: 0
type: Comment
has text: @bokan: Also, if I read this correctly, I do not have any IE 10 to test on at the moment, using absolute URI on IE makes it fail. So one have to do a old ugly browser test ... http://stackoverflow.com/questions/18259032/using-base-tag-on-a-page-that-contains-svg-marker-elements-fails-to-render-marke#comment26801522_18265336 Real fun. In other words, if at all possible, try to get rid of ` `.
comment on: http://stackoverflow.com/a/25999917

http://stackoverflow.com/a/58150722
answers question: http://stackoverflow.com/q/25962958
has body: This is actually coming very late, but I thought I should share, in index.html in 1.js fn1 = function() { alert("external fn clicked"); } in 2.js fn1()
upvote count: 7
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/102688277
score: 6

http://stackoverflow.com/comment/40633134
comment on: http://stackoverflow.com/a/25935546
score: 0
type: AnswerComment
type: Comment
has text: ahh, I think I undrstand now. Would you be able to tell me how this compares to the two solutions given in the link Spokey gave (http://stackoverflow.com/questions/2854407/javascript-jquery-window-resize-how-to-fire-after-the-resize-is-completed), specifically, answers from CMS and brahn. Not quite sure which is best

http://stackoverflow.com/q/25983484
score: 1
accepted answer: http://stackoverflow.com/a/25983520
type: Question
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25983520
favorite count: 0
linked to: http://stackoverflow.com/q/26024052
has title: Using parse.com how do I concatenate a query to return results from two separate query.equalTo?
has body: Using Parse.com and javaScript SDK. I've got the following query. I need it to return results for both query.equalTo("fromUser", currentUser); query.equalTo("toUser", currentUser); As per below it can only return either or, not both. How do I concatenate these too make it work with both? Do I do one query then nest another below it? or is there a better approach? var currentUser = Parse.User.current(); var FriendRequest = Parse.Object.extend("FriendRequest"); var query = new Parse.Query(FriendRequest); query.include('toUser'); query.include('SentTo'); query.include("myBadge"); query.equalTo("fromUser", currentUser); query.equalTo("toUser", currentUser); query.equalTo("status", "Connected"); query.find({
tagged with: parse-platform
type: AnsweredQuestion

http://stackoverflow.com/a/25923931
has body: I guess there is a simpler way, but i wrote a small function. function foo() { var x = 'My str "hello world" (cool str though)'.split(' '); var newx = []; for (var i=0,k=0;i<x.length;i++,k++){ if(x[i].indexOf('"') > -1){ newx[k] = x[i]; i++; while( i<x.length ){ newx[k] = newx[k] + ' ' + x[i]; if(x[i].indexOf('"') > -1)break; i++; } continue; } else if(x[i].indexOf('(') > -1){ newx[k] = x[i]; i++; while( i<x.length ){ newx[k] = newx[k] + ' ' + x[i]; if(x[i].indexOf(')') > -1)break; i++; } continue; } else newx[k]=x[i]; } alert(newx); } bar
type: Answer
answers question: http://stackoverflow.com/q/25922837
score: 0

square-bracket
tags question: http://stackoverflow.com/q/25926081
type: Tag
tag name: square-bracket

http://stackoverflow.com/q/25952825
linked to: http://stackoverflow.com/q/400212
has comment: http://stackoverflow.com/comment/40631286
has body: I want to save the text automatically , how can i do that Code ; notifications.notify( { title: "Click to copy command to clipboard", text: trimmedCmd, iconURL: hdsEnabled, data: command, onClick: function (data) { clipboard.set(data); } });
has comment: http://stackoverflow.com/comment/40631350
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: JS write to file
has comment: http://stackoverflow.com/comment/40631663
has answer: http://stackoverflow.com/a/25953322
has answer: http://stackoverflow.com/a/25953034
type: UnansweredQuestion

http://stackoverflow.com/q/25990626
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25993998
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40705056
tagged with: javascript
has comment: http://stackoverflow.com/comment/40703440
has body: I have a folder 'test' in the root of my hosting. I downloaded a sorter plugin from http://tablesorter.com and uploaded 'jquery' folder in the 'test' folder i created. Then I made an html table in the index.html file in the 'test' folder. I entered the below within the head tag Then I entered the following script within the head tag In the table I entered Still the sorter is not working... As far as I know, I followed proper instructions. What did i do something wrong? MY path is public_html/mydomain.com/test The the files under test folder is jquery index.html The files under jquery folder is jquery-latest.js jquery.metadata.js jquery.tablesorter.js jquery.tablesorter.min.js After playing with the code for a while i found the problem. I downloaded a bootstrap template and added a table to it and at the bottom, just before /body tag there are 3 paths If I remove this, the sorter works but then the website stops working. Any ideas???
score: -1
tagged with: jquery-plugins
upvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40701591
favorite count: 0
has title: Does table sorter work without CSS?
accepted answer: http://stackoverflow.com/a/25993998
has comment: http://stackoverflow.com/comment/41926254
tagged with: tablesorter

http://stackoverflow.com/comment/40505055
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25881786
has text: Thanks.but when i click add, it should also show `fruit uis clicked`
score: 0

http://stackoverflow.com/q/25984122
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25984204
has comment: http://stackoverflow.com/comment/40689446
has title: javascript recursive function - not understanding what is going on
possible better answer: http://stackoverflow.com/a/25984219
has comment: http://stackoverflow.com/comment/40689294
has answer: http://stackoverflow.com/a/25984219
type: Question
tagged with: recursion
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25984204
has body: I was reading javascript documentation on 'functions' and came across this code that I am not following how it's working step by step, specifically the inner recursive function. function factorial(n){ if ((n == 0) || (n == 1)) return 1; else return (n * factorial(n - 1)); } var a, b, c, d, e; a = factorial(1); // a gets the value 1 b = factorial(2); // b gets the value 2 c = factorial(3); // c gets the value 6 d = factorial(4); // d gets the value 24 e = factorial(5); // e gets the value 120 I am not following the logic beyond the first if statement. Could someone spell it out. I have already ran the code and works just as specified.

http://stackoverflow.com/a/37391919
upvote count: 2
has body: The colors param should be inside the data object, like: data: { columns: [ ['data1', 30, 20, 50, 40, 60, 50], ['data2', 200, 130, 90, 240, 130, 220], ['data3', 300, 200, 160, 400, 250, 250] ], type: 'bar', colors: { data1: '#ff0000', data2: '#00ff00', data3: '#0000ff' } }
type: Answer
answers question: http://stackoverflow.com/q/26003896
score: 2
downvote count: 0

http://stackoverflow.com/a/26004142
score: 2
has comment: http://stackoverflow.com/comment/40726179
downvote count: 0
answers question: http://stackoverflow.com/q/26003264
has comment: http://stackoverflow.com/comment/40725680
has comment: http://stackoverflow.com/comment/40726768
accepted answer of: http://stackoverflow.com/q/26003264
has comment: http://stackoverflow.com/comment/40726554
has comment: http://stackoverflow.com/comment/40725815
has comment: http://stackoverflow.com/comment/40725905
has comment: http://stackoverflow.com/comment/40726812
has comment: http://stackoverflow.com/comment/40726778
has comment: http://stackoverflow.com/comment/40726077
has body: You can use .each(): chart.append("path") .each(function(d) { var b = path.bounds(d), s = 1.5 / Math.max((b[1][0] - b[0][0]) / mapWidth, (b[1][1] - b[0][1]) / mapHeight), t = [(mapWidth - s * (b[1][0] + b[0][0])) / 2, (mapHeight - s * (b[1][1] + b[0][1])) / 2]; projection.scale(s).translate(t); d3.select(this).attr("d", path); }); This doesn't quite work because the bounds of a feature depend on the projection the path is using. By changing the projection, you're also changing the bounds of subsequent features. To fix that, reset the projection parameters to their previous values after setting the d attribute: var os = projection.scale(), ot = projection.translate(); // ... projection.scale(s).translate(t); d3.select(this).attr("d", path); projection.scale(os).translate(ot);
upvote count: 2
has comment: http://stackoverflow.com/comment/40726828
has comment: http://stackoverflow.com/comment/40726599
has comment: http://stackoverflow.com/comment/40726748
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40726627
has comment: http://stackoverflow.com/comment/40726749
has comment: http://stackoverflow.com/comment/40726881
has comment: http://stackoverflow.com/comment/40726334
has comment: http://stackoverflow.com/comment/40726792
has comment: http://stackoverflow.com/comment/40726654
has comment: http://stackoverflow.com/comment/40726409
type: Answer
has comment: http://stackoverflow.com/comment/40726700
has comment: http://stackoverflow.com/comment/40726508
has comment: http://stackoverflow.com/comment/40726228

http://stackoverflow.com/a/25892442
score: 1
downvote count: 0
type: Answer
has body: I don't know why you're code isn't working but the following should work. The $scope is updated in the callback. function MessageController($scope, $http) { $scope.getAll = function(callback) { $http.get('/messages').success(function(response) { callback(response); }); } $scope.getAll(function(data) { $scope.messages = JSON.stringify(data); }); }
answers question: http://stackoverflow.com/q/25891995
upvote count: 1
has comment: http://stackoverflow.com/comment/40523396

http://stackoverflow.com/comment/40715096
has text: @Hrishi: That's a proposal. I don't see that it has been accepted.
comment on: http://stackoverflow.com/q/25998325
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25883951
answers question: http://stackoverflow.com/q/25883531
has body: I suggest you to use Local IP instead "localhost". You can use getJSON() and then search into structure or if you know where is the value, access it directly: $.getJSON('http://192.168.1.1:8080/getFromDB', function (data) { var myVar = data.features[0].TEST; });
type: Answer
score: 0

http://stackoverflow.com/q/25920974
has body: I have problem with comparing strings in JavaScript. myMAV.on("PARAM_VALUE", function(message, fields) { var param = String(fields.param_id); console.log(param); //display "FLTMODE1" if(param.localeCompare("FLTMODE1") == 0){ //..this code doesnt work }else if(param.toUpperCase().localeCompare("FLTMODE1") == 0){ //..this code doesnt work }else if(param == "FLTMODE1"){ //..this code doesnt work too } }); What am i doing wrong?
has comment: http://stackoverflow.com/comment/40577162
has comment: http://stackoverflow.com/comment/40576410
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/63631713
has comment: http://stackoverflow.com/comment/40576383
type: Question
has answer: http://stackoverflow.com/a/25921481
tagged with: comparison
answer count: 2
has title: How to compare strings in JavaScript?
tagged with: javascript

http://stackoverflow.com/a/25955353
score: 0
answers question: http://stackoverflow.com/q/25955296
type: Answer
has body: var $obj = $("div"); is a jQuery object. You could do var $obj = $("div").text(); which would call Switch with a string instead of an object. You need to do $.prototype.Switch to log the object.

http://stackoverflow.com/q/25921788
score: 0
has body: I'm having an issue with my Bootstrap navbar button not showing the dropdown links when the screen is collapsed. I have a navbar brand that hides on collapse but ever since i added a scrolling nav plugin my links dont show in dropdown. It is is also acting strangely in that if the page is below the level of the top section clicking the button just scrolls up to the top yet i cannot see what the conflict is. here is a fiddle: jsfiddle My HTML is like so: BrandHidden BrandVisible Home Link 1 Link 2 Link 3 Any ideas would be greatly appreciated. Edit: its complicated to me.... dont laugh im only new ;)
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25932562
tagged with: twitter-bootstrap
has title: Bootstrap dropdown data-toggle not showing in complicated nav setup
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25932562
possible better answer: http://stackoverflow.com/a/25928850
has answer: http://stackoverflow.com/a/25928850
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25982068
has answer: http://stackoverflow.com/a/25982280
type: Question
has answer: http://stackoverflow.com/a/25982202
accepted answer: http://stackoverflow.com/a/25982202
has comment: http://stackoverflow.com/comment/40685261
has title: Send form info from jquery to php
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40685238
tagged with: javascript
tagged with: jquery
has body: I am facing a problem and I am already stuck for ages, hopefully one of you can help me. The Problem: - I created a form in HTML and I connected Jquery to it in order to validate whether input is correct (also to give the user feedback whether answer is correct). When individuals press the submit button the information is also send to my database in phpMyadmin (this works. The problem is, how can I make sure that the information is only send to my phpMyadmin database when al the input is correct? I know with jquery when all the input is correct but how can i connect this information to my php code? To be more specific i created a javascript/ jquery variable like correct_answers which is 13 when all questions are correct (as I have 13 questions), but how can I send this information (which is in correct_answers) to php?, so that I can create an if condition within php in order to send the info yes or no? Thanks in advance!!
tagged with: phpmyadmin
tagged with: php
has comment: http://stackoverflow.com/comment/40685526
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25982280

http://stackoverflow.com/q/25924597
type: AnsweredQuestion
has title: Typescript and sql.js - how to tell Typescript it's there
upvote count: 3
has body: I might be approaching this completely incorrectly, so any advice is appreciated. I'm currently trying to dig in deep to Typescript, and have decided to simultaneously use Sql.js (the JS version of SQLite) at the same time... My first instinct to use Sql.js was to search for a .d.ts set of bindings around Sql.js so that I could easily start using it with TS. I've come up with no bindings so far (I don't think one exists yet), but figured I could just start "define"-ing in the stuff that I need from the library... Starting with one of the simple examples from the "sql.js" docs, you have something like this: var sql = window.SQL; var db = new sql.Database(); Moving to the typescript side, I wanted to let TS know that after the sql.js library is included, the window object now has a property called SQL, which is essentially the hook to the rest of the library. I figured I needed to do this because, of course, when I type "window." (window-dot) in Visual Studio in my TS file, the Intellisense presented doesn't know about the SQL property now hanging off of "window". So... I dug around Stack, and concluded that I could solve this with a "declare" which I basically see as a way to tell TS just enough about the libraries that I don't have binding files for (.d.ts files). However, in doing this, I can't seem to construct the syntax for such a declaration. I've tried: declare var window.SQL : any; declare var window.SQL; declare var SQL = window.SQL; declare window.SQL; None of these work, of course. So, the question is, how can I let TS know about new properties introduced by JS libraries on standard objects like "window", and the follow up question is, of course, is this even the right way to be approaching this? Thanks for any insight.
has answer: http://stackoverflow.com/a/25924971
type: Question
tagged with: typescript
tagged with: javascript
has answer: http://stackoverflow.com/a/25924950
answer count: 3
has answer: http://stackoverflow.com/a/40638270
score: 3
tagged with: sqlite
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/40638270
accepted answer: http://stackoverflow.com/a/25924950

http://stackoverflow.com/a/26022811
has body: var array = [], i; for(i = 0; i &lt; 4; i++) { array.push({ 'a': '0', 'b': { 'c': '0' } }); } set = function(array, key, value){ for (i = 0; i &lt; array.length; i++){ array[i][key] = value; } } set(array, "test", "Test"); alert(array[0]['test']); Hah, @Oriol is right, you just have a syntax error on your original funciton.
has comment: http://stackoverflow.com/comment/40760712
answers question: http://stackoverflow.com/q/26022708
score: 0
type: Answer

http://stackoverflow.com/a/26005158
upvote count: 2
has comment: http://stackoverflow.com/comment/40727490
accepted answer of: http://stackoverflow.com/q/26003709
answers question: http://stackoverflow.com/q/26003709
type: AcceptedAnswer
downvote count: 0
has body: Don't add the bullets in your html. DEMO: http://jsfiddle.net/hmw6e25x/ CSS @media (min-width: 768px) { .navbar-nav { ... } .navbar-nav &gt; li { position: relative } .navbar-nav &gt; li:before, .navbar-nav &gt; li:last-child:after { content: ""; position: absolute; width: 6px; height: 6px; background: red; top: 50%; margin-top: -2px; right: -3px; z-index: 1; border-radius: 6px; } .navbar-nav &gt; li:before { right: auto; left: -3px; } }
type: Answer
has comment: http://stackoverflow.com/comment/40727714
score: 2

http://stackoverflow.com/comment/40688726
type: AnswerComment
score: 0
has text: Hmm... I don't know if you mean something different when you say "model attached to the service". If this is the `$scope.data = BackendService.data` approach, then I already tried that and it didn't work for me.
type: Comment
comment on: http://stackoverflow.com/a/25982639

http://stackoverflow.com/a/26024384
type: Answer
accepted answer of: http://stackoverflow.com/q/26024346
downvote count: 0
answers question: http://stackoverflow.com/q/26024346
score: 1
has comment: http://stackoverflow.com/comment/40762450
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40762375
has body: a is defined out of the function scope, so you can simply set a = newValue But why would you want to make a function for what a simple assignment statement can do? If you really want to have target re-assign a, you'll have to return the result. var a=0; var b=0; function editvariable(target,newValue){ target=newValue; return target; //return the assignment } a = editvariable(a,4)

http://stackoverflow.com/q/25876429
tagged with: model-binding
type: Question
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25876652
tagged with: angularjs
has answer: http://stackoverflow.com/a/25876652
type: AnsweredQuestion
tagged with: angularjs-ng-change
has body: AngularJS beginner here. Writiung a simple page to learn. All it does is take a user input and then apply an operation to it (*10) and display that in the page. I have no idea why this is not working, no value for {{funding.needed}} is ever displayed....any ideas? Learning Starting: Recommendation: {{funding.needed}}
has title: ANgularJS binding element to function output with ng-change

http://stackoverflow.com/q/25905465
downvote count: 1
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25905508
tagged with: javascript
has title: How to create map with key and a list of values in JavaScript
has body: In Java we can create private map&lt;String, List&lt;String&gt;&gt; map = HashMap&lt;String, ArrayList&lt;String&gt;(); How to create a map with keys and lists of values in JavaScript? I want to put key as country name and list of values are country states. How to do in JavaScript?
linked to: http://stackoverflow.com/q/33020554
favorite count: 0
has answer: http://stackoverflow.com/a/62819880
accepted answer: http://stackoverflow.com/a/25905508
tagged with: dictionary
possible better answer: http://stackoverflow.com/a/62819880
type: AnsweredQuestion
score: 3

http://stackoverflow.com/q/25965351
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40662471
type: Question
has title: chrome.tabs.sendMessage callback function is not called. Why?
score: 5
accepted answer: http://stackoverflow.com/a/25970461
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40663660
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/25970461
has body: I have the following method that is called from the background script of my Chrome Extension. The goal is to send a message to a specific tab and then call provided callback method with the result. The important part is that the callbackDone must be always called at some point in time. So it goes as such: function sendToTab(nTabID, callbackDone) { (function() { chrome.tabs.sendMessage(nTabID, { action: "update01" }, function(response) { if(chrome.runtime.lastError) { //Failed to send message to the page if(callbackDone) callbackDone(nTabID, null); //Page never received the message } else { //Sent message OK if(response.result === true) { if(callbackDone) callbackDone(nTabID, true); //Success! } else { if(callbackDone) callbackDone(nTabID, false); //Page returns failure } } }); }()); } Then from within the page that processes the message (can be an injected content script) I handle it as such: chrome.runtime.onMessage.addListener(onMessageProc); function onMessageProc(request, sender, sendResponse) { if(request.action == "update01") { //Do processing .... that sets `bResult` sendResponse({result: bResult}); } } The above approach works quite well, except... Say, there's a page, like Options page script, that does not process my update01 message and instead, it processes its own message as such: chrome.runtime.onMessage.addListener(onMessageProc); function onMessageProc(request, sender, sendResponse) { if(request.action == "update02") //Note different action ID { //Does some other actions... } } In this case when my first sendToTab method is called for this tab, my callbackDone is never called, i.e. chrome.tabs.sendMessage is invoked and it returns immediately but its callback function is never called. So what am I missing here?
favorite count: 0
upvote count: 5
tagged with: message-passing
downvote count: 0
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40659487

http://stackoverflow.com/q/25996633
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Clipping multiple images in HTML5 canvas
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40718393
has answer: http://stackoverflow.com/a/26017553
type: Question
tagged with: clip
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40734186
answer count: 2
tagged with: canvas
has comment: http://stackoverflow.com/comment/40711661
accepted answer: http://stackoverflow.com/a/26017553
possible better answer: http://stackoverflow.com/a/42795967
tagged with: jquery
has comment: http://stackoverflow.com/comment/40712810
favorite count: 0
has answer: http://stackoverflow.com/a/42795967
has body: I am working on HTML5 canvas with image manipulation. In my canvas I have number of images. When I want to clip the images individually. But when I clip one image by creating a shape and use clip() function, it is working fine. But the problem arise when I try to clip another image using the same method. As the canvas stored the previous shape it will concatenate with the new one and clip the second image accordingly. I want destroy the previous shape. Please note that I can't use the clearRect() to clear the canvas as my previous clipped image is there. Please ref the link : Demo Problem In the link drag the image into canvas predefined layer and drag the image around. You can clearly see that the image got clipped properly if it try to go out of the border. Now drag another image into the canvas in a different box. Now you can see the clipping is not functioning properly. Here what I have done in the script : JS Script Here the JSFiddle Link JSFiddle Link Can you help me to fix this issue? It will be helpful if you find another way to clear the previous shape. Thanks in advance.

http://stackoverflow.com/a/25891895
answers question: http://stackoverflow.com/q/25891527
has comment: http://stackoverflow.com/comment/40524529
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Crossover wouldn't make a difference, but selecting the same parents should be so infrequent that checking if the parents are the same for each child produced would be more computationally expensive than performing the crossover in such cases - if it's not then your gene pool is going to be too small to produce effective results. On a side note, a child could still differ from it's parent if a mutation is introduced.
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25891527
score: 3

http://stackoverflow.com/comment/40735461
score: 0
type: Comment
has text: first of all you cannot have 20 divs with same id's ( id's need to be unique)...instead apply a class name download to those div's....I have modified my answer to your requirement....plz check...
comment on: http://stackoverflow.com/a/25985027
type: AnswerComment

http://stackoverflow.com/q/25987338
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create a drop down list based on another drop down list's selection. If Brand Preference or Brand Purchased is selected then the DIV select_a_brand should be appeared. I use following code. It hides the DIV select_a_brand but when I select an option Brand Preference or Brand Purchased still the DIV select_a_brand is hidden. It's not shown. How can I solve this? By Brand Select an option Brand Preference Brand Purchased <?php echo $form->dropDownList($model,'brand_id', gGetBrandList('brand_id', 'brand_id, brand_name'), array('prompt'=>'Select a brand')); ?>
answer count: 1
has comment: http://stackoverflow.com/comment/40695043
score: -2
has answer: http://stackoverflow.com/a/25987389
favorite count: 0
has title: How to create a conditional dropdown menu using JQuery?
downvote count: 2
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25987389
type: Question
has comment: http://stackoverflow.com/comment/40695777
has comment: http://stackoverflow.com/comment/40695615
upvote count: 0

http://stackoverflow.com/comment/40535759
has text: In the mousedown event handler: (1) get the mouse position relative to the canvas, (2) Use the mouse position to determine which URL (website) you want to go to, (3) Open a new browser tab with: `window.open('www.desiredWebsite.com','_blank'); `
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25896702
score: 0

http://stackoverflow.com/comment/40633170
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25953686
has text: Can you show some example just too see exactly how this cover album slide thing works?
score: 0

http://stackoverflow.com/q/25904603
tagged with: javascript
has body: For you Photoshop scripters (javascript) out there, I've written a script that copy merges an image area and pastes it into another document. The thing that bothers me is the fact that the image that is pasted is pasted to the middle of the screen and not to the selection coordinates. So the first image is say 2000px by 2000px and I use my script to copy merge an area of 500px by 500px and then paste that to another document that is 500px by 500px. The only problem is the pasted image is plopped down into the smack middle of the document so if the copied area has some transparent pixels sometimes it isn't pasted to the correct location. Photoshop has a function called Paste In Place which you can get to by Edit>Paste Special>Paste In Place which of course solves that problem the issue for me is I need to know the javascript code for Paste In Place so it can do that from my script. Anyone know?
has title: Paste In Place Photoshop Script
score: 0
answer count: 1
tagged with: photoshop
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/65668220
type: Question
has answer: http://stackoverflow.com/a/27303337

http://stackoverflow.com/q/25921319
has answer: http://stackoverflow.com/a/25921387
favorite count: 0
has answer: http://stackoverflow.com/a/25921448
answer count: 4
has answer: http://stackoverflow.com/a/69806890
has body: I have a string that looks something like this: "Line 1\nLine 2" When I call length on it, though, it's one character short: "Line 1\nLine 2".length // 13 Looking a little closer: "Line 1\nLine 2".charAt(6) I find that the \n is being replaced by a single character, which looks like: " " Is there a way to escape that new line into a \n?
has answer: http://stackoverflow.com/a/55680060
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25921448
score: 18
upvote count: 18
has title: Escape new lines with JS
possible better answer: http://stackoverflow.com/a/25921387
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40733688
has text: Okay Thank you Arun... I will surly apply this method..i checked this code from many places and they used false, so i just used that.. well thanks for such information...:)
comment on: http://stackoverflow.com/a/26008665
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/26013418
has title: Facebook SDK permissions on different events
tagged with: facebook
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26013466
accepted answer: http://stackoverflow.com/a/26013466
type: Question
has body: In my app I need user to log in using either Facebook or email. Then they can select images from Facebook or from Local storage. When I login in the app using Facebook I doing it like this FB.login(function (response) { }, {scope: 'email'}); I know in the scope I can ask permission for the user photos as well but I have seen then most of the user don't get in to my app seeing that they have to give permissions for a lot of stuff. In my api call for albums from Facebook I am doing like this FB.api('/me/albums', function (resp) { },{scope:'user_photos'}); But I get the 'resp' as empty array. Is there a better way to do that? Like get permissions on different events in the app.
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
tagged with: facebook-graph-api
favorite count: 0

http://stackoverflow.com/q/26018538
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26018706
has title: If statement within custom placeholder directive in Angular.js
tagged with: angularjs
type: UnansweredQuestion
has body: I have a question. I want to add a placeholder when the template is in edit mode. When in edit mode, the variable viewer.building is true, otherwise false. You can see in the code I'm showing here what I'm trying to do. I need an if-statement within my sk-placeholder directive attribute. If viewer.building is true, there's text. Otherwise there is an empty placeholder attribute. Unfortunately the if statement is just showing up as text. Any ideas? I can't just hide the whole div when viewer.building is false using ng-show because the div is being filled up with a bunch of text in normal display mode. Thanks in advance! (P.S. : I'm using angular in twig templates, that's why I'm using square brackets instead of curly ones so they don't cause conflicts)

http://stackoverflow.com/q/25963024
tagged with: javascript
tagged with: jquery
has body: I'm using dragswipe, a plugin from here. It works perfectly fine. However, I have a requirement to do dynamic carousels. So, every time a user changes something on a page, the carousels get updated dynamically. I thought I could just recall the plugin to update the element, but somehow when I dragged the carousel the functional gets called multiple times. For example, I do this to initialise the plugin. function init() { $('#carousel').dragswipe({ width: 320, current_page_element: '#current_page', total_pages_element:'#total_pages' }); } So after the page is updated via ajax I have a callback to call this method again like this function callback() { init(); } Everything should is updated perfectly fine, but when I started dragging. The carousel skips some pages. I thought I had to unbind all the events so I tried this. $('#carousel').unbind() but the problem still persists. Here's the source code when the plugin is initialised. $.fn.dragswipe = function(options) { options = $.extend({ offset: 0, turn_threshold: 0.1, current_page: 0 },options) this.each(function() { option = $(this).hammer({ drag_vertical: false, swipe_time: 20 }); // start a drag. // if we're moving left or right, set our initial distance to 0. $(this).bind('dragstart',function(ev) { console.log('dragstart'); if (ev.direction=='left' || ev.direction=='right') { drag_distance = 0; } }); // while dragging, change the dragging distance based on how far a user has dragged. $(this).bind('drag',function(ev) { console.log('drag'); if (ev.direction=='left' || ev.direction=='right') { drag_distance = ev.distanceX; var options = CONFIGS[$(this).data('dragswipe_id')]; $(this).updateOffset(options.offset+drag_distance); } }); $(this).bind('dragend',function(ev) { console.log('dragend'); if (ev.direction=='left' || ev.direction=='right') { var options = CONFIGS[$(this).data('dragswipe_id')]; if (Math.abs(drag_distance / options.width) &gt; options.turn_threshold) { if (ev.direction=='left') { options.current_pag…
accepted answer: http://stackoverflow.com/a/25963210
has title: How to make sure that all events are unattached when called multiple times in Javascript?
score: 1
favorite count: 0
upvote count: 1
tagged with: zepto
type: AnsweredQuestion
tagged with: swipe
has answer: http://stackoverflow.com/a/25963210
type: Question
tagged with: mobile
downvote count: 0
answer count: 1

http://stackoverflow.com/q/25939249
tagged with: jquery
has title: value is taken as parameter on function
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40608930
has comment: http://stackoverflow.com/comment/40608987
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25939357
score: 0
has comment: http://stackoverflow.com/comment/40608926
has body: im passing a value retrieved from an ajax call to a function like this way: nuevaFila+='&lt;td&gt;&lt;input type="button" value="Agregar" onclick="AgregarSuvenir('+item.CODSUVENIR+');"&gt;&lt;/td&gt;&lt;/tr&gt;'; and we i clicked the button it throws an undefinided "variable" but is not a variable, i just wanted to pass it as a string, and the value passed to the function is taken as a variable, i tried onclick="AgregarSuvenir("'+item.CODSUVENIR+'") and onclick="AgregarSuvenir('+item.CODSUVENIR+""') but this fails someone help me how to pass the value as string and not be taken a a variable. thanks is advance
type: Question
possible better answer: http://stackoverflow.com/a/25939374
has comment: http://stackoverflow.com/comment/40609185
has answer: http://stackoverflow.com/a/25939374
tagged with: javascript
has comment: http://stackoverflow.com/comment/40609069
has comment: http://stackoverflow.com/comment/40609289
accepted answer: http://stackoverflow.com/a/25939357
linked to: http://stackoverflow.com/q/9643311
answer count: 2

http://stackoverflow.com/q/25985530
has comment: http://stackoverflow.com/comment/40692426
has body: I am having problem with Angularjs view. Somehow i am doing something wrong and don't know where is the problem. Hope someone can help me out. The problem is {{user.login}} (userRepoInfo.html file) does not get called at all from the controller and if i do console.log it is coming through fine from services. I am definitely doing something wrong between view and controller I have five files 1) gitHubApiServices.js 2) gitHubApiController.js 3) userRepoInfo.html 4) app.js 5) index.html Below is gitHubApiServices.js (function() { var gitHubApiFactory = function($http) { var factory = {}; factory.getUserName = function(userName) { console.log(userName + " " + "This is from Services") return $http.get("https://api.github.com/users/" + userName); }; return factory; }; gitHubApiFactory.$inject = ['$http']; angular.module('gitHubApp').factory('gitHubApiFactory',gitHubApiFactory); }()); Below is gitHubApiController.js (function() { var gitHubInfoController = function ($scope,gitHubApiFactory) { $scope.user = null; $scope.gitHubUser = function(userName) { gitHubApiFactory.getUserName(userName) .success(function (data) { $scope.user = data; console.log(data); }) .error(function(data, status, headers, config) { $log.log(data.error + ' ' + status); }); } }; gitHubInfoController.$inject = ['$scope','gitHubApiFactory']; angular.module('gitHubApp') .controller('gitHubInfoController', gitHubInfoController); }()); Below is userRepoInfo.html Github App Get my Repository {{user.login}} Below is app.js (function() { var app = angular.module('gitHubApp', ['ngRoute']); app.config(function($routeProvider) { $routeProvider .when('/', { controller: 'gitHubInfoController', templateUrl: 'app/views/userRepoInfo.html' }) .otherwise( { redirectTo: '/' } ); }); }()); Below is index.html Github Repository App Please help me out with this problem. I had spend couple of hours but no luck. Thank you for your effort
has comment: http://stackoverflow.com/comment/40692265
answer count: 1
has comment: http://stackoverflow.com/comment/40692038
tagged with: javascript
has comment: http://stackoverflow.com/comment/40691951
has answer: http://stackoverflow.com/a/25986261
has comment: http://stackoverflow.com/comment/40692116
score: 0
has comment: http://stackoverflow.com/comment/40692398
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25986261
has comment: http://stackoverflow.com/comment/40691920
has comment: http://stackoverflow.com/comment/40692184
has comment: http://stackoverflow.com/comment/40692153
has comment: http://stackoverflow.com/comment/40692085
has comment: http://stackoverflow.com/comment/40692225
has comment: http://stackoverflow.com/comment/40691974
has title: Angularjs - Binding between controller and view
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40594190
has text: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
comment on: http://stackoverflow.com/q/25931155
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40657788
type: AnswerComment
has text: you're welcome and dont forget to mark the answer correct as well (:
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25967017

http://stackoverflow.com/comment/40794113
has text: Misdirecting someone about the page they're on is a very sketchy goal. What is your goal?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26000127

http://stackoverflow.com/a/41037099
has comment: http://stackoverflow.com/comment/96566499
answers question: http://stackoverflow.com/q/25894585
has body: It's Working for me using Owl Carousel 2 $('#owlCarousel').owlCarousel({ loop:true, loop:false, responsiveClass:true, responsive:{ 0:{ items:1, nav:true }, 600:{ items:3, nav:true }, 1000:{ items:4, nav:true, touchDrag:false, //pullDrag:false, freeDrag:false } }, onTranslated:callBack }); function callBack(){ if($('.owl-carousel .owl-item').last().hasClass('active')){ $('.owl-next').hide(); $('.owl-prev').show(); console.log('true'); }else if($('.owl-carousel .owl-item').first().hasClass('active')){ $('.owl-prev').hide(); $('.owl-next').show(); console.log('false'); } } $('#owlCarousel .owl-prev').hide();
has comment: http://stackoverflow.com/comment/96578528
downvote count: 0
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/96455352
upvote count: 2

http://stackoverflow.com/q/26029538
has answer: http://stackoverflow.com/a/26034214
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/26034214
has body: My question is very simple if the DOM does not have a textbox value which user types how does javascript detect the latest text typed by the user in the browser <asp:TextBox ID="txtbx" runat="server" Text=""></asp:TextBox> above is my code. The page source does not show the latest text typed by user in textbox. The code works similarly across all browsers and all VS editions. I even run the code on a plain HTML page without a Visual Studio
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26045404
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
has title: Detect text in textbox even when pagesource shows textbox previous value
has comment: http://stackoverflow.com/comment/40780059
accepted answer: http://stackoverflow.com/a/26045404
type: AnsweredQuestion

http://stackoverflow.com/a/25915876
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25899154
answers question: http://stackoverflow.com/q/25899154
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40567105
has body: It's happening because this, inside the event listener, is referring to the event listener itself, and not the layer. Try this: var target = event.getCurrentTarget(); console.log(target); console.log(target.sprite); This should give you a clear idea of what's going on: if you are clicking the sprite object, then target should equal to sprite (and hence target.sprite will be undefined), if you are clicking the layer, then target will be the layer, and target.sprite will be what you expected. I reccomend taking a look at this article for further understanding of the new event manager in cocos2d v3.
type: Answer

http://stackoverflow.com/a/25911457
type: Answer
upvote count: 3
has body: There is no deeper level route 'departments.department.posts.post' actually. Router's map is almost flat in your case because of missed parent's names in 'children' routes. You can explore that itself: I've prepared an example: http://emberjs.jsbin.com/dokuqozivice/1/ It might be the reason of strange behavior that you observe. General reason for promise's failing is aborting transition in transitioning sequence. There are might be several reasons for that besides one already described. You can turn trace options for deeply debugging: App = Ember.Application.create({ LOG_STACKTRACE_ON_DEPRECATION: true, LOG_BINDINGS: true, LOG_TRANSITIONS: true, // print all transitionTo information LOG_TRANSITIONS_INTERNAL: true, LOG_VIEW_LOOKUPS: true, LOG_ACTIVE_GENERATION: true });
score: 3
answers question: http://stackoverflow.com/q/25908807
downvote count: 0

http://stackoverflow.com/comment/40735272
type: Comment
type: QuestionComment
score: 0
has text: OK, didn't see the `.reverse()` earlier. That's a complication you sure don't need. Definitely complicates understanding the code, though it is not the problem you're asking about.
comment on: http://stackoverflow.com/q/25996400

http://stackoverflow.com/comment/40711119
has text: Am editing My comment : Thank You Andrew That is the real solution !! I've got only 11 point reputation but when I'll be at 15 i ll came back here to upvote you ;) Thanks again :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25996407

http://stackoverflow.com/comment/40622211
score: 0
type: Comment
type: QuestionComment
has text: Try to understand the question first!! i think you donot read my question i didnot ask for loading css based on media. for simplicity go to facebook and inspect in cookies you found the screen size. then increase or decrease the width height of browser, it will not load the responsive css. but if you login from the mobile it will show the mobile css. I want to implement this.
comment on: http://stackoverflow.com/q/25946859

http://stackoverflow.com/q/25914534
has title: How to know if the user first time enter my site
has answer: http://stackoverflow.com/a/25914566
answer count: 1
tagged with: javascript
score: -7
tagged with: jquery
favorite count: 0
downvote count: 8
has comment: http://stackoverflow.com/comment/40563696
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40563518
upvote count: 1
has body: I'm currently working on some smartbanner. I want them to show if the person is entering the website first time. If they've already visited I don't want to show the smartbanner. Is there any plugin to know that?
type: Question

http://stackoverflow.com/q/25936533
favorite count: 0
has comment: http://stackoverflow.com/comment/40603816
tagged with: angularjs
linked to: http://stackoverflow.com/q/7083884
has title: When does a scope naturally get destroyed in angularjs lifecycle
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26004741
score: 7
tagged with: angularjs-scope
has body: I see this type of code a lot in angular modules scope.$on('$destroy', function(){ //undind listener here }); My understanding is that whenever the scope is about to be destroyed it broadcasts a $destroy event allowing you to clean up any code that may continue to run after the destruction of the scope which would create memory leaks. My question is, when does the scope naturally get destroyed in an angularjs app. All the documentation I can find from the website is that you can manually call $destroy to remove a scope, but this seems to suggest that it will happen at some point automatically. When would that be?
type: Question
has answer: http://stackoverflow.com/a/26004741
tagged with: javascript
has comment: http://stackoverflow.com/comment/40603969
has comment: http://stackoverflow.com/comment/40603849
upvote count: 7
answer count: 1

http://stackoverflow.com/comment/40656799
comment on: http://stackoverflow.com/q/25966472
type: QuestionComment
type: Comment
score: 2
has text: my guess: you are waiting until the window has loaded before setting editor1... but the code in your second script gets run immediately (ie before the window has been loaded and thus before editor1 has been set)

http://stackoverflow.com/q/25933231
has answer: http://stackoverflow.com/a/25935725
linked to: http://stackoverflow.com/q/15083548
type: Question
has body: I have an array of objects with an hour(fc_start_time) property and I want to sort it by this property. I've tried this but it does not work for me. This is the object structure: Object { id="540-events", local_id=540, title="Mas Flow", fc_start_time="12:30 pm" }, Object { id="531-events", local_id=531, title="Slowly", fc_start_time="04:30 pm" }, Object { id="531-events", local_id=531, title="Slowly", fc_start_time="08:30 am" } Thanks in advance.
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/25934150
favorite count: 0
has answer: http://stackoverflow.com/a/25933949
linked to: http://stackoverflow.com/q/1129216
has comment: http://stackoverflow.com/comment/40598459
answer count: 4
has title: Sort object array by hour
upvote count: 3
linked to: http://stackoverflow.com/q/25621172
accepted answer: http://stackoverflow.com/a/25933949
has comment: http://stackoverflow.com/comment/40601989
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25935725
has answer: http://stackoverflow.com/a/25933818

http://stackoverflow.com/a/25937289
type: Answer
has body: Error messages don't get any clearer than this: "Scripts may close only the windows that were opened by it." If your script did not initiate opening the window (with something like window.open), then the script in that window is not allowed to close it. Its a security to prevent a website taking control of your browser and closing windows.
has comment: http://stackoverflow.com/comment/138639192
upvote count: 32
score: 22
downvote count: 10
has comment: http://stackoverflow.com/comment/131824597
answers question: http://stackoverflow.com/q/25937212
has comment: http://stackoverflow.com/comment/138639221
has comment: http://stackoverflow.com/comment/110946566
has comment: http://stackoverflow.com/comment/81500839

http://stackoverflow.com/comment/42946706
comment on: http://stackoverflow.com/q/26005656
score: 0
type: Comment
type: QuestionComment
has text: I cannot reproduce the error, could you check http://jsfiddle.net/gogan82/062tunsu/1/ and fork if appropriate to include missing details?

http://stackoverflow.com/comment/40611736
comment on: http://stackoverflow.com/a/25940659
type: AnswerComment
has text: @user2727195 for sure :)
type: Comment
score: 0

http://stackoverflow.com/q/25993618
score: 2
has answer: http://stackoverflow.com/a/25993825
downvote count: 0
tagged with: javascript
tagged with: angularjs
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25993825
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25993987
has body: Here is my html, &lt;tr ng-repeat="val in attribute.format.values"&gt; I am getting, [Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: val in attribute.format.values, Duplicate key: object:07F, Duplicate value: {2}][1] Here is my JSON, [{ "name": "Auto", "weight": "1", "value": "1", "count": 0, "min": 0, "max": 0, "children": [], "id": "06c9f57c-963f-4977-bca5-9226e971a8dc", "visible": true, "$$hashKey": "06V" }, { "name": "On", "weight": "1", "value": "2", "count": 0, "min": 0, "max": 0, "children": [], "id": "dc019b87-1da5-4f21-b91f-4ee35ec04eb8", "visible": true, "$$hashKey": "06W" }, { "name": "Off", "weight": "1", "value": "4", "count": 0, "min": 0, "max": 0, "children": [], "id": "daf8ef80-a2da-4e02-8960-791b8528905e", "visible": true, "$$hashKey": "06X" }, { "name": "Redeye Reduction", "weight": "1", "value": "5", "count": 0, "min": 0, "max": 0, "children": [], "id": "87ccb4ee-39cd-4bd0-9817-7e477af6d5b0", "visible": true, "$$hashKey": "06Y" }, { "name": "Slow Sync", "weight": "1", "value": "6", "count": 0, "min": 0, "max": 0, "children": [], "id": "e0b14c8b-af4b-4ab8-a533-32ac4829613f", "visible": true, "$$hashKey": "06Z" }, { "name": "High Speed Sync", "weight": "1", "value": "7", "count": 0, "min": 0, "max": 0, "children": [], "id": "622c7ebf-067c-46ed-913a-ba045a0586df", "visible": true, "$$hashKey": "070" }, { "name": "Front Curtain", "weight": "1", "value": "8", "count": 0, "min": 0, "max": 0, "children": [], "id": "fe12c21c-e2c3-4702-ae9b-82f2fe248574", "visible": true, "$$hashKey": "071" }, { "name": "Rear Curtain", "weight": "1", "value": "9", "count": 0, "min": 0, "max": 0, "children": [], "id": "4a229ebb-d029-4b1e-a13d-246d00215900", "visible": true, "$$hashKey": "072" }, { "name": "Fill-in", "weight": "1", "value": "10", "count": 0, "min": 0, "max": 0, "children": [], "id": "a7ed372d-398f-4614-8efa-64a338f0ad20", "visible": true, "$$hashKey": "073" }, { "name": "Wireless", "weight": "1", "value"…
possible better answer: http://stackoverflow.com/a/25993987
has title: ng-repeat error: "Duplicates in a repeater are not allowed"
answer count: 2

http://stackoverflow.com/comment/40808365
has text: thank you Kevin, as you say: routes must be defined before a request is recevied, that means i cannot separate mobile module and pc module to totally independent, so sad
score: 0
comment on: http://stackoverflow.com/q/26028333
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40599921
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25934416
has text: Css does not have the ability to add or remove attributes/classes of elements.

http://stackoverflow.com/q/25972527
favorite count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25972565
type: Question
has answer: http://stackoverflow.com/a/25972732
tagged with: javascript
has title: Scroll-controlled text animation
answer count: 2
possible better answer: http://stackoverflow.com/a/25972732
has body: How do I trigger and control text animation with scrolling? TEXT transform:translateX(-500px);opacity:0; transform:translateX(0px);opacity:1;
downvote count: 0
accepted answer: http://stackoverflow.com/a/25972565

http://stackoverflow.com/q/25898063
tagged with: javascript
has body: I need to display &lt;img src="http://my.pic/test/rg/pict.png" /&gt; from `items`.`img` But when res.write(rows[0].img, 'utf8');, I see in browser: &lt;img style="display: none !important;" src="http://my.pic/test/rg/pict.png" /&gt; How do I fix style="display: none !important;"? express = require('express'), app = express(); var mysql = require('mysql'); app.listen(8080); mysql.connect = function(req, res, next){ var connect = mysql.createConnection({ host : 'localhost', user : 'person', password : 'ppasw', database : 'db1' }); return connect; } server.get(new RegExp('/img'), function(req, res, next){ var db =mysql.connect(); db.connect(); db.query("use `bd1`"); db.query("SELECT `img` FROM `items` WHERE `id`='" + intval(req.query.id) + "'", function (err, rows, fields) { res.setHeader("Content-Type", "text/html"); res.write(rows[0].img, 'utf8'); res.end(); }); db.end(); }); ----* I find problem - Adblock plugin.
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25898456
tagged with: css
tagged with: node.js
type: UnansweredQuestion
upvote count: 1
has title: Displaying HTML in NodeJS
score: 1
has answer: http://stackoverflow.com/a/25898268
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/q/25929769
has title: How to insert bootstrap form helper country picker to a form?
score: 1
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25948797
has answer: http://stackoverflow.com/a/25929876
possible better answer: http://stackoverflow.com/a/25948797
tagged with: bootstrap-form-helper
upvote count: 2
tagged with: twitter-bootstrap
answer count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/40595623
accepted answer: http://stackoverflow.com/a/25929876
tagged with: javascript
has body: how i insert above bootstrap plugin to my form. I import all necessary files to my form document. and I insert only this code. I never wrote any js code. But it is not work. Here my country picker link. Have any idea for my problem? http://bootstrapformhelpers.com/country/#example4
has answer: http://stackoverflow.com/a/30172994
type: AnsweredQuestion

http://stackoverflow.com/comment/40542375
type: Comment
comment on: http://stackoverflow.com/a/25881248
type: AnswerComment
has text: This gives two scrollbars when textarea has large enough text.
score: 0

http://stackoverflow.com/q/25936586
downvote count: 0
accepted answer: http://stackoverflow.com/a/25937358
has comment: http://stackoverflow.com/comment/40605108
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25937358
has answer: http://stackoverflow.com/a/25937170
has answer: http://stackoverflow.com/a/25936913
has body: I have this type of code : Clic I test something in fn1 and if it is true, I don't want fn2 and fn3 to be called. I used event.stopPropagation() in fn1 (in a cross-browser manner and passing the event to the function) but the others functions are called anyway. Can anyone help ?
upvote count: 2
tagged with: javascript
favorite count: 0
has title: Stop event propagation for multiple inline functions JS
tagged with: stoppropagation
tagged with: inline
tagged with: events
possible better answer: http://stackoverflow.com/a/25936913
answer count: 4
score: 2
has answer: http://stackoverflow.com/a/25937216

url
tags question: http://stackoverflow.com/q/26006908
tags question: http://stackoverflow.com/q/26019974
tags question: http://stackoverflow.com/q/25985590
tags question: http://stackoverflow.com/q/26023213
tag name: url
tags question: http://stackoverflow.com/q/25990481
tags question: http://stackoverflow.com/q/25898822
tags question: http://stackoverflow.com/q/25955715
tags question: http://stackoverflow.com/q/25939581
tags question: http://stackoverflow.com/q/25942552
tags question: http://stackoverflow.com/q/25902320
type: Tag

http://stackoverflow.com/a/25932930
has body: You have not provided your SharePoint response XML, but the information you want are most likely to be in the row element attributes rather than in their text content. Moreover every element in this xml has a namespace which should be referenced. A sample XML: <s:Schema id="RowsetSchema"> <s:ElementType name="row"> <s:AttributeType name="CustomerID" rs:number="1" rs:keycolumn="true"> <s:datatype dt:type="int" dt:maxLength="4"/> </s:AttributeType> <s:AttributeType name="Title" rs:number="2"> <s:datatype dt:type="string" dt:maxLength="5" /> </s:AttributeType> <s:AttributeType name="FirstName" rs:number="3"> <s:datatype dt:type="string" dt:maxLength="15" /> </s:AttributeType> <s:AttributeType name="LastName" rs:number="4"> <s:datatype dt:type="string" dt:maxLength="15"/> </s:AttributeType> </s:ElementType> </s:Schema> <rs:data> <z:row CustomerID="123" Title="Mr." FirstName="Donald" LastName="Duck"/> <z:row CustomerID="456" Title="Mrs." FirstName="Minney" LastName="Mouse"/> <z:row CustomerID="789" Title="Mr." FirstName="Stuart" LastName="Little"/> </rs:data> If your response XML is like something above, change the ajax success handler to success: function(xml) { $("rs\\:data", xml).find("z\\:row").each(function() { var id = $(this).attr('CustomerID'); var title = $(this).attr('Title'); var firstName = $(this).attr('FirstName'); var lastName = $(this).attr('LastName'); var fullName = title + firstName + lastName; // Add this as an option to dropdown list var option = ' ' + fullName + ' '; $("#customers").append(option); }); }
has comment: http://stackoverflow.com/comment/40605567
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25926443
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25926443
has comment: http://stackoverflow.com/comment/40597981

http://stackoverflow.com/q/26020634
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/26024378
linked to: http://stackoverflow.com/q/446594
answer count: 1
has comment: http://stackoverflow.com/comment/40755353
type: UnansweredQuestion
has body: I have a website on which I load subpages into container div through jquery.load(). On one subpage after user fill in form and submits it. I use ajax to process this form. It is a long process (php search big database) and until I get success I cannot move to another supage because when i click other navigation button it stills on load() functions and waits until this ajax is finished. I dont want to freeze navigation because of this ajax did not finished. So load() cannot be executed until ajax finish? How to do that?
has title: Load page into div before ajax success

http://stackoverflow.com/comment/40676913
type: AnswerComment
comment on: http://stackoverflow.com/a/25973303
type: Comment
has text: Hi sorry I didnt realise that was the case. Am I right in thinking that carrying out a replace using this on 'A 80 A' would return 'A 80 A' as opposed to '80 A'?
score: 0

http://stackoverflow.com/comment/40778740
type: Comment
comment on: http://stackoverflow.com/a/26022394
type: AnswerComment
has text: This removed the problem, specifically the css: .k-grid td{ white-space: nowrap; text-overflow: ellipsis; }
score: 0

http://stackoverflow.com/comment/40676642
type: Comment
has text: @Eric The point of `JSON.stringify()` was indeed to avoid having to read the raw POST entirely, and instead to allow PHP to handle the post data natively in the `$_POST` superglobal (with one additional `json_decode()`). I didn't mention it in my answer because it was not intended as a component of this answer. For what it's worth, I did flag the comment thread a couple days ago for the mods to come and clean out (which hopefully would have avoided this confusion) but the flag still has not been acted on.
type: AnswerComment
comment on: http://stackoverflow.com/a/25938713
score: 0

http://stackoverflow.com/comment/40700739
has text: can you make a fiddle
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25990616

http://stackoverflow.com/comment/40673634
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25975875
has text: Try to break it: http://jsfiddle.net/6o4s1wfj/ and we might help you fixing it :)

http://stackoverflow.com/comment/40578098
type: Comment
score: 1
has text: According to [this discussion](https://groups.google.com/forum/#!topic/nodejs/QsOEWvptQpA), `require.extensions` is flagged as deprecated in order to discourage its use and not to warn about a removal in a future release. The discussion also recommend the pre-compilation of the files (i.e. compile the `something.ms` into like `something-ms.js`, then include the js file for both nodejs and browser use). I guess using a third-party library to reproduce the `require.extensions` feature without using the core `require.extensions` would also be acceptable. I would personally use your solution.
comment on: http://stackoverflow.com/a/25892670
type: AnswerComment

http://stackoverflow.com/a/26041725
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26025896
has body: The issue was to compare input field with hidden city input field. Why? 1.Typing bruxelles 2. Select bruxelles 3. hidden city == bruxelles, hidden latlong = (xx,xx) If submitting -> OK If typing blabla and don't press enter, blabla will be input field with previous latlong hidden input. So I wanted to compare hidden city with city input field. The solution: when typing -> clear hidden fields. //Set from city hidden values to "" when typing again var input1 = document.getElementById('connexion_inputcity'); input1.onkeydown = function() { var key = event.keyCode || event.charCode; if( key == 8 || key == 46 ) { document.forms["inscription"]["check1"].value = ""; document.forms["inscription"]["LatLongFrom"].value = ""; } }; input1.onkeypress = function () { document.forms["inscription"]["check1"].value = ""; document.forms["inscription"]["LatLongFrom"].value = ""; }; //Set to hidden hidden values to "" when typing again var input2 = document.getElementById('connexion_inputNdCity'); input2.onkeydown = function() { var key = event.keyCode || event.charCode; if( key == 8 || key == 46 ) { document.forms["inscription"]["check2"].value = ""; document.forms["inscription"]["LatLongTo"].value = ""; } }; input2.onkeypress = function () { document.forms["inscription"]["check2"].value = ""; document.forms["inscription"]["LatLongTo"].value = ""; };

http://stackoverflow.com/comment/40505019
has text: @Timigen just replace your "change" event to "input"
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25877939

http://stackoverflow.com/comment/40573663
score: 0
type: AnswerComment
type: Comment
has text: I have added that as well Please take a look @Oleg
comment on: http://stackoverflow.com/a/25918662

http://stackoverflow.com/a/25943182
has comment: http://stackoverflow.com/comment/101371819
has comment: http://stackoverflow.com/comment/117068912
score: 30
has body: In this particular case I would suggest using Range.insertNode instead, which will give you total control of what gets inserted: function insertHTML() { var sel, range; if (window.getSelection &amp;&amp; (sel = window.getSelection()).rangeCount) { range = sel.getRangeAt(0); range.collapse(true); var span = document.createElement("span"); span.id = "myId"; span.appendChild( document.createTextNode("hi") ); range.insertNode(span); // Move the caret immediately after the inserted span range.setStartAfter(span); range.collapse(true); sel.removeAllRanges(); sel.addRange(range); } } function isOrIsAncestorOf(ancestor, descendant) { var n = descendant; while (n) { if (n === ancestor) { return true; } else { n = n.parentNode; } } return false; } function nodeContainsSelection(node) { var sel, range; if (window.getSelection && (sel = window.getSelection()).rangeCount) { range = sel.getRangeAt(0); return isOrIsAncestorOf(node, range.commonAncestorContainer); } return false; } function insertHTML() { var sel, range; if (window.getSelection && (sel = window.getSelection()).rangeCount) { range = sel.getRangeAt(0); range.collapse(true); var span = document.createElement("span"); span.id = "myId"; span.appendChild( document.createTextNode("hi") ); range.insertNode(span); // Move the caret immediately after the inserted span range.setStartAfter(span); range.collapse(true); sel.removeAllRanges(); sel.addRange(range); } } window.onload = function() { document.getElementById("inserter").onmousedown = function() { var editor = document.getElementById("editor"); if (nodeContainsSelection(editor)) { insertHTML(); return false; } }; }; span { font-weight: bold; color: green; } &lt;input type="button" id="inserter" value="Insert span"&gt; &lt;div contenteditable="true" id="editor"&gt; some content &lt;/div&gt;
has comment: http://stackoverflow.com/comment/40640599
accepted answer of: http://stackoverflow.com/q/25941559
has comment: http://stackoverflow.com/comment/103284738
answers question: http://stackoverflow.com/q/25941559
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40624258
downvote count: 0
has comment: http://stackoverflow.com/comment/100072640
has comment: http://stackoverflow.com/comment/117049693
upvote count: 30
type: Answer

http://stackoverflow.com/comment/40670265
comment on: http://stackoverflow.com/q/25969747
score: 0
type: Comment
type: QuestionComment
has text: Its a little complicated :) in my grid i`m using as dockedItems xtype: 'custompaging' and dock:'bottom' ..but the rest of the code is very long..:-<

http://stackoverflow.com/comment/40679860
type: Comment
comment on: http://stackoverflow.com/q/25979021
score: 0
has text: it matters in that you are asking jquery to create an input field and add it to your page and there is no input (as in tag) created. I will bet if you change it to var newInput = $(' ') and add it to newInput it should get rendered. {{ Form::Submit }} is that AngularJs?
type: QuestionComment

http://stackoverflow.com/comment/40584751
has text: I see that you put a semicolon instead of a comma in your variable declarations. I see that `i` is leaking. And also I think you don't need `ctx.beginPath()`. I still can't get your demo to work with the translation, using Chrome 39.
comment on: http://stackoverflow.com/q/25925430
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26018351
type: Question
has comment: http://stackoverflow.com/comment/40751175
has answer: http://stackoverflow.com/a/26081864
has comment: http://stackoverflow.com/comment/40800916
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40751350
has body: I am having a huge issue with twitter bootstrap carousel for other browsers other than Chrome. I have looked all over the place for an answer and tried all the codes but nothing seems to help and I hope someone can help me out here with it. In Chrome, the carousel takes up the whole page when it loads and you do not need to scroll down to see the picture because the whole picture lands perfectly at the size of your browser, it also perfectly resizes when you make the browser smaller so you can check it out on tablets and mobile. This is the main issue, this does not happen on Firefox, IE, Safari and the like at all because it does not make the image perfectly load on the webpage and has it scroll up and down for the whole picture unlike Chrome, it seems that the CSS or jQuery doesnt function on those pages for some reason and works fine on Chrome. Please check my code and help me out here I have been at this for two weeks trying to find different solutions to this problem. ‹ › For my jQuery that I use for the Chrome to take in max height of the page it is as follows: $(".contentHeight").css("min-height",$(window).height()); Also, thanks to people here I have also managed to make the CSS which works fine on Chrome but fails in other browsers: .carousel .item { width: 100%; } .carousel .item img { width: 100%; height:100%; } html,body{ height:100%; } .carousel,.item,.active{ height:100%; } .carousel-inner{ height:100%; width: 100%; } I really dont know what the problem is, i am guessing it is the CSS or the jQuery but I tried changing those with no luck at all. Any help is much appreciated! $(".contentHeight").css("min-height",$(window).height()); .carousel .item { width: 100%; } .carousel .item img { width: 100%; height:100%; } html,body{ height:100%; } .carousel,.item,.active{ height:100%; } .carousel-inner{ height:100%; width: 100%; } ‹ ›
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/40783557
has title: Twitter bootstrap carousel works well with Chrome but doesn't on Firefox,Opera, and IE
tagged with: css
has comment: http://stackoverflow.com/comment/40783947
accepted answer: http://stackoverflow.com/a/26081864
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40752266
has comment: http://stackoverflow.com/comment/40846416
has comment: http://stackoverflow.com/comment/40783474
has comment: http://stackoverflow.com/comment/40783515

http://stackoverflow.com/comment/40518401
type: QuestionComment
comment on: http://stackoverflow.com/q/25889792
type: Comment
score: 1
has text: http://jsfiddle.net/x02cw6uL/ suggests you can. Does it work your end? It certainly makes the code less readable. Why not just add a line above and use a variable?

http://stackoverflow.com/a/25937146
has body: Try this, this should do the trick urlmenu.onchange = function() { var ref = window.open( this.options[ this.selectedIndex ].value, 'somename', ''); }; Instead of using '_blank' specify a name of the tab so that it will just refresh that same tab if it's open already and not create a new one. Using '_blank' you issues a browser command to open another tab (or window if you spesicified hiehgt) check my example below Try it
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25936829
downvote count: 0
score: 1

http://stackoverflow.com/q/25986991
downvote count: 1
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25987400
type: Question
has comment: http://stackoverflow.com/comment/40694418
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/25987216
tagged with: javascript
has title: Javascript - Make the whole div clicable
has body: I have a parent div element, and within it a child div element. Now there is a click handler for the child div, it brings a drop down(like a menu). Requirement - Is to bring the dropdown on click of the parent div also. Note - on click of parent div, and firing childdiv.click() won't work, infinite loop. Cannot do a stoppropagation, functionality for bringing the dropdown won't work.
tagged with: event-handling

http://stackoverflow.com/comment/40783055
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26027464
has text: My bad, I forgot to say it's find the template tag but not the elements inside the template
type: Comment

http://stackoverflow.com/a/25889170
score: 0
answers question: http://stackoverflow.com/q/25889072
type: Answer
has body: Try jQuery's .closest(); More info on their documentation page which can be found here: .closest()

http://stackoverflow.com/comment/40605169
type: AnswerComment
score: 0
has text: Thanks I have expanded on both your answers +1
type: Comment
comment on: http://stackoverflow.com/a/25935808

http://stackoverflow.com/q/25943050
has title: Trying to use a function with parameters to change two icons separately
type: UnansweredQuestion
type: Question
tagged with: polymer
tagged with: javascript
has answer: http://stackoverflow.com/a/25943078
tagged with: jquery
score: 0
answer count: 1
has body: I'm not quite sure why my code isn't working. I basically have a function that moves two different icons depending on which header you click on. Here's the code: var expanded = false; var eFunction = function (header, icon) { $(header).on('click', function () { if (expanded) { $(icon).css({backgroundPosition: '0 100%'}); expanded = true; } else { $(icon).css({backgroundPosition: '0 0'}); expanded = false; } }); }; eFunction(this.$.aOne, this.$.eOne); eFunction(this.$.aTwo, this.$.eTwo); I'm using Polymer, which translates this.$.aOne to aOne ID. I've console logged both and they're not the issue. Is there something with functions with parameters and css IDs? Here's the HTML, but I don't think it's relevant: {{items[0]}} {{contents[0]}} {{items[1]}} {{contents[1]}} edit I was saying if (expanded) instead of if (expanded == false). Whoops

http://stackoverflow.com/comment/40662282
comment on: http://stackoverflow.com/q/25969512
score: 0
has text: why do you pass argument schwierigkeit?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40687165
type: Comment
comment on: http://stackoverflow.com/a/25982690
has text: Do you have jquery included in your page.....that is the first question. Second question after button is clicked do you make it to your controller for page? Also, do you have a annotation above your controller? Only allowing gets or posts?
type: AnswerComment
score: 0

http://stackoverflow.com/q/26013657
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: cordova
type: UnansweredQuestion
score: 2
has body: I am newbie to HTML5 and javascript so please help me to get out from this problem. Here i am developing a phonegap application which i can run on android and ios. In my application i have to load the data and images and populate onto html page. So images and information related to that image will be displayed in a list view in html page. But i am not getting how to populate images and data on html page from data base. so please help me to getout from this problem. My html page should look like this after populating data. please help me.thanks in advance.
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26015115
has title: How to populate images from database to html page using html5 and javascript in phonegap application
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25984551
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25984540
has comment: http://stackoverflow.com/comment/40690115
accepted answer of: http://stackoverflow.com/q/25984540
has body: In the second branch of your conditional, you want to return the result: return isPalindrome(str.slice(1,-1)); Otherwise it simply completes the recursive call, exits the if statement, and returns undefined (since it encounters no return statement before the end of the function).
score: 4

http://stackoverflow.com/q/25940602
has comment: http://stackoverflow.com/comment/40611571
answer count: 1
has comment: http://stackoverflow.com/comment/40611923
upvote count: 3
has answer: http://stackoverflow.com/a/25951282
has body: So, currently i'm working on a web-app using theMovieDB's API, and it's an AngularJS application. I just need to get all popular films, but it doesn't seems to work .. Here is my code : var url = 'http://private-anon-7ac1c3824-themoviedb.apiary-mock.com/3/', key = 'API_KEY' mode = 'movie/popular'; $http.jsonp(url + mode + key) .success(function(data) { alert(data); }).error(function(data, status) { console.log(data, status); }); In return, all I got is an error from Chrome : Uncaught SyntaxError: Unexpected token : , and the status var equals '404'. However, I can see the list in the Chrome Inspector ... I.E. : { "page" : 1, "results" : { "adult" : false, "id" : 82992, ... } And when I'm trying tu use a normal "$http.get" request, it returns a cross-domain problem ... Do you guys have an idea ? I can't see my mistake ... EDIT : It seems to work with an other server. I changed the URL to 'http://private-18cc-themoviedb.apiary.io/3/' and it's working now, maybe it was just an error from the API. Thank you guys !
type: AnsweredQuestion
tagged with: api
downvote count: 0
tagged with: javascript
favorite count: 0
has title: AngularJS - Error with theMovieDB's API
tagged with: angularjs
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25951282

http://stackoverflow.com/comment/40577066
has text: Doesn't work me, is cookie set across the domain? Should cookie has a name to identify? I should put the code inside the header (for all pages)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25919136

http://stackoverflow.com/q/25971721
has comment: http://stackoverflow.com/comment/51241757
tagged with: jquery
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/51170653
type: UnansweredQuestion
has title: How to remove angularjs attributes and classes from HTML?
tagged with: http://stackoverflow.com/tag/html
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/40665972
downvote count: 1
type: Question
has body: I have a simple AngularJS app that renders a parent element containing some nested elements from a template using ng-bind and ng-repeat. I would like to grab the HTML (innerHtml) of the generated element (as a string) for usage in a different application (where it is to be used as static HTML, outside the context of AngularJS). This is easy enough to do by using jQuery('#parent-element').html(). The problem with this approach is that the HTML string contains Angular attributes (for example ng-bind) as well as Angular generated comments (from ng-repeat) and classes (such as ng-scope). I can probably come up with some regular expression to clean up all of these from the string directly, but I would love to know if there is a cleaner way to do this. So, is there a more "Angular" way to either prevent the attributes/classes/comments from being generated or to extract a clean version of the source HTML of the generated elements? UPDATE: For @suhas-united and others who might find this useful, I ended up using the following which works well enough for my use case- var cleaner = angular.element('#dirtier') .html() .replace(/&lt;!--[^&gt;]*--&gt;/gi, '') .replace(/\n/g, '') .replace(/ng-.+?\b/g, '') .replace(/ng-.+?=".*?"/g, '') .replace(/class=""/g, '') .replace(/\"/g, "\\\"") .replace(/\s+/g, " ");
has answer: http://stackoverflow.com/a/35197213
has answer: http://stackoverflow.com/a/25972080
tagged with: javascript
has answer: http://stackoverflow.com/a/33566092
linked to: http://stackoverflow.com/q/2048720
linked to: http://stackoverflow.com/q/1732348
answer count: 3
has comment: http://stackoverflow.com/comment/40666184

http://stackoverflow.com/q/25923324
has comment: http://stackoverflow.com/comment/40580441
tagged with: javascript
has title: fs.writeFileSync replacement for regular javascript
score: 0
tagged with: arrays
answer count: 1
tagged with: byte
has answer: http://stackoverflow.com/a/40832336
type: UnansweredQuestion
tagged with: node.js
has body: I am using a code library who's examples use Node.js to write a file to the local file system, like this: fs.writeFileSync('test2.mid', file.toBytes(), 'binary'); I am not using Node.js in my project, so i want to make this a js variable that is base64 string instead of a physical file. How can I do this using only javascript? file.toBytes() is a function that returns bytes of data to write file. Any help is appreciated!
has comment: http://stackoverflow.com/comment/40580396
has comment: http://stackoverflow.com/comment/40580495
type: Question

http://stackoverflow.com/q/25956429
tagged with: javascript
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Onclick Event on Text to Reveal Image
tagged with: events
tagged with: css
has body: I am new to coding but I have lots of basic knowledge about HTML, CSS, Javascript, and jQuery. I want one of my images to appear when I click on text but am having trouble executing it properly. I'm creating a restaurant site where you click the text and the image of food appears below. I made the text be class="item" in my css. I just want to click on it and have an image appear. Is it possible to achieve all this with just html and css or should I use a plugin. HTML: text CSS for "item": .item { color: #B24005; font-size: 20px; text-align: left } .item:hover { color: #00B295; font-size: 20px; text-align: left }
tagged with: onclick
answer count: 2
has answer: http://stackoverflow.com/a/25956447
upvote count: 1
has answer: http://stackoverflow.com/a/57523715
type: UnansweredQuestion
downvote count: 0

http://stackoverflow.com/comment/56239780
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34249126
has text: Could you a small summary, from the link. That improves your answer

http://stackoverflow.com/comment/40722336
score: 0
has text: @Bucky: It can look at forms in the HTML, request other links to find forms, etc.. The rule of thumb, though, is that it can *always* see what the real visitor sees… except for whether a link is `:visited`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26001430

http://stackoverflow.com/q/25895489
has body: I have some problem to add new div element with jquery but there is no id / clas in div parent. for the example i want to add new div element before &lt;img&gt;, this img have not id/class, also div parent. my question is, how to create like that with jquery? thanks all :)
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40529222
has title: Add new div / element by jquery but there is no ID / class div parent
has comment: http://stackoverflow.com/comment/40529181
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25895630
has comment: http://stackoverflow.com/comment/40529254
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25895672
tagged with: jquery
has comment: http://stackoverflow.com/comment/40529110

http://stackoverflow.com/comment/40694970
score: 1
comment on: http://stackoverflow.com/a/25967818
type: Comment
has text: I am self learned programmer, I am still so novice... because that I always asked here, any problem I found during programming
type: AnswerComment

http://stackoverflow.com/a/26014104
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25972879
has body: Based on @Hamix's excellent answer, and some advice from MDN about createEvent() being out of date, I eventually went with: var changeEvent = new Event('change'); realSelect.dispatchEvent(changeEvent); Here's a demo - again based on @Hamix's jsfiddle so go give him an upvote.

analytics
tags question: http://stackoverflow.com/q/25906751
tags question: http://stackoverflow.com/q/26001105
type: Tag
tag name: analytics
tags question: http://stackoverflow.com/q/25925050

http://stackoverflow.com/q/25904440
accepted answer: http://stackoverflow.com/a/25907361
has answer: http://stackoverflow.com/a/39145518
has body: I noticed already have a release "addHTML() can now split the canvas into multiple pages" which can find through this link : https://github.com/MrRio/jsPDF/releases/tag/v1.0.138. May i know how it work? In my case, i just tried it out when click on "save as pdf" button, it just render a single page instead of multiple pages (sometimes didn't worked, i assume because the content is too long to be generated as pdf). Would appreciate if there are some examples for this case. Thanks! Attached my codes below: var pdf = new jsPDF('p', 'pt', 'a4'); pdf.addHTML($(".pdf-wrapper"), function () { var string = pdf.output('datauristring'); pdf.save("test.pdf"); });
has answer: http://stackoverflow.com/a/38788839
upvote count: 15
answer count: 4
tagged with: canvas
downvote count: 0
possible better answer: http://stackoverflow.com/a/38788839
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
tagged with: jspdf
has answer: http://stackoverflow.com/a/46999444
type: AnsweredQuestion
has title: JSPDF - addHTML() Multiple Canvas Page
favorite count: 0
has answer: http://stackoverflow.com/a/25907361
score: 15
type: Question

http://stackoverflow.com/q/25888766
favorite count: 0
downvote count: 2
score: -2
tagged with: regex
type: AnsweredQuestion
has body: Regular expression to search a particular word i have following data (Calabash::Cucumber::Launcher::StartError) /Users/ushusadmin/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.9.169/lib/calabash-cucumber/launcher.rb:441:in `new_run_loop' /Users/ushusadmin/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.9.169/lib/calabash-cucumber/launcher.rb:351:in `relaunch' /Users/ushusadmin/Neema/mobile_cards_app/MobileCards/features/support/01_launch.rb:64:in `Before' Using regular expression i want to search a word(StartError) is found or not..
accepted answer: http://stackoverflow.com/a/25888804
has comment: http://stackoverflow.com/comment/40516580
type: Question
has title: Regular expression to search for an exact word
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25888804

http://stackoverflow.com/q/25998892
type: Question
has body: I've fiddled with many snippets, but this is the closest I have so far: function Q(a){ if(typeof a=="string"){ var b=a[0],c=a.substring(1); return b=="#"?document.getElementById(c):b=="."?document.getElementsByClassName(c):document.getElementsByTagName(a); } } Q.setClass=function(b){a.className=b} I want to be able to do Q("#ID").setClass("testClass"); How can I do this?
tagged with: object
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/40716015
accepted answer: http://stackoverflow.com/a/25999379
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40716096
has comment: http://stackoverflow.com/comment/40717526
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25999379
has title: Object/Function hybrid
has comment: http://stackoverflow.com/comment/40715554

http://stackoverflow.com/comment/40752527
type: Comment
comment on: http://stackoverflow.com/q/26014810
has text: I've edited the Question, but I really do not see why it was marked as unclear in the first place. It was answered correctly by @Quince.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25946515
answers question: http://stackoverflow.com/q/25946389
score: 0
type: AcceptedAnswer
has body: you can use as a this example may be useful fir you, var jsn = '{"wty_upgrade":[ {"wty":"Upgrade from 3 to 5 years", "mth":24, "pig":3000}, {"wty":"Upgrade from 3 to 10 years", "mth":84, "pig":8000}]}'; //OR you can parse then use jsonres = JSON.parse(jsn);
type: Answer
has comment: http://stackoverflow.com/comment/40621373
accepted answer of: http://stackoverflow.com/q/25946389

http://stackoverflow.com/comment/40584086
has text: Can you post a demo so we can see?
type: Comment
comment on: http://stackoverflow.com/q/25925430
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40538902
has text: you should paste a minimum of code so users can help you with your problem.
comment on: http://stackoverflow.com/q/25900727
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25958733
tagged with: javascript
has body: I am trying to test rest service like "/service/home/autolaunch?rnd=" The query parameter "rnd" value always is unique to get rid of internet explorer caching issue. While writing jasmine test case for above back end service- I got error 'Unexpected request' as query parameter is different for each time. is there any way to skip query parameter while writing jasmine test. In service the call is like that- http.get('/service/home/autolaunch', {params:{rnd:new Date().getTime()}}).then( function(data){ // TO do }); The Jasmine test case is- httpBackend.when('GET','/service/home/autolaunch').respond(-- to do); even if define test case in following way- httpBackend.when('GET','/service/home/autolaunch?rnd=' + new Date().getTime()).respond(-- to do); still getting Unexpected request. After doing debugging got to know the time stamp value is different.
has title: jasmine test cases with angular js
score: 0
has answer: http://stackoverflow.com/a/25958840
answer count: 1
tagged with: jasmine
accepted answer: http://stackoverflow.com/a/25958840
tagged with: angularjs
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/25902717
score: 0
has body: I am a newbie in jquery, I have a stupid question for onclick function. Please help me. I have a table, when viewer click "Add new" button, I will using jquery add a row to existing table. In new row, there are 2 textbox to input data and a button to transfer data from textbox to php file. This is my code: html code: No First name Last name <?php include("functions/connect_db.php"); $no=0; $sql="SELECT * FROM `fullnames`"; $result=mysqli_query($conn,$sql) or die('Could not select Machine'.mysqli_error($conn)); while ($set=mysqli_fetch_array($result,MYSQLI_ASSOC)) { $no++; $first=$set['firstname']; $last=$set['lastname']; ?> <?php echo $no; ?> <?php echo $first; ?> <?php echo $last; ?> <?php } ?> script: function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cell1 = row.insertCell(0); cell1.innerHTML = rowCount ; var cell2 = row.insertCell(1); var element1 = document.createElement("input"); element1.type = "text"; element1.id="first_input_"+rowCount; cell2.appendChild(element1); var cell3 = row.insertCell(2); var element2 = document.createElement("input"); element2.type = "text"; element2.id="last_input_"+rowCount; cell3.appendChild(element2); var cell4=row.insertCell(3); var element3 = document.createElement('input'); element3.setAttribute('type','button'); element3.id="#button_"+rowCount; element3.className="butt_class"; element3.value='Save'; cell4.appendChild(element3); } $(document).ready(function() { $(".butt_class").click(function() { var ID=$(this).attr('id'); var first=$("#first_input_"+ID).val(); var last=$("#last_input_"+ID).val(); if(first.length>0 && last.length>0) { $.ajax({ type: "POST", url: "add_new.php", data: dataString, cache: false }); } }) }) When I click to Save button in each row, nothing is happen. I tried by replace all click Save function with alert but there is not change. Pls help me. Thank you in advance!
type: Question
tagged with: javascript
answer count: 1
tagged with: button
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25902953
tagged with: php
has title: Onclick function button in javascript not working
tagged with: onclick

http://stackoverflow.com/q/25953934
tagged with: javascript
has answer: http://stackoverflow.com/a/25977373
answer count: 2
possible better answer: http://stackoverflow.com/a/25975770
has body: I am working on a new game using the PhaserJS library for HTML5 and am at a loss with a problem I've run into. I'm using the P2 physics engine for basic platform physics and I'm unable to get the world bounds collision to work. Here is my code: Game.js function create() { game.world.setBounds(0, 0, 800, 300); game.physics.startSystem(Phaser.Physics.P2JS); game.physics.p2.restitution = 0.8; player.create(game); player.instance.body.collideWorldBounds = true; } Player.js Player.prototype.create = function(game) { this.instance = game.add.sprite(100, 100, 'player'); game.physics.p2.enable(this.instance, Phaser.Physics.P2JS); this.cursors = game.input.keyboard.createCursorKeys(); }; Right now my understanding is that I need to set the world bounds by calling "game.world.setBounds(width, height)" and then check bounds by calling "player.instance.body.collideWorldBounds = true;", but the player sprite is still going right through the boundaries. Any help is greatly appreciated. Thanks! EDIT: I'm using PhaserJS 2.0.7.
downvote count: 0
favorite count: 0
has title: How to add basic world collision with PhaserJS?
tagged with: http://stackoverflow.com/tag/html
score: 6
accepted answer: http://stackoverflow.com/a/25977373
upvote count: 6
type: AnsweredQuestion
type: Question
tagged with: phaser-framework
has answer: http://stackoverflow.com/a/25975770

http://stackoverflow.com/comment/40527494
type: AnswerComment
score: 0
type: Comment
has text: Just a point of interest. This regex will _not_ match any tag name that begins with `/br/i`
comment on: http://stackoverflow.com/a/25877132

html5-video
tags question: http://stackoverflow.com/q/25890875
tag name: html5-video
type: Tag
tags question: http://stackoverflow.com/q/25961638
tags question: http://stackoverflow.com/q/25924387
tags question: http://stackoverflow.com/q/25916554
tags question: http://stackoverflow.com/q/25960499

http://stackoverflow.com/comment/40529135
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25894855
has text: Is allow_url_fopen On? (see phpinfo())

http://stackoverflow.com/q/25975063
has body: The current quantile scale takes all the input values as the domain to map the output range. But if the data is extremely large, I want the processing to happen on the server giving me the quartile values. So I get: var quartiles=[5, 10, 15, 20, 25, 30, 35, 40, 45]; // 9 values with the mean (25) at the middle and standard deviations to each side var valueToMark = 37; Using d3, how do I correctly create a quantile scale and mark them all on a line given only the quantiles and value to mark? p.s. my knowledge of quantiles/quartiles is limited, therefore I would be grateful if I'm also corrected on any wrong assumptions I've exhibited here.
tagged with: quantile
tagged with: javascript
tagged with: statistics
has title: d3 quantile or quartile scale given the quartile values
has comment: http://stackoverflow.com/comment/40685132
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40693513
answer count: 0
score: 0
type: Question

http://stackoverflow.com/q/25901752
has comment: http://stackoverflow.com/comment/40540850
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40540794
score: 0
has answer: http://stackoverflow.com/a/25901864
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40540977
type: Question
has title: how to prepend multiple &nbsp using javascript/jquery
has comment: http://stackoverflow.com/comment/40540855
has body: Good day, How to add multiple spaces before the text on javascript? Here's what Im doing but it only add "&nbsp" word before the word instead of blank spaces. my HTML Asset 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 Current Assets 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 Bank Accounts 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 9,999,999.00 my JS $('.report-table tr ').each(function(){ var classList = []; classList = this.className.split(' '); var space = ''; console.log(classList); for(var x = 0; classList.length > x ; x++) { if(hasNumbers(classList[x])) { var value = classList[x].replace( /^\D+/g, ''); var string = getString(classList[x]); if(string == 'indent') { for(z=0; z<=value; z++) { space += '&nbsp'; } } } } $(this).find('td:first-child').prepend(space); }); result: &nbsp&nbsp&nbsp&nbspWordHere! Thanks for the help and have a good day ahead!
answer count: 1
accepted answer: http://stackoverflow.com/a/25901864
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40608566
score: 1
has text: *"this is urgent."*- Isn't it always. You'll have bigger problems later if you don't start using prepared statements **now**.
comment on: http://stackoverflow.com/q/25939066
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40572875
type: QuestionComment
has text: So why not use: `/\|?ABC:(\d+)\|?/`
score: 0
comment on: http://stackoverflow.com/q/25919103
type: Comment

http://stackoverflow.com/comment/40717565
score: 1
type: QuestionComment
has text: You have to use callbacks, a callback is a function that is call after the current function finishe, example: fadeIn(1850, function (){console.log('I have finished :)');});
type: Comment
comment on: http://stackoverflow.com/q/25999911

http://stackoverflow.com/a/50471248
type: Answer
has comment: http://stackoverflow.com/comment/89037460
has comment: http://stackoverflow.com/comment/89039775
has body: The easiest way to accomplish this goal is to wrap the object tag in a div, bind the click listener to the div, and add pointer-events: none to the object tag's styles. Sample fiddle: .clickable { background: red; width: 100px; height: 100px; border-radius: 100px; overflow: hidden; } object { width: 100%; pointer-events: none; } &lt;div class='clickable' onclick='alert("WOW")'&gt; &lt;object type='image/svg+xml' data='https://douglasduhaime.com/assets/images/icons/home.svg' /&gt; &lt;/div&gt;
score: 15
has comment: http://stackoverflow.com/comment/89028247
upvote count: 15
downvote count: 0
answers question: http://stackoverflow.com/q/25916403

http://stackoverflow.com/q/25879689
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/75351237
has comment: http://stackoverflow.com/comment/40501385
type: Question
has comment: http://stackoverflow.com/comment/40501224
tagged with: javascript
has body: I am trying to learn web dev and did a few courses from codeacademy. It just teaches syntax and meaning of stuff but not how to implement them. Can someone help me to understand how all of the above are linked. I tried making a basic code in which i tried linking some stuff but the css file doesnt link to the HTML file on the webpage. The code is below <!DOCTYP html> HOME CONTACT TRANSFER STUDENT? INDIA -> US Learn More This website has been hosted specially for Transfer Students from India into the colleges in the United States. Information regarding transfers, eligibility, life and other important aspects of college life as a transfer student is available. If any more information is required please vist the contacts tab. Explore and know about College Transfers I also made a small css file and tried to make some changes but they are not visible on the page The css code is below .jumbotron h1 { font-size:30px; color:blue; } .jumbotron { background-image:url('http://urbanupdate.in/wp-content/uploads/ 2014/03/india-us-flag.jpg'); } .nav a { color: #5a5a5a; font-size: 11px; font-weight: bold; padding: 14px 10px; text-transform: uppercase; } Also, i am saving these files in the same folder and secondly i am using scoreboard. Also how to link other files in my computer to the txt file? I have still not included any jquery code but correct me if i am wrong The jquery code will go inside two script tags after the script tag where i linked jquery. Right?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40501405
has title: How to link CSS, javascript and HTML files together
tagged with: jquery
has comment: http://stackoverflow.com/comment/40501198
has comment: http://stackoverflow.com/comment/40501279
has comment: http://stackoverflow.com/comment/40501320
type: UnansweredQuestion

http://stackoverflow.com/a/26031983
has body: you need to pass this to your function copyClipboard. so your button code will look like this &lt;asp:Button ID="btnCopy" runat="server" Text="Copy" OnClientClick="copyClipboard(this)"/&gt; and a class to your div wrapping your textbox, &lt;div class="texdiv"&gt; &lt;asp:TextBox ID="txtMessage" runat="server" Text='&lt;%#DataBinder.Eval(Container,"DataItem.Message")%&gt;' Width="100%" TextMode="MultiLine"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; and your js function would be function copyClipboard(th) { alert($(th).parents().prevAll('.texdiv').find('*[id^=rpter_txtMessage]').val()); } on client click of button, you need to find it's previous textbox then you can get it's value it will give you corresponding textbox value
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26024605
has comment: http://stackoverflow.com/comment/40793207

http://stackoverflow.com/q/25997327
has answer: http://stackoverflow.com/a/26011749
tagged with: function
has answer: http://stackoverflow.com/a/25997597
downvote count: 0
tagged with: javascript
answer count: 6
tagged with: string
linked to: http://stackoverflow.com/q/11071269
favorite count: 0
has answer: http://stackoverflow.com/a/25997420
upvote count: 3
has answer: http://stackoverflow.com/a/25997399
has comment: http://stackoverflow.com/comment/40713182
has body: Sorry for bad wording in the question but it's hard to explain for me. I'm using several bxsliders on a page and some are placed in hidden divs. Unfortunately images are not shown in the slider after making the parent div visible unless the slider is reloaded (See here: bxSlider within show/hide divs). So let's say I initiate the sliders at the beginning with: var slider_0=$("#slider_0 .bxslider").bxSlider({ //bxslider options here }); var slider_4=$("#slider_4 .bxslider").bxSlider({ //bxslider options here }); var slider_7=$("#slider_7 .bxslider").bxSlider({ //bxslider options here }); The sliders are not consecutively numbered but there is a navigation and if I click the 7th element it leads to slider_7. So I could get the index of the clicked item with: $(this).index(); When I call slider_7.reloadSlider(); it would work but I don't know which slider the user clicks and which number it has. So would it be possible to call that with a created string like this: slider_name='slider_'+$(this).index(); slider_name.reloadSlider(); works not of course. Is there a way to do it?
has answer: http://stackoverflow.com/a/25997408
tagged with: bxslider
has title: How to create a string and use a function that's named after it?
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26011749
possible better answer: http://stackoverflow.com/a/25997399
has answer: http://stackoverflow.com/a/25997515
type: Question

http://stackoverflow.com/a/25998118
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25997984
has body: You can listen to the document on clicks and just hide the .selectbox ul tags. Since the &lt;select&gt; naturally eats the click event to stop it bubbling up to the document, you don't need to worry about checking where the event's come from - you know it's not come from the selectbox. Generally you should be very leery of binding event handlers to the document, but since this shouldn't ever get called too often (click) is a relatively infrequent event), you should be fine. This should work: (function($) { $(document).on('click', function(e) { $('.selectbox').find('ul').hide(); }); })(jQuery); Here's an example jsFiddle
score: 1
upvote count: 1

http://stackoverflow.com/q/25965729
type: Question
has comment: http://stackoverflow.com/comment/40655745
tagged with: javascript
favorite count: 0
tagged with: angularfire
tagged with: angularjs
answer count: 0
has body: Edit: it's worth noting that tasks added to the third input seem to add to all users. Haven't been able to trace why. I made a plunkr to help explain the problem: http://plnkr.co/edit/1tB0aitXjQYS4rIHcpjM?s=HCyIxFkzuuFbAQss I'm trying to initiate an array with data from a firebase array. It's showing up when I do a console.log but not showing up in the view when I do an ng-repeat. Any thoughts on what I can try? //view &lt;ul class="tasks-list" ng-init="populateTasks(newDate(), key)"&gt; &lt;li ng-repeat="day in week | reverseArray"&gt; //controller $scope.populateTasks = function(date, key){ var uri = "https://talllly.firebaseio.com/users/"+key+"/tasks/" + getWeekStart(date); var uri_dec = decodeURIComponent(uri); var res = uri_dec; $scope.ref = new Firebase(res); var sync = $firebase($scope.ref); var week = sync.$asArray(); $scope.week = week; console.log($scope.week); };
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40655856
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40755666
tagged with: firebase
has title: $scope.array showing up in console.log but not in the view after ng-repeat

http://stackoverflow.com/q/26029870
has comment: http://stackoverflow.com/comment/40808892
has comment: http://stackoverflow.com/comment/40796293
has comment: http://stackoverflow.com/comment/40799472
tagged with: firebase
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40809345
has comment: http://stackoverflow.com/comment/40791914
has title: What is the most efficient logic to .startAt(thisWeek) and .endAt(nextWeek) using moment.js and angularfire?
type: Question
has body: "efficient" is a nice way of saying I can't fathom a good way to do it! I'm having a tough time figuring out how to set the current week and reference it in a new Firebase record and then go to the previousWeek and nextWeek in the context of the current week. var ref = new Firebase('https://plnkr.firebaseio.com/tasks').startAt(start).endAt(end); This is the reference I am using. startAt() is based on the beginning of the current week, endAt() is 7 days after that. But I can't wrap my head around setting up a new reference to add or remove 7 days from start and end. Hopefully that at least makes some sense. Here is the plnkr with the code so far: http://plnkr.co/edit/A8lDKbNvhcSzbWVrysVm?p=preview Do I need to modify the existing ref somehow? If I make a new ref will that be passed along to the scope properly? Any help would be much appreciated. angular.module('app').controller('MainCtrl', function($firebase, $scope) { var populateTasks = function(start, end){ var ref = new Firebase('https://plnkr.firebaseio.com/tasks').startAt(start).endAt(end); var list = $firebase(ref).$asArray(); $scope.list = list; }; //initialize week var today = moment(); var startThisWeek = today.startOf('week').valueOf(); var endThisWeek = today.startOf('week').add(7, 'd').valueOf(); var thisWeek = today.startOf('week'); populateTasks(startThisWeek, endThisWeek); $scope.currentWeek = startThisWeek; var weekInMilli = moment.duration(1, 'weeks').valueOf(); //set next week $scope.nextWeek = function(){ $scope.currentWeek += weekInMilli; var startNextWeek = thisWeek.add(7, 'd').valueOf(); var endNextWeek = thisWeek.add(14, 'd').valueOf(); populateTasks(startNextWeek, endNextWeek); }; //set previous week $scope.prevWeek = function(){ $scope.currentWeek -= weekInMilli; var startLastWeek = thisWeek.subtract(7, 'd').valueOf(); var endLastWeek = thisWeek.subtract(14, 'd').valueOf(); populateTasks(startLastWeek, endLastWeek); }; var last = null; $scope.priorityChanged = function(priority) { var curren…
has comment: http://stackoverflow.com/comment/40799194
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790855
has comment: http://stackoverflow.com/comment/40791293
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40796223
tagged with: momentjs
tagged with: angularfire
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/26047958
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40808089
has answer: http://stackoverflow.com/a/26050243
has comment: http://stackoverflow.com/comment/40794020

http://stackoverflow.com/comment/40688073
has text: Thanks, I don't know about backbone.js, was indeed wondering about that #! as I have seen them before but didn't knew what they were. Still open to suggestions, but thanks for the pointers.
comment on: http://stackoverflow.com/q/25982675
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25975375
has comment: http://stackoverflow.com/comment/40673220
tagged with: mysql
has answer: http://stackoverflow.com/a/25975713
has title: DataTables: Show action button depending on query
type: Question
upvote count: 4
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has body: I have jquery DataTables to show data through an ajax call. It all loads nicely and at the last column, I have added a action button which will add the data to another db. But i cant seem to figure out how to solve one thing: When the button has been pressed and the system has added the row data to the other db, i dont want to show the button again on reload. I have figure that i of course need the id of all rows in my add-to-db, so i have made a db query returning all the row ids that has been added - but how can i check of the id matches a row in my table and then dont show the button for the row in dataTables? Below you can see how i set up my DataTable: var table = $('#user-table').DataTable({ "destroy": true, "processing": false, "serverSide": false, "ajax": { "url": "myAjaxCall", "dataType": "json", "data": JSON.stringify(data()), "type": "GET", "dataSrc": "collection" }, "columns": [ {"data": "customerNumber"}, {"data": "name"}, {"data": "coNumber"}, {"data": "city"}, {"data": "email"}, {"data": "balance"}, {"data": null, "defaultContent": "Add", className: "center", "bSortable": false, "bSearchable": false} ] }); I could really need some help on this one - first time with dataTables - i love it, but just need to get this one to the finish line :-)
accepted answer: http://stackoverflow.com/a/25975989
possible better answer: http://stackoverflow.com/a/25975713
favorite count: 0
has comment: http://stackoverflow.com/comment/40672942
has comment: http://stackoverflow.com/comment/40672876
has answer: http://stackoverflow.com/a/25975989
tagged with: datatable
type: AnsweredQuestion

http://stackoverflow.com/comment/40727739
type: Comment
comment on: http://stackoverflow.com/a/25967525
type: AnswerComment
has text: What device are you using?
score: 0

http://stackoverflow.com/comment/40607872
type: Comment
comment on: http://stackoverflow.com/a/25935697
type: AnswerComment
has text: Thanks. At first it didnt work, but I changet now the `value` to `ng-value`, and before when I removed the interpolate I left these `' '` and removing them it worked like charm. :)
score: 0

http://stackoverflow.com/a/26022001
accepted answer of: http://stackoverflow.com/q/26010710
answers question: http://stackoverflow.com/q/26010710
upvote count: 1
has body: setTimeout takes either a function or a string as its first parameter. You aren't giving it a function, you're invoking a function. So whatever openView() returns (likely undefined) is what is getting sent to setTimeout. Try: setTimeout =&gt; @openView(@uuid) , 500
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40612297
type: QuestionComment
type: Comment
has text: Because it is the first , after a whitespace. Actually this makes this thing hard. It actually is matched by the following pattern: \s+(.?),\s, but this pattern als includes ``ext,`` I need to exclude it.
comment on: http://stackoverflow.com/q/25940895
score: 0

http://stackoverflow.com/comment/40496735
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25877402
type: Comment
has text: A little more information would be helpful in making this a complete answer.

http://stackoverflow.com/comment/40672626
comment on: http://stackoverflow.com/a/25974100
score: 0
type: Comment
has text: thanks for the through explanation, two things I want to ask about. How to include an external script file, can I just use `script` tag to include just like `link rel="stylesheet"` for css? I use [generator-polymer](https://github.com/yeoman/generator-polymer), It is more in an application structure rather than one custom element, can I publish from that generator as well? Finally note that, I have three custom elements that depend on each other I can have nested imports and publish all in one package as well right? @ErikIsaksen
type: AnswerComment

http://stackoverflow.com/comment/40631579
type: QuestionComment
comment on: http://stackoverflow.com/q/25949680
has text: i have a button on that div , when i click that , it get close and then it re-appear after 1 min again, that is the meaning of refreshing the div
score: 0
type: Comment

http://stackoverflow.com/comment/40615033
has text: And how you are making ajax request?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25927568
type: Comment

http://stackoverflow.com/q/25962876
tagged with: spry
has comment: http://stackoverflow.com/comment/40650018
has answer: http://stackoverflow.com/a/25962992
type: Question
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25962992
has body: i have been trying with all different codes but still can't get this to work. All i need is to fade in an image on mouseover, and fadeout on mouseout. NOT Swapping images. i just need a simple fade in fade out effect. fade-in on mouse over is working like a charm, but on mouse out my image does not fade out properly. i just need the image to goes back to its original state when on mouse out. when i move my mouse back to the image, it sometimes loop the fade in and fade out effect also. Please help =( here's my code: &lt;img src="images/adapter-vector.png" width="250" height="88" id="Image1" onmouseover="MM_effectAppearFade (this, 500, 100, 50, true)" Onmouseout="MM_effectAppearFade(this, 500, 50, 100, true)"&gt;
has title: Fadein on mouseover and fadeout on mouseout
type: AnsweredQuestion

http://stackoverflow.com/a/25964212
type: Answer
has body: The accepted answer solved the problem I was having, but I also wanted the colors to be displayed in hex, which isn't what was returned by jQuery. So I ported in a solution for that from Can I force jQuery.css("backgroundColor") returns on hexadecimal format?. This is the final jQuery I ended up implementing: $("td").text(function() { color = $(this).css("backgroundColor"); bg = color.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); } return "#" + hex(bg[1]) + hex(bg[2]) + hex(bg[3]); });
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25953758
downvote count: 0

http://stackoverflow.com/comment/40575983
has text: I don't think it's gonna be flawless, but it's part of the game. Thank you again :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25917738
type: Comment

http://stackoverflow.com/comment/40628093
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25951018
has text: script like this... show automatic next date with 3 months difference from current date
score: 0

http://stackoverflow.com/q/25966849
duplicate of: http://stackoverflow.com/q/1359018
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40657459
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40657685
has comment: http://stackoverflow.com/comment/40657630
score: 0
has comment: http://stackoverflow.com/comment/40657680
has comment: http://stackoverflow.com/comment/40657451
has comment: http://stackoverflow.com/comment/40657587
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40657578
has title: jQuery not working in Chrome but working on jsFiddle
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40657682
tagged with: css
linked to: http://stackoverflow.com/q/1359018
has comment: http://stackoverflow.com/comment/40657599
has comment: http://stackoverflow.com/comment/40657715
answer count: 0
has body: OK I'm trying a simple anchor tag javascript that will trigger the submit instead of input-submit here's my JS code $(document).ready(function() { alert('1'); $( "#vote-poll" ).click(function() { alert('2'); $( "#form-vote" ).submit(); }); $( "#form-vote" ).submit(function( event ) { event.preventDefault(); alert('3'); }); }); Just assume every element is correct because I tried it in Firefox and it's working fine. I tried it in Chrome, it only alerts the "1". I tried it in Chrome on jsFiddle and it worked.. I really don't know whats wrong in this.

http://stackoverflow.com/q/25879439
accepted answer: http://stackoverflow.com/a/25879656
type: Question
tagged with: requestanimationframe
upvote count: 6
tagged with: javascript
has body: I'd like to use setInterval for actual steps in a program and requestAnimationFrame for rendering. I was under the impression this would be the perfect mix: rendering speed would not slow down actual progression, so dips in frame rate would only affect frame rate and still sync up. What I got, however, were drops in the setInterval function as well. An example of what I mean, intentionally bogged down with shadows: http://jsfiddle.net/Ltdz168m/ Reduce or increase the number of refills and you'll see the difference It would appear that requestAnimationFrame is actually not a solution to rendering lag slowing down JavaScript. How then would I update the logic side of things, which can be done at 60 fps, without hindrance from rendering? Are WebWorkers absolutely necessary?
answer count: 1
favorite count: 0
type: AnsweredQuestion
has title: Using setInterval with requestAnimationFrame
downvote count: 0
score: 6
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25879656

http://stackoverflow.com/q/25883611
score: 0
answer count: 1
has title: How to send the form with submit event instead of AJAX post?
has comment: http://stackoverflow.com/comment/40507760
has answer: http://stackoverflow.com/a/32977735
has body: I use Yandex.Metrika to track user activities on my site (like Google Analytics does). It has an option to track how user works with html forms - what he/she inputs there, how much time spends on each field etc. (link in Russian). But in order to work properly, it requires to submit the form with submit event. I have the following code: ... Calculate $("#calc").click(function() { $.ajax({ type: 'POST', dataType: 'json', data: { // all utsDetails form fields are there }, beforeSend: function(){ // ... } }) .done(function(data, textStatus, jqXHR) { // ... }); Is there any way to modify my code to keep the functionality unchanged (i.e. page shouldn't be reloaded on button is pressed, result should be received as JSON, beforeSend and done functions should be executed etc.), but to send the form data with submit?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: form-submit
tagged with: yandex-metrika
has comment: http://stackoverflow.com/comment/40507767
accepted answer: http://stackoverflow.com/a/32977735
type: Question
tagged with: javascript
tagged with: forms

http://stackoverflow.com/q/26003255
downvote count: 0
tagged with: javascript
score: 4
tagged with: encodeuricomponent
has comment: http://stackoverflow.com/comment/49558468
has comment: http://stackoverflow.com/comment/49629047
tagged with: http://stackoverflow.com/tag/csv
has answer: http://stackoverflow.com/a/30934268
favorite count: 0
tagged with: download
type: UnansweredQuestion
has title: encodeURI file download - crashing browser
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/49558732
has comment: http://stackoverflow.com/comment/49630609
has comment: http://stackoverflow.com/comment/49628718
has comment: http://stackoverflow.com/comment/49550805
has body: I created a web application to clean up CSV/TSV data. The app allows me to upload a CSV file, read it, fix data, and then download a new CSV file with the correct data. One challenge I have run into is downloading files with more than ~ 2500 lines. The browser crashes with the following error message: "Aw, Snap! Something went wrong while displaying this webpage..." To work around this I have changed the programming to download multiple CSV files not exceeding 2500 lines until all the data is downloaded. I would then put together the downloaded CSV files into a final file. That's not the solution I am looking for. Working with files of well over 100,000 lines, I need to download all contents in 1 file, and not 40. I also need a front-end solution. Following is the code for downloading the CSV file. I am creating a hidden link, encoding the contents of data array (each element has 1000 lines) and creating the path for the hidden link. I then trigger a click on the link to start the download. var startDownload = function (data){ var hiddenElement = document.createElement('a'); var path = 'data:attachment/tsv,'; for (i=0;i&lt;data.length;i++){ path += encodeURI(data[i]); } hiddenElement.href = path; hiddenElement.target = '_blank'; hiddenElement.download = 'result.tsv'; hiddenElement.click(); } In my case the above process works for ~ 2500 lines at a time. If I attempt to download bigger files, the browser crashes. What am I doing wrong, and how can I download bigger files without crashing the browser? The file that is crashing the browser has (12,000 rows by 48 columns) p.s. I am doing all of this in Google Chrome, which allows for file upload. So the solution should work in Chrome.
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/30885559

http://stackoverflow.com/a/25893368
has comment: http://stackoverflow.com/comment/127375958
has body: Here is an example for you... http://jsfiddle.net/Se2UE/4/ I had a similar issue previously. You just need to add the data to a new array and update the graph. The key elements are: //New data array var NewChartData = []; //Adding new data to array NewChartData.push(JSON.parse(D)); //Setting the new data to the graph chart.dataProvider = NewChartData; //Updating the graph to show the new data chart.validateData(); For this example I just used data from a DIV element on the page but you can use the same method to get the data from another source.
downvote count: 1
has comment: http://stackoverflow.com/comment/40525521
upvote count: 12
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40525736
type: Answer
answers question: http://stackoverflow.com/q/25891931
has comment: http://stackoverflow.com/comment/127396413
accepted answer of: http://stackoverflow.com/q/25891931
has comment: http://stackoverflow.com/comment/40530429
score: 11

http://stackoverflow.com/a/25910425
has body: This code works for div with id "mydiv". You can change the mydiv to the body or any other element you want. The code works in all browsers. JS: var mydiv = document.getElementById("mydiv"); if (mydiv.addEventListener) { // IE9, Chrome, Safari, Opera mydiv.addEventListener("mousewheel", MouseWheelHandler, false); // Firefox mydiv.addEventListener("DOMMouseScroll", MouseWheelHandler, false); } // IE 6/7/8 else mydiv.attachEvent("onmousewheel", MouseWheelHandler); function MouseWheelHandler(e) { // cross-browser wheel delta var e = window.event || e; // old IE support var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); if(delta==1) // if mouse scrolls up { alert('up'); } if(delta==-1) // if mouse scrolls down, we disable scrolling. { e.preventDefault(); e.stopPropagation(); return false; } return false; } NOTE: Remember to set overflow to auto or scroll for this function to work. A working example: Click Here Hope this helps.
downvote count: 0
score: 10
has comment: http://stackoverflow.com/comment/128424297
upvote count: 10
answers question: http://stackoverflow.com/q/25909341
type: Answer

http://stackoverflow.com/a/25942001
type: Answer
accepted answer of: http://stackoverflow.com/q/25941931
answers question: http://stackoverflow.com/q/25941931
upvote count: 4
has body: Why would you not include the check Inside the function ? HTML onclick="myFunction()" JS myFunction = function(){ if (!AveryValidateAddress()){ //Dont do anything if it's false return } else{ Shipping.save() } }
type: AcceptedAnswer
downvote count: 0
score: 4

http://stackoverflow.com/comment/40651299
type: QuestionComment
has text: Im pretty sure you need to define it absolute.
score: 0
comment on: http://stackoverflow.com/q/25963251
type: Comment

http://stackoverflow.com/a/25972811
type: Answer
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/25970993
answers question: http://stackoverflow.com/q/25970993
has comment: http://stackoverflow.com/comment/40668116
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40668015
has body: This works because objects are passed by reference in javascript and the fact that require.js only loads every dependency once. Then, app.js returns an initialized instance, and every other module that requires 'app' gets reference to the same object. It's not a factory, it's simply an initialized application object instance.

gruntjs
tags question: http://stackoverflow.com/q/25980271
tags question: http://stackoverflow.com/q/26004625
tags question: http://stackoverflow.com/q/26016479
tags question: http://stackoverflow.com/q/25906835
tags question: http://stackoverflow.com/q/25980466
tags question: http://stackoverflow.com/q/25937486
tags question: http://stackoverflow.com/q/26030996
tags question: http://stackoverflow.com/q/26025396
tags question: http://stackoverflow.com/q/25991026
tags question: http://stackoverflow.com/q/25879917
tags question: http://stackoverflow.com/q/25982094
type: Tag
tags question: http://stackoverflow.com/q/25997386
tags question: http://stackoverflow.com/q/26005479
tags question: http://stackoverflow.com/q/25973828
tags question: http://stackoverflow.com/q/26032964
tags question: http://stackoverflow.com/q/25941378
tags question: http://stackoverflow.com/q/25987554
tags question: http://stackoverflow.com/q/25996668
tags question: http://stackoverflow.com/q/25912199
tags question: http://stackoverflow.com/q/26019491
tags question: http://stackoverflow.com/q/25988293
tags question: http://stackoverflow.com/q/25935358
tag name: gruntjs
tags question: http://stackoverflow.com/q/25899132
tags question: http://stackoverflow.com/q/25875070
tags question: http://stackoverflow.com/q/25940454
tags question: http://stackoverflow.com/q/25891671
tags question: http://stackoverflow.com/q/25938126
tags question: http://stackoverflow.com/q/25932606

http://stackoverflow.com/comment/40647304
comment on: http://stackoverflow.com/q/25955718
score: 0
type: QuestionComment
has text: Hi guys thanks for your comments. I didn't think there was anything wrong with the vars, isn't it good practice to declare a new variable with var. Also what do you mean the double calls to to controllerContainer these calls are sequential to append to the elements. The person below did list another style that took out the redundancies. @vsync how would you write the function/object?
type: Comment

http://stackoverflow.com/q/25892187
answer count: 3
has answer: http://stackoverflow.com/a/25893345
upvote count: 10
has answer: http://stackoverflow.com/a/76406597
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25892422
has comment: http://stackoverflow.com/comment/40524831
has comment: http://stackoverflow.com/comment/40523989
type: Question
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/25893229
tagged with: css
score: 10
has title: Convert innerHTML of a contenteditable text to normal string
favorite count: 0
tagged with: contenteditable
has body: I use a content-editable element : This is editable. and document.getElementById('myinput').innerHTML to read its content from Javascript. But the result is : "blah " => innerHTML = "blah &nbsp " "bonjour\n bonsoir" => innerHTML = "bonjour bonsoir" (Firefox) and innerHTML = "bonjour bonsoir " (Chrome) maybe there are lots of other things that are translated into HTML... How to convert innerHTML into normal text? (i.e. in my 2 examples : "blah " and "bonjour\n bonsoir")

http://stackoverflow.com/q/25995294
score: 0
answer count: 1
has title: Fade Transition when using PHP Includes and static navbar
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/12572569
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: php
has body: I would like to implement between page transitions like here i was trying this solution but it doesnt work for me my index.php: <?php include_once("header.php") ?> <?php include_once("main.php") ?> <?php include_once("footer.php") ?> in header.php i have navbar <li<?php if($file == 'index.php'){ ?> id="button" class="active" <?php }?>> <li<?php if($file == 'onas.php'){ ?> id="button" class="" <?php }?>> <li<?php if($file == 'sklepy.php'){ ?> id="button" class="" <?php }?>> <li<?php if($file == 'kontakt.php'){ ?> id="button" class="" <?php }?>> <li<?php if($file == 'uslugi.php'){ ?> id="button" class="" <?php }?>> example page which i want to load looks like this: <?php include_once("header.php") ?> xyx <?php include_once("footer.php") ?> here is my page:sample how can i implement this animation? Any examples, tutorials ?
type: Question
has answer: http://stackoverflow.com/a/25995880

http://stackoverflow.com/a/25974442
answers question: http://stackoverflow.com/q/25974224
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: When you create a canvas line, it will make a line passing through the points you declared, and with a width of lineWidth. If the line is between 2 pixels (for example when you create a line passing through borders, meaning you choose integer values for x and y) it will dissolve the color to balance the 2 pixels your line is crossing, in this case 50% to the pixel on the left, and 50% to the pixel on the right, resulting in a greyish color. Adding .5 to your x and y makes the line always stay in 1 pixel &lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;canvas id="canvas" width=300 height=300&gt;&lt;/canvas&gt; &lt;script&gt; function draw() { ctx.beginPath(); ctx.strokeStyle = "#000000"; ctx.strokeRect(rect.x, rect.y, rect.w, rect.h); } var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); var rect = { x: 10.5, y: 10.5, w: 40, h: 100 }; draw(); &lt;/script&gt; &lt;/html&gt; If you run the snippet you'll see that the lines are straight black, and occupying only 1 pixel in width. I just added .5 to your x and y
type: Answer
accepted answer of: http://stackoverflow.com/q/25974224
score: 2

http://stackoverflow.com/comment/40610855
has text: Why the explicit `$q.reject` in the failure handler?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25924359
score: 0

http://stackoverflow.com/a/26069689
has body: You can use the onbeforeunload property and determine if you wan to redirect or not. Here is the docs page for it Basically what I would try is this: Make a function that adds the sandbox attribute with everything, just leaving out the allow-top-navigation, to the iframe Bind a function to the onbeforeunload property of the iframe that calls the function that adds the sandbox attribute (be sure not to return anything because a dialog will pop-up) This should work because the request is made in the iframe first, and then we can prevent it from carrying over to our top level window. Another thing you should check is if you maybe left out the allow-formsoption, which can cause what you are describing. Please let me know if any of this worked.
has comment: http://stackoverflow.com/comment/40877780
upvote count: 1
answers question: http://stackoverflow.com/q/25958241
score: 0
has comment: http://stackoverflow.com/comment/40854237
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40937328
has comment: http://stackoverflow.com/comment/40881527
has comment: http://stackoverflow.com/comment/40852440
has comment: http://stackoverflow.com/comment/40873185

http://stackoverflow.com/comment/40643918
comment on: http://stackoverflow.com/a/25958385
type: Comment
has text: Yes maybe you have right but it was not so clear at the question.I tried to give the best way.It is your choice depend on your needs
score: 1
type: AnswerComment

http://stackoverflow.com/q/25919212
answer count: 2
downvote count: 0
tagged with: asp.net
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25919445
has title: Sending array of Json objects to Web Method using JQuery Ajax
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25919644
upvote count: 1
type: Question
has body: What should the WebMethod's parameter be called below to get the json array sent from client? I used name, but it didn't work. var employees = { "accounting": [ // accounting is an array in employees. { "firstName": "", // First element "lastName": "Doe", "age": 23 }, { "firstName": "Mary", // Second Element "lastName": "Smith", "age": 32 } ], // End "accounting" array. "sales": [ // Sales is another array in employees. { "firstName": "Sally", // First Element "lastName": "Green", "age": 27 }, { "firstName": "Jim", // Second Element "lastName": "Galley", "age": 41 } ] // End "sales" Array. } // End Employees var toServer = JSON.stringify(employees); This is the jquery ajax to send it to Web Method. $("#sendtoServer").click(function () { $.ajax({ type : "POST", url : "Default.aspx/GetDetails", data : '{name: "' + toServer + '" }', contentType : "application/json; charset=utf-8", dataType : "json", success : OnSuccess, failure : function (response) { alert("Wrong"); } }); function OnSuccess(response) { alert("Sent"); } }); And this is the Web Method [System.Web.Services.WebMethod] public static string GetDetails(string name) { var x=name; return ""; }
has answer: http://stackoverflow.com/a/25919445
has answer: http://stackoverflow.com/a/25919644
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40572878

http://stackoverflow.com/comment/40607203
type: QuestionComment
has text: What browser isn't this working in? The tabs at your URL seem to be working in Firefox. The first set of tabs on the fiddle also seem to work, though the second set of tabs doesn't seem to. Is that the problem you're asking about?
comment on: http://stackoverflow.com/q/25938365
score: 0
type: Comment

http://stackoverflow.com/q/26009899
has comment: http://stackoverflow.com/comment/40735812
has comment: http://stackoverflow.com/comment/40736754
has comment: http://stackoverflow.com/comment/40735698
tagged with: javascript
has comment: http://stackoverflow.com/comment/40735756
has title: Add corresponding elements in arrays
score: 0
answer count: 2
tagged with: arrays
has body: What is the most compact way of adding corresponding elements of multiple arrays of same length ? var a = [1,2,3]; var b = [5,5,5]; var c = [1,1,1]; resultant array should be [7,8,9] I can do this with a simple for loop but could it be possible for jquery/lodash solution with minimum lines of code?
tagged with: jquery
has answer: http://stackoverflow.com/a/26009976
favorite count: 0
linked to: http://stackoverflow.com/q/7135874
linked to: http://stackoverflow.com/q/1230233
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40736567
duplicate of: http://stackoverflow.com/q/7135874
has answer: http://stackoverflow.com/a/26009971
tagged with: underscore.js
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40735769
type: Question

http://stackoverflow.com/comment/40516733
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25888690
has text: @Abhishek: see the demo above

http://stackoverflow.com/comment/40733098
has text: Added a quick contrived example
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25987174

http://stackoverflow.com/a/32601451
answers question: http://stackoverflow.com/q/26011739
has body: use code like this &lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" ClientIDMode="Static"&gt; then change yor javascript code document.getElementById('MainContent_DropDownList1').onchange = function () {} to $(document).ready(function () { document.getElementById('DropDownList1').onchange = function () {} }); OR u can change &lt;asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="false" onchange="ddlchange(this);" &gt;&lt;/asp:DropDownList&gt; AND function ddlchange(ddl) { var value = ddl.value; var startDate = document.getElementById('MainContent_TextBox1').value; var endDate = document.getElementById('MainContent_TextBox2').value; GetData(value, startDate, endDate); }
score: 0
type: Answer

http://stackoverflow.com/comment/40752595
score: 0
type: Comment
has text: Easy enough, just clone the object. See my update. I'm using `jQuery.extend()` for the clone, but you can also use [`_.clone()`](http://underscorejs.org/#clone) if you want.
comment on: http://stackoverflow.com/a/26017263
type: AnswerComment

http://stackoverflow.com/comment/40703459
type: Comment
type: QuestionComment
score: 0
has text: I don't know how exactly you're doing this, but using the selector as I suggested, it seems to work fine: http://jsfiddle.net/nc5sy8uw/
comment on: http://stackoverflow.com/q/25955706

http://stackoverflow.com/q/26018093
answer count: 3
has comment: http://stackoverflow.com/comment/41249757
has comment: http://stackoverflow.com/comment/40750544
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40754736
score: 2
has body: Am trying to call some REST APIs from my AngularJS code. When looking at the page load time (say through Developer Tools -> Network in a browser like Firefox), the icons in the page load quickly. Then there is about 100 to 200ms gap, only after which the REST API is even called. I worked a simple example in Plunkr here : http://plnkr.co/edit/aTk8D9RXdmqBXoCwpVuG?p=preview return $http({ method: 'GET', url: 'http://rest-service.guides.spring.io/greeting' }); } return restAPIs; }) .controller('AppCtrl', function($scope,restFactoryService){ restFactoryService.getInstanceDetails().success(function (data){ $scope.datas=data; }); }); I have used ng-repeat in my original code. I initially thought that the slowness was due to that. But, as you can see above, even with a simple REST API call, the delay happens. Also, see the screenshot below showing the page loading. You can see that the page loads in 80ms. Then there is a gap until 240ms, only after which the REST API is called. What is happening between 80ms and 240ms time frame? Why can't the REST API be called at 80ms itself? Can someone please help?
downvote count: 0
has answer: http://stackoverflow.com/a/26192992
favorite count: 0
has answer: http://stackoverflow.com/a/26273648
has answer: http://stackoverflow.com/a/26193580
tagged with: rest
tagged with: angularjs
type: Question
has title: Angular JS : rest API is called with a delay
has comment: http://stackoverflow.com/comment/40750636
upvote count: 2
has comment: http://stackoverflow.com/comment/41209891

http://stackoverflow.com/comment/40576330
score: 0
comment on: http://stackoverflow.com/q/25920483
has text: you need three functions because refreshing will make it forget about un-run ones.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40611615
score: 0
has text: Thanks @afsa! Clearly explained.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25940544

http://stackoverflow.com/comment/40497413
has text: @PaulS the data is historical stuff, that needs to be reinjected in a new site, so there will be no new input. It's been saved in a very crappy way, and now pretty much cleaned up. No security concerns though.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25877030

http://stackoverflow.com/q/25907492
has answer: http://stackoverflow.com/a/25910291
score: -2
tagged with: javascript
tagged with: fabricjs
tagged with: canvas
has comment: http://stackoverflow.com/comment/40550983
has body: I am working on a project which uses HTML5 and the jQuery fabric canvas library. I've added an image to the canvas using fabric but it does not allow me to move that image inside the canvas. How can I get the image to move inside the canvas? fabric.Image.fromURL( '&lt;?php echo $url; ?&gt;uploads/canvas_uploads/Landscape_' + name, function(image) { my_image = image; my_image.top = -1; my_image.lockMovementY = true; my_image.lockMovementX = false; my_image.left = -20; my_image.width = ObjWidth; my_image.height = ObjHeight; canvas.add(my_image); } );
upvote count: 0
answer count: 1
tagged with: jquery
has title: HTML5 canvas won't allow me to move object inside canvas
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40551279
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/40551064
has comment: http://stackoverflow.com/comment/40550978

http://stackoverflow.com/q/25986273
tagged with: javascript
tagged with: kendo-ui
has title: Returning dynamic data in popup windows for each row
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25986652
type: Question
has body: I'm having problems trying to return dynamic data into popup windows. For example if you were to refer to the sample link below, clicking the info button beside 'Williamson' returns 'Where is St. Andrews?' (the previous TerritoryDescription). Here's a sample that replicates the issue: http://jsbin.com/iJunOsa/109/ This is the showDetails function that launches when the Info button is clicked: $(function() { $("#grid").on("click", ".info-btn", function showDetails(e) { e.preventDefault(); var grid = $("#grid").data("kendoGrid"); var wnd = $("#details").data("kendoWindow"); var dataItem = grid.dataItem($(e.currentTarget).closest("tr[data-uid]")); var subItem = dataItem.Territories[0]; console.log(subItem); detailsTemplate = kendo.template($("#view").html()); wnd.content(detailsTemplate(subItem)); wnd.center().open(); wnd.setOptions({ title: "Territories" }); }); }); This is the 'view' template called up in showDetails: Lastly, the following template has been used to display the buttons: Any idea how I can rectify this issue?
has answer: http://stackoverflow.com/a/25986652
answer count: 1

http://stackoverflow.com/q/26028933
answer count: 1
downvote count: 1
has body: I'm trying to build a custom bootstrap 'select', that can display tabs instead of simple list. So I've included tabs html in a dropdown, which works perfectly. The problem is - I can't switch tabs or click content in them without closing the whole dropdown. Of course I can add stopPropagation on click which will prevent dropdown from hiding, but then events for tabs and tabbed content are also not propagated. Anyone stumbled upon this and has a clean solution ? Runnable demo : http://plnkr.co/edit/YebYGXvjufHKwjvTBOl8
tagged with: javascript
has answer: http://stackoverflow.com/a/26033101
type: AnsweredQuestion
tagged with: jquery
favorite count: 0
type: Question
has title: Clickable tabs and tabbed content in bootstrap dropdown
accepted answer: http://stackoverflow.com/a/26033101
tagged with: tabs
tagged with: twitter-bootstrap-3
tagged with: twitter-bootstrap
score: 0
upvote count: 1

http://stackoverflow.com/a/25917823
score: 0
answers question: http://stackoverflow.com/q/25917568
type: Answer
has body: easy answer is use class instead of id.

http://stackoverflow.com/a/25923870
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40608793
answers question: http://stackoverflow.com/q/25923796
downvote count: 0
type: Answer
has body: to fix the error, you need to enable CORS on the server. The client expects to see CORS headers sent back in order to allow the request. It might even send a preflight request to make sure that the headers are there. You can enable CORS server side for one, multiple, or all domains hitting your server. The configuration is different depending on the type of your server. Refer to the following page for more info : http://enable-cors.org/server.html You already enabled CORS requests in your request above, so client side you should be all set.

http://stackoverflow.com/q/25884404
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has body: Any changes that I want does not take effect because the page refreshes itself whenever I click a button. With the POST method on it. This the scenario, I clicked the button, then changes take effect like editing the inner html of a division, after that, the page refreshes itself that is why all the changes disappears. Please help me if there are any ways that changes can be made after the page refreshes. This is my code. Can you tell me how to use ajax on it? Executive Room>
type: UnansweredQuestion
downvote count: 2
has title: How can I apply changes to the web after the POST method?
tagged with: css
has comment: http://stackoverflow.com/comment/40509314
has answer: http://stackoverflow.com/a/25884753
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25884697
score: -2
has comment: http://stackoverflow.com/comment/40509384
tagged with: javascript
has comment: http://stackoverflow.com/comment/40509050

http://stackoverflow.com/a/26018638
type: Answer
has body: There is some issues to adress under your source code, such as the index i never change as it is part of the selector string. But in order to have it work as the snippet you have shown, the call should be recursive and called within a callback function: var i = 0; function fadeInOut(index) { var elt =$('div#mydiv p').eq(i); elt.fadeIn(1000, function(){ $(this).fadeOut(1000); fadeInOut(i++); }); } fadeInOut(i); #mydiv p { position: absolute; display: none; } hi how are you bye JSFiddle Demo.
answers question: http://stackoverflow.com/q/26018369
score: 0

http://stackoverflow.com/q/25956299
has title: Can't provide @ in javascript when using razor view
type: Question
tagged with: asp.net-mvc
has body: var regularExpression = /^(?=(.*\d){2})(?=.*[a-zA-Z])(?=.*[!@#$%])[0-9a-zA-Z!@#$%]{8,}/; var valid = regularExpression.test(pwd); The problem is, when I provide this string in javascript, the @ symbol acts as a razor views code nugget.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25956315
type: UnansweredQuestion
tagged with: razor

http://stackoverflow.com/comment/40666971
comment on: http://stackoverflow.com/q/25970866
score: 0
type: Comment
type: QuestionComment
has text: The jsfiddle is http://jsfiddle.net/kuof3L5j/

http://stackoverflow.com/a/25902791
score: 0
type: Answer
has body: Try this one bro.. Controller $scope.colors = [ { name: 'blue', shade: 'femme' }, { name: 'red', shade: 'femme' }, { name: 'yellow', shade: 'femme' }, { name: 'blue', shade: 'homme' }, { name: 'red', shade: 'homme' } ]; $scope.LookCtrl = function() { var ouinon = "http://api.shopstyle.fr/api/products?pid=uid7689-25635133-51&amp;cat=" + $scope.myColor + "&amp;limit=60&amp;fl=d0&amp;sort=Popular"; $http.get(ouinon).success(function (data) { $scope.look = data; }); }; HTML &lt;select ng-model="myColor" ng-options="color.name for color in colors" ng-change="LookCtrl()"&gt; &lt;/select&gt; It is just a sample based on your problem but i dont get where you used $scope.look but in my example there it contain some data from the request. I hope it will help you. i let my $scope.colors declare outside the function (but obviously inside the controller) so that when the select is change the function of calling the api is trigger.. For further question just ask me and Im open to your questions
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25902432

http://stackoverflow.com/a/25882515
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25881861
type: AcceptedAnswer
has body: Taking advantage of being able to access properties via obj.["propertyToGet"], you can simplify this: ontext.drawImage(imgs2[0],enemy.x+135,enemy.y,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y2,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y3,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y4,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y5,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y6,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y7,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y8,tileWidth,tileHeight); context.drawImage(imgs2[0],enemy.x+135,enemy.y9,tileWidth,tileHeight); into this: for(var i = 1; i &lt;= 9; i++){ var propertyName = ""; if(i &gt; 1){ propertyName = "y" + i; } context.drawImage(imgs2[0],enemy.x+135,enemy[propertyName], tileWidth, tileHeight); } It just seems cleaner.
answers question: http://stackoverflow.com/q/25881861
type: Answer

http://stackoverflow.com/comment/40751606
has text: Depends on what server you use. It's one of the basic features of a server though, so check the docs
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26011092

http://stackoverflow.com/a/25906133
type: Answer
answers question: http://stackoverflow.com/q/25905615
score: 2
upvote count: 2
has body: It is because ngSanitize considers to be unsafe. If you want to do it anyway, you must explcitly trust it: .controller('formController', function ($sce, $scope) { $scope.hh = $sce.trustAsHtml('Hello '); } See, also, this short demo. BTW, you should properly register your controllers (using .controller()), because looking them up in the global object has been deprecated in the latest versions of Angular.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25905615

http://stackoverflow.com/a/25940284
has comment: http://stackoverflow.com/comment/40645296
has body: If your controller is returning JSON data you can fetch and use it as follows: Instead of: var newData = ${remoteFunction(controller: 'PreSchedule', action: 'calProcess')}; alert(newData); Use the jQuery $.ajax method: $.ajax({ dataType: 'json', url: '${createLink(controller: 'preSechedule', action: 'callProcess')}', data: {}, // no parameters success: function(data) { window.alert("The returned data is: "+data); // show your modal, or do whatever you want. } });
has comment: http://stackoverflow.com/comment/40627086
score: 1
answers question: http://stackoverflow.com/q/25930460
type: Answer
has comment: http://stackoverflow.com/comment/40627039
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/26021603
accepted answer of: http://stackoverflow.com/q/26021248
answers question: http://stackoverflow.com/q/26021248
has comment: http://stackoverflow.com/comment/40757658
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You add the directive as an attribute, not a model: ul(class='slider royalSlider rsDefault', ng-repeat='item in sliderItems', slider-direct) Angular will automatically convert camel case directives to the following sliderDirect -> slider-direct for use in the HTML. You should also be targeting the element variable in the link function if you want the directive to apply to the element with the attribute: return { restrict: 'A', link: function(scope, element, attrs) { $(element).royalSlider(); } };
score: 2
upvote count: 2

http://stackoverflow.com/a/25937167
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25928509
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25928509
downvote count: 0
has body: Ok @timothymctim 's response helped me. Actually, I think it's an issue about character encoding. Here's a (strange) solution : The PHP: $salt = "secret"; $password = "azerty"; $salted = $password.'{'.$salt.'}'; $digest = hash('sha512', $salted, true); for ($i = 1; $i &lt; 5000; $i++) { $digest = hash('sha512', utf8_encode($digest).$salted, true); } $digest = base64_encode($digest); return $digest; And the Javascript : var salt = 'secret', password = 'azerty', salted = password + '{' + salt + '}' digest = CryptoJS.SHA512(salted); for (var i=1; i&lt;5000; i++) { digest = CryptoJS.SHA512(digest.toString(CryptoJS.enc.Latin1)+salted); } digest = digest.toString(CryptoJS.enc.Base64); return digest; I don't know what to think. Thanks anyway everybody who helped !
upvote count: 2

http://stackoverflow.com/a/26460024
has body: Refer to this. Hope this will be useful. http://hacksaw.mmto.arizona.edu/src/RGraph_2010-03-27-stable/RGraph/docs/context.html
answers question: http://stackoverflow.com/q/26029654
type: Answer
score: 0

http://stackoverflow.com/a/25925887
answers question: http://stackoverflow.com/q/25925652
type: Answer
has body: Satya's comment is correct that IN is probably faster and makes it easier to generate the SQL. But was your question more basic? (Your js was not basic but the mysql question seems to be, so I'm not sure.) We're you asking how to query the server from a page running javascript? If so, the answer is an ajax call. The URL will have a script that runs and calls requests the data (perhaps using IN) then outputs it (perhaps in JSON). Your js receives it and does what it needs to with the returned data.
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/26016009
has title: Events availability from the container to the child element
favorite count: 0
has answer: http://stackoverflow.com/a/26016180
has body: In the following code, I have a DIV parent container which has a SPAN container and the SPAN container containing the INPUT child elements. When I click the gray area which is for the DIV, I see the 'I'm clicked!' message. I also see the same message when I click the white area of the SPAN or the input elements. Shouldn't the SPAN container prevent the DIV container onclick event? US Canada Europe
score: -1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26016180
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40746525
upvote count: 0
has comment: http://stackoverflow.com/comment/40770767
answer count: 1

http://stackoverflow.com/q/25895705
type: Question
has comment: http://stackoverflow.com/comment/40529979
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/40529834
score: 0
tagged with: cordova
has title: Trying to send POST data through ajax in phonegap
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40530351
has body: i am using PushPlugin in my phonegap application. I want to send the registrationID to my server. I have one URL 'http://www.vbought.com/yukyuk/?regId=' +e.regid; How can i send the data to the server. Here is how my code looks likes. case 'registered': if ( e.regid.length &gt; 0 ) { //alert("regID = " + e.regid); //console.log("regID = " + e.regid); $.ajax({ type: 'POST', data: '?regId='+e.regid, url: 'http://www.vbought.com/yukyuk/', success: function(data){ //console.log(data); alert("Success Added"); }, error: function(){ console.log(data); alert('There was an error adding your comment'); } }); } break; Do someone have any idea. How can i post data? Thank you! (in advance)

http://stackoverflow.com/comment/40997149
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26030530
has text: I am using jquery V 1.11.It wokrs perfectly , but the error log annoys my fellow programmers lol. this is all the stack trace. Uncaught Error: Syntax error, unrecognized expression: :nth-child jquery.js:1471Sizzle.error jquery.js:1471Sizzle.selectors.preFilter.CHILD jquery.js:1592tokenize jquery2.js:2063select jquery2.js:2473Sizzle jquery.js:880Sizzle.matches jquery2.js:1409jQuery.filter jquery2.js:2661jQuery.each.jQuery.fn.(anonymous function) jquery2.js:3010doChecky myfunction.js:84(anonymous function) myfunction.js:116jQuery.event.dispatch jquery2.js:4624jQuery.event.add.elemData.handle
score: 0

http://stackoverflow.com/a/25989839
score: 0
has body: Use as var value= new Module.Method().doSomething(); DEMO
answers question: http://stackoverflow.com/q/25989713
type: Answer

http://stackoverflow.com/comment/40553383
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25908638
has text: It doesn't really look like an organized way of doing this thing. Are u sure u want it this way??

http://stackoverflow.com/comment/40539921
type: QuestionComment
has text: wait... you want the url to always be `/` ? why? why would you break the internet like that? how many sites do you know that work that way? You can probably *do* it by using lots of `POST`, but: that's just horrible... it breaks just about everything, including SEO, refresh, bookmarks, history, etc. Your routes don't need to use `/{controller}/{action}`, but they should still at least be urls... Or are you talking about a single-page application?
comment on: http://stackoverflow.com/q/25901173
score: 1
type: Comment

http://stackoverflow.com/comment/40709245
type: Comment
comment on: http://stackoverflow.com/q/25993668
score: 0
type: QuestionComment
has text: Yes, it is. Even without the ```immediate: true```, the same result.

http://stackoverflow.com/comment/40767734
score: 0
comment on: http://stackoverflow.com/q/26027118
type: Comment
type: QuestionComment
has text: `$('#morebtn').click(function(){$('input[type="submit"]').before(' ');});`

http://stackoverflow.com/a/45067145
score: 5
has body: throtle is just a wrapper around debounce which makes debounce to call passed function in some period of time, if debounce delays a function call on period of time which is bigger then specified in throtle.
downvote count: 0
answers question: http://stackoverflow.com/q/25991367
type: Answer
upvote count: 5

http://stackoverflow.com/a/26018439
has comment: http://stackoverflow.com/comment/40751555
accepted answer of: http://stackoverflow.com/q/26018369
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/26018369
has comment: http://stackoverflow.com/comment/40751224
type: Answer
has comment: http://stackoverflow.com/comment/40751167
upvote count: 3
has comment: http://stackoverflow.com/comment/40751989
has comment: http://stackoverflow.com/comment/40753287
score: 3
has body: You variable is not interpreted in the string. If you want to add a variable value into the string, you need a string concatenation. Just like that : $('div#mydiv p:eq('+i+')').fadeIn(1000); $('div#mydiv p:eq('+i+')').fadeOut(1000); But it would be easier to use function provided by jQuery like .each: $('div#mydiv p').each(function(){ $(this).fadeIn(1000).fadeOut(1000); }); That answer why the fade is not working Not to make a loop fade, you should make a recursive function that fade the first element and call itself with the same set of element minus the first one. That code does it : recursiveFade($('div#mydiv p')); function recursiveFade($el){ $el.first().fadeIn(1000).fadeOut(1000, function(){ recursiveFade($el.slice(1)); }) } #mydiv p { position: absolute; display: none; } hi how are you bye
has comment: http://stackoverflow.com/comment/40751256

http://stackoverflow.com/a/25949453
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25949378
answers question: http://stackoverflow.com/q/25949378
type: Answer
has body: You need to use: socket.broadcast.emit('send:message', { text: data.message }); This way all users (except sender will receive this message). If you want broadcast to everyone (including sender) then you have to use: io.sockets.emit('send:message', { text: data.message }); You can find more at http://socket.io/docs/#broadcasting-messages

http://stackoverflow.com/q/25951668
has body: In JavaScript, to create a class, I either create a constructor or factory to make objects. function Person(name){ this.name = name; } var willy = new Person("William"); I can then access the property of this object as so willy.name // "William" I can also change it willy.name = "Bill" In Ruby, what is the most accepted convention (if there is such a thing) to create a class where I can access and change properties on the fly? I found this: class Person attr_reader :name attr_writer :name def initialize(name) @name = name end end willy = Person.new("William") willy.name = "Bill" I want to know if this is the generally accepted way to do this kind of thing in Ruby. If it isn't, then what is?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25955189
has title: A class that allows for changing properties
has comment: http://stackoverflow.com/comment/40629163
has comment: http://stackoverflow.com/comment/40629238
has answer: http://stackoverflow.com/a/25951756
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40629158
tagged with: javascript
has comment: http://stackoverflow.com/comment/40629249
score: 0
has comment: http://stackoverflow.com/comment/40629588
has comment: http://stackoverflow.com/comment/40629460
has comment: http://stackoverflow.com/comment/40629224
has comment: http://stackoverflow.com/comment/40629556
tagged with: ruby

http://stackoverflow.com/q/26027687
has title: Facebook Login button doesn't change to logout after login Phonegap
tagged with: javascript
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: android
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
answer count: 0
score: 1
upvote count: 1
type: Question
has body: Im developing an android application in Phonegap. I m trying to connect to facebook I have a login button , when i click on it i connect to facebook , i accept the permissions and i return to the application. when i return , i saw a login button and a logout button , after a few time , the login button disappear and there is only a logout button in the place of the login button. My problem is that i show a login and a logout button both of them for a few minute when i return to my app after a login. i want to login to facebook and when i return to the application the login button hide and the logout button show. Here is my HTML Code login and logout button and facebook init. Login Logout // Initialize the Facebook SDK document.addEventListener('deviceready', function() { FB.init ({ appId: 'fbId', nativeInterface: CDV.FB, useCachedDialogs: false }); FB.getLoginStatus(handleStatusChange); authUser(); updateAuthElements(); }); Here is my js code , that let me Handle status changes: function handleStatusChange(session) { console.log('Got the user\'s session: ' + JSON.stringify(session)); alert('Got the user\'s session: ' + JSON.stringify(session)); if (session.authResponse) { //document.body.className = 'connected'; //Fetch user's id, name, and picture FB.api('/me', { fields: 'name, picture,first_name,last_name,email' }, function(response) { if (!response.error) { document.body.className = 'connected'; user = response; console.log('Got the user\'s name and picture: ' + JSON.stringify(response)); console.log('FB name, ' + response.name); //Update display of user name and picture if (document.getElementById('user-name')) { document.getElementById('user-name').innerHTML = user.name; } if (document.getElementById('user-picture')) { document.getElementById('user-picture').src = user.picture.data.url; } } else { document.body.className = 'not_connected'; console.log('Error getting user info: ' + JSON.stringify(response.error)); if (response.error.error_subcode && response.err…

http://stackoverflow.com/q/25934777
score: 0
answer count: 3
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25944890
favorite count: 0
has title: How to remove all linked stylesheets but keep one by ID?
has body: I need to remove all linked stylesheets in the head , while keeping one of them. I want them all removed , except for the one with id=custom_stylesheet This worked to remove them all , but how do i edit it to keep one ? $('link[rel=stylesheet]').remove();
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25944890
accepted answer: http://stackoverflow.com/a/25934807
type: Question
has answer: http://stackoverflow.com/a/25934935
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25934807

http://stackoverflow.com/q/25975471
has comment: http://stackoverflow.com/comment/40673025
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25984948
has comment: http://stackoverflow.com/comment/40672919
tagged with: popup
has comment: http://stackoverflow.com/comment/40672984
has comment: http://stackoverflow.com/comment/40672969
score: 0
type: Question
tagged with: browser
has comment: http://stackoverflow.com/comment/40722704
answer count: 2
has body: I've been trying to open a "popup" [1] without it taking the focus automatically. I tried to blur it, from the opener or from the popup itself unsuccessfully. I also looked for pop-under but didn't find anything relevant on Google about both topic. I'm using Firefox. (Well… Palemoon 24.7.1 for x64 actually) My goal is to be able to open a bunch of tabs (with middle click for instance) and having them closing on their own a bit later. To do so in Firefox, and afaik, you MUST use a popup (right?). But everytime I open a new tab (with middle click) it focuses on it which is very annoying. [1] Or anything else that could match my expectations. EDIT: NOTE: This is for personnal use. :)
tagged with: firefox
tagged with: javascript
has title: Open a "popup" without focusing it
accepted answer: http://stackoverflow.com/a/25984948
tagged with: palemoon
has comment: http://stackoverflow.com/comment/40672848
possible better answer: http://stackoverflow.com/a/30251579
has comment: http://stackoverflow.com/comment/40672826
has answer: http://stackoverflow.com/a/30251579

http://stackoverflow.com/comment/40707184
comment on: http://stackoverflow.com/a/25994574
type: AnswerComment
has text: Yeah, i update, but in the php file it's not returning the value of $month
score: 0
type: Comment

http://stackoverflow.com/a/25941667
has comment: http://stackoverflow.com/comment/40618350
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25938276
score: 0
accepted answer of: http://stackoverflow.com/q/25938276
has body: You can make a HEAD request that only returns headers, then check the headers for the authentication header before actually making the request: The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html You would use this method to first check the headers, then if OK, get the image. You'll have to test it with your protected resource, I'm not sure what the browser will do when requesting just the HEAD and I don't have a local protected resource to test against (CORS got me on the online resources I was trying to test against). Fiddle: var basicAuthProtectedURL = 'http://fiddle.jshell.net'; var xhr = new XMLHttpRequest(); xhr.open("HEAD", basicAuthProtectedURL, true); xhr.onload = function (e) { if (xhr.readyState === 4) { if (xhr.status === 200) { console.log(xhr.getAllResponseHeaders()); //all headers console.log(xhr.getResponseHeader('Content-Type')); //just the one you want if (xhr.getResponseHeader('WWW-Authenticate')) { console.log('I got the authentication header, skip this request.'); } else { console.log('no header, resource unsecure'); } } else { console.error(xhr.statusText); } } }; xhr.onerror = function (e) { console.error(xhr.statusText); }; xhr.send(null); http://jsfiddle.net/5z5bnwgz/ Post back how it goes!
has comment: http://stackoverflow.com/comment/40615903
type: Answer

file
type: Tag
tags question: http://stackoverflow.com/q/25943382
tags question: http://stackoverflow.com/q/25909421
tag name: file
tags question: http://stackoverflow.com/q/25944781
tags question: http://stackoverflow.com/q/25923141
tags question: http://stackoverflow.com/q/26024689
tags question: http://stackoverflow.com/q/25949152
tags question: http://stackoverflow.com/q/25914204

http://stackoverflow.com/comment/124891885
comment on: http://stackoverflow.com/a/60210808
score: 3
type: AnswerComment
has text: But why do these 2 queues exist? What is the general distinction between micro & macro tasks?
type: Comment

http://stackoverflow.com/comment/91683736
has text: It should work. Test it here: https://codepen.io/constagorgan/project/editor/ARakvM
comment on: http://stackoverflow.com/q/25962958
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42118774
score: 0
type: AnswerComment
type: Comment
has text: Thanks so much for your help mate I took the answer as valid :) for your efforts in helping me
comment on: http://stackoverflow.com/a/25924657

http://stackoverflow.com/comment/40646282
has text: Thanks for the answer, <text> seems the best
comment on: http://stackoverflow.com/a/25960947
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25903774
has answer: http://stackoverflow.com/a/25905170
tagged with: angularjs
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40544548
score: 3
type: Question
answer count: 2
tagged with: javascript
tagged with: webstorm
has answer: http://stackoverflow.com/a/25964800
favorite count: 0
has body: Hello Fellow Genius Developers, Currently i am learning AngularJs and doing some basic testing but keep on getting errors. Please Please help me out with this. I have looked around for the answers but could not find anything. Your any help would be very much appreciated. Below is the Error. `Error: [ng:areq] Argument 'controllerLogin' is not a function, got undefined I am using WebStrom IDE. Here is my controllerLogin.js 'use strict'; var loginApp = angular.module('loginApp',[]); (function() { //define this for the minification of javascripts var loginScope=['$scope']; var loginController = function($scope){ $scope.hello = "Hello Galaxy"; }; loginController.$inject = loginScope; angular.module('loginApp').controller('loginController',loginController); }()); Below is my loginSpec.js 'use strict'; describe("app module", function () { beforeEach(module("loginApp")); describe("controllerLogin", function () { var scope, controller; beforeEach(inject(function ($rootScope, $controller) { scope = $rootScope.$new(); controller = $controller; })); it("should assign message to hello world", function () { controller("controllerLogin", {$scope: scope}); expect(scope.message).toBe("Hello Galaxy"); }); }); }); Below is my galaxytest.conf.js // list of files / patterns to load in the browser files: [ 'public/scripts/angular.js', 'public/scripts/angular-mocks.js', 'public/src/app/*.js', 'public/app.js', '**/*.js', 'test/**/*Spec.js' ], Below is my app.js //Define all the module with no dependencies. angular.module('loginApp',[]); //Now Define Main Module of the Application var galaxyFrontendApp = angular.module('galaxyFrontendApp',['ngRoute','ui.bootstrap','loginApp']); galaxyFrontendApp.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/login', {templateUrl: 'src/app/modules/login/views/viewLogin.html', action: 'loginApp.loginController'}); $routeProvider.otherwise({redirectTo: '/login'}); }]); and Below is my index.js Please guide me through this. Thank you…
upvote count: 3
tagged with: karma-jasmine
has title: Argument 'controllerLogin' is not a function, got undefined - AngularJs, Karma Testing

http://stackoverflow.com/comment/40519762
score: 2
comment on: http://stackoverflow.com/q/25890566
type: Comment
type: QuestionComment
has text: in your code you search `header_det_map` but in your html it's just `header_det`. Is this correct or is this not the full html for the problem?

http://stackoverflow.com/q/25913010
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25913123
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I have a problem with JavaScript loop, because I use keyup function i cant use html() function because it add only last result, and with append it doubles results. How to solve this problem? for (var i = 0; i &lt; msg.length; i++) { $('#result').html(' ' + msg[i].info + '&lt;/br&gt; '); }
has comment: http://stackoverflow.com/comment/40560946
tagged with: loops
accepted answer: http://stackoverflow.com/a/25913123
has comment: http://stackoverflow.com/comment/40560870
type: Question
tagged with: for-loop
has title: Json loop and appending results to html
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25985650
type: Question
has body: Begin with a fresh plain HTML document, and only use HTML and Javascript. Place on it the hyperlinked word ''food'' Upon clicking ''food'', it should be replaced with ''meat and vegetables'' Upon clicking ''meat'', it should be replaced with ''pork with bacon'' Upon clicking ''vegetables'', it should be replaced with ''carrots plus peas'' Upon clicking ''pork'', it should be replaced with ''tough and chewy'' Upon clicking ''tough'', it should be replaced with ''burnt and salty'' (And so on) I've been trying to do this as far as I can, but I'm having escapecode problems. Here is my code: &lt;span id="food"&gt;&lt;a href="#" onclick="document.getElementById('food').innerHTML='&lt;span id=\'meat\'&gt;&lt;a href=\'#\' onclick=\'var meat = &amp;#34;&lt;span id=&amp;#38;pork&amp;#38;&gt;&lt;a href=#\ onclick=alert(2)&gt;pork&lt;/a&gt;&lt;/span&gt; with bacon&amp;#34;; document.getElementById(&amp;#34;meat&amp;#34;).innerHTML = meat\'&gt;meat&lt;/a&gt;&lt;/span&gt; and &lt;span id=\'vegetables\'&gt;&lt;a href=\'#\' onclick=\'var vegetables = &amp;#34;carrots plus peas&amp;#34;; document.getElementById(&amp;#34;vegetables&amp;#34;).innerHTML = vegetables\'&gt;vegetables&lt;/a&gt;&lt;/span&gt;'"&gt;food&lt;/a&gt;&lt;/span&gt; Here it is in action: http://jsfiddle.net/jshflynn/L6r5rrfx/ I'm sorry it's not spaced, but that threw up errors. Notice that ''alert(2)'' has no delimiting characters around it, I don't know how to make it say alert(''Hello''). I feel there must be some recursive way to do this, but I'm not sure. Thanks in advance. Especially so if you can do the full problem.
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25986549
has title: JS: Replace a link with another word. Nested quotes + escape codes
has comment: http://stackoverflow.com/comment/40692069
tagged with: html-escape-characters
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25985953
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25985953
has answer: http://stackoverflow.com/a/25986549
tagged with: quote

http://stackoverflow.com/q/26033907
has body: I am reading up this page http://www.jsviews.com/#linked-elem-syntax and testing a bit. I like to start with this .. Notice that the &lt;input data-link="name trigger=true"/&gt; tag automatically has two-way data-binding. Am I correct to say that if removing "trigger=true" will make the one-way binding? Or, Is it still two-way binding? The only difference that I found for having "trigger=true" and not having "trigger=true" is that you will get the update on property-changed event if you have "trigger=true". otherwise, you will see get the update on lost-focus event. I am also confused about having ":" before at the end. Notice the full syntax for the has an additional ':' before the '}' at the end. It corresponds to the two-way data binding. Does it mean that having ":" at the end has the same effect as having "trigger=true"? But i tried the code below and it doesn't work like the code that has "trigger=true". &lt;input data-link="{:name:}"/&gt;
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/26044814
has title: Confusion on "Data-linked elements"
tagged with: jsviews
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26044814
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40779854

http://stackoverflow.com/comment/40590528
has text: Item.Title contains danish letters like 'æøå' that gives a "?" in html.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25928224

http://stackoverflow.com/comment/40764541
has text: I put the ref attribute on the <Child/> so now I am able to get the child component but if I want to access the input in the child component i have to go like "this.refs.property_1.getDOMNode().children[0].value" and that does not look like a clean solution to me.
score: 0
comment on: http://stackoverflow.com/q/26015903
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26013412
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40742493
tagged with: java
type: Question
tagged with: performance
tagged with: javascript
has comment: http://stackoverflow.com/comment/40743653
has body: Here is the scenario: I have 4 drop downs in a JSP page in my Spring MVC application. The dropdowns (Countries, States, divisions and villages) are related to each other as on selection of a particular country loads the state dropdown with state values and selection of a particular state loads the values in divisions dropdown and so on. The maximum number of records in my application are: Countries: 75 States: 1,000 Divisions: 3,000 Villages: 30,000 Data is present in 4 hashmaps like: - Map of String CountryId key with String Name as value - Map of String CountryId key with (Map of String StateId key with String StateName) as value - Map of String StateId key with (Map of String DivisionID key with String DivisionName) as value - Map of String DivisionId key with (Map of String VillageId key with String VillageName) as value Question: Currently I am loading all 4 hashmaps on JSP page and am displaying the values in dropdown based on the selection of previous dropdown:` $("#country").on("change", function(e) { var stateMap = '${stateList}'; var jsondata = $.parseJSON(stateMap ); $.each(jsondata[$(this).val()], function (key, value) { $('#state').append($('&lt;option&gt;&lt;/option&gt;').val(key).html(value)).prop('disabled',false); }); }); Here, populating values in dropdown is handled in the javascript itself. I did this to reduce the number of hits on server. But given the large number of records in the hashmaps, is it the correct way to populate data in the dropdowns? OR Should I do an AJAX call each time a value is selected in a dropdown to populate the values in subsequent dropdown. Which one of these two approaches is more appropriate from the performance perspective.
has comment: http://stackoverflow.com/comment/40742627
score: 0
answer count: 1
tagged with: jsp
tagged with: drop-down-menu
has answer: http://stackoverflow.com/a/26017012
accepted answer: http://stackoverflow.com/a/26017012
has title: Performance impact on loading interrelated dropdowns with max of arounf 30,000 records

http://stackoverflow.com/q/25917015
tagged with: vb.net
has body: I have a tbody inside a table that is displayed/hidden from a javascript call, when a textbox inside the tbody is modified. This tbody is initially set to display = none from its initial markup, but then is shown in the codebehind if it already has contained a value. Markup: &lt;tbody class="tbDOIndustryModifierCls" style="width: 100%;display:none;margin:0" id="tbDOIndustryModifierComments" runat="server"&gt; &lt;td&gt; &lt;asp:Label CssClass="raterLabel lblDOIndustryModifierComments" ID="Label11" runat="server"&gt;&amp;emsp;&amp;emsp;Comments: &lt;/asp:Label&gt; &lt;/td&gt; &lt;td colspan="2"&gt; &lt;asp:textbox Width="100%" ID="txtDOIndustryModifierComments" CssClass="txtDOIndustryModifierComments" runat="server"&gt;&lt;/asp:textbox&gt; &lt;/td&gt; &lt;/tbody&gt; Codebehind page load: If Not IsNothing(comment) Then txtDOIndustryModifierComments.Text = comment tbDOIndustryModifierComments.Style.Add(DISPLAY, BLOCK) End If So the scenario is that the "comment" field has a value, so this tbody is set to display=BLOCK in the codebehind on page load. Then the user messes with a control and this same tbody is set to display=none (via jquery hide()). I also have a "save" button which is handled in my vb.net codebehind. The issue I'm having is that I can change the tbody's display property to "none" through javascript (using jquery hide()), but when I hit the save button, the codebehind still sees the tbody as display = block. codebehind save method (this check is evaluating to false after javascript sets display=none) If (tbDOIndustryModifierComments.Style(DISPLAY) = NONE) Then _ 'logic Is there any way to look at whether the tbody (or its textbox) is hidden or displayed in the codebehind if the property is modified client-side? Sorry if my wording is off, let me know anything I can clarify. Thank you for your time.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25917140
accepted answer: http://stackoverflow.com/a/25917140
has title: Codebehind not detecting display altered in javascript
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40568823
has comment: http://stackoverflow.com/comment/40568571

http://stackoverflow.com/q/25914730
accepted answer: http://stackoverflow.com/a/25914815
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: i have a slider with multiple elements. Each element has the same structure. Every element has 3 divs. In the left and right div there is an image, and in the middle div, there is the "open" link". If you click on this link, the left and right div slides away, and the user can see what's behind. This is working fine so far. But I have a problem if the slider has more elements. If I'm on the first slide and click on "open" and then slide to the next slide. The left and right div's are already moved ("open"). I would like to have an "per slide" opening, without adding additional classes. Is it possible to change my jquery code so that if you click the changes are only effecting the elements in the current slider item? I have the following structure for an item of a slider: And this is my jquery Code: $( "a.open" ).click(function() { $('.left, .right').toggleClass( "open" ); }); Hope someone can help me.
tagged with: css
has title: limiting jquery action to specific elements
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25914815
possible better answer: http://stackoverflow.com/a/25914848
has answer: http://stackoverflow.com/a/25914848
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/33550328
accepted answer of: http://stackoverflow.com/q/25938560
answers question: http://stackoverflow.com/q/25938560
type: Answer
score: 34
downvote count: 0
has body: If you are using Java 7 or earlier you can refer to this post. If you are using Java 8 you could do: DateTimeFormatter timeFormatter = DateTimeFormatter.ISO_DATE_TIME; TemporalAccessor accessor = timeFormatter.parse("2015-10-27T16:22:27.605-07:00"); Date date = Date.from(Instant.from(accessor)); System.out.println(date); Update As pointed out by @BasilBourque in the comment, TemporalAccessor is java framework level interface, and is not advisable to use in the application code and it is advisable to use concrete classes rather than the interfaces. This interface is a framework-level interface that should not be widely used in application code. Instead, applications should create and pass around instances of concrete types, such as LocalDate. There are many reasons for this, part of which is that implementations of this interface may be in calendar systems other than ISO. See ChronoLocalDate for a fuller discussion of the issues. There a few concrete classes available to use, like LocalDate, LocalDateTime, OffsetDateTime, ZonedDateTime and etc.. DateTimeFormatter timeFormatter = DateTimeFormatter.ISO_DATE_TIME; OffsetDateTime offsetDateTime = OffsetDateTime.parse("2015-10-27T16:22:27.605-07:00", timeFormatter); Date date = Date.from(Instant.from(offsetDateTime)); System.out.println(date);
upvote count: 34
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/88507772
has comment: http://stackoverflow.com/comment/88540205

http://stackoverflow.com/q/25898554
answer count: 1
has body: I have a table and the TDs have a class and based on that class I'm adding click events to it like this $('#regRegionsTable').on('click', '.toggleDetail', toggleDetail); I'm using on because the table appears, goes away, and returns, and so on, so I need to be able to add events to the table as it gets added to the DOM. In certain circumstances I need to disable the events for a specific row. I'm trying it like this, but it's not working. $(row).off('click', '.toggleDetail'); row is the TR DOM node. So I'm trying to get all of the TDs in the row that have the toggleDetail class and turn off the click event binding.
type: UnansweredQuestion
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40534826
tagged with: jquery-events
type: Question
has comment: http://stackoverflow.com/comment/40534832
has title: How to turn off jQuery click event
has comment: http://stackoverflow.com/comment/40534713
has answer: http://stackoverflow.com/a/73758584
score: 0
has comment: http://stackoverflow.com/comment/40534738

http://stackoverflow.com/q/25951094
has comment: http://stackoverflow.com/comment/40634357
has comment: http://stackoverflow.com/comment/40637831
has answer: http://stackoverflow.com/a/25958739
tagged with: jquery-ui
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
has body: i am trying to create a comma separated auto complete text field for which the auto complete json data comes from java script itself.. see my code below: the java script array: var remark = [ "is under construction", "is a part of another construction.", "has acquired other work.", "Could not source construction." ]; the auto complete method: $("#remark").bind("keydown", function(event) { if (event.keyCode === $.ui.keyCode.TAB &amp;&amp; $(this).data("ui-autocomplete").menu.active) { event.preventDefault(); } }).autocomplete({ source: function(request, response) { $.getJSON(JSON.stringify(remark), { //this line is the issue.. term: extractLast(request.term) }, response); }, search: function() { var term = extractLast(this.value); if (term.length &lt; 2) { return false; } }, focus: function() { return false; }, select: function(event, ui) { var terms = split(this.value); terms.pop(); terms.push(ui.item.value); terms.push(""); this.value = terms.join(","); return false; } }); the helper functions: function split(val) { return val.split(/,\s*/); } function extractLast(term) { return split(term).pop(); } the var remark holds the the data for auto complete to show to the users... the $.getJSON(JSON.stringify(remark) is fetching the data for auto complete..functionality but this is not working as aspect ed.. while this works when i use to fetch the data from mysql server.. but when i am using it with java script array it is not working.. any help or suggestion would be a great help.. thanks in advance...
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/46377223
score: 0
has title: comma separated auto complete with jquery not working with javascript json data
type: UnansweredQuestion

http://stackoverflow.com/comment/40774098
comment on: http://stackoverflow.com/a/26030842
type: AnswerComment
score: 0
type: Comment
has text: Note that if this is in browser javascript, it will not work in IE8 or below. That's easily fixed with a polyfill though

http://stackoverflow.com/q/25977575
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: sockets
has answer: http://stackoverflow.com/a/27316493
tagged with: node.js
type: Question
has comment: http://stackoverflow.com/comment/42541163
has title: phaser.js + socket.io emit on "isDown"
tagged with: javascript
has body: i'm playing with phaser and socket.io and wanted to make multiplayer breakout game. I'm building right now paddle which supposed to be synced between 2 clients. So when you move paddle in one client it moves also in another and vice versa. It works but server is sending too much data. Problem is probably in "isDown" becouse it's emiting data very fast when key is pressed. Thats why server is sending data like crazy. Also socket is emitig data when nothing is pressed. I wanted to work around it by making "send check" but it doesnt work properly becouse data is sent even when nothing is pressed. How can I limit client/server to send data only when it's really needed? Here is the code: CLIENT // connect to the socket server var socket = io(); var main = { preload: function() { game.load.image('paddle', 'images/paddle.png'); }, create: function() { game.physics.startSystem(Phaser.Physics.ARCADE); this.cursor = game.input.keyboard.createCursorKeys(); this.paddle = game.add.sprite(200, 400, 'paddle'); game.physics.arcade.enable(this.paddle); //game.stage.disableVisibilityChange = true; this.paddle.body.immovable = true; }, update: function() { var that = this; var pos = this.paddle.position.x; if (this.cursor.right.isDown){ that.paddle.body.velocity.x = 350; socket.emit('paddle-mov', {send:true}, pos); } else if (this.cursor.left.isDown) { that.paddle.body.velocity.x = -350; socket.emit('paddle-mov', {send:true}, pos); } else { that.paddle.body.velocity.x = 0; socket.emit('paddle-mov', {send:true}, pos); } socket.on('paddle-mov-back', function(inx){ console.log(inx); that.paddle.position.x = inx; }); }, }; // Initialize Phaser, and start our 'main' state var game = new Phaser.Game(400, 450, Phaser.AUTO, 'gameDiv'); game.state.add('main', main); game.state.start('main'); SERVER #!/usr/bin/env node var debug = require('debug')('test'); var app = require('../app'); var server = app.listen(3000); var io = require('socket.io').listen(server); io.on('connection', function(socke…

http://stackoverflow.com/q/25990432
has comment: http://stackoverflow.com/comment/40700764
has comment: http://stackoverflow.com/comment/40704061
has body: I want to pass both routing parameter values and AjaxOptions in a URL.Action. Doesn't this work? I have a javascript function to refresh a partial view function refreshHistory() { $("#id-1").load('@(Url.Action("Action", "Controller", new { ID = "Global_ID" }, new AjaxOptions { UpdateTargetId = "id-1" } ))'.replace('ID', Global_ID)); }; So this is not a valid overload for Url.Action. It is for Ajax.Actionlink but I need this to be a URL so i can load with jquery. This kind of works. But the URL end up looking pretty wierd and the right Action in my controller is not getting called. function refreshHistory() { $("#id-1").load('@(Url.Action("Action", "Controller", new { ID = "Global_ID", AjaxOptions = new AjaxOptions { UpdateTargetId = "id-1" } }))'.replace('Global_ID', ID)); }; URL end up looking like this: localhost../Controller/Action?75=ID&amp;amp;AjaxOptions=System.Web.Mvc.Ajax.AjaxOptions However the right target div is getting updated. But with the index action.
has comment: http://stackoverflow.com/comment/40700656
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/40700866
has title: MVC 5 Url.Action pass both AjaxOptions and Route Values
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40700745
tagged with: ajax
score: 0

http://stackoverflow.com/comment/40572467
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25918148
has text: @adeneo I actually like yours better, too! Thanks. Only problem with it is if I want to pass additional vars such as `on('click', 'tr', function(){})`. Any idea for such a scenario?

http://stackoverflow.com/q/25991076
tagged with: coffeescript
has title: Calling a function on a function - Jquery
has answer: http://stackoverflow.com/a/26024298
has comment: http://stackoverflow.com/comment/40768520
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40718542
tagged with: function
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have coded a javascript file: $(function() { return $(".ajax-form").on("ajax:success", function(e, data, status, xhr) { var model_name; model_name = $(this).data('model-name'); console.log('ajax form success'); if (model_name === 'contact') { return $('#modal-alert-contact').modal('show'); } else { return $('#modal-alert-demo').modal('show'); } }).bind("ajax:error", function(e, xhr, status, error) { var elm, messages, model_name; model_name = $(this).data('model-name'); console.log('ajax form error'); console.log(model_name); if (model_name === 'contact') { if (xhr.responseJSON["email"]) { elm = $('.alert-contact-fields'); messages = []; $.each(xhr.responseJSON, function(id, error_messages) { return messages.push((" " + id + " - can't be blank ").replace(/_/g, " ")); }); elm.find('.messages').html(messages); return elm.removeClass('hide'); } else { elm = $('.alert-contact-fields'); return elm.addClass('hide'); } } else { if (xhr.responseJSON["company_name"]) { elm = $('.alert-demo-fields'); messages = []; $.each(xhr.responseJSON, function(id, error_messages) { return messages.push((" " + id + " - can't be blank ").replace(/_/g, " ")); }); elm.find('.messages').html(messages); return elm.removeClass('hide'); } else { elm = $('.alert-demo-fields'); return elm.addClass('hide'); } } }); }); and I found it out messy, and repeating same codes. What I'm want to do is this part: messages = []; $.each(xhr.responseJSON, function(id, error_messages) { return messages.push((" " + id + " - can't be blank ").replace(/_/g, " ")); }); elm.find('.messages').html(messages); return elm.removeClass('hide'); I want that part to be a function, and after I do that, I will call that function to use it on my function. Is it possible or there's some technique to improve my coding structure? Thanks!
has comment: http://stackoverflow.com/comment/40813427
type: UnansweredQuestion

http://stackoverflow.com/q/25918317
tagged with: uiwebview
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25919157
type: AnsweredQuestion
has body: I have a web view showing an html + js intro done by someone else. When user taps on a specific image i need to perform a segue. I don't know javascript. If I try with .src returns empty, if try with .innerHTML always return a lot of code. How can I detect this specific touch? Thank you. - (void)viewDidLoad { [super viewDidLoad]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTapped:)]; [tap setDelegate:self]; [self.webView.scrollView addGestureRecognizer:tap]; NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"myFile" ofType:@"html" inDirectory:@"myDir"]; NSURL* url = [[NSURL alloc]initFileURLWithPath:htmlFile]; NSURLRequest* request = [NSURLRequest requestWithURL:url]; [self.webView loadRequest:request]; } - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { return YES; } -(void)viewTapped:(UITapGestureRecognizer*)tap { CGPoint touchPoint = [tap locationInView:self.webView]; NSString *js = [NSString stringWithFormat:@"document.elementFromPoint(%f, %f).src", touchPoint.x, touchPoint.y]; NSString *urlToSave = [self.webView stringByEvaluatingJavaScriptFromString:js]; //Returning an empty string if (urlToSave.length &gt; 0) { [self performSegueWithIdentifier:@"introToMain" sender:self]; } }
type: Question
score: 0
has answer: http://stackoverflow.com/a/25919157
tagged with: uiwebviewdelegate
tagged with: ios
answer count: 1
has title: Detect tapped image inside UIWebView
tagged with: javascript

http://stackoverflow.com/comment/40591516
has text: I don't understand your explanation.
type: Comment
comment on: http://stackoverflow.com/a/25929519
score: 0
type: AnswerComment

http://stackoverflow.com/a/25989929
upvote count: 9
score: 9
has comment: http://stackoverflow.com/comment/40699653
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25989892
answers question: http://stackoverflow.com/q/25989892
type: Answer
has body: You are returning b.promise(). The minifier is making use of the comma operator which returns its last operand: return 1, 2; // returns 2 return 1, 2, 3; // returns 3

http://stackoverflow.com/q/25970900
has answer: http://stackoverflow.com/a/25971022
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25973686
type: AnsweredQuestion
has title: Can I change a width or any other style of an element px by px as I scroll down with Javascript?
type: Question
has body: I have a div with a width of 100px, I want to reduce the width by 1px on every scroll step so it looks as if the div is animated when I scroll down or up the page. So when I scroll down a 100 steps the div disappears. How can I do that?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25973686
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25971022

http://stackoverflow.com/comment/40514157
score: 2
comment on: http://stackoverflow.com/q/25887283
type: Comment
type: QuestionComment
has text: Doesn't `[].map.call` already return an array and you're just making it a string with `.join(" ")` ?

http://stackoverflow.com/q/25959286
type: Question
has body: I am working on a page where i have multiple mp3 links (url) for example, play I would like to play them in a player using playlist and also a download button. Is there any easy way i can get it done! Thank you all.
has comment: http://stackoverflow.com/comment/40644085
tagged with: javascript
has comment: http://stackoverflow.com/comment/40643099
has title: How to play web page mp3 url in HTML5 player?
score: 0
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40643263
tagged with: php
has comment: http://stackoverflow.com/comment/40643160
has comment: http://stackoverflow.com/comment/40643333

http://stackoverflow.com/a/25983862
answers question: http://stackoverflow.com/q/25983736
has body: you may pass a date object or date string to moment and then call format on it. I think what you're trying to do is this: moment(date).format("MM/DD/YY") or moment(picker.toString()).format("MM/DD/YY") Note: Your jsbin is missing a reference to momentJS, and has a typo on console.log
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/40665114
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25971014
has text: @user3766182 : if you still keep the `$(document).ready`, then move `removeArray`'s defintion also inside it so that it can access the array

http://stackoverflow.com/comment/40722757
type: QuestionComment
has text: Yeah, same for me. Google must have made a change on their side this morning.
comment on: http://stackoverflow.com/q/25990252
score: 0
type: Comment

http://stackoverflow.com/q/26002049
has comment: http://stackoverflow.com/comment/40721912
score: 0
has answer: http://stackoverflow.com/a/26002322
type: Question
tagged with: javascript
has body: i think i sleep already, cant find my mistake. Thanks for your advance for this short post and for your help. My Javascript $("#avatarImage").change(function() { $("#avatar").html(' '); $.post( 'ajax/avatarUpload.php', function( data ) { alert(data); }); }); My Form My PHP Code $file_up_size = $_FILES['avatar']['size']; $file_name = md5(uniqid(rand(), true)); $add = '../assets/images/avatars/' . $file_name; if(!move_uploaded_file($_FILES['avatar']['tmp_name'], $add)){ echo 'FEHLER'; } else { //database crap } My Error(s) Notice: Undefined index: avatar in ... Thanks for your help, i am blind this evening.
accepted answer: http://stackoverflow.com/a/26002322
answer count: 1
tagged with: jquery
tagged with: ajax
tagged with: php
has title: Ajax Image Upload Notice
type: AnsweredQuestion

http://stackoverflow.com/a/25927048
answers question: http://stackoverflow.com/q/25927029
has comment: http://stackoverflow.com/comment/40587235
has comment: http://stackoverflow.com/comment/40590630
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40587253
accepted answer of: http://stackoverflow.com/q/25927029
type: AcceptedAnswer
downvote count: 0
has body: Remove the negated character class and this R1|R2|R3|R4. R1|R2|R3|R4 won't do the thing you need. You need to put this into non-capturing group or capturing group to make it to work . Like this ^req (?:R1|R2|R3|R4),\d+$ You could shorten this regex like the below ^req R[1-4],\d+$ DEMO

responsive-design
tags question: http://stackoverflow.com/q/25935445
tags question: http://stackoverflow.com/q/26004201
tags question: http://stackoverflow.com/q/26018564
tags question: http://stackoverflow.com/q/26017044
tags question: http://stackoverflow.com/q/25979894
tags question: http://stackoverflow.com/q/25951654
tags question: http://stackoverflow.com/q/26023221
tags question: http://stackoverflow.com/q/25875578
tags question: http://stackoverflow.com/q/25945226
tag name: responsive-design
type: Tag
tags question: http://stackoverflow.com/q/25890164

http://stackoverflow.com/comment/40523875
score: 1
has text: What type of "snippets" are we talking about here?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25892394

http://stackoverflow.com/comment/40754842
score: 0
type: Comment
has text: You can break the URL into finer pieces than I've done here, say, 3 letters per variable.
comment on: http://stackoverflow.com/a/26020410
type: AnswerComment

http://stackoverflow.com/comment/40601317
comment on: http://stackoverflow.com/a/25934972
has text: Should the `if...else` be changed?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40646687
has text: @bmceldowney I think OP didn't use the return value because he thought that defining `guy` inside `getInfo` made it available outside too.
comment on: http://stackoverflow.com/a/25961079
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40572216
type: Comment
has text: I tried this but it says `Exception Type: TypeError at /mysite/fetchcourses/ Exception Value: [{'id': 1L, 'name': u'Python'}....] is not JSON serializable `
comment on: http://stackoverflow.com/a/25918726
type: AnswerComment
score: 0

http://stackoverflow.com/q/25989434
has answer: http://stackoverflow.com/a/25989963
has answer: http://stackoverflow.com/a/25989546
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
type: AnsweredQuestion
downvote count: 0
has title: How to create html buttons with checkboxes with Jquery?
score: 1
has answer: http://stackoverflow.com/a/25989509
accepted answer: http://stackoverflow.com/a/25989509
has body: I have a table with 4 checkboxes. Lets say with Title,Adress,Postal Code and Email. title Adress Postal Code Email I have another div with class "myfilters" which is hidden when none of the above checkboxes are checked. Title Adress My question is How can I implement when a user checks lets say "title" and "adress" checkboxes in the table then inside the div "myfilters" to be created dynamically the buttons "Title" and the Button "Address" ?
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40698547
has comment: http://stackoverflow.com/comment/40698537
upvote count: 1
possible better answer: http://stackoverflow.com/a/25989586
has answer: http://stackoverflow.com/a/25989586
favorite count: 0

http://stackoverflow.com/a/26007599
has comment: http://stackoverflow.com/comment/40732927
has comment: http://stackoverflow.com/comment/40733158
downvote count: 0
has comment: http://stackoverflow.com/comment/40732179
has body: The behavior you're looking for is called event capturing (the opposite of event bubbling). You can enable event capturing by passing in true as the third argument to addEventListener. See: http://jsfiddle.net/zs1a6ywo/ NOTE: event capturing is not supported in IE 8 or below. For more information, see: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener
answers question: http://stackoverflow.com/q/26006523
upvote count: 2
has comment: http://stackoverflow.com/comment/40769990
type: Answer
score: 2

http://stackoverflow.com/a/25993815
downvote count: 0
type: Answer
upvote count: 6
has body: Ok, I solved it like this: &lt;script type="text/javascript"&gt; function OnLinkedInFrameworkLoad() { IN.Event.on(IN, "auth", OnLinkedInAuth); // Use a larger login icon. $('a[id*=li_ui_li_gen_]').html('&lt;img src="images/linkButton.png" height="40" width="130" border="0" class="linkButton" /&gt;');} function OnLinkedInAuth() { IN.API.Profile("me").fields(["firstName","headline","positions:(is-current,company:(name))"]) .result(function(result) { var firstName = result.values[0].firstName; var company = result.values[0].positions.values[0].company.name; $('#firstName').append(firstName); $('#company').append(company); }) IN.API.Raw("/people/~/picture-urls::(original)").result(highRes); } function highRes(images) { var img = images.values[0]; $('.linkedin').append('&lt;img src="' + img + '" class="profile"&gt;'); $('.mobile-linkedin').append('&lt;img src="' + img + '"class="profile"&gt;'); $("#guest").hide(); $("#hide").hide(); } function ShowProfileData(profiles) { var member = profiles.values[0]; var id=member.id; var firstName=member.firstName; var url = "http://api.linkedin.com/v1/people/" + id + "/picture-url"; //use information captured above } &lt;/script&gt;
answers question: http://stackoverflow.com/q/25991863
score: 6

node.js
tags question: http://stackoverflow.com/q/25943339
tags question: http://stackoverflow.com/q/25942184
tags question: http://stackoverflow.com/q/25942688
tags question: http://stackoverflow.com/q/25891671
tags question: http://stackoverflow.com/q/26002228
tags question: http://stackoverflow.com/q/26033395
tags question: http://stackoverflow.com/q/25985096
tags question: http://stackoverflow.com/q/25952231
tags question: http://stackoverflow.com/q/25987987
tags question: http://stackoverflow.com/q/25893855
tags question: http://stackoverflow.com/q/25885280
tags question: http://stackoverflow.com/q/25979402
tags question: http://stackoverflow.com/q/25966676
tags question: http://stackoverflow.com/q/26014323
tags question: http://stackoverflow.com/q/25942826
tags question: http://stackoverflow.com/q/25889813
tags question: http://stackoverflow.com/q/25891506
tags question: http://stackoverflow.com/q/25944781
tags question: http://stackoverflow.com/q/25976950
tags question: http://stackoverflow.com/q/25933863
tags question: http://stackoverflow.com/q/25973619
tags question: http://stackoverflow.com/q/25883381
tags question: http://stackoverflow.com/q/25965220
tags question: http://stackoverflow.com/q/26017571
tags question: http://stackoverflow.com/q/25927620
tags question: http://stackoverflow.com/q/25882464
tags question: http://stackoverflow.com/q/25969949
tags question: http://stackoverflow.com/q/25934414
tags question: http://stackoverflow.com/q/25891768
tags question: http://stackoverflow.com/q/25886009
tags question: http://stackoverflow.com/q/26004182
tags question: http://stackoverflow.com/q/25888419
tags question: http://stackoverflow.com/q/26030992
tags question: http://stackoverflow.com/q/25929068
tags question: http://stackoverflow.com/q/25965439
tags question: http://stackoverflow.com/q/25958483
tags question: http://stackoverflow.com/q/26001377
tags question: http://stackoverflow.com/q/25959753
tags question: http://stackoverflow.com/q/25935999
tags question: http://stackoverflow.com/q/25935358
tags question: http://stackoverflow.com/q/26020579
tags question: http://stackoverflow.com/q/25924704
tags question: http://stackoverflow.com/q/25887833
tags question: http://stackoverflow.com/q/25904543
tags question: http://stackoverflow.com/q/25900639
tags question: http://stackoverflow.com/q/25958229
tags question: http://stackoverflow.com/q/26015747
tags question: http://stackoverflow.com/q/25909007
tags question: http://stackoverflow.com/q/25999591
tags question: http://stackoverflow.com/q/26009544
tags question: http://stackoverflow.com/q/25899698
tags question: http://stackoverflow.com/q/25961109
tags question: http://stackoverflow.com/q/25980417
tags question: http://stackoverflow.com/q/25985387
tags question: http://stackoverflow.com/q/25996487
tags question: http://stackoverflow.com/q/25885830
tags question: http://stackoverflow.com/q/26004412
tags question: http://stackoverflow.com/q/25914658
tags question: http://stackoverflow.com/q/26004625
tags question: http://stackoverflow.com/q/25958208
tags question: http://stackoverflow.com/q/26016479
tags question: http://stackoverflow.com/q/25980757
tags question: http://stackoverflow.com/q/25977206
tags question: http://stackoverflow.com/q/25956690
tags question: http://stackoverflow.com/q/26022637
tags question: http://stackoverflow.com/q/25980466
tags question: http://stackoverflow.com/q/26000305
tags question: http://stackoverflow.com/q/25961260
tags question: http://stackoverflow.com/q/26012437
tags question: http://stackoverflow.com/q/26032492
tags question: http://stackoverflow.com/q/25880978
tags question: http://stackoverflow.com/q/25921095
tags question: http://stackoverflow.com/q/25888324
tags question: http://stackoverflow.com/q/25969775
tags question: http://stackoverflow.com/q/25903551
tags question: http://stackoverflow.com/q/25999796
tags question: http://stackoverflow.com/q/25975504
tags question: http://stackoverflow.com/q/25922903
tags question: http://stackoverflow.com/q/25886997
tags question: http://stackoverflow.com/q/25894648

http://stackoverflow.com/a/26019772
has body: Most succinct way I could think of: for item, i in array for item, j in array when j &gt;= i
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/26018998
accepted answer of: http://stackoverflow.com/q/26018998
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40572375
type: Comment
score: 0
type: AnswerComment
has text: You have a point, both of these accomplish the same goal. I find it to be a little more clear that you're checking to see if there is a value to use !!a.value, particularly if the code is going to be read by someone who is coming to JS from another language that does not equate null or undefined to a boolean value. Even when I do use constructs similar to if( a.value ), I tend to explicitly check for if( a.value !== null && a.value !== undefined ) for readability and comprehension.
comment on: http://stackoverflow.com/a/25918694

http://stackoverflow.com/a/25989425
accepted answer of: http://stackoverflow.com/q/25980615
answers question: http://stackoverflow.com/q/25980615
score: 0
type: AcceptedAnswer
has body: Figured it out, use Router instead of clickHandlers on the generated content and assign controllers as per the link, routers can let you specify Controllers that I can have defined and called within the scope and call other functions within the scope. No need for ng-click or any sort of manual clickHandlers. I wish if I could not specify a templateUrl since I don't need but it's not working if I omit it, appreciate any comments. &lt;div id="navigation" data-ng-cloak&gt; &lt;ul id="folios" ng-controller="FoliosController" class="nav nav-pills nav-stacked"&gt; &lt;li data-ng-repeat="folio in folios" class="" active="true"&gt; &lt;a href="#/folios/{{folio.productId}}" id="{{folio.productId}}"&gt;{{folio.title}}&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;ng-view&gt;&lt;/ng-view&gt; puremvc.define( { name: "modules.search.view.components.Navigation", constructor: function() { var self = this; var navigation = angular.module("navigation", ["ngRoute"]); navigation.config(function($routeProvider, $locationProvider){self.config($routeProvider, $locationProvider)}); navigation.controller("FoliosController", function($scope, $location){self.foliosController($scope, $location)}); navigation.controller("SearchController", function($scope, $location, $routeParams){self.searchController($scope, $location, $routeParams)}); angular.bootstrap(document.getElementById("navigation"), ["navigation"]); } }, { $scope: null, $location: null, folios: [], foliosController: function($scope, $location) { this.$scope = $scope; this.$location = $location; this.$scope.folios = this.folios; }, searchController: function($scope, $location, $routeParams) { console.log($routeParams); }, config: function($routeProvider, $locationProvider) { $routeProvider. when("/", {templateUrl:"js/modules/partials/list.html"}). when("/folios/:productId", {templateUrl:"js/modules/partials/search.html", controller:"SearchController"}); }, init: function(folios) { for(folio in folios) { this.folios.push(folios[folio]); } thi…
type: Answer

http://stackoverflow.com/a/26016298
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26016060
has comment: http://stackoverflow.com/comment/40747542
answers question: http://stackoverflow.com/q/26016060
score: 3
has comment: http://stackoverflow.com/comment/40747161
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40747042
has comment: http://stackoverflow.com/comment/40747802
type: Answer
has comment: http://stackoverflow.com/comment/40752874
has body: Something like this? function secondPassed() { var cur_date = new Date(); var minutes = cur_date.getMinutes(); var seconds = cur_date.getSeconds(); var timers = document.getElementsByClassName('timer'); for (var i = 0; i &lt; timers.length; i++) { timers[i].innerHTML = (4 - minutes % 5) + ":" + (seconds &gt;= 50 ? "0" : "") + (59 - seconds); } } var countdownTimer = setInterval(secondPassed, 1000); &lt;span class="timer"&gt;&lt;/span&gt;

http://stackoverflow.com/q/25968525
has title: Javascript innerHTML is loading slowly
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25968559
has body: I wanted to avoid having to make my menu on 5 different pages every time I wanted to make a change. So I used Javascript to recreate the menu at runtime, so that I can just change that script to make the menu change on all pages at once (I know, genius right?). But here is the thing; While the code works as intended, the menu seems to first load, when the rest of the page have loaded even though I call the function with window.onload. I don't really know why that is. My guess would be that innerHTML is slow, or I load the script at the wrong time. I tried loading it at but that didn't make much sense considering the DOM doesn't exist yet. So I moved it down to the header tag, which is where the menu code originally was so that it loads when that header does. But it's the exact same behaviour. If I enter any of the other pages where the menu is written directly in HTML, it loads right away like the rest of the page. Any suggestions? window.onload = function () { var header = document.getElementById("header"); var div = document.createElement('div'); div.className = 'inner'; div.innerHTML = ' Dynamic Realities ' + ' ' + ' Home ' + ' Forum ' + 'Media ' + ' The Team ' + ' Open Positions '; header.appendChild(div); }
has answer: http://stackoverflow.com/a/25968559
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40688259
has text: The timer calls `update`. `update` sets up another. Perfect. `update` is called every 200ms or so.
type: Comment
comment on: http://stackoverflow.com/a/25983316
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40583046
has text: @Amir Hopefully this gives you proof of it working. The name of the cookie is "expires". Also if you're in Chrome, from menu go View->Developer->Developer Tools - in here click Resources tab and you will see Cookies click that to see cookies or lack thereof.
comment on: http://stackoverflow.com/a/25919136
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25898061
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25898180
score: 0
has answer: http://stackoverflow.com/a/25898181
has answer: http://stackoverflow.com/a/25898113
tagged with: regex
answer count: 4
has body: I'm having issues trying to isolate and remove the first 3 words from a string. The string is: "LES B1 U01 1.1 Discussing what kind of job you want" I need to make it: "1.1 Discussing what kind of job you want" I was able to get the first word using /^([\w-]+)/ Any help would be appreciated! PS. I'm using jQuery
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25898181
has answer: http://stackoverflow.com/a/25898154
has title: Javascript regex for first 3 words
accepted answer: http://stackoverflow.com/a/25898154
type: Question

http://stackoverflow.com/q/25927852
tagged with: jquery
has comment: http://stackoverflow.com/comment/40588385
favorite count: 0
has title: add onclick programmatically failed using jquery
has answer: http://stackoverflow.com/a/25927890
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40588362
tagged with: javascript
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25927973
has body: $('#target a').attr("onClick=", link); for some reason I have to do this one, but it says Failed to execute 'setAttribute' on 'Element': 'onclick=' is not a valid attribute name.

http://stackoverflow.com/q/26008953
type: Question
tagged with: object
has body: I want to put copies of objects into an array n number of times, where n is a property of each of those objects that tells you how many times it needs to be copied in. So I imagine I should do a loop, and for each object, look at it's property and loop the loop that integer's number of times. var myArray = {}; var object1 = { "copyMeThisManyTimes": 4, "name": "Sam" } var object2 = { "copyMeThisManyTimes": 2, "name": "Max" } for (i=0; i &lt; this.copyMeThisManyTimes; i++) { myArray.push(this); } Maybe that for loop should be in an $each or something so there is a scope that "this" is based on? Back story: Some creature objects are more rare than others in this game I am coding. I want to create a "deck" of enemy cards. Certain enemies should come up more often than others - consider them "common". Each object has a rarity property - this integer will determine the number of times duplicates of this object will be placed into the array to ensure common ones are seen more frequently. I figure this will be a good way to do rarity, but I'm totally open to other options via Javascript or jQuery (prefer vanilla js). Another option a friend mentioned would be to have a separate array for each "rarity" category, and pick a random number for enemy selection, and more of those numbers would point to the "common" array and fewer to the "rare" array. For example a dice roll of 1-4 would pick an enemy from the "common" array. What's the best way to do this? I'm sure there is an embarrassingly easier way, so I apologize in advance. :)
has answer: http://stackoverflow.com/a/26008994
answer count: 2
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26009053
has title: Add a number of objects into an array n number of times in Javascript
score: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25981909
tagged with: http://stackoverflow.com/tag/json
has title: How to populate a table from data in JSON array
type: Question
possible better answer: http://stackoverflow.com/a/25981969
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 2
has answer: http://stackoverflow.com/a/25981966
accepted answer: http://stackoverflow.com/a/25981966
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25981969
type: AnsweredQuestion
score: 2
upvote count: 2
has body: I am trying to populate an HTML table from data that is in a two-dimensional array. The data is coming to an $.ajax script from a php/MySQL query. I'm successfully parsing the data in the success function and I can read out the array element contents to the console, but I can't figure out why the values won't populate the HTML table. See this jsFiddle for my work. In the console I can populate the input in any of the table cells with this jQuery notation: $('#tblApTdms tr:nth-child(4) td:nth-child(3) input').val('q34rfewa') but it won't populate in the jsFiddle, in the Web application I'm building, nor in an isolated test page. I must be missing something here!

http://stackoverflow.com/comment/40688291
has text: how would a jsfiddle help here? the script itself is working, I'm just looking for additional suggestions or comments
comment on: http://stackoverflow.com/q/25983622
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25875322
downvote count: 0
accepted answer: http://stackoverflow.com/a/36566253
favorite count: 0
type: AnsweredQuestion
tagged with: leaflet
has body: I have a list of LatLng including some additional data (e.g. altitude/elevation) and I would like to display them with leaflet as a Polyline. Instead of a single colored line I would like to have the line colored according to that additional data though. Is that possible with leaflet at all? Do plugins exist for something like that?
tagged with: gis
tagged with: maps
type: Question
possible better answer: http://stackoverflow.com/a/25890217
has answer: http://stackoverflow.com/a/36566253
has answer: http://stackoverflow.com/a/25890217
has title: Are multicolor polylines possible with leaflet
tagged with: javascript
score: 4
upvote count: 4
answer count: 2

submenu
tags question: http://stackoverflow.com/q/26021516
tag name: submenu
type: Tag
tags question: http://stackoverflow.com/q/25996115

http://stackoverflow.com/comment/40772297
type: AnswerComment
type: Comment
has text: Erh , no pop up and it didn't read my PHP functions :( .. even right or wrong it still do the html form action.
comment on: http://stackoverflow.com/a/26029656
score: 0

http://stackoverflow.com/q/25886876
has body: By default all tokens generated with the Twilio helper libraries expire after one hour. But you should configure this expiration to be as short as possible for your application. I am trying to generate a new token each time a user attempts a new connection and try to setup Twilio device. But it creates new device each time. So all Twilio device get incoming call and i can see multiple notification for that. Multiple connections created an dmultiple dtmf sent. I want only one twilio device with fresh token. Twilio.Device.destroy() method is there but it is not working. What are other option do I have? How to release/destroy/stop/delete Twilio.Device? After saving credentials globalTwilioSagaSetup() called and after 58min of that again token is generated and Twilio.Device setup is done. function globalTwilioSagaSetup() { // Get Twilio credentials // Get Twilio Token // Setup Twilio Device // For token re-generation before expire. 58min setInterval(function(){globalTwilioSagaSetup();},3480000); }
type: Question
tagged with: destroy
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: token
has title: How to setup Twilio.Device with new token?
favorite count: 0
tagged with: twilio
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/30096349
score: 1

http://stackoverflow.com/comment/108712554
has text: Can use with standart ISO format for Year of Week: `moment("12-25-1995", "MM-DD-YYYY").format("GGGG-[W]WW-E")`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/46661928
type: Comment

http://stackoverflow.com/a/40818600
answers question: http://stackoverflow.com/q/26007187
has comment: http://stackoverflow.com/comment/79028864
downvote count: 0
score: 6
type: Answer
upvote count: 6
has body: require into functions is wrong way in Node. Followed ES6 method supports all correct http statuses and of course retrieve error if you have a bad 'host' like fff.kkk checkUrlExists(host,cb) { http.request({method:'HEAD',host,port:80,path: '/'}, (r) =&gt; { cb(null, r.statusCode &gt;= 200 &amp;&amp; r.statusCode &lt; 400 ); }).on('error', cb).end(); }

http://stackoverflow.com/q/25949727
has comment: http://stackoverflow.com/comment/40626117
downvote count: 6
has body: This is a part of my code. The code is moving to the location, but the echo below is not working. I am sure this header is affecting it somehow else { header('location: index.php'); echo '&lt;script&gt; document.getElementById("nick").value = "invalid email"; document.getElementById("nick").className = "invalidemail"; &lt;/script&gt;';
has comment: http://stackoverflow.com/comment/40626116
has title: Echo after header
tagged with: php
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25949847
accepted answer: http://stackoverflow.com/a/25949847
has comment: http://stackoverflow.com/comment/40626102
upvote count: 0
answer count: 1
tagged with: header
tagged with: javascript
favorite count: 0
score: -6

http://stackoverflow.com/a/26044057
score: 0
has comment: http://stackoverflow.com/comment/40945687
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26019073
has body: Styling of an entire row is most intuitively accomplished by providing metadata to the grid regarding individual rows. When using the Slickgrid Dataview, this becomes slightly more challenging due to the potential need to support grouping, as the groups provide some information via their own groupItemMetadataProvider. Similiar to the information provided here a few options are available. Attempting to format each cell, leaves some visible whitespace and can cause issue with empty cells. As such, I would provide corresponding css classes for each color you'll be supporting. Setup the getItemMetadata to return the respective css for each row. var defaultImpl = dataView.getItemMetadata var override = function(row){ if(!defaultImpl(row)) { var item = dataView.getItem(row) /* assuming the color is stored similar to #000000 ... strip off the # in addition I've prefixed my css classes with 'color_' */ var color = item.color ? 'color_' + item.color.substr(1, item.color.length) : &quot;&quot; var metadata = item.color ? {cssClasses: color} : null return metadata } return defaultImpl(row) } dataView.getItemMetadata = override Note: Any styling attempts outside the context available to the grid will get wiped upon scrolling. Fiddle
answers question: http://stackoverflow.com/q/26019073
type: Answer
has comment: http://stackoverflow.com/comment/40947575
has comment: http://stackoverflow.com/comment/40933831

http://stackoverflow.com/q/25930389
tagged with: asp.net-mvc-4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40597307
type: Question
tagged with: javascript
has title: MVC: Get selected text from <Select> using JQuery
score: 0
has body: I'm trying to get the selected item from my dropdown's and use it for validation. Previously i used: $("#PolicyOrganisation").text()); Which worked but then I changed my dropdowns's to the below(loaded from database rather than hardcoded): Policy Organisation: Select @foreach (var item in ViewBag.PolicyOrgs) { @item.Name } And my JQuery Validation too: //Validation for Dropdown var platform1 = $('#PolicyOrganisation option:selected').text(); var Valid1 = (platform1 !== 'Select') if (!Valid1) { $('#PolicyOrganisation').css({ "border": "1px solid red", "background": "#FFCECE" }); } I found this method through searching about this question.. Get selected text from a drop-down list (select box) using jQuery But the new versions don't work? Can anyone suggest why this might be?
linked to: http://stackoverflow.com/q/1643227
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25930431
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40778678
type: Comment
has text: +1 for using jQuery. But I think he wants to use javascript. if you update your code to javascript then it might meet his requirement.
comment on: http://stackoverflow.com/a/26015274
score: 0
type: AnswerComment

http://stackoverflow.com/q/26021134
answer count: 3
has answer: http://stackoverflow.com/a/26021266
has comment: http://stackoverflow.com/comment/40756218
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40756275
accepted answer: http://stackoverflow.com/a/26021577
has body: I'm working on my wordpress website right now, and there's one section where I have to create a gallery where the pictures would show some text and a button under the text when you over on the image. I'm trying to use a:hover but I can only make some changes. How do I show a button when you hover on the image? Please any help would be appreciated. Thanks a bunch
tagged with: css
has title: How do I output a button and a text when I hover on an image? Do I need to use JQuery?
has answer: http://stackoverflow.com/a/26021577
tagged with: hover
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26021266
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26021662
score: 0

yammer
type: Tag
tags question: http://stackoverflow.com/q/25949933
tags question: http://stackoverflow.com/q/26016935
tags question: http://stackoverflow.com/q/25916043
tag name: yammer

http://stackoverflow.com/a/25922122
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40578537
has body: The code send.callBack = me.templateCallback; will assign the function reference to send.callBack, but will do nothing to preserve the value of me (which would be this during the call to templateCallback). To do that, you can use ES5's Function#bind (which can be shimmed on older browsers): send.callBack = me.templateCallback.bind(me); Function#bind creates a function that, when called, will call the original function with this set to the argument you give it. The reason for this is that when you call a function, the value of this within the call is set almost entirely by how you called the function, not where the function is defined or what object it's attached to. More (on my blog): Mythical methods You must remember this
has comment: http://stackoverflow.com/comment/40578529
type: Answer
answers question: http://stackoverflow.com/q/25922028
accepted answer of: http://stackoverflow.com/q/25922028
has comment: http://stackoverflow.com/comment/40579839
has comment: http://stackoverflow.com/comment/40578496
has comment: http://stackoverflow.com/comment/40578461

http://stackoverflow.com/q/25913154
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25913471
answer count: 2
downvote count: 0
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25914254
has comment: http://stackoverflow.com/comment/40562852
has body: I am having a problem with Masonry and struggling to understand why it's happening. Basically, I have a 4 column grid of items. When the 3rd item is bigger than the rest (3x bigger = 75% width of container), masonry is unable to fill that gap. I have created a jsfiddle to demonstrate the issue: http://jsfiddle.net/7ZVb7/2814/ congole.log('Please check jsFiddle'); Has anyone come across this before? Thanks in advance
tagged with: grid
type: Question
possible better answer: http://stackoverflow.com/a/25913471
has title: Masonry leaving empty gap
tagged with: masonry
has answer: http://stackoverflow.com/a/25914254

umbraco7
type: Tag
tag name: umbraco7
tags question: http://stackoverflow.com/q/25974495

http://stackoverflow.com/comment/40671256
score: 0
type: QuestionComment
has text: Why the image of the left triangle it's not equal than the right. I don't understand it.
type: Comment
comment on: http://stackoverflow.com/q/25973546

http://stackoverflow.com/comment/40681834
type: QuestionComment
comment on: http://stackoverflow.com/q/25979812
has text: Why not to use utf-8 in contentType? or just remove charset=ISO-8859-1 from contentType property
score: 0
type: Comment

http://stackoverflow.com/a/25916361
type: Answer
answers question: http://stackoverflow.com/q/25916163
has body: You could do this: function fillGaps(arr) { var result = []; var previous = 0; _.each(arr, function(p) { if (p &gt; previous + 1) { result.push('...') } result.push(p); previous = p; }); return result; } But I'm sure there is shorter.
score: 0

http://stackoverflow.com/comment/40610990
type: Comment
comment on: http://stackoverflow.com/q/25940349
type: QuestionComment
score: 2
has text: I'm not familiar with razor but try putting quotes around @Model.FirstName: window.prompt("Copy to clipboard: Ctrl+C, Enter", "@Model.FirstName");

http://stackoverflow.com/q/26003323
upvote count: 5
tagged with: javascript
tagged with: image
has body: I did this post asking your opinion about what JS library is better, or can do the work that I have shown. Since I'm not allowed to do that here I did a research and tried out EaselJS to do the work. So my question now have changed. I have this piece of code: function handleImageLoad(event) { var img = event.target bmp = new createjs.Bitmap(img); /*Matrix2D Transformation */ var a = 0.880114; var b = 0.0679298; var c = -0.053145; var d = 0.954348; var tx = 37.4898; var ty = -16.5202; var matrix = new createjs.Matrix2D(a, b, c, d, tx, ty); var polygon = new createjs.Shape(); polygon.graphics.beginStroke("blue"); polygon.graphics.beginBitmapFill(img, "no-repeat", matrix).moveTo(37.49, -16.52).lineTo(336.27, -36.20).lineTo(350.96, 171.30).lineTo(50.73, 169.54).lineTo(37.49, -16.52); stage.addChild(polygon); stage.update(); } where the variables a,b,c,tx and ty are values from a Homography matrix, 0.880114 0.067979298 37.4898 -0.053145 0.954348 -16.5202 -0.000344 1.0525-006 1 As you can see in attached files, I draw well a deformed rectangle but the image still doesn´t wrap the shape created. Anyone know how can I do it? There is a way better do to this? I'm doing something wrong? Thanks for your time. Edit: To be more specific I have added other image to see what I want.
tagged with: easeljs
has comment: http://stackoverflow.com/comment/40723888
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40724264
type: UnansweredQuestion
tagged with: shapes
has title: EaselJS, Matrix2D and wrap Image
has comment: http://stackoverflow.com/comment/40761853
downvote count: 2
has comment: http://stackoverflow.com/comment/40759476
type: Question
has answer: http://stackoverflow.com/a/26542533
score: 3
tagged with: transformation

http://stackoverflow.com/comment/40633244
comment on: http://stackoverflow.com/a/25953818
type: AnswerComment
score: 0
type: Comment
has text: But, it'll delete password from the original array.

http://stackoverflow.com/comment/40731442
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26007140
has text: Good question, but in my case there will always be many parameters. Will never contain "?" and may or may not begin with "&".. I know there's really no sure fire way to do this, I'm just trying to get a decent check.. Maybe could add in that it cannot start with "<, {, [".
type: Comment

http://stackoverflow.com/comment/40555931
has text: i cant change the string, no control over it
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25910313
type: AnswerComment

http://stackoverflow.com/comment/40590312
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25927797
has text: Hi, could you please give an example of your result JSON string?

http://stackoverflow.com/q/25877167
accepted answer: http://stackoverflow.com/a/25934146
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25877939
tagged with: slickgrid
upvote count: 1
has answer: http://stackoverflow.com/a/25877939
has answer: http://stackoverflow.com/a/25934146
downvote count: 0
has body: The following marionette view contains a table that is editable by double clicking a cell. To accomplish that I used slickgrid. It works fine in chrome, but in IE9 this view never notices the change event("change .slick-cell.l1 input"). This is unless you double click the cell to edit make the change then click the save button. In chrome I can double click the cell make the change and hit enter or click anywhere outside the cell and the change occurs. DataContentView = Marionette.ItemView.extend({ className: "ui-widget-content grid-container", events: { "change .slick-cell.l0 input": "changeDataKey", "change .slick-cell.l1 input": "changeDataValue", "click .ui-icon-trash": "removeData" }, changeDataValue: function(event){ var target = $(event.target), key = target.closest(".slick-row").find(".l0").text(), value = target.val(); this.model.set(key, value, {silent:true}); } }
tagged with: javascript
type: AnsweredQuestion
has title: change event not triggered on input element
tagged with: marionette
score: 1
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/q/25898711
has title: Open .mdb from cloud
answer count: 1
downvote count: 0
score: 1
tagged with: ms-access
favorite count: 0
linked to: http://stackoverflow.com/q/9777038
type: UnansweredQuestion
tagged with: hosting
tagged with: google-drive-api
has answer: http://stackoverflow.com/a/25899399
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/857670
has body: I have stored my .mdb file on google drive and host little website on it. Now I need to access that database but could not find any to do so as google drive does not provide php environment so suggest me any possible way
tagged with: database
tagged with: javascript

http://stackoverflow.com/a/25889689
has comment: http://stackoverflow.com/comment/137628534
score: 0
answers question: http://stackoverflow.com/q/25889468
type: Answer
has body: setTimeout(function() { $("#one").css('display','none'); }, 5000);

http://stackoverflow.com/comment/40507426
comment on: http://stackoverflow.com/q/25883214
has text: thanks @Rocky you solved my problem I want to accept your answer but I can not find option to accept comment as a answer thanks again
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40680685
comment on: http://stackoverflow.com/q/25979429
type: Comment
has text: That line never executes in this case I'm completely pushing the code into Mongo, so nothing is stored within that array.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40702257
score: 0
type: Comment
has text: I tried this too but again, no reaction. Maybe the problem has something to do with my All_Titles var being a NodeList rather than an array?
type: AnswerComment
comment on: http://stackoverflow.com/a/25991268

http://stackoverflow.com/a/25926100
accepted answer of: http://stackoverflow.com/q/25925802
downvote count: 0
score: 1
has body: Instead of creating & removing the textarea, I would set its display like function nameChange(el) { document.getElementById('positiontext').style.display = el.value == 'yes' ? '' : 'none'; } NO YES
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25925802
type: Answer

http://stackoverflow.com/a/25996287
has comment: http://stackoverflow.com/comment/40711173
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40711574
score: 2
has comment: http://stackoverflow.com/comment/40711398
has comment: http://stackoverflow.com/comment/40711815
accepted answer of: http://stackoverflow.com/q/25996132
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25996132
has body: There is no matching by a regular expression. Best solution is to use a common className and loop over the collection. var elems = document.getElementsByClassName("commonClass"); Other option is using querySelectorAll with a "starts with" match var elems = document.querySelectorAll("[name^='feature_value_']"); and the loop var i; for (i=0; i&lt;elems.length; i++) { if (!elems[i].value.length) { //you might want to trim this elems[i].value = "0"; } } References: MDN getElementsByClassName() MDN querySelectorAll() Edit, add the runnable snippet: var elems = document.querySelectorAll("[name^='feature_value_']"); var i; for (i=0; i&lt;elems.length; i++) { if (!elems[i].value.length) { //you might want to trim this elems[i].value = "0"; } } &lt;input class="field" type="text" name="feature_value_1" value="" size="50" style="width: 350px;"&gt; &lt;input class="field" type="text" name="feature_value_2" value="1" size="50" style="width: 350px;"&gt; &lt;input class="field" type="text" name="feature_value_3" value="" size="50" style="width: 350px;"&gt;
downvote count: 0
has comment: http://stackoverflow.com/comment/40711039

http://stackoverflow.com/a/26024859
answers question: http://stackoverflow.com/q/26024796
upvote count: 7
type: AcceptedAnswer
downvote count: 0
has body: text.match(/!\[.*?\]\((.*?)\)/)[1] This assumes that you can't have any escaped brackets though, like ![\]] which is probably a safe assumption. This will also get only the first image as requested.
type: Answer
accepted answer of: http://stackoverflow.com/q/26024796
score: 7

http://stackoverflow.com/a/25926265
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25915208
type: Answer
answers question: http://stackoverflow.com/q/25915208
has body: Use form to submit your data to server: block content h1 todos form(action="/todos", method="post", id="taskform") input(type="text", name="task") #todos for todo in todos include todo In node, now you can access task using req.body.task: app.post('/todos', function(req,res){ todos.push(new todo(req.body.task)) res.render('index',{todos:todos}); });
upvote count: 1
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26017590
type: AnsweredQuestion
has body: I have a webpage that does not use Iframes. Like: ... ...(content) And I want to write a piece of code that gives me the following outcome: ... ...(content)
tagged with: iframe
downvote count: 1
type: Question
has title: How do I dynamically wrap a document in an iframe?
has comment: http://stackoverflow.com/comment/40749519
has comment: http://stackoverflow.com/comment/41228379
has answer: http://stackoverflow.com/a/26017819
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26017805
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26017805
possible better answer: http://stackoverflow.com/a/26017819

http://stackoverflow.com/q/25916906
has comment: http://stackoverflow.com/comment/40568432
type: UnansweredQuestion
has title: Share selected select with another controller
type: Question
answer count: 1
has body: I am trying to to share a selected option with another controller (And have it update when I select a new option). Something that would work like the 2-way data binding between controllers. I've attempted this by setting up a factory like so .factory("shareObjective", function($scope){ var shareObjective = {}; return { shareObjective: shareObjective, }; }) Then I inject this into the controller and bind it to the model of the select like so $scope.selectModel = shareObjective.shareObjective; I seem to be having some trouble getting this to work. I Basically just want to share the selected option (it's .name to be precise) with another controller and am struggling to do so. My first step was to get it to share into the factory to begin with, but I seem to be having no luck attempting this. Should I be using something like the $broadcast to keep the stream of information open? Thanks! Edit - here's a plunkr http://plnkr.co/edit/L5lz4etQ7mUEhf9viNOk?p=preview
has answer: http://stackoverflow.com/a/25917552
tagged with: javascript
has comment: http://stackoverflow.com/comment/40569219
score: 0
has comment: http://stackoverflow.com/comment/40568592
tagged with: angularjs

http://stackoverflow.com/a/25876534
accepted answer of: http://stackoverflow.com/q/25876442
has comment: http://stackoverflow.com/comment/40503011
upvote count: 6
score: 6
type: AcceptedAnswer
downvote count: 0
has body: The easiest way I can think of is to clone it shallow with DOM's cloneNode, then get the outerHTML of that: var element = $("selector for the element you want"); var html = element[0].cloneNode(false).outerHTML; Example (made my own, wow was that fiddle complex) Or with more jQuery: Example var html = $("selector for the element you want") .clone() .contents() .remove() .end()[0].outerHTML; Note that the text inside the element is "child" content (specifically, one or more Text node children). If you want those, you'll need a loop. jQuery's contents can help there: Example var html = $("selector for the element you want") .clone() .contents() .each(function() { if (this.nodeType !== 3) { // It's not a Text node... $(this).remove(); // ...nuke it } }) .end()[0].outerHTML;
answers question: http://stackoverflow.com/q/25876442
type: Answer

http://stackoverflow.com/comment/40584503
type: QuestionComment
type: Comment
has text: im really not sure what you're asking for, can you elaborate a bit more?
comment on: http://stackoverflow.com/q/25925546
score: 0

http://stackoverflow.com/comment/40841360
type: AnswerComment
has text: While this is still correct, the rel attribute won't validate for the HTML5 specifications so warning future readers.
type: Comment
comment on: http://stackoverflow.com/a/26048418
score: 0

http://stackoverflow.com/comment/40625330
score: 0
type: Comment
has text: I think the problem is that I'm running an older version of Meteor, a package is holding me back from updating, I'm not sure which one though.
type: QuestionComment
comment on: http://stackoverflow.com/q/25948760

http://stackoverflow.com/comment/40563097
comment on: http://stackoverflow.com/q/25914275
score: 0
type: QuestionComment
type: Comment
has text: The Error API is not standardized, each browser implement it in a different way. take a look here: http://www.eriwen.com/javascript/js-stack-trace/

http://stackoverflow.com/a/48429849
type: Answer
downvote count: 0
score: 1
has body: There are some options : Make listener on your ios code, to move the screen up along with the keyboard height, so everything move up along with the keyboard, then your design save. Make your css design responsive. Then no problem with change height, it will be scrollable inside your webview.
upvote count: 1
answers question: http://stackoverflow.com/q/25915830

http://stackoverflow.com/comment/40577049
has text: Almost. I don't want the selects to change, just match the first word and select that option.
type: Comment
comment on: http://stackoverflow.com/a/25920965
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40713182
has text: It sounds like your slider html looks like this: ` `, then your init should be `var slider_4=$("#slider_0").bxSlider({});` and you can target them with `$("#slider_" + $(this).index()).reloadSlider();`
type: QuestionComment
comment on: http://stackoverflow.com/q/25997327
score: 0
type: Comment

http://stackoverflow.com/comment/40714461
score: 1
comment on: http://stackoverflow.com/q/25998032
has text: Just in case, the solution is to chain promises in the for loop, instead of simply creating new ones, something like that: var promise = Q(); for (...) { promise = promise.then(...) }
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25929874
accepted answer: http://stackoverflow.com/a/25930253
type: Question
has body: var ajaxData = {1: a, 2: b, 3: c, 4: d}; $.ajax({ type: "POST", data : ajaxData, etc etc if I use dataType: 'json' in $ajax, how can I catch the data in my php? if not I can use $_POST['1'] etc but I plan to use jason because I have to do $_POST['2'] and more..
tagged with: javascript
tagged with: jquery
tagged with: ajax
answer count: 3
has answer: http://stackoverflow.com/a/25930253
has answer: http://stackoverflow.com/a/25930017
possible better answer: http://stackoverflow.com/a/25929997
has answer: http://stackoverflow.com/a/25929997
has title: catch $ajax json type post data
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/25971592
type: Answer
score: 1
upvote count: 1
has body: Try, $("#myDiv1, #myDiv2").fadeIn(20).promise().done(function(){ alert('alert'); });
answers question: http://stackoverflow.com/q/25971536
downvote count: 0

http://stackoverflow.com/q/25874790
has body: I have a form. &lt;form id="myForm"&gt; &lt;input type="text" name="e1" id="e1" value="1" /&gt; &lt;input type="text" name="e2" id="e2" value="2" /&gt; &lt;input type="text" name="e3" id="e3" value="3" /&gt; &lt;input type="text" name="e4" id="e4" value="4" /&gt; &lt;input type="text" name="e5" id="e5" value="5" /&gt; &lt;/form&gt; I use the jQuery validation plugin http://jqueryvalidation.org/ to validate and submit the form. var validator=$("#myForm").validate({ rules: {}, submitHandler: function(form) { var data1=$(form).find(':input'); var data2=data1.serializeArray(); //Use ajax to post data2 or submit form... } }); Instead of submitting the exact values in the form, I would like to change one of them. For instead, the server should receive a value of "333" instead of "3" for $_POST['e3']. I don't wish to change the value of the #e3 input on the page. I would rather not use a hidden input to do so, nor manually create my object to upload. How do I change either the data1 object or data2 object to reflect the new value for #e3? EDIT. Live example at http://jsfiddle.net/rueL9y0p/1/ data1 and data2 values are: Object { 0=input#e1, 1=input#e2, 2=input#e3, more...} [Object { name="e1", value="1"}, Object { name="e2", value="2"}, Object { name="e3", value="3"}, Object { name="e4", value="4"}, Object { name="e5", value="5"}]
possible better answer: http://stackoverflow.com/a/25875147
answer count: 3
downvote count: 1
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/25879914
has answer: http://stackoverflow.com/a/25875147
has answer: http://stackoverflow.com/a/25875244
accepted answer: http://stackoverflow.com/a/25875244
tagged with: forms
has title: Change one value uploaded from a form using jQuery
type: Question
tagged with: javascript
score: -1
tagged with: jquery-validate

http://stackoverflow.com/q/25981489
linked to: http://stackoverflow.com/q/25804730
upvote count: 1
has comment: http://stackoverflow.com/comment/40684515
type: Question
has comment: http://stackoverflow.com/comment/40684344
duplicate of: http://stackoverflow.com/q/25804730
tagged with: ios8
has comment: http://stackoverflow.com/comment/40684159
has comment: http://stackoverflow.com/comment/40684243
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a web page that includes some javascript so that when the user taps the cancel button an app URL is followed and then the page closes itself. It works great on iOS 7, however on iOS 8 the window is no longer closing. Has anyone else seen this or have any ideas around this? Thanks. document.getElementById("cancel").onclick = function (e) { e.stopPropagation(); // Disable the link when it's clicked. document.getElementById("cancel").onclick = function () { return false; }; window.location.href = url.cancel; self.focus(); setTimeout("self.close();",1); return false; }; Tried changing self.close() to window.close() without affect.
has comment: http://stackoverflow.com/comment/40688266
has comment: http://stackoverflow.com/comment/40684224
has title: self.close() no longer functions on iOS 8?
answer count: 0
type: UnansweredQuestion
score: 1

browser
tags question: http://stackoverflow.com/q/25975471
tags question: http://stackoverflow.com/q/26017567
tags question: http://stackoverflow.com/q/25887142
tags question: http://stackoverflow.com/q/25969121
tags question: http://stackoverflow.com/q/26004959
tags question: http://stackoverflow.com/q/26030358
tags question: http://stackoverflow.com/q/25920762
tags question: http://stackoverflow.com/q/25920941
tags question: http://stackoverflow.com/q/26001122
tags question: http://stackoverflow.com/q/25907530
tags question: http://stackoverflow.com/q/25927618
tags question: http://stackoverflow.com/q/25928825
tags question: http://stackoverflow.com/q/25968832
tag name: browser
tags question: http://stackoverflow.com/q/25948674
tags question: http://stackoverflow.com/q/26010090
tags question: http://stackoverflow.com/q/26029024
type: Tag
tags question: http://stackoverflow.com/q/25920561

http://stackoverflow.com/a/25901991
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40541289
has body: The conditional operator is right-associative and the logical operators have higher precedence, so this: return "a" &amp;&amp; "b" ? "c" ? "d" : "e" : "f"; Is equivalent to this: return ( ("a" &amp;&amp; "b") ? ("c" ? "d" : "e") : "f" ); Or in full: if ("a" &amp;&amp; "b") { if ("c") { return "d"; } else { return "e"; } } else { return "f"; } Reference MDN: Operator precedence
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25901945
score: 4
answers question: http://stackoverflow.com/q/25901945

http://stackoverflow.com/q/25920272
has comment: http://stackoverflow.com/comment/40575229
possible better answer: http://stackoverflow.com/a/25922004
has answer: http://stackoverflow.com/a/25922341
has comment: http://stackoverflow.com/comment/40575126
type: AnsweredQuestion
has body: I have a problem where a revealed DIV does not close on the first attempt. The user has to click at least once, anywhere on the page - doesn't have to be the close button, before they can click CLOSE to actually close the DIV. First off though, there is a short lead up before the DIV. I use a jquery mobile popup in my page to contain a single text field and submit button. It looks something like this (minus the layout). The user submits their note through this popup. Submit Cancel When the user hits submit, I perform an ajax response to send the text to the server and upon success follow it up by revealing a hidden DIV as confirmation to the user. I use a DIV instead of another popup since I realized that chaining popups is not possible within my ajax call. // this is called when the user hits submit in the popup $("#submitnote").click(function (e) { e.preventDefault(); // do stuff here to pass textstring $("#popupBasic").hide(); $.ajax({ type: 'POST', data: textstring, url: '/something/addnote', success: function (data) { showConfirm(data); // upon success call the function below to open the DIV } }); $("#AttitionalNoteText").val(""); }); function showConfirm(data) { document.getElementById("confirmMsg").innerHTML = data; $("#confirmBox").show(); } // this is to close that DIV $("#closeConfirmBox").click(function (e) { $("#confirmBox").hide(); }); Here's that simple DIV along with a close button. this message gets replaced with whatever ajax call returned Close It seems that after the popup hides and my DIV comes up, the mouse does not show as a finger pointer until I've click somewhere on the page once. Only then can I use the Close button on the DIV properly. The same happens on mobile, I have to tab somewhere on the screen before I can tap again on Close. What can I do about this?
type: Question
has answer: http://stackoverflow.com/a/25922004
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25922341
has title: Revealed Close button in DIV not responsive on first click (or tap)
has comment: http://stackoverflow.com/comment/40575351

http://stackoverflow.com/q/26014518
has comment: http://stackoverflow.com/comment/40749705
has title: jQuery addClass to multiple elements shows an unexpected delay
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40746690
upvote count: 1
tagged with: javascript
tagged with: jquery
has body: I'm making a flipping counter which is supposed to change color when reaching the target number (1000 in the example). But the thing is the different parts of the counter doesn't change color at the same time, we can clearly see a delay between the tiles that make up the counter... I'm using a simple jQuery addClass to trigger the color change: $("#rhcounter .count").addClass("red"); Any ideas what could be causing that ? Here is the fiddle: http://jsfiddle.net/ka6ke28m/6/ Thanks for your help !
favorite count: 0
accepted answer: http://stackoverflow.com/a/26017738
possible better answer: http://stackoverflow.com/a/26014905
has answer: http://stackoverflow.com/a/26014905
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40745993
tagged with: css
has answer: http://stackoverflow.com/a/26017738
has comment: http://stackoverflow.com/comment/40748387
downvote count: 0
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40743818

http://stackoverflow.com/comment/40516830
type: AnswerComment
comment on: http://stackoverflow.com/a/25888833
type: Comment
has text: Yeah Vaibhav Uncaught TypeError: Object #<Object> has no method 'on' is showing
score: 0

http://stackoverflow.com/comment/40663512
has text: And outcome has to be "xxxyyy"
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25964342
type: QuestionComment

http://stackoverflow.com/comment/40618352
type: QuestionComment
score: 1
has text: any errors in browser console on firefox?
comment on: http://stackoverflow.com/q/25944436
type: Comment

access-control
tag name: access-control
type: Tag
tags question: http://stackoverflow.com/q/26013638

http://stackoverflow.com/a/28234985
downvote count: 0
answers question: http://stackoverflow.com/q/25881041
type: Answer
score: 1
has body: This can be useful 1: If you have more then one template or sometime you are using external template so it can be useful for you inside method you can write reusable code var V = Backbone.View.extend({ el:'body', temp: function (str) { // reusable code return _.template(str); }, render: function () { var data = { lat: -27, lon: 153 }; // calling your view method temp var tmpl = this.temp('&lt;%= lat %&gt; &lt;%= lon %&gt;'); this.$el.html(tmpl(data)); return this; } }); var v = new V(); v.render();
upvote count: 1

http://stackoverflow.com/q/25889468
answer count: 4
has comment: http://stackoverflow.com/comment/40517963
has comment: http://stackoverflow.com/comment/40518022
has comment: http://stackoverflow.com/comment/40517823
has answer: http://stackoverflow.com/a/25889775
has answer: http://stackoverflow.com/a/25889921
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25889842
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/40517759
has comment: http://stackoverflow.com/comment/40518310
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40517882
has answer: http://stackoverflow.com/a/25889689
favorite count: 0
has body: I'm looking for some help with fading hidden div's in. This is what I have so far, but it doesn't seem to want to work, the div just appears with no fade. $("div").hide(); // Show chosen div, and hide all others $("a").click(function (e) { //e.preventDefault(); $("#" + $(this).attr("class")).show().siblings('div').hide(); }); $('.one').click(function(){ $("#one").fadeIn("5000"); }); html One Two Three Four One Two Three Four
has title: Trying to make hidden div fade in on click
type: UnansweredQuestion
tagged with: css

http://stackoverflow.com/q/25995353
has body: I am using HTML 5 object tags to embed PDFs on my pool teams website. On Safari, the PDF automatically fits to the width that I've assigned to the div that the PDF displays in. On Chrome, the PDF size is set to fullsized, so it looks zoomed at first. Here's my code &lt;object data="docs/Pool Schedule.pdf?#view=fitH" type="application/pdf" width="660" height="440"&gt; &lt;param name="view" value="fitH" /&gt; &lt;/object&gt; I have added a parm tag as well as appended ?#view=fitH in attempts to get another default view. Neither seems to do anything . I'm wondering if there's a way default all browsers to the fit width view (screenshot 2). If you want to view the website, it's Kingston8Ball.com note: I realize both photos are with Chrome, but for simplicity I just took the second screenshot with the same browser and the desired view rather than switching browsers.
has comment: http://stackoverflow.com/comment/40788800
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: cross-browser
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26044992
score: 1
has title: choose default view with PDF objects
upvote count: 1
has comment: http://stackoverflow.com/comment/40788935
type: Question
accepted answer: http://stackoverflow.com/a/26044992
has comment: http://stackoverflow.com/comment/40791044
tagged with: javascript
has comment: http://stackoverflow.com/comment/40790933
has comment: http://stackoverflow.com/comment/40789012
has comment: http://stackoverflow.com/comment/40788714
tagged with: http://stackoverflow.com/tag/pdf
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/40755546
has text: Sorry, on the docs page for [Promise.reject](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject#Using_the_static_Promise.reject_method)
comment on: http://stackoverflow.com/q/26020578
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25892437
accepted answer: http://stackoverflow.com/a/25892724
has comment: http://stackoverflow.com/comment/40525259
has comment: http://stackoverflow.com/comment/40523689
has comment: http://stackoverflow.com/comment/40523460
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
has body: Struggling to get my head around the logic/syntax needed here, so hoping someone cleverer than me can help :-) I'm trying to replicate the functionality of the 'Bedrooms' slider shown here: https://www.redrow.co.uk/search?utf8=%E2%9C%93&amp;category=&amp;item_id=&amp;search_type=text&amp;advanced_search=true&amp;term=birmingham&amp;x=0&amp;y=0&amp;distance=20&amp;min-beds=1&amp;price-min=0&amp;price-max=100000000&amp;house_type= You'll see that a search brings back a list of property developments which have various attributes, one of which is the number of bedrooms houses in that development could have, eg. "2, 3 &amp; 4 bedroom homes" or "1, 3 &amp; 4 bedroom homes". In the search filters at the top of the page there is a 'Bedrooms' slider. The maximum value is fixed to 6+ but the minimum value is user selectable. So when the slider handle is on, say '3', that filters down to all developments with properties that have 3 bedrooms or more. The part I'm having trouble with is that a development - as an example shown in the results above, let's say the 'Chestnut Walk' development - has 3 and 4 bedroom properties, but it also has 2 bedroom properties which would be filtered out by placing the slider at '3'. In my JSON object I have an array of available bedrooms for each development, so for example a development with "2, 3 &amp; 4 bedroom homes" would have an array of ['2','3','4']. What I think I need to do is check if any of the values in the array fall within the minimum and maximum number of bedrooms as per the slider - but as a bit of a JS novice I can't for the life of me work out how I would do that efficiently. Can anyone help?!
has comment: http://stackoverflow.com/comment/40523453
tagged with: arrays
has title: Filtering logic in Javascript - looking for range of values in array
tagged with: javascript
has answer: http://stackoverflow.com/a/25892724
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25892637
has answer: http://stackoverflow.com/a/25892637
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40524978
has comment: http://stackoverflow.com/comment/40525678

http://stackoverflow.com/comment/40675241
type: Comment
type: AnswerComment
has text: @PraveenKumar What? Sure they can. Check [here](http://validator.w3.org/check) with the string ` aaa header `.
comment on: http://stackoverflow.com/a/25976634
score: 0

http://stackoverflow.com/q/25906263
type: UnansweredQuestion
has body: Im using MVC on server side and calling a function via jQuery.Ajax sending json type. the function results with exception. i want to invoke/trigger the error result function of the Ajax, what should i send back with the return JSON function? for the example, let's say the return JSON is triggered from the catch section. MVC Function public JsonResult Func() { try { var a = 0; return Json(a, JsonRequestBehavior.AllowGet); } catch (Exception ex) { FxException.CatchAndDump(ex); return Json(" ", JsonRequestBehavior.AllowGet); } } JavasScript call $.ajax({ url: '../Func', type: 'GET', traditional: true, contentType: "application/json; charset=utf-8", dataType: 'json', success: function (data) { alert('s'); }, error: function (data) { alert('e'); } });
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25906551
type: Question
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/6265814
has answer: http://stackoverflow.com/a/25906354
tagged with: ajax
score: 0
has title: jQuery.Ajax Error result
answer count: 3
has answer: http://stackoverflow.com/a/55201982

http://stackoverflow.com/comment/40861260
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25959366
has text: Hi, thanks! I didn't see it before! But its too much code in this case I guess, I get the max lenght error...
type: Comment

http://stackoverflow.com/comment/40624258
comment on: http://stackoverflow.com/a/25943182
score: 1
type: AnswerComment
type: Comment
has text: This is a great alternative, thank you so much. I noticed in the snippet that I could add a span next to the button as well as in the editable div if the selection wasn't in the div. Is there a way to constrain that?

http://stackoverflow.com/q/25974517
has comment: http://stackoverflow.com/comment/40671384
tagged with: http://stackoverflow.com/tag/html
has body: I'm checking a piece of code which purpose is to print a movie list: HTML CODE My new Website Search EVENT HANDLER $('#movieSearchForm').on('submit', function (event) { event.preventDefault(); var movieTitle = $('#movieSearchForm input').val(); requestApi(movieTitle, myApp); }); API VAR var apiUrl = 'http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=j23zuzdpapq9ny3watvc9kja';¬ REQUEST API var requestApi = function (query, callback) { $.ajax({ url: apiUrl, data: { q: query }, dataType: 'jsonp' }).success(callback); } MY APP FUNCTION var myApp = function (response) { var movieListData = response.movies; var movieList = movieListData.map(function (movieItem) { return itemHtml(movieItem.posters.thumbnail, movieItem.title); }); $('#movieList').get(0).innerHTML = [ ' ', movieList.join(''), ' ' ].join(''); }; So, requestApi gets the movie list needed and myApp formats it and inserts it in the web. What I don't understand is how myApp gets response parameter. Any idea? And one question more, if I want that myApp gets two parameters, what should I change?:
has answer: http://stackoverflow.com/a/25974750
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25974683
has answer: http://stackoverflow.com/a/25974683
type: Question
has title: When this function gets this parameter?
accepted answer: http://stackoverflow.com/a/25974750
has comment: http://stackoverflow.com/comment/40671001
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40670963
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40671324
tagged with: ajax
has comment: http://stackoverflow.com/comment/40670900
has comment: http://stackoverflow.com/comment/40670966

http://stackoverflow.com/a/25928096
has comment: http://stackoverflow.com/comment/40588780
has comment: http://stackoverflow.com/comment/40594040
score: 0
answers question: http://stackoverflow.com/q/25927991
type: Answer
has body: Including the same function twice isn't the best of practices. However you could do this; var editor = document.getElementById('editor'), biggerFont = document.getElementById('biggerFontBtn') smallerFont = document.getElementById('smallerFontBtn'); biggerFont.addEventListener('click', increaseFontSize, false); smallerFont.addEventListener('click', decreaseFontSize, false); function getTextSize() { var style = window.getComputedStyle(editor, null).getPropertyValue('font-size'); return parseFloat(style); } function increaseFontSize() { editor.style.fontSize = (getTextSize() + 3) + 'px'; } function decreaseFontSize() { editor.style.fontSize = (getTextSize() - 3) + 'px'; }

http://stackoverflow.com/q/25931119
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40595402
type: UnansweredQuestion
tagged with: gritter
has title: Jquery notification event firing twice
has body: I have just started using gritter notification plugin and experiencing strange behavior. I am displaying the notification on page load and for some reason, the same message is appearing twice. I would be grateful if someone could check my code and highlight any errors that I have overlooked. The link for the plugin is: http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/. Many thanks. UPDATED HTML FROM FIREBUG Close Notification New Message You have 1 new message(s). Please go to the message area in … Close Notification New Message You have 1 new message(s). Please go to the message area in … Messages <?php mysql_select_db($database_domain, $domain); $query1 = "SELECT * FROM messages WHERE to_user = '$_SESSION[kt_name_usr]' AND `read` = 1"; $result1 = mysql_query($query1) or die(mysql_error()); $totalRows1 = mysql_num_rows($result1); if (mysql_num_rows($result1) ==0) { $error1 = true; $message3 = "You have no new messages."; } else { // There was a result // now check if there were any records. if (mysql_num_rows($result1) >0) { $error1 = false; $messages1 = "You have" . " " . "" . $totalRows1 . "" . " " . "new message(s). Please go to the message area in your control panel."; } } if($error1 == 0) { echo "You have" . " " . "" . $totalRows1 . "" . " " . "new message(s). Please go to the message area in your control panel."; echo " \n"; } else { echo 'There are no new system or site messages to display.'; } ?> SOLUTION:
has answer: http://stackoverflow.com/a/50267175
has comment: http://stackoverflow.com/comment/40597904
has answer: http://stackoverflow.com/a/25932704
type: Question

http://stackoverflow.com/comment/40773522
type: Comment
type: QuestionComment
score: 1
has text: @Blessoul Just try it. Maybe it is exactly what you want ;)
comment on: http://stackoverflow.com/q/26030209

http://stackoverflow.com/comment/40557681
has text: Ok, I'm a total beginner but how would i go about developing this?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25910960
type: Comment

http://stackoverflow.com/q/25993315
has comment: http://stackoverflow.com/comment/40721212
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26004033
answer count: 1
has body: I'n using the select2 jQuery plugin with an ajax call to retrieve items for the dropdown list as the user types. Multiple selections (tags) are allowed and custom selections are allowed. When the dropdown list appears, if I use the cursor keys to go to the item I want and hit enter or tab, then the everything works fine. The select2-selecting callback is triggered and the input gets updated with the selection text. If I click on an option with the mouse, however, the select2-selecting callback is not triggered and the input is not updated. The only thing that happens is that the dropdown menu disappears, nothing else. I have another select2 input on the same page that allows only one selection and no custom selections. Clicking dropdown items in that works fine. Example on the plugin site similar to what I'm doing respond to clicks too, so it's not a general bug with the plugin. I am aware that select2 actually has a hidden, completely translucent container div the size of the screen that is added to the DOM whenever a select2 input has focus. The select2 input sits on top of this 'underlay' and everything else is underneath it. When the select2 input looses focus, the 'underlay' disappears. I thought that the problem might be that the underlay had a higher z-index than the input, so when I click a dropdown item I'm actually just clicking the underlay and causing the input to loose focus. Well, the input (9999) does have a higher z-index than the underlay (9998). I just wanted to rule that out.
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: jquery-select2
has comment: http://stackoverflow.com/comment/40720246
type: UnansweredQuestion
has title: jQuery Select2 plugin dropdown not responding to mouse clicks

laravel-3
tag name: laravel-3
type: Tag
tags question: http://stackoverflow.com/q/25990585

http://stackoverflow.com/q/25956136
score: 7
has comment: http://stackoverflow.com/comment/40660264
type: Question
tagged with: screen-resolution
has comment: http://stackoverflow.com/comment/40639719
tagged with: firefox
downvote count: 0
tagged with: javascript
has title: Why android web browser offers screen resolution lower than actual device's screen resolution?
favorite count: 0
has comment: http://stackoverflow.com/comment/40641553
tagged with: android
answer count: 0
type: UnansweredQuestion
has body: I have an android tablet Samsung Galaxy Note 10.1 2014 Edition, which offers the screen resolution of 2560 x 1600 pixels. I've installed Android's FireFox browser on my tablet and when I run a javascript code returning the screen width and height, the result is less actual device's screen resolution (result is: 1280 x 800 pixels) Why it's so? I tested it on other android devices with different screen resolutions, the result is the same. the JavaScript code is here: Width: Height: Thanks in Advance.
tagged with: mobile-browser
upvote count: 7
has comment: http://stackoverflow.com/comment/40681667

http://stackoverflow.com/q/26010477
has title: How to load the json data to html via .js
has comment: http://stackoverflow.com/comment/40737619
has comment: http://stackoverflow.com/comment/40738449
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40737231
has comment: http://stackoverflow.com/comment/40737295
tagged with: angularjs
has body: here i am writing the code for loading the data from json file to .js and from .js to HTML file, but i am successfully able to load the json values to .js but not able to load the same value to html. here is the code please can you help me in it. HTML &lt;ul&gt; &lt;li ng-repeat="friend in friends"&gt; &lt;input type="button" id="button" name="{{friend.name}}" value="{{friend.name}}" onClick="checkBtn(event)"/&gt; {{ friend.name }} &lt;/li&gt; &lt;/ul&gt; .js var app = angular.module( "Demo", [] ); // I control the root of the application. app.controller("AppController",function( $scope ) { $.getJSON("Sample.json", function(json) { alert(json.ColumnName+" "+json.ColumnName.length); $scope.friends =[{name: json.ColumnName}]; }); } ); in this it displaying the values in alert sample.json content { "ColumnName": ["Customer Id", "City", "Region", "Order Quantity", "Order Revenue", "Margin", "Date"], "Type":["dim", "dim", "dim", "meas", "meas", "meas", "dim"] } actually what is happening here is, i need to load the name means the data present in ColumnName to button that too dynamically. but it not loading. even i am not getting any out put in HTML so please can any one guide me where i am going wrong.
has comment: http://stackoverflow.com/comment/40737410
has comment: http://stackoverflow.com/comment/40737589
has answer: http://stackoverflow.com/a/26014570
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/40737446
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26014570

http://stackoverflow.com/q/26003672
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40724733
type: Question
has body: I have this javascipt and html: function flipTXT(rotate) { if (parent_window && !parent_window.closed) { parent_window.document.getElementById("teleprompter") .style.webkitTransform = rotate; } } What it does is allows me to click a button on a popup page and set the text on a parent page to be mirrored . The problem is that it only works once. How would i make it so that when the button is cliked again it sets it to rotateY(0deg). Or make it a toggle.
tagged with: javascript
tagged with: jquery
has title: Turn javascript into toggle
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/26003814
has comment: http://stackoverflow.com/comment/40724681

web-audio-api
tags question: http://stackoverflow.com/q/25955784
tags question: http://stackoverflow.com/q/25960499
tags question: http://stackoverflow.com/q/25908628
tags question: http://stackoverflow.com/q/25977269
type: Tag
tag name: web-audio-api
tags question: http://stackoverflow.com/q/25890875
tags question: http://stackoverflow.com/q/25875972

http://stackoverflow.com/q/25879413
possible better answer: http://stackoverflow.com/a/25879620
has title: jQuery Button Only Works Once
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40500745
has comment: http://stackoverflow.com/comment/40500769
has comment: http://stackoverflow.com/comment/40500865
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25879620
score: 1
has answer: http://stackoverflow.com/a/25879617
has comment: http://stackoverflow.com/comment/40501118
accepted answer: http://stackoverflow.com/a/25879617
upvote count: 1
has comment: http://stackoverflow.com/comment/40500991
has answer: http://stackoverflow.com/a/25879738
type: Question
has comment: http://stackoverflow.com/comment/40501011
tagged with: javascript
has body: My goal was to create a simple button which once clicked would hide/show a navigational menu, and change the footer's padding alternatively, I'd have used toggle() if not for the latter condition. How do I make the button serve both purposes, that is first hide the menu and decrease footer padding, and then upon another click show the menu and increase the padding, and so forth, so that upon clicking the button one effect would occur and upon another click the other? Any help, suggestions, or alternatives, will be much appreciated. function collapseOrCondense(event) { if ($('#block-panels-mini-footer-nice-menu:visible')) { $('#footer').css({ 'padding-bottom': '2.5%' }); $('#block-panels-mini-footer-nice-menu').hide(); } else { $('#footer').css({ 'padding-bottom': '5.5%' }); $('#block-panels-mini-footer-nice-menu').show(); } }; $('#footer').append('&lt;button type=button class=cbutton&gt;*&lt;/button&gt;'); $('#footer .cbutton').css({ 'position': 'absolute', 'left': '1%', 'top': '1%', 'width': '2%', 'height': '1.5%' }); $('#footer .cbutton').on('click', collapseOrCondense);
has comment: http://stackoverflow.com/comment/40500821
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40500935
has comment: http://stackoverflow.com/comment/40500749
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40595888
has text: @DarkMukke yes type should be html as doing console.log(results) in call back function logs the desired response. Issue is even if i do el.append("text") its not getting reflected in div. Is there any specific way through which append operation can be done in xhml?
comment on: http://stackoverflow.com/q/25931714
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25955363
has comment: http://stackoverflow.com/comment/40637867
has comment: http://stackoverflow.com/comment/40637391
has comment: http://stackoverflow.com/comment/40637683
answers question: http://stackoverflow.com/q/25955320
type: Answer
has comment: http://stackoverflow.com/comment/40637853
score: 1
upvote count: 1
has body: You need to pass $controller service alongside with $rootScope: inject(function($rootScope, $controller) { $scope = $rootScope.$new(); ctrl = $controller('TestController', { $scope: $scope }); });
has comment: http://stackoverflow.com/comment/40637761
downvote count: 0

http://stackoverflow.com/comment/40689566
type: Comment
has text: Yup, this should not be marked as duplicate
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25943554

http://stackoverflow.com/comment/40699669
comment on: http://stackoverflow.com/a/25988967
has text: @TheLostMind: the problem is not the missing explanation (I'm actually fine with code-only answers), but that this solution only "works" for the given particular input and isn't going to be helpful for anyone else.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25956101
tagged with: php
has title: Ajax's PHP into while just working once
has comment: http://stackoverflow.com/comment/40691911
has comment: http://stackoverflow.com/comment/40669669
type: UnansweredQuestion
tagged with: mysql
has comment: http://stackoverflow.com/comment/40692481
type: Question
has comment: http://stackoverflow.com/comment/40691969
has comment: http://stackoverflow.com/comment/40692548
has body: The code i'm trying to get to work is part of a price list of products from a db. It works almost all of it but i need one ajax to run multiple times, and it does, it even runs the success sentences but when i check the db its like it just ran once... i hope you can help me. I take 2 values from inputs which are id and amount of the product, and i add them to the list when a button calls the send function, this is that part of the code: function valores(cod, cant) { if (cod != '') { cot.push([cod, cant]); i++; } return cot; } function send () { event.returnValue=false; var id = $('#id').val(); var amount = $('#cant').val(); var total; if ($('#total').length &gt; 0) { total = document.getElementById('total').value; } else { total = 0; } $.ajax({ type: 'POST', data: ({cod : id, cant : amount, tot : total }), url: 'process/agprods.php', success: function(data) { $('#totals').remove(); $('#prodsadded').append(data); valores(id, amount); rs = $(document.getElementById('rs').html); }, error: function () { $('#rs').innerHTML = rs; document.getElementById('note').innerHTML = "Error: The product doesn't exist."; $('#handler-note').click(); } }); } (I translated some words to english that are originaly in spanish and to make it more readable to you) So, the cot[] array keeps the product's id and amount, to use them in the next code, which runs when the list is complete and you hit a save button that calls this function: function ncotiza () { event.returnValue=false; var nlist = $('#codp').val(); var day = $('#days').val(); $.ajax({ async: false, type: 'POST', data: ({listnumber: nlist, days : day}), url: 'process/ncot.php' }); j = 0; while (j &lt;= i) { if (cot[j][0] != 0 &amp;&amp; cot[j][1] != 0) { var num = cot[j][0]; var cant = cot[j][1]; $.ajax({ async: false, type: 'POST', data: ({ listnumber : nlist, prodid: num, amount : cant }), url: 'process/ncotpro.php', success: function () { alert('Success'); } }); cot[j][0] = 0; cot[j][1] = 0; j++; } if (j == i) { window.locatio…
score: 0
has comment: http://stackoverflow.com/comment/40639495
answer count: 1
has answer: http://stackoverflow.com/a/25956499
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40643404
type: Comment
type: QuestionComment
has text: Maybe this could help? https://stackoverflow.com/questions/17318426/cors-cross-domain-ajax-without-jsonp-by-allowing-origin-on-server
score: 1
comment on: http://stackoverflow.com/q/25959434

http://stackoverflow.com/comment/40511963
type: Comment
comment on: http://stackoverflow.com/a/25885844
score: 1
type: AnswerComment
has text: Not worth an answer. Already answered in comments and now cannot be deleted by Akira.

http://stackoverflow.com/q/25973920
tagged with: linegraph
has answer: http://stackoverflow.com/a/50606156
type: Question
has answer: http://stackoverflow.com/a/25976671
tagged with: highcharts
downvote count: 0
tagged with: tooltip
tagged with: javascript
score: 22
has answer: http://stackoverflow.com/a/39577205
upvote count: 22
favorite count: 0
has body: By default highcharts display the line marker symbol in the tooltip. $(function () { $('#container').highcharts({ xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { data: [194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4] }] }); }); http://jsfiddle.net/sashi799/vsyfmu77/ Using tooltip formatter how can we add the line marker symbol? $(function () { $('#container').highcharts({ tooltip: { formatter: function () { return this.x+'&lt;br/&gt;'+this.series.name+': '+this.y; } }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { data: [194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4] }] }); }); http://jsfiddle.net/sashi799/zrhaokrn/ I want to add the circle symbol in front of the series name from formatter like it is in default scenario.
type: UnansweredQuestion
has title: How to display highchart series line marker symbol from tooltip formatter?
answer count: 4
has answer: http://stackoverflow.com/a/29558231

variables
tag name: variables
tags question: http://stackoverflow.com/q/25931810
tags question: http://stackoverflow.com/q/26003739
tags question: http://stackoverflow.com/q/25877003
tags question: http://stackoverflow.com/q/25880543
tags question: http://stackoverflow.com/q/25902432
tags question: http://stackoverflow.com/q/25949711
tags question: http://stackoverflow.com/q/25917425
tags question: http://stackoverflow.com/q/25947244
type: Tag
tags question: http://stackoverflow.com/q/25953190
tags question: http://stackoverflow.com/q/25892765
tags question: http://stackoverflow.com/q/25922594
tags question: http://stackoverflow.com/q/25959294
tags question: http://stackoverflow.com/q/25948053
tags question: http://stackoverflow.com/q/25935624
tags question: http://stackoverflow.com/q/25955061
tags question: http://stackoverflow.com/q/25992162
tags question: http://stackoverflow.com/q/25887035
tags question: http://stackoverflow.com/q/25986222
tags question: http://stackoverflow.com/q/25946758
tags question: http://stackoverflow.com/q/26033438
tags question: http://stackoverflow.com/q/25904543
tags question: http://stackoverflow.com/q/26024346
tags question: http://stackoverflow.com/q/25922903

http://stackoverflow.com/q/25897362
upvote count: 1
tagged with: plugins
downvote count: 1
has body: I want to add ext java script(ext j s) plugin in eclipse.i found o the website that its paid. and how will i add the ext java script(ext j s) plugin in eclipse? I am even not able to find any proper resource on the web as well.
tagged with: eclipse
type: Question
has title: Ext JS Eclipse plugin
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/25898426
score: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25899694
has comment: http://stackoverflow.com/comment/40536900
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/25899760
has answer: http://stackoverflow.com/a/25899753
tagged with: http://stackoverflow.com/tag/html
has body: I know there are a few threads on this topic, and in fact I got my code from one such thread, but I just can't seem to get it to run. I'm trying to compare two input boxes in an HTML form using javascript. Here is my JS: &lt;script&gt; function checkform(form1) { if(form1.password.value != form1.passwordConfirm.value) { alert("Passwords must be the same"); form1.password.focus(); return true; } else {return false;} } &lt;/script&gt; Here is the HTML: &lt;!Doctype html&gt; &lt;script type="C:/wamp/www/Table/" src="javascript.js"&gt;&lt;/script&gt; &lt;form name="form1" action="demo_form.asp"&gt; Username: &lt;input type="text" name="usrname" required oninvalid="this.setCustomValidity('Username cannot be empty.')"&gt; Password: &lt;input type="password" name="password" required oninvalid="this.setCustomValidity('Password cannot be empty')"&gt; Confirm Password: &lt;input type="password" name="passwordConfirm" required oninvalid="this.setCustomValidity('Password cannot be empty')"&gt; &lt;input type="submit" value="Submit" onClick="return checkform(form1);"&gt; &lt;/form&gt; &lt;/html&gt; Any help would be awesome! Thanks Mike
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40536966
tagged with: forms
accepted answer: http://stackoverflow.com/a/25899753
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25899760
answer count: 2
has title: Comparing form input values

http://stackoverflow.com/comment/40655968
type: QuestionComment
type: Comment
has text: Yes, that's very confusing me. I'm not sure it secure if i used my own encryption. It's possible using cookie for parse data to server. But, is it secure to use cookie for send data ?
score: 0
comment on: http://stackoverflow.com/q/25965817

http://stackoverflow.com/q/25883680
has comment: http://stackoverflow.com/comment/40507938
score: 0
has comment: http://stackoverflow.com/comment/40508146
answer count: 1
has answer: http://stackoverflow.com/a/25883917
has comment: http://stackoverflow.com/comment/40507912
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40507893
has comment: http://stackoverflow.com/comment/40507983
has comment: http://stackoverflow.com/comment/40508017
has comment: http://stackoverflow.com/comment/40508044
type: Question
has body: i'm using javascript Date.UTC as below, var dt = new Date(Date.UTC(2014,09,17)) it's giving me result as "Thu Oct 16 17:00:00 PDT 2014" if i change my local time zone to UTC -08:00 Pacific Time.. what could be the reason that its giving date 1 day of from actual date? Note: results are varying according to browser. in FF its giving "NaN undefined NaN" and in IE, Chrome its giving "Thu Oct 16 17:00:00 PDT 2014"
has title: JavaScript Date.UTC giving wrong date in different time zone
has comment: http://stackoverflow.com/comment/40507964
tagged with: javascript

http://stackoverflow.com/a/25927434
has comment: http://stackoverflow.com/comment/40600474
has comment: http://stackoverflow.com/comment/40587642
downvote count: 0
has comment: http://stackoverflow.com/comment/40587656
type: Answer
has comment: http://stackoverflow.com/comment/40587684
has body: I Corrected It this is the answer Try this.... The problem you are facing is this error... Uncaught ReferenceError: handleFiles is not defined So I canged it like this... HTML fileGroup 1 Select File to Upload Cancel fileGroup 1 SCRIPT window.URL = window.URL || window.webkitURL; //BEGIN - fileSelect1 and handleFile var fileSelect = document.getElementById("fileSelect"), fileElem = document.getElementById("fileElem"), fileList = document.getElementById("fileList"); fileSelect.addEventListener("click", function (e) { if (fileElem) { fileElem.click(); } e.preventDefault(); // prevent navigation to "#" }, false); $("#fileElem").change(function() { var files=this.files; if (!files.length) { fileList.innerHTML = " "; } else { $('#fileList').empty().append(); var list = document.createElement("ul"); for (var i = 0; i < files.length; i++) { var li = document.createElement("li"); list.appendChild(li); var info = document.createElement("span"); info.innerHTML = files[i].name + ": " + files[i].size + " bytes"; li.appendChild(info); } fileList.appendChild(list); $("#removeFile1").click(function (event) { event.preventDefault(); $("#fileList").empty(); $("#removeFile1").find('b').html('Cancel'); $('#fileElem').each(function() { $(this).val(); }); document.getElementById("fileElem").value = ""; document.getElementById("fileSelect").value = ""; console.log('#fileList' + 'was deleted'); console.log('#fileElem' + 'was deleted I hope'); // console.log($(this)+'#fileList'.val()); }); } }); $("#fileElem").change(function(){ if (this.val == "" ) { $("#removeFile1").find('b').html('Cancel'); } else { $("#removeFile1").find('b').html('Remove this file'); } }); $(function() { $("input:file").change(function (){ var fileName = $(this).val(); $(".filename").html(fileName); }); }); JSFIDDLE LINK HERE This is the Link for updated JSFIDDLE...
answers question: http://stackoverflow.com/q/25927138
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40587860

http://stackoverflow.com/a/25887450
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40514648
downvote count: 0
score: 1
has body: Your string is perfectly valid as it is, but you must first parse the response text: var response = JSON.parse(data.responseText); alert(response.error.errorMessage);
accepted answer of: http://stackoverflow.com/q/25887097
answers question: http://stackoverflow.com/q/25887097
upvote count: 1

http://stackoverflow.com/a/26008245
score: 0
answers question: http://stackoverflow.com/q/26008108
has body: With all the different suggestions you're getting I though I'd throw in a way using reduce function foo(grades) { return grades.reduce(function (sum, now) {return now &lt; 70 ? sum + 1 : sum;}, 0); } foo([50, 60, 70, 80]); // 2
type: Answer
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/40667520
comment on: http://stackoverflow.com/a/25933184
score: 0
type: Comment
has text: I think GuyT is probably right. The DOM is malformed when the div is in the H5 tag and thus the events are probably not bubbling properly. jQuery does not usually destroy event handlers with it's added functionality.
type: AnswerComment

http://stackoverflow.com/comment/40746759
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26000545
has text: ,Where exactly we can keep the code you suggested in my code.Could you please tell me that if IE wont trigger load event for image ,then how it is able to do it in remaining versions.Should we remove onload event and keep some thing other?

http://stackoverflow.com/comment/40779894
comment on: http://stackoverflow.com/a/26033153
has text: That is what I thought and why I gave you an other Link where some one ask a similar question on stackoverflow :) http://stackoverflow.com/questions/6861033/how-to-catch-the-fatal-error-maximum-execution-time-of-30-seconds-exceeded-in-p they provide a whole lot of possible solutions
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25949831
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/25949894
has comment: http://stackoverflow.com/comment/40626269
tagged with: javascript
upvote count: 2
answer count: 1
has title: How to get width in percentage using jquery
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to get value of the width in percentage using j-Query. I don't want to set value of in j-Query.I had tried width() method and css('width').They both return not return the result in percentage. Html-Code style.css .demo{ width:50%; } jquery Code $(document).ready(function(){ var = $('.demo').css('width');//50px var = $('.demo').width();//50 }); Thanks in advance for help.
tagged with: css
score: 2

http://stackoverflow.com/q/25961181
has comment: http://stackoverflow.com/comment/40647314
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40647196
has comment: http://stackoverflow.com/comment/40646828
has comment: http://stackoverflow.com/comment/40647011
score: 0
has comment: http://stackoverflow.com/comment/40647168
has body: Given an HTML template {{title}} {{location}} {{size}}2 {{bedrooms}} {{bathrooms}} {{price}} View more And a model that fits this template (that is, has all the fields: title, location, price, etc.). I am looking for a way to programmatically bind the template to the model and then push the rendered results to an array. In pseudo-code I am looking to do something like that: var boxes= []; for (var i = 0; i < items.length; i++) { var results = bind(template, items[i]); boxes.push(results); } Where items is an array of items which i got from the database or any other source, and bind is basically the function that is responsible to populate the template with the model. It makes sense to use a directive. Not sure how to do that though. Any idea if and how it can be done using Angular?
type: Question
has comment: http://stackoverflow.com/comment/40647063
has answer: http://stackoverflow.com/a/25966559
tagged with: javascript
has comment: http://stackoverflow.com/comment/40646972
has title: Bind template to a model programmatically using angular JS
has comment: http://stackoverflow.com/comment/40646918
answer count: 1
has comment: http://stackoverflow.com/comment/40647165

http://stackoverflow.com/comment/40682036
score: 0
type: Comment
has text: Thanks!! I needed this plus a few more things to get it to work.
comment on: http://stackoverflow.com/a/25979817
type: AnswerComment

http://stackoverflow.com/q/25950527
tagged with: slice
has body: I have the following array: var arr = ["Toyota", "Hyundai", "Honda", "Mazda"]; I want to slice each element backwards, like: var arr = ["Toyota", "Hyundai", "Honda", "Mazda"].slice(-2); so it will return: arr = ["Toyo", "Hyund", "Hon", "Maz"]; Is it possible? or is there anyway of doing this?
possible better answer: http://stackoverflow.com/a/25950553
type: AnsweredQuestion
tagged with: arrays
has answer: http://stackoverflow.com/a/25950553
tagged with: javascript
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25950654
score: 4
answer count: 2
has comment: http://stackoverflow.com/comment/40627492
has title: Slice each string-valued element of an array in Javascript
downvote count: 1
accepted answer: http://stackoverflow.com/a/25950654
upvote count: 5

http://stackoverflow.com/comment/40571124
type: QuestionComment
has text: http://stackoverflow.com/questions/3249591/how-can-i-display-a-tooltip-on-an-html-option-tag
score: 0
comment on: http://stackoverflow.com/q/25918206
type: Comment

http://stackoverflow.com/q/25944540
has answer: http://stackoverflow.com/a/25955474
type: Question
has comment: http://stackoverflow.com/comment/40618806
has title: Shared Desktop & Web based Javascript REST / Ajax
has body: I am running a node.js back-end with a Web based javascript client to send AJAX requests. Now, I would like to do a small desktop version of the javascript client using pure Javascript, i.e. Google's V8. In this scenario, how could I enable the AJAX support for the desktop version as there are no window / document objects ? In a perfect world in such a way that the Web and Desktop versions would share the same code ? Or would I need to write the AJAX or REST API outside the js code, i.e. as native code and call it from js ?
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40625641
tagged with: ajax
tagged with: rest
has comment: http://stackoverflow.com/comment/40618631
tagged with: node.js
favorite count: 0
score: 2
upvote count: 2
type: UnansweredQuestion

sencha-touch-2.1
tag name: sencha-touch-2.1
tags question: http://stackoverflow.com/q/26016142
type: Tag

http://stackoverflow.com/a/26033658
has comment: http://stackoverflow.com/comment/40793870
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26033592
has body: You can only use .sort method on Array instance, not Object. Your data is store in key/value objects and the order cannot be modified. If you want order your data, you must introduce Array ([]) in it. May you want order the orglist array like that: var o = { "orgs": { "655": { "data": { "cons": 30, "b3ports": 0, "b9": 2, "b1": 25, "b2": 14, "b3": 10, "ports": 0, "rica": 30 }, "depth": 1, "agents": [207072], "orgunit_id": "TEAM00655", "name": "TEAM00655: Jabba - Mooi River (Muhammad Jaffar)" }, "853": { "data": { "cons": 356, "b3ports": 1, "b9": 8, "b1": 283, "b2": 122, "b3": 77, "ports": 1, "rica": 356 }, "depth": 2, "agents": [208162], "orgunit_id": "TEAM00853", "name": "TEAM00853: Jabba - Mooiriver (Bongiwe Gwala)" }, "921": { "data": { "cons": 22, "b3ports": 0, "b9": 2, "b1": 20, "b2": 7, "b3": 5, "ports": 0, "rica": 22 }, "depth": 1, "agents": [210171, 212842], "orgunit_id": "TEAM00921", "name": "TEAM00921: Jabba - Nolwazi Zungu" }, }, "agents": { "207072": { "name": "Bongiwe Gwala", "oid": 655, "depth": 1, "aid": "A0207072", "orgunit_id": "TEAM00655", "data": { "cons": 30, "b3ports": 0, "b9": 2, "b1": 25, "b2": 14, "b3": 10, "ports": 0, "rica": 30 }, "aname": "A0207072: Bongiwe Gwala", "oname": "TEAM00655: Jabba - Mooi River (Muhammad Jaffar)" }, "208162": { "name": "Nkosikhona MADLALA", "oid": 853, "depth": 2, "aid": "A0208162", "orgunit_id": "TEAM00853", "data": { "cons": 356, "b3ports": 1, "b9": 8, "b1": 283, "b2": 122, "b3": 77, "ports": 1, "rica": 356 }, "aname": "A0208162: Nkosikhona MADLALA", "oname": "TEAM00853: Jabba - Mooiriver (Bongiwe Gwala)" }, "212842": { "name": "SANELE KHUMALO", "oid": 921, "depth": 1, "aid": "A0212842", "orgunit_id": "TEAM00921", "data": { "cons": 22, "b3ports": 0, "b9": 2, "b1": 20, "b2": 7, "b3": 5, "ports": 0, "rica": 22 }, "aname": "A0212842: SANELE KHUMALO", "oname": "TEAM00921: Jabba - Nolwazi Zungu" }, }, "orglist": [853, 655, 921] } function sort_data(data, sortby, asc) { console.log(data); if (asc == "asc") { data.orgl…
type: Answer
has comment: http://stackoverflow.com/comment/40797532
answers question: http://stackoverflow.com/q/26033592
has comment: http://stackoverflow.com/comment/40780295
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40801840
has comment: http://stackoverflow.com/comment/40780397
has comment: http://stackoverflow.com/comment/40793192
has comment: http://stackoverflow.com/comment/40794402
type: AcceptedAnswer

http://stackoverflow.com/comment/40641789
type: QuestionComment
has text: @mainguy, I know it but it doesnt get js code:
score: 0
comment on: http://stackoverflow.com/q/25958510
type: Comment

http://stackoverflow.com/q/25948842
tagged with: mongodb
has body: Here's a tough (for me) and wordy one: I'm coming to terms with this whole Mongo denormalization thing. I created a rating system where users rate each others' videos. To get an average score for a video, a number between 0 and 10 is added directly to a score field in the video document (in a collection named "Entries") each time a user "reviews" it (using a meteor.methods upsert). Of course, an entry's average score is the sum of all those ratings divided by the total number of reviews. I keep a record of each review in a separate collection anyway. My problem is ... I don't know how to write this securely. There's really nothing to stop someone from adding a number greater than 10 or less than 0 to the sum (or adding an acceptable number repeatedly). Can you help? Maybe if I said something like "throw an error if the new number you're trying to update the review sum to (in the Entries document) is not equal to the sum of all of the reviews for this entry stored in the reviews collection ... plus your latest score." But if that's correct, how the heck is that written? Here's the shared client/server code: //update reviews Meteor.methods({ reviewUpsert: function(id, doc) { if (!this.userId) { throw new Meteor.Error(403, "You must be logged in to do that."); } if (Meteor.users.findOne(this.userId).emails[0].verified !== true) { throw new Meteor.Error(403, "Your email must be verified to review. Check your email inbox.") } if (Meteor.user().status === "suspended") { throw new Meteor.Error(403, "Cannot perform this action while account is suspended.") } var review = Reviews.findOne(id); if (review &amp;&amp; doc.reviewer !== this.userId) { throw new Meteor.Error(403, "You don't own that review."); } if (doc.reviewer !== this.userId) { throw new Meteor.Error(403, "Cannot create a review for someone else."); // alternatively, just set doc.owner = this.userId } Reviews.upsert(id, doc); } }); //update entry score Meteor.methods({ entryScoreUpdate: function(id, doc) { Entri…
tagged with: javascript
tagged with: denormalization
tagged with: security
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25967927
tagged with: meteor
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25948941
has title: Securing my denormalized Meteor rating system
type: Question

http://stackoverflow.com/comment/40644519
score: 2
comment on: http://stackoverflow.com/q/25960053
has text: try this https://gist.github.com/jlong/2428561
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40649759
type: Comment
score: 1
has text: saveAll will be one hit, that's (one of the reasons) why it's useful
comment on: http://stackoverflow.com/a/25948714
type: AnswerComment

http://stackoverflow.com/comment/40685279
type: Comment
type: QuestionComment
has text: all work if you define all function in `app.js` file, or add reference to `test.js` in `index.html`
score: 1
comment on: http://stackoverflow.com/q/25980570

http://stackoverflow.com/comment/40779661
comment on: http://stackoverflow.com/a/26033325
score: 0
type: AnswerComment
has text: but doing that $(document) does not help, when i used onClick again, it worked.
type: Comment

http://stackoverflow.com/comment/50649786
has text: this is needed because I am having trouble with EJS include right now, a really slippery problem. I am having trouble with EJS on the front-end. 'filename option is required' and 'dirname is not a function'. Frankly, I don't think a library like EJS should be coded for both the front-end and back-end, but that would dash the isomorphic dream wouldn't it. EJS should have a back-end and front-end version.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25956589

http://stackoverflow.com/comment/40748105
has text: Try `$(elem).find(">input[name=appr]:checked").val()` or just `$(elem).find("input:checked").val()`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25991752

http://stackoverflow.com/q/25881026
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40503890
has body: For my directive, I have the following which gets me most of where I need to go, my problem is that ngModelCtrl has an undefined property $name when executing the .toggleFlyout() function. My intention is for it to be given a name so that the directive manages a named model set in the ng-model directive and propagates changes to that named model upwards to scope.$parent: Edit: Plunkr of the attempt here: http://plnkr.co/edit/uD21fH62GLA5THs8ZuPj Toggle Flyout .directive('flyoutToggle', function () { return { require: '^ngModel', restrict: 'A', link: function(scope, element, attrs, ctrl) { var ngModelCtrl = ctrl; scope.toggleFlyout = function () { ngModelCtrl.$modelValue = !ngModelCtrl.$modelValue; scope.$parent[ngModelCtrl.$name] = !ngModelCtrl.$modelValue; } //ui->model element.bind('click', function (e) { scope.toggleFlyout(); }); } } })
score: 0
has comment: http://stackoverflow.com/comment/40503692
has comment: http://stackoverflow.com/comment/40503701
tagged with: angular-directive
has comment: http://stackoverflow.com/comment/40503721
has comment: http://stackoverflow.com/comment/40503955
has comment: http://stackoverflow.com/comment/40503731
has comment: http://stackoverflow.com/comment/40503638
has comment: http://stackoverflow.com/comment/40503941
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40503710
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40503912
has comment: http://stackoverflow.com/comment/40503671
type: Question
has comment: http://stackoverflow.com/comment/40503646
has title: Access ngModel `$name` in custom directive
has comment: http://stackoverflow.com/comment/40503682
has comment: http://stackoverflow.com/comment/40503713

http://stackoverflow.com/comment/40577669
has text: Which of 'if' not work? it is hard to check javascript on iOS device. So you can add try catch block and call alert in catch to detect if there is some js errors.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25921548
score: 0

http://stackoverflow.com/a/25875403
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25874989
has body: You should call the callback of foo from success callback of CQ.form.SlingSubmitAction function foo(dialog, config, callback) { var action = new CQ.form.SlingSubmitAction(dialog.form, { params: config.params, success: function(frm, resp) { callback(); } }); dialog.form.doAction(action); dialog[dialog.closeAction](); }
has comment: http://stackoverflow.com/comment/40497584
score: 2
downvote count: 0

http://stackoverflow.com/q/25933611
type: UnansweredQuestion
has title: IE8 showModalDialog does not set referer in the request header
tagged with: internet-explorer-8
has body: We are writing some javascript to override methods window.open and window.showModalDialog the the referer will be set in the header. if (isIE) { if (!window.__open) { window.__open = window.open; window.open = function (url, name, features) { this.__ESSecurity.alert("my window.open"); var ww = window.__open("", name, features); ww.location.href = url; return ww; }; } if (!window.__showModalDialog) { window.__showModalDialog = window.showModalDialog; window.showModalDialog = function (url, obj, features) { this.__ESSecurity.alert("my window.showModalDialog"); var Hfeatures = this.__ESSecurity.splitFeatures(features); var features = 'left=' + Hfeatures['dialogLeft'] + ',top='+ Hfeatures['dialogTop']; features+= ',width=' + Hfeatures['dialogWidth'] + ',height=' + Hfeatures['dialogHeight']; features+= ',toolbar=no,menubar=no,status=no,resizable=yes,modal=yes'; var ww = window.open(url, "name", features); return ww; }; } } It works fine in FF and IE9 but only in IE8 the method showModalDialog is not passing the referer. Do you have any idea what might be missing?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40598340
score: 0
has comment: http://stackoverflow.com/comment/40598469
tagged with: http-referer
answer count: 0

http://stackoverflow.com/comment/40739669
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26006388
type: Comment
has text: What do you mean by "follows the same path"? Do you simply want to repeat the array? `while(steps.length < 40) { steps.push(a); })`

http://stackoverflow.com/a/26025335
answers question: http://stackoverflow.com/q/26024612
type: AcceptedAnswer
downvote count: 0
has body: To achieve the functionality you are looking for one way is to write a function which returns a function which returns a function as the others mentioned. That works fine if the number of functions is known before hand. Another way is to use a functional programming technique called currying, which is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple of arguments) into evaluating a sequence of functions, each with a single argument (partial application). You can write your own curry function like this: function curry(func, args_) { var self = this; self.args = args_ || []; return function() { var extended_args = [].concat(self.args).concat(Array.slice(arguments)); if(extended_args.length &gt;= func.length) return func.apply(this, extended_args); return new curry(func, extended_args); }; } var funcName = "mikä"; window[funcName] = curry(functionstr1, str2, str3, str4) { alert(funcName + ' ' + str1 + ' ' + str2 + ' ' + str3 + str4); }); window["mikä"]("on")("elämän")("tarkoitus")("?"); Here are some resources which can help you if you are interested in learning more about currying / functional programming in JS. http://kukuruku.co/hub/javascript/an-interesting-task-for-an-interview-currying-and-partial-applicationof-a-function http://tech.pro/tutorial/2011/functional-javascript-part-4-function-currying Reginald Braithwaite's talk in NDC Oslo
has comment: http://stackoverflow.com/comment/40765904
type: Answer
has comment: http://stackoverflow.com/comment/40765615
upvote count: 1
has comment: http://stackoverflow.com/comment/40768720
has comment: http://stackoverflow.com/comment/40768102
score: 1
accepted answer of: http://stackoverflow.com/q/26024612
has comment: http://stackoverflow.com/comment/40766309

http://stackoverflow.com/a/25896800
has body: Do you mean ? var xhr = $.get( /* Your stuf */); // Start your AJAX xhr.abort(); // Abort the query Br
answers question: http://stackoverflow.com/q/25896669
score: 0
type: Answer

http://stackoverflow.com/comment/40629082
score: 0
comment on: http://stackoverflow.com/q/25950964
type: Comment
has text: I dont think there's any issue with the code. It's working in this fiddle: http://jsfiddle.net/u4L193dr/
type: QuestionComment

http://stackoverflow.com/comment/40761525
type: AnswerComment
comment on: http://stackoverflow.com/a/26023052
type: Comment
score: 0
has text: When the $http({method: 'GET' is called ?

http://stackoverflow.com/comment/40854737
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26004607
score: 0
has text: I will ignore this but as an advice: dont be insulting when you want something.

http://stackoverflow.com/a/25930453
has body: The ^ modifier at the start of the expression means "string must start with": /^http:\/\/example\.com\/api/ If you were using a different language which supports alternative delimiters, then it would probably be worth doing since the URL will contain /s in it. This doesn't work in Javascript (h/t T.J. Crowder) but does in languages like PHP (just mentioning it for completeness): #^http://example\.com/api# You could use this in JavaScript, though: new RegExp("^http://example\\.com/api") It's also worth noting that this will match http://example.com/apis-are-for-losers/something, because you're not testing for a / after api - just something to bear in mind. To solve that, you can use an alternation at the end requiring either that you be at the end of the string or that the next character be a /: /^http:\/\/example\.com\/api(?:$|\/)/ new RegExp("^http://example\\.com/api(?:$|/)")
has comment: http://stackoverflow.com/comment/40592903
type: Answer
score: 13
has comment: http://stackoverflow.com/comment/40592962
upvote count: 13
answers question: http://stackoverflow.com/q/25930417
has comment: http://stackoverflow.com/comment/40592927
downvote count: 0

http://stackoverflow.com/q/25977206
has body: I tried to read stdin in node.js with the following code process.stdin.setEncoding("utf8"); process.stdout.setEncoding("utf8"); process.stdin.on('data', function(data) { process.stdout.write('data: ' + data.toString('utf8')); }); When I enter a String like ÜäÖTest it writes data: ???Test What can I do to get the correct letters from the console? Edit: I found out, that the character-code in the buffer shows the letter from the ascii table for instance 129 for the letter "ü". But the same letter in a normal String has the charcode 252 from the ansi table. Now I have to find a way to change the charcodes from these special letters.
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40676105
tagged with: stdin
has comment: http://stackoverflow.com/comment/40680471
has comment: http://stackoverflow.com/comment/40698228
tagged with: node.js
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40676177
has title: node.js read Letters like ä,ö from stdin
has answer: http://stackoverflow.com/a/25994997
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40676202
has comment: http://stackoverflow.com/comment/40679053

http://stackoverflow.com/comment/40825543
has text: You probably should've put a Flask tag into your question; it seems pretty popular on SO. If you put all the relevant info into your questions they're *much* more likely to get a response. I don't know Flask, but I'll throw together some example code that *should* work for you and post it shortly.
comment on: http://stackoverflow.com/q/25967347
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25926890
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40586710
has body: HTML :
accepted answer of: http://stackoverflow.com/q/25926809
answers question: http://stackoverflow.com/q/25926809

http://stackoverflow.com/comment/40642180
type: Comment
type: QuestionComment
has text: did you try `'showBtn': u'表示（指定期間で）'.encode('utf-8')`
score: 0
comment on: http://stackoverflow.com/q/25958703

http://stackoverflow.com/q/25937497
has answer: http://stackoverflow.com/a/25937562
has answer: http://stackoverflow.com/a/25937556
possible better answer: http://stackoverflow.com/a/25937553
has comment: http://stackoverflow.com/comment/40605601
accepted answer: http://stackoverflow.com/a/25937602
has comment: http://stackoverflow.com/comment/40605568
type: Question
has answer: http://stackoverflow.com/a/25937553
tagged with: javascript
tagged with: jquery
has body: I want to set the 'selected' attribute in a select option list with javascript/jquery. I have the select element in a jquery object, I just want to add the "selected" attribute to and item in the list. $(mySelect).html() looks like this; LININGER LAKE MOOREDALE LAKE CARTER LAKE I need to find the "CARTER LAKE" option and add the selected attribute to it so the HTML looks like this LININGER LAKE MOOREDALE LAKE CARTER LAKE I know this can't be that hard, I'm just having a brain fart!
has answer: http://stackoverflow.com/a/25937898
score: 0
has answer: http://stackoverflow.com/a/25937602
has comment: http://stackoverflow.com/comment/40605541
answer count: 5
has title: How to add an attribute to an HTML string
has comment: http://stackoverflow.com/comment/40607665
type: AnsweredQuestion

http://stackoverflow.com/comment/40608077
comment on: http://stackoverflow.com/a/25938206
score: 0
type: AnswerComment
has text: @imcg, can you get my provided jsbin working, I can't make it work, also notice, `tap` event fires when I tap the element, but `keypress` doesn't fire when I press keys, I can't focus on the element I guess.
type: Comment

http://stackoverflow.com/a/25938171
has comment: http://stackoverflow.com/comment/40606863
answers question: http://stackoverflow.com/q/25938118
has comment: http://stackoverflow.com/comment/40607201
has comment: http://stackoverflow.com/comment/40606947
accepted answer of: http://stackoverflow.com/q/25938118
has comment: http://stackoverflow.com/comment/40606980
has comment: http://stackoverflow.com/comment/40606963
has comment: http://stackoverflow.com/comment/40606841
type: AcceptedAnswer
downvote count: 0
has body: You need to effectively search up and down at each level of the hierarchy. $(this).parents().has('.error').first().find('.error'); This will check each parent in turn seeing when one has an error class, return the closest, then find the descendant error. You might also be able to use something like this: $(this).closest(':has(.error)').find('.error'); Here is a JSFiddle showing both working (to stop all the whining): http://jsfiddle.net/u37twowx/1/ :) You will note this solution does not required a class to be added in the hierarchy.
has comment: http://stackoverflow.com/comment/40606921
type: Answer
has comment: http://stackoverflow.com/comment/40607226
has comment: http://stackoverflow.com/comment/40607254
has comment: http://stackoverflow.com/comment/40607013
has comment: http://stackoverflow.com/comment/40606991
has comment: http://stackoverflow.com/comment/40607036
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/40606917

http://stackoverflow.com/a/25938407
score: 0
accepted answer of: http://stackoverflow.com/q/25937063
type: Answer
answers question: http://stackoverflow.com/q/25937063
has body: You could convert your base64 to bytes and use them to create a Blob, from which you can generate an object URL which works differently to a data URL, so you've avoided the size limit of URLs (I've re-factored a bit of your code, this to replace your for loop, I've ignored the rest) function makeDivTemplate() { // helper to simplify loop var div = document.createElementById('div'); div.innerHTML = '&lt;a href="" data-title="" data-lightbox="images"&gt;&lt;img src="" width="100" height="100" style="border: 1px solid; margin: 1px; visibility: hidden" alt=""&gt;'; return div; } function makeLiTemplate() { // helper to simplify loop var li = document.createElement('li'), a = document.createElement('a'), img = document.createElement('img'); a.href = '#'; img.width = '100'; img.height = '100'; img.style.border = '1px solid'; img.style.margin = '1px'; a.appendChild(img); li.appendChild(a); return li; } var results = data.d.results; var innerDivTemplate = makeDivTemplate(); // cloneNode will be faster than fn var liTemplate = makeLiTemplate(); // Add the results to the carousel ul var i, div, e, li, id, subject, blob, src; // var in a loop gets hoisted anyway for (i = 0; i &lt; results.length; i++) { id = results[i].AnnotationId; subject = results[i].Subject; blob = new Blob( // create Blob [base64DecToArr(results[i].DocumentBody)], // base64 to bytes {type: results[i].MimeType} ); src = URL.createObjectURL(blob); // &lt;li&gt; tree li = liTemplate.cloneNode(true); e = li; // &lt;li&gt; e = e.firstChild; // &lt;a&gt; e.addEventListener('click', function () { return false; }); e = e.firstChild; // &lt;img&gt; e.setAttribute('src', src); e.addEventListener('click', function() { $("#img" + id, window.parent.document).trigger('click'); }); carouselul.append(li); // &lt;div&gt; tree div = innerDivTemplate.cloneNode(true); e = div; // &lt;div&gt; e.setAttribute('id', 'div' + id); e = e.firstChild; // &lt;a&gt; e.setAttribute('src', src); e.setAttribute('data-title', subject); e.s…
type: AcceptedAnswer

http://stackoverflow.com/comment/40694410
type: AnswerComment
has text: thanks for the answer @antyrat , but it doesn't make any sense on the result, still am getting the same result
type: Comment
comment on: http://stackoverflow.com/a/25984547
score: 0

http://stackoverflow.com/a/26020469
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40758175
has body: You named your input fields textarea and textfield: &lt;input name="textfield" type="text" id="textfield" size="12"/&gt; &lt;textarea name="textarea" id="textarea" cols="64" rows="5"&gt;&lt;/textarea&gt; But you try to grab the posted data from price and details: $price = mysql_real_escape_string($_POST['price']); $details = mysql_real_escape_string($_POST['details']); Make sure the names you give your input fields are descriptive and accurate, and make sure they are consistent across the client and server. Further, do not use reserved element names for your input fields. In this case, button is the name of an existing reserved html element. submit also can not be used as a name for an element. &lt;input type="submit" name="button" id="button" value="Add Item"/&gt;
upvote count: 1
answers question: http://stackoverflow.com/q/26020211
type: Answer
has comment: http://stackoverflow.com/comment/40758419

http://stackoverflow.com/comment/40512638
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25886323
has text: Maybe offtopic... But it's better to escape the searchquery before putting it in the url. You can do that by `encodeURIComponent($('#json_search').val())` Think what happend if i search for `oh/no/this/is/going/wrong!`
score: 0

http://stackoverflow.com/comment/91216485
comment on: http://stackoverflow.com/q/25989497
type: Comment
type: QuestionComment
score: 0
has text: use html5 `required` attr

http://stackoverflow.com/comment/40710111
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25996046
has text: What is your expected output?
type: Comment

http://stackoverflow.com/q/25911269
type: Question
tagged with: asp-classic
tagged with: javascript
tagged with: ajax
upvote count: 1
has body: An AJAX call using the script below is failing on IE 11. It works on earlier versions of IE - 6 definitely (this is old code), 7, 8, and 9 suspected. It works on Firefox 32.0.1, and probably as far back as 2 (this is very old code). The script errors at objXML = req.responseXML.documentElement; with the error "Unable to get property 'documentElement' of undefined or null reference.". On debugging, req.responseXML is null, while req.responseText has the expected XML. Searching for this problem, the solutions centre around the response type not being 'text/xml', but the debugger shows that the response type is the correct 'text/xml'. Why is req.responseXML null? var req; function loadXMLDoc(url) { // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = processReqChange; req.open("GET", url, true); req.send(null); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processReqChange; req.open("GET", url, true); req.send(); }; }; }; function processReqChange() { // only if req shows "complete" if (req.readyState == 4) { // only if "OK" if (req.status == 200) { // ...processing statements go here... //alert(req.responseText); objXML = req.responseXML.documentElement; // snip... using response data... } else { alert("There was a problem retrieving the XML data:\n\n" + req.statusText); alert(req.status + "\n\n" + req.responseText); }; }; };
answer count: 1
accepted answer: http://stackoverflow.com/a/25911270
favorite count: 0
has title: AJAX: responseXML is null in IE 11
has answer: http://stackoverflow.com/a/25911270
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/40757637
type: Comment
type: QuestionComment
has text: `java2.js` appears to depend on a library, such a [jQuery](http://jquery.com/). The HTML will need to include this dependency as well.
comment on: http://stackoverflow.com/q/26021887
score: 1

http://stackoverflow.com/a/25899825
upvote count: 4
has comment: http://stackoverflow.com/comment/40537105
downvote count: 0
has comment: http://stackoverflow.com/comment/40537058
has comment: http://stackoverflow.com/comment/40537085
has body: You can do this: $("li:not(.menu)").whatever(); That's not the fastest way necessarily; it may be faster to do this: $("li").filter(function() { return !$(this).hasClass("menu"); }).whatever() edit if you want to operate on &lt;li&gt; elements that have no class, then just check the .className property: $("li").filter(function() { return !$(this).prop("className"); }).whatever() However, I would suggest that that's not a good coding pattern. It's fragile because it relies on any future changes to your page for purposes completely unrelated to what you're doing now not involving the addition of a class. You'd be better off explicitly checking for specific classes that you're not interested in. Like, maybe 3 months from now, somebody decides that all the list items that are about penguins be made black and white. You then add the class "penguin" to all those &lt;li&gt; elements. If you don't remember this change you're making now, all of a sudden that functionality will be broken.
type: Answer
answers question: http://stackoverflow.com/q/25899805
has comment: http://stackoverflow.com/comment/40537150
score: 4

http://stackoverflow.com/q/25967655
accepted answer: http://stackoverflow.com/a/26022272
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40668963
has body: In the code below, in _copyChild and innerModelRetrieved functions print on console 4 features one by one, but in next function onInnerModelRetrieved 4 times last feature value is printed, I am not able to figure it why its happening like that. please help me with this. Ext.define('CustomApp', { extend: 'Rally.app.App', componentCls: 'app', _newObj : {}, childrens: [], _type : null, launch: function() { Ext.create('Rally.ui.dialog.ChooserDialog', { width: 450, autoScroll: true, height: 525, title: 'Select to Copy', pageSize: 100, closable: false, selectionButtonText: 'Copy', artifactTypes: ['PortfolioItem/Feature','PortfolioItem/MMF','PortfolioItem/Epic', 'PortfolioItem/Program'], autoShow: true, storeConfig:{ fetch: ['Name','PortfolioItemTypeName'] }, listeners: { artifactChosen: function(selectedRecord) { childrens = []; this._type = selectedRecord.get('PortfolioItemTypeName'); this._newObj = selectedRecord; this.onqModelRetrieved(); var self = this; Ext.create('Rally.data.wsapi.Store', { model: 'PortfolioItem/' + selectedRecord.get('PortfolioItemTypeName'), fetch: ['Name', 'FormattedID', 'Children'], pageSize: 1, autoLoad: true, listeners: { load: function(store, records) { final_features = []; Ext.Array.each(records, function(child){ var item = selectedRecord; childrens = item.getCollection('Children'); childrens.load({ fetch: ['FormattedID'], callback: function(records, operation, success){ Ext.Array.each(records, function(portfolioitem){ if (portfolioitem.get('PortfolioItemTypeName') == "Feature") { self._childObj = portfolioitem; self._copyChild(); } }, self); }, scope: this }); }, self); } } }); }, scope: this }, }); }, // Inner Copy functions _copyChild: function() { console.log("child value here", that._childObj); this.innerModelRetrieved(); }, innerModelRetrieved: function() { var that = this console.log("next child value here", that._childObj); that._type = 'PortfolioItem/' + that._childObj.get('PortfolioItemTypeName'); Rally.data.ModelFactory.getModel({…
has comment: http://stackoverflow.com/comment/40668838
has answer: http://stackoverflow.com/a/26022272
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40671436
answer count: 1
tagged with: rally
tagged with: javascript
favorite count: 0
has title: Last record value is displayed, not all values are looped
tagged with: extjs
tagged with: extjs4

http://stackoverflow.com/comment/40579233
has text: Where is your click event? Why can't you call `getQueryVariable` during the click event? Have you tried to add it when you bind the click event? When is `getQueryVariable` called?
comment on: http://stackoverflow.com/q/25922594
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25949259
type: UnansweredQuestion
downvote count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/40625529
has answer: http://stackoverflow.com/a/25949571
has answer: http://stackoverflow.com/a/25949365
has answer: http://stackoverflow.com/a/25949504
has comment: http://stackoverflow.com/comment/40625372
type: Question
has answer: http://stackoverflow.com/a/25949316
upvote count: 0
score: -2
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25949294
has answer: http://stackoverflow.com/a/25949327
favorite count: 0
has comment: http://stackoverflow.com/comment/40625438
has body: So, What I have done is I have an empty array. $text['test'] = array(); echo json_encode($text) If I json_encode it. The result is {"test":[]} If I use this in javascript, it is treated as array. If there is some values in the array $text['test'] = array('1' =&gt;'abc'); echo json_encode($text); The output is {"test":{"1":"abc"}} And this is treated as an object in javascript. How to do that in both the case I recieve an object not array or vice versa?? The values in array($text['test'] ) is dynamic.
has comment: http://stackoverflow.com/comment/40625416
has title: json_encode an empty array used in javascript gives an empty array but if json_enode is done on array with some values, it gives object?

http://stackoverflow.com/comment/40642764
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25954933
has text: I did but still stay the same.

http://stackoverflow.com/q/25899669
favorite count: 0
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40549206
linked to: http://stackoverflow.com/q/4570093
has answer: http://stackoverflow.com/a/26007214
has title: Firefox page-mod extension not running after first subpage until page reload
tagged with: firefox
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26007214
type: Question
tagged with: firefox-addon
type: AnsweredQuestion
has body: I'm trying to write my first extension with Firefox Addon SDK - current code is just testing what is possible (just to clarify). Problematic part seems to be extension not working after first load of the page and moving beetween subpages. Page loads fully, extension "kicks in" and modifies page as supposed to (on site.com/directory for example), but after moving to subpage (site.com/directory/all) extension no longer works. If I do CTRL + R and refresh page, site loads again and extension works even on that subpage. main.js // Import the page-mod API var pageMod = require("sdk/page-mod"); // Import the self API var self = require("sdk/self"); // Create a page mod pageMod.PageMod({ include: "*", contentScriptFile: [self.data.url("jquery-2.1.1.min.js"), self.data.url("script.js")] }); script.js $(".directory_header").css('border', '#500 solid 10px'); Include is set like this just for testing purposes. Site script is supossed to work on twitch.tv and their /directory subpage. Currently looking for directory_header class and setting border around it, however after moving to directory/all border will not load again until the page is reloaded fully. Is there a reason for this behaviour? What Ive tried I tried to use attachTo: ["top", "frame", "existing"] which from first look seemed like it could help, but it did not. Similar with contentScriptWhen: 'start' again, with no result.
score: 1
tagged with: firefox-addon-sdk

http://stackoverflow.com/q/25970071
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25970099
score: 8
downvote count: 0
type: UnansweredQuestion
has title: how to perform some action before submit form via .ajaxForm()?
tagged with: ajaxform
has answer: http://stackoverflow.com/a/25970125
has body: i am using ajaxForm() frame work to send my data without reloading my page. $('#ReplayForm').ajaxForm({ success : function(data){ alert("Success"); } }); now, i want to check some condition before submitting the form and if the condition is false then stop submission else continue. is there any solution to do this work or is there any way buy which i can perform this operation. Thanks in advance.
has answer: http://stackoverflow.com/a/25970149
upvote count: 8
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25911753
has body: var $div = $(" outside of sample inside of sample "); $div.find(".sample").remove(); alert($div.html()); demo: http://jsfiddle.net/3p0zsa8h/
answers question: http://stackoverflow.com/q/25911632
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40631511
type: Comment
comment on: http://stackoverflow.com/q/25952726
has text: Also, I think you are referring JavaScript not Java.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40720566
type: Comment
comment on: http://stackoverflow.com/a/26000522
score: 0
type: AnswerComment
has text: I added and now returns array, though it is not sorted right for some reason.

http://stackoverflow.com/comment/40722955
has text: @caeth Disabling popups doesn't disable `alert()`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26002748

http://stackoverflow.com/comment/40762885
type: Comment
type: QuestionComment
has text: You need to learn basic PHP. `+` is mathematical addition. `string + string` will give you something totally unexpected. Try `.` instead, which is the concatenation operator
score: 0
comment on: http://stackoverflow.com/q/26024541

http://stackoverflow.com/a/47769317
answers question: http://stackoverflow.com/q/25936657
type: Answer
has body: you can do something like this, create two boolean values in parent controller and then condition pass of function into directive by them. for example: parent controller: $scope.triggerAdd = false; $scope.triggerRmove = true; parent html:
score: 0

wamp
tag name: wamp
tags question: http://stackoverflow.com/q/25980905
type: Tag

http://stackoverflow.com/comment/40511399
has text: When somebody finds it hard to jump to kill himself, is it appropriate to just push him ? No, I downvoted because you're making a big bug from a small bug.
type: AnswerComment
comment on: http://stackoverflow.com/a/25885640
score: 0
type: Comment

http://stackoverflow.com/a/75170539
type: Answer
answers question: http://stackoverflow.com/q/25975700
downvote count: 0
score: 1
has body: In HTML, the accesskey attribute allows to define a single letter, and leave handling the modifier keys to the browser and the operating system, to avoid conflicts. + This is great in theory, but in practice there are some accessibility concerns. The ARIA standard also has a lengthy section on considerations for keyboard shortcuts. I still would go with this, as it’s the best option we currently have. You wouldn’t want to handle platform conventions in your code. You can even retrieve the key combination the browser finally assigned by using the accessKeyLabel attribute, but browser support is not great. button.title += ` [${button.accessKeyLabel || button.accessKey}]`; If you are using single character shortcuts, you need to provide a mechanism to change these shortcuts, should they interfere with other AT shortcuts: Understanding Success Criterion 2.1.4: Character Key Shortcuts
upvote count: 1

http://stackoverflow.com/q/25925613
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25925662
type: Question
has answer: http://stackoverflow.com/a/25925662
tagged with: javascript
has body: I've been trying to make a program that automatically writes two-column algebraic and geometric proofs. I'm sure this has already been done, but I want to do it anyway. I am somewhat inexperienced with HTML and JavaScript (I've mainly been trying to learn from online resources) and I'm having trouble getting a variable to print. Here's the code that I've written so far, I want "x" to be the user input of what is "given" in the desired problem. I will later have the program check if the format of the input is valid and also make the table expand by one for each step that it decides it needs to take to get closer to the statement that it is trying to prove. Insert Given: Insert Statement to Prove: Submit Step Number Step Explaination 1 <var="x"> Given Anything you all have on how to get this to work (preferably without extremely altering the format or switching programming languages) would be awesome, and any tips you guys have for the rest of my project would be great too. I apologize if this is a newbie question.
has title: Getting a Variable Set in JavaScript and then Calling/Printing it in an HTML Table
upvote count: 1
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25931796
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25931476
downvote count: 0
has body: To further explain what @Bhushan and @abc123 are saying, the way to have this scoped properly is to ensure that the context is correct. Give this a try: myelements.mouseenter(function() { var that = this; // Store the correct context in a variable. clearTimeout(globaltimeoutvar); globaltimeoutvar = setTimeout(function() { var index = myelements.index(that); // Scoped correctly to the myelements object. var wrongIndex = myelements.index(this); // Scoped to the window object via setTimeout. console.log(index); // Correct value. }, 150); });
score: 1

http://stackoverflow.com/comment/40612808
comment on: http://stackoverflow.com/q/25940895
has text: Sadly no. There might be parts, where the white space is comming some other chars earlier. See between string 1 and string 2. By the way it's a stupid pattern described by the html5 spec...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25997183
has comment: http://stackoverflow.com/comment/40712291
possible better answer: http://stackoverflow.com/a/25997321
favorite count: 0
has answer: http://stackoverflow.com/a/25997321
has comment: http://stackoverflow.com/comment/40715975
has body: I would like to hide td if input value is 0 but I can't get it to work? http://jsfiddle.net/zxpsd8x6/1/ Hide Show
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25997407
has comment: http://stackoverflow.com/comment/40712217
type: Question
upvote count: 2
tagged with: html-table
has answer: http://stackoverflow.com/a/25997407
has comment: http://stackoverflow.com/comment/40716741
has title: Hide with jquery based on input value
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25997645
score: 0
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/40712429

http://stackoverflow.com/q/25954108
has answer: http://stackoverflow.com/a/25954153
tagged with: pointers
has title: Javascript: Modify an object from a pointer
possible better answer: http://stackoverflow.com/a/25954175
score: 0
has comment: http://stackoverflow.com/comment/40634264
accepted answer: http://stackoverflow.com/a/25954153
tagged with: object
type: AnsweredQuestion
has body: I'm making a digital library with three classes: Library, Shelf &amp; Book. Shelves have their contents as an array of books. Books have two methods, enshelf and unshelf. When a book gets unshelfed it's supposed to set delete the instance of itself from the shelf it's on and then set it's location property to null. How can I modify the shelf it's sitting on? In the constructor if I change this.location, it will just give that property a new value instead of modifying the variable it points to. I feel like this is really simple and I'm overlooking something super basic. var _ = require('lodash'); //books var oldMan = new Book("Old Man and the Sea", "Ernest Hemingway", 0684801221); var grapes = new Book("The Grapes of Wrath", "John Steinbeck", 0241952476); var diamondAge = new Book("The Diamond Age", "Neal Stephenson", 0324249248); //shelves var shelf0 = new Shelf(0); var shelf1 = new Shelf(1); //libraries var myLibrary = new Library([shelf0, shelf1], "123 Fake Street"); //these need to accept an unlimited amount of each function Library(shelves, address) { this.shelves = shelves; //shelves is an array this.address = address; this.getAllBooks = function() { console.log("Here are all the books in the library: "); for (var i = 0; i &lt; this.shelves.length; i++) { console.log("Shelf number " + i + ": "); for (var j = 0; j &lt; this.shelves[i].contents.length; j++) { console.log(this.shelves[i].contents[j].name); } } } } function Shelf(id) { this.id = id; this.contents = []; } function Book(name, author, isbn) { this.name = name; this.author = author; this.isbn = isbn; this.location = null; this.enshelf = function(newLocation) { this.location = newLocation; newLocation.contents.push(this); } this.unshelf = function() { _.without(this.location, this.name); //this doesn't work this.location = null; } } console.log("Welcome to Digital Library 0.1!"); oldMan.enshelf(shelf1); myLibrary.getAllBooks(); oldMan.unshelf(); myLibrary.getAllBooks();
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25954175
tagged with: javascript

http://stackoverflow.com/comment/40557246
has text: Additionally: is it true, that a will only be manipulated, if IsObject returns true?
type: Comment
comment on: http://stackoverflow.com/q/25910480
score: 0
type: QuestionComment

http://stackoverflow.com/q/25946905
answer count: 1
has comment: http://stackoverflow.com/comment/40621865
has body: I have some Javascript which uploads a file in slices to azure storage blob, using PutBlock then when all blocks uploaded a PutBlockList request is called to put it all together. This works perfectly, till I have more than 22 slices. Does anyone know the maximum amount of blocks allowed? Seems to cap it at 22? By the way I am using the Azure Storage Emulator.
type: UnansweredQuestion
tagged with: azure
has comment: http://stackoverflow.com/comment/40621738
tagged with: azure-storage
type: Question
has comment: http://stackoverflow.com/comment/40625619
tagged with: azure-blob-storage
has answer: http://stackoverflow.com/a/25946946
tagged with: javascript
has title: Azure PutBlock max blocks
score: 0

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/25882662
tags question: http://stackoverflow.com/q/26003255
tags question: http://stackoverflow.com/q/25979429
tags question: http://stackoverflow.com/q/26021789
tags question: http://stackoverflow.com/q/25910242

http://stackoverflow.com/q/25906384
accepted answer: http://stackoverflow.com/a/25906490
has answer: http://stackoverflow.com/a/25906598
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: reload page when item selected in - HTML
tagged with: shtml
has answer: http://stackoverflow.com/a/25906516
upvote count: 2
has answer: http://stackoverflow.com/a/25906490
possible better answer: http://stackoverflow.com/a/25906516
downvote count: 1
type: AnsweredQuestion
has body: I have a small issue regarding the use of a &lt;select&gt;&lt;/select&gt; I receive data from a server with an request. For this request I used shtml. Now what I want is that when an user selects an item in de selectbox the page gets the data of that item from the server. An request to the server can look like this %! tcp-connections So what I think i have to do is an page refresh with JavaScript or something like that. Can someone tell me how I can do this?
score: 1
type: Question

http://stackoverflow.com/comment/102542958
type: QuestionComment
has text: Who marked this as duplicate? The questions are completely different.
comment on: http://stackoverflow.com/q/25947040
score: 0
type: Comment

http://stackoverflow.com/q/25978131
has comment: http://stackoverflow.com/comment/40681337
has body: I try to replace two parts of a string in a lot of pages on page load. In this case, I would like to replace: with another one. Tried to use but that did not work. It needs to be done on page load. Anybody an idea? Thank you! Edit: What I try to do, is to split a Youtube embed in a div. The part before the unique Youtube id needs to be replaced and the part after the id needs to be replaced. The complete link is something like: The part before the xxxxxxxx and the part after the xxxxxxxx need to be changed on load to a more complete code including div's and classes. Thank you!
has comment: http://stackoverflow.com/comment/40678657
has comment: http://stackoverflow.com/comment/40680647
tagged with: http://stackoverflow.com/tag/html
has title: Change 2 strings on load with javascript
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40685024
tagged with: replace
score: 0
has comment: http://stackoverflow.com/comment/40677962
tagged with: string

http://stackoverflow.com/a/26016260
has body: This is exactly the situation why you want to use isolated scopes for your directives. app.directive('formOne', function() { return { scope: true, restrict: 'E', template: "&lt;form name='formOne'&gt;&lt;input type='text' ng-model='myValue'&gt;{{myValue}}&lt;/form&gt;" }; }); Fixed demo: http://plnkr.co/edit/IZWZhwtfclZKMnnNNFA9?p=preview
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40759627
answers question: http://stackoverflow.com/q/26015844

http://stackoverflow.com/q/25949680
has body: I have created a div into my page which i wanted to get load after 5 seconds the page get load. Then I wanted to refresh the div without refreshing the page after every 1 min. How can I achieve this functionality with the use of J query. My code look like this $(document).ready( function () { setInterval(function() { $('#newsletter').show(); }, 100000); }); This upper block of code is only refreshing the div after 1 min. But on page load , i want the div to be shown to the user after 5 seconds and then this block of code should executed.
has answer: http://stackoverflow.com/a/25949729
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25949786
has answer: http://stackoverflow.com/a/25949707
type: Question
has comment: http://stackoverflow.com/comment/40631579
has answer: http://stackoverflow.com/a/25949723
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40626084
score: 0
has title: show div after 5 seconds and then refresh the div every 1 min
has comment: http://stackoverflow.com/comment/40626052
tagged with: http://stackoverflow.com/tag/html
answer count: 4

http://stackoverflow.com/q/25948323
tagged with: javascript
has answer: http://stackoverflow.com/a/25948415
score: 0
has body: I have to load an Iframe with a web page. I can load the web page successfully. I provide the src to iframe by applying the value to a constant from my javascript code in controller. Now I have to pass a session and username along with the url. How can I do that ? In my controller, I have. $scope.URL = Constants.URL().myurl; and in HTML, I have
answer count: 1
has title: Iframe with session
type: UnansweredQuestion
tagged with: iframe
type: Question

http://stackoverflow.com/comment/40513130
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/25423938/ajax-show-mysql-content-once/25424004#25424004
comment on: http://stackoverflow.com/q/25886389
score: 0

http://stackoverflow.com/a/25902401
accepted answer of: http://stackoverflow.com/q/25902185
answers question: http://stackoverflow.com/q/25902185
upvote count: 2
type: AcceptedAnswer
has body: This is a classic case of not following what I consider to be the AngularJS Golden Rule: Whenever you want to set a property on the scope, either via ng-model or inside an expression, always make sure you have a . (dot/period) in the expression. Because what is happening in your case is that the ng-repeat is creating a new scope for every item in the array. When you then have ng-click="signUp = !signUp", this creates a brand new signUp property on the scope for that item, rather than modifying the signUp property on the scope further up (via the prototype of the scope object). This is because whenever you set a property on a JS object, it sets it on the current object, even if the property is present on the prototype. Instead, try changing it to use an intermediate object on the top level scope to hold the signUp property, so you refer to it as flags.signUp for example. This means that Angular looks up the value of flags first in the child scope, and finds the object on the parent scope via the prototype. Then it can set the signUp flag on the correct object, rather than on the child scope. Does that all make sense?
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/26634136
type: Answer
score: 2
upvote count: 3
downvote count: 1
answers question: http://stackoverflow.com/q/25994478
has comment: http://stackoverflow.com/comment/53310404
has comment: http://stackoverflow.com/comment/53398374
has body: In my opinion I think this dispatcher is somehow an anti-pattern. In distributed architectures based on event sourcing OR CQRS, autonomous components do not have to depend on each others as they share a same event log. It's not because you are on the same host (the browser/mobile device) that you can't apply these concepts. However having autonomous stores (no store dependencies) means that 2 stores on the same browser will probably have duplicate data as the same data may be needed by 2 different stores. This is a cost to pay but I think in the long term it has benefits as it removes the store dependencies. This means that you can refactor one store entirely without any impact on components that do not use that store. In my case, I use such a pattern and create some kind of autonomous widgets. An autonomous widget is: A store that listen to an event stream A component A LESS file (maybe useless now because of React Styles?) The advantage of this is that if there is a bug on a given widget, the bug almost never involve any other file than the 3 mentionned above ;) The drawback is that stores that host the same data must also maintain it. On some events, many stores may have to do the same action on their local data. I think this approach scales better to larger projects. See my insights here: Om but in javascript

http://stackoverflow.com/comment/40747991
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26016703
type: Comment
has text: I am surprised, why its "-1", we are here to learn, we know lot genius here, but give a chance to learn new things.

http://stackoverflow.com/a/25923395
answers question: http://stackoverflow.com/q/25923202
score: 0
type: Answer
has body: You could also change the icon with css by adding the .open class to the .collapse-group and using the following styles: .collapse-group.open .icon:after { content: "+"; } This way you have the ability to create other css selectors for the opened header and content section. you could also check out this simple "pure jQuery" accordion: http://thecodeplayer.com/walkthrough/vertical-accordion-menu-using-jquery-css3

http://stackoverflow.com/a/25893088
answers question: http://stackoverflow.com/q/25891671
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
has body: Put the files in array files: [{ expand: true, cwd: 'less/', src: ['*.less'], dest: 'css/', ext: '.css' }]
accepted answer of: http://stackoverflow.com/q/25891671
score: 1

http://stackoverflow.com/comment/40554204
score: 0
has text: You may simply not be able to see the map on your canvas. See http://stackoverflow.com/questions/14492284/center-a-map-in-d3-given-a-geojson-object
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25905671

http://stackoverflow.com/a/26769801
answers question: http://stackoverflow.com/q/25914628
type: Answer
score: 0
has body: Have a look at This fiddle. It's a lot easier to label things with classes to denote their function, and makes for much more re-usable code. So for example: .menu { /* my menu class */ } .menu-item { /* a class for items in a menu */ } .submenu { /* a class marking a submenu */ } Then you can have your javascript code operate on those classes, rather than having to have convoluted code that follows hierarchies. $(document).ready(function () { $(".menu &gt; .menu-item").addClass("block-vertical-center"); //Vertically center any blocks we are supposed to $(".block-vertical-center").wrapInner('&lt;span class="table-span"&gt;&lt;span class="table-cell-span"&gt;&lt;/span&gt;&lt;/span&gt;'); //Hide all the sub menus to start with $(".submenu").hide(); $("#leftmenu .menu &gt; .menu-item").on("click",function(e) { var submenu = $(e.target).find(".submenu"); var isVisible = submenu.is(":visible"); //Hide all the sub menus so we don't have multiples open $("#leftmenu .submenu").slideUp("fast"); if (submenu.length &gt; 0){ if (!isVisible){ submenu.slideDown("fast"); } e.stopPropagation(); } }); }); Also, for your vertical-alignment problem: Don't use line-height to vertically-align the contents of a block item. If your text goes to more than one line, it has issues. Instead, you can define a marker class (I often use "block-vertical-center" or something like that) do something like this: span.table-span { padding:0; margin:0; border:0; vertical-align:middle; display:inline-table; height:100%; width:100%; } span.table-cell-span { padding:0; margin:0; border:0; vertical-align:middle; display:table-cell; height:100%; width:100%; } And then in your javascript, you can do: $(".block-vertical-center").wrapInner('&lt;span class="table-span"&gt;&lt;span class="table-cell-span"&gt;&lt;/span&gt;&lt;/span&gt;'); And then you simply define any block whose contents should be vertically centered that "block-vertical-center" class. What this does, is wrap the contents of your block in an inl…

http://stackoverflow.com/a/26004758
has comment: http://stackoverflow.com/comment/40759828
accepted answer of: http://stackoverflow.com/q/26004519
score: 36
has body: Adding the data event listener to process.stdin add a reference to it that keeps the process open. That reference stays in place even after removing all event listeners. What you can do is manually unref() it in your callback, like so: console.log('Press Enter to allow process to terminate') process.stdin.once('data', callback) function callback (data) { console.log('Process can terminate now') process.stdin.unref() } Also, as a general debugging tool for stuff like this, there are two (undocumented) functions that you can call to get a list of things keeping your process open: process._getActiveHandles() process._getActiveRequests() See this pull request in the node project for background. Update: You asked about attaching event listeners after you've unref()'d process.stdin. Here's a quick example showing that the listener does attach itself and function: console.log('Press Enter to allow process to terminate') process.stdin.once('data', callback) function callback (data) { console.log('Unreferencing stdin. Exiting in 5 seconds.') process.stdin.unref() process.stdin.once('data', function(data) { console.log('More data') }) setTimeout(function() { console.log('Timeout, Exiting.') }, 5000); } With that code, if you press another key before the setTimeout fires (5 seconds), then you'll see More data output to the console. Once the setTimeout's callback fires, the process will exit. The trick is that setTimeout is creating a timer which the process also keeps a reference too. Since the process still has a reference to something, it won't exit right away. Once the timer fires, the reference it released and the process exits. This also shows that references are added (and removed) to things that need them automatically (the timer created by setTimeout in this case).
has comment: http://stackoverflow.com/comment/40760172
type: Answer
has comment: http://stackoverflow.com/comment/40759921
has comment: http://stackoverflow.com/comment/40892223
has comment: http://stackoverflow.com/comment/40759308
answers question: http://stackoverflow.com/q/26004519
has comment: http://stackoverflow.com/comment/40759471
has comment: http://stackoverflow.com/comment/40758768
has comment: http://stackoverflow.com/comment/40740654
has comment: http://stackoverflow.com/comment/62190154
has comment: http://stackoverflow.com/comment/53880507
has comment: http://stackoverflow.com/comment/40880302
has comment: http://stackoverflow.com/comment/71328005
upvote count: 36
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25972338
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/25977097
has comment: http://stackoverflow.com/comment/40667138
has title: Web page reloads when modifying html table after AJAX Query
linked to: http://stackoverflow.com/q/8982341
has comment: http://stackoverflow.com/comment/40667182
tagged with: mysql
has comment: http://stackoverflow.com/comment/40667737
type: Question
has comment: http://stackoverflow.com/comment/40667364
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/40667158
has answer: http://stackoverflow.com/a/25977498
tagged with: javascript
tagged with: jquery
has body: Here is the thing. I'm making a webpage that shows a table whose data comes from an SQL Table. The way that I load the table is by adding this just before the end tag: And my header is this: Vista principal Now the function that is called is in js_index.js and here is the code: function fillTaskTable(){ var form = { task_header:"task_table_header", task_body: "task_table_body", proyect_list: "proyect_box" }; var search = document.getElementById("search_box").value; var proyect = document.getElementById("proyect_box").value; var status = document.getElementById("status_box").value; var msgid = "msg_cont"; console.log("STATUS: " + status); jQuery.ajax({ type: "POST", url: 'db_access/get_proyect_and_task_data.php', dataType: 'json', data: {functionname: 'get_allowed_tasks', args: [search, proyect, status]}, success: function (obj) { if (obj.error != ""){ postMessage(obj.error,true,msgid); } else{ //Se llena la lista de proyectos var html = " "; for (i = 0; i < obj.plist.length; i++){ html = html + " " + obj.plist[i] + " "; } document.getElementById(form.proyect_list).innerHTML = html; //Se llena la tabla dependiendo de si se pueden ver las tareas de todos los usuarios o no. if (obj.rights.view_all){ //Se llena el header. var col_titles = ["Tarea","Usuario","Proyecto","Inicio","Actualización","Estado","%"]; var header = " "; for (i = 0; i < col_titles.length; i++){ header = header + " " + col_titles[i] + " "; } header = header + " "; document.getElementById(form.task_header).innerHTML = header; //Se llena el resto de la tabla. var table = ""; var color = ""; for (i = 0; i < obj.list.length; i++){ table = table + " "; table = table + " " + obj.list[i].name + " "; table = table + " " + obj.list[i].user + " "; table = table + " " + obj.list[i].proyect + " "; table = table + " " + obj.list[i].start_date + " "; table = table + " " + obj.list[i].update_date + " "; if (obj.list[i].status == "Finalizada"){ color = "finalizado"; } else if (obj.list[i].status == "Pendiente"){ col…
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40667570
score: -1

http://stackoverflow.com/q/26002703
has answer: http://stackoverflow.com/a/26003256
type: Question
has answer: http://stackoverflow.com/a/26003082
tagged with: javascript
has comment: http://stackoverflow.com/comment/40722953
score: 0
has body: I've some code to hide the mouse after 2 seconds of no movements: var justHidden = false; var j; function hideMouse() { $(document).mousemove(function() { if (!justHidden) { justHidden = false; clearTimeout(j); $('html').css({cursor: 'default'}); j = setTimeout(hide, 1000); } }); } function hide() { $('html').css({cursor: 'none'}); justHidden = true; setTimeout(function() { justHidden = false; }, 500); } The code works perfectly fine, however, it doesn't cancel the mouse "presence", so if I hover on an element and it gets highlighted and stop moving for 2 seconds while still on the element, the hover highlight is still taking effect. Is there any way I can also remove the mouse "presence" so the element will remove it's hover state?
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/26003256
has title: removing mouse presence after hiding it
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26003082
has comment: http://stackoverflow.com/comment/40723504
has comment: http://stackoverflow.com/comment/40723381

http://stackoverflow.com/a/26028423
answers question: http://stackoverflow.com/q/26028310
type: Answer
upvote count: 1
score: 1
has body: It's pathname with the n lowercased. Also, request.url does not contain the fully qualified URL, it only contains the requested URL that the client sends.
accepted answer of: http://stackoverflow.com/q/26028310
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25981259
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: flow-js
score: 1
has title: Passing a flag indicating all the chunks in a file are complete in ng-flow
type: Question
tagged with: javascript
has body: I am new to flow and I am trying to figure out if there is way we can send a flag to indicate all the chunks in a given file are complete. This is my html Select File Upload This is my app.js function filesCtrl($scope) { $scope.uploader = {}; $scope.config = { target: 'api/check/Upload', permanentErrors: [404, 500, 501], maxChunkRetries: 1, chunkRetryInterval: 5000, simultaneousUploads: 4, singleFile: true, headers: { id: 5, source: 'flow_header' } } $scope.upload = function () { $scope.config = { query: { flowChunkComplete: $scope.uploader.flow.files[0].isComplete() }, } $scope.uploader.flow.upload(); } } But query never gets populated with isComplete(), is there a way we can achieve this?
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/40559031
type: Comment
comment on: http://stackoverflow.com/q/25898540
score: 0
type: QuestionComment
has text: Please provide a fiddle/demo, when I use your code I see 2 maps, and the center is synchronized(with a offset)

http://stackoverflow.com/comment/40708177
type: QuestionComment
comment on: http://stackoverflow.com/q/25994258
has text: 1 + 2 = 7 ?? :))))))
score: 0
type: Comment

http://stackoverflow.com/comment/40759512
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26019875
has text: possible duplicate of [With CSS, use "..." for overflowed block of multi-lines](http://stackoverflow.com/questions/6222616/with-css-use-for-overflowed-block-of-multi-lines)

http://stackoverflow.com/q/26028447
tagged with: http://stackoverflow.com/tag/json
has body: I am having an issue with JSNlog and Nlog with formatting Exceptions coming from JSNlog. I am writing all my error logs out as JSON but when I throw an exception from javascript the system is encoding the %message property as JSON as well causing the outer JSON to be invalid. My configuration for the Nlog.config file for this appender is: layout='{"Enviroment":"${aspnet-application:variable=Enviroment}","CreatedOn": "${longdate:universalTime=true}", "WindowsIdentity":"${aspnet-user-identity:jsonEncode=true}","Application":"${AppName}", "Level":"${level}", ${message}}' /&gt; My configuration for the web.config for JSNlog is: serverSideMessageFormat="&amp;quot;UserAgent&amp;quot;: &amp;quot;%userAgent&amp;quot;, &amp;quot;SessionId&amp;quot;: &amp;quot;%requestId&amp;quot;, &amp;quot;URL&amp;quot;:&amp;quot;%url&amp;quot;, &amp;quot;UserAddress&amp;quot;: &amp;quot;%userHostAddress&amp;quot;, &amp;quot;Message&amp;quot;: &amp;quot;%message&amp;quot;" When I run with this configuration it works for all normal fatal/error/warn/info/debug/trace calls but it fails with invalid JSON on any fatalException calls with the following JSON: {"Enviroment":"Dev", "CreatedOn": "2014-09-24 23:58:42.1734", "WindowsIdentity":"XXXr","Application":"LoggingTest", "Level":"Fatal", "UserAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36", "SessionId": "befn1iy4mlxqowppwepf104z", "URL":"/LoggingTest/jsnlog.logger", "UserAddress": "10.247.224.202", "Message": "{"stack":"TypeError: undefined is not a function\n at Log (http://zue-v-86a32393.vpc-am.aws.shell-cloud.com/LoggingTest/:58:16)\n at HTMLInputElement.onclick (http:/XXXX/LoggingTest/:66:141)","message":"undefined is not a function","name":"TypeError","logData":"JS Fatal Exception"}"} I have tried removing the quotes around the message and it then works fine for fatalException calls but fails to be valid JSON for any other logging calls as it is missing the quotes. Does…
has title: Issue with JSNlog Exception formatting
tagged with: jsnlog
tagged with: nlog
answer count: 1
has answer: http://stackoverflow.com/a/26070820
tagged with: javascript
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26070820
type: Question
tagged with: c#

http://stackoverflow.com/q/25958431
tagged with: image
has comment: http://stackoverflow.com/comment/40642121
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have a field and a container for an image. In this container there is a default image. I want the user to put a link of an image and then submit it, this then adds the image to the src attribute of the default image. My question, how should I load image, and during this time show a progress bar to the user, and after loading finishes, hide the URL. My main concern now is how to load the resource. Now I have written this script: jQuery("#logo-file-upload").on("click", function(){ // when user clicks the submit button $("#url-logo-progress").show(); // show the progress bar to it var logoUrl = $("#logo-url").val(); // pick up the inserted URL $("#image-width").attr("src", logoUrl); // and put the URL into the src attribute of the image }); Though I need something like this: $.imageLoad({ url : "url/to/image.jpg", complete : function(){ alert("upload finished!"); }); I have no problem to writen callbacks and status's, but I don't know how to load a resource. Thanks in advance
has answer: http://stackoverflow.com/a/25958712
type: UnansweredQuestion
has title: Javascript loading an image
score: 0
type: Question
has comment: http://stackoverflow.com/comment/40641733
linked to: http://stackoverflow.com/q/10863658
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40491818
type: QuestionComment
has text: use regex with replace
comment on: http://stackoverflow.com/q/25874632
type: Comment
score: 0

http://stackoverflow.com/q/26013446
has comment: http://stackoverflow.com/comment/40849993
type: Question
linked to: http://stackoverflow.com/q/168214
has comment: http://stackoverflow.com/comment/40745723
has answer: http://stackoverflow.com/a/26072362
tagged with: javascript
has comment: http://stackoverflow.com/comment/40742267
has comment: http://stackoverflow.com/comment/40746737
has comment: http://stackoverflow.com/comment/40784608
score: 0
has title: Pass PHP variable to JavaScript thru the DOM works, but can't pass that same variable back from JS to PHP
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40743083
has comment: http://stackoverflow.com/comment/40742045
has comment: http://stackoverflow.com/comment/40743113
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23740548
tagged with: php
has comment: http://stackoverflow.com/comment/40830855
has comment: http://stackoverflow.com/comment/40784732
has body: UPDATE: problem solved... see answer below Summary: I'm having trouble passing a variable from one PHP routine to JavaScript and then passing that same variable from JavaScript to a different PHP routine. JavaScript gets the variable from the first PHP routine and can work with it in JavaScript, but it doesn't seem to have it when I try to send it to a second PHP routine. Checking both before and after sending to the second PHP routine show that JS has the variable, but the PHP routine just gets null. Details: I want to pass a variable from PHP to JavaScript, do some stuff in JavaScript, then pass from JavaScript to PHP a new variable and the original PHP variable. In other words: Pass PHP variable --> JavaScript JavaScript does stuff and gets a resulting variable Pass JavaScript variable and PHP variable (from step 1) --> PHP I pass the PHP variable to JavaScript by echoing the data into the page and use JavaScript to pull it from the DOM, an idea I found in the second suggestion in this great StackOverflow answer about passing variables from PHP to Javascript. Here's the code I'm using for this. There's no problem with it, it works great (or at least seems to?!). &lt;style&gt; #rp {display: none;} &lt;/style&gt; &lt;div id="rp"&gt; &lt;?php $output = "php variable being passed to JavaScript"; echo htmlspecialchars($output); ?&gt; &lt;/div&gt; &lt;script&gt; function getMyData(){ var div = document.getElementById("rp"); var myData = div.textContent; return myData;} &lt;/script&gt; The problem is that when I try to use JavaScript to pass the variable back to PHP, it's not there. I can use it in JavaScript, do things with it, print it, play with it, whatever I want... but it's not there if I try to send it back to PHP. The code I use to pass it back: &lt;script language="JavaScript" type="text/javascript"&gt; var PHPVar = getMyData(); //function that gets PHP data from DOM var jsResultVar = getJSVar(); //function that does JS stuff and returns a result var hr; if (wi…

http://stackoverflow.com/q/26015497
type: AnsweredQuestion
has body: I already know how to -> resize an image: var image = document.getElementById('myImage'), canvas = document.createElement('canvas'), ctx = canvas.getContext('2d'); ctx.drawImage(image,0,0,400,300); -> or crop an image: var image = document.getElementById('myImage'), canvas = document.createElement('canvas'), ctx = canvas.getContext('2d'); ctx.drawImage(image,50,50,image.width,image.height,0,0,50,50); But I don't know how to resize then crop an image. How could I do this? Thank you.
linked to: http://stackoverflow.com/q/75062108
has answer: http://stackoverflow.com/a/74458050
upvote count: 49
has answer: http://stackoverflow.com/a/26015533
possible better answer: http://stackoverflow.com/a/54699157
type: Question
has answer: http://stackoverflow.com/a/54699157
tagged with: javascript
score: 48
has title: How to resize then crop an image with canvas
has answer: http://stackoverflow.com/a/78304580
tagged with: html5-canvas
accepted answer: http://stackoverflow.com/a/26015533
has answer: http://stackoverflow.com/a/63011005
favorite count: 0
answer count: 5
downvote count: 1

http://stackoverflow.com/a/25949220
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25948668
has body: Element.trigger() is jQuery. You should be looking into dispatchEvent (most browsers) and fireEvent (IE). Or as suggested you can start using jQuery and use trigger.

http://stackoverflow.com/a/25877291
accepted answer of: http://stackoverflow.com/q/25877090
has comment: http://stackoverflow.com/comment/40500463
type: Answer
has comment: http://stackoverflow.com/comment/40498258
has comment: http://stackoverflow.com/comment/40498840
has comment: http://stackoverflow.com/comment/40500365
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40500335
has body: You can combine regex and the .filter() function to achieve what you want. Basically we run the background-image property retrieved using the .css() method, and check if they match the pattern. If they do, we return the list of elements (which you can manipulate later): In the example below, I want the background-image to match the pattern /http:\/\/placehold\.it/gi (i.e. matching http://placehold.it and as a global and case-insensitive match), and if they do, I slide them up. Of course you should use your own pattern here and chain alternative downstream jQuery methods, I am using it as a proof-of-concept :) $('div').filter(function() { return $(this).css('background-image').match(/http:\/\/placehold\.it/gi); }).slideUp(); It works for both background images being specified through CSS, or through inline style attribute. See demo here: http://jsfiddle.net/teddyrised/nmw9a4hk/2/ OP asked if it is possible to define the regexp outside of the filter function separately. Yes, it is possible: var pattern = new RegExp("http:\/\/placehold\.it", "gi"); $('div').filter(function() { return $(this).css('background-image').match(pattern); }).slideUp(); See updated demo here: http://jsfiddle.net/teddyrised/nmw9a4hk/12/
has comment: http://stackoverflow.com/comment/40500293
has comment: http://stackoverflow.com/comment/40498384
upvote count: 2
answers question: http://stackoverflow.com/q/25877090
type: AcceptedAnswer

http://stackoverflow.com/q/26019892
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40755149
has title: The most perplexing jquery issue i've ever run into
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40753979
favorite count: 0
has comment: http://stackoverflow.com/comment/40753955
has comment: http://stackoverflow.com/comment/40755273
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40755246
has answer: http://stackoverflow.com/a/26020768
has comment: http://stackoverflow.com/comment/40754178
has answer: http://stackoverflow.com/a/26020423
has comment: http://stackoverflow.com/comment/40754123
tagged with: wordpress
has comment: http://stackoverflow.com/comment/40754035
type: Question
has comment: http://stackoverflow.com/comment/40754135
has comment: http://stackoverflow.com/comment/40755236
has comment: http://stackoverflow.com/comment/40754081
has answer: http://stackoverflow.com/a/26020130
has body: This very simple function to calculate the scroll of the page works just fine on jsfiddle, but I can't get it working on my page. http://jsfiddle.net/SnJXQ/2/ The function is thus:- jQuery(document).ready(function($) { $(window).scroll(function() { var scrollPercent = 100 * $(window).scrollTop() / ($(document).height() - $(window).height()); $('.bar-long').css('width', scrollPercent +"%" ); }); }); Simple, right? Thing is, it never applies the css to the bar-long class div on my local environment, just strange. So I thought it might be an issue with window scroll function, so I done this:- jQuery(document).ready(function($) { // Inside of this function, $() will work as an alias for jQuery() // and other libraries also using $ will not be accessible under this shortcut $(window).scroll(function() { var scrollPercent = 100 * $(window).scrollTop() / ($(document).height() - $(window).height()); $('.bar-long').css('width', scrollPercent +"%" ); }); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll &gt;= 100) { $("body").addClass("scrolled"); } else { $("body").removeClass("scrolled"); } }); }); Second function to test that I wasn't making an utterly stupid mistake, I wasn't, second function works just fine. I'm running WordPress with their bundled version of jQuery1.11.1, hence the noconflict jQuery qualifier. I even went as far as to paste in my entire css to jsfiddle along with a copy/pasta of my sites html, worked just fine. I've disabled other scripts on the site, no conflict with those, no errors in console. Just confused, really confused. EDIT:- After some console logging; console.log($(window).height()); console.log($(document).height()); console.log ($(document).height() - $(window).height()); = 5541 5541 0 So it thinks the window height and the document height are the same, which they are not. Hrmm.
has comment: http://stackoverflow.com/comment/40754086
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40754113
has comment: http://stackoverflow.com/comment/40755221
has comment: http://stackoverflow.com/comment/40754284

http://stackoverflow.com/comment/40551471
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25907798
has text: can i position the gridline as a background using css????????
type: Comment

http://stackoverflow.com/comment/40572366
score: 0
type: Comment
has text: Hi @Bergi, yes, I updated my answer for this. The point is that cache[guid] is far more performant than looping through the data.
type: QuestionComment
comment on: http://stackoverflow.com/q/25917921

http://stackoverflow.com/a/25949253
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25949236
has body: clearInterval() takes an identifier returned by setInterval() function. &lt;script&gt; var i = 0; var refreshId; var refreshFunction = function() { $('#count').text(i); i++; if (i &gt; 10) { clearInterval(refreshId); } }; $(document).ready(function() { refreshId = setInterval(refreshFunction, 500); }); &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/40625415
accepted answer of: http://stackoverflow.com/q/25949236
score: 5
upvote count: 5

http://stackoverflow.com/comment/40609582
score: 0
has text: Thanks for the response, I have been trying to pass a date value to the controller, but the call itself is not happening.
type: Comment
comment on: http://stackoverflow.com/q/25930460
type: QuestionComment

http://stackoverflow.com/comment/40762113
type: AnswerComment
has text: Please add the PHP code which comes after the ajax call (posting the json) and the PHP code before trying to ajax the JSON. Something is wrong short before or after the database interaction.
type: Comment
comment on: http://stackoverflow.com/a/26020347
score: 0

http://stackoverflow.com/comment/40784991
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61890/discussion-between-mark-and-balexandre).
comment on: http://stackoverflow.com/a/26024313
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40741953
comment on: http://stackoverflow.com/q/25993183
type: Comment
type: QuestionComment
has text: They are on an Array. But I'm trying to doing that, but it's not working. Do you have any ideia how to start writing it?
score: 0

http://stackoverflow.com/q/25913124
has title: Marionette ItemView not emitting "change" events
tagged with: coffeescript
type: Question
has body: The Problem I'm following a tutorial on how to make single page apps using Marionette/Backbone and currently it's describing how to pass around information about the current user. The current user is stored in a variable connected to the global App and is currently being rendered as part of the footer template. The problem is that when the current user is updated the corresponding ItemView is not also updated. On application start the current user is turned into a valid Backbone model (using information from data bootstrapped using gon) and renders correctly in the footer. However, when the full_name attribute is updated from the console (using Demo.currentUser.set({full_name: "John Smith"}) ) there is no change in the footer. What I've tried I believe I've correctly implemented linking the change event to the render function, as described in the tutorial and here. I've tried also updating the model to a different user in case the set method doesn't fire the change event, but that also had no effect. Additionally, I did try implementing some logging, as below, to detect whether the change event was being fired or not and it appears not to be fired. I've searched for people answering similar problems, however, some of the questions appear to refer to problems like ItemViews in CollectionViews or more complicated events being fired. I've also looked at the Marionette and Backbone docs to try and find out what exactly triggers the change event, but was unable to find out. Therefore, I'm now a bit stuck. Any help on this problem would be hugely appreciated. Code The FooterApp Show controller (I've also exposed the currentUser variable and checked whether the model is being updated correctly and it is): @Demo.module "FooterApp.Show", (Show, App, Backbone, Marionette, $, _) -> Show.Controller = showFooter: -> currentUser = Backbone.Radio.request "global", "get:current:user" footerView = @getFooterView currentUser App.footerRegion.show footerView getFooterView: (currentUse…
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40608733
has comment: http://stackoverflow.com/comment/40594067
score: 0
has answer: http://stackoverflow.com/a/25953214
tagged with: marionette
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25955019
type: UnansweredQuestion

http://stackoverflow.com/comment/40563696
comment on: http://stackoverflow.com/q/25914534
score: 0
type: Comment
has text: First you need to define "visitor" and "first time." Conditionally showing output is the easy part, and that can come later. How do you currently identify your visitors? Do they log in or authenticate in any way? If you don't currently identify them, how do you want to identify them? By a login? By a cookie in the browser? By client IP address? Some other means?
type: QuestionComment

http://stackoverflow.com/q/25914687
type: Question
score: 3
has body: I have a set of unorganized points on a Leaflet map that, in my implementation, represent nodes of territory on a map from my Minecraft server (viewable at: http://loka.minecraftarium.com/map). Currently, my implementation only takes the points and uses leaflet to draw a circle around the point to roughly indicate area of control. This is, however, somewhat ugly and not representational of the desired end result which is to draw a polygon region from edge points given a set of data. Because of the unorganized nature of the points, however, I have no easy way to declare 'edge points' on these points as they will stem from an original source (town center) and out as players expand their territory. My question: is there a way given a set of these points to iterate them to automatically determine edge points and some sort of order in order to then feed Leaflet polygon positions and draw a polygon region representing control rather than just a bunch of points with intersecting circles drawn around them. I've seen some stuff about shoelace formula, but i'm unsure if/how that works in regards to having points 'inside' what would be the area. Below is the current result: Desired Result (without the circles inside of course) Many thanks in advance!
tagged with: leaflet
has answer: http://stackoverflow.com/a/49582218
tagged with: polygon
has comment: http://stackoverflow.com/comment/40564291
answer count: 1
tagged with: minecraft
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 3
type: UnansweredQuestion
has title: Given random coordinate points, construct a polygon of determined edge points

http://stackoverflow.com/q/25961760
tagged with: api
answer count: 1
has answer: http://stackoverflow.com/a/25964801
type: UnansweredQuestion
tagged with: wmode
tagged with: youtube-api
has body: So here is the deal i want that the button comes first so the client can skip video to see website... // create youtube player var player; function onYouTubePlayerAPIReady() { player = new YT.Player('player', { height: '100%', width: '100%', videoId: 'fJaHtTJ_wkc', playerVars: { controls: 0, showinfo: 0 , modestbranding: 1, wmode: "opaque" }, http://jsfiddle.net/7Gznb/880/ Can some1 help me pls?
type: Question
has comment: http://stackoverflow.com/comment/40686196
tagged with: javascript
has title: Make a button appears in front of video youtube embed api
tagged with: z-index
score: 0
has comment: http://stackoverflow.com/comment/40651530

http://stackoverflow.com/comment/40765327
comment on: http://stackoverflow.com/q/26021814
has text: I would expect that as well. Do you have any other css associated with the `myContent` element?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40650265
type: AnswerComment
type: Comment
has text: I came up with a workaround that seems to do it. Added it to the original question. Thanks for trying to help me!
score: 0
comment on: http://stackoverflow.com/a/25962792

http://stackoverflow.com/comment/40737111
score: 0
has text: thank you.i have solved my problem changing socket.io to ws.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25969775

http://stackoverflow.com/q/26006055
has title: time-picker in bootstrap modal dialog
has comment: http://stackoverflow.com/comment/40735714
has answer: http://stackoverflow.com/a/26051226
answer count: 6
upvote count: 2
has answer: http://stackoverflow.com/a/36802167
has comment: http://stackoverflow.com/comment/40752508
has comment: http://stackoverflow.com/comment/40751808
has answer: http://stackoverflow.com/a/46188775
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40751776
favorite count: 0
has answer: http://stackoverflow.com/a/36633696
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40730200
possible better answer: http://stackoverflow.com/a/37027137
has answer: http://stackoverflow.com/a/37027137
downvote count: 0
tagged with: twitter-bootstrap
has body: I am trying to implement a time-picker in a boostrap modal dialog. However when I open the dialog the time-picker still looks like a normal text field which makes me believe that this jquery code is not running: $('#timepicker1').timepicker(); // shown below However I am able to get the time-picker to display using very similar code on a normal webpage. The problem seems specific to displaying it in a modal dialog. Here is a link to the time-picker that I am using: http://jdewit.github.io/bootstrap-timepicker/ Here is my modal dialog: close New Event Close Save changes Here is my script that is suppose to initialize the time-picker $( document ).ready(function() { //$('#table').editableTableWidget(); $( "#btn-new-event" ).click(function() { $('#dialog').modal('show'); $('#timepicker1').timepicker(); // not running properly }); }); Any help would be greatly appreciated!
has comment: http://stackoverflow.com/comment/40730166
type: Question
has answer: http://stackoverflow.com/a/26011448
accepted answer: http://stackoverflow.com/a/26011448
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25886389
has comment: http://stackoverflow.com/comment/40512826
has comment: http://stackoverflow.com/comment/40513142
linked to: http://stackoverflow.com/q/25423938
has comment: http://stackoverflow.com/comment/40513302
score: 0
has comment: http://stackoverflow.com/comment/40513130
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40513200
has comment: http://stackoverflow.com/comment/40513411
has comment: http://stackoverflow.com/comment/40512690
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40513155
has body: Good day all, I'm trying to make a game with jquery where a space-ship will be shooting bullets. All are working fine except when it fires multiple bullets performance gets slower. I understand that it is the problem of jquery .append() because I used it to generate bullets when spacebar is pressed. But I can't figure it out how to solve this. These are the codes for bullet generating and animation, function generateBullet(objectid, bulletid, bulletclass, left, top) { var objectID = $('#' + objectid); var bulletID = bulletid; var bulletClass = bulletclass; var adjust_left = left; var adjust_top = top; var objectLeft = objectID.offset().left - adjust_left; var objectTop = objectID.offset().top - adjust_top; var appendingValue = "&lt;div class="+bulletClass+" id="+bulletID+" style='left: "+objectLeft+"; top: "+objectTop+";'&gt;&lt;/div&gt;"; $("#content").append(appendingValue); } function animateBullet(bulletid) { var bulletID = $("." + bulletid); bulletID.each(function() { var nowTop = $(this).offset().top; $(this).css("top", nowTop - 55); }); } If there is any other way to generate bullets then please let me know. Again your help will be much appreciated. Tnx!
answer count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40517985
type: Question
has title: Appending same div multiple times without reducing performance
has comment: http://stackoverflow.com/comment/40514742
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40513178

http://stackoverflow.com/q/25948156
tagged with: php
answer count: 0
type: Question
has body: Currently I'm learning Server Sent Events. Everything is fine if I make a simple HTML application. But when I turn into AngularJS, the problem appears. Server Sent Events is not continually called in Firefox. It works only once. This problem doesn't happen in Chrome and Opera. Is this some issues regarding AngularJS performance in Firefox? Or is there anything wrong with my code? Any answer would be very appreciated! Thanks.. :) Index.php No. Id Name Level Hapus {{$index + 1}}. {{x.Name}} {{x.Level}} Hapus sse.php <?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); require_once 'koneksi.php'; if (isset($_GET['id'])) { $id = $_GET['id']; $query = "SELECT * FROM `admin` WHERE id='" . $id . "'"; } else { $query = "SELECT * FROM `admin`"; } $stmnt = $dbh->prepare($query); $stmnt->execute(); $output = "["; while ($row = $stmnt->fetch()) { if ($output != "[") { $output .= ","; } $output .= '{"Id":"' . $row["id"] . '",'; $output .= '"Name":"' . $row["name"] . '",'; $output .= '"Level":"' . $row["level"] . '"}'; } $output .= "]"; echo 'data: ' . ($output) . "\n\n"; ob_flush(); flush(); sleep(1); ?>
tagged with: firefox
tagged with: javascript
has comment: http://stackoverflow.com/comment/40623732
has comment: http://stackoverflow.com/comment/40623727
score: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Server Sent Events In Firefox Not Working With AngularJS

http://stackoverflow.com/comment/40727973
has text: It's hard to imagine circumstances under which you might need an array of Deferred objects.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25996400

http://stackoverflow.com/comment/40615056
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25917738
has text: "Zombie views" are views that are still bound to something (and thus alive) when you think they're dead. Usually there's a leftover reference to the view from a `model.on` call or similar. Basically a specific form of memory leak.

http://stackoverflow.com/comment/40584095
type: QuestionComment
has text: @SomeKittensUx2666 I think what Leo was trying to say is that the Stale element error is actually a sign that the page was refreshed. You may rely on it.
comment on: http://stackoverflow.com/q/25922666
score: 0
type: Comment

http://stackoverflow.com/q/26001486
type: Question
has answer: http://stackoverflow.com/a/26002064
tagged with: javascript
has body: I had a button that rotated text along the Y axis , giving it a mirrored look. This no longer works for some reason because the button has been placed on the child (popup) and the text to be mirrored is on the parent. Is there a javascript function i could use to rotate the text on the parent when a button is clicked / rotate it back when its clicked again. (preferably a toggle switch) This is what I originally had when it was only one the parent page: HTML link : &lt;li&gt;&lt;a class="button small icon-text-height flipx" href="#" onclick="return false;"&gt;&lt;/a&gt;&lt;/li&gt; The CSS for the div with the text: article .teleprompter { padding: 300px 50px 1000px 100px; font-size: 30px !important; line-height: 86px; z-index: 1; background-color: #141414; -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } The CSS for the flipx part: article .teleprompter.flipx { -webkit-transform: rotateY(180deg); -moz-transform: rotateY(180deg); -o-transform: rotateY(180deg); -ms-transform: rotateY(180deg); z-index: 1; pointer-events: none; padding: 300px 50px 1000px 100px !important; } JS I Think should work: &lt;script&gt; function flipTXT(color) { if (parent_window &amp;&amp; !parent_window.closed) { parent_window.document.getElementById("teleprompter").style['-webkit-transform'] = rotateY(180deg); } } &lt;/script&gt;
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40721090
has answer: http://stackoverflow.com/a/26002172
has comment: http://stackoverflow.com/comment/40721281
tagged with: jquery
has title: Flip text with javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40721208
has comment: http://stackoverflow.com/comment/40721126

http://stackoverflow.com/comment/40524566
type: QuestionComment
comment on: http://stackoverflow.com/q/25892990
has text: @Igoel There is no output, the content loads correctly, but if you click "Load" a second time and try clicking on the rows, the alert message does not show anymore
score: 0
type: Comment

http://stackoverflow.com/a/25888265
has body: Alternative (jQuery based) solution: Hello world Live demo Compared to the disabled based solutions this only loads one CSS.
type: Answer
answers question: http://stackoverflow.com/q/25888133
score: 0

http://stackoverflow.com/comment/40529643
comment on: http://stackoverflow.com/a/25885888
type: Comment
score: 0
type: AnswerComment
has text: Can you send me the code you used previously in the manner i pasted my whole php file code, so I can help you to figure out the error.

http://stackoverflow.com/comment/40783557
has text: @below9k, you mean i use these in the CCS part? on which though can you clarify if possible?
comment on: http://stackoverflow.com/q/26018351
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40550978
has text: can you provide a fiddle link?
score: 0
comment on: http://stackoverflow.com/q/25907492
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40668213
has text: please format your code properly and add. Your code is like a paragraph
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25973042
type: Comment

http://stackoverflow.com/comment/40586019
type: Comment
has text: I gave an example of how to find unknown keys using `for..in`
comment on: http://stackoverflow.com/a/25916125
score: 0
type: AnswerComment

http://stackoverflow.com/q/25883381
has body: I have a tricky little problem in my hands that is threatening to put my work behind my atleast a week. I am trying to scrap a webpage from a URL and show that scraped webpage in my browser except for the javascript. my scraping happens in nodejs My programs flow is: Get HTML page from the URL to my server. Get all the CSS and image links from the page using htmlparser2(not javascript links) Parse CSS to check for any external links (i.e. image URLs, CSS import links etc.) Download these new resources and repeat step 3 &amp; 4 until all resources are downloaded. Remove all the script tags from the HTML page (i do this using simple string manipulation). Add my own single script tag with a link to my javascript which is compiled using Google Closure (which adds a kind of sophisticated dynamic overlay using canvas) to the HTML. Open the URL of the downloaded HTML in the browser to serve the page from my server. The page opens in the browser but is served from my server, my javascript runs and the final result is displayed. But i ran into a problem in the 8th step. I have removed all the script tags from the HTML page but there are certain pages which make javascript function calls from the the HTML itself using attributes like onload, onclick, etc. For ex: &lt;body onload="xxx()"&gt;....&lt;/body&gt; Such pages raise an Uncaught ReferenceError: xxx is not defined in my browser. Some browsers like Google Chrome log this error in the console but don't stop the execution, so my javascript runs without any issue. But certain browsers like Firefox, Opera and IE (i am sure there would be more) stop the execution and enter the debugging mode and my javascript never runs. I thought about removing all such attributes from my HTML on my server but then i found a list of all such attributes and decided against it for performance reasons since its a long list (i am still open to it if i can find an efficient way to do this). I am looking for a way to handle all javascript errors t…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: html-parsing
tagged with: node.js
has title: How to suppress javascript errors in browsers?
has comment: http://stackoverflow.com/comment/40507337
has comment: http://stackoverflow.com/comment/40507383
score: 1
tagged with: error-handling
upvote count: 1
has answer: http://stackoverflow.com/a/25883441
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40542129
type: Comment
type: QuestionComment
has text: You tell us. What's in `print.data('url')`? What's in `print.data('title')`? What happens when you just type that `window.open(...)` statment, with those strings used directly, in the console?
comment on: http://stackoverflow.com/q/25902524
score: 4

http://stackoverflow.com/comment/40513215
type: Comment
has text: Sorry...My requirement is page should not get refreshed and should not postback too...on displaying that alert popup when condition is false
type: AnswerComment
comment on: http://stackoverflow.com/a/25876237
score: 0

http://stackoverflow.com/a/25989509
type: AcceptedAnswer
downvote count: 0
has body: try this : $(function(){ $('.mytable').on("change","input[type=checkbox]",function(){ if($(this).is(':checked')) { var button = ' '+$(this).parent().text()+' '; $('.myfilters').append(button); } else { $('.myfilters').find('button[id="'+$(this).val()+'"]').remove(); } }); }); Demo
type: Answer
accepted answer of: http://stackoverflow.com/q/25989434
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25989434

http://stackoverflow.com/a/56276904
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/112983900
answers question: http://stackoverflow.com/q/25930741
has body: The way to ensure navigation with one click is to combine $location.hash() $anchorScroll and setting routeProvider reloadOnSearch property to false i.e. In your controller code: $location.hash("editor"); $anchorScroll(); In your route provider: $routeProvider.when("/masters/voucher", { templateUrl: "views/card/voucher.html", reloadOnSearch: false })
downvote count: 0

http://stackoverflow.com/a/25899271
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40536996
answers question: http://stackoverflow.com/q/25898719
has body: I suggest one small regexp hack: var str = " supun <age>23 1111 "; function getInvalidTags(str) { // remove text between XML tags: var noText = str.replace(/>[^<>]*</g, "><"); var prev = noText; var next = ""; // while something changed remove pairs while (prev != (next = prev.replace(/<([^<>]*)( [^<>]*)?><\/\1>/g, ""))) prev = next; return prev; } console.log(getInvalidTags(str)); Note that it doesn't support attributes but it easily can be extended to support them. UPDATE: Updated to support attributes.
upvote count: 1
has comment: http://stackoverflow.com/comment/40536824

http://stackoverflow.com/comment/40697723
type: Comment
has text: you are refering the function not calling it
type: QuestionComment
comment on: http://stackoverflow.com/q/25988979
score: 1

http://stackoverflow.com/comment/40628897
comment on: http://stackoverflow.com/q/25883529
score: 1
has text: I think building your own counter is definately worth it in this case. But it renders the question a bit useless. Therefor, I've deleted my answer, and you might consider doing the same for the question. Or otherwise you might post the code of your own counter as an answer to provide an alternative to future visitors.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40730674
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26000272
type: QuestionComment
has text: Thanks alot :) ill see if I can set it up tomorrow. I really need help with this collision problem

http://stackoverflow.com/comment/55266806
score: 64
type: Comment
has text: This deserves a blog post or something.
comment on: http://stackoverflow.com/a/26034254
type: AnswerComment

http://stackoverflow.com/comment/40594787
comment on: http://stackoverflow.com/a/25929519
score: 0
type: AnswerComment
type: Comment
has text: @MyNameIsAnz consider closing your question then.

http://stackoverflow.com/comment/40763070
has text: Here's the order of Events: Complete Form->Press Submit->Interrupt Submit(e.preventDefault())->Serialize Data($("#myForm").serialize())->Send Data to Php Page->Use Data on Php Page->Return Data->Success Function
type: AnswerComment
comment on: http://stackoverflow.com/a/26023467
score: 0
type: Comment

http://stackoverflow.com/comment/40691861
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25982742
type: Comment
has text: I will take a look at what you have posted and check after I get a chance to digest thanks!

http://stackoverflow.com/comment/40728463
type: QuestionComment
has text: Rick - yes they are in the same file. PHPglue - I'm just trying to get some verification that the html and javascript files are communicating.
comment on: http://stackoverflow.com/q/26005594
score: 0
type: Comment

http://stackoverflow.com/comment/40704815
type: AnswerComment
has text: Ya ..its there..Uncaught TypeError: Cannot read property 'id' of undefined .
type: Comment
comment on: http://stackoverflow.com/a/25992409
score: 0

http://stackoverflow.com/comment/40524545
has text: Don't use scriptlets, we are living in the 21st century, not the 11th century. Use EL Expressions.
type: Comment
comment on: http://stackoverflow.com/a/25893009
score: 2
type: AnswerComment

http://stackoverflow.com/comment/40664197
comment on: http://stackoverflow.com/a/25948415
score: 0
type: AnswerComment
type: Comment
has text: I edited my answer. You can use `.postMessage`, `hash` or the `xssinterface` library.

http://stackoverflow.com/a/25971015
score: 0
answers question: http://stackoverflow.com/q/25970821
has body: Please try folowing. &lt;li&gt; &lt;p&gt; &lt;a class="movie" href="#"&gt; title &lt;/a&gt; &lt;/p&gt; &lt;img src="thumbnailSrc"&gt; &lt;/li&gt; $('.ClassName').on('click', function (event) { event.preventDefault(); // You code here with //$(this).text(); or $(this).html(); console.log('Hello World!'); }); Hope this will help you.
type: Answer

http://stackoverflow.com/comment/40609269
type: Comment
has text: hello Asok, i got another problem here since i got to know **Cordova Facebook Plugin **need to call login before calling the api so i altered the previous code and called the api in the success of the login But i got another issue which is apiData: [] where i put the returned data (id,name, and pic) is empty when i call it in the controller, i edited my question to match my new code.
comment on: http://stackoverflow.com/a/25915956
score: 0
type: AnswerComment

http://stackoverflow.com/a/25996348
accepted answer of: http://stackoverflow.com/q/25996228
upvote count: 2
answers question: http://stackoverflow.com/q/25996228
type: AcceptedAnswer
downvote count: 0
has body: Looks like homework. Anyway, your values from your inputs ($('#result2').val() etc) look like "$15.055", which will fail because it'll see the "$" sign and assume it's 0. You can either save the value before you prepend the "$" then use that, or just slice it: +( $("#result2").val().slice(1) ) / +( $("#result").val().slice(1) )
type: Answer
score: 2

http://stackoverflow.com/q/25916062
has title: Ionic Back Button not displaying in TAB Page and animation is missing
has answer: http://stackoverflow.com/a/25949895
score: 1
upvote count: 1
tagged with: ionic-framework
tagged with: navigation
type: Question
tagged with: tabbed-view
downvote count: 0
tagged with: javascript
has body: I have a problem with displaying back button and smooth transition into tabbed page after button click from main menu of the app. If i'm redirection to the simple view after button click: NON-TABBED-VIEW (works fine) .state('dailystats', { url: '/daily-stats', views: { '': { templateUrl: 'templates/daily-stats/daily-stats.html', controller: 'DailyStatsCtrl' } } }) Is transition and back button displayed correctly. But if I want to go on tabbed page after tap on button in home page in redirected without animation and without possibility to get back to home page using the back left arrow icon in header of tabbed page. How can i add transition and back button into these tabbed views? I tried to find any solution (using script templates, etc) but without luck. Many Thanks for any help. TABBED-VIEW (not working animation and back arrow) .state('tabplannedcalls', { url: "/tabplannedcalls", abstract: true, templateUrl: "templates/tabs/planned-calls.html" }) .state('tabplannedcalls.list', { url: '/list', views: { 'tab-planned-calls-list': { templateUrl: 'templates/call-planning/list.html', controller: 'PlannedCallsCtrl' } } }) .state('tabplannedcalls.new', { url: '/new', views: { 'tab-new-planned-call': { templateUrl: 'templates/call-planning/new-planned-call.html', controller: 'PlannedCallsCtrl' } } }) Tab Template: List template included in tab: {{plannedCallItem.contact_name}}
answer count: 2
has answer: http://stackoverflow.com/a/32193579
tagged with: android
favorite count: 0
type: UnansweredQuestion

postback
tag name: postback
tags question: http://stackoverflow.com/q/25978243
type: Tag

http://stackoverflow.com/comment/40695794
comment on: http://stackoverflow.com/q/25987310
score: 0
has text: http://localhost:8080/SumWithAjaxController/additionWithAjax.html
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25989963
answers question: http://stackoverflow.com/q/25989434
score: 0
has body: Here is a fiddle Demo, FIDDLE DEMO CLICK HERE var myNull=null; // ignore this line
type: Answer

http://stackoverflow.com/q/25912713
has body: I'm listening to DOM changes with DOM mutation observer like this: var container = document.querySelectorAll("body")[0]; var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { var target = mutation.target; switch (mutation.type) { case "childList": Array.prototype.forEach.call(mutation.addedNodes, function(node) { var lastname = node.outerHTML; if(typeof lastname !== "undefined") { console.log(node.outerHTML); //this is logging nodes as array var textarea = document.querySelectorAll("textarea")[0]; textarea.value = node.outerHTML; //this only gives me the very last node } }); break; } }); }); observer.observe(container, { childList : true, attributes : true, characterData : true, subtree : true, attributeOldValue : true, characterDataOldValue : true }); When I view the log I see an array holding all the nodes but when I try to put the nodes in a textarea only the very last one gets printed. I can change variable in target but that gives me all the HTML of the target while I only need the HTML of the last mutation. How do I get the nodes of the last mutation into the textarea ?
has comment: http://stackoverflow.com/comment/40560221
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40560301
score: 0
has comment: http://stackoverflow.com/comment/40560493
has comment: http://stackoverflow.com/comment/40560339
tagged with: mutation-observers
has title: Get last nodes of DOM mutation
type: AnsweredQuestion
tagged with: prototype
tagged with: nodes
type: Question
has answer: http://stackoverflow.com/a/25912762
accepted answer: http://stackoverflow.com/a/25912762

internet-explorer
tags question: http://stackoverflow.com/q/26017715
tags question: http://stackoverflow.com/q/25918590
tags question: http://stackoverflow.com/q/25900469
tags question: http://stackoverflow.com/q/25974079
tags question: http://stackoverflow.com/q/25940621
tag name: internet-explorer
tags question: http://stackoverflow.com/q/26031665
tags question: http://stackoverflow.com/q/25994618
tags question: http://stackoverflow.com/q/25916949
tags question: http://stackoverflow.com/q/25887730
tags question: http://stackoverflow.com/q/25975569
tags question: http://stackoverflow.com/q/25910415
tags question: http://stackoverflow.com/q/25994482
tags question: http://stackoverflow.com/q/25892310
tags question: http://stackoverflow.com/q/25895127
tags question: http://stackoverflow.com/q/25964742
tags question: http://stackoverflow.com/q/25910480
tags question: http://stackoverflow.com/q/25888398
tags question: http://stackoverflow.com/q/25993220
tags question: http://stackoverflow.com/q/25876772
type: Tag
tags question: http://stackoverflow.com/q/25934764
tags question: http://stackoverflow.com/q/25929486
tags question: http://stackoverflow.com/q/25969591
tags question: http://stackoverflow.com/q/26027821
tags question: http://stackoverflow.com/q/26023203
tags question: http://stackoverflow.com/q/26019127
tags question: http://stackoverflow.com/q/25887972

http://stackoverflow.com/a/26026844
accepted answer of: http://stackoverflow.com/q/26019628
type: Answer
has comment: http://stackoverflow.com/comment/40832816
has comment: http://stackoverflow.com/comment/40796802
answers question: http://stackoverflow.com/q/26019628
score: 0
type: AcceptedAnswer
has body: This is "working" -- but is not what I was originally shooting for. The someGen now executes the query, but returns an array of objects, rather than yielding them individually... let someGen = function *() { let connection = getConnectionPool() let recordset = yield connection.query('SELECT ? as jobId', [ 99 ]); if (recordset &amp;&amp; recordset[MYSQL_RECORD_SET]) { return _.map(recordset[MYSQL_RECORD_SET], function (row) { return { jobId: jobId } }) } } let runIt = function() { var doSomething = function(job){ } co(function*() { let jobBatch = yield someGen() _.each(jobBatch, function(job){ doSomething(job) ; }) })() } Still looking for a better answer.
has comment: http://stackoverflow.com/comment/40784033

http://stackoverflow.com/comment/40669800
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61677/discussion-between-vikram-and-artm).
comment on: http://stackoverflow.com/q/25973098
score: 0

http://stackoverflow.com/a/26071732
downvote count: 0
has body: This answer depends on features not yet implemented and for which the spec is still to-be-written: 1) get video and text stream 2) use webgl to merge the text stream onto the video background (I presume webgl has stuff that can do this; effectively it's a green-screen technique 3) dump the webgl frames to a canvas 4)** get a mediastream from the canvas via canvas.captureStream() -- note, no implementations exist for this yet, and the spec isn't even written, though we all agree it's a good thing Alternatively: if it's truly text, ship it in parallel over a DataChannel and render it at the receiver side into a text overlay of the . This will work today and be much more efficient. Bandwidth for the text will be minimal.
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25930613
upvote count: 1
answers question: http://stackoverflow.com/q/25930613
type: AcceptedAnswer

http://stackoverflow.com/comment/40667241
type: QuestionComment
comment on: http://stackoverflow.com/q/25972453
has text: So you're getting a whole HTML document as a response? Or just a snippet?
score: 0
type: Comment

http://stackoverflow.com/q/25974788
type: Question
has title: AngularJS conflicts with jQuery Mobile
has answer: http://stackoverflow.com/a/25975628
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/40671679
has comment: http://stackoverflow.com/comment/40671510
score: 0
answer count: 1
tagged with: include
has body: I run this simple script that comes from Angular documentation, and it's working fine: http://plnkr.co/edit/6uIlw6HGVVpT0amF2vhj If I add jQuery and jQuery Mobile, then the example doesn't work anymore. The radiobuttons are not clickable. Example: If I add these two scripts and the following CSS in the above example: If I put them before the include of angular.js, then the radiobutton are clickable, but the display of the choice ("You choose...") doesn't work anymore. Does somebody knows why is it not working?
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40671433

http://stackoverflow.com/comment/40591555
score: 0
type: Comment
has text: Nice, I tried the with the "call", and it works very nice as well. When I use "[action]()", firebug says that action is not a function.
comment on: http://stackoverflow.com/a/25929555
type: AnswerComment

http://stackoverflow.com/a/25958820
has body: The less the better. One websocket per client should be enough. JavaScript is mono thread anyway, so there is no benefit in use multiple. If you have X bandwidth between client and server, that bandwidth is shared across connections. Use a publisher/subscriber model over a single connection.
answers question: http://stackoverflow.com/q/25952216
type: AcceptedAnswer
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25952216
type: Answer
score: 2

http://stackoverflow.com/a/25923213
downvote count: 0
score: 1
upvote count: 1
type: Answer
has body: That's a "needless extra step to me" too. And not more readable. I would use your second choice. There is no difference at the end.
answers question: http://stackoverflow.com/q/25923154

http://stackoverflow.com/a/25931836
score: 0
has body: You need to find the parent tr and then try to find the input. $(document).ready(function () { $('.button-edit').each(function () { $(this).mouseenter(function () { $(this).fadeTo(20, 1).css('cursor', 'pointer'); }); $(this).mouseleave(function () { $(this).fadeTo(20, 0.5); }); $(this).click(function () { var id; $(this).closest("tr").find('.mojaklasa').val(id); alert(id); }); });
type: Answer
answers question: http://stackoverflow.com/q/25931737

http://stackoverflow.com/comment/40640114
type: Comment
type: QuestionComment
has text: I don't think there's any workable answer other than a try/catch in each request handler so the code NEVER throws beyond the handler and you always have access to `res` in your `catch` handler. Since requests come in asynchronously, you HAVE to try/catch there where the request started. Here's some [good reading about error handling in node](http://machadogj.com/2013/4/error-handling-in-nodejs.html).
comment on: http://stackoverflow.com/q/25957449
score: 0

http://stackoverflow.com/a/31504267
type: Answer
answers question: http://stackoverflow.com/q/25972870
has comment: http://stackoverflow.com/comment/50971382
has body: var disableArrowKeys = function(e){ if($("input[type=radio]").is(':focus')){ if(e.keyCode==37){ e.preventDefault(); window.scrollBy(-100, 0); } else if(e.keyCode==38){ e.preventDefault(); window.scrollBy(0, -100); } else if(e.keyCode==39){ e.preventDefault(); window.scrollBy(100, 0); } else if(e.keyCode==40){ e.preventDefault(); window.scrollBy(0, 100); } } } $(document).keydown(disableArrowKeys);
score: 0

http://stackoverflow.com/comment/40629500
type: Comment
has text: you can use css to hide it. #login{display:none;}
comment on: http://stackoverflow.com/a/25951795
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41485017
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25986065
has text: this is exactly the same issue I am looking for. Have you solved this?
score: 0

http://stackoverflow.com/comment/40741507
comment on: http://stackoverflow.com/q/26013170
score: 0
type: Comment
has text: Why on the `onbeforeunload` event ?
type: QuestionComment

http://stackoverflow.com/q/25916910
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40568867
has title: Detecting when a DOM element's parent changes
has body: Is there a DOM event that fires when an element's parentElement changes? If not, is there any way better than polling with a timeout? I'm specifically interesting in knowing when the parentElement changes from null to some defined element. That is, when a DOM element is attached to the document tree somewhere. EDIT Given the questions in the comments, here is an example that shows how to create an element with a null parentElement: var element = document.createElement('div'); console.assert(element.parentElement == null); The parent is only set once it's added to the DOM: document.body.appendChild(element); console.assert(element.parentElement != null); Note too that elements created using jQuery will also have a null parent when created: console.assert($('&lt;div&gt;&lt;/div&gt;').get(0).parentElement == null);
has answer: http://stackoverflow.com/a/25949858
score: 2
has comment: http://stackoverflow.com/comment/40574439
upvote count: 2
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40570580
has comment: http://stackoverflow.com/comment/40570139
has comment: http://stackoverflow.com/comment/40580391
tagged with: dom
has comment: http://stackoverflow.com/comment/40568828
has answer: http://stackoverflow.com/a/25922142
answer count: 3
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40568928
has answer: http://stackoverflow.com/a/73402585

http://stackoverflow.com/q/25939366
has comment: http://stackoverflow.com/comment/40624285
score: 2
type: Question
has body: I am using joint.js in my angular.js application , I have joint.js node in which I am using html x ( you can see this in my backbone view template) whenever user clicks on this button, I want to remove the node which works absolutely fine but what I want to improve is that button should appear only when user clicks on its node and when user clicks on paper other than node that cross button should disappear just like http://jointjs.com/rappid#a3e927c4-9c6b-4159-b14e-920299be8f87 my logic which I thought is to have a class in button's parent div .html-element button.delete{ display: none; } .html-element.showButton button.delete{ display: block; } which will be added when user will click on the node and removed when user will click on the paper. but when I do this logic of adding and removing class it works but the functionality of removal of node on cross button stops. By whole day debugging and altering the code, I have come to this ,that somehow when this function is called f2:function(){ var self=this; var elementDiv = $(self.$box).find('button'); elementDiv.parent().removeClass("showButton") } the removal of node on cross button click stops.it means the binding of icon to removal function of model is removed. this is the binding this.$box.find('.delete').on('click', function() self.model.remove(); }); I hope that this explanation makes some sense. Below is complete code var graph = new joint.dia.Graph; var element1=false; var paper = new joint.dia.Paper({ el: $('#workFlow'), width: '100%', height: '98%', model: graph, gridSize: 1 }); paper.on('cell:pointerdown', function(cellView, evt, x, y) { $scope.cellView=cellView; cellView.f1(); } ); paper.on('blank:pointerdown', function(cell) { $scope.cellView.f2(); }); Backbone View for extending shapes joint.shapes.html = {}; joint.shapes.html.Element = joint.shapes.basic.Rect.extend({ defaults: joint.util.deepSupplement({ type: 'html.Element', attrs: { rect: { stroke: 'none', 'fill-opacity': 0,stageType: dataSourceType}…
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26269966
favorite count: 0
tagged with: jointjs
tagged with: backbone.js
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has title: Issue on removal of joint js node on click of its custom html click

http://stackoverflow.com/q/26023019
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/26023663
possible better answer: http://stackoverflow.com/a/26024239
has comment: http://stackoverflow.com/comment/40761654
has title: Using ng-class to add CSS3 animations conditionally
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40761526
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40762094
upvote count: 2
has comment: http://stackoverflow.com/comment/40760811
tagged with: animation
tagged with: css
has answer: http://stackoverflow.com/a/26024239
score: 2
type: AnsweredQuestion
has body: I have a two CSS3 animations I am adding to the dom when particular conditions are satisfied in my controller. I am currently using ng-class to bring in the different animations (shake Y &amp; shake X) when these conditions are satisfied. (I'm just including the relevant js): $scope.submitAnswer = function($index) { ... if ($index == current) { console.log('correct!'); $scope.shaken = 'shakeY'; } else { console.log('incorrect!'); $scope.shaken = 'shakeX'; } } and here's the relevant HTML: &lt;div id="philosopher" ng-class="shaken" ng-click="submitAnswer($index);" ng-repeat="philosopher in philosophers"&gt; &lt;img ng-src="images/{{philosopher.signifier}}.png" height="142px" width="auto" /&gt; &lt;h2&gt;{{philosopher.name}}&lt;/h2&gt; &lt;/div&gt; This is working as I wish, however, I find that i cant continually apply the same animation class and have the animation execute - I need to alternate (between satisfying the if statement and triggering the else). I figured out that I could use a custom directive and ngAnimate to trigger the animation repeatedly, but I do not know how to implement the separate animations based on the outcome of the if else This is one of the directives: app.directive('shake', function($animate) { return { restrict: 'A', scope: false, link: function(scope, element, attrs) { element.bind('click', function() { $animate.addClass(element, 'shakeX', function() { $animate.removeClass(element, 'shakeX'); }); }); } }; }); How can I continually reapply shakeX and shakeY to ng-class or how can I only use my directive based on the outcome of the if else statement?? EDIT Finally got it going! Thank you for the help, what ended up working was implementing a timeout function in the if statement in just the right way. (I know technically you shouldnt use functions within if statements [i think thats a rule right?], but I finally got it working!) This is essentially where i ended up: if ($index == current) { console.log('correct!'); $timeout(function() { $s…
has comment: http://stackoverflow.com/comment/40761379
accepted answer: http://stackoverflow.com/a/26023663
type: Question

http://stackoverflow.com/q/25902607
tagged with: javascript
has body: I'm executing the following script in Google Chrome: window.open('form.xhtml', '_blank'); However, it opens the page in a new window instead of a new tab. How can I open it in a new tab?
favorite count: 0
has title: How to open page in a new tab in browser?
has comment: http://stackoverflow.com/comment/40792932
has answer: http://stackoverflow.com/a/25903010
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40547080
linked to: http://stackoverflow.com/q/11999837
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/40648874
score: 0
type: Comment
type: QuestionComment
has text: Yeah but why is FF returning different values? That's what I don't get... I was expecting hing like this in IE... but FF?
comment on: http://stackoverflow.com/q/25949560

http://stackoverflow.com/comment/48795950
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/30350212
type: Comment
has text: I have since changed the way I am handling input validation, to simply not allow other file types to be selected in the file chooser with `accept="image/jpg, image/png, image/jpeg"`

http://stackoverflow.com/comment/40667274
comment on: http://stackoverflow.com/q/25972453
has text: responseText is a string value.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25953481
tagged with: javascript
favorite count: 0
tagged with: get
has comment: http://stackoverflow.com/comment/40632645
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40632687
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/25953650
downvote count: 3
has comment: http://stackoverflow.com/comment/40632677
type: Question
has body: I want to use the return value of a JS function as the URL for a form get action. Is it possible or do I need to set the form attributes with a function call in the onSubmit attribute? edit: this is basically what i want to do the bang function is an implementation of the bang system from DDG in JS, so i can easily add bangs to a searchbox in my webpage.
upvote count: 0
has title: use js functions return value for html form action attribute
answer count: 1

http://stackoverflow.com/a/32233247
answers question: http://stackoverflow.com/q/26005547
score: 0
has body: you can add this property globally: if( navigator.userAgent.match(/iPhone|iPad|iPod/i) ) { var styleEl = document.createElement('style'), styleSheet; document.head.appendChild(styleEl); styleSheet = styleEl.sheet; styleSheet.insertRule(".modal { position:absolute; bottom:auto; }", 0); }
type: Answer

http://stackoverflow.com/q/25927409
has answer: http://stackoverflow.com/a/25929129
accepted answer: http://stackoverflow.com/a/25927474
has comment: http://stackoverflow.com/comment/40587639
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: Error while parsing the json
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25927474
score: 0
has body: I have an node js code like this: app.post('/', function(request, response){ var data = JSON.parse(request.body) }); the line : var data = JSON.parse(request.body) does parse the request. Using curl I do this: curl -d '{"operation":"test"}' -H "Content-Type: application/json" http://127.0.0.1:3000/ It always return this error: SyntaxError: Unexpected token o at Object.parse (native) at /Users/admin/programs/node/test.js:28:18 at Layer.handle [as handle_request] whats wrong here?
tagged with: node.js
possible better answer: http://stackoverflow.com/a/25929129

http://stackoverflow.com/a/25950297
answers question: http://stackoverflow.com/q/25950194
score: 2
has body: var text = "some text @[14cd3:+Seldum Kype] things are going " + "good for @[7f8ef3:+Kerry Williams] so its ok" var data = text.match(/@\[.+?\]/g).map(function(m) { var match = m.substring(2, m.length - 1).split(':+'); return {id: match[0], name: match[1]}; }) // =&gt; [ { id: '14cd3', name: 'Seldum Kype' }, // { id: '7f8ef3', name: 'Kerry Williams' } ] // For demo document.getElementById('output').innerText = JSON.stringify(data); &lt;pre id="output"&gt;&lt;/pre&gt;
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25950194
type: Answer

http://stackoverflow.com/comment/40673351
has text: just an observation but is there a closing bracket missing from .dialog('open); should be .dialog('open'); no?
comment on: http://stackoverflow.com/q/25975175
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40569342
has text: Please provide how you include the bundle and where you include your bundle.
score: 1
comment on: http://stackoverflow.com/q/25916738
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25914356
has body: Just use \w instead of \S. See here \w means word which consists of [A-Za-z0-9_].
type: Answer
accepted answer of: http://stackoverflow.com/q/25914124
answers question: http://stackoverflow.com/q/25914124
has comment: http://stackoverflow.com/comment/40563847
has comment: http://stackoverflow.com/comment/40563669
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25955551
downvote count: 0
type: Answer
has body: Not sure if there's a way to hook to "App Engine Launcher" but all it does is run a appcfg.py update myapp/ command where myapp/ is your app directory. You could simply create your own shell/batch file where you first minify the files and then deploy them by running the command above. Also, take a look at Google's Pagespeed service that comes with paid App Engine projects where css/js/etc is minified automatically on Google's servers.
upvote count: 1
answers question: http://stackoverflow.com/q/25955486
has comment: http://stackoverflow.com/comment/40636540
score: 1

http://stackoverflow.com/q/25967082
score: 3
has title: Javascript will only work after refreshing the page
tagged with: javascript
has answer: http://stackoverflow.com/a/25968100
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25968100
has answer: http://stackoverflow.com/a/25967352
type: AnsweredQuestion
tagged with: twitter-bootstrap
upvote count: 3
possible better answer: http://stackoverflow.com/a/25967352
linked to: http://stackoverflow.com/q/17317816
has body: I am using Bootstrap 3.2.0. I am trying to use two bootstrap javascript features together: Scrollspy and Affix. The goal is to make a scrollspy on the side that will scroll with the rest of the page using affix. Demo Below is my javascript file, included in the head by Rails asset pipeline. $(document).ready(function () { // Use affix plugin $("#sidebar").affix({ offset: { top: 280 } }); // Use Scrollspy $('body').scrollspy({ target: '#sidebar', offset: 200 }); } The scrollspy works smoothly, but affix plugin does not, unless I refresh the page after initial loading. Using developer tools in chrome, I noticed that the javascript does not add affix-top to sidebar the first time page loads. When I put the affix plugin javascript directly into the body, it works without refreshing. But I don't really want to use inline javascript. And I am really curious why this strange behavior is happening. I am using Rails 4.1.5.
tagged with: ruby-on-rails
type: Question

http://stackoverflow.com/comment/40672230
has text: @PeterRader how would you recommend doing a sticky div without jquery and just css? As I would prefer not to use jquery
comment on: http://stackoverflow.com/q/25975011
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25884228
score: 0
has comment: http://stackoverflow.com/comment/40508840
has body: This code should work fine, but i don't know where it is getting stuck! This code is very simple, and it should work, I think the problem is the 3rd parameter that is passed ("mouseup", function(){}, false) html demo Click me Not Clicked
has answer: http://stackoverflow.com/a/25884456
has answer: http://stackoverflow.com/a/25884525
linked to: http://stackoverflow.com/q/6348494
has answer: http://stackoverflow.com/a/25884329
has answer: http://stackoverflow.com/a/25884349
has comment: http://stackoverflow.com/comment/40509025
has answer: http://stackoverflow.com/a/25884256
linked to: http://stackoverflow.com/q/17564323
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25884329
type: Question
has title: e.preventDefault() not working in javascript, but working in jQuery
has comment: http://stackoverflow.com/comment/40508852
linked to: http://stackoverflow.com/q/21900470
has comment: http://stackoverflow.com/comment/40508875
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/25884364
accepted answer: http://stackoverflow.com/a/25884364

http://stackoverflow.com/comment/76224042
type: Comment
comment on: http://stackoverflow.com/a/25955207
score: 1
type: AnswerComment
has text: A shorter way: `let days = moment.weekdays(); days.push(days.shift()); moment.euweekdays = days;` and then access it with `moment.euweekdays`

http://stackoverflow.com/q/25909575
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
answer count: 1
has comment: http://stackoverflow.com/comment/40554560
score: 0
has body: I was upload a file after click on submit button the page will navigate to .php file and get success messsage. But i want to stay on same page after click on submit button with out using ajax. Please help me. Thanks. HTML code: Add Videos:
tagged with: jquery-mobile
tagged with: javascript
has title: how to stay on same page after upload file and click on submit in jquerymobile
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25909781

http://stackoverflow.com/a/25934194
has body: An other approach could be this one. Call the function you allready have just once, then use setInterval on a new same function and only change the .php file you request data from to a new one that returns the latest marker based on the timestamp with a query like: SELECT MAX(timestamp) AS timestamp FROM mytable
answers question: http://stackoverflow.com/q/25933840
has comment: http://stackoverflow.com/comment/40603575
type: Answer
score: 0

http://stackoverflow.com/comment/40783179
type: Comment
has text: My question is, I have two grids (parent and child grid). this is not a grid and subgrid relationship; the two grids are defined in two ... tags. How can I ensure that the css code: .ui-jqgrid .ui-search-table .ui-search-clear { width: 100%; } .ui-jqgrid .ui-search-table .ui-search-clear a { float: left; } is only applied to one of the grids
comment on: http://stackoverflow.com/a/26019390
score: 0
type: AnswerComment

http://stackoverflow.com/q/26007193
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40761452
tagged with: markerclusterer
has comment: http://stackoverflow.com/comment/40731499
type: Question
has body: I'm using census data to plot millions (yes millions) of points on the US map. Each point represents a male or female. Therefore, I am using clustering. However, the clusters that form have default colors that change as one zooms in or out. Is there a way to change the color of the clusters so that all male dot clusters are one color and all female dots are another? This would also mean that I would have 2 cluster variables, one for men and one for women, but I don't want the colors for the 2 clusters to ever be the same.
tagged with: google-maps
tagged with: google-maps-markers
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has title: How to customize Google Maps API marker cluster colors
answer count: 0

http://stackoverflow.com/comment/40590314
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25928957
has text: Please add your code
type: QuestionComment

http://stackoverflow.com/comment/40758768
has text: Technically, the event listener is added, it just never fires. The reference to `process.stdin` is the only thing keeping the process open in this case. Once you manually remove it, the process will exit at the end of the current run loop so there's no chance for the event listener you added to ever fire.
comment on: http://stackoverflow.com/a/26004758
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/119550648
type: Comment
has text: @KejingPeng how can I retrieve the Word document in .docx extention?
type: AnswerComment
comment on: http://stackoverflow.com/a/27751294
score: 0

http://stackoverflow.com/comment/40580013
score: 0
type: Comment
type: QuestionComment
has text: `.call` is redundant here, since `String.toUpperCase` does not use the `this` object. You should use: `String.toUpperCase(['a', 'lower', 'case', 'string', 'array'])` directly.
comment on: http://stackoverflow.com/q/25922918

http://stackoverflow.com/q/25976608
tagged with: javascript
downvote count: 0
tagged with: webrtc
has body: I'm using WebRTC and realize it is not supported in all browsers. However, Chrome and Firefox do support it (in newer versions; I have the newest versions installed) as long as you have the correct prefix for certain variables. For instance, I have the following for PeerConnection for cross-browser support: var PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; Now that it should be supported cross-browser, I have the following code: var servers = { iceservers: [ {url: "stun:23.21.150.121"}, {url: "stun:stun.1.google.com:19302"} ] }; var pc = PeerConnection(servers); But in Chrome it gets an error on the last line (var pc = PeerConnection(servers);). The error is: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration"} Obviously, Chrome does not like my configuration parameter in the PeerConnection declaration. But my question is: why am I getting this error and how come only in Chrome? (FireFox works fine)
possible better answer: http://stackoverflow.com/a/26043286
score: 8
favorite count: 0
has answer: http://stackoverflow.com/a/26043286
accepted answer: http://stackoverflow.com/a/25978005
upvote count: 8
type: AnsweredQuestion
tagged with: google-chrome
type: Question
has title: Malformed RTCConfiguration only in Chrome
answer count: 2
has answer: http://stackoverflow.com/a/25978005

http://stackoverflow.com/q/25885830
accepted answer: http://stackoverflow.com/a/25891100
has title: Google Cloud Messaging (fake_message_id)
downvote count: 0
tagged with: javascript
type: Question
type: AnsweredQuestion
tagged with: android
tagged with: google-cloud-messaging
score: 7
has answer: http://stackoverflow.com/a/25891100
favorite count: 0
answer count: 2
upvote count: 7
possible better answer: http://stackoverflow.com/a/59786971
tagged with: node.js
has answer: http://stackoverflow.com/a/59786971
has body: I have node.js server: var gcm = require('node-gcm'); // create a message with default values var message = new gcm.Message(); // or with object values var message = new gcm.Message({ collapseKey: 'demo', delayWhileIdle: true, timeToLive: 3, data: { key1: 'message1', key2: 'message2' } }); var sender = new gcm.Sender('AIzaSyChp2jTQsgPkLaaVgFh6yoovu1Td7tuQMo'); var registrationIds = []; // OPTIONAL // add new key-value in data object message.addDataWithKeyValue('key1','message1'); message.addDataWithKeyValue('key2','message2'); // or add a data object message.addDataWithObject({ key1: 'message1', key2: 'message2' }); // or with backwards compability of previous versions message.addData('key1','message1'); message.addData('key2','message2'); message.collapseKey = 'demo'; message.delayWhileIdle = true; message.timeToLive = 3; message.dryRun = true; // END OPTIONAL // At least one required registrationIds.push('APA91bGV0W6lgapC07aHc-sQdd462f_lCoUY0r5mqVtdFX1ZfK31njMUeyVXXXXXXXXXXXXXXXXXXXXXXXXX0SiAp29dkyxdJ5Y8Cl2tO1aih0KeViA9hK3Q47atoU8qsD6ITbg'); /** * Params: message-literal, registrationIds-array, No. of retries, callback-function **/ sender.send(message, registrationIds, 4, function (err, result) { console.log(result); }); I got an: { multicast_id: -1, success: 1, failure: 0, canonical_ids: 0, results: [ { message_id: fake_message_id' } ] } And message does not send to receivers. What does fake_message_id mean?

http://stackoverflow.com/comment/40767141
comment on: http://stackoverflow.com/q/26026311
type: Comment
type: QuestionComment
has text: You can reduce this code by quite a lot by using plain Javascript as well. Nothing against jQuery, but it can't hurt to learn the basics. OP also thought it is better to understanding plain JavaScript better first and I think we should support that.
score: 0

http://stackoverflow.com/q/26015474
tagged with: jquery-ui-autocomplete
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/30725099
tagged with: javascript
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/31916393
downvote count: 0
favorite count: 0
tagged with: backbone.js
type: Question
has title: How to input free text in visualsearch.js?
upvote count: 2
has body: As you see on the demo at http://documentcloud.github.io/visualsearch/, we cannot input a text without selecting a facet. Is there a way to input free text?
answer count: 2

http://stackoverflow.com/a/31449084
has body: guess this is a long time ago but i had the same problem with selects and inputs not working. After long trial and error i got it to work by adding $('#selectid').mousedown(function(event){event.stopPropagation()}) to the select. The fullcalendar binds events to the mousedown which somehow prevent the default browser behaviour for the input elements such as select expanding, input focus etc. by stopping propagation on the mousedown this prevents fullcalendar events from firing There is a bug filed for this but seems not yet fixed google code issue (im using version 2.3.2 of fullcalendar)
answers question: http://stackoverflow.com/q/25940613
score: 0
type: Answer

http://stackoverflow.com/comment/40577603
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25921606
score: 0
has text: Use jquery validation plugin for validating email.

http://stackoverflow.com/a/25941945
has comment: http://stackoverflow.com/comment/40638543
type: Answer
has body: Bind does't work like you are thinking I believe. Bind is for injecting this into an execution context. It is not for passing arguments if this is not a concern. In order to pass arguments, you are going to want to use an anonymous function like this var testA, testB; console.log = function(arg){$("#console").html(arg);}//used only for demo snippet function myFunc(testA, testB) { console.log("testA is : " + testA + " testB is : " + testB); } myInterval = setInterval(function(){ myFunc(testA, testB); }, 5000); $('#myDiv').click(function () { testA = "foo"; testB = "bar"; myFunc(testA, testB); clearInterval(myInterval); myInterval = setInterval(function(){ myFunc(testA, testB); }, 5000); }); Console Click
has comment: http://stackoverflow.com/comment/40614975
score: 1
has comment: http://stackoverflow.com/comment/40615990
upvote count: 2
has comment: http://stackoverflow.com/comment/40639383
has comment: http://stackoverflow.com/comment/40614291
answers question: http://stackoverflow.com/q/25941904
has comment: http://stackoverflow.com/comment/40620235
downvote count: 1

http://stackoverflow.com/comment/40526406
comment on: http://stackoverflow.com/q/25893995
type: Comment
type: QuestionComment
has text: I think you are calling WOW before the page / js files are complete loaded.
score: 0

http://stackoverflow.com/q/26014172
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26014306
accepted answer: http://stackoverflow.com/a/26014306
has body: Script code: function submitdata(){ alert("hi"); //var formRequest = JSON.stringify($("#submitdatafrm").serializeArray()); var test = JSON.stringify({ "firstName": $('#fname'), "email":$('#email'), }); console.log(test); $.ajax({ type: "POST", contentType: 'application/json', url: "http://localhost:8080/formdataserver/rest/reqdemo/add", data: test , dataType:"text", success:successmethod, error: function(data,status) { alert("Error "+status); } }); } function successmethod(data){ alert("sucess") } Html code: First Name Email Request a demo now In the above code when i pass values through json statically(hardcoded values) it is working fine and values are stored in database.but when i pass the values dynamically(dynamic values through form) the values are not passed and showing an error alert message??what is the wrong am doing in the json code??Any help would be Appreciated...
has comment: http://stackoverflow.com/comment/40743147
downvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40744551
has comment: http://stackoverflow.com/comment/40743128
tagged with: http://stackoverflow.com/tag/json
score: -1
tagged with: forms
has comment: http://stackoverflow.com/comment/40743410
has title: Form data sent dynamically through json to server not working?
upvote count: 0
answer count: 1

http://stackoverflow.com/q/26015433
type: Question
has title: Function param javascript scope
tagged with: javascript
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/40746077
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40745546
has body: I have this piece of code function showOpenMaps(position,located){ jQuery.ajaxSetup({ cache:true }); jQuery.getScript("http://www.openlayers.org/api/OpenLayers.js") .done(function (script, textStatus) { $(".geocoder").show(); $("#map_canvas").html(""); var fromProjection = new OpenLayers.Projection("EPSG:4326"); // Transform from WGS 1984 var toProjection = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection var position = new OpenLayers.LonLat(position.coords.longitude, p.... } My param position is not defined but it's ok outside the getScript call. Any ideas? Is it scope related?
tagged with: parameters
has comment: http://stackoverflow.com/comment/40746458
answer count: 0
has comment: http://stackoverflow.com/comment/40745478
has comment: http://stackoverflow.com/comment/40745611
has comment: http://stackoverflow.com/comment/40745389

http://stackoverflow.com/q/25880316
has body: In my options page for my Chrome Extension I placed a link directing users to the Chrome general settings page for extensions. This one: I used the following html: Settings But it doesn't do anything when I click it. What is the URL that I need there?
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2
upvote count: 2
tagged with: google-chrome
has title: How to open Chrome Extensions page from options.html from my own extension?
accepted answer: http://stackoverflow.com/a/25881750
type: AnsweredQuestion
type: Question
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40503456
tagged with: javascript
has answer: http://stackoverflow.com/a/25881750

http://stackoverflow.com/q/25973725
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25973780
accepted answer: http://stackoverflow.com/a/25973780
has answer: http://stackoverflow.com/a/25973784
has body: Here i have a simple piece of code.I want it to alert letters [A-Z] on pressing buttons on keyboard representing those letters.Till now it only alerting keyCodes.I know i can do that whit a switch statement.But it will be a large piece of switch statement. So my questions are: 1.Is there a way i can alert every letters by their name on keypress without a switch statement? 2.Left,right,up,down arrow keys are not alerting their keycode numbers.Why is that so??How can i overcome this problem?? (function(){ document.body.addEventListener('keypress',function(e){ alert(e.keyCode); }); })();
type: AnsweredQuestion
has title: alert letters by name on pressing keyboard buttons without using a switch statement
possible better answer: http://stackoverflow.com/a/25973784

http://stackoverflow.com/comment/40761941
score: 2
has text: @Goatsy you need to include jquery before the owl script since your js uses jquery first
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26023957

http://stackoverflow.com/q/25993415
has comment: http://stackoverflow.com/comment/40705485
has comment: http://stackoverflow.com/comment/40705509
tagged with: ajax
has body: please help to solve the problem. html: &lt;div class="modal fade" id="commonModal" tabindex="-1" role="dialog" aria-labelledby="commonModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&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" id="commonModalLabel"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; ... &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default but_cancel" data-dismiss="modal"&gt;Отменить&lt;/button&gt; &lt;button type="button" class="btn btn-primary but_ok" data-dismiss="modal"&gt;Ok&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; I send ajax request as follows: $('#commonModalLabel').text('Удалить профиль?'); $('#commonModal .modal-body').html('Возможность восстановить профиль будет доступна в течение двух недель. Для восстановления нужно отправить &lt;a href="mailto:prozaik81-2@yandex.ru"&gt;администратору&lt;/a&gt; ресурса письмо с почтового адреса, который был указан в профиле.'); $('#commonModal').modal('show'); $('#commonModal .but_ok').on('click', function(){ console.log('ok'); $.ajax({ url: "/accounts/delete_profile/", type: 'POST', dataType:"json", data: {}, success: function(data) { if(data.result == true){ $('#mySmallModalLabel').text('Профиль удалён'); $('#infoModal').modal('show'); } } }); }); views.py: def delete_profile(request): result = False if request.method == "POST" and request.is_ajax(): username = request.POST.get('username', '') try: entry = User.objects.get(username=username) entry.is_active = 0 entry.save() except: pass else: result = True data = { 'result': result, } return HttpResponse(json.dumps(data), content_type='application/json') the problem is that in the log, the following error message: Forbidden…
score: 0
has title: where to get the value when sending the request?
tagged with: python
type: UnansweredQuestion
tagged with: django
has answer: http://stackoverflow.com/a/25993552
type: Question
has answer: http://stackoverflow.com/a/25993574
answer count: 2
has comment: http://stackoverflow.com/comment/40705558
tagged with: javascript

http://stackoverflow.com/a/25914228
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25913399
has body: I am fairly certain it is because your injections ($scope &amp; $http) in the DiaryCtrl are not strings: .controller('DiaryCtrl', [$scope, $http, function ($scope, $http) should be: // Notice the added quotations around the scope and http injections in the array .controller('DiaryCtrl', ['$scope', '$http', function ($scope, $http) {
answers question: http://stackoverflow.com/q/25913399
has comment: http://stackoverflow.com/comment/40564301

http://stackoverflow.com/comment/40720508
has text: Now you've expanded the question to include headers. Is there anything else you'd like to add? If you're going to include browser extensions and developer tools, then there's absolutely nothing off limits, while a 3rd party script will have limitations to the data it can access.
comment on: http://stackoverflow.com/q/26001430
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40633151
has text: even I tried the same, but what if you voluntarily drag the scroll bar to such an extent that you land up in "div2" or "div4"? I didn't want that.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25953612

http://stackoverflow.com/q/25985452
score: 0
type: Question
tagged with: alert
tagged with: forms
has title: Double Alert Windows
has answer: http://stackoverflow.com/a/25985533
answer count: 2
tagged with: javascript
type: UnansweredQuestion
has body: I am getting double Alert prompts for a single form: The alert pops up the first time, then when I click OK, the same one pops open again. I think my code should do the alert once when it hits "else window.alert(sameWarning) and the stop when it reaches "return false()"; but it seems return false() is causing the alert twice. Maybe because I have two forms on one page; yet, they have two separate function names ("signinForm()" and "saveSignUp()")and call two separate forms (forms[0] and forms[1])? I think my code is correct, but I can't figure it out at this point. Any help would be appreciated. Thanks in advance! HTML Login Sign Up!
has answer: http://stackoverflow.com/a/25985505

jqgrid
tags question: http://stackoverflow.com/q/25981413
tags question: http://stackoverflow.com/q/25938535
tags question: http://stackoverflow.com/q/25991752
tags question: http://stackoverflow.com/q/25886911
tags question: http://stackoverflow.com/q/26008980
tags question: http://stackoverflow.com/q/25934038
tags question: http://stackoverflow.com/q/26017729
tags question: http://stackoverflow.com/q/25951831
type: Tag
tags question: http://stackoverflow.com/q/25942068
tags question: http://stackoverflow.com/q/26008972
tag name: jqgrid
tags question: http://stackoverflow.com/q/25918453
tags question: http://stackoverflow.com/q/25999045
tags question: http://stackoverflow.com/q/26030429

http://stackoverflow.com/a/26024813
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25995731
answers question: http://stackoverflow.com/q/25995731
type: Answer
has body: I could spot the error by looking at your code on the first go. But I wasn't sure, if that was the actual cause for the error. You are using the data array as var s1 = ['1.5', '3.0', '0.0', '0.0', '0.0', '3.0', '0.0']; jqPlot is trying to read the values from the data-array, and it expects an Integer or Decimal value(s). In your case, you are passing String values in the array. So all you need to do is remove the single quotes('') from the values. The array should be something like this, var s1 = [1.5, 3.0, 0.0, 0.0, 0.0, 3.0, 0.0]; //Remove quotes To confirm this, I ran your code thru JSFiddle. Here's the link JSFiddle Code Try both the arrays in the fiddle, values with quotes(var s1 = ['1.5', '3.0', '0.0', '0.0', '0.0', '3.0', '0.0'];) and without quotes(var s1 = [1.5, 3.0, 0.0, 0.0, 0.0, 3.0, 0.0]). The one with single quotes won't plot the bar-chart. Hope it helps.

http://stackoverflow.com/comment/40759859
type: Comment
type: QuestionComment
has text: ok but what is the +/- range?
score: 0
comment on: http://stackoverflow.com/q/26022976

http://stackoverflow.com/q/25914612
tagged with: css
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25914666
upvote count: 2
has title: Is there any way to set ::before element style in html tag?
has comment: http://stackoverflow.com/comment/40563804
type: Question
linked to: http://stackoverflow.com/q/20138454
tagged with: javascript
has comment: http://stackoverflow.com/comment/40563862
accepted answer: http://stackoverflow.com/a/25914666
duplicate of: http://stackoverflow.com/q/20138454
has body: You can set html tag style in css like this: .sample_style { position:absolute; ... } You can do this in html tag directly like this: But what about before element? You can do in css like .sample_style:before{} but how can i set this directly in html tag?
linked to: http://stackoverflow.com/q/5293280
downvote count: 0
answer count: 1
duplicate of: http://stackoverflow.com/q/5293280
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25994422
answers question: http://stackoverflow.com/q/25993763
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: When the row you deleted it containts model's input and input has name and id based on index. So when you delete row you have to update input's name and id that are in row after the deleted row.. or regenerate row next all from deleted row with new index name . Replace your delete function with this one function removeRow(selector) { if ($('#container tr').length &gt; 1) { $(selector).closest('tr').remove(); var itemIndex =0; $('#container tr').each(function(){ var this_row = $(this); this_row.find('input[name$=".BRANCH"]').attr('name','Adjustments[' + itemIndex + '].BRANCH');//replace name of input that ends the name BRANCH this_row.find('input[name$=".Amount"]').attr('name','Adjustments[' + itemIndex + '].Amount'); this_row.find('input[name$=".Id"]').attr('name', 'Adjustments[' + itemIndex + '].Id'); itemIndex ++; }); } }
accepted answer of: http://stackoverflow.com/q/25993763
score: 5
upvote count: 5

http://stackoverflow.com/q/26020126
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/26020474
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40754374
has answer: http://stackoverflow.com/a/26020666
has body: In a JavaScript callback function, I am displaying a Success/Failure message on my page. When I have the HTML content in one line as in the below code the message is added and everything works! $('#message').html(" Incorrect! ") But when I try to format the HTML for better readability, as in the below - nothing happens and I don't see the message that I am trying to add nor any error messages in the Firebug console. $('#message').html(" Incorrect! Yesterday was " + <%= @yesterday %> + " Click Next to continue. ") I am not sure what the issue is, and any help is appreciated!
has comment: http://stackoverflow.com/comment/40754305
possible better answer: http://stackoverflow.com/a/26020390
has comment: http://stackoverflow.com/comment/40754907
has answer: http://stackoverflow.com/a/26020390
accepted answer: http://stackoverflow.com/a/26020474
has comment: http://stackoverflow.com/comment/40754955
answer count: 5
tagged with: javascript
tagged with: jquery
has title: Format html inside .html() tag
has comment: http://stackoverflow.com/comment/40754647
linked to: http://stackoverflow.com/q/805107
type: AnsweredQuestion
score: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26020591
has answer: http://stackoverflow.com/a/26020537

http://stackoverflow.com/a/25919251
answers question: http://stackoverflow.com/q/25918876
upvote count: 4
has comment: http://stackoverflow.com/comment/40573139
score: 3
has comment: http://stackoverflow.com/comment/40573205
has comment: http://stackoverflow.com/comment/40572973
has comment: http://stackoverflow.com/comment/40573074
has comment: http://stackoverflow.com/comment/40573025
has body: Try this I added return false; after if (appendSize &gt;= 3) { ... and parseInt($(this).css("top"))&lt; 0 &amp;&amp; $(this).remove(); to animateBullet() to remove the bullets when they leave the screen
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25918876
type: Answer

http://stackoverflow.com/comment/40718751
type: QuestionComment
has text: This is the debug process in chrome 99 SOCKET_STREAM 109 SOCKET 1520 URL_REQUEST http://localhost:8383/MonasterioSiambon/contacto.php 1522 HTTP_STREAM_JOB http://localhost:8383/ 1523 HOST_RESOLVER_IMPL_REQUEST localhost:8383 1524 IPV6_REACHABILITY_CHECK 1525 UDP_SOCKET [2001:4860:4860::8888]:53 1526 CONNECT_JOB localhost:8383 1527 HOST_RESOLVER_IMPL_REQUEST localhost:8383 1528 IPV6_REACHABILITY_CHECK 1529 UDP_SOCKET [2001:4860:4860::8888]:53 1530 SOCKET localhost:8383
comment on: http://stackoverflow.com/q/26000172
score: 0
type: Comment

http://stackoverflow.com/a/25909235
has comment: http://stackoverflow.com/comment/40556561
has body: It's highly likely that you just need to wrap it in $(function() { /* code */ });. At present, your code is being stopped by the alert, which lets the document load in the background so by the time you close the alert, the page is ready for everything you're trying to do. By just telling it to wait until the page has finished loading, you shouldn't need the alert any more. $(function() { // code }); is exactly the same as $(document).ready(function() { // code });
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/40556778
type: Answer
answers question: http://stackoverflow.com/q/25909135
score: 4

http://stackoverflow.com/q/25980037
has comment: http://stackoverflow.com/comment/40687129
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40681456
answer count: 0
type: UnansweredQuestion
has title: Changing the name attribute of a input tag with Jquery to use a name with an index item[0] [qty]
type: Question
linked to: http://stackoverflow.com/q/111102
has body: I am trying to change the name attribute of an input. It is a sales order and has many inputs that collect the qty and item id. I want the name to index like this item[0] [qty] & item [0] [id] I was able to get most of it working however it is changing the name for all the inputs to the last one. For example I have 44 items. It is now making the name for all the inputs to be item[43] qty. Here is part of the code I have written. Thanks for any help you can provide. var showProduct = function(result) { var last = $('.display:last'); $(".display ").append(" " + result.id + " " + result.brand + " " + result.description + " " + result.packType + " " + result.packSize + " " + result.unitsPerPallet + " " + result.shippingWeight + " " + " " // + " " ); last.find('input').val([]); last.find('input').attr("name", "lineItem[" + i + "][qty]"); console.log(i); i++ };

http://stackoverflow.com/q/25943774
answer count: 1
tagged with: nivo-slider
has title: Trying to 'stagger' multiple Nivo-Sliders, but they are always in-sync
has body: I'm trying to stagger a Nivo Slider so that one starts 8000ms after page load, and the next one at 12000ms, and they stay stagggered 4000ms apart, sliding every 8000ms. I have a minimal JSfiddle showing the issue at: http://jsfiddle.net/0gfaaqp6/ - Basically trying to use a setTimeout on the 2nd slider as below: setTimeout($('#slider2').nivoSlider({pauseTime: 8000}), 4000); Even though I delay the start of the 2nd slider by 4000 ms, the sliders still sync up immediately. :( I have tried other attempts as well with a "beforeChange" function and delays, but I get the same results that way; two sliders always sync up. (Possible/slightly related question here.) Anyone have any ideas how to stagger the sliding with two nivo-sliders?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25944845
accepted answer: http://stackoverflow.com/a/25944845
tagged with: javascript
tagged with: jquery
score: 0
tagged with: slider

http://stackoverflow.com/q/25993073
tagged with: http://stackoverflow.com/tag/html
has body: I have a requirement where if I click a button a function is called which will 1. Open a given html link in new tab 2. And access the newly opened html's DOM I am trying something like this in my function call: function GenerateReport() { window.open('./qunit/EditOpenSave.html','_blank'); //////window.location.href = "./qunit/EditOpenSave.html"; document.getElementById("inputTextToSave").value = "Show me !!!"; } But here it successfully opens the link, while not accessing it's DOM. Please help..
has title: Open a html in new tab and access it's DOM element
has comment: http://stackoverflow.com/comment/40704751
upvote count: 1
tagged with: dom
has answer: http://stackoverflow.com/a/25993714
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25993714
type: AnsweredQuestion
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/1258563
score: 1
favorite count: 0
duplicate of: http://stackoverflow.com/q/1258563
type: Question

http://stackoverflow.com/comment/40749995
score: 0
has text: You are really far away from proper result. First read about AJAX and passing params from php to javascript and in opposite way.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26017789

http://stackoverflow.com/q/25926932
accepted answer: http://stackoverflow.com/a/25926975
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40586826
has body: I am trying to display the "[6] Peter who is 95 years old" value in text box which is hide.But It should show when the get my id is clicked. The name should be in name ng-model="name", age in ng-model="age". Example - example-example42-production I have {{friends.length}} friends. They are: [{{friend.id}}] {{friend.name}} who is {{friend.age}} years old. get my id but for this code is not working.
has answer: http://stackoverflow.com/a/25926975
type: Question
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40588130
has title: How to show the hide element in angular js?
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/25946127
score: 0
answers question: http://stackoverflow.com/q/25946059
has body: Value of selected index is to provide the required value, so you can initialize it: function getValue(){ var emailSelectedUser = document.getElementById("names").value; alert(emailSelectedUser) } User Name User 2
type: Answer

http://stackoverflow.com/q/25907433
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Why browsers auto complete(auto suggestion) in text field Jquery form validations not trigger?
has comment: http://stackoverflow.com/comment/40550850
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1479255
has body: Problem with browsers Auto suggestions. For example prefilling the user's address based on earlier user input... Some conditions autocomplete="on". i am using "jQuery Validation Plugin 1.11.1". I am filling the wrong data and click the submit, form validations trigger next i filled date with browsers Auto suggestions this case form validations not trigger. Any buddy know update the solution. [Fiddle][1]. First click the submit button next enter the values you observe. next time click auto suggestion or auto complete -> error message still exit up to focus out... [2]: http://jsfiddle.net/thiru715/57oyLjzh/2/ ` ` [1]: https://i.sstatic.net/PDJv8.png
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25907992
score: 0

http://stackoverflow.com/comment/40673713
score: 1
comment on: http://stackoverflow.com/q/25975875
has text: Does the `div` have any actual content that can be clicked on? (Maybe a silly question, but the code provided *works* so the problem must be something else...)
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26016286
has comment: http://stackoverflow.com/comment/140145131
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25991825
answers question: http://stackoverflow.com/q/25991825
type: Answer
upvote count: 3
score: 3
has body: I found a solution to both my questions. By reducing the amount of iterations spent on minimizing the amount of edge crossings the ordering stays consistent and deterministic (but of course not ideal in all cases). A transition can be easily enabled by the designated function on the renderer. var renderer = new dagreD3.Renderer(); // Disable the edge crossing minimization ordering renderer.layout(dagre.layout().orderIters(-1)); // Enable a transition renderer.transition(function(selection) { return selection.transition().duration(500); }); Dagre is really a great library. Updated fiddle for your enjoyment available here: http://jsfiddle.net/gke2dann/1/

http://stackoverflow.com/q/25952864
has comment: http://stackoverflow.com/comment/40632077
tagged with: node.js
has answer: http://stackoverflow.com/a/25954800
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40631738
tagged with: javascript
has comment: http://stackoverflow.com/comment/40634036
has comment: http://stackoverflow.com/comment/40632034
score: 0
has body: I am trying to send an array of users that are connected to the server and send them to the client where I will loop through them. app.js io.on('connection', function (socket) { socket.on('users', function (data) { var clients = io.sockets.sockets; socket.emit('clients', { user : clients }); }); }); index.html socket.emit('users', { }); socket.on('clients', function(data) { console.log(data); //for(var obj in data) { // console.log(data[obj]); //} }); The problem I am having is that it's throwing a RangeError on when trying to pass the users to the client. There are two questions - Am I doing this correctly? I am new to node.js and networking / server coding as a whole Why would I get a RangeError.
has title: Sending connect users to client causes Range Error
has comment: http://stackoverflow.com/comment/40631933
has comment: http://stackoverflow.com/comment/40631831
has comment: http://stackoverflow.com/comment/40632222
type: UnansweredQuestion

http://stackoverflow.com/q/26020324
has answer: http://stackoverflow.com/a/26981561
tagged with: javascript
has body: I'm creating a force chart that has expandable/collapsible parts. I am trying to integrate a zooming/panning feature into the chart, but its only working when you interact (pan/mousewheel) on an actual node - not essentially the chart itself. http://jsfiddle.net/NYEaX/837/ var svg = d3.select("#chartHolder") .append("svg") .attr("width", width) .attr("height", height) .attr("pointer-events", "all") .append('svg:g') .call(d3.behavior.zoom().on("zoom", redraw)) .append('svg:g'); http://jsfiddle.net/nrabinowitz/QMKm3/ ^ this example is what I am trying to mimic - and it works accordingly to interacting with empty spaces in the chart.
score: 0
has comment: http://stackoverflow.com/comment/40756957
has title: d3.js Force Chart with zoomable/pan
answer count: 1
tagged with: d3.js
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/25956955
has comment: http://stackoverflow.com/comment/40639812
has body: That's a classical mistake. You have defined i as a global var, so after your for loop the value of i will be = 2. When you click the element it will always call task[2] which is undefined. To do what you want to do, you can call this inside the functon task[i].onclick = function(){ console.log(this.id); }
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25956851
answers question: http://stackoverflow.com/q/25956851
type: Answer

http://stackoverflow.com/q/25914858
has answer: http://stackoverflow.com/a/25914914
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25914988
type: Question
score: 3
tagged with: image
tagged with: class
has answer: http://stackoverflow.com/a/25915341
tagged with: javascript
upvote count: 3
answer count: 3
has title: css - change an image frequently with less server requests
tagged with: http://stackoverflow.com/tag/html
has body: I have a in html. Its content is described in css. With different functions the classname of the div is changed to imageholder1,2 etc. .imageholder1 { content: url('image1.png')} .imageholder2 { content: url('image2.png')} But I think this causes multiple server requests , each time the classname is changed. Is there a way to reduce the server requests to the image file. I would like a way to store the image into a variable and then point it from css code. Is it possible? I also tried to use a css image sprite but I need to need a more flexible way.
tagged with: css
has comment: http://stackoverflow.com/comment/40564237
favorite count: 0

http://stackoverflow.com/q/25917023
has title: Spy on Jquery addClass function not working
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25923008
tagged with: jasmine
has answer: http://stackoverflow.com/a/25923008
type: AnsweredQuestion
has body: I'm trying to test whether the Jquery addClass fnuction has been called: var data = " Login Methods: SMS Voice "; function injectOption() { console.log('in injectOption'); data = $(data).addClass('some-class')[0].outerHTML; console.log('data is now'); console.log(data); } describe("Our data array", function() { beforeEach(function () { }); it('jquery.addClass called', function () { injectOption(); spyOn($.fn, 'addClass'); expect($.fn.addClass).toHaveBeenCalled(); }); }); Check out the jsFiddle here. Somehow though, it always fails even though i can see in the console logs that the class was added...
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40855462
has text: ok I will search for that , although I've already searched a lot,and <all_urls> permission exists, anyway my last question if you're certain that I can capture any window by captureVisibleTab and that's all , thank you
type: Comment
comment on: http://stackoverflow.com/a/26031212
score: 0
type: AnswerComment

http://stackoverflow.com/q/25948232
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25948296
has answer: http://stackoverflow.com/a/25948302
has comment: http://stackoverflow.com/comment/40643750
type: Question
score: 0
has body: Right now I have the code: $.get("test.php", function(($cars){ $cars = cars; }, "json"); $(function(cars){ $.each(cars, function(i, startList){ if(iNLarr[i]){ iNLarr[i](startList.name); } }); }); Ok I'm assigning the $cars array to the cars variable. Basically $cars is an array of objects, each object is an associative array. I need to be able to work on the array so I assigned it to the variable first. The next function uses the information in cars and displays it in html elements. iNLarr is an array of functions each function changing a replacing name html elements with the name retrieved from the $cars array of objects. Whenever I run the function I get something back like array.prototype.map is not a valid parameter. I am thinking that startList is a made up parameter that I was hoping would be assigned to the objects so I could retrieve each name, but I'm guessing that's not the case, can anyone help me. I'm alos not sure I've defined the function properly.
has comment: http://stackoverflow.com/comment/40623917
tagged with: arrays
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/14220321
answer count: 3
possible better answer: http://stackoverflow.com/a/25948257
accepted answer: http://stackoverflow.com/a/25948302
has answer: http://stackoverflow.com/a/25948257
tagged with: php
has title: Assigned parameters and defining functions, jQuery
upvote count: 1

http://stackoverflow.com/comment/40673414
comment on: http://stackoverflow.com/q/25975774
type: Comment
type: QuestionComment
has text: _"I'm just asking this for learning purposes"_ - Well then for learning purposes you should know that trying to use regex to parse whole html documents is not recommended.
score: 1

http://stackoverflow.com/a/25900682
type: Answer
has comment: http://stackoverflow.com/comment/40546057
has body: You want to use: showHeaderCheckbox :false See example below: Ext.create('Ext.data.Store', { storeId: 'simpsonsStore', fields: ['name', 'email', 'phone'], data: { 'items': [{ 'name': 'Lisa', "email": "lisa@simpsons.com", "phone": "555-111-1224" }, { 'name': 'Bart', "email": "bart@simpsons.com", "phone": "555-222-1234" }, { 'name': 'Homer', "email": "home@simpsons.com", "phone": "555-222-1244" }, { 'name': 'Marge', "email": "marge@simpsons.com", "phone": "555-222-1254" }] }, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } }); var grid = Ext.create('Ext.grid.Panel', { title: 'Simpsons', id: 'sheetproductionrestin', store: Ext.data.StoreManager.lookup('simpsonsStore'), selModel: Ext.create('Ext.selection.CheckboxModel', { checkOnly: true, showHeaderCheckbox: false, //here is where it is added. mode: 'MULTI' }), listeners: { cellclick: function (sender, td, cellIndex, record, tr, rowIndex, e, eOpts) { clickedColIndex = cellIndex; }, beforedeselect: function (rowmodel, record, index, eOpts) { return (clickedColIndex == 0); } }, columns: [{ header: 'Name', dataIndex: 'name', editor: { xtype: 'textfield' } }, { header: 'Email', dataIndex: 'email', flex: 1 }, { header: 'Phone', dataIndex: 'phone' }], height: 200, width: 400, renderTo: Ext.getBody(), plugins: [Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1, pluginId: 'cellplugin' })] // ... });
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/25894275
has comment: http://stackoverflow.com/comment/40565317
downvote count: 0

http://stackoverflow.com/q/25956744
has comment: http://stackoverflow.com/comment/40640103
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/40638742
has body: I have a html code that is supposed to create a xmlDoc object, read an XML code into it from a file, get a value of a node and print it on screen. However, the code below is executed but does not read the value. What I get is just empty string I guess. I tried .firstChild and the result was the same: <text> is :) Between "<text> and "is :)" I'd expect "My child no 1.". Thanks for any help. The html code: Test html XML test_xml.xml code: <?xml version="1.0" encoding="UTF-8" ?> My child no 1. My child no 2. My child no 3. My child no 4. and loadXMLDoc function in loadxmldoc.js file: function loadXMLDoc(filename) { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } else { // code for IE5 and IE6 xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",filename,false); xhttp.send(); return xhttp.responseXML; }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26005819
has title: How to obtain a value of a node in a XML file. Not working code

http://stackoverflow.com/a/42184188
score: 0
has comment: http://stackoverflow.com/comment/80610179
has body: a pure css method base on -webkit-line-clamp, and you can custom the ...more content like a boss: @-webkit-keyframes ellipsis {/*for test*/ 0% { width: 622px } 50% { width: 311px } 100% { width: 622px } } .ellipsis { max-height: 40px;/* h*n */ overflow: hidden; background: #eee; -webkit-animation: ellipsis ease 5s infinite;/*for test*/ /** overflow: visible; /**/ } .ellipsis .content { position: relative; display: -webkit-box; -webkit-box-orient: vertical; -webkit-box-pack: center; font-size: 50px;/* w */ line-height: 20px;/* line-height h */ color: transparent; -webkit-line-clamp: 2;/* max row number n */ vertical-align: top; } .ellipsis .text { display: inline; vertical-align: top; font-size: 14px; color: #000; } .ellipsis .overlay { position: absolute; top: 0; left: 50%; width: 100%; height: 100%; overflow: hidden; /** overflow: visible; left: 0; background: rgba(0,0,0,.5); /**/ } .ellipsis .overlay:before { content: ""; display: block; float: left; width: 50%; height: 100%; /** background: lightgreen; /**/ } .ellipsis .placeholder { float: left; width: 50%; height: 40px;/* h*n */ /** background: lightblue; /**/ } .ellipsis .more { position: relative; top: -20px;/* -h */ left: -50px;/* -w */ float: left; color: #000; width: 50px;/* width of the .more w */ height: 20px;/* h */ font-size: 14px; /** top: 0; left: 0; background: orange; /**/ } text text text text text text text text text text text text text text text text text text text text text ...more
type: Answer
answers question: http://stackoverflow.com/q/26002974
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/26026881
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26031163
type: Question
has title: Jison: Conflict in grammar when if-else and for statements ara combined
tagged with: if-statement
tagged with: javascript
score: 0
tagged with: for-loop
answer count: 1
tagged with: parsing
tagged with: jison
has body: I want to make a parser for a subset of JavaScript language with jison and I have some problems. At first I had this definition for nonterminal stmt and it works: stmt : FOR LPAREN varlist_decl SEMICOLON expr SEMICOLON expr RPAREN stmt {$$ = ['for ('].concat($3, ['; '], $5, ['; '], $7, [') '], $9)} | varlist_decl {$$ = $1} | expr {$$ = $1} | LBRACE stmts RBRACE {$$ = ['{', 0, 1].concat($2, [0, -1, '}'])} ; After, I added the following rules in stmt: : IF LPAREN expr RPAREN stmt {$$ = ['if ('].concat($3, [') '], $5)} | IF LPAREN expr RPAREN stmt ELSE stmt {$$ = ['if ('].concat($3, [') '], $5, [0, 'else '], $7)} This grammar is ambiguous and conflict appears. So I followed these pattern to solve the dangling else ambiguity: stmt : IF LPAREN expr RPAREN stmt | IF LPAREN expr RPAREN stmt ELSE stmt | other_stmt ; It must be transformed into: stmt : closed_stmt | non_closed_stmt ; closed_stmt : IF LPAREN expr RPAREN closed_stmt ELSE closed_stmt | other_stmt ; non_closed_stmt : IF LPAREN expr RPAREN stmt | IF LPAREN expr RPAREN closed_stmt ELSE non_closed_stmt ; This is current part of my grammar: stmt : closed_stmt {$$ = $1} | non_closed_stmt {$$ = $1} ; closed_stmt : IF LPAREN expr RPAREN closed_stmt ELSE closed_stmt {$$ = ['if ('].concat($3, [') '], $5, [0, 'else '], $7)} | FOR LPAREN varlist_decl SEMICOLON expr SEMICOLON expr RPAREN stmt {$$ = ['for ('].concat($3, ['; '], $5, ['; '], $7, [') '], $9)} | varlist_decl {$$ = $1} | expr {$$ = $1} | LBRACE stmts RBRACE {$$ = ['{', 0, 1].concat($2, [0, -1, '}'])} ; non_closed_stmt : IF LPAREN expr RPAREN stmt {$$ = ['if ('].concat($3, [') '], $5)} | IF LPAREN expr RPAREN closed_stmt ELSE non_closed_stmt {$$ = ['if ('].concat($3, [') '], $5, [0, 'else '], $7)} ; and this part only work when I comment the for-statement rule. How do you fix it? Here is my full code repository: https://github.com/xgbuils/if-for-grammar-issue

http://stackoverflow.com/comment/40584768
has text: http://jsfiddle.net/f2hwheuz/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25924132

http://stackoverflow.com/comment/40614032
has text: Possible duplicate of http://stackoverflow.com/questions/14895016/event-preventdefault-not-working-for-routechangestart-in-angularjs-app
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25941848

http://stackoverflow.com/a/26009923
type: Answer
has comment: http://stackoverflow.com/comment/40960889
has comment: http://stackoverflow.com/comment/40859114
has body: HTML 5 WITH CSS FIX | No Jquery Needed or java I went ahead and designed some mark up for you so at-least you have something to start with. You can copy this code and play around with it. There are some key points in your CSS for this to work please keep this in mind and you will do just fine: Your Embedded Video Has To Have A the lowest z-index Your width for your video must be set to 100% You must put !Important right behind the 100% You must Use a Fixed Or Absolute Position for all your "divs" If you do not you can not use the z-index option in CSS Heres Your Mark Up & I hope this helps you! /* YOUR CSS */ 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, mark, audio, video { margin: 0; padding: 0; border: 0; vertical-align: baseline; } #wrapper { position: absolute; top: 0; left: 0; border: 0; z-index: 1; /* <-- this plays a key roll for it to work */ width: 100% !important /* <-- this plays a key roll for it to work */ height: 100%; margin:0; padding:0; } /* Your can customize any div how ever you want this is just an example */ #login { position: absolute; z-index:2; /* <-- this plays a key roll for it to work */ left:45%; top:60%; width:250px; height:100px; background-color: rgba(255,255,255,1.0); background: -webkit-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(top, rgba(255,255,255,0.8), rgba(99,99,99,0.8)); /* For Firefox 3.6 to 15 */ background: linear-gra…
has comment: http://stackoverflow.com/comment/41016889
has comment: http://stackoverflow.com/comment/40986425
score: 9
has comment: http://stackoverflow.com/comment/40870077
upvote count: 9
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41034775
has comment: http://stackoverflow.com/comment/41078669
has comment: http://stackoverflow.com/comment/40962568
has comment: http://stackoverflow.com/comment/40910707
answers question: http://stackoverflow.com/q/26008183
has comment: http://stackoverflow.com/comment/41000423
has comment: http://stackoverflow.com/comment/40798113
accepted answer of: http://stackoverflow.com/q/26008183

http://stackoverflow.com/q/25967874
has answer: http://stackoverflow.com/a/25967993
type: Question
answer count: 2
has body: I have added some text element in the Window, while selecting the screen the text in the DOM get selected as below i have mentioned "pointer-events": "all", for text element, but his not working. Can anyone suggest some way Thanks in advance
tagged with: javascript
tagged with: jquery
has title: Text in the dom get selected when click the screen
score: 0
has answer: http://stackoverflow.com/a/25967889
type: UnansweredQuestion

drop-down-menu
tags question: http://stackoverflow.com/q/25896335
tags question: http://stackoverflow.com/q/25996231
tags question: http://stackoverflow.com/q/26011739
tags question: http://stackoverflow.com/q/26013412
tags question: http://stackoverflow.com/q/26021524
tags question: http://stackoverflow.com/q/25935863
tags question: http://stackoverflow.com/q/25917030
tags question: http://stackoverflow.com/q/25905364
tags question: http://stackoverflow.com/q/25874927
type: Tag
tags question: http://stackoverflow.com/q/26020621
tags question: http://stackoverflow.com/q/25995739
tag name: drop-down-menu
tags question: http://stackoverflow.com/q/25920759
tags question: http://stackoverflow.com/q/25911812
tags question: http://stackoverflow.com/q/25996115
tags question: http://stackoverflow.com/q/25952505

http://stackoverflow.com/a/26001917
has body: select { min-width:300px; }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26001809

http://stackoverflow.com/a/25905623
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40551929
has body: Give a ID to the select element. Ex : id="genre" And then use : var x = document.getElementById("genre").value; alert("You selected: " + x);
type: Answer
has comment: http://stackoverflow.com/comment/40555613
has comment: http://stackoverflow.com/comment/40559296
has comment: http://stackoverflow.com/comment/40568582
accepted answer of: http://stackoverflow.com/q/25905364
answers question: http://stackoverflow.com/q/25905364

http://stackoverflow.com/q/25957011
type: UnansweredQuestion
has body: I have 3 tabs in my application and common save button for all these tabs and need to validate these forms using angularjs.My requirement is I need to disable save button and highlight the tab(s) if any tab has invallid data and enable save button only if all the forms data is valid. Please give me some idea how to achieve this using bootstrap and angularjs. Thanks in advance
score: 0
has answer: http://stackoverflow.com/a/25957100
has title: Angularjs form validation using Bootstrap
type: Question
answer count: 1
tagged with: javascript
tagged with: angularjs
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/40771042
has text: You're right, it works in Chrome, but I need something that works across the board. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/26028549
score: 0
type: Comment

http://stackoverflow.com/comment/40533622
has text: so why then `$("#sellbuy").after(cars()) ;` is triggered two times also.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25897803
type: Comment

http://stackoverflow.com/comment/40756297
has text: I tried using autoBind=false, and then make sure the drop down array has been populated before calling dataSource.read() (which according to the docs will bind the grid), but it still does not work. Very strange - not sure what I am missing. Here is an updated plunker: http://plnkr.co/edit/ZjuK9wk3Zq80yA0LIIWg?p=preview Could you please update the plunker to demonstrate your solution?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25985468
type: Comment

http://stackoverflow.com/q/26033441
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26033510
favorite count: 0
has title: Pass dynamic json object value from dropdown
answer count: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/26033510
type: AnsweredQuestion
has body: I am storing field value (Sales, ProductName) from json in an array named 'data[]' and 'name[]'. Below is the code which works fine. function onCompletedCallback(response, eventArgs) { var chartlist = eval("(" + response.get_responseData() + ")"); var markup = " "; //Display the raw JSON response markup += response.get_responseData(); // alert(markup); var jsonData=jQuery.parseJSON(markup); // alert(jsonData); //declaring arrays var name = []; var data = []; $.each(jsonData.d.results, function (index, value) { data.push(value.Sales); name.push(value.ProductName); }); } Now what I want to pass field values from dropdown(ddlxField) in my UI, which holds all the fieldname of the list and pass it to json object while pushing data in 'name' array. For now am choosing 'ProductName' form dropdown, i.e, xName=ProductName var xName = document.getElementById("ddlxField").value; $.each(jsonData.d.results, function (index, value) { data.push(value.Sales); name.push(value.xName); // xname value= ProductName }); But after execution, xName is coming out to be undefined. can anyone suggest what else can be done or where am going wrong?

http://stackoverflow.com/comment/40496491
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25877262
has text: use the panTo and setZoom methods

http://stackoverflow.com/q/25949168
has comment: http://stackoverflow.com/comment/40625491
answer count: 0
type: UnansweredQuestion
has body: I am using IIS server, and writing few test pages, with just JavaScript. xmlhttp.open("GET", encodeURIComponent(foo), true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8"); xmlhttp.send(); This xmlHttp request gets the content of a text file (saved in unicode format). While I am able to get the content of file, but some characters like ' look weird with question mark tag. In response header I could see: Content Type: application/x-javascript The page in which, this data in getting updated has meta tag as follows : &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; Thanks for time.
has comment: http://stackoverflow.com/comment/40625290
tagged with: character-encoding
type: Question
score: 0
has title: Javascript (ajax GET request) weird characters in browsers (IE, Firefox etc)
tagged with: javascript
tagged with: unicode
tagged with: ajax

opencv
type: Tag
tag name: opencv
tags question: http://stackoverflow.com/q/26010360
tags question: http://stackoverflow.com/q/25920006

http://stackoverflow.com/a/25895480
has comment: http://stackoverflow.com/comment/47582456
has comment: http://stackoverflow.com/comment/40530115
has comment: http://stackoverflow.com/comment/40529903
has comment: http://stackoverflow.com/comment/40529944
has comment: http://stackoverflow.com/comment/40529383
has comment: http://stackoverflow.com/comment/40530051
upvote count: 4
has comment: http://stackoverflow.com/comment/40530283
has body: This is a wrong implementation of the promise pattern. Your 'employee' service should return a promise also that gets initialized and then returns the same resolved promise upon subsequent requests. Something like this: .factory('Employees', ['$q', '$http', function($q, $http) { var _deferred = $q.defer(); $http.get('res/employees.json') .success(function(data, status, headers, config) { // this callback will be called asynchronously // when the response is available _deferred.resolve(data); }) .error(function(data, status, headers, config) { // called asynchronously if an error occurs // or server returns response with an error status. _deferred.reject("Error"); }); }; return { getEmployees: function(){ return _deferred.promise; } } }]); .controller('MyController', ['$scope', 'Employees', function($scope, Employees) { $scope.employees = []; $scope.employees = Employees.getEmployees(); }]); $scope.employees will initially be an empty array until the promise is resolved. Also, this code does not have error recovery.
accepted answer of: http://stackoverflow.com/q/25894133
type: AcceptedAnswer
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25894133
has comment: http://stackoverflow.com/comment/40530206
type: Answer

http://stackoverflow.com/a/25873943
has body: Only the jQuery .contents() method returns all nodes (including text nodes, normally ignored). So maybe something like this?: http://jsfiddle.net/ykv3gf5L/2/ $('.content').each(function () { var open = false; var result = $(); $(this).contents().each(function () { var $this = $(this); if ($this.text() == "spoiler") { if (open) { result.wrapAll('&lt;div style="border:solid 1px black;"&gt;&lt;/div&gt;'); open = false; } else { result = $(); open = true; } } else { result = result.add($this) } }); if (open) { result.wrapAll('&lt;div style="border:solid 1px black;"&gt;&lt;/div&gt;'); } }); It just iterate all nodes and based on a flag starts a new collection, or wraps the nodes found. The final if (open) allows for an unclosed spolier block within a content classed div. Notes: $() is an empty jQuery collection (like an empty array but for jQuery objects) I suggest you use a style for your spoilers and use a class e.g. result.wrapAll('&lt;div class="spoiler"&gt;&lt;/div&gt;'); e.g. http://jsfiddle.net/ykv3gf5L/3/
accepted answer of: http://stackoverflow.com/q/25873650
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25873650
type: Answer
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/comment/40696350
comment on: http://stackoverflow.com/q/25988057
has text: What shows your network sniffer in e.g. Google Chrome when you perform the second AJAX request?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40625277
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25949151
has text: I'm on Ubuntu 13.10; jake version 8.0.9

http://stackoverflow.com/comment/40743897
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25989742
type: AnswerComment
has text: By using your code i get the output as the same before. my problem is that i cant display the data in webpage. i mean in html the data doesn't parse through JSON

http://stackoverflow.com/comment/40727651
score: 0
type: AnswerComment
type: Comment
has text: Ok, if password length is smaller the 0 than it's ok?
comment on: http://stackoverflow.com/a/26005243

http://stackoverflow.com/comment/40776286
score: 0
type: QuestionComment
type: Comment
has text: it is not delaying page now, directly going to server controller.
comment on: http://stackoverflow.com/q/26032126

http://stackoverflow.com/comment/40529110
type: Comment
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/25895489
has text: So add a class or id to the HTML...? You could find the div by index or ordinal position in the document, but that is not very robust and will be very easy to break.

http://stackoverflow.com/comment/40589518
type: Comment
score: 2
has text: What does `It does not work` mean?
comment on: http://stackoverflow.com/q/25928509
type: QuestionComment

http://stackoverflow.com/a/25882291
has comment: http://stackoverflow.com/comment/40525953
score: 1
has body: I believe that you are looking for something like this... function displayStatus(fromDate,toDate) { var status; var today = new Date(); today = Date.parse(today); if(today &gt;= fromDate &amp;&amp; today &lt;= toDate) { status = 'In Progress'; } else if(today &gt; toDate) { status = 'Workshop Finished'; } else { status = 'Workshop To Come'; } return status; } &lt;script&gt; window.onload = function(){ var startDate = new Date(2014,1,6); //6th February var endDate = new Date(2014,2,13); //13th March 2014 document.write(displayStatus(Date.parse(startDate), Date.parse(endDate))); }; &lt;/script&gt; Here are some other helpful resources: Compare two dates with JavaScript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
accepted answer of: http://stackoverflow.com/q/25882009
has comment: http://stackoverflow.com/comment/40507133
answers question: http://stackoverflow.com/q/25882009
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40552927
score: 1
has text: Why are you writing JSON in a string literal ? Are you really writing this string in JavaScript ?
comment on: http://stackoverflow.com/q/25908646
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40704232
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25990962
has text: well, you are right on that. I will try to make a strip down version first which works and then see where it breaks. I will comment here if I will get some version working. Thanks for the idea.
type: AnswerComment

http://stackoverflow.com/comment/40529648
comment on: http://stackoverflow.com/q/25895648
has text: Why don't you debug in IDE? Did you check the logs? Also, print some message in between lines and see if those are displaying. You will know where it is erring out.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40632892
comment on: http://stackoverflow.com/q/25951490
score: 0
type: Comment
type: QuestionComment
has text: @jfriend00 I updated the post with a few details about my problem.

http://stackoverflow.com/q/25877218
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has title: javascript object, method to toggle values of different properties and striving to write DRY code
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25877455
tagged with: object
tagged with: methods
has body: I am trying to write a method for my object that listens for a button to be clicked and depending on which button is clicked toggle that corresponding object property between 1 and 0. I may be way off track but can i accomplish this with one method and the "this" keyword? my code below is my progress but I am stuck.http://jsfiddle.net/eh8L5cg1/ &lt;input type="button" id="buttonOne" value="toggle buttonOne" /&gt; &lt;input type="button" id="buttonTwo" value="toggle buttonTwo" /&gt; &lt;input type="button" id="buttonThree" value="toggle buttonThree" /&gt; var controlPannel = { buttonOne : 0, buttonTwo : 0, buttonThree : 0 toggleState: function() { $('button').click( function() { if (controlpannel.this == 0 ) { controlpannel.this = 1; } else { controlpannel.this = 0; } }); } }
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25877455
tagged with: logic
type: Question

http://stackoverflow.com/q/25899113
has comment: http://stackoverflow.com/comment/40536013
has body: I am trying to get a value from a select list that will determine what my form method is, either get or post. I am having trouble doing this though. Any suggestions? GET POST JS function myFunction(input){ alert("You typed in : " + input); } function load(){ alert("Page Loaded! This is the current text in the textbox : "+ document.getElementsByName('search')[0].value); } func window.onload = load; Any help will be greatly appreciated! Thanks!
has comment: http://stackoverflow.com/comment/40535915
type: Question
accepted answer: http://stackoverflow.com/a/25899326
score: 0
has answer: http://stackoverflow.com/a/25899303
answer count: 2
linked to: http://stackoverflow.com/q/4076770
linked to: http://stackoverflow.com/q/1085801
tagged with: javascript
has comment: http://stackoverflow.com/comment/40535931
possible better answer: http://stackoverflow.com/a/25899303
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25899326
linked to: http://stackoverflow.com/q/2780566
type: AnsweredQuestion
has title: How to get values from select list?
has comment: http://stackoverflow.com/comment/40535987

http://stackoverflow.com/a/25975328
answers question: http://stackoverflow.com/q/25975034
type: Answer
has body: Working jsfiddle here http://jsfiddle.net/bevanr01/705u9w1a/ // settings var $slider = $('.slider'); // class or id of carousel slider var $slide = 'li'; // could also use 'img' if you're not using a ul var $transition_time = 1000; // 1 second var $time_between_slides = 3000; // 4 seconds function slides() { return $slider.find($slide); } slides().hide(); // set active classes slides().first().addClass('active'); slides().first().fadeIn($transition_time); // auto scroll $interval = setInterval( function () { var $i = $slider.find($slide + '.active').index(); slides().eq($i).removeClass('active'); slides().eq($i).fadeOut($transition_time, function() { if (slides().length == $i + 1) $i = -1; // loop to start slides().eq($i + 1).fadeIn($transition_time); slides().eq($i + 1).addClass('active'); }); }, $transition_time + $time_between_slides); Your transitions are happening simultaneously so it isn't transitioning smoothly. You should also hide the elements initially instead of fading out to prevent the initial behavior.
score: 0

http://stackoverflow.com/comment/40677305
type: Comment
has text: @Bergi have you really tested it? It works perfectly fine. It's basically the same as following: [Coffeescript-style classes](https://github.com/njoubert/inheritance.js/blob/master/INHERITANCE.md#2-coffeescript-style-classes).
comment on: http://stackoverflow.com/a/25975398
type: AnswerComment
score: 0

http://stackoverflow.com/q/25962225
has body: I've been trying to make a very simple angular app to create a more visually appealing portoflio, but I can't seem to get through this error. I've tried many things without success and was hoping you guys could help me indentify the mistake. Thanks in advance! The error: Error: Argument 'MainController as portfolio' is not a function, got undefined at Error (native) Here's the code for the html & js: Javascript: (function() { var app = angular.module('PortfolioApp',[]); app.controller('MainController', function(){ this.projects = projects; }); var projects = [<info>]; })(); HTML: Luis Lamadrid - Projects {{ understand }} {{ project.name }} - {{ project.started_date }} {{ project.description }} Developed on: {{ project.framework }}
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25962429
tagged with: javascript
has title: Angular '<controller> as <variable>' is not a function, got undefined at Error (native)
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25962564
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40649170
type: Question
has comment: http://stackoverflow.com/comment/40649106

http://stackoverflow.com/a/25889908
answers question: http://stackoverflow.com/q/25889533
has body: By focus i guess, you want the user to look at it?? For doing that one could change the background color, or add border or change text color or some DOM manipulation to attract attention from user for the particular &lt;td&gt;
type: Answer
score: 0

http://stackoverflow.com/a/25919181
answers question: http://stackoverflow.com/q/25916949
has body: Okay I figured it out. I was using the following: new Date("2014, 01, 01") which IE and Safari won't parse properly. I just removed the quotes, and everything appears to be working properly. The odd thing is that it will NOT throw an error in the console, but when you look the objects it will say "Invalid Date". I'm also not sure why this would impact the array.length property, but it does (at least in IE/Safari). So for those that maybe using the same format, just remove the quotes: new Date(2014, 01, 01)
score: 0
type: Answer

http://stackoverflow.com/comment/40514766
has text: Thanks for you time! I appreciate it very much! The focus part is a nice frontend decision. And the length part is also an improvement. Also returning the hasError variable instead of checking first is the best. You answer certainly helped me!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25887064
score: 0

http://stackoverflow.com/q/25941379
has title: Why Transform.rotateZ does not rotate my Surface clockwise
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25982319
favorite count: 0
has answer: http://stackoverflow.com/a/25982319
score: 2
downvote count: 0
tagged with: famo.us
type: AnsweredQuestion
has body: I play around with the Famo.us transformations, and I noticed a strange behavior with rotations. A little explanation is necessary for you to understand what's really going on. Each time you click the blue button, the red surface rotate 90 degrees. The first, second and fourth rotations going clockwise. Very well ! But the third rotation, when you go from 180 degrees to 270 degrees, is performed anticlockwise. Here is my code : define('main', function(require, exports, module) { var Engine = require('famous/core/Engine'); var Surface = require('famous/core/Surface'); var Transform = require('famous/core/Transform'); var StateModifier = require('famous/modifiers/StateModifier'); var mainContext = Engine.createContext(); var theta = 0; var button = new Surface({ size:[200, 25], content: 'Click me to rotate the red cube', properties: { color:'white', backgroundColor:'blue'} }); var cube = new Surface({ size:[100, 100], content: 'I\'m a cube', properties: { color:'white', backgroundColor:'red'} }); buttonMod = new StateModifier({ origin: [0, 0] }); cubeMod = new StateModifier({ origin: [.5, .5] }); mainContext.add(buttonMod).add(button); mainContext.add(cubeMod).add(cube); button.on('click', function() { rotateClockWise(); }); function rotateClockWise() { theta += Math.PI / 2; cubeMod.setTransform(Transform.rotateZ(theta), {duration: 300}); } }); For testing purpose I made a little JSFiddle visible here : http://jsfiddle.net/qb1rceLz/ Nevertheless the documentation says : Transform.rotateZ(theta) Return a Transform which represents a clockwise rotation around the z axis. Did I missed something, or do you know any workaround to fix this behaviour ? EDIT : Here is a JSFiddle with my integration of the Talves solution, hope this could help someone : http://jsfiddle.net/7rbkLrtn/
has comment: http://stackoverflow.com/comment/40633860
has comment: http://stackoverflow.com/comment/40613908
has comment: http://stackoverflow.com/comment/40634022
tagged with: rotatetransform
type: Question
upvote count: 2
tagged with: transform
tagged with: rotation

http://stackoverflow.com/a/25877887
has comment: http://stackoverflow.com/comment/40511460
has comment: http://stackoverflow.com/comment/40849310
has body: In your main.js you'll probably just want to require Cloud Functions. Utility and service objects like util.js don't need to be there. In main.js you can use the require('cloud/someCloudFunction.js') pattern by itself. But in other files, if you want to require an object, your var util = require('cloud/util.js') pattern is correct. But make sure you're exporting the filter function from inside util.js correctly. For example, in utils.js, you should have something like this: module.exports = { filter: function(something) { /* filter something */ }, sort: function(something) { /* sort something */ }, dynamicSort: function(something) { /* dynamic sort something */ } } Now the filter function should be available as a property of your util variable.
has comment: http://stackoverflow.com/comment/40511326
has comment: http://stackoverflow.com/comment/40849182
accepted answer of: http://stackoverflow.com/q/25877088
has comment: http://stackoverflow.com/comment/40506175
answers question: http://stackoverflow.com/q/25877088
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/25931263
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25931594
has body: When you create a new contenteditable on a page where scale is used, the keyboard cursor is sometimes put at a wrong position with Firefox. Example : click on the right side of the window in the following snippet example : the "Strawberry" text will appear, but the I keyboard cursor will be in a wrong position. How to have a good I keyboard cursor position for contenteditable objects ? window.onload = function() { var container = document.createElement("div"), wrapper = document.createElement("div"); container.style.position = "absolute"; wrapper.style.position = "relative"; container.appendChild(wrapper); document.body.appendChild(container); container.style.transform = "scale(0.6)"; zoom = 0.6; window.onclick = function(e) { if (e.target.className == 'texte') { return; } var tb = document.createElement('span'); tb.className = "texte"; tb.contentEditable = true; tb.style.fontSize = '40px'; tb.style.position = 'absolute'; tb.textContent = 'strawberry'; tb.style.top = e.clientY / zoom + 'px'; tb.style.left = e.clientX / zoom + 'px'; wrapper.appendChild(tb); tb.focus(); } } Text map
score: 1
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has title: Wrong keyboard cursor position on HTML page with uses "scale"
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 0
tagged with: contenteditable

http://stackoverflow.com/q/25977355
tagged with: javascript
has comment: http://stackoverflow.com/comment/40676349
tagged with: ajax
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40677303
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40677083
tagged with: php
has body: So I have a application running on yahoo hosting for few years now (since 2008) and I used extensive AJAX in the application. Not jQuery or any other ajax frameworks, but I post data from forms and then get AJAX responses from server. Recently yahoo added a "feature" called "live web insights". It basically adds some javascript to every response from the server including all my ajax responses. This totally screws up my processing on the browser side. There is no way to turn this "feature" off from yahoo hosting. I was wondering whether anyone has ran into this before or how to fix this.
has comment: http://stackoverflow.com/comment/40676639
has comment: http://stackoverflow.com/comment/40676692
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25977837
has comment: http://stackoverflow.com/comment/40676475
has comment: http://stackoverflow.com/comment/40677342
accepted answer: http://stackoverflow.com/a/25977837
tagged with: web-hosting
type: Question
has title: How to work with Lexity changes to Yahoo hosting

http://stackoverflow.com/comment/40761020
has text: So does that mean you want the data sent to the server from the prompt _before_ the form itself is submitted? Or would it be ok if the integer_value data got sent to the server with the rest of the form data?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25967347

http://stackoverflow.com/comment/40753827
has text: What do you mean by "...visit the same url by hand..."
comment on: http://stackoverflow.com/q/26006578
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40730840
comment on: http://stackoverflow.com/a/26005227
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61807/discussion-between-michel-figueiredo-and-caeth).
type: AnswerComment

http://stackoverflow.com/q/25963788
has title: Caching Canvas Through Pages
has answer: http://stackoverflow.com/a/25963834
type: Question
tagged with: javascript
tagged with: caching
score: 0
tagged with: canvas
answer count: 1
accepted answer: http://stackoverflow.com/a/25963834
has body: What I have, is a canvas which renders a still image. Once. However whenever the user refreshes, it has to render again. Is there a way to have the user render it once, then store it in the cache and use it again later? Or is this simply not possible?
type: AnsweredQuestion

http://stackoverflow.com/comment/40784538
score: 1
type: AnswerComment
type: Comment
has text: Thanks for your input, I was having similar thoughts.
comment on: http://stackoverflow.com/a/26034466

data-binding
tags question: http://stackoverflow.com/q/25927797
tags question: http://stackoverflow.com/q/26006346
tags question: http://stackoverflow.com/q/25935824
tags question: http://stackoverflow.com/q/25888185
type: Tag
tags question: http://stackoverflow.com/q/26013995
tags question: http://stackoverflow.com/q/25948645
tags question: http://stackoverflow.com/q/25983634
tag name: data-binding

http://stackoverflow.com/a/27621375
has comment: http://stackoverflow.com/comment/114337610
has comment: http://stackoverflow.com/comment/106205667
has body: For weekdays, you could use moment's weekdays method weekArray = moment.weekdays()
upvote count: 62
accepted answer of: http://stackoverflow.com/q/25905183
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25905183
downvote count: 0
score: 62
type: Answer
has comment: http://stackoverflow.com/comment/83536545
has comment: http://stackoverflow.com/comment/64001954

http://stackoverflow.com/a/25920133
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25917569
downvote count: 0
answers question: http://stackoverflow.com/q/25917569
type: AcceptedAnswer
has body: It's a bom issue. Here is what you need to do to solve this problem. 1. Create a new script to automatically add bom to an UTF-8 file. nano add_bom.sh 2. Copy the following script. #!/bin/bash # add_bom.sh FILE=$1 check() { if (( e = "$1" )); then echo "ERROR: $ACTION failed!!" exit $e else echo "INFO: $ACTION Success!!" fi } set_bom() { ACTION="Setting utf-8 BOM" # Detect if BOM already exists BOM=`sed -n '1{/^\xEF\xBB\xBF/p}' $FILE` if [ -z $BOM ]; then [ -f "$FILE" ] &amp;&amp; /usr/bin/vim -e -s +"set bomb|set encoding=utf-8|wq" $FILE check $? fi } set_bom 3. Run the script. sh ./add_bom.sh /path/to/file 4. Test the file via xxd, if the mark is present, the first line should output as below: $ xxd &lt;/path/to/file&gt; 0000000: efbb bf...

http://stackoverflow.com/q/25999360
tagged with: php
has comment: http://stackoverflow.com/comment/40738835
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40716557
has comment: http://stackoverflow.com/comment/40716505
tagged with: hyperlink
tagged with: javascript
has title: how to show an alert message when on a final page
type: Question
score: 0
has body: i have created a dynamic table, that displays a list of records from a recordset with a previous and a next link using php and adobe dreamweaver. what i am trying to achieve is to show a message whenever there are no more records to display, and the next link is still clicked, presently what i have been able to achieve is when ever you navigate to the final record a message is shown, to let you knw you are on the last page of the records using "show region" &lt;?php if ($pageNum_quiz &gt;= $totalPages_quiz) { // Show if last page ?&gt; On the last record page &lt;?php } // Show if last page ?&gt; so for example on viewing this last record, and the next link is still clicked, i want a message to be shown like "there are no more recordsto be shown". how can i implement this.
has comment: http://stackoverflow.com/comment/40716865
has comment: http://stackoverflow.com/comment/40716680
has comment: http://stackoverflow.com/comment/40717518
has comment: http://stackoverflow.com/comment/40716460
has comment: http://stackoverflow.com/comment/40732791
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40716784

http://stackoverflow.com/a/25928566
downvote count: 0
answers question: http://stackoverflow.com/q/25928086
upvote count: 2
has comment: http://stackoverflow.com/comment/40593857
has body: This: var password = document.getElementById("password"); if (password != "") { ...assigns the HTML password input to the password variable, not the value of that input. (password != "") will always be true because password is not a string, it's a form element. Try this instead: var password = document.getElementById("password").value;
type: Answer
score: 2

reactjs-testutils
tags question: http://stackoverflow.com/q/25987506
type: Tag
tag name: reactjs-testutils

http://stackoverflow.com/a/25976732
score: 1
upvote count: 1
has body: Assuming that you are working with date, how about something like this: Paste it in firebug's console or use nodejs on the command line. var hours = ""+(new Date()).getHours(); hours[0] === "0" ? console.log(1) : console.log(hours.length) I hope it helps.
downvote count: 0
answers question: http://stackoverflow.com/q/25976348
type: Answer

http://stackoverflow.com/a/26011517
has comment: http://stackoverflow.com/comment/40741329
has comment: http://stackoverflow.com/comment/40741808
has body: Not a nicest (sorry, 4am) solution, but the straight way through recursion.. Your structure does not support, in a normal way, same-level folders, so I reconfigured it, togerther with the code for it: http://jsfiddle.net/ma3kno2o/5/ function getFiles(id) { var files = searchFolders(jsonStr.hierarchy.folders, false); alert('Found ' + files.length + " files\n" + JSON.stringify(files)); function searchFolders(tree, count_files) { var data = []; $.each(tree, function(key, val) { var into = !count_files ? val.id == id : count_files; if (val.files &amp;&amp; into) $.merge(data, getFiles(val.files)); if (val.folders) $.merge(data, searchFolders(val.folders, into)); }); return data; } function getFiles(tree) { var files = []; if (tree.id) return [tree.id]; $.each(tree, function(key,val) { if (val.id) files.push(val.id); }); return files; }; } var jsonStr = { "hierarchy": { "date": "2014/09/24 15:21:23", "folders": [{ "name": "Root", "id": "Root", "files": [{ "id": "file.1" }, { "id": "file.2" }, { "id": "file.3" }], "folders": [{ "name": "Level-1", "id": "1411396172645", "files": { "id": "file.4" }, "folders": [{ "name": "123", "id": "1411538469568", "files": [{ "id": "file.5" }, { "id": "file.6" }]}, { "name": "123", "id": "1411538469569", "files": [{ "id": "file.7" }, { "id": "file.8" }] }] }] }] } }; The old code will not work, so I rewrote it for your new varia http://jsfiddle.net/ma3kno2o/8/ function getFiles(id) { var stp = -1; var files = searchFolders(jsonStr.hierarchy, false); alert('Found ' + files.length + " files\n" + JSON.stringify(files)); function searchFolders(tree, count_files) { var data = []; var folders = tree.folder.length &gt; 1 ? tree.folder : [tree.folder]; $.each(folders, function(key, val) { var into = !count_files ? val.id == id : count_files; if (val.file &amp;&amp; into) $.merge(data, getFiles(val.file)); if (val.folder) $.merge(data, searchFolders(val, into)); }); return data; } function getFiles(tree) { var files = []; if (tree.id) return [tre…
upvote count: 1
has comment: http://stackoverflow.com/comment/40743635
score: 1
accepted answer of: http://stackoverflow.com/q/26010599
answers question: http://stackoverflow.com/q/26010599
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40740893
type: Answer

http://stackoverflow.com/q/25911625
tagged with: javascript
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40558471
has answer: http://stackoverflow.com/a/25911852
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
tagged with: css
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40558681
answer count: 2
upvote count: 1
has body: tl;dr look at http://jsfiddle.net/1f6j3o5u/1/ - why are the original checkboxes neatly wrapped but the dynamically added ones overflow? I have several checkboxes that should wrap inside their container and their labels must not "break off". My solution that works is this: wrap every checkbox in a div: test 1 The relevant style is: div.filterlabel { display: inline; white-space: nowrap; } Everything works fine if the checkboxes/divs are statically added. However, if I add them in e.g. a loop using jQuery, they stop wrapping and simply escape the container... for (i = 1; i < 7; i++) { ($(" ", { 'class': 'filterlabel' }).append($(" ", { 'type': 'checkbox', 'id': 'othertest' + i })).append($(" ", { 'for': 'othertest' + i }).text("test " + i))).appendTo($('#Container')); } What am I doing wrong? Are the dynamically added divs somehow different? Inspecting their styles in a browser suggests that there should be absolutely no difference...
accepted answer: http://stackoverflow.com/a/25911852
has comment: http://stackoverflow.com/comment/40558437
possible better answer: http://stackoverflow.com/a/25911855
has answer: http://stackoverflow.com/a/25911855
has title: Dynamically added divs overflow their container
downvote count: 0

http://stackoverflow.com/q/25945301
has comment: http://stackoverflow.com/comment/40688490
has title: three.js load multiple objects asynchronous issue
upvote count: 1
has answer: http://stackoverflow.com/a/26021165
accepted answer: http://stackoverflow.com/a/26021165
tagged with: asynchronous
favorite count: 0
has body: am loading multiple models on the same time to a scene, but it fails to load all the models, it only loading one model on the scene For example am having a building scene with the multiple objects like chairs, toys and so on inside that building, while loading those objects the only one object is loading, but somehow if i do a alert on end of the function all the models are loading Image1 what am getting now, Image2 what actually i want my code is follows function load_file(floor_number,x,y,z,width,height,rotation,angle,file) { obj_x=x; obj_y=y; obj_z=z; obj_width=width; obj_height=height; obj_rotation=rotation; var object_material = new THREE.MeshBasicMaterial({ color: 0xd6d6d6, traansparent : true, opacity : -2.5, side: THREE.DoubleSide }); var loader = new THREE.JSONLoader(); loader.load("uploads/accessories/3d/code/3dfile_"+file+".js", function(geometry, object_material) { var object = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(object_material)); console.log(object); model = new THREE.Object3D(); model.add(object); model.position.set(obj_x,obj_y,obj_z); model.scale.set(obj_width,obj_height,obj_rotation); model.opacity =2; model.rotation.y = 600; model.duration = 12000; model.mirroredLoop = true; model.castShadow = true; model.receiveShadow = true; scene.add(model); } ); // alert('hi'); if i remove this comment second model is loading perfectly return true; } also tried to load the object's by id using Object3D.getObjectById() this is also fails i know this is about the asynchronous problem, but i can't get ride of this, any help on this?
has comment: http://stackoverflow.com/comment/40657315
has answer: http://stackoverflow.com/a/25984547
has comment: http://stackoverflow.com/comment/40665687
has comment: http://stackoverflow.com/comment/40673963
has comment: http://stackoverflow.com/comment/40625374
tagged with: three.js
has comment: http://stackoverflow.com/comment/40673808
has comment: http://stackoverflow.com/comment/40672124
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40741573
downvote count: 0
has comment: http://stackoverflow.com/comment/40669733
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40739908
possible better answer: http://stackoverflow.com/a/25984547
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/33470195
downvote count: 0
has body: I know this is a bit old, but looking at the latest source I see that this feature is now supported (as well as that there was never an answer accepted). You would need to write your code similarly to as follows: ... { 'title' : 'WBIR.com Remake', 'description' : 'Detailed Description Goes Here', 'thumbnail' : ['images/small/39.jpg'], 'large' : ['images/large/39.jpg'], 'button_list' : [ { 'title': 'Live Preview', 'url': 'http://dkdesigns.us/aiu/uploads/web/k_downey_ip5_vcdd330/index.html', 'new_window': true, }, ], 'tags': [ 'Web' ] } ... Please notice the newly added 'new_window': property in the first object of the button_list array. I hope that this helps those in the future who go looking like I did, to more quickly - and easily - find the answer.
score: 1
answers question: http://stackoverflow.com/q/25955922
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/54805925

http://stackoverflow.com/a/25942715
answers question: http://stackoverflow.com/q/25942647
has comment: http://stackoverflow.com/comment/40615880
type: Answer
has body: Greasemonkey 2.0 radically changed unsafeWindow handling. Now you should use unsafeWindow.somefunction = exportFunction(function() { alert("Hello!"); }, unsafeWindow); or exportFunction(function() { alert("Hello!"); }, unsafeWindow, {defineAs: "somefunction"}); See exportFunction in MDN. You may also be interested on createObjectIn and cloneInto.
has comment: http://stackoverflow.com/comment/40615989
score: 0
has comment: http://stackoverflow.com/comment/40615796
has comment: http://stackoverflow.com/comment/40632489

http://stackoverflow.com/a/26003461
has body: Is it just a matter of attaching Visual Studio to the W3WP process? While this remains a last chance possibility, you might also consider introducing logging in your server side endpoints. You know, things like global exception handlers that will log the error to a centralized source like a file or the Event Log of your server. Those sources are always the first thing you should consider looking at when confronted with similar situation.
has comment: http://stackoverflow.com/comment/40724310
type: Answer
has comment: http://stackoverflow.com/comment/40724274
answers question: http://stackoverflow.com/q/26003365
score: 0
has comment: http://stackoverflow.com/comment/40724424

http://stackoverflow.com/q/25917933
upvote count: 0
type: Question
has body: I have 2 separate javascript functions, the first builds a dropdown list from a JSON feed and then the second fires the Selectric plugin to style the dropdown. I added a delay to the plugin function but it's a hack so id like to add this function after the get request finishes. $(document).ready(function() { $.get('scanlistjson',{id:''},function(responseJson) { var $select = $('#scanlist'); $.each(responseJson, function(key, value) { $('&lt;option&gt;').val(key).text(value).appendTo($select); }); }); }); setTimeout(function() { $('#scanlist').selectric(); }, 300);
has title: Fire javascript function after get request
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/25917963
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40570213
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25917958
has comment: http://stackoverflow.com/comment/40570539

http://stackoverflow.com/comment/40641776
comment on: http://stackoverflow.com/q/25958510
type: Comment
score: 0
type: QuestionComment
has text: You should have a look at the eval function. http://www.w3schools.com/jsref/jsref_eval.asp

http://stackoverflow.com/a/25910784
accepted answer of: http://stackoverflow.com/q/25910684
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/25910684
has body: You are replacing the button. You have to append the new div to the already created elements. Try to use += instead of =. Also there is not need for a loop. You can assign unique id with just an inceasing var Try: var x=1 function appendRow() { var d = document.getElementById('div'); d.innerHTML += "&lt;input type='text' id='tst"+ x++ +"'&gt;&lt;br &gt;"; } DEMO
has comment: http://stackoverflow.com/comment/40589239
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/40556841
has comment: http://stackoverflow.com/comment/40587402
score: 4

http://stackoverflow.com/comment/40608403
comment on: http://stackoverflow.com/a/25938418
score: 0
type: AnswerComment
has text: add a CSS property tr.hidden { display: none }
type: Comment

http://stackoverflow.com/comment/40545487
comment on: http://stackoverflow.com/a/25903796
type: AnswerComment
score: 0
type: Comment
has text: Ok, I've removed runat="server" in the input type file and now it is suddenly working. Any ideas on why might that be?

http://stackoverflow.com/comment/40777699
has text: Can you explain a little more what you want to do? The areas should be only on images, right?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26032663

http://stackoverflow.com/a/25951730
has body: I used this plugin on many projects and I think you should take a look at it : http://jquery.malsup.com/cycle/ You would be looking at the fade option Here is the library: Here is an example : $('#fade').cycle(); And the html
upvote count: 2
answers question: http://stackoverflow.com/q/25951694
has comment: http://stackoverflow.com/comment/40636832
has comment: http://stackoverflow.com/comment/40630113
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40629865

web-services
type: Tag
tags question: http://stackoverflow.com/q/25922127
tags question: http://stackoverflow.com/q/25969147
tags question: http://stackoverflow.com/q/25907224
tags question: http://stackoverflow.com/q/25941407
tags question: http://stackoverflow.com/q/26022950
tag name: web-services
tags question: http://stackoverflow.com/q/25972592
tags question: http://stackoverflow.com/q/26010090

http://stackoverflow.com/comment/40564776
comment on: http://stackoverflow.com/q/25915143
score: 0
type: Comment
type: QuestionComment
has text: `$("[id*='7-interval-'][data-transformeffect=fade]")`

http://stackoverflow.com/q/25907593
score: -4
favorite count: 0
has body: How to append or remove divs using &lt;input type='number'&gt;? ex: &lt;input type="number" value="1" min="1" max="10" id='number' name='numberInput'&gt; $("#number").on('change', function () { if (this.value &gt; Previous number) { //append 'div' } else { //remove 'Previous div' } });
type: Question
has comment: http://stackoverflow.com/comment/40551233
has comment: http://stackoverflow.com/comment/40551449
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25907656
has title: Append or remove div using
downvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40551242
has answer: http://stackoverflow.com/a/25907686
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25980615
has answer: http://stackoverflow.com/a/25981441
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40698519
has answer: http://stackoverflow.com/a/25989425
type: Question
has comment: http://stackoverflow.com/comment/40682730
has comment: http://stackoverflow.com/comment/40682806
has body: Whoever solves this will be the Javascript, Angular Genius... It's about injecting clickHandlers (function/scope) to the dynamically generated DOM elements In this basic setup the DOM elements are generated by Angular, Angular is bootstrapped to an element and content is populated by an array. . Is there a way that we can set click handlers on each anchor dynamically (no need of cross browser implementation, addEventHandler would suffice). It's best to look at the Fiddle link itself given below to get the full picture. &lt;div id="navigation" data-ng-cloak&gt; &lt;ul data-ng-controller="foliosController" class="nav nav-pills nav-stacked"&gt; &lt;li data-ng-repeat="folio in folios" class="active"&gt;&lt;a href="#"&gt;{{folio.title}}&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; Javascript var self = this; var navigation = angular.module("navigation", []); navigation.controller("foliosController", function($scope){self.foliosController($scope)}); angular.bootstrap(document.getElementById("navigation"), ["navigation"]); Fiddle: http://jsfiddle.net/casadev/n50ecw5m/ Bonus: If there's a way to set only the first anchor as active. EDIT: There's a clickHandler defined within the scope, need to link the clickHandler with the generated dom links. clickHandler: function(event) { alert(event.target); } Edit 2: Some progress but attached clickHandlers manually to stay inside the scope, wished if angular could do it. http://jsfiddle.net/casadev/n50ecw5m/14/ Mini Question after my own answer: Is there a way to avoid templateUrl in case I don't need to have one?
tagged with: angularjs-scope
accepted answer: http://stackoverflow.com/a/25989425
score: 0
answer count: 2
has title: Setting click handlers dynamically on generated dom by Angular
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25981441
tagged with: angularjs

http://stackoverflow.com/a/25977779
answers question: http://stackoverflow.com/q/25924005
accepted answer of: http://stackoverflow.com/q/25924005
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: The PDFJS.getDocument method accepts either a URL to a file, or an ArrayBuffer of the PDF file. So what you can do, is read the file into an ArrayBuffer (perhaps using FileReader.readAsArrayBuffer), and then pass the buffer to getDocument. See here.

http://stackoverflow.com/q/26010326
has comment: http://stackoverflow.com/comment/40819347
has title: javascript toLocalestring() number precision in ie9 and below
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16157762
has body: Number(val).toLocaleString("en-US") this works fine in chrome and ie edge, but in ie 9 toLocaleString() fixes numbers to 2 precision. for ex. 65565.656.toLocaleString("en-US"); -> 65,565.67
has comment: http://stackoverflow.com/comment/40736786
type: Question
linked to: http://stackoverflow.com/q/13428678
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40747437
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/26016495
has text: @Edward flinstones :P

http://stackoverflow.com/comment/40799821
has text: issue has been fixed..thanks graphefruit for your input
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26024208

http://stackoverflow.com/comment/40757051
has text: Each user has login credentials, and should be able to login from any pc in the office, just not a "mobile" pc. If the office buys new pc's I would like to keep the office from contacting me to add it to a not accessible list.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/26020696
type: QuestionComment

http://stackoverflow.com/a/27975044
answers question: http://stackoverflow.com/q/26032971
downvote count: 3
score: -1
has comment: http://stackoverflow.com/comment/44464911
has body: Are you trying to block against people copying specific sets of text or general content? ID/ELEMENT/CLASS { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } maybe this is of use. http://jsfiddle.net/gnh2tuyj/2/
has comment: http://stackoverflow.com/comment/44598818
upvote count: 2
type: Answer

http://stackoverflow.com/q/25937173
has body: This is my DOM 1 2 4 random text 765 whatever http://www.google.com hello world and the http://www.google.com can be anywhere so there is no fixed pattern then I can't use nth-child. One way is loop through but is there any advantage if it's wrapped by a div? or we still have to loop?
downvote count: 2
has comment: http://stackoverflow.com/comment/40604993
has comment: http://stackoverflow.com/comment/40604965
type: Question
score: -2
has answer: http://stackoverflow.com/a/25937240
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: search using text and delete node jquery
has answer: http://stackoverflow.com/a/25937230
accepted answer: http://stackoverflow.com/a/25937230
possible better answer: http://stackoverflow.com/a/25937240
type: AnsweredQuestion

http://stackoverflow.com/comment/40533102
has text: Uh, many people would argue that *using* `bind` increases readability… Sure, your `var prop` is a nice case-specific improvement, but when `prop` is required to be a property, then both of OP's patterns are fine.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25897372
type: Comment

http://stackoverflow.com/comment/40987761
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26089489
has text: Note that using this method might result in handlers being called out of DOM propagation order if listeners have been applied using methods other than this one. This method will call them in DOM order (top->bottom) for those set up through this method due to [`selectAll()`](https://github.com/mbostock/d3/wiki/Selections#on) operating in DOM order. The point is that this is not a direct replacement for putting a handler on a particular element. It is really that you are re-architecting to use a single handler to deal with a type of event happening on descendants (which is a normal practice).
type: Comment

http://stackoverflow.com/comment/40544464
has text: @user3818791 I'm signing off for the evening anyway. Post a screenshot in your question?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25903685

http://stackoverflow.com/a/25914546
type: Answer
score: 3
downvote count: 0
has body: The req object is not available in waterline. So the next question is if your using blueprints. If Yes, then you can doo like forrestranger suggests, but I think its better fit for a policy than over complicating it with middleware. This is an example where I check for a companyId on every query. // policy.js module.exports = function(req, res, next) { req.options.where = _.assign({companyId : req.session.user.company.id}, req.options.where); req.query.companyId = req.session.user.companyId; return next(); }; If NO, then just attach the necessary info when you run your own create statement in the controller. I would add a check in my beforeCreate that makes sure those fields are present as a form of self checking.
answers question: http://stackoverflow.com/q/25907558
upvote count: 3

http://stackoverflow.com/comment/40616289
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25943108

header
type: Tag
tags question: http://stackoverflow.com/q/25999200
tag name: header
tags question: http://stackoverflow.com/q/25949727

http://stackoverflow.com/a/25927291
accepted answer of: http://stackoverflow.com/q/25926713
type: AcceptedAnswer
has body: Combine statement if (healthval === 1) & if (healthval > 1) and better use if else block rather than only if blocks when you are checking conditions on same variable. Try this- var health = document.getElementById("health") $(document).ready(function () { $('.heal').click(function () { var healthval = document.getElementById('health').getAttribute('value') * 1; if (healthval >= 1) { alert("It's already full!"); } else if (healthval === 0) { alert("Your critter has died! Oh no!"); } else { document.getElementById('health').setAttribute('value', healthval + 0.1); console.log(healthval) alert("You give your critter some food!"); } }); }); Heal Me
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40587497
answers question: http://stackoverflow.com/q/25926713
score: 1

http://stackoverflow.com/a/25909308
type: AcceptedAnswer
has body: You are storing date as String, please change it to date object and the you could sort it using mongo sort http://docs.mongodb.org/manual/reference/method/cursor.sort/ db.collection.find().sort( { date: -1 } ).limit(1) For storing as date from moment.js see this link here: Inserting a momentjs object in Meteor Collection
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25908909
answers question: http://stackoverflow.com/q/25908909
upvote count: 1

android
tags question: http://stackoverflow.com/q/25913331
tags question: http://stackoverflow.com/q/26010943
tags question: http://stackoverflow.com/q/25994016
tags question: http://stackoverflow.com/q/25970782
tags question: http://stackoverflow.com/q/25910539
tags question: http://stackoverflow.com/q/25993569
tags question: http://stackoverflow.com/q/25910986
tags question: http://stackoverflow.com/q/25974183
tags question: http://stackoverflow.com/q/25932020
tags question: http://stackoverflow.com/q/26010588
tags question: http://stackoverflow.com/q/25916198
tags question: http://stackoverflow.com/q/25907689
tags question: http://stackoverflow.com/q/25984072
tags question: http://stackoverflow.com/q/25967988
tags question: http://stackoverflow.com/q/25935863
tags question: http://stackoverflow.com/q/25888554
tags question: http://stackoverflow.com/q/25967691
tags question: http://stackoverflow.com/q/25879759
tags question: http://stackoverflow.com/q/25886390
tags question: http://stackoverflow.com/q/25879651
tags question: http://stackoverflow.com/q/25964805
tags question: http://stackoverflow.com/q/26005314
tags question: http://stackoverflow.com/q/25896759
tags question: http://stackoverflow.com/q/26011020
tags question: http://stackoverflow.com/q/25958509
tags question: http://stackoverflow.com/q/26019789
tags question: http://stackoverflow.com/q/25916062
tags question: http://stackoverflow.com/q/26027687
tags question: http://stackoverflow.com/q/25938016
tags question: http://stackoverflow.com/q/25979894
tags question: http://stackoverflow.com/q/25992785
tags question: http://stackoverflow.com/q/25892634
tags question: http://stackoverflow.com/q/25911025
tags question: http://stackoverflow.com/q/26001209
tags question: http://stackoverflow.com/q/25967191
tags question: http://stackoverflow.com/q/25889427
tags question: http://stackoverflow.com/q/25903103
tags question: http://stackoverflow.com/q/25975877
tags question: http://stackoverflow.com/q/25956136
tags question: http://stackoverflow.com/q/26008535
tags question: http://stackoverflow.com/q/25978891
tags question: http://stackoverflow.com/q/25962395
tags question: http://stackoverflow.com/q/25897361
tags question: http://stackoverflow.com/q/25981515
tags question: http://stackoverflow.com/q/25874438
tag name: android
type: Tag
tags question: http://stackoverflow.com/q/26025628
tags question: http://stackoverflow.com/q/26033638
tags question: http://stackoverflow.com/q/25967084
tags question: http://stackoverflow.com/q/25885830

http://stackoverflow.com/q/25906810
accepted answer: http://stackoverflow.com/a/25913914
type: AnsweredQuestion
downvote count: 0
type: Question
score: 3
has body: I am using Morris plugin to draw a line graph, but find difficulty combining two sets of data in the same graph. Here is my fiddle. It shows my first graph. function formatDate(myDate){ var m_names = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); var d = new Date(myDate); var curr_month = d.getMonth(); //var curr_year = d.getFullYear(); //return (m_names[curr_month] + "-" + curr_year); return (m_names[curr_month]); } new Morris.Line({ element: 'financial-year-sales-graph', data: [ { month: '2013-07', sales: 52325 }, { month: '2013-08', sales: 65432 }, { month: '2013-09', sales: 52125 }, { month: '2013-10', sales: 23265 }, { month: '2013-11', sales: 25125 }, { month: '2013-12', sales: 63256 }, { month: '2014-01', sales: 52365 }, { month: '2014-02', sales: 65954 }, { month: '2014-03', sales: 55255 }, { month: '2014-04', sales: 66236 }, { month: '2014-05', sales: 52369 }, { month: '2014-06', sales: 85214 } ], // The name of the data record attribute that contains x-values. xkey: 'month', // A list of names of data record attributes that contain y-values. ykeys: ['sales'], // Labels for the ykeys -- will be displayed when you hover over the // chart. labels: ['Sales'], xLabelFormat: function(str){ return formatDate(str); }, preUnits: '$' }); http://jsfiddle.net/pz6L12wb/ I am trying to add another line to this graph. I am NOT wanting to have this kind of two lines, http://weblessons.info/2014/06/15/creating-line-chart-using-morris-js-tutorial/, which has two sets of data in the same periods of time. Instead, I want to have two sets of date, namely first set July 2013 - June 2014, second set July 2014 - June 2013, this shows the comparison of this two years. Is it possible to achieve? Thanks
upvote count: 3
answer count: 1
tagged with: morris.js
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Line graph containing two sets of date
has answer: http://stackoverflow.com/a/25913914

http://stackoverflow.com/q/26005547
answer count: 2
has title: Bootstrap 3 Modal with texarea inside. When tap/focus on textarea, the background scrolls to top. Only in iOS 8
downvote count: 0
has answer: http://stackoverflow.com/a/32233247
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40728336
favorite count: 0
has comment: http://stackoverflow.com/comment/40728371
upvote count: 4
tagged with: css
has comment: http://stackoverflow.com/comment/41814752
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
possible better answer: http://stackoverflow.com/a/32233247
has comment: http://stackoverflow.com/comment/40728594
type: Question
has answer: http://stackoverflow.com/a/26046327
accepted answer: http://stackoverflow.com/a/26046327
tagged with: ios8
has comment: http://stackoverflow.com/comment/40728698
score: 4
has body: I'm using Bootstrap 3.2.0. I can show the modal just fine and the background stays in place. The modal contains a textarea. When I tap or focus on that textarea and the virtual keyboard comes up, the background scrolls to the top. This only happens with iOS 8 and not iOS 7. It's like iOS 8 wants to put whatever is focused on in the middle of the screen and it scrolls until that element is in the middle. It scrolls up and up and up until it hits the top THEN pulls the modal down a little. Very frustrating. Has anyone experienced this yet? Any solutions? Update: I'm thinking it has to do with the fact that the modal is fixed position and not absolute. iOS wants to put the focused element in the middle of the screen so it scrolls the viewport or document up until the element is in center but scrolling does nothing because the element is position fixed.

http://stackoverflow.com/comment/40696105
has text: Submit is not a function in js
comment on: http://stackoverflow.com/a/25987817
type: AnswerComment
score: 0
type: Comment

famo.us
tags question: http://stackoverflow.com/q/25941379
tags question: http://stackoverflow.com/q/25951130
tag name: famo.us
type: Tag

http://stackoverflow.com/q/25908047
answer count: 3
has answer: http://stackoverflow.com/a/25908163
has body: I have a video-playlist where the video scr is created in javascript: video[0].src = video_url; Now I want to use the variable "video_url" as my description text So in html it should look like video01.mov I tried to do this with the following code: $('#description').append(video_url); But now everytime I click on my next or previous button to load the next video jquery adds the next name to my td instead of just take the current src name: video01.movvideo02.movvideo03.movvideo04.movvideo05.mov How is it possible that jquery uses only the CURRENT name of the src? Thank you for your help!
downvote count: 1
has comment: http://stackoverflow.com/comment/40552001
has title: Use variable as text
upvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40552042
favorite count: 0
score: -1
type: Question
has answer: http://stackoverflow.com/a/25908184
has answer: http://stackoverflow.com/a/25908118

http://stackoverflow.com/comment/40734751
score: 0
has text: is it not going inside if condition?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26009309

http://stackoverflow.com/comment/40585323
score: 0
has text: Thanks @GuyGood that's the effect I was searching for...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25904139

http://stackoverflow.com/a/25989586
has body: Don't add the buttons dynamically. Create them in the HTML, but hide them with CSS. Then show them when you click on the corresponding checkbox. $(":checkbox").click(function() { $("#"+this.value).toggle(this.checked); }); .btn { display: none; } title Adress Postal Code Email Title Adress Postal Code Email
type: Answer
answers question: http://stackoverflow.com/q/25989434
downvote count: 0
has comment: http://stackoverflow.com/comment/40698827
score: 3
upvote count: 3

http://stackoverflow.com/q/25960729
has body: I want to change the form action based on a selection value. 6 10 Now I want the form action, to use the select option value. For example: If Selection 1 is selected, use the folowing form action /stores/store6.php
downvote count: 1
has answer: http://stackoverflow.com/a/25960892
has comment: http://stackoverflow.com/comment/40646270
answer count: 4
has answer: http://stackoverflow.com/a/25960880
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25960880
possible better answer: http://stackoverflow.com/a/25960871
type: Question
has answer: http://stackoverflow.com/a/25960871
tagged with: http://stackoverflow.com/tag/html
score: 10
has title: Change form action on select option
favorite count: 0
upvote count: 11
has answer: http://stackoverflow.com/a/25961084
tagged with: php

http://stackoverflow.com/comment/40730648
score: 0
type: AnswerComment
has text: @AndrewBoen watch out for the `=` in your `if else`
comment on: http://stackoverflow.com/a/26006789
type: Comment

http://stackoverflow.com/q/25894744
type: UnansweredQuestion
has body: {Edited my code to include parent loop) I'm having trouble with the Parse.Cloud.httpRequest function that runs in Parse cloud code and there's no documentation on this method. Essentially I would like to be able to either access a global variable (channel_id) with in the success part of Parse.Cloud.httpRequest({}) so that it can be passed as parameter into a function (DoSomething()) or get the JSON response from of Parse.Cloud.httpRequest({}) and move the function that uses it (DoSomething()) outside of Parse.Cloud.httpRequest({}). As of now, whatever variables I define inside of success have no scope outside of the function and when I try to access global variables inside success such as channel_id I have no access to them var query = new Parse.Query("Channel"); query.equalTo("FrequentlyUpdated", false); query.find ({ success: function (results) { for (var i = 0; i &lt; results.length; i++) { channel_id = results[i].get("channel_id"); Parse.Cloud.httpRequest({ url: 'http://vimeo.com/api/v2/channel/' + channel_id + '/videos.json', success: function (httpResponse) { var response = httpResponse.text; DoSomething(response, channel_id ); }, error: function (httpResponse) { status.error("failed"); } }); } }, error: function() { status.error("movie lookup failed"); } }); Maybe there is a shorter version of the Parse.Cloud.httpRequest({}) function which simply takes the url and parameters etc. and returns the JSON or XML response?
has comment: http://stackoverflow.com/comment/40529071
has comment: http://stackoverflow.com/comment/40527762
tagged with: http
has comment: http://stackoverflow.com/comment/40528830
type: Question
has comment: http://stackoverflow.com/comment/40528129
tagged with: javascript
tagged with: parse-cloud-code
tagged with: scope
score: 0
has title: Access to global variables inside Parse.Cloud.httpRequest{()}
answer count: 1
has answer: http://stackoverflow.com/a/25895182
has comment: http://stackoverflow.com/comment/40528085
tagged with: parse-platform

d3.js
tags question: http://stackoverflow.com/q/25976922
tags question: http://stackoverflow.com/q/26013903
tags question: http://stackoverflow.com/q/26032301
tags question: http://stackoverflow.com/q/25873823
tags question: http://stackoverflow.com/q/26022258
tags question: http://stackoverflow.com/q/25878471
tags question: http://stackoverflow.com/q/26022088
tags question: http://stackoverflow.com/q/25978175
tags question: http://stackoverflow.com/q/25895676
tags question: http://stackoverflow.com/q/26009100
tags question: http://stackoverflow.com/q/25875667
tags question: http://stackoverflow.com/q/25901271
tags question: http://stackoverflow.com/q/25940660
tags question: http://stackoverflow.com/q/25980718
tags question: http://stackoverflow.com/q/25875860
tags question: http://stackoverflow.com/q/25899729
tags question: http://stackoverflow.com/q/26007779
tags question: http://stackoverflow.com/q/26000700
tags question: http://stackoverflow.com/q/25955408
tags question: http://stackoverflow.com/q/25996229
tags question: http://stackoverflow.com/q/26029141
type: Tag
tags question: http://stackoverflow.com/q/25920201
tags question: http://stackoverflow.com/q/25954998
tags question: http://stackoverflow.com/q/25961163
tags question: http://stackoverflow.com/q/25939508
tags question: http://stackoverflow.com/q/25975063
tags question: http://stackoverflow.com/q/25955603
tags question: http://stackoverflow.com/q/25944455
tags question: http://stackoverflow.com/q/25882432
tags question: http://stackoverflow.com/q/25905671
tags question: http://stackoverflow.com/q/25959003
tags question: http://stackoverflow.com/q/25907940
tags question: http://stackoverflow.com/q/25968682
tags question: http://stackoverflow.com/q/25897801
tags question: http://stackoverflow.com/q/26019127
tags question: http://stackoverflow.com/q/26006388
tags question: http://stackoverflow.com/q/25877000
tags question: http://stackoverflow.com/q/25943938
tags question: http://stackoverflow.com/q/26020324
tags question: http://stackoverflow.com/q/25960449
tags question: http://stackoverflow.com/q/25954604
tags question: http://stackoverflow.com/q/25881186
tags question: http://stackoverflow.com/q/25983256
tags question: http://stackoverflow.com/q/26027367
tags question: http://stackoverflow.com/q/25942826
tag name: d3.js
tags question: http://stackoverflow.com/q/25905572
tags question: http://stackoverflow.com/q/25996357
tags question: http://stackoverflow.com/q/25936593
tags question: http://stackoverflow.com/q/26022346
tags question: http://stackoverflow.com/q/25980207
tags question: http://stackoverflow.com/q/25895251
tags question: http://stackoverflow.com/q/25991825
tags question: http://stackoverflow.com/q/25930531
tags question: http://stackoverflow.com/q/25925162
tags question: http://stackoverflow.com/q/25954808
tags question: http://stackoverflow.com/q/25907202
tags question: http://stackoverflow.com/q/25990218
tags question: http://stackoverflow.com/q/26003264
tags question: http://stackoverflow.com/q/25992426
tags question: http://stackoverflow.com/q/25877622
tags question: http://stackoverflow.com/q/25999162
tags question: http://stackoverflow.com/q/26005430
tags question: http://stackoverflow.com/q/25907798
tags question: http://stackoverflow.com/q/25994482
tags question: http://stackoverflow.com/q/25967366
tags question: http://stackoverflow.com/q/26025420
tags question: http://stackoverflow.com/q/25901264
tags question: http://stackoverflow.com/q/25992544

http://stackoverflow.com/comment/40694327
type: Comment
has text: The developers of your Javascript console have merely chosen a confusing way to display strings.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25986868

http://stackoverflow.com/a/25876089
downvote count: 0
has comment: http://stackoverflow.com/comment/43061377
score: 21
upvote count: 21
type: AcceptedAnswer
has body: This feature was added in React v0.11. Instead of type="text/jsx", you set type="text/jsx;harmony=true". For example: &lt;script type="text/jsx;harmony=true"&gt; /** @jsx React.DOM */ var f = v =&gt; v*v; console.log(f(2)); // logs 4 &lt;/script&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/25876088
has comment: http://stackoverflow.com/comment/57673509
answers question: http://stackoverflow.com/q/25876088

http://stackoverflow.com/q/25905449
tagged with: adobe-indesign
type: UnansweredQuestion
tagged with: scripting
tagged with: http://stackoverflow.com/tag/xml
type: Question
has answer: http://stackoverflow.com/a/25909630
has body: I'm working on a script for InDesign, and I'm pulling in content from an xml file. How would I parse and create the separate paragraphs in xml like this: ... this is a paragraph this is another paragraph This is underlined text .... I'm accessing the data with xml.body using the XML class (EX4?). Would I have to create some sort of custom parser for this to create different paragraphs? Should I be storing this as CData?
has title: using xml content markup in indesign scripting
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/40679070
score: 0
comment on: http://stackoverflow.com/a/25978492
type: AnswerComment
type: Comment
has text: If this is the case, I think you need to show what `loadOptions` itself is doing - I think the problem probably lies in there

http://stackoverflow.com/comment/40671324
comment on: http://stackoverflow.com/q/25974517
type: Comment
type: QuestionComment
score: 0
has text: @slebetman I was trying to be lazy and not bother answering the other half of the question :P There's a complete answer now heh

http://stackoverflow.com/comment/40671810
type: QuestionComment
has text: So, changed the controller now to vanilla JS, and same issue! ;(
comment on: http://stackoverflow.com/q/25974541
score: 0
type: Comment

http://stackoverflow.com/q/25883119
has comment: http://stackoverflow.com/comment/40506915
downvote count: 1
type: Question
has body: I have a variable called notincluded: var notincluded = “one,two,three” Lets say for some reasons I cannot change the form of this variable. How can I transform “one,two,three” into something that can be placed in: var ids = $("a:not([href])").not ('notincluded'); So eventually I can have all the tags (anchors) in ids , except the anchors named one, two and three. Sorry if I could not explain it well enough, please let me know if I can add more details to make it clear, thanks.
tagged with: anchor
has comment: http://stackoverflow.com/comment/40506893
score: -1
accepted answer: http://stackoverflow.com/a/25883216
has answer: http://stackoverflow.com/a/25883206
upvote count: 0
has answer: http://stackoverflow.com/a/25883317
has comment: http://stackoverflow.com/comment/40507000
tagged with: javascript
tagged with: jquery
has title: Adding all the tags in a variable, except some with specific Id names
favorite count: 0
possible better answer: http://stackoverflow.com/a/25883166
has answer: http://stackoverflow.com/a/25883166
answer count: 4
has answer: http://stackoverflow.com/a/25883216
type: AnsweredQuestion

http://stackoverflow.com/a/25992169
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25989490
has body: You can accomplish that, but you can't use ParsleyRemote. The problem with remote validators is that you cannot verify if the value is empty or not before the remote ajax call is made. A possible solution to this issue is adding a custom validator with .addValidator and then place an ajax call. In this case you don't even need to check if the input has any content because the validator is only executed when the input is not empty. &lt;input type="text" name="vatid" data-parsley-vatid /&gt; &lt;script&gt; $(document).ready(function() { window.ParsleyValidator .addValidator('vatid', function (value, requirement) { var response = false; $.ajax({ url: confighandler.getConfig().apiUrl + '/checkvatids', data: {vatid: value}, dataType: 'json', type: 'get', async: false, success: function(data) { response = true; }, error: function() { response = false; } }); return response; }, 32) .addMessage('en', 'vatid', 'Vatid is invalid.'); }); &lt;/script&gt; You can also check the following question that can provide adicional information: Parsley.js Trigger Error on AJAX
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/44018802
has comment: http://stackoverflow.com/comment/40749627
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44023273
accepted answer of: http://stackoverflow.com/q/25989490

http://stackoverflow.com/comment/40595974
has text: What output are you trying to get?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25932083
score: 2

http://stackoverflow.com/q/25941585
linked to: http://stackoverflow.com/q/29503213
downvote count: 0
score: 17
has body: I have React form that has a Component used to render a drop down because the options are coming from an API. However, I can't access the ref for the embedded component. I'm putting together my first form and trying to understand the best way to approach this. var ActivityForm = React.createClass({ handleSubmit: function(e) { e.preventDefault(); var noteCategoryId = this.refs.note_category_id.getDOMNode().value.trim(); var content = this.refs.content.getDOMNode().value.trim(); if (!category || !content) { return; } // this.props.onCommentSubmit({author: author, text: text}); this.refs.note_category_id.getDOMNode().value = ''; this.refs.content.getDOMNode().value = ''; return; }, render: function() { return ( New Activity Category <ActivityFormCategoryDropdown /> # THE REF IN THIS COMPONENT ISN'T ACCESSIBLE ); } });
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/25941739
has answer: http://stackoverflow.com/a/25941984
accepted answer: http://stackoverflow.com/a/25941984
tagged with: javascript
answer count: 2
upvote count: 17
favorite count: 0
possible better answer: http://stackoverflow.com/a/25941739
has title: React refs with components
type: AnsweredQuestion

http://stackoverflow.com/q/26005513
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26005659
tagged with: css
has answer: http://stackoverflow.com/a/26005621
type: AnsweredQuestion
score: 1
has body: Evening everyone, Im trying to make an inline-block to appear after I press the last radio button, I've tried .show() and .checked() events, but I'm becoming desperate now. Also if you could tell me at the same how I can make that appearing textbox to become REQUIRED that would be really helpful. Thank you. Here are the codes: function msgsend(ID) { if (ID === "nameInfo") { return "First one"; } else if (ID === "emailInfo") { return "Second one"; } else if (ID === "phoneInfo") { return "Third one"; } else if (ID === "busInfo") { return "Fourth one"; } else if (ID === "rulesInfo") { return "Fifth one"; } else if (ID === "pubInfo") { return "Sixth one"; }}; $(".hoverInfo").mousemove(function(e) { var hoverID = $(this).attr("ID"); var hoverID = msgsend(hoverID); $("#hoverdiv").text(hoverID).show(); $("#hoverdiv").css("top", e.clientY+10).css("left", e.clientX+10); }).mouseout(function() { $("#hoverdiv").hide(); }); $("#busStopLocation").hide(); if (("#busStopElse").checked) { $("#busStopLocation").show(); } else { $("#busStopLocation").hide(); }; * { padding: 0px; margin: 0px; font-family: "Aller", sans-serif; font-weight: lighter; font-size: 16px; } #mainpage { margin: 10px; } #mainpage a:link, a:visited { color: #2e8cb8; text-decoration: underline; } #mainpage a:hover { color: #265165; } li, #top p { padding: 5px 0px; } #top ul:nth-child(3) li { position: relative; left: 50px; display: block; } #top ul:nth-child(3) li label { padding-left: 10px; } #bottom { margin-top: 20px; } #bottom p { padding: 10px 0px; } #bottom label { margin-left: 10px; } label { margin-right: 10px; } span { margin-left: 5px; background-color: lightblue; border: 1px solid black; } .sbutton, .rbutton { margin-top: 50px; border: 1px solid #1c1c1c; background-color: lightblue; padding: 5px 10px; } .sbutton:hover, .rbutton:hover { background-color: #265165; color: white; } #hoverdiv { display: none; position: absolute; pointer-events: none; font-size: 16px; background-color: lightgray; color: blac…
has answer: http://stackoverflow.com/a/26005659
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has title: Block-inline not appearing after the radio button is pressed in my code
possible better answer: http://stackoverflow.com/a/26005621
answer count: 2

http://stackoverflow.com/comment/40726597
comment on: http://stackoverflow.com/q/26004625
score: 0
type: QuestionComment
type: Comment
has text: Your task appears to be named "watch" and not "express" ("express" is inside the *watch* object).

http://stackoverflow.com/comment/40707061
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25994476
has text: You update is deadly incorrect. It has syntax errors: `{month: month}).done(function(data) {year: year}).done(function(data)` is something very strange.

http://stackoverflow.com/a/25948296
answers question: http://stackoverflow.com/q/25948232
has body: At the moment neither function makes sense. This line in the first: $cars = cars; will overwrite the result of your ajax call with an undefined (at least, undefined in the code shown) variable cars. And then you don't actually do anything further with $cars - no point giving it a value if you don't use it. Then your second function is getting bound as a document ready handler which means the cars argument will be set to reference jQuery. That is, when you call $() or jQuery() and pass a function as an argument: $(function() { /* some code */ }); ...that function will be called when the DOM is ready. You should do all of the processing you need with your ajax call within the first function, something like this: $.get("test.php", function(cars){ $.each(cars, function(i, startList){ if(iNLarr[i]){ iNLarr[i](startList.name); } }); }, "json"); You may need to wrap the above in a document ready handler, or put it in a script at the end of the body.
upvote count: 1
has comment: http://stackoverflow.com/comment/40624247
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40672557
comment on: http://stackoverflow.com/q/25975208
score: 1
type: QuestionComment
type: Comment
has text: Also please just `return value >= rollvalue`

http://stackoverflow.com/q/25961506
accepted answer: http://stackoverflow.com/a/25961557
downvote count: 2
upvote count: 1
type: Question
tagged with: javascript
score: -1
has body: I want to copy input of text-box to Google search box using copy button and by pressing Google search box button it should give search result. here is my code: http://jsfiddle.net/46n8kmgw/ Here copy button is working properly but I'm not getting search result Here is code for search: http://jsfiddle.net/5dp6r45c/ (Note: This code is not working on jsfiddle.net try it on pc ) Can any one help me to figure out what is wrong ?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: AnsweredQuestion
has title: text box copy to searchbox
has answer: http://stackoverflow.com/a/25961557

http://stackoverflow.com/a/25997770
has body: Ids are supposed yo be unique. What you wrote in your html wouldn't work. What you can do, however, is to have a class "row" and "cell", and browse them one-by-one using for example this jquery syntax var where = $("#where_you_start") for(var i=0; i++; i&lt;how_many_rows_forward){ //Do some stuff on the current row where = where.next(".row") } (It's possible to to that without jquery of course)
answers question: http://stackoverflow.com/q/25997676
score: 0
type: Answer

http://stackoverflow.com/q/25899357
favorite count: 0
upvote count: 3
tagged with: physics-engine
accepted answer: http://stackoverflow.com/a/28761866
downvote count: 0
has title: Has b2DebugDraw and b2ContactListener been replaced in liquidfun.js?
has comment: http://stackoverflow.com/comment/42691085
type: Question
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/28761866
has comment: http://stackoverflow.com/comment/49018494
tagged with: box2dweb
tagged with: box2d
has body: I'm trying to replace my current Box2D library (box2dweb.js) with Google's LiquidFun library. The major difference seems like they placed all the b2#ClassName# classes in the global scope instead of keeping them modular (in a Box2D.* namespace like box2dweb did). BUT it also seems like they've omitted a few b2#ClassName#, two of which I was using from the Box2dWeb.js version: b2DebugDraw, and; b2ContactListener; Are those deprecated / not fully implemented / forgotten?
has comment: http://stackoverflow.com/comment/49017641
answer count: 1
tagged with: javascript
tagged with: liquidfun

http://stackoverflow.com/comment/40524605
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25892672
type: Comment
has text: As I said in my question, this functionality works 100% in all other browsers. OK, I tested it only in Chrome and Firefox. ;)

http://stackoverflow.com/q/25929696
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25929771
type: Question
upvote count: 4
tagged with: javascript
score: 4
accepted answer: http://stackoverflow.com/a/25929771
has title: Angularjs routing: Cannot read property 'path' of undefined
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: I'm trying to trigger angularJS routing inside of a function in controller, but it throws back "Uncaught TypeError: Cannot read property 'path' of undefined". Can't really see where I missed $location injection, guess it's the reason. var gameApp = angular.module('gameApp', ['ngRoute']); gameApp.config(function($routeProvider, $locationProvider, $provide) { $locationProvider.html5Mode(true); $routeProvider // route for the home page .when('/', { templateUrl : 'home.html', controller : 'mainController' }) // route for the game page .when('/game', { templateUrl : 'game.html', controller : 'gameController' }) // route for the game over page .when('/game-over', { templateUrl : 'game-over.html', controller : 'mainController' }) // default .otherwise({ redirectTo: '/' }); }); And part of my game controller when I'm using router gameApp.controller('gameController', ['$scope', '$location', function($scope, $location){ function gameLost($location){ var check = false; console.log ('You lose! Your score is ') $location.path('/game-over'); }])

http://stackoverflow.com/q/25955706
has comment: http://stackoverflow.com/comment/40702903
type: AnsweredQuestion
has body: In my MVC 4 application I am working on ContextMenus with jquery and quite a bit achieved that as well but currently I have been facing issues. One of my view with the use of contextmenu looks like this: I need to add some menus(namely Move,Delete,Details) on the right click against each of the element(ex:First Document,Doc1 etc) for which my corresponding razor source is: @foreach (var item in Model) { @Html.DisplayFor(m => item.Name, new { @class = "thumbnail" }) Item 1a Item 2a Item 3a Sub Item 3.1a Sub Item 3.2a Sub Item 3.3a } and the script to achieve this is: jQuery(document).ready(function($){ $('a.mylinks').addcontextmenu('contextmenu1') }) also I have included a jscontextmenu js file to get it working. But here my problem is that with this I am able to achieve the right click only for the first element only.I feel that with my document ready function the id for contextmenu1 will be applied to the first element only and in order to assign that against all of the names in the list I need to create some dynamic ids for the ul and then use it in my script . I tried with some of the possibities using a counter and incrementing it and then assigning the class to the script function but that didnt work. So can anyone suggest the way of achieving this.Thanks in advance.
score: 3
has answer: http://stackoverflow.com/a/26085729
has answer: http://stackoverflow.com/a/26116439
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40702914
has title: Working with Jquery Context Menu
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40703459
favorite count: 0
has comment: http://stackoverflow.com/comment/40703121
answer count: 3
has comment: http://stackoverflow.com/comment/40703361
has answer: http://stackoverflow.com/a/25992409
tagged with: contextmenu
has comment: http://stackoverflow.com/comment/40702607
accepted answer: http://stackoverflow.com/a/25992409
downvote count: 1
possible better answer: http://stackoverflow.com/a/26085729

http://stackoverflow.com/comment/40594337
type: AnswerComment
has text: @Matt The location does matter if you want access the correct scope. Go to this http://plnkr.co/edit/1r9NvuQoO8t1pDdicAK7?p=preview and empty the text box. The element outside the form would not have access to form.
type: Comment
comment on: http://stackoverflow.com/a/25920005
score: 0

magento
tags question: http://stackoverflow.com/q/26025554
tags question: http://stackoverflow.com/q/25962366
tags question: http://stackoverflow.com/q/25998995
tags question: http://stackoverflow.com/q/26021415
tag name: magento
tags question: http://stackoverflow.com/q/25939499
tags question: http://stackoverflow.com/q/25978277
type: Tag

http://stackoverflow.com/q/25986121
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25986260
tagged with: wordpress
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25986260
has title: Jquery Ajax passing data to another php file to update the database only allows to update once (Wordpress)
has body: I am trying to redirect the data using POST method to a file in Wordpress called functions.php. It is able to send the data detected from the textbox to that file and gets the return value by using wp_send_json($_POST). After getting the returned value, the value of the paragraph was able to change to its new value. But it only allows me to update it once unless the page is being refreshed or reloaded. What have i done wrong or have i missed? Below are my codes for this process. functions.php function test_load(){ if(isset($_POST) && $_POST['element'] == 'header') { $name = $_POST['name']; $hidden = $_POST['hidden']; if( $hidden == 'tagline') { update_option( 'wpbst_tagline', $name ); } else if( $hidden == 'footer') { update_option( 'wpbst_footer', $name ); } wp_send_json($_POST); } } add_action('init', 'test_load'); script HTML <?php echo $logo_decode->wpbst_logo_initial; ?> <?php echo $result_tagline;?> <input id="tagline" type="hidden" name='blogdescription' value=<?php echo '"'.$result_tagline.'"';?> /> <?php echo $button_decode->wpbst_button_name;?>
tagged with: javascript

http://stackoverflow.com/q/26025291
tagged with: javascript
has title: replace for loop with recursive function for
has answer: http://stackoverflow.com/a/26025397
downvote count: 0
favorite count: 0
answer count: 3
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13369465
score: 2
has answer: http://stackoverflow.com/a/26025350
has body: i am working on simple js function... can u tell me how to replace the loop with recursive function.. providing my code below in the fiddle.. I am trying to learn js http://jsfiddle.net/utbsgnzu/4/ function operation() { console.log("testing"); } function repeat(operation, num) { for (var i = 0; i &lt; num; i++) { operation(); } } //repeat(operation, 10); module.exports = repeat
upvote count: 2
duplicate of: http://stackoverflow.com/q/13369465
type: Question
has answer: http://stackoverflow.com/a/38812186

http://stackoverflow.com/q/25905076
has answer: http://stackoverflow.com/a/25905178
tagged with: dom
score: 0
answer count: 1
tagged with: javascript
has body: I'm quite new to AngularJS, just started with it and I came across ng-switch, where I noticed that this works only on tag, like Switch To 1 Switch To 2 <p ng-switch-default>Switch To Default when I declare it as below it throws an error! Switch To 1 Switch To 2 <p ng-switch-default>Switch To Default JavaScript : angular.module("myApp", []) .controller("switchController", function($scope) { $scope.myData = {}; $scope.myData.text = 2; console.log($scope.myData.text); }); PLUNKER DEMO
tagged with: angularjs
has title: AngularJS ng-switch throws error on tag
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25905178
linked to: http://stackoverflow.com/q/4291467
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40644404
type: QuestionComment
comment on: http://stackoverflow.com/q/25949510
has text: Then as I said, it must just be the way the string is shown in your debugger. If the actual output had all those backslashes in it it would be invalid JSON. (As can be seen here: http://jsfiddle.net/h5pj7q8o/)
score: 0
type: Comment

http://stackoverflow.com/q/25981697
has answer: http://stackoverflow.com/a/25981743
tagged with: undefined
has comment: http://stackoverflow.com/comment/40685433
has answer: http://stackoverflow.com/a/25982502
type: UnansweredQuestion
has body: HELP! Undefined values for all fields function UpdateData(){ var id = $('#id').attr('value'); var name = $('#name').attr('value'); var department = $('#departament').attr('value'); var phone = $('#phone').attr('value'); var mail = $('#mail').attr('value'); $.ajax({ url: 'updatePersonal.php', type: "POST", data: "submit=&name="+name+"&department="+department+"&phone="+phone+"&mail="+mail+"&id="+id, success: function(datos){ alert(datos); consultingData(); $("#form").hide(); $("#table").show(); } }); return false;} When I call the function it doesn't work, the value stored in the db is undefined for all fields and I tried to solve it by adding {} to the string on data: --> data: {"submit=&name="+name+"&department="+department+"&phone="+phone+"&mail="+mail+"&id="+id}, but if I do that, the next part is not executed success: function(datos){ alert(datos); consultingData(); $("#form").hide(); $("#table").show(); } updatePersonal.php --> <?php require('functions.php'); if(isset($_POST['submit'])){ require('clases/personal.class.php'); $objPersonal = new Personal; $id = htmlspecialchars(trim($_POST['id'])); $name = htmlspecialchars(trim($_POST['name'])); $department = htmlspecialchars(trim($_POST['department'])); $phone = htmlspecialchars(trim($_POST['phone'])); $mail = htmlspecialchars(trim($_POST['mail'])); if ($objPersonal->actualizar(array($name,$department,$phone,$mail),$id) == true){ echo 'Saved'; }else{ echo 'There was an error...'; } }else{ if(isset($_GET['id'])){ require('clases/personal.class.php'); $objPersonal = new Personal; $consult = $objPersonal->show_person($_GET['id']); $personal = mysql_fetch_array($consult); ?> <input type="hidden" name="id" id="id" value="<?php echo $personal['id']?>" /> Name <input class="text" type="text" name="name" id="name" value="<?php echo $personal['name']?>" /> Department <input class="text" type="text" name="department" id="department" value="<?php echo $personal['department']?>" /> Phone <input class="text" type="text" name=…
has comment: http://stackoverflow.com/comment/40685653
tagged with: php
has answer: http://stackoverflow.com/a/25981844
has comment: http://stackoverflow.com/comment/40685417
type: Question
has comment: http://stackoverflow.com/comment/40685097
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Undefined value ajax JQuery php
score: 0
answer count: 3

http://stackoverflow.com/comment/40674920
score: 0
type: QuestionComment
type: Comment
has text: Please post the code you have tried already and make your question more specific about the problem you are having.
comment on: http://stackoverflow.com/q/25975965

http://stackoverflow.com/comment/40508429
type: QuestionComment
comment on: http://stackoverflow.com/q/25883980
score: 0
has text: Its implemented by the browser internally. So different browser might have different implementations. As it is native it will be fast compared to other implementations.
type: Comment

http://stackoverflow.com/comment/40522586
comment on: http://stackoverflow.com/q/25891556
has text: You need to be a little more specific when saying "plus open an external link". In a new tab? An iframe?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/31600032
has comment: http://stackoverflow.com/comment/56255263
has body: There's API documentation on the FormController. This allowed me to find that there's other methods to call such as: $setUntouched() - which is a function I was using if the user has focused on the field, and then left the field, this clears this feature when you run it. I created a simple form reset function which you can use too. // Set the following in your controller for the form/page. // Allows you to set default form values on fields. $scope.defaultFormData = { username : 'Bob'} // Save a copy of the defaultFormData $scope.resetCopy = angular.copy($scope.defaultFormData); // Create a method to reset the form back to it's original state. $scope.resetForm = function() { // Set the field values back to the original default values $scope.defaultFormData = angular.copy($scope.resetCopy); $scope.myForm.$setPristine(); $scope.myForm.$setValidity(); $scope.myForm.$setUntouched(); // in my case I had to call $apply to refresh the page, you may also need this. $scope.$apply(); } In your form, this simple setup will allow you to reset the form Reset Log In
downvote count: 0
answers question: http://stackoverflow.com/q/26015010
type: Answer
score: 25
has comment: http://stackoverflow.com/comment/56214581
upvote count: 25

http://stackoverflow.com/q/25884099
tagged with: javascript
has comment: http://stackoverflow.com/comment/40508647
score: 0
has comment: http://stackoverflow.com/comment/40508539
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40529963
tagged with: animation
has title: Javascript .animate fade in/out not working
has comment: http://stackoverflow.com/comment/40528240
has body: My homepage has images in my posts and I have been using the following javascript according to this site (http://grepable.blogspot.sg/2013/01/modify-homepage-image-animation-in.html) to make my images fade out when I mouse over them and fade in when I move my mouse away: &lt;script type='text/javascript'&gt; $(function() { $('.snips-image').hover(function() { $(this).find('img').animate({ opacity: 0 }, { queue: false, duration: 400 }); }, function() { $(this).find('img').animate({ top: '0px', opacity: 1 }, { queue: false, duration: 400 }); }); }) &lt;/script&gt; It has always worked fine, but today I noticed that the javascript isn't working anymore and the animation is gone; the images are just static when I mouse over them. They look like this now (http:// mermaidwithabook .blogspot. com/ &lt;--- please delete the spaces in between). How do I get the javascript to work like it did before? I don't know what went wrong. The images should fade out when you mouse over them just like on this site (http://grepable.blogspot.com/). Help is greatly appreciated. Thank you!
has comment: http://stackoverflow.com/comment/40523011
type: Question
linked to: http://stackoverflow.com/q/16344354

http://stackoverflow.com/comment/40549506
type: Comment
type: AnswerComment
has text: I followed this gem documentation, from official website i only download plugins. This is error from my firebug console: uncaught exception: [CKEDITOR.resourceManager.add] The resource name "dialog" is already registered. Line 0
score: 0
comment on: http://stackoverflow.com/a/25906637

http://stackoverflow.com/a/26004237
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40726883
score: 1
has comment: http://stackoverflow.com/comment/40734518
has body: Are you just trying to make a request and use the data returned? If so, just make an ajax request and update the html with the data you get back var request = new XMLHttpRequest(); request.open('POST','http://www.fake.com/whatever.php?val1='+search_string,true); request.send(); request.onreadystatechange = function(){ if(request.readyState == 4 &amp;&amp; request.status=200){ //The request has been completed, handle the data var data = JSON.parse(request.responseText); } }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26004004
answers question: http://stackoverflow.com/q/26004004

http://stackoverflow.com/comment/40615312
has text: @Macsupport - Ahhh, you got it. I'm using v1 and hadn't noticed the site is now on v2. V2 was still in Beta when I started with it. Please add that as an answer so I can give you credit. Here is a jsfiddle for kicks: http://jsfiddle.net/htjdzhtz/47/. It's using v1. If you change `"layout"` to `"reLayout"` it works. Thanks!
score: 0
comment on: http://stackoverflow.com/q/25936793
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40645451
type: Comment
type: QuestionComment
has text: @TJ No I expect to get help, like this website was made for.
score: 1
comment on: http://stackoverflow.com/q/25960175

http://stackoverflow.com/comment/40592109
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25930007
has text: You do not have to use jQuery to put this values into array. This can be done easily by pure JavaScript..

http://stackoverflow.com/comment/40773561
comment on: http://stackoverflow.com/q/26030509
has text: In that case I think it would be really tricky (and not to forget a hugely bloated file) to do it with CSS/Less. I am not much into SASS but I would assume the same applies for it too.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40502693
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25875649
has text: thanks for pointing me in the right direction. See edits to original question for the final product.

http://stackoverflow.com/q/25936245
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40603640
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25936721
has body: Here I have made one filter category with check box. But I want it with select box.How can I convert it ? It will be very handy if I do it with Select box.So can you guide me for this ? skirt trousers shirt blue pink green
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Filter category and show result
answer count: 1
has answer: http://stackoverflow.com/a/25936721

http://stackoverflow.com/q/25947399
tagged with: http://stackoverflow.com/tag/html
has title: sending data from html to php page without leaving page
has answer: http://stackoverflow.com/a/25947492
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25947440
has answer: http://stackoverflow.com/a/25947726
type: Question
has answer: http://stackoverflow.com/a/25947685
has answer: http://stackoverflow.com/a/25947819
tagged with: javascript
answer count: 6
tagged with: jquery
tagged with: ajax
has body: I already used huge time for this in stack overflow and googling.But none of it worked for me. I have a form in html and i need to send the data to a php without leaving the page.I used ajax and javascript.I can POST data by leaving the page but i don't want to leave the page. here is my html: Title Header Please fill the details. Name I can access "name" in php through post by leaving page, So I am not posting php here. Any Help would be highly appreciated. if anybody needs clarification i am here.
score: 0
has answer: http://stackoverflow.com/a/25987016
accepted answer: http://stackoverflow.com/a/25987016
possible better answer: http://stackoverflow.com/a/25947440

http://stackoverflow.com/comment/40731300
type: AnswerComment
comment on: http://stackoverflow.com/a/26001812
score: 0
type: Comment
has text: No never -_- if jQuery can do it, JavaScript can do it.

http://stackoverflow.com/comment/40723780
has text: Hi, that put the "More" inline with the text in a correct way. But notice that if you resize the windows, the More is not in the right place (gets bit crazy). Moreover, I just realized that in Firefox, ellipsis is not working.
comment on: http://stackoverflow.com/a/26003272
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25895916
has answer: http://stackoverflow.com/a/25896138
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 6
has title: After button click, show spinner icon on button while click event in progress
type: AnsweredQuestion
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/25898716
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25898262
score: 6
has body: I'm trying to show spinner on button while loading on submit, I have seen a couple of implementations and tried in my application but its not working. Here is the fiddle which I am trying to describe. I want to mention one other thing that this HTML is on my sidebar and being added through javascript on ajax call My JS (function () { $(document).on("click","#submitbutton", function (event) { $(this).addClass('active'); var formdata = $("#filterdata").serializeArray(); var url1 = "/SelectUnit"; $.ajax({url: url1, data: formdata, type: 'GET', async:false .....}).done(function(){ $(this).removeClass('active'); }) }); })(); My CSS .spinner { display: inline-block; opacity: 0; max-width: 0; -webkit-transition: opacity 0.25s, max-width 0.45s; -moz-transition: opacity 0.25s, max-width 0.45s; -o-transition: opacity 0.25s, max-width 0.45s; transition: opacity 0.25s, max-width 0.45s; /* Duration fixed since we animate additional hidden width */ } .has-spinner.active { cursor:progress; } .has-spinner.active .spinner { opacity: 1; max-width: 50px; /* More than it will ever come, notice that this affects on animation duration */ } My HTML Select Clear
has answer: http://stackoverflow.com/a/25916474
downvote count: 0
has answer: http://stackoverflow.com/a/25896186
tagged with: jquery
linked to: http://stackoverflow.com/q/16046387
has answer: http://stackoverflow.com/a/25898716
favorite count: 0
possible better answer: http://stackoverflow.com/a/25896138

http://stackoverflow.com/comment/40637964
has text: Your braces are not balanced, which you would be able to see easily if you formatted your code.
comment on: http://stackoverflow.com/q/25956323
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40761796
type: AnswerComment
has text: I get it, so what if you just want the value of myValue?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26022909

http://stackoverflow.com/a/26059269
has body: In cocos2d-x v3.2 for cpp i got same error.. it turned out i did not run source /Users/your_user/.profile (so that environment variables are actually updated) this line is generated after you run setup.py All steps: Run setup.py Run source /Users/your_user/.profile (so that environment variables are actually updated) Run cocos new mygame -p com.your_company.mygame -l cpp -d /directory_to_your_game replace cpp with js in above command
answers question: http://stackoverflow.com/q/26009148
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/25892801
has body: I would like to use Knockout.js with Bootstrap Tour. In particular, I would like to attach some data bound click handler to a button within a tour step. I create a simple tour like this: var tour = new new Tour({ steps: [ { orphan: true, title: "Help Title", content: " Click me! " } ] }); tour.init(); tour.start(true); Is it possible to use this kind of binding? Or won't this binding work because of the markup code creation mechanism of bootstraptour? I tried it like this but clicking on the button does not execute the function neither is any error message shown.
answer count: 1
tagged with: bootstrap-tour
has title: Knockout.js + Bootstrap Tour
has answer: http://stackoverflow.com/a/25895275
type: AnsweredQuestion
tagged with: knockout.js
linked to: http://stackoverflow.com/q/8281875
type: Question
accepted answer: http://stackoverflow.com/a/25895275
tagged with: javascript
linked to: http://stackoverflow.com/q/7342814
score: 0

http://stackoverflow.com/a/25987850
has body: I recommend restructuring your HTML in the following way: Cont 1 Cont 2 Cont 3 one two three then use this as your jquery code: $('.content').click(function(){ var num = $(this).attr('id').split("c")[1]; $("#h"+num).show(); }); and by the way, change your css too: .hidden-content{ /* display:none;*/ } .hidden-box{ width:35px; height:35px; border:1px solid black; display:none; }
score: 0
answers question: http://stackoverflow.com/q/25987528
type: Answer

http://stackoverflow.com/q/25972332
has answer: http://stackoverflow.com/a/25972384
score: 0
has body: I have a web application with some pages where there are some texts, and some charts generated with javascript library. I want to show a "Download as pdf" link on each page, which will export the current page in pdf version. Is there any way to do this.?
answer count: 3
tagged with: highcharts
has answer: http://stackoverflow.com/a/25972561
tagged with: javascript
has title: How to convert current xhtml page with javascript charts to pdf
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf
linked to: http://stackoverflow.com/q/1686280
tagged with: jsf
has comment: http://stackoverflow.com/comment/40667151
type: Question
has answer: http://stackoverflow.com/a/25978805

http://stackoverflow.com/a/25922454
downvote count: 1
has body: Your regex is not taking into account the last Mobile Safari/537.36; as vks pointed out the regex ignores that last bit since your pattern succeeds completely after Chrome/38.0.2125.57 matches. Had you added the end-terminator character ($) to your pattern, it would have failed and it would have be apparent as to the problem. replace() in Javascript finds the part of the text that matches the regex and replaces it, not the whole input string. You could add .* at the end to sort of 'burn' through those last characters, causing the regex to match the whole line and thus causing a replace to remove those bits. This also requires you make the previous match group non-lazy by removing the ? after [\d\.]*. I'd also add ^ and $ at the beginning/end of your pattern to signify the beginning and end of the input string (it's good form to do so), as well as optionally add /gm, which tells the regex to match each line (could potentially be useful in your case), though neither of these additions are required. /^.*?(Firefox|Chrome)\/([\d\.]*).*$/gm
upvote count: 5
has comment: http://stackoverflow.com/comment/40579070
answers question: http://stackoverflow.com/q/25922292
score: 4
has comment: http://stackoverflow.com/comment/40579051
type: Answer

http://stackoverflow.com/a/25879943
upvote count: 3
has body: You may need to clear your interval before resetting it. When you click "Hire Workers" twice, two timers are created. Here's a demonstration. You only want one timer no matter how many times the button is clicked. When you call setTimer(), it returns a unique integer that you can use to reference that timer later. Since you are always setting (overwriting) the same variable workerCheck as the timer's unique integer, only the latest timer can be referenced by the workerCheck variable. Here's a demonstration. I suggest that you clear the timer each time you reset it: $(function () { $('#Purchase').click(function () { automaticCounter(); }); // set variable with broader scope var workerCheck; function automaticCounter() { var workers = parseInt($("#Workers").text()); workers = isNaN(workers) ? 0 : ++workers; $("#Workers").text(workers); var autoCounter = parseInt($("#Aliens").text()); autoCounter = isNaN(autoCounter) ? 0 : autoCounter - 10 * workers; $("#Aliens").text(autoCounter); // clear the timer clearInterval(workerCheck); // set the timer workerCheck = setInterval(function () { var workers = parseInt($("#Workers").text()); if (workers &gt; 0) { for (var i = 0; i &lt; workers; i++) { $("#Alien").click(); } } }, 5000); } }); WORKING EXAMPLE
answers question: http://stackoverflow.com/q/25879601
score: 3
accepted answer of: http://stackoverflow.com/q/25879601
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40501689
type: Answer

http://stackoverflow.com/comment/40726708
type: Comment
score: 0
type: QuestionComment
has text: JS doesn't support recursion construct in regex. That's a shame. Would it kill Microsoft to do this right?
comment on: http://stackoverflow.com/q/26004412

http://stackoverflow.com/comment/40753994
type: QuestionComment
comment on: http://stackoverflow.com/q/26019875
score: 0
has text: Have you tried getting the available space and then dividing it with a factor based on the pixel width of the average character?
type: Comment

http://stackoverflow.com/q/26021133
has title: F8 and F9 keys not being captured in Chrome with jQuery
type: Question
accepted answer: http://stackoverflow.com/a/26022253
has body: I want to use some function keys as shortcuts to my web app. Everything seems to work, except that I can't capture F8 and F9 on chrome. I'm using jQuery 2.1, and am registering to the keydown event with: $(window).on('keydown', function(e) { ... }; I have made a very simple JsFiddle to illustrate the problem. If I press any key, the text in the div is updated. Nothing happens if I press F8 or F9. I have tested on Firefox and it works, so it's a browser specific problem, even maybe some configuration in my machine. My chrome's version is 37.0.2062.120 m Another weird thing is that if I press F8 or F9 along with some modifier key (alt, shift or control), it works. Anyone have any ideas?
has comment: http://stackoverflow.com/comment/40756293
has comment: http://stackoverflow.com/comment/40756288
score: 0
has comment: http://stackoverflow.com/comment/40756355
has comment: http://stackoverflow.com/comment/40756280
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26022253
has comment: http://stackoverflow.com/comment/40756460
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40756418
tagged with: google-chrome

http://stackoverflow.com/comment/40600089
has text: why dont you use `height: auto;`?
score: 2
comment on: http://stackoverflow.com/q/25934581
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25954615
has body: You can do this, get current time. Then define you start time and end time based on the current time getting the year, month, date for tomorrow's date add 1 to the start's date see code below. Then you can compare the time the same fi condition you have. Good luck var now = new Date(); var start = new Date(now.getFullYear(),now.getMonth(),now.getDate(),7).getTime(); var end = new Date(now.getFullYear(),now.getMonth(),now.getDate() + 1,2).getTime(); now = now.getTime(); if( now &gt;= start &amp;&amp; now &lt; end) { console.log("opened"); } else { console.log("closed"); } ***EDIT** You can convert the current time to millis after you get the year, month and date. Then use your current if condition.
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25954510
downvote count: 0

http://stackoverflow.com/comment/40549915
has text: thank you. but in the case of form I did send: csrfmiddlewaretoken: $('#myForm input[name=csrfmiddlewaretoken]').val(), but my question now is no form. so it is unclear what value is contained in the {{ csrf_token }}
type: AnswerComment
comment on: http://stackoverflow.com/a/25897210
type: Comment
score: 0

http://stackoverflow.com/comment/40750226
comment on: http://stackoverflow.com/q/26017715
has text: I have that the user click on the link 'save' and only start the download, with no windows asking the folder and no reload of the page
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40581829
type: Comment
comment on: http://stackoverflow.com/q/25924220
type: QuestionComment
score: 1
has text: There are several key things wrong here. It also looks like you're trying to implement a callback but really only need a simple return.

http://stackoverflow.com/comment/40540510
has text: @RomainBraun—strictly, a new string is created every time regardless of `=` or `+=`. ;-)
type: QuestionComment
comment on: http://stackoverflow.com/q/25901559
score: 1
type: Comment

http://stackoverflow.com/comment/40649749
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25962696
has text: Missing `)` after `}`

http://stackoverflow.com/a/25964306
has body: The problem is your getUser function is returning immediately while the database functions are executing asynchronously. So, by the time the query function completes your getUser function has long since exited. You could get around this by passing a callback function in along with your username and password, like this: var mysql = require('mysql'); var pool = mysql.createPool({ connectionLimit: 10, user: 'root', password: '', host: '127.0.0.1', port: 3306, database: 'store' }); exports.getUser = function(user, pass, cb){ var sql = 'SELECT * FROM store.users WHERE user = \'' + user + '\' AND password = \'' + pass + '\''; pool.getConnection(function(err, connection) { if(err) throw err; // Use the connection connection.query( sql, function(err, rows) { if(err) throw err; cb(rows.length); // And done with the connection. connection.release(); }); }); }; Then, you call your function like this: var pool = require('./database'); pool.getUser('someuser', '1234', function(result){ console.log(result); } ); To get a handle on the asynchronous nature of nodejs I suggest taking a look at The Node Beginner Book (http://www.nodebeginner.org). There is even a section addressing your very problem, titled "Event-driven asynchronous callbacks."
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40687501
accepted answer of: http://stackoverflow.com/q/25963669
answers question: http://stackoverflow.com/q/25963669
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40655657

http://stackoverflow.com/q/25979419
has title: How to work with MeteorPad? (Update: works at home not at work -- firewall, proxy issue?)
upvote count: 1
answer count: 1
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has body: UPDATE: Perhaps a firewall or proxy issue? Wouldn't work at work, but works here at home I have been trying to work with MeteorPad (http://meteorpad.com/) but can't seem to get very far with it. The area at the bottom of the screen displays Macintosh spinning cursor — the area to the right (where I assume the app would run) simply remains blank, no matter which of the available buttons I click on. Tried it in Chrome and Safari, Mac OS Mavericks. Am I missing something super-obvious? Thanks in advance!
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/28211108
type: Question
tagged with: javascript

http://stackoverflow.com/comment/101579653
type: AnswerComment
has text: @UlrichDohou: Check the answer below with an example to make it sync. https://stackoverflow.com/a/49182165/384884
comment on: http://stackoverflow.com/a/44410762
type: Comment
score: 1

http://stackoverflow.com/comment/40849310
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25877887
type: AnswerComment
has text: So I copied the entire dynamicSort function out of the module.exports, and now it's working. But now I have two duplicates of the same method, which is insane!!! Is there a better solution?

http://stackoverflow.com/comment/40632951
has text: I love that you managed to write the password in the comment too... as it wasn't visible enough already
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25953643

http://stackoverflow.com/q/25926504
type: UnansweredQuestion
downvote count: 1
has body: all, I asked a question about this program earlier, but I have a new problem. I'm trying to make a two-column proof writer, and I'm having trouble with some of the code. It's relatively simple stuff, but for some reason, nothing I have been trying has been working. The code is as follows: Insert Given: Insert Statement to Prove: Submit Step Number Step Explaination 1 <var="x"> Given I want this to do a few things that it currently refuses to do. Firstly, I just want the onclick function edit() to show the value of x so that I can make sure that it is accepting the user's input. The other thing that I'm annoyed at is that I can't find a way to print this variable in the HTML based table below the function. If the user says for the given something like (Angle ABD is Bisected by Ray BC), for example, I want that to be displayed in the first row as the given statement and then I will work from there getting the code to check different postulates, theorems, etc. until the desired proof is created based off the user input of "Statement to Prove" Sorry for my messy code and inexperience, I'm only a freshman in HS, so I haven't worked with JavaScript and HTML for terribly long. I intend to do some "if...then" statements for the properties and postulates and such, saying for example if "previous step" is a statement of congruency (I'll check for formatting words) and "statement to prove" is a statement of equality, then (br or however you extend the table, (a) = (b) instead of (a) =~ (b)). If you know a better way of adapting this system that will save me a lot of time I'd be more than happy to take some tips.
score: -1
has title: HTML and JavaScript Proof Writer
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25926605
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40586014

http://stackoverflow.com/q/25933871
has comment: http://stackoverflow.com/comment/40599994
has comment: http://stackoverflow.com/comment/40598713
tagged with: http://stackoverflow.com/tag/json
score: -1
has body: I want to encode an array in php as JSON. How do I make a proper JSON array? i want to pass two variables. $var = 33; $last = 44; and db results: foreach($query-&gt;result() as $r) { $data[]= $r; //popunjava niz rezultatima } i am trying to make JSON like this: $data=''; $data[] =$last; $data[] =$pn; foreach($query-&gt;result() as $r) { $data[]= $r; //popunjava niz rezultatima } echo json_encode($data); // json enkoduje niz i pomocu echo prosledjuje do ajaxa
type: Question
has answer: http://stackoverflow.com/a/25934104
answer count: 2
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25934245
has comment: http://stackoverflow.com/comment/40598657
has comment: http://stackoverflow.com/comment/40599292
favorite count: 0
has comment: http://stackoverflow.com/comment/40598735
has comment: http://stackoverflow.com/comment/40599254
type: UnansweredQuestion
tagged with: codeigniter
tagged with: php
downvote count: 1
has title: Populate JSON array
has comment: http://stackoverflow.com/comment/40599252

http://stackoverflow.com/comment/40553107
type: QuestionComment
comment on: http://stackoverflow.com/q/25902000
score: 0
has text: I think not. I only use: require(["router","jQueryMobile"], function(Router) { new Router(); }
type: Comment

http://stackoverflow.com/comment/40517520
comment on: http://stackoverflow.com/a/25889169
type: Comment
score: 0
type: AnswerComment
has text: And don't forget to remove any `console.log` commands or they will break the page on IE :)

http://stackoverflow.com/comment/40601079
score: 1
comment on: http://stackoverflow.com/q/25935061
type: Comment
has text: The code in the liveweave links aren't enough? My code is almost exactly the same except that I have for loops to generate some html. I have the same problem as shown in the 2nd liveweave link.
type: QuestionComment

http://stackoverflow.com/q/26023032
has title: Hide dynamic div element in javascript and/or html
has answer: http://stackoverflow.com/a/26023304
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/26024014
has body: I'm kind of new at this so bear with me. I am trying to hide a specific dynamic div element (it's a catalog) out of a list of 6 elements (catalogs) but not having much luck. To be specific, catalogid="3" needs to be hidden on the page yet still remain active. If the exact url for that catalog is pasted into the browser, the catalog should be accessible. Basically, it is going to be a hidden catalog only given to specific customers in order to buy specific products. Here is the HTML: &lt;span catalogLink='index.html?action=courseBrowse&amp;CatalogID=${CatalogID}' style="color:#fff"&gt;${Name}&lt;/span&gt; And here is the Java script code: location.href =getHostingHTML()+"?action=courseBrowse&amp;CatalogID="+catalogID; Question: Can I just put a snip-it of code under either of those lines that would simply hide catalog 3 after execution?
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40761489
upvote count: 1
has answer: http://stackoverflow.com/a/26023061
score: 1
has comment: http://stackoverflow.com/comment/40759723
type: Question

http://stackoverflow.com/q/25947731
downvote count: 0
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40623062
favorite count: 0
tagged with: ajax
has title: Facing on Make Like Unlike Button in php , mysql using ajax calling
type: Question
tagged with: php
has answer: http://stackoverflow.com/a/25947911
has comment: http://stackoverflow.com/comment/40623009
upvote count: 1
has comment: http://stackoverflow.com/comment/40623056
answer count: 1
tagged with: ajaxform
has body: I m creating like and unlike button for my website , at my local server i used seprate file it it working fine but when i install at my website then it is not working properly. I m Fetching some information using this code from url bar &lt;?php error_reporting (0); include "includes/session.php"; include 'database/db.php'; extract($_REQUEST); if(isset($_GET["i"])) { $pid=($_GET['p']); $lid=($_GET['i']); } ?&gt; &lt;?php $likquery = mysql_query("select * from likes where userid=$id and postid=$lid"); if(mysql_num_rows($likquery)==1){ ?&gt; &lt;a class="unlike" id="&lt;?php echo $lid ?&gt;"&gt;UnLike&lt;/a&gt;&amp;nbsp;&lt;span class="like_update" id="&lt;?php echo $lid ?&gt;"&gt;&lt;/span&gt; &lt;?php }else{?&gt; &lt;a class="like" id="&lt;?php echo $lid ?&gt;"&gt;Like&lt;/a&gt; &lt;?php }?&gt; AFTER this I use script &lt;script src="js/jquery-1.8.3.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $('body').on('click','.like',function(){ var postId = $(this).attr('id'); var postData = 'postid='+postId+'&amp;uid=&lt;?php echo $id ?&gt;'; $.ajax({ type: "POST", url: "like_notes", data: postData, cache: false, success: function(){ $('#'+postId).text('UnLike').addClass('unlike').removeClass('like'); } }); }) $('body').on('click','.unlike',function(){ var postId = $(this).attr('id'); var postData = 'postid='+postId+'&amp;uid=&lt;?php echo $id ?&gt;'; $.ajax({ type: "POST", url: "likeun_notes", data: postData, cache: false, success: function(){ $('#'+postId).text('Like').addClass('like').removeClass('unlike'); } }); }) }); &lt;/script&gt; And I m not getting any response but when i use &lt;script src="js/jquery-1.8.3.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $(".like").click(function(){ var postId = $(this).attr('id'); var postData = 'postid='+postId+'&amp;uid=&lt;?php echo $id ?&gt;'; $.ajax({ type: "POST", url: "like_notes", data: postData, cache: false, success: function()…
has comment: http://stackoverflow.com/comment/40622991
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/26022258
type: AnsweredQuestion
tagged with: d3.js
upvote count: 1
type: Question
has body: I am download multiple json data files and then visualize that files using D3 data charts. When I load the page it takes lot of time 2-3 minutes to download and visualize, even more on mobile devices. and browser shows a dialog for unresponsiveness. Is there a way to improve load time and handle the load time gracefully? Every file is of few hundred (100 - 500) KBs and there are 20 - 200 files Here is a sample code for line chart only drawLineChart it downloads the json file and extract the data from it, formatLineChartData formats that data to input d3 and finally lineChartConfig draws the chart. similarly there are functions for bar charts, pie charts, word clouds and maps. var drawLineChart = function(lineChartData, suffix, el){ var n = lineChartData.length; var dataArray = []; var labels= ''; var allNull =true; // flag to check if every ajax does not return any data for (var i=0; i&lt;n; i++){ spark.loadCounterJSON(lineChartData[i].file + suffix,i, function(res){ var data =res.values; if(data){ if(lineChartData[res.counter].slug !== 'global'){ allNull = false; } var title = Object.keys(data.entities)[0]; graphValues = data[title]; if(graphValues!=''){ labels = data['properties']; dataArray.push( formatLineChartData( graphValues, lineChartData[res.counter].name, true ) ); } } if(res.counter === n &amp;&amp; !allNull){ // all outer ajax done; lineChartConfig(el, dataArray, false, true, '' ,labels); } }); } }; var formatLineChartData = function(graphValues, key, xDataType){ formatedData = []; $.each(graphValues, function(i, v){ value = {}; if(xDataType !== undefined){ value['x'] = new Date(v.x); } else {value['x']=v.x;} value['y']=parseInt(v.y) formatedData.push(value); }); return {values:formatedData,key:key}; } var lineChartConfig = function (div, data, guideline, useDates, auxOptions,labels, width, height) { var margin = {top: 20, right: 20, bottom: 30, left: 50}, width = width - margin.left - margin.right, height = height - margin.top - margin.bottom; //var par…
has title: browser unresponsive upon loading larger files
score: 1
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/26022761
has comment: http://stackoverflow.com/comment/40758341
has comment: http://stackoverflow.com/comment/40758708
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26022761
has comment: http://stackoverflow.com/comment/40758862

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/25968765
tags question: http://stackoverflow.com/q/25949848
tags question: http://stackoverflow.com/q/25993027
tags question: http://stackoverflow.com/q/26001122
type: Tag

http://stackoverflow.com/comment/40592461
score: 0
has text: Your welcome! I'm glad to see that your problem is fixed.
type: Comment
comment on: http://stackoverflow.com/a/25929519
type: AnswerComment

http://stackoverflow.com/q/26025970
answer count: 2
has answer: http://stackoverflow.com/a/26026138
tagged with: javascript
tagged with: query-string
tagged with: jquery
has comment: http://stackoverflow.com/comment/40765638
has answer: http://stackoverflow.com/a/26026226
possible better answer: http://stackoverflow.com/a/26026138
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40765462
has comment: http://stackoverflow.com/comment/40765449
accepted answer: http://stackoverflow.com/a/26026226
type: Question
tagged with: indexof
has comment: http://stackoverflow.com/comment/40765773
has title: How to remove specific querystring on click?
has body: Let's say I have the following url string: www.mysite.com?this&that&theOtherThing I know how to add query strings to any link, but am unaware of how to remove one. For instance, I know I can add a query string by doing the following: //just add within the href submit or //set the href within jquery $('button').attr('href', currentUrl + '&that'); How would I remove that same query on click? I tried the following, but got an NaN error: $('button').attr('href', currentUrl - '&that'); Does anyone have advice on how to remove a query?
score: 0

http://stackoverflow.com/comment/40543592
type: QuestionComment
has text: @PHPglue—that approach doesn't work because proportional fonts mean different characters require a different amount of space and also you don't know where wrapping or word breaks have occurred. It also may be different for different browsers on different platforms (e.g. Windows lays out fonts differently to Mac).
comment on: http://stackoverflow.com/q/25903041
score: 0
type: Comment

http://stackoverflow.com/comment/40687302
comment on: http://stackoverflow.com/q/25982978
has text: Try to minimize. Do you get the error if you don't add the markers?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40614295
has text: http://api.jquery.com/ready/
comment on: http://stackoverflow.com/q/25942017
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/26020867
answers question: http://stackoverflow.com/q/26020578
has comment: http://stackoverflow.com/comment/130544446
type: AcceptedAnswer
has body: Yes, the rejection reason most definitely should be wrapped in new Error(). A string is not an error, when you have errors usually it means something went wrong which means you'd really enjoy a good stack trace. No error - no stack trace. Just like with try/catch, if you add .catch to a thrown rejection, you want to be able to log the stack trace, throwing strings ruins that for you. I'm on mobile so this answer is rather short but I really can't emphasize enough how important this is. In large (10K+ LoC) apps stack traces in rejections really made the difference between easy remote bug hunting and a long night in the office.
upvote count: 61
type: Answer
accepted answer of: http://stackoverflow.com/q/26020578
has comment: http://stackoverflow.com/comment/40756643
has comment: http://stackoverflow.com/comment/40756930
downvote count: 1
score: 60
has comment: http://stackoverflow.com/comment/125175615

http://stackoverflow.com/comment/40719276
comment on: http://stackoverflow.com/a/26000429
score: 0
type: AnswerComment
has text: place it inside protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { }
type: Comment

http://stackoverflow.com/q/26012295
score: 0
accepted answer: http://stackoverflow.com/a/26015571
has title: detect when pressing the deleted key using jquery
has body: I am doing a calculator program using jquery program. In the following code I need to capture the delete key. $("body").on("keydown",function(evt) { var ChCod = (evt.which) ? evt.which : event.keyCode strvalue=String.fromCharCode(ChCod); if (ChCod &gt; 31 &amp;&amp; (ChCod &lt; 48 || ChCod &gt; 57) &amp;&amp; (ChCod!=43) &amp;&amp; (ChCod!=45) &amp;&amp; (ChCod!=42) &amp;&amp; (ChCod!=47) &amp;&amp; (ChCod!=61) &amp;&amp; (ChCod!=13) &amp;&amp; (ChCod!=46)) { return false; } else { if(ChCod==43 || ChCod==45 || ChCod==42 || ChCod==47 || ChCod==61 || ChCod==13|| ChCod==46) { if(ChCod==46) Dot(); else if(strvalue=='=' || ChCod==13) Calculate(); else Operate(strvalue); } else AddDigit(strvalue); return false; } }); If I am using keydown event, It will not correctly trigger the number. (eg: when I pressing the '1' it return 'a')
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26015571
has comment: http://stackoverflow.com/comment/40740021
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40644602
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25959952
has text: nice way to do the task +1
type: AnswerComment

http://stackoverflow.com/comment/40569418
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25917497
has text: CSS selectors 101 `"checkbox"` is looking for ` ` That is an element selector, not an attribute selector.

http://stackoverflow.com/a/25914266
score: 0
answers question: http://stackoverflow.com/q/25911597
has body: I think this will do what you want (though I'm not entirely sure about your data model): &lt;input type="radio" name="{{checked}}" value="{{ true }}"&gt;Fixed &lt;input type="radio" name="{{checked}}" value="{{ false }}"&gt;% &lt;br&gt; {{name}} is {{checked}} where data: { name: 'foo', checked: true } See http://jsfiddle.net/9jan1j7q/
type: Answer

http://stackoverflow.com/comment/40582988
comment on: http://stackoverflow.com/q/25924772
score: 0
type: QuestionComment
type: Comment
has text: I'm looking at the site and can't find the JavaScript that triggers the class change - can you reproduce it in your question please? (It's a good idea to do that as a general rule of thumb anyway).

http://stackoverflow.com/comment/40713338
score: 2
has text: Answer by @JugalThakkar is good one - and just a word of explanation. media-queries won't work because everything in SVG is computed and displayed using x/y position. The same for width/height. When you hide just SVG element, that won't reflow anything on a chart, you need to manually manage this space.
comment on: http://stackoverflow.com/q/25944419
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40673808
score: 0
type: Comment
type: QuestionComment
has text: Hi @Bergi can you help me? to fix it
comment on: http://stackoverflow.com/q/25945301

http://stackoverflow.com/a/25899326
has comment: http://stackoverflow.com/comment/40536391
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40537632
type: Answer
answers question: http://stackoverflow.com/q/25899113
has comment: http://stackoverflow.com/comment/40536735
accepted answer of: http://stackoverflow.com/q/25899113
downvote count: 0
has body: First you add an event listener to your select element, to trigger a function when it's value changes: document.getElementById('test').addEventListener('change', setFormMethod, true); Second you make sure your triggered function changes the form's method attribute: function setFormMethod(e) { document.getElementById('form').setAttribute('method', e.target.value); } EDIT &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- your HTML here --&gt; &lt;script&gt; // my code here &lt;/script&gt; &lt;/body&gt;

http://stackoverflow.com/comment/40692038
comment on: http://stackoverflow.com/q/25985530
has text: What does ` $scope.user - null;` mean?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40751931
type: Comment
has text: @murday1983 have you see my new response ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25997887

http://stackoverflow.com/a/26027971
has comment: http://stackoverflow.com/comment/40787147
answers question: http://stackoverflow.com/q/26027787
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26027787
has comment: http://stackoverflow.com/comment/40810803
has body: I would probably try something like this: Thumbnails like: ...thumbnail... ...thumbnail... ...thumbnail... Images like: ...image... ...image... ...image... And then the JS: $(".thumbnail").click(function() { // Hides all images. $(".image").hide(); // Shows appropriate one. var imageId = $(this).data("imageId"); // Fetches the value of the data-imageId attribute. $(".image[data-imageId="+imageId+"]").show(); });
type: Answer
downvote count: 1
score: 2
has comment: http://stackoverflow.com/comment/40770846
upvote count: 3
has comment: http://stackoverflow.com/comment/40771079

http://stackoverflow.com/comment/40705032
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25992409
type: Comment
has text: @Saroj your `` element and ` ` should be next to each other (like in my example). Or try this: `var id = jQuery(this).closest('.row').find('.jqcontextmenu').attr('id');`

http://stackoverflow.com/comment/40698827
score: 0
type: AnswerComment
has text: +1, This solution will run faster than js scripts that are creating and appending html to the DOM.
type: Comment
comment on: http://stackoverflow.com/a/25989586

http://stackoverflow.com/comment/40619585
type: Comment
type: QuestionComment
has text: I just can't believe that 2 people up-voted this question!
score: 3
comment on: http://stackoverflow.com/q/25945321

http://stackoverflow.com/q/25877594
has answer: http://stackoverflow.com/a/25877699
downvote count: 0
has comment: http://stackoverflow.com/comment/40497282
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40497316
has answer: http://stackoverflow.com/a/25877733
tagged with: http://stackoverflow.com/tag/html
has title: How to select dynamically created elements with jQuery
answer count: 4
favorite count: 0
tagged with: input
upvote count: 1
has comment: http://stackoverflow.com/comment/40497220
type: AnsweredQuestion
has body: I'm updating some elements dynamically based on user-input. Specifically, I have a table of form fields which the user can fill in. When the page loads I can count how many are empty... $(whocares).click(callback); callback = function() { var empties = $('.something input[value=""]); var count = empties.length; //4 } but after the user fills in new ones, the count stays the same. When I inspect the DOM, I don't see the updated values either. The new form fields still say: value instead of value="whatever". All the jQuery is inside $(document).ready(); How do I get jQuery to see the new changes?
has answer: http://stackoverflow.com/a/25877792
has comment: http://stackoverflow.com/comment/40497293
score: 1
possible better answer: http://stackoverflow.com/a/25877733
has answer: http://stackoverflow.com/a/25877772
accepted answer: http://stackoverflow.com/a/25877772
has comment: http://stackoverflow.com/comment/40497242
tagged with: forms
type: Question

http://stackoverflow.com/comment/40667692
type: QuestionComment
comment on: http://stackoverflow.com/q/25972515
has text: Which is what I'm doing at the moment. Really, the above examples are what I have to work with. I'm sorry - but I didn't write the sources down :/
score: 0
type: Comment

http://stackoverflow.com/comment/56214581
type: AnswerComment
comment on: http://stackoverflow.com/a/31600032
type: Comment
score: 1
has text: the `$setUntouched();` was the missing link for me

http://stackoverflow.com/a/25939757
score: 0
has body: Hi David if you have to call this function then first you have to call like this:- $scope.data.function1() from .js controller file. And kindly cross check function first:- it should be define like this in your controller: $scope.data.function1 = function(){ };
has comment: http://stackoverflow.com/comment/40610061
type: Answer
answers question: http://stackoverflow.com/q/25939633
has comment: http://stackoverflow.com/comment/40609971

http://stackoverflow.com/comment/40623581
has text: This is exactly what I've described that I've already tried in the question.
comment on: http://stackoverflow.com/a/25947979
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26013856
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40743228
has body: I have an array of checkbox in a table in PHP file like this : echo "&lt;td $Blocked&gt;&lt;input type =\"checkbox\" name=\"Blocked[]\" value=\"checkblock\" /&gt;&lt;/td&gt;"; I am trying to get the value of number of checked checkboxes and save it to DB. $Blocked = 'unchecked'; if ((isset($_POST['edit_tc']))) { if (isset($_POST['Blocked'])) { if (is_array($_POST['Blocked'])) { foreach($_POST['Blocked'] as $value) { error_log($value); } } else { $value = $_POST['Blocked']; error_log($value); } $Blocked = 'checked'; } } "edit_tc" is the Submit button. How do I take the number of it when the user checks the checkbox &amp; clicks Submit button to save it to a table column?
has answer: http://stackoverflow.com/a/26014853
has answer: http://stackoverflow.com/a/26014202
accepted answer: http://stackoverflow.com/a/26014853
type: Question
has comment: http://stackoverflow.com/comment/40743788
has comment: http://stackoverflow.com/comment/40744303
has comment: http://stackoverflow.com/comment/40743853
has comment: http://stackoverflow.com/comment/40743388
tagged with: javascript
linked to: http://stackoverflow.com/q/18382979
has comment: http://stackoverflow.com/comment/40743902
score: 0
has comment: http://stackoverflow.com/comment/40742626
answer count: 3
possible better answer: http://stackoverflow.com/a/26014202
has comment: http://stackoverflow.com/comment/40743548
has comment: http://stackoverflow.com/comment/40743925
has answer: http://stackoverflow.com/a/26014978
has comment: http://stackoverflow.com/comment/40744420
tagged with: php
tagged with: checkbox
has comment: http://stackoverflow.com/comment/40744047
has comment: http://stackoverflow.com/comment/40743479
has title: Count checked checkbox(array) numbers & saving checked checkboxes

http://stackoverflow.com/comment/40685302
type: QuestionComment
comment on: http://stackoverflow.com/q/25981381
type: Comment
has text: I tried this and it did not change anything. Is it because one layer is a dynamic map layer and the other is a KML?
score: 0

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/25876088

http://stackoverflow.com/a/26007246
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/26007058
downvote count: 0
type: Answer
has body: Unfortunately JavaScript's Date does not provide arbitrary formatting with the toString() method (or any other method). To get your date in yyyy-mm-dd format, you could use the toISOString() and then the substr(start, length) method. For instance: var maxDate = new Date(1407267771429); var isoDate = maxDate.toISOString(); // 2014-08-05T19:42:51.429Z isoDate.substr(0, 10); // 2014-08-05 This should work in all major browsers including IE9+. To support support IE8 and older browsers, you could do something like this: function toISODate(milliseconds) { var date = new Date(milliseconds); var y = date.getFullYear() var m = date.getMonth() + 1; var d = date.getDate(); m = (m &lt; 10) ? '0' + m : m; d = (d &lt; 10) ? '0' + d : d; return [y, m, d].join('-'); } Alternatively you could look into something like Moment.js (http://momentjs.com/) or jquery-dateFormat (https://github.com/phstc/jquery-dateFormat).

http://stackoverflow.com/a/26016886
has body: Your div that contains text DEMO is not a direct children of div with id calendar_month. In your HTML children() will return the first div only. Use find() Try: $("#calendar_month").find('div').each(function () { if ($(this).text() == "DEMO") { $(this).text(""); } }); DEMO Or another way(not recommended but just posting for the logic) to this particular markup is to use $("#calendar_month").children().children().each(function () { if ($(this).text() == "DEMO") { $(this).text(""); } });
type: Answer
answers question: http://stackoverflow.com/q/26016771
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/40722241
score: 0
type: Comment
type: QuestionComment
has text: Caching and comparing values on load is a much easier solution then setting up a server.
comment on: http://stackoverflow.com/q/26001847

http://stackoverflow.com/q/25999567
accepted answer: http://stackoverflow.com/a/26000354
score: 0
answer count: 1
has title: Google Charts: How to get the percentage values of every slice in a pie chart?
has body: I want to get the value of the percentages for every slice, at the moment I am able to get the name of the selected label but I would like to get the percentage value for every label. I couldn't find a method to do that, is this possible? http://jsfiddle.net/oaobxych/4/ function selectHandler() { var selectedItem = chart.getSelection()[0]; if (selectedItem) { var version = data.getValue(selectedItem.row, 0); alert('The user selected ' + version); } }
tagged with: charts
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26000354
type: Question
tagged with: google-visualization
tagged with: javascript

http://stackoverflow.com/comment/40707636
score: 0
type: QuestionComment
type: Comment
has text: The main difference is that the ng-change will be not fired when the model changes programmatically, it reacts only on input value changes.
comment on: http://stackoverflow.com/q/25994653

http://stackoverflow.com/a/25951795
score: 0
has body: Try include jquery and then your javascript code, and do it to the end of your body tag... .... some html here ....
has comment: http://stackoverflow.com/comment/40630483
has comment: http://stackoverflow.com/comment/40629500
has comment: http://stackoverflow.com/comment/40630264
type: Answer
has comment: http://stackoverflow.com/comment/40630381
has comment: http://stackoverflow.com/comment/40629799
answers question: http://stackoverflow.com/q/25950964
has comment: http://stackoverflow.com/comment/40629371

http://stackoverflow.com/a/25982364
has body: Instead of unbinding and rebinding events, I usually use a variable as a flag. Something like this... var working = false; $('#next-question-click').on( "click", function(){ if (working) return false; //Dont do anything, basically. if ($('[name="radio-question"]').is(':checked')){ var answer = $(".question-content ul li input:checked + label").text(); question_number = question_number + 1; if(question_number&lt;100){ working = true; next_question(question_number); } } else { $("#error-text").html('Please select an answer.'); } return false; }) And, on the next_question function, after the next question is loaded and ready to be answered, you would add working = false;
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25979109

http://stackoverflow.com/a/25959736
has comment: http://stackoverflow.com/comment/40645500
answers question: http://stackoverflow.com/q/25959636
type: Answer
has body: Is your socket.handshake.address a numeric value? I think you wanted users to be an Object and make a hash-map out of it by adding as socket.handshake.address property your data ({username : username, color: "#"+((1&lt;&lt;24)*Math.random()|0).toString(16)}).
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25959636

http://stackoverflow.com/comment/40526878
has text: In your fiddle, clicking Box 2 won't check the sub checkboxes.
comment on: http://stackoverflow.com/a/25894233
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25960433
has title: Highcharts not working after jquery upgrade
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40659173
has answer: http://stackoverflow.com/a/25960514
has comment: http://stackoverflow.com/comment/40645314
has comment: http://stackoverflow.com/comment/40695683
score: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/25960514
answer count: 1
downvote count: 1
has body: we have some graphics using highcharts 2.5.1 back in 2011 bundled with Jquery 1.4.2 and everything works OK but we save some other javascript plugins and they we need to upgrade them as well latest releases have some bug fixed and we want to take advantage of them and they also need Jquery upgrade as well but when i upgrade to latest jquery version jquery-1.11.1.min then highcharts seems not longer works?? what can i do to make it works as using JQuery 1.4.2 sample code Highcharts Example generates the right output if i change the JQuery version like this generates something like. i see something like also tested con JQuery 1.10
tagged with: highcharts
has comment: http://stackoverflow.com/comment/40647155
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: upgrade
has comment: http://stackoverflow.com/comment/40669710

http://stackoverflow.com/a/42771688
type: Answer
has body: Error: ng:areq Bad Argument has gotten me a couple times because I close the square bracket too soon. In the BAD example below it is closed incorrectly after '$state' when it should actually go before the final parenthese. BAD: sampleApp.controller('sampleApp', ['$scope', '$state'], function($scope, $state){ }); GOOD: sampleApp.controller('sampleApp', ['$scope', '$state', function($scope, $state){ }]);
answers question: http://stackoverflow.com/q/25895235
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/25979340
score: -1
has body: you can use the following function JS CODE //read more or less function showMoreOrLess(thisObj,bonusContent){ var caption = thisObj.innerHTML; //alert(caption); if ( caption == "Read more" ) { document.getElementById(bonusContent).style.display = "inline"; thisObj.innerHTML = "Read less"; } else { document.getElementById(bonusContent).style.display = "none"; thisObj.innerHTML = "Read more"; } } HTML CODE main text here... Read more whatever text you need to put here...
downvote count: 1
answers question: http://stackoverflow.com/q/25979238
type: Answer
upvote count: 0

http://stackoverflow.com/comment/40524917
type: AnswerComment
type: Comment
score: 1
has text: It's called IndexedDB. And it is in the standard. Web SQL is deprecated and should not be used any more.
comment on: http://stackoverflow.com/a/25884939

http://stackoverflow.com/a/25928478
answers question: http://stackoverflow.com/q/25928224
score: 0
has body: This will not work. First understand the execution process of the page. On the .chtml page first Razor engine will parse whole page. Afterwards page load javascript will start its execution. Now in your scenario while Razor engine parsing the page, it will now find item at all and will raise the error. I think there is no need to use @(Html.Raw(item.Title)). insted use directly item.Title so your final statement will be following: tbody = tbody + '&lt;tr&gt;' + '&lt;td&gt;' + item.Title + '&lt;/td&gt;' + '&lt;td&gt;' + item.Type + '&lt;/td&gt;' + + '&lt;/tr&gt;';
type: Answer

http://stackoverflow.com/comment/40553480
score: 0
comment on: http://stackoverflow.com/q/25908638
type: QuestionComment
type: Comment
has text: an alternative way would be to re arrange your JSON data. Would that be possible

http://stackoverflow.com/comment/40765071
comment on: http://stackoverflow.com/a/25988732
score: 0
type: Comment
has text: FYI, it's called **event delegation**, not "lazy event handling".
type: AnswerComment

http://stackoverflow.com/a/42864726
has body: Here's my snippet that I used when checking empty strings. _.isBlank = function (str) { return (!str || /^\s*$/.test(str)); } var strs = ['a', 1, -1, 0, NaN, '', ' ', '\t', '\n', null, undefined]; strs.forEach(function(s){ console.log('is blank? ', s, _.isBlank(s)); }); Note: The zero(0) will be considered as empty.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25900248

http://stackoverflow.com/comment/40520598
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25890862
has text: i made chrome extension and i try to find all tables in the page that contains this things for manipulate it after
score: 0

http://stackoverflow.com/q/25928224
has comment: http://stackoverflow.com/comment/40589093
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40589194
tagged with: javascript
has comment: http://stackoverflow.com/comment/40590528
tagged with: razor
has answer: http://stackoverflow.com/a/25928596
has title: How do I use a JavaScript string in Razor?
type: UnansweredQuestion
has body: I want to use Html.Raw() for danish characters. The JavaScript item can't be used in the Razor's Html.Raw(), or what? Error: "Cannot resolve symbol 'item'. How do I solve this? var tbody = ""; for (var i = 0; i &lt; result.length; i++) { var item = result[i]; // Titel, Type tbody = tbody + '&lt;tr&gt;' + '&lt;td&gt;' + '@(Html.Raw(item.Title))' + '&lt;/td&gt;' + // &lt;-- Cannot resolve symbol 'item' '&lt;td&gt;' + item.Type + '&lt;/td&gt;' + + '&lt;/tr&gt;'; } $('#AttachmentTable tbody').append(tbody);
has answer: http://stackoverflow.com/a/25928478

http://stackoverflow.com/a/25892159
answers question: http://stackoverflow.com/q/25891959
type: Answer
has body: [ '{"srCode":"","accountCode":"SHO005","priceList":"CART","discount":0,"termDays":0}' ] is not what you should work on. Try : [ {"srCode":"","accountCode":"SHO005","priceList":"CART","discount":0,"termDays":0} ] This way, it is a JSON object, not a string.
has comment: http://stackoverflow.com/comment/40522764
score: 0

http://stackoverflow.com/comment/40768251
type: QuestionComment
has text: use console.log(list) inside prefetch.filter to be sure theres something
comment on: http://stackoverflow.com/q/26027474
score: 0
type: Comment

http://stackoverflow.com/q/25987052
accepted answer: http://stackoverflow.com/a/25987120
favorite count: 0
type: AnsweredQuestion
has title: How to call table from another HTML page
has answer: http://stackoverflow.com/a/25987120
type: Question
upvote count: 4
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40775881
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25987214
score: 4
has answer: http://stackoverflow.com/a/25987214
has body: I am working in zoho. There are 2 pages I have created namely test and test2. I need to access table which is present in the test2 page from test page. I guess, I need to call that table by some name. Is there any mechanism by which I can access that test2 table from test page.
has comment: http://stackoverflow.com/comment/40705702
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40498258
has text: Thanks - I'm having trouble trying to define and substitute a variable for the match string. Seems like it needs a new RegExp constructor to put a variable together with '/g' -- like `var theRegex = "1600x50";` then `.match(new RegExp(theRegex, "\/g"));` ? however this is not working
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25877291
type: Comment

http://stackoverflow.com/q/26018497
tagged with: node.js
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/26020654
type: Question
has body: To be as concise as possible, I'm trying to figure out if there is a way to allow the console to display the full contents of an object using console.log(). I am using node.js piped into the console within Sublime Text 3. I'm having no problems running the code itself, just displaying the output. I have a linked list object that I created like so: { value: 1, next: { value: 2, next: { value: 3, next: { value: 4, next: { value: 5, next: null}}}}} When it outputs to the console it appears similar to the following: { value: 1, next: { value: 2, next: { value: 3, next: [Object]}} In short, the entirety of the object is not visible or expandable in any way. Is there any way I can force the console to be more verbose and display the entire object?
has title: Output is truncated in node.js output in Sublime Text
downvote count: 0
tagged with: javascript
tagged with: console
has answer: http://stackoverflow.com/a/26020654
answer count: 1
tagged with: sublimetext3
favorite count: 0
upvote count: 2

http://stackoverflow.com/q/25944705
has answer: http://stackoverflow.com/a/25944771
upvote count: 2
has comment: http://stackoverflow.com/comment/40618749
has title: Problems with XMLHttpRequest and PHP
type: Question
has answer: http://stackoverflow.com/a/25946721
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25944767
has answer: http://stackoverflow.com/a/25944767
accepted answer: http://stackoverflow.com/a/25944771
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I'm fairly new to both JavaScript and PHP, so I hope this problem isn't as complex as it seems to me. I'm trying to send data from a form to a PHP file using XMLHttpRequest, and then display the output of the PHP as an alert. Here's the HTML and JavaScript: &lt;form onSubmit="password_Check()"&gt; &lt;input type="password" size="40" name="password" id="pass"&gt; &lt;input type="submit" value="Go"&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; function password_Check() { var url = "test.php"; var pass = $("#pass").val(); var xhr = new XMLHttpRequest(); xhr.open("GET", url+"?pass="+pass, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 &amp;&amp; xhr.status == 200) { alert(xhr.responseText); } } } &lt;/script&gt; And here's the PHP: &lt;?php $pass = $_GET["pass"]; echo "The password is $pass! We've done it!"; ?&gt; I've tried all sorts of ways to do this, like $.post, $.get, $.ajax, and an xhr using POST. But I can't seem to get this to work. Now it just appends "?password=(whatever I put)" onto the end of the current url, which does nothing, but it shows it's doing something.
tagged with: php
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25912060
has title: different variable increment on different call
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25912122
tagged with: local-storage
has body: I am having a list that contains a button for each item in the list. For each button click, I want a variable should be incremented through the JavaScript function i.e. common function for all the buttons in the list. &lt;button onclick="GetIncrements(resource_id)"&gt; For this I have following javascript: function GetIncrement(id){ if(typeof(Storage) !== "undefined") { if (localStorage.clickcount) { localStorage.clickcount = Number(localStorage.clickcount)+1; } else { localStorage.clickcount = 1; } document.getElementById("result").innerHTML = "You have clicked the button " + localStorage.clickcount + " time(s)."; } Every time I click on the different buttons in the list, the same variable get updated. But I want to get different variable get incremented based on the resource_id. I want separate counter for each button in the same function. I can not make different functions for different click because list is dynamic. If there is a way that we can generate a dynamic variable in the function based on resource_id we are getting.
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25912122
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40715636
comment on: http://stackoverflow.com/a/25973355
has text: Thanks, I'm getting a bit used to JavaScript but it's only been a few weeks :P
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/36700651
has body: I had a similar situation in which I had two swipe-able containers on top of each other and only wanted the top one to handle the event. For some reason, event.srcEvent.stopPropagation just wasn't working. As it turns out, there exists a library that extends Hammer.js with event propagation called propagating-hammerjs. I pulled this into my project it fixed my problem.
type: Answer
has comment: http://stackoverflow.com/comment/91473437
score: 0
answers question: http://stackoverflow.com/q/26027362

http://stackoverflow.com/comment/40730872
type: AnswerComment
has text: The only thing that comes in my mind is some sort of this: http://stackoverflow.com/a/5078426/4066269
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26006207

http://stackoverflow.com/q/25996191
score: 1
has answer: http://stackoverflow.com/a/25996604
type: Question
tagged with: javascript
tagged with: jquery
has body: I'm using summernote as my web online editor. But some part of the editor(buttons with bootstrap dropdown class) didn't work. I finally found out that loading jquery.js and bootstrap.js twice times was the problem (The page includes header.php which already loads the two js files). So I'm confused about the error. What would happen if a js file is loaded multiple times while some other js files depend on it? And why should jquery.js, jquery-ui.js and bootstrap.js be loaded in order when they are downloaded in parallel?
has title: Why loading bootstrap.js twice times results to an error?
upvote count: 1
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/25996604
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/25945598
has body: I have a WP blog and I'm trying to do something like 2 main online journals do in my country. They have a JS/JQuery code that makes the following: when a user tries to copy some quote of any news, the content that is pasted is replaced by a text like "To share this content, use the link ...". I sincerely don't know much about programming, but I found out the codes of both the sites, as follows: function disableCopy(){ var s, r; var copyright = 'O material jornalÃ­stico produzido pelo EstadÃ£o Ã© protegido por lei. Para compartilhar este conteÃºdo, utilize o link:&lt;a href="'+window.location.href+'"&gt;'+window.location.href+'&lt;/a&gt;'; var status = buscaCookie(); if(!status){ $('.news').bind('copy', function () { //cria um span temporario se nÃ£o existir if(!$("#tempbox").length) $('&lt;span&gt;').attr('id','tempbox').appendTo('body').css('font-size','0'); var tempbox = document.getElementById ("tempbox"); $('#tempbox').html(copyright); if (typeof window.getSelection !== 'undefined') { s = window.getSelection(); s.removeAllRanges(); s.selectAllChildren(tempbox); r = s.getRangeAt(0); }else{ s = document.selection.createRange(); document.selection.empty(); s.moveToElementText( tempbox) ; r = s.pasteHTML(copyright); s.select(); } }); } } and $.fn.disable_copy = ( function ( $, window ) { var enabled = true , config = { message: 'Para compartilhar esse conteúdo, por favor utilize o link {{link}} ou as ferramentas oferecidas na página. Textos, fotos, artes e vídeos da Folha estão protegidos pela legislação brasileira sobre direito autoral. Não reproduza o conteúdo do jornal em qualquer meio de comunicação, eletrônico ou impresso, sem autorização da Folhapress (pesquisa@folhapress.com.br). As regras têm como objetivo proteger o investimento que a Folha faz na qualidade de seu jornalismo. Se precisa copiar trecho de texto da Folha para uso privado, por favor logue-se como assinante ou cadastrado.' , copybox: '.short-cut' } , base = { $el: null , opts: {} , // impede cóp…
has comment: http://stackoverflow.com/comment/43038456
has title: Replace text selected (on clipboard) with JavaScript
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40620227
upvote count: 1
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/2026335
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25955946
type: UnansweredQuestion
type: Question
tagged with: knockout.js
score: 0
has body: Been learning knockout and having fun, but I'm stuck on something that I assume is so simple: accessing the properties of an observable object inside an observable array. I need to get the "multiplierValue" from the activeCompMultiplier object inside the activeCompMultipliers array. Here's all my relevant code: First off, the object that is created and pushed into the array. This is what I'm trying to talk to: var activeCompMultiplier = function (multiplierValue) { this.multiplierValue = ko.observable(multiplierValue); } And this is the observable array that contains the observable objects: self.activeCompMultipliers = ko.observableArray(); Here's the line that creates a new object and pushes it into the array: self.activeCompMultipliers.push(new activeCompMultiplier(1)); And finally, when the input field triggers a 'change' event, this is what is called. I'm using an alert() to debug the issue: self.inputChanged = function (rowIndex) { alert("Multiplier is: " + self.activeCompMultipliers()[rowIndex].multiplierValue() + "\n At index: " + rowIndex); } Annnnd here my related HTML: I assume its a syntactical issue as JS isn't my strongest language, but I've triple-checked using parenthesis to un-wrap KO observables, so maybe it's a scope issue? All of my JS is within a function ViewModel() {...} function, that is then bound via ko.applyBindings(new ViewModel()); As a long-time lurker, I appreciate any help. :)
answer count: 1
tagged with: javascript
has title: Accessing property of observable object inside observable array - knockout.js
has answer: http://stackoverflow.com/a/25956949
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40552991
score: 0
comment on: http://stackoverflow.com/a/25907506
type: Comment
has text: How i did not understand could u tell me
type: AnswerComment

http://stackoverflow.com/a/25985391
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: You don't want to sum the action ids, you want to count them. So you want something like the following var map = function () { emit(this.profile_id, { action_ids : [this.action_id], count : 1 }); } var reduce = function(profile_id, values) { var value = { action_ids: [], count: 0 }; for (var i = 0; i &lt; values.length; i++) { value.count += values[i].count; value.action_ids.push.apply(value.action_ids, values[i].action_ids); } return value; } db.fbooklikes.mapReduce(map, reduce, { out:"example" }); This will give you an array of action ids and a count for each profile id. The count could be obtained by accessing the length of the action_ids array, but I thought I would keep it separate to make the example clearer.
answers question: http://stackoverflow.com/q/25985315

http://stackoverflow.com/q/25896769
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25896881
has title: Search and replace for a specific pattern
type: AnsweredQuestion
has body: I have the following requirement: I have a url as var url = '/test/mybin/processes/{testName}/test?id={testId}'; The url can contain any number of {} in it. Lets say above it has {} at 2 places {testName} and {testId}. It can have any number of such params. I need to replace the value of each such params with the real value. I need to first know the name of attribute inside each {} and replace them with actual values before loading the url. Lets say in above example, I have to first extract the names of each attribute inside {} and replace them with actual values. In my method: testName="Test" and testId=1 so, I want the url value to be '/test/mybin/processes/Test/test?id=1'. Could you please let me the best way to achieve this? Thanks, Tani
possible better answer: http://stackoverflow.com/a/25897066
has answer: http://stackoverflow.com/a/25896881
has comment: http://stackoverflow.com/comment/40531665
has answer: http://stackoverflow.com/a/25897066
type: Question
has comment: http://stackoverflow.com/comment/40531539
tagged with: javascript

http://stackoverflow.com/q/25941302
has answer: http://stackoverflow.com/a/25941566
accepted answer: http://stackoverflow.com/a/25941566
has body: I'm building a from validator file and I have a problem with comparing the extensions from some reason , what I'm trying to do is define in the HTML by data attribute call data-extntions the extansions that allowed to use in the current file input, this is the code I'm running: case "file" : var allowed_files_extansions = $(this).data("extensions") var is_valid = Validator.is_file(current_value , allowed_files_extansions); if(!is_valid){ Validator.errors_handler(Validator.invalid_text , field_human_name , $(this)); is_submit = false; return false; }else{ is_submit = true; } break; is_file : function(file_value , allowed_files_extansions){ file_extension = file_value.split('.').pop(); allowed_files_extansions = allowed_files_extansions.split(','); for(i=0;i&lt;allowed_files_extansions.length;i++){ if(file_extension == allowed_files_extansions[i]){ return true; } } return false; } The HTML code: &lt;input class="form-control deal" data-extensions=" jpg , png , gif , JPG " id="image_file" data-title="file" data-validate="file" type="file" name="userfile" /&gt; when I upload a file and console.log the var file_extension and the var allowed_files_extansions[i] I get the exact same string and the type of both of them is string too and it's still doesn't get inside the if statement. Can someone help me with that please? Thanks a lot :)
has title: jquery/javascript file validation 2 strings compration (file extansions) fail
type: AnsweredQuestion
type: Question
tagged with: validation
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40499167
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25878466
has text: I read your question just fine. As said, there are no non-3rd-party options if you can't install anything locally. Clientside code cannot break the iframe sandbox (thank god). I cannot answer your question, so I don't post an answer. I'm pointing you to the only viable solution via a comment.

http://stackoverflow.com/q/25921858
has comment: http://stackoverflow.com/comment/40579163
answer count: 0
tagged with: formatting
tagged with: socket.io
type: Question
has comment: http://stackoverflow.com/comment/40578019
tagged with: javascript
score: 0
has body: I am trying to understand the code in socket.io.js For example, some snippet is here: !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&amp;&amp;define.amd?define(e):"undefined"!=typeof window?window.io=e():"undefined"!=typeof global?global.io=e():"undefined"!=typeof self&amp;&amp;(self.io=e())}(function(){var define,module,exports; return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&amp;&amp;require;if(!u&amp;&amp;a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&amp;&amp;require;for(var o=0;o&lt;r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ module.exports = require('./lib/'); },{"./lib/":2}],2:[function(require,module,exports){ It is not formatted. I cannot figure it out. What way can help it?
has title: Socket.io: How to format the code in socket.io.js
has comment: http://stackoverflow.com/comment/40578657
has comment: http://stackoverflow.com/comment/40578809
type: UnansweredQuestion

http://stackoverflow.com/q/26029014
has answer: http://stackoverflow.com/a/26029062
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/26029064
has body: So I went through a bunch of different questions here on stackoverflow but couldn't find the exact answer. I also went through the jQuery API and couldn't figure it out there either. So here's my problem . Some text and stuff Then I have 3 more of the same situation but each p tag has different text. What I'm trying to do is replace the img tag with the p tag on hover for all 4 list items, and on hover each img is replaced with its corresponding p tag. Right now I have this as my jQuery, keep in mind I am pretty new to jQuery so I may have it all wrong. So I never got to the roll off, I just wanted to figure out how to make the hover event work first, then I would get to the roll off. Hopefully that wasn't a giant jumbled mess. Thanks
has comment: http://stackoverflow.com/comment/40770904
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40770902
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40770962
upvote count: 1
has comment: http://stackoverflow.com/comment/40771105
has comment: http://stackoverflow.com/comment/40770975
type: Question
has title: Replacing with in jQuery
has answer: http://stackoverflow.com/a/26029064
tagged with: javascript
has comment: http://stackoverflow.com/comment/40771036
answer count: 2
possible better answer: http://stackoverflow.com/a/26029062

http://stackoverflow.com/q/26006016
upvote count: 1
has answer: http://stackoverflow.com/a/26006090
score: 1
has body: I am writing a program that as an alternate form of authentication uses keystroke rhythm (non-biometric). It records the keystroke time when the user pushes a keydown, and when he releases. However, while the key is held (due to the nature of the onkeydown function in Javascript), the function recording the time is called over and over again while holding the key. Is there a way to avoid this nuisance? Important Code Below, whole project (IDK if it would help): https://bitbucket.org/niklam/krauths-v.-1.0 KRAUTHS Account Creator Submit
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26006075
has title: Way to get around keyboard repetition?
downvote count: 0
has comment: http://stackoverflow.com/comment/40729153
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/48664940
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26020049
type: Comment
has text: I upvoted both the question and answer as it helped me - specifically the switch(true) - but I agree with @Joeppie with the refactor point. Initial reaction was spacing - and ran across force typing conditionals that rosetta code did liked the succinctness - posted an answer below : - ?

http://stackoverflow.com/q/25986222
tagged with: timer
tagged with: time
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25986358
has body: I'm trying to make a timer for this game, that will count down from 30 seconds every 1000 Milliseconds, but when I run the code, the Timer does change; it stays at 30. Here is the code I am using: var gameTimer = { time: 30, interval: undefined, start: function(time) { var self = this; this.interval = setInterval(tick, 1000); }, tick: function() { this.time = this.time - 1; }, stop: function(time){ clearInterval(this.interval); }, reset: function(){ this.time = 30; } }; Can someone please help me out?
has answer: http://stackoverflow.com/a/25986385
has title: Javascript Timer will not change state
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: variables

http://stackoverflow.com/comment/40683642
type: QuestionComment
has text: You don't need to, look at...uh...[Wirey's (?) answer](http://stackoverflow.com/a/25981162/82548), it's a selector, it does the same thing as a class.
comment on: http://stackoverflow.com/q/25981128
score: 0
type: Comment

http://stackoverflow.com/comment/40722021
comment on: http://stackoverflow.com/q/26000403
score: 0
type: Comment
type: QuestionComment
has text: The whole config http://pastebin.com/AEVc3epf but it's very bare bones

http://stackoverflow.com/comment/40693172
has text: Brilliant, thank you! I'll test it out ASAP, but it's good to know I was mostly on the right track.
comment on: http://stackoverflow.com/a/25985839
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40532487
score: 0
type: AnswerComment
has text: Then you can define another class to `display` as `block` or what you want or add it in style attribute. Have you tried it? What exactly you want to keep in style attribute after show hiding?
type: Comment
comment on: http://stackoverflow.com/a/25896922

http://stackoverflow.com/q/25882009
tagged with: parameters
type: AnsweredQuestion
tagged with: date
type: Question
has body: I am having problems figuring out how to do a date compare in Javascript, and how to pass and receive varialbes to and from Javascript Function and Html. I have 4 term dates (workshop start and end dates for each term). I will send one set of dates at a time to the javascript function, and then I want the Javascript to check if today's date falls within the range of that workshop. Then the javascript should return a value like "workshop finished", "workshop in progress", "workshop to come" (depending on wheiter todays date is before, during, or after that specific date range). I'll call the function 4 different times - each with a different range of dates. So for example, If the first set of dates are: 6th February till 13th March 2014, then how would I call the javascript function? This is what I have so far: In the html - at the point where I want the status to be displayed, I tried this: &lt;script language="JavaScript" type="text/javascript"&gt; &lt;!--// document.write(displayStatus(02062014, 03132014)); //--&gt; &lt;/script&gt; &lt;noscript&gt;&lt;/noscript&gt; I know that the above date formating is probably wrong that I am trying to send to the function, but I am not sure what format is needed to do a date compare. (Note: the empty noscript tags are because if scripting is turned off, I don't want anything displayed.) I've started the function like this (found inside status-date.js file): function displayStatus(fromDate,toDate) { todayDate = new Date(); // this is a comment for code that needs to be written: // // magic happens here that compares today's date to the fromDate and toDate // and returns th appropriate status line // // the rest below is how I think the status is returned to the html // (I'm using 'in progress' as a test example) var dateStatus = "in progress" return dateStatus; } Note: the function is loaded in from the head section as follows: &lt;script src="assets/js/status-date.js" language="javascript" type="text/javascript"&gt;&lt;/script…
has answer: http://stackoverflow.com/a/25882291
score: 2
downvote count: 0
tagged with: javascript
has title: HTML passing parameters to javascript function that then does a date compare and then javascript returning a result to be displayed in html
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/492994
accepted answer: http://stackoverflow.com/a/25882291
upvote count: 2

http://stackoverflow.com/comment/40801915
score: 0
has text: This did resolve the second error! However, I am still getting the first error: Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.
type: Comment
comment on: http://stackoverflow.com/a/26045255
type: AnswerComment

http://stackoverflow.com/a/25880081
answers question: http://stackoverflow.com/q/25879928
type: Answer
has body: Well, more details would be needed to understand fully answer your question, but your sudo code is basically there. //get data var getData = $.ajax("your/endpoint", {your: params}); var NEW_MSG_COLOR = "#CCCCCC"; var DEFAULT_MSG_COLOR = "#FFFFFF"; getData.then(function (res) { //lets assume that the result of getting the data //is an array of message objects $.each(res, function (msgIdx, msg) { var $div = $("&lt;div /&gt;").text(msg.text); $div.css("backgroundColor", msg.status === 1 ? NEW_MSG_COLOR : DEFAULT_MSG_COLOR); $div.click(function () { $div.css(backgroundColor: DEFAULT_MSG_COLOR); }); //do something with $div here, stick it in the page, etc... }); }); That should get you most of the way there. The $.ajax assumes that you'll be doing an ajax call to get data somehow, but that's up to you (database, flat files, whatever...)
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40501833
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25879928

http://stackoverflow.com/q/26021130
upvote count: 1
has comment: http://stackoverflow.com/comment/40766017
has comment: http://stackoverflow.com/comment/40791198
tagged with: csom
type: Question
tagged with: sharepoint-2013
tagged with: javascript
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40781410
has comment: http://stackoverflow.com/comment/40786787
score: 1
has body: How can I remove the "title" field in the process of installing a new list with JSOM? I'm on Sharepoint 2013 online. My code: var field1 = newList.get_fields().addFieldAsXml( "&lt;Field Type='UserMulti' DisplayName='Name' Description='c' Required='FALSE' ShowField='NameWithPictureAndDetails' Name='Name' Mult='FALSE' UserSelectionMode='PeopleAndGroups' /&gt;", true, SP.AddFieldOptions.addFieldInternalNameHint); currentContext.load(field1); currentContext.executeQueryAsync(onListCreationSuccess, onListCreationFail); } function onListCreationSuccess() { var list = hostweb.get_lists().getByTitle("AnstalldDatum"); var fieldToEdit = list.get_fields().getByTitle("Title"); fieldToEdit.setShowInDisplayForm(false); fieldToEdit.setShowInNewForm(false); fieldToEdit.setShowInEditForm(false); fieldToEdit.set_hidden(true); fieldToEdit.update(); currentContext.executeQueryAsync(function () { console.log("Sucess: Fields installed! "); $(".status").append('List Installed'); }); }
has comment: http://stackoverflow.com/comment/40791173
favorite count: 0
has comment: http://stackoverflow.com/comment/40789901
has answer: http://stackoverflow.com/a/26040800
has title: Hide Column in Newform.aspx SharePoint 2013
type: UnansweredQuestion

momentjs
tags question: http://stackoverflow.com/q/25892298
tags question: http://stackoverflow.com/q/26029870
tags question: http://stackoverflow.com/q/25905183
tags question: http://stackoverflow.com/q/25970936
tags question: http://stackoverflow.com/q/25973280
tags question: http://stackoverflow.com/q/25935410
tags question: http://stackoverflow.com/q/25914723
tag name: momentjs
tags question: http://stackoverflow.com/q/25953551
tags question: http://stackoverflow.com/q/25995014
tags question: http://stackoverflow.com/q/25983736
type: Tag
tags question: http://stackoverflow.com/q/25888182
tags question: http://stackoverflow.com/q/25924277

http://stackoverflow.com/q/25952200
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25952288
has title: Change class of div based on radio button inside it?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25952975
type: AnsweredQuestion
has body: I have the view below. What I want is to change the class of the div based on whether or not the radio button inside it is checked. What am I doing wrong? Note: I'm a newbie to AngularJS and this project is me trying to learn Angular.. {{show.name}}
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/25952975
has answer: http://stackoverflow.com/a/25952288

http://stackoverflow.com/q/25959671
downvote count: 0
answer count: 1
has title: How to detect change in form if added a new row in prime faces datatable
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
has body: I have requirements to disable save and cancel buttons in my page on page load. I should enable save and cancel buttons if user changes something in the page. To achieve this, I am using http://plugins.jquery.com/are-you-sure/ This plugin is working fine but there is need for customization in many scenarios, one like below I have a page like Item groups which consists of three panels. LeftPanel : List of item groups in the system CenterPanel : List of items assigned to a selected item group RightPanel : List of items to assign to an item group Now Assume I have a datatable &lt;p:dataTable var="itms" value="#{myBean.listOfItems}" rows="10" paginator="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,50,100"&gt; &lt;/p:dataTable&gt; To assign items to the item group I would select items in the right panel and click on assign button which would add to the listOfItems to show in the center panel listOfItems.addAll(selectedItems); I am calling rescan method defined in the plugin on assign button oncomplete to detect the changes and track new records added because I want to consider addition or removal of fields also a change. Now on page load if an item group is selected and it has 13 items assigned then I could see the first page with 10 records. If any items added then they will be added in the list at back end list. Since I'm in first page and page is having complete rows plugin is unable to find any changes in form. How to find a change in this scenario.
tagged with: jsf
linked to: http://stackoverflow.com/q/16795319
type: Question
tagged with: primefaces
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26002763

http://stackoverflow.com/q/25960346
answer count: 2
upvote count: 1
has body: I am building a jQuery Mobile site with multiple HTML files and use some externe javascript files. This all work fine, the scripts ran on the pages after loading etc. But when I'm calling the second page directly, there is no jquery and jquery-mobile javascript file included (because I only include it in the index.html). What is the best solution to include the javascript files, that it runs on both ways (directly and over the links in index.html) and with the least duplicaton. The actual setup looks like this: index.html: .............. Training News Open left panel Settings ... Project specific import ... trainings.html: Slidebars Basic Template Trainings Open left panel Settings If I call ./trainings.html directly, the error 'Uncaught ReferenceError: $ is not defined ' appears, that is understandable for me, but how can I get it working.
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25960370
has title: jQuery mobile javascript on multiple HTML files
downvote count: 0
score: 1
type: Question
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/25960390

http://stackoverflow.com/q/25899576
has comment: http://stackoverflow.com/comment/40598305
has comment: http://stackoverflow.com/comment/41139885
downvote count: 0
has body: I'm having some trouble with forms in Yii2. I need to create a form which includes three dropdown menus which ask the user what time(s) in a week work best for him or her. The first menu would be days of the week, and the next two would be start and end times. But my project is more ambitious than that. I need to also allow the user to specify any time configuration, and so the form must be expanded and made dynamic, allowing the user to add more dropdown menus to the form to specify more times. I've tried a lot of solutions, but the trouble seems to lie in having user-created input fields. I believe there was a way to do this in Yii 1, but Yii 2 was apparently such a code overhaul that old workarounds are rarely useful. I've investigated many extensions, particularly Krajee's extensions, and though many of them are very pretty and user-friendly, they don't offer dynamic field creation. I've tried some hacks myself, but nothing has worked, and I'm wondering if there's a way at all to create a form with a dynamic number of input fields in Yii 2. If not, I'm tempted to just write some simple Javascript and Php outside of Yii to get the job done, but I'd like to stay within the framework.
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/42851849
tagged with: php
has comment: http://stackoverflow.com/comment/40547224
has comment: http://stackoverflow.com/comment/40546975
type: UnansweredQuestion
has title: Dynamically adding input fields in Yii2
has answer: http://stackoverflow.com/a/55372472
has comment: http://stackoverflow.com/comment/40610717
has comment: http://stackoverflow.com/comment/40566725
has comment: http://stackoverflow.com/comment/43719293
score: 8
has comment: http://stackoverflow.com/comment/40598267
tagged with: yii2
tagged with: javascript
has comment: http://stackoverflow.com/comment/51651913
type: Question
answer count: 2

http://stackoverflow.com/comment/40628586
comment on: http://stackoverflow.com/q/25947606
score: 0
type: Comment
type: QuestionComment
has text: Which Dom element? You want to access htmlString that you have added?

http://stackoverflow.com/comment/40501604
score: 0
type: QuestionComment
has text: @ivy_lynx nice link, thanks.
type: Comment
comment on: http://stackoverflow.com/q/25879628

http://stackoverflow.com/a/25951076
answers question: http://stackoverflow.com/q/25950953
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25950953
score: 3
has body: In Polymer >= 1.0 curly braces aren't necessary for event handlers anymore. Old answer In Polymer you need the moustache in each binding on-click='{{my_handler}}' You can find a complete example in this question bind a polymer template to html5 video.textTracks
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40629339
type: Answer

http://stackoverflow.com/a/26025024
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26024809
answers question: http://stackoverflow.com/q/26024809
type: Answer
has comment: http://stackoverflow.com/comment/40765106
has comment: http://stackoverflow.com/comment/40766113
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40766065
has body: How about something like this. Init, track, and reset the polling within the ajax promises. var pollingTimer = null, // stores reference to the current timer id firstTimeoutResponse = null; // stores the start of what might be a series of timeout responses function poll(){ $.ajax({ // your options here... }).done(function() { // reset the "timeout" timer firstTimeoutResponse = null; }).fail(function(jqXHR, textStatus) { // if the failure wasn't a timeout, short-circuit, // but only after resetting the timeout timestamp if (textStatus !== 'timeout') { firstTimeoutResponse = null; return; } // if it was a timeout failure, and the first one (!), init the timeout count if (firstTimeoutResponse = null) { firstTimeoutResponse = (new Date).getTime(); } }).always(function() { // if 2 min have passed and we haven't gotten a good response, stop polling/chort-circuit if ((new Date).getTime() - firstTimeoutResponse &gt; 120000) { // 120000ms = 2min window.clearTimeout(pollingTimer); return; } // queue the next ajax call pollingTimer = window.setTimeout(poll, 3000); // poll every 3s }); } // kick things off! poll();
type: AcceptedAnswer

http://stackoverflow.com/q/25884616
has title: How to retrieve the value of multiple inputs with the same name?
has comment: http://stackoverflow.com/comment/40509415
has answer: http://stackoverflow.com/a/25884693
score: 0
answer count: 3
tagged with: javascript
tagged with: jquery
tagged with: php
has answer: http://stackoverflow.com/a/25884864
accepted answer: http://stackoverflow.com/a/25884693
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25884773
has body: I am displaying some information from an XML file, beside each I have buttons with allow user to delete the data. Now I am using a hidden input field to store some information needed to process the form. All of the hidden input fields have the sane name value. When the user clicks the delete button I want to retrieve the value of the hidden filed that was clicked, but It returns the last one. here is my code: function displayPapers(){ var courseCode = $("#subject").val(); loadXML(courseCode, function(xmlDoc){ $(xmlDoc).find('paper').each(function(){ var code = $(this).find("code")[0].textContent; var title = $(this).find("title")[0].textContent; var semester = $(this).find("semester")[0].textContent; $("#papers").append("&lt;p&gt;" + code + ": " + title + " (S" + semester + ") " + "&lt;input type='submit' name='paperUpdate' value='Edit'&gt;" + "&lt;input type='submit' name='paperDelete' value='Delete'&gt;" + "&lt;input type='hidden' name='paperCode' value='" + code + "'&gt;&lt;/p&gt;"); }) }); } Here is the PHP code used to process the form: if(isset($_POST['paperUpdate'])){ echo $_POST['paperCode']; } I want to retrieve the value of the hidden field for which the delete button was clicked. I am not sure how to fix this. thanks.
has answer: http://stackoverflow.com/a/25884773
has comment: http://stackoverflow.com/comment/40509440
type: Question

http://stackoverflow.com/comment/40718050
comment on: http://stackoverflow.com/a/25982639
has text: Thanks Gordon, I'm upvoting since your approach provides an option. I don't necessarily think that this the the best solution, since it now deeply links the service with an Angular concept of $rootScope. The question was more about best practice than a particular solution.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40581265
type: QuestionComment
type: Comment
has text: @turkey3: It's a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), the slashes are the delimiters for the expression, the backslash escapes the dot(dot's have a special meaning in RegExp) the $ marks the end of the expression. It does exactly the same as the endsWith-suggestion, but is also supported by IE and older browsers(I guess it's supported by each browser that supports Javascript). Demo for your updated code: http://jsfiddle.net/doktormolle/r7mt29rd/2/
comment on: http://stackoverflow.com/q/25923319
score: 0

http://stackoverflow.com/a/60544298
answers question: http://stackoverflow.com/q/26018756
has body: As long as people still stuck in this issue and we are in 2020 already. I get a pure CSS solution by giving the drop down menu a flex display this snippet works great with datatable-scroll-wrap class .datatable-scroll-wrap .dropdown.dropup.open .dropdown-menu { display: flex; } .datatable-scroll-wrap .dropdown.dropup.open .dropdown-menu li a { display: flex; }
downvote count: 1
upvote count: 0
score: -1
type: Answer

http://stackoverflow.com/q/25917227
type: AnsweredQuestion
has body: I am making a worm game in canvas but I cant get my code to draw the out lines. I am using few for loops to make it to check every variable from that 2D array. This is what I have for now. W is walls which the code "should" draw as boxes around the edges of my canvas. A is air or blank where it should not make anything. I think ctx.fillRect is where it doesn't do anything so I would like to know how to fix it. var W = 9001; A = 9000; var level = [ [W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W], //21*13 Grid [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], // [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], // [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], // [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], // [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], // [W,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,W], [W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W] // Comments for easy counting ] function drawLevel(){ var canvas = document.createElement('canvas'); canvas.id = "WormGame"; canvas.width = 420; canvas.height =260; canvas.style.border = "1px solid"; var ctx = canvas.getContext('2d'); var body = document.getElementsByTagName("body")[0]; body.appendChild(canvas); ctx.fillRect(0,0,20,20); for(i=0;i&gt;20;i++){ for(j=0;j&gt;12;j++){ if(level[i][j] = 9001){ var x = 20*i; y = 20*j; ctx.fillRect(x,y,20,20); } } } }
type: Question
tagged with: for-loop
tagged with: canvas
possible better answer: http://stackoverflow.com/a/25917283
tagged with: javascript
has title: Javascript Worm Game canvas problems
has comment: http://stackoverflow.com/comment/40568814
score: 0
has answer: http://stackoverflow.com/a/25917468
answer count: 3
accepted answer: http://stackoverflow.com/a/25917468
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25917480
favorite count: 0
has answer: http://stackoverflow.com/a/25917283
has comment: http://stackoverflow.com/comment/40568953

http://stackoverflow.com/comment/40700007
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25990128
has text: that is what you must use. I am not getting your problem. It would be helpful if you create a code snippet or a fiddle.
score: 0

http://stackoverflow.com/q/26022310
has comment: http://stackoverflow.com/comment/40787412
has body: how can I access flask.g variable in javascript function. I am able to access this directly in HTML e.g {% if g.locale != 'en' %}
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26024926
tagged with: flask
has comment: http://stackoverflow.com/comment/40769571
has title: Accessing flask.g variable in javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26035092
score: -2
favorite count: 0
type: Question
possible better answer: http://stackoverflow.com/a/26035092
has comment: http://stackoverflow.com/comment/40758332
answer count: 2
accepted answer: http://stackoverflow.com/a/26024926
downvote count: 2

http://stackoverflow.com/a/26028619
has comment: http://stackoverflow.com/comment/40770520
type: Answer
has comment: http://stackoverflow.com/comment/40792524
score: 0
has comment: http://stackoverflow.com/comment/122356168
upvote count: 1
downvote count: 1
has body: So that you don't have to load them again if the user scrolls back up, in combination with why bother
has comment: http://stackoverflow.com/comment/122323328
answers question: http://stackoverflow.com/q/26027307
has comment: http://stackoverflow.com/comment/40779249

http://stackoverflow.com/a/25992553
answers question: http://stackoverflow.com/q/25992432
has body: In HTML there is no such elements as \t, \n, \r. Use &lt;br/&gt; for newline, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for \t (or better css margin-right). function addText(text) { $('span').append("&lt;br/&gt;First line goes here &lt;br/&gt; Second line goes here"); } function replaceText(text) { $('span').append( text.replace("\\n", '&lt;br/&gt;') ); } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div onClick="replaceText('&lt;br/&gt;First Line\\nSecond Line')"&gt;Click to add and replace&lt;/div&gt; &lt;div onClick="addText('&lt;br/&gt;First line goes here &lt;br/&gt; Second line goes here')"&gt;Click to see magic&lt;/div&gt; &lt;span&gt;&lt;/span&gt;
score: 0
has comment: http://stackoverflow.com/comment/40703915
type: Answer
has comment: http://stackoverflow.com/comment/40704083

http://stackoverflow.com/comment/40760812
score: 0
comment on: http://stackoverflow.com/a/26023571
type: Comment
has text: See the fiddle plz .The old implementation just didn't work.My version works...! @Ely help me!
type: AnswerComment

http://stackoverflow.com/a/25958252
has body: You could do it using the following jquery code: $(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); }); Here is the complete demo how you can hide and show the element by click event.
score: 3
has comment: http://stackoverflow.com/comment/40642167
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25958180
upvote count: 3

http://stackoverflow.com/comment/40677709
score: 0
type: QuestionComment
type: Comment
has text: Have you tried using the `onchange` attribute instead of `onclick`?
comment on: http://stackoverflow.com/q/25977870

http://stackoverflow.com/comment/40703863
type: QuestionComment
comment on: http://stackoverflow.com/q/25991752
score: 0
has text: Moreover I recommend you to set ` ` **inside of** ` `. In the case you will don't need any `id` or `for`. Try ` Yes &nbsp; No `. One can check the radio button by clicking on the label.
type: Comment

http://stackoverflow.com/comment/40652748
has text: I posted an answer. I hope it helps.
comment on: http://stackoverflow.com/q/25964258
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40745814
comment on: http://stackoverflow.com/q/26015645
has text: can u show us the google api chart ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26025136
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40803331
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40766350
answer count: 0
has body: I got 3 areas, which are one next to the other, and the ability to multi-select blocks inside any of these 3 areas, but the problem is that when i start dragging those 3 selected blocks that are inside of any of the areas, only the one that i got the cursor on is affected by the droppable hoverClass. Is there any way to get the area beneath every single multi-dragged block independently instead of the cursor one during drag event? Here's a fiddle. I would like to get the block area that is being hovered over during drag. The only thing i get is the Source, not the destination one. $(".block").draggable({ drag: function(event, ui) { console.log($(ui.helper).closest(".global-region").attr("id")); } });
type: Question
has comment: http://stackoverflow.com/comment/40766117
has comment: http://stackoverflow.com/comment/40766472
tagged with: jquery-ui
tagged with: javascript
has comment: http://stackoverflow.com/comment/40766647
has comment: http://stackoverflow.com/comment/40766412
score: 0
has title: How to make a group of selected elements selectable to respond independently the droppable hover depending on the area beneath?
tagged with: jquery

doh
tag name: doh
type: Tag
tags question: http://stackoverflow.com/q/26010514

http://stackoverflow.com/comment/40640147
type: AnswerComment
score: 0
has text: I'm getting an "unexpected token return" error, could you fiddle this?
type: Comment
comment on: http://stackoverflow.com/a/25957633

http://stackoverflow.com/comment/40678904
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25973994
type: AnswerComment
has text: better solution than mine, looks faster

http://stackoverflow.com/comment/40493898
comment on: http://stackoverflow.com/q/25875638
type: QuestionComment
has text: @epascarello: ah, of course, you're right :) However, I now stepped into the code but still, my script is freezing IE right after completing the `success` block. Any ideas?
score: 0
type: Comment

http://stackoverflow.com/q/25976262
has title: How to get the value of the currently selected radio button inside a div using jquery?
type: Question
has body: I have this mark up: And I am trying to get the selected value from the radio button group that is wrapped inside a main div. My idea is to get the check all the main div that contains the radio buttons and then get the value of the selected radio button but my codes doesn't seem to work. Here is my JQuery: $(".form-radios").each(function(){ var radio_val = $(this).closest('input[type="radio"]:checked').val(); console.log(radio_val); });
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25976289
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25976294

http://stackoverflow.com/q/25959976
favorite count: 0
has comment: http://stackoverflow.com/comment/40649056
answer count: 5
possible better answer: http://stackoverflow.com/a/25960005
score: 6
accepted answer: http://stackoverflow.com/a/25960020
has answer: http://stackoverflow.com/a/25960007
has comment: http://stackoverflow.com/comment/40644564
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25960020
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/40649734
has answer: http://stackoverflow.com/a/25960011
tagged with: javascript
has title: Did I violate some javascript rule?
downvote count: 2
has comment: http://stackoverflow.com/comment/40644394
has body: I have a very simple html and javascript. Test function Hello The result displays a Hello and good bye string. I moved the goodbye function to its own file "goodbye.js" So my first html now looks like this Test function Hello Now if I run the html again, it only displays Hello. I did not expect that. What happened ?
has answer: http://stackoverflow.com/a/25960005
has answer: http://stackoverflow.com/a/25960029

http://stackoverflow.com/a/26017527
answers question: http://stackoverflow.com/q/26016703
downvote count: 0
has body: You are mixing two different execution paradigms here: PHP is executed server-side. That means that the server, hosting your code executes it. As a consequence PHP code is usually not visible to clients. The execution of the php code is triggered by a clients request, and the output of the script (e.g. produced by the printf-function) is passed to the client. Javascript however, is executed client-side. This implies that the cpu of the website visitor is actually used to execute the code. The code is 100% visible to the client. So what you paste within an HTML documents script-tags is executed client side. It is seen by the client. Contrary, PHP code is not meant to be directly pasted within script tags. These are very generalized statements, that do always hold. However, they should give you a rough sketch. There is a quite nice answer in this thread that should help you for a better distinction. You should certainly learn these basics, before continuing.
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/40916203
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26000535
has text: How did you know about this `pointer-events` set to none! I spent so much energy and time just because of this! I'll use the optimized way later. This is for a prototyping so far.

http://stackoverflow.com/comment/40591384
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25929486
has text: `oninput` is only supported from IE9 onwards. You can use `onkeyup` instead on older browsers.

http://stackoverflow.com/a/26001727
has comment: http://stackoverflow.com/comment/40721094
has comment: http://stackoverflow.com/comment/40721295
type: Answer
score: 1
upvote count: 1
has body: There is no encoding happening because what you have there is already a valid, completely encoded URI. If you want to use that as a parameter in an other URI, you should use encodeURIComponent: document.location.href = 'display.jsp?img='+encodeURIComponent(uri);
answers question: http://stackoverflow.com/q/26001664
downvote count: 0

http://stackoverflow.com/q/25990729
tagged with: firefox-addon
tagged with: regex
has answer: http://stackoverflow.com/a/25990781
has title: How to replace multiple words in Firefox extension
has comment: http://stackoverflow.com/comment/40701009
type: AnsweredQuestion
has body: I'm searching to replace in a string many words with one another word. I'm trying to use replace method (here the description) but I can't use this with multiple words. Let me use an example: var test = new String("Hi how are you? lol"); var newTest = test.replace(/lol/, "ok", "gim"); console.log(newTest); This code works correctly and print "Hi how are you? ok". I wanna replace not only "lol" but also "Hi" and I'm trying to do this: var test = new String("Hi how are you? lol"); var newTest = test.replace(/lol||hi/, "ok", "gim"); console.log(newTest); But the second version doesn't work. The easy solution is to insert the replace function into a for and recall the function for each word, but I would to change all words in one time. Do you have any ideas? Thanks a lot.
tagged with: replace
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25990781
score: 0

http://stackoverflow.com/comment/40657407
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25966813
has text: I've been looking into the $compile function but cannot get it to work :( I'm currently using `$scope.content = $compile($scope.tip.data.Node.body);` then ` but nothing shows up in the template
type: AnswerComment

http://stackoverflow.com/comment/40585934
comment on: http://stackoverflow.com/q/25926412
has text: @Maddy It has to be "I", not "i" when someone tells about himself.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40644355
score: 0
type: AnswerComment
has text: @algorhythm: it'd be my preference too, but with a list of only two classes it's actually slightly *less* efficient to use `join()`, with regards to typing.
comment on: http://stackoverflow.com/a/25959952
type: Comment

http://stackoverflow.com/a/25916723
has comment: http://stackoverflow.com/comment/40568043
has comment: http://stackoverflow.com/comment/61193161
answers question: http://stackoverflow.com/q/25916403
type: Answer
has body: 1. Issue: Event handling Concerning the jQuery part, try to use event delegation. From the docs: The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. $(document).on('click', '.icon-logo', function(event) { document.write('Event type: ' + event.type); document.write(' CSS-Class: '); document.write($(this).attr('class')); }); // As said in the docs, you can attach multiple events to multiple selectors. // A typical example of use may be: // $(document).on('change blur', '.icon-logo .some-other-class', function() {...} Click me! Edit after @Kaiido's comment: 2. Issue: The element can't be clicked. One possibility could be to not use an at all but an tag instead as suggested in this SO answer: make an html svg object also a clickable link. 2. Issue: Empty HTML-tag This kind of tag needs some content to show up on the page. Your tag: is not having any inner HTML-Content, so you won't be able to click it.
has comment: http://stackoverflow.com/comment/40568195
upvote count: 12
has comment: http://stackoverflow.com/comment/40568099
score: 12
downvote count: 0

http://stackoverflow.com/comment/40766949
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26026568
has text: Thanks Zenorbi, the dirty way works well. Changing the structure just leaves them open, as soon as anything from the first select box is selected. My eventual aim is to reset box's to empty, if the divs are not shown. One step at a time eh? Thanks again. PS, Fiddle updates here http://jsfiddle.net/PeteInSpain/ytg7hey7/3/

http://stackoverflow.com/comment/40719573
comment on: http://stackoverflow.com/q/26000770
score: 0
has text: FYI - contenteditable="true" for required div will make it editable.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25985152
answer count: 2
has body: Let's say you have: function myPromise() { // using some promise lib other than $q, like Q or bluebird var defer = Q.defer(); defer.resolve('John'); return defer.promise; } and then you have something like: function foo() { return myPromise().then(function (name) { return name + ' Smith'; }); } foo().then(function (name) { $scope.$apply(function () { // or can use $timeout console.log('after foo'); $scope.text = 'Hey ' + name; }); }); Is there a way to modify foo so that the after foo block is automatically wrapped in $scope.$apply()? i.e. we can then just have: foo().then(function (name) { console.log('after foo'); $scope.text = 'Hey ' + name; // $scope.$apply() is automatically called after this block is executed }); The reason I ask is that I am developing an API where the user will make several of these foo calls and it would greatly cut down on the user's code if the digest cycle was automatically triggered after the foo promise resolves. I know I can use a callback to accomplish this, but I'm hoping there is a cleaner way that just uses promises. My hunch is that the solution lies in wrapping the non-$q promise in a $q promise...
linked to: http://stackoverflow.com/q/23984471
upvote count: 1
has title: Automatically apply $scope changes (trigger digest) after a non-$q promise resolves in angularjs
accepted answer: http://stackoverflow.com/a/26008138
favorite count: 0
tagged with: promise
tagged with: angularjs
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/40691517
has answer: http://stackoverflow.com/a/26008138
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25988146
downvote count: 0
linked to: http://stackoverflow.com/q/23363014
score: 1
has comment: http://stackoverflow.com/comment/40691238
has comment: http://stackoverflow.com/comment/40691764
possible better answer: http://stackoverflow.com/a/25988146
type: Question
tagged with: javascript

http://stackoverflow.com/q/25985341
tagged with: utc
has comment: http://stackoverflow.com/comment/40691597
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40691620
has comment: http://stackoverflow.com/comment/40691778
has body: regarding this link and info. : How do I get a UTC Timestamp in JavaScript? I could not post an update to the gentleman you gave me a hint at what could be done to enhance the answer: I send thanks to : https://stackoverflow.com/users/376535/shiplu-mokadd-im shiplu.mokadd.im 29.1k33797 You could also do it utilizing getTimezoneOffset and getTime, x = new Date() var UTCseconds = (x.getTime() + x.getTimezoneOffset()*60*1000)/1000; Thank you for the TIMEZONEOFFSET call. I made an enhancement. // 20140922 arf made another piece of server side classic asp work. // I prefer moving both sides of equation to seconds. x = new Date() var UTCseconds = ( (x.getTime()/1000) + (x.getTimezoneOffset()/60) ); return UTCseconds // sample from another post &lt;script language='Javascript' runat='server'&gt; function jsGetUTCTime() { //var d = new Date(); //return d.toUTCString(); x = new Date() var UTCseconds = ( (x.getTime()/1000) + (x.getTimezoneOffset()/60) ); return UTCseconds } &lt;/script&gt; &lt;script language='VBScript' runat='server'&gt; Function getUTCTime() ' Use JScript to get the current GMT time stamp getUTCTime = jsGetUTCTime() End Function &lt;/script&gt; &lt; % m_utc_time_stamp = getUTCTime() % &gt;
has title: UPDATED How do I get a UTC Timestamp in JavaScript?
has comment: http://stackoverflow.com/comment/40699909
tagged with: seconds
has comment: http://stackoverflow.com/comment/40691550
has answer: http://stackoverflow.com/a/25986074
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40691848
type: Question
has comment: http://stackoverflow.com/comment/40691591
favorite count: 0
score: -1
linked to: http://stackoverflow.com/q/9756120

http://stackoverflow.com/a/25944151
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25944040
has body: Your code isn't getting stuck, you're calling it incorrectly. fb.on('value', function(snapshot) { var db = snapshot.val(); var speed = db['speed']; }); Here you're providing a callback function with a local variable speed. This variable will probably be set correctly, but you're not doing anything with it. console.log(speed); rnd = Math.floor( Math.random() * 7 ); fb.set({ speed: rnd}); This code runs straight after you've set up the event handler (fb.on( 'value', ... )) but that code runs asynchronously. Not only will that function probably not have ran at this point, but here you are accessing an undeclared variable speed, and because it isn't declared it is an automatic global variable window.speed, and not the local variable speed in the callback function. Move the console.log inside of the callback function to execute it at the right time. Also, always declare your variables.
answers question: http://stackoverflow.com/q/25944040
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/comment/40723314
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26001881
has text: Ok I changed my jsfiddle & my answer to put the class on the `td` instead of the `select`. Is it ok now ?
type: AnswerComment

http://stackoverflow.com/q/25904982
type: Question
has title: What does this script tag syntax mean?
has body: I'm sorry for question, because I can't google it (I don't know name of this feature) and can't find it in documentation for script tag. I found it in linkedin API: &lt;script src="https://someurl.com"&gt; a : 10 b : 20 c : 30 &lt;/script&gt; What is this? It looks like passing parameters to script, but it was not mentioned in any question like "passing parameters to script"
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25905027
has comment: http://stackoverflow.com/comment/40546389
duplicate of: http://stackoverflow.com/q/6528325
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40546383
upvote count: 1
tagged with: syntax
tagged with: standards
score: 1
linked to: http://stackoverflow.com/q/6528325
has comment: http://stackoverflow.com/comment/40546484

http://stackoverflow.com/comment/40706158
type: Comment
comment on: http://stackoverflow.com/a/25993804
score: 0
type: AnswerComment
has text: Your answer was first.

http://stackoverflow.com/comment/40521513
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25884452
score: 0
has text: I guess afterClose: function () { location.reload(); } will do the same as beforeClose: function () { parent.location.reload() }. Both will work

http://stackoverflow.com/comment/40777511
comment on: http://stackoverflow.com/q/26032771
score: 1
has text: Also [What is the difference between jquery on with / without selector parameter and jquery delegate?](http://stackoverflow.com/questions/25662041/what-is-the-difference-between-jquery-on-with-without-selector-parameter-and-j)
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25917665
upvote count: 1
answers question: http://stackoverflow.com/q/25917103
type: Answer
has body: Too late, but here is a cleaner version. It toggles a class on the link itself for simplicity (also allows the links to change styling): JSFiddle: http://jsfiddle.net/TrueBlueAussie/0tb115ez/20/ $(function () { // The height of the content block when it's not expanded var adjustheight = 240; // The "more" link text var moreText = "Click to read more..."; // The "less" link text var lessText = "Click to read less..."; // Sets the .more-block div to the specified height and hides any content that overflows $(".more-less .more-block").css('height', adjustheight).css('overflow', 'hidden'); // The section added to the bottom of the "more-less" div $(".more-less").append('&lt;p&gt;&lt;a href="#" class="adjust"&gt;&lt;/a&gt;&lt;/p&gt;'); $("a.adjust").text(moreText); $(".adjust").on("click", function (e) { var $this = $(this); // Toggle a class and see if it "was" set (hence !) var more = !$this.toggleClass('moreactive').hasClass('moreactive'); var $parents = $this.parents("div:first"); var pcont = $parents.find("p.continued"); var $more = $parents.find(".more-block"); $more.css('height', more ? adjustheight : 'auto').css('overflow', more ? 'hidden' : 'visible'); pcont.css('display', more ? 'none' : 'block'); $this.text(more ? moreText : lessText); }); });
downvote count: 0
score: 1

http://stackoverflow.com/comment/40564844
has text: All the best @Stan :)
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25892538

http://stackoverflow.com/comment/40528503
type: AnswerComment
comment on: http://stackoverflow.com/a/25894910
type: Comment
has text: how can i target the files from that input? sorry but i'm a mega noob
score: 0

http://stackoverflow.com/comment/40612697
has text: @JonathanOrtega: That looks like you are doing string concatenation
comment on: http://stackoverflow.com/a/25939868
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40669836
comment on: http://stackoverflow.com/q/25973887
has text: The animation seems it takes place too late
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25991441
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25991606
has comment: http://stackoverflow.com/comment/40702277
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40702186
tagged with: php
has answer: http://stackoverflow.com/a/25991823
has title: Load JavaScript before Redirecting (CodeIgniter)
tagged with: codeigniter
has body: This is my code. I already tried, flush(); window_location.. but still it fails. What shall I do? I also tested if the value of $result is being passed and it's fine. The only problem is the JavaScript is not loading. I have other codes with this coding structure but works fine and shows the JavaScript before loading. function accsettings() { $this-&gt;load-&gt;model('admin_model'); $result = $this-&gt;admin_model-&gt;accsettings(); if ($result==0) { echo ' &lt;script type="text/javascript"&gt; alert("Congratulations! Your profile has been updated."); &lt;/script&gt; '; $res2 = $this-&gt;admin_model-&gt;accset_audit(); } else if ($result==1) { echo '&lt;script type="text/javascript"&gt; alert("Error! Current password is not correct."); &lt;/script&gt;'; } else { echo '&lt;script type="text/javascript"&gt; alert("New password does not match with the confirmation."); &lt;/script&gt;'; } redirect('/main/accsettings'); }

http://stackoverflow.com/comment/40655818
type: AnswerComment
comment on: http://stackoverflow.com/a/25965911
type: Comment
has text: Can't redirects be seen by the browser ?
score: 0

http://stackoverflow.com/comment/40495090
comment on: http://stackoverflow.com/a/25876576
type: Comment
type: AnswerComment
has text: This does work. However, do you know how I can get var term = (text from a particular item in a list)? The text to be shortened is in an unordered list.
score: 0

http://stackoverflow.com/q/26006062
type: Question
score: 3
linked to: http://stackoverflow.com/q/3026281
has body: I am trying to sort an array so that all the zeros are at the end. However, I don't want the list to be numerically sorted, all the numbers above zero should stay in the same order. Here's what I've got so far: function placeZerosAtEnd(arr) { return arr.sort(compareForSort); } function compareForSort(first, second) { return first == 0 ? 1 : 0; } placeZerosAtEnd([9,0,9,1,0,2,0,1,1,0,3,0,1,9,9,0,0,0,0,0]); This should return [9,9,1,2,1,1,3,1,9,9,0,0,0,0,0,0,0,0,0,0], but actually returns [3,9,9,1,9,2,9,1,1,1,0,0,0,0,0,0,0,0,0,0]. The zeros are correct, but the other numbers are in a strange order. What is going on here? http://jsfiddle.net/v67fx4zk/
tagged with: javascript
tagged with: sorting
tagged with: arrays
downvote count: 0
answer count: 7
has comment: http://stackoverflow.com/comment/40729299
has answer: http://stackoverflow.com/a/54147453
favorite count: 0
has answer: http://stackoverflow.com/a/26014874
has title: Using Javascript .sort() on an array to put all the zeros at the end
has answer: http://stackoverflow.com/a/26006167
possible better answer: http://stackoverflow.com/a/54147453
has answer: http://stackoverflow.com/a/26006196
has answer: http://stackoverflow.com/a/62839079
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/40744552
has comment: http://stackoverflow.com/comment/40729313
has answer: http://stackoverflow.com/a/48163003
accepted answer: http://stackoverflow.com/a/26014874
has answer: http://stackoverflow.com/a/69663647

http://stackoverflow.com/q/26019419
tagged with: angular-ui
has body: I am using angularJS 1.2.1 and angular-ui-bootstrap In my code i have list of &lt;ng-includes&gt; from angularjs and &lt;accordion&gt; from angular-ui But when i load the content i want to make server call and get some values i solved using this But now problem is with accordion, I am not able to get all scope variable the scope outside accordion i am able to get but whatever contents inside accordion its not getting I think this issue is with loading of accordion . Is there any way to check that accordion contents are loaded? any callback we can write to check accordion contents are loaded?
tagged with: angularjs
linked to: http://stackoverflow.com/q/18646756
type: UnansweredQuestion
has title: How do i check all my html contents are loaded in angularjs?
tagged with: angularjs-directive
type: Question
has comment: http://stackoverflow.com/comment/40753034
has comment: http://stackoverflow.com/comment/40753014
answer count: 1
linked to: http://stackoverflow.com/q/25779304
linked to: http://stackoverflow.com/q/15458609
tagged with: javascript
has answer: http://stackoverflow.com/a/26019497
tagged with: angular-ui-bootstrap
score: 0
has comment: http://stackoverflow.com/comment/40753115

http://stackoverflow.com/a/25975280
has comment: http://stackoverflow.com/comment/40673098
type: Answer
answers question: http://stackoverflow.com/q/25974793
has comment: http://stackoverflow.com/comment/40672386
upvote count: 1
has comment: http://stackoverflow.com/comment/40672970
score: 1
has comment: http://stackoverflow.com/comment/40672505
downvote count: 0
has body: You can use $.inArray() to get the index of clicked element from visible elements. (function($){ var indexBoxes = function(e) { $element = $(this); var index = ($.inArray((this),$(".getIndex").not(".hidden"))); $( "h3.txt" ).text( "That was div index #" + index ); } $(document).on( 'click', '.getIndex', indexBoxes); })(jQuery); Here's a link to fiddle!
has comment: http://stackoverflow.com/comment/40672692

http://stackoverflow.com/q/25972158
type: Question
answer count: 2
tagged with: jquery-animate
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25972355
has comment: http://stackoverflow.com/comment/40666966
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40667033
has body: I'm trying to get a simple side navigation bar which you can hide and unhide with a single button. So far I have it worknig but only every other click, so click to hide works, then does nothing, next click unhides, nothing etc. Yet I have to button set to an image to change on every click, and that is working. What I have so far is.... HTML: Calculator About Other Services Script: var state = false; $("#toggle-slide-button").click(function () { if (!state) { $('#navBar').animate({width: "toggle"}, 1000); $('#toggle-slide-button img').attr('src', 'http://i.imgur.com/K3MG7gT.png'); state = true; } else { $('#mnavBar').animate({width: "toggle"}, 1000); $('#toggle-slide-button img').attr('src', 'http://i.imgur.com/8BMxPsC.png'); state = false; } }); and if it matters, CSS: #navBar{ background-color: #660000; height: 780x; width: 80px; } .navBtn{ background-color: #660000; color: white; width: 80px; height: 70px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.2); opacity: 1; font-size: 12px; text-align: center; } .navBtnText { line-height: 120px; vertical-align: bottom; } .navBtn:hover{ background-color:#990000; } #navBar-control { width: 50px; height: 100%; padding: 0 15px; background-color: #000; } Fiddle of this: http://jsfiddle.net/GUjPA/91/ I have been basing this off this fiddle: http://jsfiddle.net/GUjPA/13/ This has the desired behavior only that it is on the right of the screen instead of the left. The script I'm using is exactly the same, and besides different colours and size of side bar, its essentially exactly the same.
possible better answer: http://stackoverflow.com/a/25972355
has answer: http://stackoverflow.com/a/25972349
accepted answer: http://stackoverflow.com/a/25972349
type: AnsweredQuestion
has title: jQuery slide animate div with toggle button works every other time instead of every time

http://stackoverflow.com/comment/40663408
comment on: http://stackoverflow.com/a/25970206
type: Comment
score: 2
has text: #2 and #3 won't work properly. 2 won't add the data to the element, #3 won't have loaded in time.
type: AnswerComment

http://stackoverflow.com/q/25951331
upvote count: 0
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/40628603
tagged with: toggle
type: Question
score: -2
has title: showing and hiding content with Javascript
has body: kindly see this theme. When click on "About Us, Contact Us, Newsletter" it shows another div content except present content and clicking close button it disappear. How to do this? Actually I want the code to do in this way..... http://abyadwaswad.com/Vipe/index-image.html
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25951506
has comment: http://stackoverflow.com/comment/40629362
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40675780
comment on: http://stackoverflow.com/q/25965977
score: 0
type: Comment
type: QuestionComment
has text: hah, completely missed that "A". Shows how much I use plain node >_>

http://stackoverflow.com/comment/40756027
has text: See: http://phrogz.net/tmp/serversidejsandvb.html on how to mix js and vbs maybe that's something you can use
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25997447

http://stackoverflow.com/a/25939382
type: Answer
has body: here's a solution using piping and the csv2 and through2 libraries for node which you can find here https://github.com/rvagg/csv2, and here https://github.com/rvagg/through2 i tested this with a simulated asynchronous function using setTimeout and it worked. however, because i don't have your data file i can't test it exactly. please let me know if there is a problem. NOTE i created an array of objects. each object has the image and its label. i think this is a better solution than trying to keep two arrays with those associations. in general if you need to have relationships with your data, an object will be better than two arrays :) var fs = require('fs'); var files = []; var file = fs.createReadStream('test.txt'); var csv2 = require('csv2'); var th2 = require('through2'); var cv = require('opencv'); file .pipe(csv2({'separator': ';'})).pipe(th2({objectMode: true},function(parsedLine, enc, callback){ var me = this; cv.readImage(parsedLine[0], function(e, img) { files.push({image: img, label: parsedLine[1]}); me.push(parsedLine); callback(); }); })) .on('data', function(data){/*do something with data if you want to*/}) .on('end', function(){console.log(files);});
accepted answer of: http://stackoverflow.com/q/25920006
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25920006
score: 0

http://stackoverflow.com/comment/40781638
score: 1
comment on: http://stackoverflow.com/a/26034098
type: AnswerComment
has text: Just found this one, which really gives some good insight as well as speed comparisons: http://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-clone-an-object
type: Comment

http://stackoverflow.com/comment/40580061
has text: @FabrícioMatté as you should, I upvoted yours as it's a more directly correct answer for the Firefox part. I consider both our answers to fully answer the 'underlying issue'.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25923037

http://stackoverflow.com/a/25936822
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25936798
answers question: http://stackoverflow.com/q/25936798
upvote count: 1
has body: try this: $("#"+t_id).val('');
score: 1

http://stackoverflow.com/comment/40567870
has text: I understand that, but why doesn't the new event creation work? I'm not trying to re-use the old event, I'm trying to unbind it and bind a new event to the new tr rows
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25893228

http://stackoverflow.com/a/26028803
type: Answer
answers question: http://stackoverflow.com/q/25980346
has body: The reason that they're being requested over and over is that you're using jQuery background assignment, which reloads the image. This is silly. You don't need or want jQuery here, and it has side effects you don't understand that are causing your problem. Just set the X position of the background. Done. function offset_to(id, posX, posY) { document.getElementById(id).style.backgroundPosition = posX.toString() + 'px ' + posY.toString() + 'px'; }
score: 0

http://stackoverflow.com/comment/40674760
type: AnswerComment
comment on: http://stackoverflow.com/a/25976459
score: 0
type: Comment
has text: @jack.the.ripper yes, i did, as he didn't mentioned anything about it

http://stackoverflow.com/q/26032182
has answer: http://stackoverflow.com/a/26033325
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/26033325
has title: Can someone help me with my ajax code?
upvote count: 0
answer count: 1
favorite count: 0
tagged with: ajax
has body: I wanted to change the visibility of the thumbnail to visible right after when I click the button what should I do? please help me on this one because I cannot figure it out by myself because I do not know so much about ajax and web programming. Thanks in advance. function ha(){ $('#tabExe').click(function(event){ $.ajax({ url:'backEnd/ROOMS.php', success:function(result){ $('#room1').css({ // this is just for style "visibility" : "visible", }); } }); }); } Executive Room
type: AnsweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40778350
has comment: http://stackoverflow.com/comment/40778214

http://stackoverflow.com/a/25937834
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25934976
answers question: http://stackoverflow.com/q/25934976
type: AcceptedAnswer
has body: 01/2014 is in the past. Stripe rejects expired expiry dates. 09/2014, 1/2015, etc will work (depending when you read this...)
upvote count: 3

http://stackoverflow.com/q/25894137
has title: JavaScript Replace on JQuery object appears not to be working
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25894432
possible better answer: http://stackoverflow.com/a/25894261
has body: I'm trying to get the following code working which 'should' scan for {count} and then replace this with the number '1'. Full Code: http://jsbin.com/miciqe/7/edit Snippet: $('#data').html( function() { $(this).html().replace('{count}', '1'); }); It seems simple enough, set the html to (a function which gets the html, does a replace, returns that resulting value). Can't figure out for the life of me what is going wrong. Could someone point out the 'hopefully' obvious? Update Thanks to bic, Working code examples for future reference: Solution 1, Solution 2 (Recommended) P.s. I changed it to regexp, so that all occurances of {count} would be replaced in the string.
tagged with: replace
score: 0
has answer: http://stackoverflow.com/a/25894183
accepted answer: http://stackoverflow.com/a/25894183
tagged with: javascript
tagged with: jquery
answer count: 3
has comment: http://stackoverflow.com/comment/40526540
has answer: http://stackoverflow.com/a/25894261

http://stackoverflow.com/a/25882568
score: 1
answers question: http://stackoverflow.com/q/25882549
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40510613
accepted answer of: http://stackoverflow.com/q/25882549
has body: In your case you are concating the value but it will not be added in result.message. I guess you need something like this :- success: function (result) { if(result.code == 1) { result.message += '&lt;a href="#" onClick="return Test();"/&gt;'; Message(result); } }, to put space you can put some blank space as shown below :- result.message += ' &lt;a href="#" onClick="return Test();"/&gt;';
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40506818
upvote count: 1

http://stackoverflow.com/q/25904846
has title: How to disable the cache of jquery dynatree (remembering previously selected node)?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/30119944
tagged with: jquery-dynatree
type: UnansweredQuestion
tagged with: dynatree
has body: I have created a tree structure (Dynatree). Here is the fiddel , it is nor working in fiddel may be some external links problem. But its working fine in my system. http://jsfiddle.net/raghavendram040/032Lp7s2/ My problem is when I refresh the browser it remembers the node I selected previously , I want to disable it. for that I did like this. $(function(){ $("#tree").dynatree({ persist: true, ajaxDefaults: { // Used by initAjax option cache: false, // false: Append random '_' argument to the request url to prevent caching. dataType: "json" // Expect json format and pass json object to callbacks. }, onActivate: function(node) { $("#echoActivated").text(node.data.title + ", key=" + node.data.key); temp=node.data.key; }, onClick: function(node, event) { // Close menu on click if( $(".contextMenu:visible").length &gt; 0 ){ $(".contextMenu").hide(); //return false; } }, }); but its not working, can any one help me in this please.
tagged with: treeview
type: Question

http://stackoverflow.com/comment/40628603
has text: There is no theme. Please provide the code
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25951331
score: 1

http://stackoverflow.com/comment/40562616
has text: What's the point in teaching students to do it the other way if this is more efficient/organized? Sincerely, someone slightly mad I went through an entire semester of the other way
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25914065

http://stackoverflow.com/comment/40668750
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25973268
type: Comment
has text: i hope this gonna work; but page reload involves pretty much cost.

http://stackoverflow.com/comment/40637040
type: Comment
has text: I get an object descriptor starting with: [selector: "#mobile-ad", context: document, constructor: function, init: function, jquery: "1.7.2"…]
score: 0
comment on: http://stackoverflow.com/q/25955086
type: QuestionComment

http://stackoverflow.com/q/25951121
has answer: http://stackoverflow.com/a/25951187
downvote count: 0
has answer: http://stackoverflow.com/a/59005489
favorite count: 0
tagged with: listener
has answer: http://stackoverflow.com/a/70781889
answer count: 5
type: UnansweredQuestion
score: 13
upvote count: 13
tagged with: scroll
has title: Scroll listener on body
has answer: http://stackoverflow.com/a/51302836
type: Question
tagged with: document-body
has body: I would like to ask about scroll listener. I want to add scroll listener on body but it seems doesnt work. $('body').scroll(function(){ console.log('SCROLL BODY'); }); I create basic example on fiddle, can someone explain me why it doesn't to work? Sorry for nubies question...
has answer: http://stackoverflow.com/a/25951193
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25981760
favorite count: 0
accepted answer: http://stackoverflow.com/a/25982190
upvote count: 1
has body: I have a form which i summitting to a table. I would like to be able to validate the values before they are added to the table. I would like the a "time#cnt#" to be a number that is either a interger or a decicimal with only .5. For example If the user enter a 1.2 and they try to submit it they will get a error message. They can enter 1 ,1.5 ,.5 ,2.5 ect. Below is the form that I have , being NEW to JS I have no idea how i would do it. I have seen on this website and other how i validate if for a number. &lt;cfform method="post" action="time.cfm" &gt; &lt;table &gt; ...... &lt;td&gt;&lt;input type="text" size="3" maxlength="5" name="time#cnt#" id="add_time" value=""&gt;&lt;/td&gt; ..... &lt;/table&gt; &lt;p&gt;&lt;input type="submit" class="submit" name="Submit" value=""&gt;&lt;/p&gt; &lt;/cfform&gt;
type: AnsweredQuestion
score: -2
has answer: http://stackoverflow.com/a/25981882
possible better answer: http://stackoverflow.com/a/25981870
downvote count: 3
has comment: http://stackoverflow.com/comment/40684690
has answer: http://stackoverflow.com/a/25981870
type: Question
has answer: http://stackoverflow.com/a/25982190
tagged with: validation
tagged with: javascript
has title: How to limit form values to values with certain numbers?
has comment: http://stackoverflow.com/comment/40684697
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40491284
comment on: http://stackoverflow.com/q/25874416
type: Comment
type: QuestionComment
has text: @isherwood As are underscores. However, some js libraries have problems with ids that contain periods because they are used as class selectors. Try escaping the period using a double backslash `\\ `. I don't know if it will work, but it's worth a try.
score: 0

http://stackoverflow.com/comment/40604261
comment on: http://stackoverflow.com/q/25933003
type: Comment
type: QuestionComment
score: 0
has text: Try $scope.data = {}; and then set title to $scope.data.inputTitle. I have used that directive before and I remember running into that issue, but instead we did some session logic on the server side.

http://stackoverflow.com/a/25952456
has comment: http://stackoverflow.com/comment/40630939
type: Answer
has body: You can pass a scope object to a modal window controller using the resolve (definition of resolve Members that will be resolved and passed to the controller as locals; it is equivalent of the resolve property for AngularJS route). So in your case it can be done like this: .controller('ModalContainerCtrl',['$scope', '$modal', '$route', function($scope, $modal, $route) { //your card object $scope.card = ''; var modalInstance = $modal.open({ templateUrl : '../assets/templates/modal.html', controller: 'ModalCtrl', resolve: { card: function () { return $scope.card; } } }); $scope.activity = $route.current.pathParams.name; console.log($scope.activity); //Modal controls $scope.close = function () { console.log("close!"); $modalInstance.close(); }; }]) and in the modal controller: var ModalCtrl = function ($scope, $modalInstance,card) { //Modal controls //card now can be used over here $scope.close = function () { console.log("close!") //This will now run modalInstance.close(); }; }
has comment: http://stackoverflow.com/comment/40630801
answers question: http://stackoverflow.com/q/25952010
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/26024307
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I create my JQuery Dialog like this $(thisDialog).dialog({ open: function (event, ui) { $(this).parent().children('.ui-dialog-titlebar').hide(); //hide titlebar. }, position: [leftPos, topPos] }); I tried to fade it out like this, and I can't re-open it and a bounding box remains. setTimeout((function () { $(thisDialog).fadeOut(1000, "linear", null) }), 2000); This removes the bounding box, but I can't reopen it. setTimeout((function () { $(thisDialog).parent().fadeOut(1000, "linear", null) }), 2000); This allows me to reopen it, but it doesn't fade. I would like the fade effect. setTimeout((function () { $(thisDialog).dialog("close"); }), 2000);
has answer: http://stackoverflow.com/a/26062959
has title: Dialog fadeOut leaves bounding box
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26062959
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40762214
answer count: 2
possible better answer: http://stackoverflow.com/a/26025216
has answer: http://stackoverflow.com/a/26025216
downvote count: 0

http://stackoverflow.com/a/36174851
upvote count: 1
answers question: http://stackoverflow.com/q/25894660
has body: The same story for columns with filtering. 2nd column filtering disable: $(document).ready(function() { $('#example').DataTable( { initComplete: function () { this.api().columns().every( function () { var column = this; var some = column.index(); if (column.index() == 1) return; var select = $('&lt;select&gt;&lt;option value=""&gt;&lt;/option&gt;&lt;/select&gt;') .appendTo( $(column.footer()).empty() ) .on( 'change', function () { var val = $.fn.dataTable.util.escapeRegex( $(this).val() ); column .search( val ? '^'+val+'$' : '', true, false ) .draw(); } ); column.data().unique().sort().each( function ( d, j ) { select.append( '&lt;option value="'+d+'"&gt;'+d+'&lt;/option&gt;' ) } ); } ); }}) };
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/102618127
score: 1

http://stackoverflow.com/q/26003034
has comment: http://stackoverflow.com/comment/40726002
score: 0
has body: I have a site I'd like to check through several environments for login credentials, but in the mean time, display a loading gif. Trouble is, if I make the ajax synchronous or, async: false, then the rest of the page pauses until the credentials are checked. I tried switching the ajax calls back to asynchronous, it will prematurely display a false negative error that the user isn't logged in, since it hasn't finished checking all environments. I also tried a kind of band-aid solution with setTimeout(loginCheckFunction, 600) But that's arbitrary timing, and if the user has a slow connection, the false error will persist. Any ideas on how to make some portions run without waiting for the synchronous Ajax to finish? Thanks! edit: I think my issue is pretty much inadvertently solved by this question: How to display 'Loading' when making a 'synchronous' AJAX call in pure JavaScript? edit 2: I skirted the issue by using the top answer to the above question. I gave a very small setTimeout function to the beginning of parent function calling the synchronous ajax-based login checks, during which time the 'loading' gif can be launched, and viewed simultaneously while ajax runs. Per the answer given though, in the strictest sense, it isn't running simultaneously, the browser just provides that illusion. For future persons maybe running into similar issue, I transitioned from setTimeout being applied on the child function, to setTimeout being applied one level up on its the parent function.
has comment: http://stackoverflow.com/comment/41933484
type: Question
has comment: http://stackoverflow.com/comment/41932061
tagged with: javascript
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/26004356
linked to: http://stackoverflow.com/q/8019078
has comment: http://stackoverflow.com/comment/41933505
has title: How can I have some portions of Ajax occur synchronously, while front end logic occurs asynchronously?
accepted answer: http://stackoverflow.com/a/26004356
tagged with: asynchronous
type: AnsweredQuestion

http://stackoverflow.com/q/25946825
has comment: http://stackoverflow.com/comment/40621681
has comment: http://stackoverflow.com/comment/40621627
type: Question
accepted answer: http://stackoverflow.com/a/26395920
tagged with: javascript
has comment: http://stackoverflow.com/comment/40660007
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/41443499
has body: I am building an application using HTML, Javascript, CSS. When the user opens the app a function will check if the user is already registered. If registered then display the welcome screen with some message. If not registered then show a button to register. Now I have tried many things but the HTML page (body) shows the welcome message and also the Registration button when the app is opened. Register User Welcome What is happening is on opening the app (before / after registration), both the div are displayed and then after the check the page re-loads and shows correct div. I want that the page should hold itself from displaying anything till the check is finished and the function should control which div to display. Any idea what should be done? Thanks.
has comment: http://stackoverflow.com/comment/40657399
has answer: http://stackoverflow.com/a/26395920
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40657431
score: 0
has title: Display / Load HTML Body only on Results of a Function

http://stackoverflow.com/comment/40773814
has text: [Solved] This issue is caused due to predictive text feature of android. Turning off predictive text give the required output.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/26010588

http://stackoverflow.com/a/25878136
score: 0
accepted answer of: http://stackoverflow.com/q/25875932
has comment: http://stackoverflow.com/comment/40505086
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40498671
answers question: http://stackoverflow.com/q/25875932
has body: Here is a other solution 3) Just as example, how to store additional data in collection. Taken from here var MyCollection = Backbone.Collection.extend({ meta: function(prop, value) { if (value === undefined) { return this._meta[prop] } else { this._meta[prop] = value; } }, }); var collection = new MyCollection(); collection.add(someModels); collection.meta("selectedId", value); You can store selectedId in collection meta propery. It will be always unique for each collection. And there is no need in 'selected' property in model.

http://stackoverflow.com/comment/40673433
comment on: http://stackoverflow.com/q/25975774
type: Comment
has text: [Don't parse HTML with regex!](http://stackoverflow.com/a/1732454/418066)
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40825327
type: AnswerComment
type: Comment
has text: No problem - just remember to trim the "," off the end of your string before sending it to your deleteAnswer1 function: string.substring(0, string.length-1)
comment on: http://stackoverflow.com/a/26035155
score: 0

http://stackoverflow.com/q/25990570
upvote count: 3
type: Question
score: 3
has body: I've got a custom map type API I need to talk to. I'd like to get the map images by using the 'tile' function of Google Maps. I've got the tiles setup like this: https://developers.google.com/maps/documentation/javascript/examples/maptype-overlay?hl=nl The API to get the different tileimages requires me to have a center point for each of the tiles. So how do I get/calculate the center LatLng point for each tile?
has title: Get center LatLng point of a custom tile in Google Maps API v3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/47259899
accepted answer: http://stackoverflow.com/a/25991835
has answer: http://stackoverflow.com/a/47259899
tagged with: google-maps-api-3
answer count: 2
tagged with: google-maps
downvote count: 0
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25991835

http://stackoverflow.com/comment/40622500
type: Comment
comment on: http://stackoverflow.com/a/25947191
has text: After click on submit I want to simulate click 'a' key (65) at input form. See: http://jsfiddle.net/3xTM2/466/ Why 'a' doesn't display after clicking submit?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25912762
has body: You're overwriting the value on each iteration, not adding to it. Use a variable that you add the outerHTML to, and then set the textarea value once the iteration has completed. var val = ''; Array.prototype.forEach.call(mutation.addedNodes, function(node) { var lastname = node.outerHTML; if(typeof lastname !== "undefined") { val += lastname; } }); document.querySelector("textarea").value = val;
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25912713
type: Answer
accepted answer of: http://stackoverflow.com/q/25912713
score: 2
upvote count: 2

http://stackoverflow.com/comment/40726695
type: QuestionComment
comment on: http://stackoverflow.com/q/26004625
has text: With `load-grunt-config` it looks in `grunt/express.js` and loads the express task. This is why you do not see it in Gruntfile.js. Please ignore the watch task.
score: 0
type: Comment

http://stackoverflow.com/comment/40518278
type: Comment
has text: I used "contact.d" instead (ASP.NET's thing) but it is simply printing out "undefined" for each of the values.
score: 0
comment on: http://stackoverflow.com/a/25889592
type: AnswerComment

http://stackoverflow.com/a/25982468
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25982286
upvote count: 1
has body: Since you're already using jQuery, you have these options to take advantage of it: jQuery already provides a DOM wrapper around a DOM object that provides both a wrapper and lots of methods on it. You can use that rather than create your own wrapper object. You can easily create new methods to operate on jQuery objects if that makes item 1 more practice. jQuery plugins are not more difficult than jQuery.myMethod = function() { code here }. If you want your own object with your own methods, then it can just contain either the relevant DOM element or relevant jQuery wrapper on your DOM element (depending upon whether you regularly need a jQuery object in order to operate on the DOM element). jQuery provides .data() which lets you access and store properties of DOM elements in ways that persist as long as the DOM element persists, but don't cause memory leaks. If you aren't building your own object, you can use this to store instance data associated with a DOM element. If you are building your own object that will contain your DOM element, then you can just store properties on your own object directly. It is generally better to not be storing lots of custom properties on DOM elements themselves so you should either be storing them in your own custom javascript objects or using something like jQuery's .data(). More specifics about how is best to do this require thorough knowledge of exactly what you're doing, what your operations are, how the lifetime of your elements works, what instance data you need to keep track of, how you access and store or find references to these elements, etc... There is no single answer as the appropriate architecture depends upon a lot of the requirements which you haven't disclosed other than at a very, very general level.
type: Answer

http://stackoverflow.com/comment/40508986
has text: I would personally use `chrome.tabs.create`, why a new window?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25881750
type: Comment

http://stackoverflow.com/comment/40729995
has text: Hmmm... I'm not sure why you're getting those `$id`s. Can you set up a minimal reproduction? You can do that by clicking the Code Snippet button when you're editing your question.
score: 0
comment on: http://stackoverflow.com/q/26002335
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40652324
type: Comment
type: QuestionComment
has text: I dont believe this is possible - one reason being usernames are not unique.
score: 7
comment on: http://stackoverflow.com/q/25964159

http://stackoverflow.com/comment/40628790
has text: @gmo too broad? I'm asking specifically for a tool giving the code I want to detect... It's not an opinion or something. @Bergi, what type of assigment could this be? It's a cutted down code from my own unit tests for an angular project. @ShaneQful The beforeEach callback it's always called, it's the same problem as `var a = 5;` (unused variable) against `var a; a = 5;` (no errors)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25951106
score: 1

http://stackoverflow.com/comment/40537728
type: AnswerComment
type: Comment
has text: Then use multiple functions or `ng-click="showDatePicker('IsStartDatePickerHidden')` and `$scope.showDatePicker(name) { $scope[name] = false; }` as Constantinos suggested.
comment on: http://stackoverflow.com/a/25899958
score: 0

http://stackoverflow.com/comment/40797784
type: AnswerComment
type: Comment
has text: Did you add the code from my EDIT 2 entry? You code didn't set a default value for the $c variable. Meaning, if the $content length is not greater then zero it is never declared. This results in both the following if statements against the $c variable to fail, which in turn means the $return array is never set. In the beginning of your test_function() add $c = "1" and that should solve it.
comment on: http://stackoverflow.com/a/26019254
score: 0

http://stackoverflow.com/comment/40743581
comment on: http://stackoverflow.com/a/26014143
has text: I think both will do the same job.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25894910
type: Answer
has comment: http://stackoverflow.com/comment/40528443
has comment: http://stackoverflow.com/comment/40528895
has comment: http://stackoverflow.com/comment/40528376
has comment: http://stackoverflow.com/comment/40529268
upvote count: 2
has body: You have a file input that takes multiple files, so you have to get those files and append each one to the formData object $('#pic_upload').on('click', function(e) { var formData = new FormData(), files = $('#pic_upload_file').get(0).files; $.each(files, function(i, file) { formData.append("pics_" + i, file); }); $.ajax({ url : 'test.php', data : formData, contentType : false, processData : false, type : 'POST' }); });
has comment: http://stackoverflow.com/comment/76296673
has comment: http://stackoverflow.com/comment/40529332
score: 2
accepted answer of: http://stackoverflow.com/q/25894788
answers question: http://stackoverflow.com/q/25894788
has comment: http://stackoverflow.com/comment/40528503
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25929422
type: Answer
has comment: http://stackoverflow.com/comment/40591204
score: 0
answers question: http://stackoverflow.com/q/25929353
has body: You'd need to pass in the name of the prototype member: function myCustomUpper() { return this.toUpperCase(); } String.prototype.up = myCustomUpper; var action = 'up'; 'hello'[action]();

http://stackoverflow.com/q/25988169
accepted answer: http://stackoverflow.com/a/26051917
has comment: http://stackoverflow.com/comment/40697457
has comment: http://stackoverflow.com/comment/40773102
type: Question
score: 0
answer count: 1
tagged with: yii
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40696572
has title: End Date should be greater than Start Date in Yii Bootstrap datepickerRow
has answer: http://stackoverflow.com/a/26051917
tagged with: php
has comment: http://stackoverflow.com/comment/40696516
tagged with: twitter-bootstrap
has body: I am using Yii bootstraps datepickerRow : Check this I want my end_date depending on start_date. i.e. end_date should be greater than start date. I've spent couple of hours on google to check whether any in-built solution available for it but didn't found any solution. Then after I written my own js code which's I think perfectly fine but its not working. I've already achieved this thing with Cjuidatepicker and its booming. Check my working code for yii cjuidatepicker But I don't know why its not working for yii bootstrap datepickerRow. Any help would be appreciated. Following is my code: &lt;?php echo $form-&gt;datepickerRow( $identitycard, 'date_of_issue', array( 'onChange' =&gt; 'setEndDate("passport_date_of_expiry", this)', 'class' =&gt; "input-small", 'labelOptions' =&gt; array('label' =&gt; 'Date of Issue &lt;span class="required"&gt;*&lt;/span&gt;'), 'value' =&gt; $passportArr['date_of_issue'], 'name' =&gt; 'passport[date_of_issue]', 'readonly' =&gt; true, 'options' =&gt; array( 'autoclose' =&gt; true, 'showAnim' =&gt; 'fold', 'format' =&gt; 'yyyy-mm-dd', 'endDate' =&gt; '-infinity' ), 'prepend' =&gt; '&lt;i class="icon icon-calendar"&gt;&lt;/i&gt;', 'hint' =&gt; 'yyyy-mm-dd' ) ); echo $form-&gt;datepickerRow( $identitycard, 'date_of_expiry', array( 'class' =&gt; "input-small", 'labelOptions' =&gt; array('label' =&gt; 'Date of Expiry &lt;span class="required"&gt;*&lt;/span&gt;'), 'value' =&gt; $passportArr['date_of_expiry'], 'name' =&gt; 'passport[date_of_expiry]', 'readonly' =&gt; true, 'options' =&gt; array( 'autoclose' =&gt; true, 'showAnim' =&gt; 'fold', 'format' =&gt; 'yyyy-mm-dd', ), 'prepend' =&gt; '&lt;i class="icon icon-calendar"&gt;&lt;/i&gt;', 'hint' =&gt; 'yyyy-mm-dd' ) ); ?&gt; // JS code function setEndDate(id, date) { var selectedDate = $(date).val(); $("#" + id).datepicker({ startDate: selectedDate, format: "yyyy-mm-dd" }); }
has comment: http://stackoverflow.com/comment/40697573
type: AnsweredQuestion

http://stackoverflow.com/q/26027256
answer count: 1
has title: How can I remove 'records per page' label text from datatables
tagged with: jquery
tagged with: datatable
type: UnansweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/29606947
score: 0
has body: Is there a way to remove the label "Records per page" from jQuery datatables? "oLanguage": { "sSearch": "" } Can be used to remove the search label, but is there something similar for the results per page?

http://stackoverflow.com/a/25959282
has comment: http://stackoverflow.com/comment/40913960
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25953075
type: Answer
answers question: http://stackoverflow.com/q/25953075
has body: Project Settings - Code Style - JavaScript - Wrapping and Braces - check off Comment at first column

http://stackoverflow.com/a/25889902
score: 1
has comment: http://stackoverflow.com/comment/40520933
upvote count: 1
answers question: http://stackoverflow.com/q/25889458
has body: Not speaking 'bout the CMS right now, but in general my method is 1) If you did not add any of your onw scripts, just 3rd party, delete them all of your project e.g. You've added jquery.js, bootstrap.js, yii.js so you remove them and then you test if all works fine, if so, add first one, for me it would've been jquery.js, test again, if no bug visible add second and so on. In this case you'll see in which file is some bug or sort of unexpected behaviour. 2) Here is the worst part, in the found file you should find the problem part. So, download the full version, not production, open it in editor, and start searching... The good news are that you don't have to look through all file, just find the event listeners in your devtolls or firebug and follow them. All of this is just my experience , so if someone know better methods, I would like to hear 'em too.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40682897
comment on: http://stackoverflow.com/a/25980883
type: Comment
score: 0
type: AnswerComment
has text: I'mma leave this open for a bit longer but I'mma implement. if no other critiques come about i'll mark correct in 30.

laravel
tags question: http://stackoverflow.com/q/25947050
tags question: http://stackoverflow.com/q/25927478
tag name: laravel
tags question: http://stackoverflow.com/q/25956117
tags question: http://stackoverflow.com/q/25888483
type: Tag
tags question: http://stackoverflow.com/q/25967529

http://stackoverflow.com/a/26007266
type: Answer
answers question: http://stackoverflow.com/q/26007216
has body: What you can do is change the button type from submit to button in your html. And then on click you validate , after that with the help of jquery you submit your form. Here is how it will do your job: Incorrect Username and/or Password $('#processButton').click ( function (e) { var username = $('#username').val(); var password = $('#password').val(); var dataString = "username=" + username + "&password=" + password; $.ajax( { type: "POST", url: "ajaxCheck.php", data: dataString, cache: false, success: function (result) { if (!result) { $('#errorSignIn').removeAttr('hidden'); return false; } else { $("#signIn").submit(); } } }); });
score: 0

http://stackoverflow.com/comment/40682692
type: Comment
has text: If you don't understand the difference between a Javascript event and an AngularJS digest cycle I recommend reading up on that - it's a very important concept.
comment on: http://stackoverflow.com/a/25944534
type: AnswerComment
score: 0

http://stackoverflow.com/q/25899359
upvote count: 1
linked to: http://stackoverflow.com/q/12864887
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25901145
score: 1
accepted answer: http://stackoverflow.com/a/25922587
possible better answer: http://stackoverflow.com/a/25901145
type: Question
answer count: 2
tagged with: validation
downvote count: 0
tagged with: javascript
has body: I'm working on understanding how to use Angular Directives to implement front-end validations. While I'm familiar with the way that directives generally work, what I'm having a hard time finding in any tutorial, blogpost, or even the actual Angular docs, is how to meaningfully implement a useful validation. (By that, I mean one that isn't already there, as in this basic tutorial for how to implement a validation attribute. The most common of these in my experience, is a 'Required If' scenario. If I have Text Field A and Text Field B in my form, and Text Field A has a value, my business rules tell me that Text Field B must have a value. However, the various tutorials for validation directives have all only relied on the element that they are tied to. Question: I suspect that I am approaching the problem of how to implement something like a Required If validation completely wrong. In the Angular way, what is the correct way to require a value in a form if and only if a field that it's dependent on has a value?
has answer: http://stackoverflow.com/a/25922587
favorite count: 0
tagged with: angularjs
has title: How would one write an Angular directive for a 'Required If' scenario?

http://stackoverflow.com/comment/40703865
type: AnswerComment
comment on: http://stackoverflow.com/a/25977498
score: 0
type: Comment
has text: Thanks. for the alternatives. But since I did not actually want a form (just the aesthetics) changing it to div seems better solution in this case.

http://stackoverflow.com/a/25967532
has comment: http://stackoverflow.com/comment/40659114
has comment: http://stackoverflow.com/comment/40658880
has comment: http://stackoverflow.com/comment/40658854
has comment: http://stackoverflow.com/comment/40658927
type: Answer
has comment: http://stackoverflow.com/comment/40989540
upvote count: 1
has comment: http://stackoverflow.com/comment/40992171
score: 1
has comment: http://stackoverflow.com/comment/40659277
has body: That would be indeed be .settle. Settle takes an array of promises and returns PromiseInspection instances for all of them when they resolve. You can then check if they're fulfilled or rejected and extract their value. For example: Promise.settle(['a.txt', 'b.txt'].map(fs.readFileAsync)).then(function(results){ // results is a PromiseInspetion array console.log(results[0].isFulfilled()); // returns true if was successful console.log(results[0].value()); // the promise's return value }); Your use case is pretty much what Promise.settle exists for.
has comment: http://stackoverflow.com/comment/40659197
accepted answer of: http://stackoverflow.com/q/25965977
answers question: http://stackoverflow.com/q/25965977
has comment: http://stackoverflow.com/comment/40658894
downvote count: 0
has comment: http://stackoverflow.com/comment/40658820
type: AcceptedAnswer

http://stackoverflow.com/q/26015216
score: 5
has answer: http://stackoverflow.com/a/50433379
has title: Extending object literal
tagged with: javascript
favorite count: 0
upvote count: 5
answer count: 5
tagged with: object-literal
accepted answer: http://stackoverflow.com/a/26015481
has body: var x = { name: "japan", age: 20 } x.prototype.mad = function() { alert("USA"); }; x.mad(); The above code does not work. object literals cannot be extended? or x.mad() not the right way to call.
has answer: http://stackoverflow.com/a/26015269
downvote count: 0
has answer: http://stackoverflow.com/a/26015481
possible better answer: http://stackoverflow.com/a/26015269
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/572897
has answer: http://stackoverflow.com/a/47495915
tagged with: prototype
has answer: http://stackoverflow.com/a/26015385

http://stackoverflow.com/q/26021962
has answer: http://stackoverflow.com/a/30248120
has body: I am using an entirely html ui and have my Shiny.addCustomMessageHandler in the head of my document and am passing it data using session$sendCustomMessage and that works wonderfully! I send a query to Google BigQuery and have gotten it to authorize and everything using the javascript, and it brings back an array with my query to the Shiny.addCustomMessageHandler section of my code (I know it does because I can print it to the browser console using console.log), but even with a Shiny.onInputChange command, my data is not being sent back to my server.R for processing. Will this command not work inside the Shiny.addCustomMessageHandler function? Is there another thing I could use to send it back? Thanks so much for all your help this week!
has title: Using Shiny.onInputChange
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/r
tagged with: shiny
type: UnansweredQuestion
score: 2
upvote count: 3
downvote count: 1
type: Question

http://stackoverflow.com/comment/40752508
type: QuestionComment
comment on: http://stackoverflow.com/q/26006055
has text: Moving the timpicker code before the modal show code causes the modal to not pop up. Moving it outside and before causes the same problem. Moving it out and after leaves the textfield unchanged
score: 0
type: Comment

http://stackoverflow.com/comment/40692587
type: AnswerComment
has text: A basic jQuery tutorial would come in handy :)
type: Comment
comment on: http://stackoverflow.com/a/25979816
score: 0

http://stackoverflow.com/comment/40652630
type: Comment
score: 0
type: QuestionComment
has text: possible duplicate of [Getter/setter in constructor](http://stackoverflow.com/questions/5222209/getter-setter-in-constructor)
comment on: http://stackoverflow.com/q/25964204

http://stackoverflow.com/a/26029070
has body: In Q(..).x(), Q(..) is always invoked prior to x being resolved (and invoked); this can be clearly seen with rewriting it as so: var y = Q(..); // this executes and the value is assigned to y y.x(); // and then the method is invoked upon the object named by y Thus it is not possible to alter the already-executed behavior of Q(..) based on the result of invoking Q(..).x - the object has already been returned from Q(..).
has comment: http://stackoverflow.com/comment/40771060
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40771014
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/26028993
has comment: http://stackoverflow.com/comment/40771083
has comment: http://stackoverflow.com/comment/40771017
accepted answer of: http://stackoverflow.com/q/26028993
has comment: http://stackoverflow.com/comment/40770984
has comment: http://stackoverflow.com/comment/40770992
downvote count: 0
score: 1

http://stackoverflow.com/q/26017895
accepted answer: http://stackoverflow.com/a/26022394
tagged with: kendo-ui
tagged with: telerik
tagged with: kendo-asp.net-mvc
favorite count: 0
has answer: http://stackoverflow.com/a/26033485
score: 2
has body: Previously when using the Kendo UI Grid control (version 2014.1.318), the height of any rows in my grid were fixed and ellipses were used to show any content outside the width of the cell - looking a little like the below: Now, since I upgraded to the latest version of the controls (2014.2.903), the height of the row seems to be adjusted to fit the content: The HTML for that row now contains the in-line style of the below, whereas previously it did not. style="height: 45px;" I'm guessing this is the problem. I want to know if there's a way to turn off this feature or where in the scripts I can remove this. I can't even find when this was introduced in the release history! EDIT: I've identified the problem lies within the kendo.common.min.css file. If I use the old one, everything works fine... just got to find the new style that's causing the issue
upvote count: 2
possible better answer: http://stackoverflow.com/a/26033485
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26022394
has comment: http://stackoverflow.com/comment/40753135
has title: Kendo UI Grid Row Height set Dynamically by control
answer count: 2
tagged with: kendo-grid
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25917522
answers question: http://stackoverflow.com/q/25917425
has body: If you declare a variable with var it creates it inside your current scope. If you don't, it'll declare it in the global scope. var mynumber; function one (){ mynumber = Math.floor(Math.random() * 6) + 1; // affects the global scope } You can also specify that you want the global scope even if you define a local variable too: function one (){ var mynumber = 1; // local window.mynumber = Math.floor(Math.random() * 6) + 1; // affects the global scope } Knowing that the global scope is window you can get pretty tricksy with modifying global variables: function one (){ var mynumber = Math.floor(Math.random() * 6) + 1; // local window['mynumber'+mynumber] = mynumber; // sets window.mynumber5 = 5 (or whatever the random ends up as) }
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25917425

http://stackoverflow.com/comment/40584823
comment on: http://stackoverflow.com/q/25925430
score: 0
has text: @elclanrs http://jsfiddle.net/bdmkywam/ it is not acting as expected but at least it is moving now.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40591594
type: QuestionComment
has text: this is indeed that case because it is assumed that you have control over your own code, right? If it is about some internal conventions (e.g. the company requiring it), I would check the page on the server side before delivering it.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25929338

http://stackoverflow.com/a/25986724
answers question: http://stackoverflow.com/q/25986500
accepted answer of: http://stackoverflow.com/q/25986500
has body: You can do this! store all span elements with the class apples in a var and setup the total var for later var apples = document.querySelectorAll('span.apples'), total = 0; loop through the array and use the parseInt function to get the number out of the textContent of each element, and then add that value to our total for (var i = 0; i &lt; apples.length; i++) { total += parseInt(apples[i].textContent, 10); }; do something with total console.log(total);
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40618420
comment on: http://stackoverflow.com/q/25944424
has text: Is there a reason why you did not use scroll event?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40749243
type: Comment
comment on: http://stackoverflow.com/a/26017383
score: 0
type: AnswerComment
has text: Thank you for your answer, but unfortunately your solution seems to be based on dojo 1.7 (or later). The project uses an earlier version than dojo 1.7 (as mentioned), so I would need a solution for the old way of dojo... (current used version is 1.3). A upgrade is at the moment not possible.

http://stackoverflow.com/comment/40559379
score: 1
has text: Check out [Truthy & Falsey](http://james.padolsey.com/javascript/truthy-falsey/).
comment on: http://stackoverflow.com/q/25912227
type: Comment
type: QuestionComment

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/25896449
tags question: http://stackoverflow.com/q/25901271
type: Tag
tags question: http://stackoverflow.com/q/26015657

http://stackoverflow.com/q/25889194
answer count: 1
has comment: http://stackoverflow.com/comment/40517471
tagged with: javascript
has comment: http://stackoverflow.com/comment/40517684
tagged with: ajax
score: 0
has title: JavaScript - extracting data from a JSON object created with Json.Net
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40517743
has comment: http://stackoverflow.com/comment/40517819
has body: I have a server-side method used to return the data to the user. The data is stored in a SQL Server database and is mapped using EF 6. Once extracted from the database using an id value, the object is subsequently serialized using the Json.NET framework. The object is used "as is", without filtering out the references to other tables. Because of that, I've had to use the "PreserveReferencesHandling" option. On the client-side, AJAX is used to call the method. I'm having trouble extracting the data from the object (client-side) which does get serialized and is delivered to the browser as expected. Server-side method: [WebMethod] public static string ContactData(long id) { IService&lt;Contact&gt; contactService = new ContactService(); Contact contactEdit = contactService.GetById(id); string str = JsonConvert.SerializeObject(contactEdit, new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.Objects }); return str; } Client-side function (the important part): $.ajax({ type: "POST", url: "Contacts.aspx/ContactData", data: JSON.stringify({ id: contactId }), // id by which I am receiving the object contentType: "application/json; charset=utf-8", dataType: "json", success: function (contact) { $("#tbFirstName").val(contact.d[0].Contact.first_name); // I've tried various combinations to no avail }, }); This is how the JSON object (testing purposes data) looks like in Visual Studio's JSON Visualizer: And this is what the browser (FF 32, it that matters) receives: Firebug I will post more info if needed.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40517417
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25889592
has comment: http://stackoverflow.com/comment/40517671
type: Question
tagged with: c#
accepted answer: http://stackoverflow.com/a/25889592

http://stackoverflow.com/comment/40497900
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25877542
score: 0
has text: @user3773712: Your observable is a function (functionally, it's pretty much exactly what you had in your `computed`), so to pass the value *inside* the observable, you just call that function. So `myfunction(self.selectedTitleId())` will pass the value from your observable to the `myfunction`. So as far as I can understand what you are doing, you should be able to use the observable exactly like you were using the computed.

http://stackoverflow.com/a/25951193
type: Answer
has body: Try with: $(window).scroll(function(){ console.log('SCROLL BODY'); }); This should be supported by all browsers.
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/40628433
downvote count: 0
has comment: http://stackoverflow.com/comment/40628336
answers question: http://stackoverflow.com/q/25951121
has comment: http://stackoverflow.com/comment/40628381

http://stackoverflow.com/a/26006085
type: AcceptedAnswer
has body: find is a jQuery method. In vanilla-js, you should use var tag = t.parentNode.parentNode.querySelector("span.h"); However, that won't work neither because there is no span with class h, and you want an h4. Therefore, use one of these var tag = t.parentNode.parentNode.getElementsByClassName("cond")[0]; var tag = t.parentNode.parentNode.getElementsByTagName("h4")[1]; var tag = t.parentNode.parentNode.querySelector("h4.cond"); You could also consider things like var tag = t.parentElement.nextElementSibling.firstElementChild;
accepted answer of: http://stackoverflow.com/q/26006017
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26006017
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/25930774
favorite count: 0
has title: Unable to create dynamic array of objects in AngularJS
tagged with: angularjs
has body: Following is the type of array I am trying to create(avail) on button click - [ {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, {DATE, morning_VALUE, night_VALUE}, ] morning_VALUE -> true/false night_VALUE -> true/false Following is my plnkr code - PLNKR HTML - - Morning: Night: Click Let me know what I am doing wrong here, I believe I need to use push in the case but don't know how to fit it in my scenario.
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25931127
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25931127
possible better answer: http://stackoverflow.com/a/25931060
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25931060
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/q/25924360
has body: No problems with Firefox. I've tried implementing the mixitup jquery plugin (https://mixitup.kunkalabs.com) in my code, and it does not work (for me) in Chrome (or Opera, and probably other webkit browsers). The only time I can get it to work is when I run the code directly in Chrome's console. The code is nothing fancy: $(document).ready(function() { $('.products').mixItUp({ animation: { duration: 400, effects: 'fade translateZ(-360px) stagger(34ms)', easing: 'ease' }, callbacks: { onMixStart: function(state, futureState){ alert('Animation starting'); },onMixLoad: function(state){ alert('MixItUp ready!'); },onMixEnd: function(state){ alert('Operation ended'); },onMixFail: function(state){ alert('No elements found matching '+state.activeFilter); },onMixBusy: function(state){ alert('MixItUp busy'); } } }); }); The only callback that shows in Chrome (except when run in Chrome's Console) is the "Animation starting". They should all show (which they do when run in Chrome's Console). I've tried putting it in both $(window).load(function() { and "document ready" code too, which didn't make any difference. I've also tried moving the code from the header area to just before &lt;/body&gt; and that makes no difference either - no surprises. I am running out of ideas as to why it works in Chrome's Console, but not in the JS file or inline, before the &lt;/body&gt;. Again Firefox seems to have no issues. This is doing my head in. Any ideas? Thanks
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
has title: Weird Jquery mixitup plugin issues in Chrome - works only when run in dev console
type: Question
tagged with: webkit
has comment: http://stackoverflow.com/comment/40582238
has comment: http://stackoverflow.com/comment/40582627
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25966318
has comment: http://stackoverflow.com/comment/40656525
has comment: http://stackoverflow.com/comment/40656604
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40656992
accepted answer of: http://stackoverflow.com/q/25966083
has comment: http://stackoverflow.com/comment/40657083
upvote count: 2
type: Answer
has body: The issue is because it's getting a 404 error for this resource: http://tradies-prototype.cloudapp.net/bundles/angular-animate.min.js.map Make sure to include the .map files in your bundle. EDIT: As @CaspNZ pointed out in the comments bellow, if you have a look at this: http://tradies-prototype.cloudapp.net/bundles/angular you will see that you are getting this error: /* Minification failed. Returning unminified contents. (248,386-393): run-time error JS1019: Can't have 'break' outside of loop: break a */ Which means that there is something wrong with your ASP.Net MVC Bundling. It could be many things, but make sure that you are aware of this, so that your angularJs code can be minified properly. EDIT 2 Also, have a look at this: Mvc4 bundling, minification and AngularJS services and this: http://www.codeproject.com/Tips/786205/ASP-NET-MVC-bundling-minification-with-angularjs-a
has comment: http://stackoverflow.com/comment/40656610
has comment: http://stackoverflow.com/comment/40658931
score: 2
has comment: http://stackoverflow.com/comment/40657125
has comment: http://stackoverflow.com/comment/40658037
has comment: http://stackoverflow.com/comment/40656892
has comment: http://stackoverflow.com/comment/40657306
has comment: http://stackoverflow.com/comment/40656602
has comment: http://stackoverflow.com/comment/40656581
has comment: http://stackoverflow.com/comment/40657289
has comment: http://stackoverflow.com/comment/40656584
answers question: http://stackoverflow.com/q/25966083

http://stackoverflow.com/comment/41000423
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26009923
has text: I finally got it. thank you for your consistent help. I really am a beginner so that is why it was hard to get it together but I finally did it! Thanks again.

http://stackoverflow.com/a/27175364
answers question: http://stackoverflow.com/q/25910808
downvote count: 0
type: Answer
upvote count: 21
score: 21
has body: Short answer: /[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/ Long answer: A JavaScript regular expression equivalent to /\p{Sc}/ is: ScRe = /[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/ ScRe.test("$"); // true ScRe.test("£"); // true ScRe.test("€"); // true The above has been generated by: $ npm install regenerate $ npm install unicode-7.0.0 $ node &gt; regenerate().add(require('unicode-7.0.0/categories/Sc/symbols')).toString(); https://github.com/mathiasbynens/regenerate https://github.com/mathiasbynens/unicode-7.0.0 Watch: https://www.youtube.com/watch?v=zi0w7J7MCrk

http://stackoverflow.com/q/26011214
has answer: http://stackoverflow.com/a/26011718
has comment: http://stackoverflow.com/comment/40738067
has answer: http://stackoverflow.com/a/26011754
upvote count: 5
tagged with: javascript
has body: How can i remove all inline style properties which starts with 'font-'? INPUT OUTPUT
score: 5
has title: Remove all inline style properties which starts with 'font-'
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/26011270
accepted answer: http://stackoverflow.com/a/26011718
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26011270
tagged with: regex
tagged with: css
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26011378
has comment: http://stackoverflow.com/comment/40738332
type: Question

http://stackoverflow.com/a/25961516
answers question: http://stackoverflow.com/q/25961060
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25961060
type: Answer
score: 1
upvote count: 1
has body: I would do it this way: Check out the <a href="http://jsexample.com/#DwIw9gJgngfAUAAic4AHBBLCBeARAMwwCcBnAFwDkBXAW1xkNMtpAFMjMSEBWYAelTxkKdFjwlWAYzAA7CNTowJ0uQrYcMXAIwAmfoMTCEwDDNRUyCMlFSs8IC2Vm4EANwCGAGyp3cAQQgIDDIMZwRZSU8MSQBrPEkvSQA1Lx8ACgByd0CMgEoAbnpDYRMzCysbXwcyJxkXD29fABEMV01QuvCZSOi43ATPZNTWTKDXPMKhI1LzS2tbe0cwhp88AFlIKm8SFwio2PjElMbMmkgJoqNjU1mKhdxq2vrh9a2Q1H33ELC93sPB47pDI0N4YD5QC5TEo3crzKpLTorXwAZSoIDIRHckm+nV+B36R2GmRIaIxWLIkOKKBhc0qixqyxeuAorAA5l8Ortuvs+gMhicMjI2ZSrqAOHwodSyrT7o9GY08ABRACOVC8XGweC6PXxfMBIwyrFVXicIumNLu8IZiKZFDAlhVas8XAAhFq8bzCQKZPajU7TQVLubpZb6U83EyAOJEVhfdgIAAqAAt3DIEDAuTrPQCiRlWTG40QzdCQ3Cw/LVrgADKsEhcZOp4yZnn/flAzy1kjFqW3MsPBHPBW4aOxsjxhtpsAcR1edPu7l/Ak5gX50fsP3q7tIGawun962Dys1uuJlOT6fGzzGedZ1v6zIdusb52UqnbkiSIhgmW+McADzIPgACt3A8D8v1QMgijfZB8CobocQQPUiVYDsaFyBAAG8YOEDwOEYcg1HjbAEAgMBJFoVgZDIAA6VlWDIRU0KosgACEoAASQgNICGIQjaFwXIaP/MgAGFZDHaj8hw2C+OYGh1AQEiCPk9QaJoL5JCTNI+AAHQgABqPgChkpA8IQZRZHkFhiNI8jKOouiGKY1gaBY9iuJ4yzVAEoSRPE6iWOkq5hG86yFNssKiKIdTNO0vTDOM4KQqQEgAHdgi0hA0lQ1yMOwlLhASCQEFwbIIFwAAuUyQq8dgyDSFTooQAzSpatrWqimyOFalwSJcVq0lQdxSFYDjqMauToow1rhtG8aGq6iKiFyVbksKowQALGJ1sK4rWFKsYqpqq46qIBqmu69qXD4DqLKkKzmt6pS7qGkaJAWyamGmhBbrmj6JqW9RVpMjari22MdpOpD3BK3Azgq6qwaMM6Lqmq7noAUjuoH42e/r2re+aJsu5aMOx/6xsBh6fLJtboeECH3Ch5H9tKkFPHeTwoGO5HhFRr7+OW66EAAKhxmnwsU/HXspz7SeBsWEDl6mVCl9gQd25GmZZsG2dwEl0UxbFeb5pABYVvG2oAWgltWnragnBpVtHvu6jDbZdtJcZW+mzaQHWtaMABfGTQ5g/hwO/SV+HAaAYCAA==" rel="nofollow">Demo firstNumber is 5 secondNumber is 12 " onclick="calcValue('greater');"> <input type="button" value="Less Than <" onclick="calcValue('less');"> =" onclick="calcValue('greaterequals');"> <input type="button" value="Less Than or Equal <=" onclick="calcValue('lessequals');">

http://stackoverflow.com/comment/40583475
has text: That's not an accurate description, particularly if you consider inline style attributes to be outside the realm of CSS. !important affects all style declarations participating in the cascade, *including* style attributes. If an inline style declaration doesn't have !important, then any !important declaration should override it. (And of course, if an inline style declaration does have !important, it'll still win.)
comment on: http://stackoverflow.com/a/25925081
type: Comment
score: 1
type: AnswerComment

alloy-ui
tags question: http://stackoverflow.com/q/25931108
tags question: http://stackoverflow.com/q/25900012
tag name: alloy-ui
type: Tag

http://stackoverflow.com/comment/40687367
type: Comment
comment on: http://stackoverflow.com/a/25983114
has text: Try this then: http://stackoverflow.com/questions/19614545/how-can-i-add-some-small-utility-functions-to-my-angularjs-application
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40688241
type: Comment
has text: first, jsfiddle will make it easier for us to answer. Second, i would do $(" ").attr("src" , ...).
type: QuestionComment
comment on: http://stackoverflow.com/q/25983622
score: 0

http://stackoverflow.com/a/25985585
upvote count: 7
type: Answer
has comment: http://stackoverflow.com/comment/40693646
downvote count: 0
score: 7
has body: The reason it's not working is because you are running your html from file. This means that the url scheme being used for your script links is file: instead of http: so your CDN links are being resolved as file://code.jquery.com/jquery-1.11.0.min.js which is clearly incorrect. Either hard-wire the scheme to http: by updating all the links to contain a scheme: &lt;link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jquery.slick/1.3.7/slick.css"/&gt; or run your code from an http context instead of from a file on your HD.
answers question: http://stackoverflow.com/q/25985501

animation
tags question: http://stackoverflow.com/q/26005185
tags question: http://stackoverflow.com/q/25898635
tags question: http://stackoverflow.com/q/25922129
type: Tag
tags question: http://stackoverflow.com/q/25944455
tags question: http://stackoverflow.com/q/25884099
tag name: animation
tags question: http://stackoverflow.com/q/25876900
tags question: http://stackoverflow.com/q/25999188
tags question: http://stackoverflow.com/q/26010738
tags question: http://stackoverflow.com/q/25943906
tags question: http://stackoverflow.com/q/26023019
tags question: http://stackoverflow.com/q/25918876
tags question: http://stackoverflow.com/q/25986064
tags question: http://stackoverflow.com/q/25942730
tags question: http://stackoverflow.com/q/25897819
tags question: http://stackoverflow.com/q/25938845
tags question: http://stackoverflow.com/q/25969321
tags question: http://stackoverflow.com/q/25918852
tags question: http://stackoverflow.com/q/25982435
tags question: http://stackoverflow.com/q/26028381

http://stackoverflow.com/comment/40685815
type: AnswerComment
has text: Sorry I did not specify my question correctly. (a) If I only use "debug" without "repl", I cannot get the definition of the variable "app" and "io", only of the variable "http". (b) Even thought I can get the definition of variable "http" using "debug" without "repl", its definition is less detailed than in the case of using "repl". By "strange", I mean I should've not got the definition of the var "http" in the case of using "debug" without "repl".
comment on: http://stackoverflow.com/a/25926523
type: Comment
score: 0

http://stackoverflow.com/comment/40616099
has text: ah ok yeah sorry I must of misunderstood the question. You might be able to get away with .on('change',someFunction) in the callback. Are you adding dynamic content each time? If you can create a [jsFiddle](http://jsfiddle.net/) it would make it a lot easier for people to help fix your problem.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25942927

http://stackoverflow.com/q/25993220
accepted answer: http://stackoverflow.com/a/26000545
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Javascript Image resizing is not working properly in IE11 but working in remaing versions(10,9,8)
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/26000545
has comment: http://stackoverflow.com/comment/40705298
has comment: http://stackoverflow.com/comment/40705138
has body: I am using wicket framework (html +java) in my application where i need to resize an image when the componenet loads.This code is working fine in IE8,9,10.But it is failing sometimes in IE11. Some times it is able to resize and but sometimes it is not able to do so.Actully it is not going into the javascript code whenver it fails. Please help me in solving the issue. &lt;img wicket:id="bigImage" onload="resize_imgs(140,140,112,112)" /&gt; Here the above image compnenet is calling following javascript code and will perfrom the image resizing. &lt;script type="text/javascript"&gt; function resize_imgs(maxht, maxwt, minht, minwt) { alert("first line"); var imgs = document.getElementsByTagName('img'); var resize_img = function (img, newht, newwt) { img.height = newht; img.width = newwt; alert("in resize image function :newht" + newht + "newwt:" + newwt); }; for (var i = 0; i &lt; imgs.length; i++) { var img = imgs[i]; if (img.height &gt; maxht || img.width &gt; maxwt) { var old_ratio = img.height / img.width; var min_ratio = minht / minwt; if (old_ratio === min_ratio) { alert("ratios equal"); resize_img(img, minht, minwt); } else { var newdim = [img.height, img.width]; newdim[0] = minht; newdim[1] = newdim[0] / old_ratio; if (newdim[1] &gt; maxwt) { newdim[1] = minwt; newdim[0] = newdim[1] * old_ratio; } alert("ratios not equal"); resize_img(img, newdim[0], newdim[1]); } } } } &lt;/script&gt; UPDATE1: In my appllication there are lot of images in a page and when we click on image or opens that page it will take first image or clicked image and will set it in top corner of the page.So whenever that component loads (img wicket:id="bigImage" onload="resize_imgs(140,140,112,112)" /> )we will call onload event.Now i have been trying with jquery.I updated it in the question.Could you please suggest me whether it is correct or not. &lt;img class="resizeImage" wicket:id="bigImage" /&gt; $(document).ready(function(){ $(".resizeImage").one("load", function() { // do stuff var max…
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/40706376
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/comment/40633178
has text: Hi andrex, please see the updated solution by Ryan, this is what I expect for the cover of the album. so basically like a quick view of the photos inside. http://jsfiddle.net/91q54zj6/1/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25953686

http://stackoverflow.com/comment/40707814
type: QuestionComment
comment on: http://stackoverflow.com/q/25994649
has text: @Swetha: Nope its not. The link you shared resize columns when there is only 1 table. Thanks for the reply though :)
score: 0
type: Comment

http://stackoverflow.com/q/25999591
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40719623
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/26003448
score: 1
has title: Bing Translate API with JavaScript and Node.js
tagged with: bing
tagged with: api
answer count: 1
downvote count: 0
tagged with: javascript
has body: I want: Translate text with help of Bing Translator service Problem: I get message: The Web Token must have a signature at the end. The incoming token did not have a signature at the end of the token. My token before encoding: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier=Subtitles&amp;http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider=https://datamarket.accesscontrol.windows.net/&amp;Audience=http://api.microsofttranslator.com&amp;ExpiresOn=1411488480&amp;Issuer=https://datamarket.accesscontrol.windows.net/&amp;HMACSHA256=DsdsshfhhegefrgradfsdffqI= Code: var request = require('request'); var querystring = require('querystring'); /** * Demo for translating a 'Hello world' from en to uk with help of Bing Translator service */ (function() { var makeTranslateRequest = function(token) { //I provided you my token at this point var opts = { text: 'Hello world', from: 'en-gb', to: 'ru' }; request.get({ url: "http://api.microsofttranslator.com/v2/Http.svc/Translate?contentType=text/plain&amp;from=" + opts.from + "&amp;to=" + opts.to + "&amp;text=" + opts.text, headers: { 'Authorization': encodeURIComponent('Bearer' + token).replace(/'/g,"%27").replace(/"/g,"%22") } },function(err,res,body) { var translated = body; console.log('translated: ' + translated); }); } /** * Get token and make translate request in a callback */ var requestOpts = querystring.stringify({ client_id: 'Subtitles', client_secret: 'X...................................s=', scope: 'http://api.microsofttranslator.com', grant_type: 'client_credentials' }); request.post({ encoding: 'utf8', url: "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13", body: requestOpts }, function(err, res, body){ var decoded = decodeURIComponent(body.replace(/\+/g, " ")) var token = JSON.parse(decoded).access_token; makeTranslateRequest(token); }); })();
favorite count: 0
has comment: http://stackoverflow.com/comment/40716883
has answer: http://stackoverflow.com/a/26003448

http://stackoverflow.com/q/25926853
answer count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40598678
type: Question
has title: Require issues with ui-bootstrap js
has body: Hi I just started angular and I am simply just trying to pass a ui.bootstrap dependency to my app but keep getting this error: I am trying to recreate the accordion example here http://angular-ui.github.io/bootstrap/ but with require. Help this noobie please!!! Uncaught Error: [$injector:modulerr] Failed to instantiate module MyApp due to: Error: [$injector:nomod] Module 'MyApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. app.js define(['angular'], function(angular){ return angular.module('MyApp', ['ui.bootstrap']); }) main.js //Configure RequireJS require.config({ paths: { angular: '../lib/angular', angularResource: '../lib/angular-resource', jquery: '../lib/jquery-1.11.1.min', uiBootstrap: '../lib/ui-bootstrap' }, //angular does not support AMD out of the box, put it in a shim shim: { 'angular': { exports: 'angular', }, 'angular-resource': ['angular'], 'uiBootstrap': [ 'angular' ] }, priority: [ 'angular' ] }); require( [ 'controllers/MainCtrl', 'controllers/AccordionDemoCtrl' ]); app.js define(['angular', 'uiBootstrap'], function(angular){ return angular.module('MyApp', ['ui.bootstrap']); }) AccordionDemoCtrl.js require(['app'], function(app){ app.controller('AccordionDemoCtrl', function($scope){ $scope.oneAtATime = true; $scope.groups = [ { title: 'Dynamic Group Header - 1', content: 'Dynamic Group Body - 1' }, { title: 'Dynamic Group Header - 2', content: 'Dynamic Group Body - 2' } ]; $scope.items = ['Item 1', 'Item 2', 'Item 3', 'HOTDOG']; $scope.addItem = function() { var newItemNo = $scope.items.length + 1; $scope.items.push('Item ' + newItemNo); }; $scope.status = { isFirstOpen: true, isFirstDisabled: false }; } ); }); html The Pillow Fort Land! Toggle last panel Enable / Disable first panel Open only one at a time This content is straight in the template. {{group.content}} The body of the accordion group grows to fit the contents Add I…
tagged with: javascript
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40587024

http://stackoverflow.com/q/25973280
tagged with: javascript
upvote count: 2
has body: I have a manipulated date using moment as moment().subtract(10, 'days'). I need this date in java Script date object.
answer count: 1
downvote count: 1
has title: How do we convert moment date in to a date object?
favorite count: 0
tagged with: momentjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25973314
accepted answer: http://stackoverflow.com/a/25973314
score: 1
type: Question

http://stackoverflow.com/comment/89966891
has text: If this is not working for you, chances are you defined the function within something else. For instance, I had my function within a `$(document).ready(function() {...})` block, and it did not work. I moved it and it worked like a charm.
type: AnswerComment
score: 43
type: Comment
comment on: http://stackoverflow.com/a/25963012

http://stackoverflow.com/q/26000305
has comment: http://stackoverflow.com/comment/40718574
tagged with: mysql
has body: I am using node.js with mysql, and I want to save pdf file which downloads from url and save it in database. I have written my code here. exports.pdf = function(req, response) { var url ="http://www.ieee.org/documents/ieeecopyrightform.pdf"; http.get(url, function(res) { console.log("sss"); var chunks = []; res.on('data', function(chunk) { console.log('start'); chunks.push(chunk); }); res.on("end", function() { console.log('downloaded'); var jsfile = new Buffer.concat(chunks); console.log('converted to base64'); response.header("Access-Control-Allow-Origin", "*"); response.header("Access-Control-Allow-Headers", "X-Requested-With"); response.header('content-type', 'application/pdf'); }); }).on("error", function() { console.log("error"); }); }
has title: How to save pdf file in mysql with node.js?
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/pdf
tagged with: node.js
has answer: http://stackoverflow.com/a/26000887
accepted answer: http://stackoverflow.com/a/26000887
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/26006931
has answer: http://stackoverflow.com/a/26007427
type: Question
tagged with: angular-ui-router
has body: I'm having trouble transitioning to another view state when I only have the full URL path. The ui-router says to use $state.transitionTo or $state.go but those require the state name. I tried to change the current URL using $location.url(path) but nothing happens. Is $location.url(path) the correct way, and something is wrong with my setup or is there another way to do it? Here is my configuration for the home page: $stateProvider.state( { name: 'home', url: '^/', templateUrl: "/home.html" } ); Here is my config for the app. cgTag.App.Config.Config = function($httpProvider, $locationProvider, $sce) { // Let CakePHP see $http requests as AJAX $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; // use HTML5 non-hash URLs $locationProvider.html5Mode(true); $locationProvider.hashPrefix('!'); // add all the CDN domains to the white list so that URLs are not blocked by Angular. var cdn = cgTag.AppData["Domain"].replace(/^www\./, "http://s*.") + "/**"; $sce.resourceUrlWhitelist(['self', cdn]); }; cgTag.Angular.config(['$httpProvider', '$locationProvider', '$sceDelegateProvider', cgTag.App.Config.Config]); If the current browser url is http://www.cgtag.com/movies then calling $location.url("/") should go to the home page, but nothing happens.
has title: ui-router change state via a URL address?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40732162
has comment: http://stackoverflow.com/comment/40731480
answer count: 2
upvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40730876
has answer: http://stackoverflow.com/a/26007892
downvote count: 0
score: 1

http://stackoverflow.com/comment/40554914
type: Comment
comment on: http://stackoverflow.com/a/25909479
has text: @Abdul: No, it will not, this is a wrong solution. It will remove `endIndexToDelete` characters after `startIndexToDelete`. The correct version is `str.substr(0, startIndexToDelete) + str.substr(endIndexToDelete+1, str.length)` @Gamemorize: yes, it should return an empty string
type: AnswerComment
score: 0

http://stackoverflow.com/q/25934559
tagged with: servlets
type: Question
answer count: 2
upvote count: 1
has title: How to send parameters from ajax to servlet
possible better answer: http://stackoverflow.com/a/25945209
tagged with: javascript
has answer: http://stackoverflow.com/a/25945209
tagged with: ajax
has body: I am trying to add 2 numbers using servlets and ajax/javascript. I am getting java.lang.NumberFormatException: and the values are null. Can i know how to pass parameters from ajax to servlet. SumWithAjaxServlet.java public class SumWithAjaxServlet extends HttpServlet { protected void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException { PrintWriter out = response.getWriter(); System.out.println("n1 : "+request.getParameter("n1")); System.out.println("n2 : "+request.getParameter("n2")); int num1 = Integer.parseInt(request.getParameter("n1")); int num2 = Integer.parseInt(request.getParameter("n2")); out.println(num1+num2+""); } } index.jsp &lt;script type="text/javascript"&gt; function calc() { var xmlHttp = new XMLHttpRequest(); var value1 = document.getElementById("n1").value; var value2 = document.getElementById("n2").value; xmlHttp.open("POST", "SumWithAjaxServlet", true); xmlHttp.send(value1 + "," + value2); var result = document.getElementById("result"); result.innerHTML = xmlHttp.responseText; } &lt;/script&gt; &lt;body&gt; &lt;form id='calcForm'&gt; &lt;table border="3"&gt; &lt;tr&gt; &lt;td&gt;Enter 1st number :&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="n1" id="n1"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Enter 2nd number :&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="n2" id="n2"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Result :&lt;/td&gt; &lt;td&gt;&lt;input type="text" value="" id="result"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="button" id="calculate" value="calculate" onclick="calc()" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/body&gt; web.xml &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app&gt; &lt;servlet&gt; &lt;servlet-name&gt;SumWithAjaxServlet&lt;/servlet-name&gt; &lt;servlet-class&gt;SumWithAjaxServlet&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;SumWithAjaxS…
favorite count: 0
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25934645
accepted answer: http://stackoverflow.com/a/25934645

http://stackoverflow.com/comment/88655924
type: Comment
has text: The docs specificall say to not nest your properties in a Segment track call: https://segment.com/academy/collecting-data/the-anatomy-of-a-track-call/ (DON’T send “nested” properties)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26027825

http://stackoverflow.com/comment/40522752
has text: Thaks for reply! When i try to print the values it say is undefined.
comment on: http://stackoverflow.com/a/25891749
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26023203
possible better answer: http://stackoverflow.com/a/26862169
type: AnsweredQuestion
tagged with: internet-explorer
score: -1
type: Question
answer count: 2
tagged with: internet-explorer-7
has answer: http://stackoverflow.com/a/26862169
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40760060
accepted answer: http://stackoverflow.com/a/26023528
has body: I have an all inclusive html file that grabs weather. When I go to open it in IE7 (to check it), I get an error saying '$' is undefined. Line: 136 Char: 9 Error: '$' is undefined. The actual line is $.ajax and it the start of my javascript function.
has title: Trying to test an HTML file in IE7. "$" is undefined error for javascript section?
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/26023528

http://stackoverflow.com/comment/40534149
type: AnswerComment
has text: So if I'm reading what you listed here correctly. `":","_","."and "-"` are the only valid special characters?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25898182

http://stackoverflow.com/q/25986733
tagged with: symfony
has comment: http://stackoverflow.com/comment/40694155
has answer: http://stackoverflow.com/a/25986779
accepted answer: http://stackoverflow.com/a/25986779
type: AnsweredQuestion
tagged with: twig
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: How to make first radio button selected by default in a list built with a for in loop using twig?
has body: I'm using twig to make a list of radio buttons with Database values. It's something like: {% for usermembershiptype in usermembershiptypes %} {{ usermembershiptype.description}} ${{ usermembershiptype.price }}/year {% endfor %} I want the first radio button to be selected by default but when using a for in loop, I'm not sure about how to refer to the first radio button. Any advices? Javascript and Jquery Solutions are also welcome.

http://stackoverflow.com/a/26003337
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25999523
has body: For moving 0 pixel use window.scroll.to(horizontal pixel , vertical pixel) as example this code will moce 1 pixel vertically: &lt;script&gt; window.onload=toBottom; function toBottom() { window.scrollTo(0, 1); } &lt;/script&gt;
downvote count: 0

http://stackoverflow.com/comment/40730595
type: QuestionComment
has text: How are you trying to retrieve the value? Show your code in "dosomething.php"
comment on: http://stackoverflow.com/q/26006905
score: 0
type: Comment

http://stackoverflow.com/q/26018756
has answer: http://stackoverflow.com/a/68374588
has answer: http://stackoverflow.com/a/51992907
has answer: http://stackoverflow.com/a/39087326
has answer: http://stackoverflow.com/a/37599450
answer count: 31
has answer: http://stackoverflow.com/a/79531977
has answer: http://stackoverflow.com/a/68365162
has answer: http://stackoverflow.com/a/59915445
has answer: http://stackoverflow.com/a/27284083
has answer: http://stackoverflow.com/a/54185368
favorite count: 0
has body: I have a problem with drop-down buttons inside tables when are responsive and scroll active because the drop-down is not visible because of overflow: auto; property. How can I fix that in order to show drop-down option of button when this is collapsed? I can use some jQuery but after I have problems with scroll left-right so I decided to find another solution. I have attached a photo to understand better. Here is a small js fiddle:
tagged with: overflow
accepted answer: http://stackoverflow.com/a/26097713
has answer: http://stackoverflow.com/a/79070376
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/39076648
tagged with: css
has answer: http://stackoverflow.com/a/44937022
has answer: http://stackoverflow.com/a/60933008
has answer: http://stackoverflow.com/a/68962110
has answer: http://stackoverflow.com/a/66624136
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/29763143
has answer: http://stackoverflow.com/a/43504726
has answer: http://stackoverflow.com/a/49068024
has answer: http://stackoverflow.com/a/43211753
has answer: http://stackoverflow.com/a/58040193
has answer: http://stackoverflow.com/a/66709445
upvote count: 130
has answer: http://stackoverflow.com/a/44291961
has answer: http://stackoverflow.com/a/34211851
has answer: http://stackoverflow.com/a/74674784
has answer: http://stackoverflow.com/a/71958367
type: Question
has answer: http://stackoverflow.com/a/60544298
has answer: http://stackoverflow.com/a/65614338
has answer: http://stackoverflow.com/a/26021872
has answer: http://stackoverflow.com/a/26097713
score: 130
has answer: http://stackoverflow.com/a/48938744
downvote count: 0
has answer: http://stackoverflow.com/a/51629426
possible better answer: http://stackoverflow.com/a/51992907
has title: Bootstrap button drop-down inside responsive table not visible because of scroll
tagged with: javascript
linked to: http://stackoverflow.com/q/70098157
tagged with: jquery

http://stackoverflow.com/q/25952050
tagged with: http://stackoverflow.com/tag/json
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/40682247
has body: Hi I have a View Which Contains a ADDBasicDetailsForm (This JSP view is rendered using spring MVC) BasicDetailView.jsp Contact No : contactMailId : SAVE Inially contact no and conatct mail ID is not shown in UI. It should be shown when i submit the form and i am using knockout for automatic UI referesh.But It is not working BasicDetails.js function BasicViewModel() { var self = this; } var viewModel = new BasicViewModel(); $(document).ready(function(){ $("#BasicDetailsform").submit(function(e) { var form = $(this); e.preventDefault(); //STOP default action var input = '{'; input += '"contactMailId":"'+$('#contactMailId').val()+'",'; input += '"contactNo":"'+$('#contactNo').val()+'"'; input += '}'; alert(input); $.ajax({ type: "POST", dataType: "json", url : "addBasicDetails", contentType: "application/json; charset=utf-8", data: input, dataFilter: function (response) { return response; }, async:false, success: (function(data, textStatus, jqXHR) { alert("ajax Success"); form.hide(); data = ko.toJSON(data); alert("JSON Data in Alert"+data ); ko.mapping.fromJSON(data, {}, self); ko.applyBindings(viewModel); }), error : function(data,textStatus,error){ alert("ajax failure"); } }); }); }); My JSON response from server { "basicDetailDTO":{ "contactNo":"86878", "contactMailId": "rahuljain@gmail.com" } } After the Form submission details are not getting reflected in my jsp view . Please let me know where is the issue in my code.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40636750
score: 0
tagged with: jsp
type: UnansweredQuestion
has title: Knockout Json Mapping Issue
answer count: 0

apache
tag name: apache
tags question: http://stackoverflow.com/q/25991194
tags question: http://stackoverflow.com/q/25981674
tags question: http://stackoverflow.com/q/25908673
tags question: http://stackoverflow.com/q/25967482
tags question: http://stackoverflow.com/q/25974028
tags question: http://stackoverflow.com/q/26015248
tags question: http://stackoverflow.com/q/26031712
type: Tag
tags question: http://stackoverflow.com/q/25965883
tags question: http://stackoverflow.com/q/25955784

http://stackoverflow.com/comment/40559459
score: 0
has text: @lexeme You can take the distribution file from github and useGitRaw to find a URL that works in jsFiddle. You can fork this [example](http://jsfiddle.net/plantface/ud7k2po1/) I made for you and try to make it work with your code.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25911548

http://stackoverflow.com/comment/40707426
comment on: http://stackoverflow.com/a/25991905
type: AnswerComment
score: 0
has text: Huh, never gave it a try with the Windows version of Safari... If you get any experience with it, let us know, please :)
type: Comment

http://stackoverflow.com/q/25946364
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
score: 0
has body: I'm not very familiar with javascript I hope you can tell me how fix this. I have the the DB table as output in json format, this is a sample: [{"ID":"11","nombre":"Sapo","direccion":"Chile 11","telefono":"4270044","apertura":"09:00:00","cerradura":"20:00:00","Hint":"sanguche","votos":"3","calificacion":"6.00","actualizacion":"2014-09-15 21:59:43"},{"ID":"12","nombre":"OtroComp","direccion":"San Martin 22","telefono":"456789","apertura":"10:00:00","cerradura":"20:00:00","Hint":"papa al horno y pollo","votos":"2","calificacion":"4.00","actualizacion":"2014-09-15 21:42:01"}] and this is my code in javascript &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" &gt; var gclaData = 'http://blablabla.com/jsonpuller.php?callback=?'; $.getJSON(gclaData,function(data){ event = 'Next Event Dates&lt;br&gt;&lt;br&gt;'; $.each(data.ID, function(j,ID ){ event += '&lt;div class="eventHolder"&gt;'; event += '&lt;div class="eventID"&gt;'+ data.ID +"&lt;/div&gt;"; event += '&lt;/div&gt;'; event +='&lt;hr&gt;'; }); $('#output').html(event); }); &lt;/script&gt; And nothing is shown in the page :-( how can I display all the ID's ?.
has title: collecting keyvalues from remote json using getJSON
tagged with: sql
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25946670

http://stackoverflow.com/a/50308631
downvote count: 0
answers question: http://stackoverflow.com/q/25949234
type: Answer
score: 1
upvote count: 1
has body: The easiest solution is to temporary replace scroll event subscription. // initial subscribe to scroll event this.$el.on("scroll", this.handleScroll); // unsubscribe initial handler and subscribe fake handler before manual scroll this.$el.off("scroll"); this.$el.on("scroll", () =&gt; { this.$el.off("scroll"); this.$el.on("scroll", this.handleScroll); }); // scroll manually this.$el.scrollTop(0); However, if scroll event doesn't happen during manual scroll (during this.$el.scrollTop(0);), then handler will not be called on first scroll event. In this case, during first event, fake event will be unsubscribed, and original one re-subscribed, but will not called.

http://stackoverflow.com/comment/40589194
comment on: http://stackoverflow.com/q/25928224
score: 0
type: Comment
type: QuestionComment
has text: Why do you need `@(Html.Raw(...))` and don't use it directly -> you are writting HTML code! How is created `item.Title` : if this is generated from server side, you can call `Html.Raw` at this moment...

http://stackoverflow.com/comment/40687049
type: QuestionComment
score: 0
has text: Ahh sorry, missed that
comment on: http://stackoverflow.com/q/25982834
type: Comment

http://stackoverflow.com/comment/40517255
type: QuestionComment
has text: the last line, is for debug purposes, and i find variable undefined. why i must assign to a variable an immediately executed function? if I do not, i have a syntax error, but the variable remains undefined.
score: 0
comment on: http://stackoverflow.com/q/25889191
type: Comment

http://stackoverflow.com/q/25942087
accepted answer: http://stackoverflow.com/a/25943058
tagged with: javascript
score: 0
has body: I want to apply the following transformation to all responses... I can do it one by one, but I have dozens.. so there must be a way to do it globally? I tried injecting it, but I get all sort of errors. transformResponse: function (data) { var wrappedResult = angular.fromJson(data); return wrappedResult.records; } I am assuming is wrapping it here.. but I can't figure it out how. bme.factory('envelopInterceptor', [function () { return { }; }]);
answer count: 1
has comment: http://stackoverflow.com/comment/40616125
favorite count: 0
tagged with: angularjs
has title: How to apply transformation to all methods in Angular?
tagged with: ngresource
has answer: http://stackoverflow.com/a/25943058
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/a/26023000
accepted answer of: http://stackoverflow.com/q/26022458
answers question: http://stackoverflow.com/q/26022458
score: 4
upvote count: 4
has body: If I cache a promise, do it cache the result A promise can only have a single result (in case it doesn't get rejected). It therefore can also be only resolved only once - and must not change its state thereafter. In fact, the promise spec states When fulfilled, a promise: must not transition to any other state. must have a value, which must not change. or each time ask a new one? No. getTokenPromise() is the call that asks for the token, and it is executed only once. cachedPromise only represents the result, not an action. The action itself would have been executed even if you didn't add a callback via .then().
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40570826
type: AnswerComment
type: Comment
score: 1
has text: They are purposefully using an array. The question isn't about how to do it differently. It's very possible with an array, as Paulpro has shown. I'm not saying this is a bad alternative, but it doesn't really answer the question. And if they are going to use an object literal, it would make more sense to use `var params = { on: function () { .... } }; $("").on(params);`
comment on: http://stackoverflow.com/a/25918219

http://stackoverflow.com/comment/40594361
has text: I'm afraid you didn't get *me*. I was just pointing out that the link in your example is most probably wrong.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25931155

http://stackoverflow.com/comment/40800918
has text: Sorry, it was not my intention to put alot of js for debug. This js is already working in another aplication, and i had to use it in my mobile aplication. Im trying to debug using console.log and i will put whats is happing after this, ok? Thanks!
comment on: http://stackoverflow.com/q/26022831
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40710957
type: AnswerComment
comment on: http://stackoverflow.com/a/25992943
score: 0
type: Comment
has text: You can't call `addEventListener` on an array.

http://stackoverflow.com/comment/40588376
type: AnswerComment
type: Comment
score: 0
has text: I tried the code and it needs slight changes. Please take a look above in the edited part.
comment on: http://stackoverflow.com/a/25910306

http://stackoverflow.com/q/26009013
score: 0
has body: I want to create a Javascript Application that talks to a jenkins server hosted (say http://myjenkinsserver.com/jenkins. This jenkins server needs a user to be authenticated to run any job. The authentication needed is BASIC Http. I have my username: johnsmith and password: jenkinsjob. I also have the API token. My doubt is how do i authenticate and store any token somewhere to use it to start/stop builds etc. Thanks in advance. P.S: Reference - https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients
has answer: http://stackoverflow.com/a/40388542
tagged with: javascript
type: UnansweredQuestion
tagged with: basic-authentication
type: Question
answer count: 2
has title: How to run job on jenkins that need authentication using Rest API?
has answer: http://stackoverflow.com/a/26009068

http://stackoverflow.com/comment/40574935
score: 0
has text: the cycle must start at the first touch, not movement
type: AnswerComment
comment on: http://stackoverflow.com/a/25920129
type: Comment

http://stackoverflow.com/comment/40684059
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25979918
has text: It looks like you use the address that the user entered , get the lat & long and send it to the server , from there hit that end point that you have in the post using the WebServices. You got it , just make sure you make the call to the TimeZone service from your server

http://stackoverflow.com/q/25991825
accepted answer: http://stackoverflow.com/a/26016286
type: AnsweredQuestion
downvote count: 0
type: Question
score: 5
tagged with: javascript
answer count: 1
tagged with: dagre-d3
favorite count: 0
has body: I have created a trivial Dagre example to dynamically add nodes upon clicking existing nodes in the graph. However, the rerendering creates a different relative ordering within the same layer. Is there anyway around this problem? Fiddle is available here: http://jsfiddle.net/gke2dann/ Thanks in advance. // Create a new directed graph var g = new dagreD3.Digraph(); /* populate graph... see fiddle */ var renderer = new dagreD3.Renderer(); var layout = dagre.layout(); var render = function() { layout.run(g); renderer.run(g, d3.select("svg g")); }; render(); svg.onclick = function(evt) { var nodeId = evt.target.__data__; for (var i = 0; i &lt;= Math.random() * 10; ++i) { var newNodeId = nodeId + "_sub" + i; g.addNode(newNodeId, { label: "Bla" }); g.addEdge(null, newNodeId, nodeId); } render(); }; PS: Also, is there anyway to make the graph update use those fancy d3 transitions?
upvote count: 5
tagged with: graph-drawing
tagged with: d3.js
has title: Maintaining relative ordering when adding nodes to a layered graph in Dagre
has answer: http://stackoverflow.com/a/26016286

http://stackoverflow.com/q/26018564
has comment: http://stackoverflow.com/comment/40751850
type: Question
has answer: http://stackoverflow.com/a/26024433
tagged with: javascript
tagged with: jquery
score: 0
tagged with: onresize
answer count: 1
has body: I'm using Jquery to keep my aspect ratio when re-sizing. On small screens i want to use this script on a different class. It all seems to work just fine on first load. But when i resize my window from big >768 to small &lt; 767 the script wont work unless i reload. Strangely when i load the site in a small window &lt;767 and resize it to big >768 the script does work and keeps working when re-sizing. Any idea how to resolve this? if ($(window).width() &gt; 768) { /* square featured-column1 box aanpassing */ equalheight = function(container) { var currentTallest = 0, currentRowStart = 0, rowDivs = new Array(), $el, topPosition = 0; $(container).each(function() { $el = $(this); $($el).height('auto') topPostion = $el.position().top; if (currentRowStart != topPostion) { for (currentDiv = 0; currentDiv &lt; rowDivs.length; currentDiv++) { rowDivs[currentDiv].height(currentTallest); } rowDivs.length = 0; // empty the array currentRowStart = topPostion; currentTallest = $el.height(); rowDivs.push($el); } else { rowDivs.push($el); currentTallest = (currentTallest &lt; $el.height()) ? ($el.height()) : (currentTallest); } for (currentDiv = 0; currentDiv &lt; rowDivs.length; currentDiv++) { rowDivs[currentDiv].height(currentTallest); } }); } $(window).load(function() { equalheight('.featured-column'); }); $(window).resize(function() { equalheight('.featured-column'); }); /* Aspect ratio box (responsive rechthoek) aanpassing */ $(document).ready(function() { aspectResize(); $(window).resize(aspectResize); }); aspectResize = function() { var $aspect = $('div.up-to-date-bar'); var width = $aspect.width(); $aspect.height(width / 3 * 1); } } /* Aspect ratio box (responsive rechthoek) aanpassing up-to-date-column*/ if ($(window).width() &lt; 767) { $(document).ready(function() { aspectResize(); $(window).resize(aspectResize); }); aspectResize = function() { var $aspect = $('div.up-to-date-column'); var width = $aspect.width(); $aspect.height(width / 1 * 1); } }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40762672
linked to: http://stackoverflow.com/q/9828831
tagged with: window-resize
tagged with: responsive-design
has title: How do run a script on window resize?

http://stackoverflow.com/comment/40683066
type: Comment
has text: how about a transition though? other than that it's great! aaahh, i've sorted it
type: AnswerComment
comment on: http://stackoverflow.com/a/25980096
score: 0

http://stackoverflow.com/comment/40775265
has text: Where do you expect `System` to come from? What is it supposed to be?
score: 0
comment on: http://stackoverflow.com/q/26031546
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25914520
score: 0
answers question: http://stackoverflow.com/q/25914340
type: Answer
has comment: http://stackoverflow.com/comment/40563729
has body: Not sure what you want to ask. In your script you are using Jquery. If your want to get any Id using javascript then you can use document.getElementById("para") and if you want to get any object using jquery then it's simple just use $ sign like $("#para") now you can do any operation on these java script object what you want. If you want to return any value through function then it's also simple function getValue() { var item=document.getELementById("para"); return item; }
has comment: http://stackoverflow.com/comment/40563598

http://stackoverflow.com/comment/40541447
type: AnswerComment
has text: please add more codes about your element here and let me get familiar with your structure
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25902144

http://stackoverflow.com/comment/40749748
score: 0
type: Comment
has text: @Juhana Initialized and still get that error.
type: QuestionComment
comment on: http://stackoverflow.com/q/26016562

http://stackoverflow.com/q/25897528
favorite count: 0
has answer: http://stackoverflow.com/a/25897529
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8073908
has body: The scenario I'm going to describe is about Excel, but you can spot the same problem in all Office tools. Scenario: In my default browser (NOT Internet Explorer) I'm logged in my own specific website, let's call it www.mypersonalwebsite.com I have an Excel folder with the A1 cell containing a URL pointing to http://www.mypersonalwebsite.com/url/visible/only/to/loggedin/users When I click on the URL in A1 cell: my default browser is trying to open this URL the website is refusing to serve the page because the request is coming from a non logged in user So that's the problem: why is the browser complaining about the user session when I'm already logged in? And how can I solve it?
upvote count: 1
linked to: http://stackoverflow.com/q/5411538
tagged with: nginx
score: 1
type: Question
has title: Is there a solution to correctly open user authenticated URL from Microsoft Office programs?
linked to: http://stackoverflow.com/q/901115
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: ms-access

http://stackoverflow.com/comment/40634509
type: Comment
has text: Very cool. Thanks. I need to try it on my actual content before I mark it as the answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/25954263
score: 0

http://stackoverflow.com/comment/40759680
score: 0
type: Comment
type: QuestionComment
has text: Agreed, the phone never fails, and I'm not worried about that so much because 8/10 times people using google maps are not on a wifi network. The PC deal is really baffling me though, i'm researching the hell out of it, and it sucks because it's taken up the bulk of my 8 hour day today :/
comment on: http://stackoverflow.com/q/26022362

http://stackoverflow.com/q/26032132
has title: Get server-side date and add class using Jquery
has comment: http://stackoverflow.com/comment/40776347
score: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: class
has comment: http://stackoverflow.com/comment/40776281
answer count: 0
tagged with: jquery
has body: Please bear with me. So I have an html list that goes like Jan - Mar 2014 Apr - May 2014 Jul - Sep 2014 Oct - Dec 2014 I need to get server-side date (do I need php to do this or just jquery), and add the class "active" to the appropriate &lt;a&gt; tag. So if date is September, I need to add class to the &lt;a&gt; tag that says jul - sep 2014. How can I do all this using jquery or with php? do I need to use ids to find which &lt;a&gt; tag to add the class to? Please help! Thank you. see my jsfiddle http://jsfiddle.net/wolverene/wrj65opk/7/
tagged with: server-side
type: Question

http://stackoverflow.com/q/25892298
tagged with: parsing
has comment: http://stackoverflow.com/comment/40523743
has title: Why is moment.js allowing date with one digit year when using strict parsing?
upvote count: 3
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40529687
has body: I am using moment.js to parse a date. http://momentjs.com/docs/#/parsing/string-format/ This is to validate and convert the date to a format required by my database. In my testing I encountered this input date '6-4-3' which should not be valid with the given format. moment('6-4-3','YYYY-MM-DD',true).isValid(); //returns true The resulting date in the moment object is "Mon Apr 03 0006 ...". When I call isValid, it returns true. I think it should consider this date invalid because it has too few digits in the input for each part of the format string. I added a regex.test in my code to ensure that the dates have the right number of digits, but I think this should be handled differently in moment.js when strict is true. Is there something I'm missing here? Isn't this the point of strict parsing? Or is there a reason why this is the intended behavior?
tagged with: date
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25895952
favorite count: 0
tagged with: validating
accepted answer: http://stackoverflow.com/a/25895952
tagged with: momentjs

http://stackoverflow.com/comment/40521488
has text: thank you! But how can I do with EditorFor method ? also I do not catch time = 'text' to what it corresponds ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25887680
score: 0
type: Comment

http://stackoverflow.com/comment/40519260
type: Comment
comment on: http://stackoverflow.com/a/25890270
has text: If you look at the example and do a hard refresh (shift + f5) to grab the new CSS you can see the columns in between all squished up which isn't good usability/readability! Good start though!
score: 0
type: AnswerComment

http://stackoverflow.com/a/26023572
score: 1
upvote count: 1
has body: A functional approach that will take the object properties from the passed in array, instead of hard-coding them, might look something like this inside the for loop to populate an array named 'rows' with property names coming from the values of an array named 'cols': cols.forEach(function(cv, ci, ca) { rows[ri][cv] = ri; }); See the snippet for a full example. Note that, in this example, I'm just shoving the current index of "rows" into the object as the property value. var columns = ['distance', 'times', 'acceleration']; function generateData(numRows, cols) { rows = new Array(numRows); for(ri=0; ri &lt; rows.length; ri++) { rows[ri] = { id: ri }; cols.forEach(function(cv, ci, ca) { rows[ri][cv] = ri; }); } return rows; } data = generateData(5, columns); console.log(data);
answers question: http://stackoverflow.com/q/26023254
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40604009
score: 1
comment on: http://stackoverflow.com/q/25936593
type: Comment
type: QuestionComment
has text: Did you try using `.style('stroke-width', ...)` instead?

http://stackoverflow.com/a/25938625
answers question: http://stackoverflow.com/q/25938593
downvote count: 0
has comment: http://stackoverflow.com/comment/40607710
type: Answer
has comment: http://stackoverflow.com/comment/40607679
score: 1
upvote count: 1
has body: It prevents you from creating a global variable.

http://stackoverflow.com/a/25980939
has comment: http://stackoverflow.com/comment/40684596
has comment: http://stackoverflow.com/comment/40683701
has comment: http://stackoverflow.com/comment/40683812
has comment: http://stackoverflow.com/comment/40684390
has comment: http://stackoverflow.com/comment/40684101
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25980693
has comment: http://stackoverflow.com/comment/40685116
score: 0
has comment: http://stackoverflow.com/comment/40683816
type: Answer
has body: See if this is what you want Multiply Divide Let me know if you need any further explaination
answers question: http://stackoverflow.com/q/25980693

http://stackoverflow.com/a/26000324
score: 2
accepted answer of: http://stackoverflow.com/q/26000292
upvote count: 2
answers question: http://stackoverflow.com/q/26000292
has body: You need to concatenate the variable into the string here. $(':input[id^='+st+']').val($x(ti).value); ^^^^^^
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25920553
accepted answer: http://stackoverflow.com/a/25921589
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25921589
has title: Animate accordion height not working
has answer: http://stackoverflow.com/a/25920882
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25920724
has answer: http://stackoverflow.com/a/25920724
score: 0
answer count: 3
has body: I have an accordion with hidden content that is set to height:0, but when I click on the toggle-firer, I want it to animate to height:auto, but nothing seems to be happening. This cannot rely on any modern solutions either, such as CSS3. http://codepen.io/anon/pen/uaytq HTML: &lt;div class="collapse-group"&gt; &lt;div class="collapse-header"&gt; &lt;h1&gt;Some Title&lt;/h1&gt; &lt;/div&gt; &lt;div class="collapse-toggle"&gt; &lt;div class="icon"&gt;&amp;plus;&lt;/div&gt; &lt;/div&gt; &lt;div class="collapse-content"&gt; Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! Check out all this filler content! &lt;/div&gt; &lt;/div&gt; jQuery: $('.collapse-toggle').click(function () { var that = $(this).find('.collapse-content'); that.animate({'height':'auto'}, 500); }); CSS: .wrap { background:#999999; margin:0 auto; width:500px; } .collapse-toggle { background: transparent; position: absolute; left: 50%; margin-left: -30px; bottom: -60px; cursor: pointer; } .collapse-toggle .icon { width: 60px; height: 60px; font-size: 80px; line-height: 60px; text-align: center; vertical-align: middle; position: relative; margin: 0 auto; color: #f79727; background: white; z-index: 9; } .collapse-group { *zoom: 1; position: relative; padding-top: 2em; } .collapse-group:before, .collapse-group:after { content: ""; display: table; } .collapse-group:after { clear: both; } .collapse-group.we-create { padding-top: 0; } .collapse-group.orange { background: #f79727; } .collapse-group.orange .section-headline, .collapse-group.orange .section-tagline { color: white…
tagged with: jquery

http://stackoverflow.com/comment/40644593
type: Comment
comment on: http://stackoverflow.com/a/25960078
score: 0
type: AnswerComment
has text: Saved my work. Thank you so much, I thought there was something wrong with `.get(0).files[0]` ,but since my knowledge of jQuery is very limited I didn't know how to act.

http://stackoverflow.com/comment/40600815
type: Comment
type: QuestionComment
has text: possible duplicate of [How to Change The Selected Option of HTML Select Element?](http://stackoverflow.com/questions/7373058/how-to-change-the-selected-option-of-html-select-element)
score: 0
comment on: http://stackoverflow.com/q/25934989

http://stackoverflow.com/comment/40565144
type: Comment
type: QuestionComment
has text: It has browser compatible issues
comment on: http://stackoverflow.com/q/25915339
score: 1

http://stackoverflow.com/a/25941114
score: 0
type: Answer
has body: Try function CopyToClipboard() { window.prompt("Copy to clipboard: Ctrl+C, Enter", '@Model.FirstName'); } The javascript code has to be inside the html receiving the model.
answers question: http://stackoverflow.com/q/25940349

http://stackoverflow.com/q/25955540
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40636421
score: 6
has body: This question may be duplicate of any. But, after lot of try I couldn't find the proper solution for this. This is my code @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") &lt;script&gt; $(document).ready(function () { var els = document.querySelectorAll('body &gt; *'); els[els.length - 1].remove(); //getting error here }) &lt;/script&gt; I don't know why my application is showing error in browser console like TypeError: els[els.length - 1].remove() is not a function When i can run same function in browser console window and it works. but, when i place my code in the page it shows me error like above. I have also tried to call .removeNode(boo) method but, it was also not working. Actually when i try to write ele[].remove() in the code the intellisence doesn't suggest me that function.
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25955553
accepted answer: http://stackoverflow.com/a/25955553
has title: .remove is not a function
type: Question
has comment: http://stackoverflow.com/comment/40636430
tagged with: asp.net-mvc
upvote count: 6

http://stackoverflow.com/comment/40623086
comment on: http://stackoverflow.com/q/25936371
score: 0
has text: It appears that page-break-before only applies when you're printing, not creating PDFs.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40609776
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25939318
has text: I bet it is but I don't know how.

http://stackoverflow.com/comment/40518281
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25889622
type: Comment
has text: No. Discuss the problem with your payment gateway provider. Find out what their actual policy for framing is.

http://stackoverflow.com/a/78728926
score: 0
type: Answer
has body: Instead of direct assing after update, we should use spread operator in solution section const user = { userList: [], subject: {} } Error: user.userList = [ ...user.userList, {name: 'john', id: 1} ] updateUser(user) Solution: updateUser({...user, userList: [ ...user.userList, {name: 'john', id: 1} ]})
answers question: http://stackoverflow.com/q/25937369

http://stackoverflow.com/comment/40522803
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25891556
has text: In a new window please
score: 0

http://stackoverflow.com/comment/40553404
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25908861
score: 2
has text: `overflow:hidden` is not the same as hidden element.

http://stackoverflow.com/comment/40561809
score: 0
type: Comment
has text: With correction in the form of a closing parenthesis in firxt part of regex it works perfect, thanks! :)
comment on: http://stackoverflow.com/a/25913388
type: AnswerComment

http://stackoverflow.com/comment/40519264
comment on: http://stackoverflow.com/q/25890107
has text: @BOSS: indeed but when I pass nothing to the constructor, "message" is no more defined in the prototype. That's this behavior I would like to understand and reproduce.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40583753
score: 0
type: AnswerComment
has text: @Sjef92 check my revision again, should delete the whole row instead of just the button instead
type: Comment
comment on: http://stackoverflow.com/a/25924991

http://stackoverflow.com/comment/40522135
has text: yes..it's not a POJO, if it is a POJO, I would have used JSP to construct the HTML tags dynamically. I am not so comfortable with json, I will try that approach.is storing the json object retrieved from AJAX call into a Global javascript variable and reusing it in different functions a good practice ?
type: Comment
comment on: http://stackoverflow.com/a/25891612
score: 0
type: AnswerComment

http://stackoverflow.com/q/25913014
score: 1
has answer: http://stackoverflow.com/a/26428720
favorite count: 0
tagged with: angularjs
has title: Cross domain google doc request for IE9
tagged with: google-docs-api
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26428720
upvote count: 1
type: Question
tagged with: internet-explorer-9
tagged with: javascript
tagged with: cross-domain
has body: I am trying to retrieve data from a google doc spreadsheet using Angular's $http. Everything generally works fine but there is a cross domain issue with IE9 and I get an 'Access is denied' Error. Here is the code for my angular service (obviously switching the docID in the google doc url): app.factory('Messages', function ($http, $q) { var googleDoc = 'https://spreadsheets.google.com/feeds/list/*docID*/od6/public/values?alt=json'; var Messages = { all: function() { var defered = $q.defer(); var messages = []; $http.get(googleDoc).success(function(data) { for (var i = 0; i &lt; data.feed.entry.length; i++) { messages[i] = { 'name' : data.feed.entry[i].gsx$name.$t } }; defered.resolve(messages); }); return defered.promise; } }; return Messages; }); I've tried various suggested techniques to get this to work on IE9, but no success so far. Any ideas greatly appreciated.
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25894961
upvote count: 3
type: Answer
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/25894879
has body: This can be achieved with ease using just css #circle:hover { width:100% } #circle { width: 100px; transition:3s; }

http://stackoverflow.com/q/25980414
tagged with: javascript
has body: Consider the following code: function someObj() { this.someFunction = function() { console.log('someFunction'); } } someObj.prototype.foo = function() { console.log('foo'); } I can call both like so: var test = new someObj(); test.someFunction(); // Logs 'someFunction' test.foo(); // Logs 'foo' How would variable scope be affected here? Is there an advantage / disadvantage to each approach?
linked to: http://stackoverflow.com/q/310870
tagged with: function
score: 1
duplicate of: http://stackoverflow.com/q/310870
favorite count: 0
has comment: http://stackoverflow.com/comment/40682511
type: UnansweredQuestion
has title: What is the difference between these two object methods in Javascript?
linked to: http://stackoverflow.com/q/10704938
has comment: http://stackoverflow.com/comment/40682197
answer count: 0
upvote count: 2
duplicate of: http://stackoverflow.com/q/10704938
downvote count: 1
type: Question
tagged with: object
linked to: http://stackoverflow.com/q/572897
has comment: http://stackoverflow.com/comment/40682418

http://stackoverflow.com/a/35473803
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25969620
has body: I use xampp as my local server, so I will try to explain in respect of that. If you are using some other local server check for that on google.com. Put your files in a folder named (jscalls) in (htdocs) folder of xampp installed on your local machine. Then call localhost/jscalls/nameOfFile.html Now when you will click on the button it will get the content in the specified id.

http://stackoverflow.com/comment/40780454
has text: i did exactly as u said. i did not replace any value with anything
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26032744
type: Comment

http://stackoverflow.com/a/25959558
answers question: http://stackoverflow.com/q/25959525
has comment: http://stackoverflow.com/comment/40643613
score: 0
type: Answer
has body: Try to set a class for all the elements you want to count. var counter = 0; $('.someClass').on("click", function(){ counter++; $(this).find('.tag').html(counter); });

http://stackoverflow.com/q/25942588
has comment: http://stackoverflow.com/comment/40750253
answer count: 0
has comment: http://stackoverflow.com/comment/40749820
has comment: http://stackoverflow.com/comment/40615467
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40750771
type: Question
tagged with: selection
tagged with: automation
has comment: http://stackoverflow.com/comment/40749349
tagged with: javascript
has comment: http://stackoverflow.com/comment/40616132
has body: I'm dealing with a very annoying website where you want to upload lots of files there, but you can only do it one file at a time (one per tab). I'm developing a Google Chrome extension and I would like to automatize the process of manually opening 40+ tabs and selecting one file for each tab. The part where I open tabs is easy and it already works, but automatically selecting local files is a problem. I'm well aware that chrome doesn't allow to set value for tags where and I'm looking for a workaround. I'm looking for the easiest/less effort solution to circumvent it. I was even thinking about simulating clicks outside of my web browser instead of trying to fix it from within Javascript (there are os level script languages for that, but I'm not sure which one would be fastest to learn or which one would need the least number of code lines for my task) or altering the dialog to multiselection (who knows, maybe the website will surprise me and work anyway). Does anyone know an unconventional but easy solution? Edit: I tried setting the input to multiselection with upladbtn.setAttribute("multiple", "true"); It didn't work. The website must hve interpreted both files as one single file stream because it displayed a file size error after uploading.
score: 0
has comment: http://stackoverflow.com/comment/40749960
tagged with: file-upload
has title: File select dialog - javascript security issue: easiest(!) way to automatize file selection in Chrome. Very creative solutions may do as well
linked to: http://stackoverflow.com/q/13313026
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40749410

http://stackoverflow.com/comment/40559974
score: 0
comment on: http://stackoverflow.com/q/25912015
type: QuestionComment
has text: @Bergi I can't see how would I pass my data parameter.
type: Comment

http://stackoverflow.com/comment/40704627
type: Comment
has text: hey am really happy Apul Gupta.... from that day to today i was searching the new plugin, i tried tried and loss the hope. thanks. am feeling happy. i lost the hope on stackoverflow, and left it aside, but i opened it for once and i got the solution.. thanks sooooooo much.
comment on: http://stackoverflow.com/a/25940408
score: 0
type: AnswerComment

http://stackoverflow.com/q/26032368
has title: How to avoid empty folders being copied in gulp
accepted answer: http://stackoverflow.com/a/26032889
type: Question
has answer: http://stackoverflow.com/a/28621239
tagged with: javascript
has answer: http://stackoverflow.com/a/26032889
score: 0
answer count: 2
tagged with: gulp
possible better answer: http://stackoverflow.com/a/28621239
type: AnsweredQuestion
has body: // current setup: public css navigation right-sidebar.css left-sidebar.css main header.css foot.css main.css extra grid.css normalize.css // trying to achieve: public ... dist css navigation right-sidebar.css left-sidebar.css main header.css footer.css main.css I'm trying to avoid the css/extra directory from copying to dist. I've tried: var src = ['public/css/*', '!public/css/extra/**'] return gulp.src( src ) .pipe( gulp.dest( 'dist/css/' ) ) This successfully copies all the required folders and their files, but it also copies an empty extra directory in dist to give dist/extra/.

http://stackoverflow.com/comment/40695919
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25987721
type: Comment
has text: @Satpal, thanks ... I have updated my answer as per your suggestion. But would like to know why to use `.prop()` as it introduced in version 1.6 is the only reason or is there some other reason to follow it? If you can share a link or post some details about it, would be helpful to me. Thanks :)

http://stackoverflow.com/comment/40678975
comment on: http://stackoverflow.com/a/25977358
type: AnswerComment
has text: Ok I edited my answer in light of the additional info you provided. When you change the value of the "Client id" input, you'll see the `$scope.filter['campaign.id']` array update to include only the filtered campaigns. I did not need to change your filter code to do this - it's all done in the controller & view.
type: Comment
score: 0

http://stackoverflow.com/q/25901944
tagged with: cordova
has comment: http://stackoverflow.com/comment/40541128
type: UnansweredQuestion
tagged with: unit-testing
answer count: 0
has comment: http://stackoverflow.com/comment/40541118
has title: Cordova - change index page if in debug for qunit js
type: Question
tagged with: javascript
score: 0
has body: Does anyone know how to create a hook to copy a new index.html to a project after prepare is run so that I could replace the apps normal startup page to be a qunit js testing page? I had a look at http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/ and what she does with stage and prod to change api access and others is really cool!! but I have 0 idea how to tell cordova via cli that it needs to run stage prod or my new qunit setup. she doesn't include her commands to get it running like that. Also, if anybody knows any other good getting started with hooks in cordova articles or tutorials that would be really appreciated. Thanks.

http://stackoverflow.com/a/25986355
score: 0
type: Answer
has body: is this what you looking for?
answers question: http://stackoverflow.com/q/25986193

http://stackoverflow.com/comment/40742627
type: Comment
score: 0
comment on: http://stackoverflow.com/q/26013412
has text: @Jaydee: Yes, i know that i have an option to populate only selective data based upon the value selected in dropdown. What I wish to know is that what is the better approach. To load data at once or to have multiple hits to server (Ajax) and load data there.
type: QuestionComment

web
tags question: http://stackoverflow.com/q/25946494
tags question: http://stackoverflow.com/q/25941262
tags question: http://stackoverflow.com/q/25976993
tags question: http://stackoverflow.com/q/25972758
tags question: http://stackoverflow.com/q/25937911
tags question: http://stackoverflow.com/q/25960821
tags question: http://stackoverflow.com/q/25904271
tags question: http://stackoverflow.com/q/25957050
type: Tag
tags question: http://stackoverflow.com/q/26027947
tags question: http://stackoverflow.com/q/25895014
tags question: http://stackoverflow.com/q/25975100
tags question: http://stackoverflow.com/q/25951416
tags question: http://stackoverflow.com/q/25927957
tags question: http://stackoverflow.com/q/26029152
tags question: http://stackoverflow.com/q/25902320
tags question: http://stackoverflow.com/q/25889458
tags question: http://stackoverflow.com/q/25874709
tags question: http://stackoverflow.com/q/25899640
tags question: http://stackoverflow.com/q/26027861
tags question: http://stackoverflow.com/q/26010365
tag name: web
tags question: http://stackoverflow.com/q/26006905
tags question: http://stackoverflow.com/q/25968305
tags question: http://stackoverflow.com/q/25957786
tags question: http://stackoverflow.com/q/26020402
tags question: http://stackoverflow.com/q/25965899
tags question: http://stackoverflow.com/q/25881991

http://stackoverflow.com/a/26007477
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/26006736
upvote count: 2
has comment: http://stackoverflow.com/comment/40732207
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26006736
has comment: http://stackoverflow.com/comment/40732353
has body: Your second then call seems incorrect, after //Call Promise 2 &amp; Store details Client-Side using .then() then takes up-to 3 parameters then(successCallback, errorCallback, notifyCallback) you are passing it: deviceDB.RegDevice($scope.alias, $scope.apiKey, $scope.Device) which is evaluated immediately and the promise returned is passed to the function then as the success function, your success function is passed as the errorCallback and your fail function is passed as the notifyCallback. I would try the following Promise1.then(function(data) { console.log(' Registration Server-Side successfully'); $scope.apiKey = data.apiKey; term.echo(data.apiKey); return deviceDB.RegDevice($scope.alias, $scope.apiKey, $scope.Device) }, function(e) { console.log('Registration Failed'); term.echo(e.msg); return e; }).then(function(d) {/*all good*/}, function(e) {/* all bad */} Notice the call to RegDevice is now within a function block, and a promise is returned from the then block you want to chain from.
type: Answer

http://stackoverflow.com/comment/40609150
has text: Generally - no, you shouldn't change the code you are testing, it should work the way it would like if it was the real user that clicked the radio button.
type: AnswerComment
comment on: http://stackoverflow.com/a/25934972
score: 0
type: Comment

http://stackoverflow.com/comment/40509969
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25884195
score: 0
has text: @RickardStaaf, +1 for being faster than me :)

http://stackoverflow.com/comment/40523954
type: Comment
has text: I have used razor like that in the past. what is the issue you have with it? If you aren't seeing data I would guess it has to do with using Viewbag instead of the model
comment on: http://stackoverflow.com/q/25892629
score: 0
type: QuestionComment

http://stackoverflow.com/q/25921718
has comment: http://stackoverflow.com/comment/40579990
score: 1
has title: AngularJS returning placetext html
type: Question
has body: I'm writing a search script to return a bunch of HTML, but it doesn't seem to be working, I'm trying to use $sce. function SearchCtrl($scope, $http, $sce) { $scope.url = 'search.php'; // The url of our search // The function that will be executed on button click (ng-click="search()") $scope.search = function() { // Create the http post request // the data holds the keywords // The request is a JSON request. $http.post($scope.url, { "data" : $scope.keywords}).success(function(data, status) { $scope.status = status; $scope.data = data; $scope.result = data; $scope.trustedExample = $sce.trustAsHtml(data); // Show result from server in our &lt;pre&gt;&lt;/pre&gt; element }) }; } Have I done it incorrectly? Link to the test site is here: http://elliottcoe.com/search/
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/40666500
has text: This works but it throws `"Uncaught SyntaxError: Unexpected token )"`. Why this works and the others solutions don't?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25971238
type: AnswerComment

http://stackoverflow.com/a/25995522
downvote count: 0
has comment: http://stackoverflow.com/comment/40853208
type: Answer
has body: You did not initialize the "left" and "bottom" css properties. So, on first click, these need to be calculated, and that's where you get the "blink". My proposal is that you abandon the idea of "bottom" and use "top". Much more logical. Then initialize the "top" and "left" css properties so that you avoid the "blink". Here is a working sample: Insert title here animate demo « » up down Now, when it comes about limiting the values - laziness is a virtue of the educated :) Here is a nice example of using the "bind" feature of functions.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25995303
has comment: http://stackoverflow.com/comment/40814576
has comment: http://stackoverflow.com/comment/40964417

http://stackoverflow.com/q/26001847
answer count: 1
tagged with: javascript
has title: Call function once on day change
has comment: http://stackoverflow.com/comment/40722733
accepted answer: http://stackoverflow.com/a/26002895
favorite count: 0
has comment: http://stackoverflow.com/comment/40721575
has comment: http://stackoverflow.com/comment/40721540
has comment: http://stackoverflow.com/comment/40722044
has comment: http://stackoverflow.com/comment/40722241
has comment: http://stackoverflow.com/comment/40721799
has comment: http://stackoverflow.com/comment/40721273
score: 2
tagged with: angularjs
upvote count: 3
has comment: http://stackoverflow.com/comment/40721675
has body: I have a really straightforward problem that I can't seem to figure out. I'm using AngularJS and Firebase as a backend. Basically, I have a function that I want to run once, every day, at midnight in order to do a value reset (set some object properties to false, etc.). The function works fine when I run it manually and works exactly as intended. However, I can't seem to get it to run automatically on day change. The function I want to run at midnight, once each day is Fed.newDay(). It's injected through the Fed factory to my Dte factory - which keeps an updated object with the days of the week, month etc. Currently, in my Dte factory I have the following object: var date = new Date(); var Dte = { currentDate: function() { ref.update({date: date.getDate()}); ref.on('child_changed', function(snapshot) { console.log('Dte registered new Day'); Fed.newDay(); }); return date.getDate(); }, } The goal here is to run Fed.newDay() once each time the date changes. I have stored the date in Firebase as follows: harrison -> date -> date: 23 My assumption was that each time the date was updated on the server, the function would run based on Firebase's ref.on('child_changed')... method. When I .set the value manually, the function runs as expected, but will not run overnight on the automatic day change. I've also tried using setInterval and setTimeout to run the function once every 86400000 milliseconds (1 day). I don't think these run when the application isn't being run, though. There has to be something I'm overlooking here. Thanks for your time and help. Update: Just to clarify. This is what I'm trying to do: I have a two checkboxes that mark completion of a task that needs to be done by a group of people, the users. These two tasks only need to be done once, by any and only one user, once per day. After that day is over, I want to clear their values (set them to false) so that the same person OR a different person can check either of the two boxes. I don't have a server runn…
downvote count: 1
tagged with: firebase
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26002895
has comment: http://stackoverflow.com/comment/40721403
has comment: http://stackoverflow.com/comment/40721176
has comment: http://stackoverflow.com/comment/40721327
has comment: http://stackoverflow.com/comment/40722959
has comment: http://stackoverflow.com/comment/40722155
type: Question
has comment: http://stackoverflow.com/comment/40721733

http://stackoverflow.com/comment/40516856
type: Comment
type: QuestionComment
has text: try uploading it to your host, and run from there. certain javascript features won't work on localhost.
score: 0
comment on: http://stackoverflow.com/q/25888921

http://stackoverflow.com/q/26000146
answer count: 1
has comment: http://stackoverflow.com/comment/40718178
has title: Javascript function to convert milliseconds yields strange results
has body: I'm creating my own custom TimeObject class for a tiny web app I'm making. Here I define a function to taken a valid-range, integer number of milliseconds, in order to instantiate a TimeObject as follows: TimeObject.prototype.millisecondsToTime = function(mm) { function valid() { if(parseInt(mm,10) &gt;= 0 &amp;&amp; parseInt(mm,10) &lt;= 359999999) return true; } if(valid()) { var h = Math.floor(mm/3600000); var m = Math.floor(((mm/3600000)-h)*60); var s = Math.floor(((((mm/3600000)-h)*60)-m)*60); var mmFinal = Math.floor(((((((mm/3600000)-h)*60)-m)*60)-s)*1000); this.hours = h, this.minutes = m; this.seconds = s; this.milliseconds = mmFinal; } else { this.hours = 0, this.minutes = 0; this.seconds = 0; this.milliseconds = 0; } } It appears to work fine except for values that are 2^x: // 2^0 = 1 -&gt; returns 0, should return 1 // 2^1 = 2 -&gt; returns 1, should return 2 // 2^2 = 4 -&gt; returns 3, should return 4 // 2^3 = 8 -&gt; returns 7, should return 8 // And so on... Values such as 1001, 1003, but not 1002 and 1004 return milliseconds as 0 and 2 respectively. They should return 1 and 3 as the milliseconds value but don't. I know it's a logical error, but what's going on here and how can I correct my code?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26000279
accepted answer: http://stackoverflow.com/a/26000279
tagged with: javascript
score: 0

http://stackoverflow.com/q/26018322
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40751455
has comment: http://stackoverflow.com/comment/40752212
has comment: http://stackoverflow.com/comment/40752526
has comment: http://stackoverflow.com/comment/40752369
type: Question
accepted answer: http://stackoverflow.com/a/26019309
tagged with: javascript
has body: I have this working jsfiddle with markup and some jquery. This works fine. But I want to do the exact same thing (toggle) with a table. As you can see in this working fiddle, it shows only a few of the information at first, but when you click the button it appears more info. How can I do the same thing with a table? Header Text Header Text Header Text Header Text Header Text Header Text Header Text See less examples $('[data-toggle]').click(function () { var $this = $(this); var toggle = $this.attr("data-toggle"); // Scope triggered area var $context = $(toggle); var attr1 = $(this).attr('data-toggleHiddenText'); var attr2 = $(this).attr('data-toggleVisibleText'); if (typeof attr1 !== typeof undefined && attr1 !== false && typeof attr2 !== typeof undefined && attr2 !== false) { // Toggle text on buttons var txt = $context.is(':visible') ? attr1 : attr2; $this.text(txt); } // Show/hide more content $context.slideToggle('fast'); }); http://jsfiddle.net/dbtxs5rt/1/
tagged with: jquery
has comment: http://stackoverflow.com/comment/40751027
score: 0
has title: How to show only few with toggle?
has comment: http://stackoverflow.com/comment/40752672
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40752104
answer count: 1
has comment: http://stackoverflow.com/comment/40751314
has comment: http://stackoverflow.com/comment/40752273
has answer: http://stackoverflow.com/a/26019309
has comment: http://stackoverflow.com/comment/40751385

http://stackoverflow.com/q/25918391
tagged with: regex
favorite count: 0
has body: I have an input which can accept a combination of data in this format: dddd.nnnn where d is an uppercase letter and n is a digit. In some cases the initial uppercase letters could be 2, 3 or 4 in length. Then a . (point) can be entered, after which only numbers (0 - 9) can be entered. Some sample entries are as follows GHD.23 GH.235 EFF.1234 Can this be done by combining Regular Expressions?
upvote count: 2
type: UnansweredQuestion
type: Question
score: 2
tagged with: validation
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jquery input validation regular expression
has answer: http://stackoverflow.com/a/25918418

http://stackoverflow.com/a/25897529
type: Answer
score: 2
downvote count: 0
has body: I found many similar questions about this problem on stackoverflow and I think I composed a portable and "definitive" solution to this problem. First of all: why is the browser complaining about the user session? The answer is "Microsoft Office Protocol Discovery". In a few words: it's something that works only if you are using Microsoft Windows and your default browser is Internet Explorer. Basically, if you are not using Microsoft Windows OR your default browser is not Internet Explorer, when you click on an URL, the request sent to the browser will always be with an empty cookie. This means that, despite the default browser could use a correct cookie to authenticate the user, the request coming from Excel will never use it. But if you try to reload the page (and the webserver is not redirecting to a different error page), the browser will use the domain cookie and you'll see the correct page. Second question: how can I solve this problem? I think I found a very good solution, composed by an HTML part and a webserver part. HTML part Starting from the fact that you need to reload the page to use the cookie, I created a simple static page containing a little javascript code and some html. This is just an example. The main part of this code is here. Page Redirection If you are not redirected automatically, follow the <a href='<?php echo $newUrl; ?>'>link You can access to the querystring via javascript in many ways, you can find a very interesting thread here. This static page, let's call it redirect.html, will only do one thing: it will redirect the browser to the page specified in the newUrl parameter. Now if I put in the A1 cell something like: http://www.mypersonalwebsite.com/redirect.html?newUrl=http://www.mypersonalwebsite.com/url/visible/only/to/loggedin/users and if I click on this URL: Excel will go to this URL using the default browser The browser will open the redirect.html page with an empty cookie The browser will reload the page using the domain cookie …
upvote count: 2
answers question: http://stackoverflow.com/q/25897528
has comment: http://stackoverflow.com/comment/101822646

http://stackoverflow.com/a/71250303
upvote count: 21
has comment: http://stackoverflow.com/comment/128084706
type: Answer
downvote count: 0
score: 21
has body: To update properly the state, you shouldn't mutate the array. You need to create a copy of the array and then set the state with the copied array. const [deals, setDeals] = useState([]); function updateDeals(deal) { const newDeals = [...deals]; // spreading operator which doesn't mutate the array and returns new array newDeals.push(deal); // const newDeals = deals.concat(deal); // concat merges the passed value to the array and return a new array // const newDeals = [...deals, deal] // directly passing the new value and we don't need to use push setDeals(newDeals); }
has comment: http://stackoverflow.com/comment/131361677
answers question: http://stackoverflow.com/q/25937369
has comment: http://stackoverflow.com/comment/127045022
has comment: http://stackoverflow.com/comment/133662171

http://stackoverflow.com/q/25900663
has title: Add days to user inputed date in Javascript
accepted answer: http://stackoverflow.com/a/25901694
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11734926
tagged with: forms
linked to: http://stackoverflow.com/q/563406
type: Question
tagged with: javascript
tagged with: date
score: 0
has body: So I've run into a snag trying to make a date calculator in Javascript. I'm fairly new to Javascript so I feel like I'm diving in a little deep, but here's a rundown of what I'm trying to accomplish. Here's a jsfiddle: http://jsfiddle.net/b52hamw7/2/ I first have a form in my HTML formatted as follows: I need my items by: Be sure to order by: The idea here is that a user will input a date into the form and then a javascript code will add 10 days to it and output the day that they need to order by, formatted as a date. Here's the script that I have so far, which I know isn't close to working, but it's a start I guess: I really appreciate any direction you can give me on this one. Thanks in advance!
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40538781
answer count: 1
has comment: http://stackoverflow.com/comment/40538760
has answer: http://stackoverflow.com/a/25901694
has comment: http://stackoverflow.com/comment/40538770
tagged with: datepicker

http://stackoverflow.com/comment/40528108
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25894904
type: AnswerComment
has text: You can open different ports, and also implement authentication schemas

http://stackoverflow.com/a/25927203
type: AcceptedAnswer
has body: As you are using one source for html , and another source for json. This is considered a cross-domain request. 1 - Enclose your JSON object like this callbackname({data: value}). var http = require('http'), fs = require('fs'), filename = "somefile.json"; var server = http.createServer(); server.on('request', function(request, response) { response.writeHead(200, {'Content-Type': 'application/json'}) fs.readFile(filename, "utf8", function (err, data) { if (err) throw err; response.write("callbackname("); response.write(data); response.write(")"); response.end(); }); }); server.listen(8080); 2 - Add jsonpCallback: "callbackname" to your ajax request.
type: Answer
has comment: http://stackoverflow.com/comment/40587285
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25926257
score: 1
answers question: http://stackoverflow.com/q/25926257
upvote count: 1

http://stackoverflow.com/a/26017263
has comment: http://stackoverflow.com/comment/40752939
answers question: http://stackoverflow.com/q/26017137
has comment: http://stackoverflow.com/comment/40752914
has comment: http://stackoverflow.com/comment/40752283
upvote count: 3
has comment: http://stackoverflow.com/comment/40770327
has comment: http://stackoverflow.com/comment/40753669
type: Answer
has comment: http://stackoverflow.com/comment/40753024
downvote count: 0
has body: This works for the data you provided: var data = {"a": null, "b": 5, "c": 0, d: "", e: [1,2,null, 3]}; function nullToString(value) { function recursiveFix(o) { // loop through each property in the provided value for(var k in o) { // make sure the value owns the key if (o.hasOwnProperty(k)) { if (o[k]===null) { // if the value is null, set it to 'null' o[k] = 'null'; } else if (typeof(o[k]) !== 'string' &amp;&amp; o[k].length &gt; 0) { // if there are sub-keys, make a recursive call recursiveFix(o[k]); } } } } var cloned = jQuery.extend(true, {}, value) recursiveFix(cloned); return cloned; } console.log(nullToString(data)); Basic premise is to recursively loop over your object's properties and replace the value if its null. Of course the root of your question is "I want something faster." I invite you to profile your solution, this one, and any others you come across. Your results may be surprising.
score: 3
has comment: http://stackoverflow.com/comment/40751264
has comment: http://stackoverflow.com/comment/40752595
has comment: http://stackoverflow.com/comment/40752169

http://stackoverflow.com/q/25910500
has answer: http://stackoverflow.com/a/25917358
has answer: http://stackoverflow.com/a/39353794
tagged with: dom
type: Question
has title: 1000 DOM elements on a single page
possible better answer: http://stackoverflow.com/a/25910903
tagged with: javascript
has body: For a project of big "text map" BigPicture, I need to have more than 1000 text inputs. When you click + drag, you can "pan" the displayed area. But the performance is very poor (both on Firefox and Chrome) : rendering 1000+ DOM elements is not fast at all. Of course, another solution with better performance would be : work on a &lt;canvas&gt;, render text as bitmap on it, and each time we want to edit text, let's show a unique DOM &lt;textarea&gt;, that disappears what editing is finished, and text is rendered as bitmap again... It works (I'm currently working in this direction) but it needs much more code in order to provide editing on a canvas. Question : Is it possible to improve performance for rendering of 1000+ DOM elements on a HTML page, so that I don't need to use &lt;canvas&gt; at all ? Or will it be impossible to have good performance when panning a page with 1000+ DOM elements ? Notes : 1) In the demo here I use &lt;span contendteditable="true"&gt; because I want multiline input + autoresize, but the rendering performance is the same with standard &lt;textarea&gt;.* 2) For reference, this is how I create the 1000 text elements. for (i=0; i &lt; 1000; i++) { var blax = (Math.random()-0.5)*3000; var blay = (Math.random()-0.5)*3000; var tb = document.createElement('span'); $(tb).data("x", blax / $(window).width()); $(tb).data("y", blay / $(window).height()); $(tb).data("size", 20 * currentzoom); tb.contentEditable = true; tb.style.fontFamily = 'arial'; tb.style.fontSize = '20px'; tb.style.position = 'absolute'; tb.style.top = blay + 'px'; tb.style.left = blax + 'px'; tb.innerHTML="newtext"; document.body.appendChild(tb); }
upvote count: 2
tagged with: html5-canvas
accepted answer: http://stackoverflow.com/a/25922705
favorite count: 0
has answer: http://stackoverflow.com/a/25910903
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40556275
has answer: http://stackoverflow.com/a/25922705
answer count: 4
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/26020444
type: Answer
score: 2
answers question: http://stackoverflow.com/q/26019322
accepted answer of: http://stackoverflow.com/q/26019322
type: AcceptedAnswer
downvote count: 0
has body: There were a couple of issues. First, in your template you are trying to iterate over a collection of authors even though you are defining a one-to-one relationship. You can remove the {{#each}} and just have by {{ author.name }}. Second, your Article model is not loading the associated Author record. This can be fixed by updating the author relationship in App.Article to author: DS.belongsTo('author', {async: true}). This will make an async request for the author data for each article. Working JSBin
upvote count: 2

http://stackoverflow.com/comment/40594238
type: Comment
comment on: http://stackoverflow.com/a/25915041
has text: Thank you this now works. We have another issue though but without knowing what It is I can't ask for help.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25896076
has body: Oriol's answer is right, but I wanted to add that there is a difference between calling toString directly on, say, a number or a string, vs. using Object.prototype.toString. The Object.prototype.toString function is general, so if we do var x = "hello, world"; alert(Object.prototype.toString.call(x)); we will see "[Object string]". However, if we call toString directly, instead, like this: alert(x.toString()); we will see "hello, world". The reason for this is that toString in the second example is really String.prototype.toString, which is different from the generic Object.prototype.toString method. The same distinction occurs with a number like 6: var y = 6; alert(Object.prototype.toString.call(y)); // "[Object Number]" alert(y.toString()); // "6" alert(Number.prototype.toString.call(y)); // also "6" In this case, the primitive value 6 is being boxed into an instance of Number when you do y.toString(). When you concatenate strings, it's the object's toString method that gets called, not Object.prototype.toString, which is why alert("I am " + y + " years old") produces "I am 6 years old", not "I am [Object Number] years old". Since null has no Null prototype or anything like that, doing null.toString() will produce an error.
upvote count: 4
has comment: http://stackoverflow.com/comment/40530251
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25895756
type: Answer

http://stackoverflow.com/a/34019636
answers question: http://stackoverflow.com/q/26021904
score: 0
type: Answer
has body: In fact, this is not working. You have to add file = input[0].files[0];

http://stackoverflow.com/q/25888292
has title: Requiring pickadate.js with Browserify
tagged with: browserify-shim
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25925139
score: 1
tagged with: pickadate
type: Question
has comment: http://stackoverflow.com/comment/40577170
has answer: http://stackoverflow.com/a/25925139
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: browserify
favorite count: 0
downvote count: 0
has body: I would like to use the responsive pickadate.js date picker in my Backbone.js application. I am using Browserify to manage modules and dependencies and wondering how to integrate pickadate. I started with a npm install pickadate which added the node module to my project. Then, in one of my views, I try this: var pickadate = require('pickadate'); this.$el.find('input[name=dateEntry]').pickadate(); The error is on the second line which throws this error: [Error] TypeError: 'undefined' is not a function (evaluating 'this.$el.find('input[name=dateEntry]').pickadate()') (app.js, line 16654) I think I should use browserify-shim but.... how? Pickadate does not export anything. UPDATE Using debowerify with grunt (works for other modules): var pickadate = require('pickadate'); //... render: function() { //... this.$el.find('.form-group input[name=dateEntry]').pickadate(); } [Error] TypeError: 'undefined' is not a function (evaluating 'this.$el.find('.form-group input[name=dateEntry]').pickadate()') (app.js, line 18803)

http://stackoverflow.com/a/25933508
answers question: http://stackoverflow.com/q/25933387
type: Answer
has body: Have a look at the issues page of this plugin https://github.com/adgsm/multi-level-push-menu/issues I suggest you ask your question there for best results.
score: 0

http://stackoverflow.com/q/25916198
has answer: http://stackoverflow.com/a/26069485
tagged with: android
has body: I have a simple site which gets refreshed once every 30 seconds via a jquery full body refresh. Now once a page refresh occurs I want a short sound to play and I tried to do this with various methods. the methods work on my pc (IE, chrome and firefox) but the target is a samsung smart tv. this is my site refresh with the sound added: update site! like I said this works in my browsers but not on the smart tv, the window refreshes successfully but the sound does not get played. However if I make a single function which ONLY plays the audio and call that on my setinterval it works. If call that function from my update_site() function it doesn`t work. it seems to me this some kind of syncing issue where the browser has not yet loaded everything and it already request to play the sound. Does anyone have an idea on how to fix this? help would be greatly appreciated.
favorite count: 0
has answer: http://stackoverflow.com/a/25952808
type: UnansweredQuestion
has title: jquery play sound on body replacement
has comment: http://stackoverflow.com/comment/40842563
tagged with: audio
score: 3
upvote count: 3
type: Question
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40845894
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40657804
type: Comment
type: QuestionComment
has text: You are right for the most part, for the two css stylesheet you don't need to make two of them you can just use one and add **@media queries** to it. For more information about media queries you can go here https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries of you can google `css media queries` it's easy and fun just read more about it
score: 1
comment on: http://stackoverflow.com/q/25966377

http://stackoverflow.com/comment/70357966
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25973054
has text: Possible duplicate of [How do I get JavaScript to delay, and then refresh the page](http://stackoverflow.com/questions/32752696/how-do-i-get-javascript-to-delay-and-then-refresh-the-page)
score: 0

http://stackoverflow.com/a/26016584
has comment: http://stackoverflow.com/comment/40747894
has body: You can turn it into a function so you can increment any index you want at any time: var myArr = [0,0,0,0,0,0,0]; var increment = function (i) { myArr[i] += 1; } increment(2);
has comment: http://stackoverflow.com/comment/40747448
score: -1
answers question: http://stackoverflow.com/q/26016444
has comment: http://stackoverflow.com/comment/40747518
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40764536
upvote count: 0
has comment: http://stackoverflow.com/comment/40747511

http://stackoverflow.com/q/26021412
answer count: 1
tagged with: javascript
score: 0
has title: Angular JS Defining a Variable with ngInit
has body: Basically I'm sending a variable from PHP to Angular JS. I echo the PHP variables into the ng-init tag, and it renders properly (ng-init="listing=5;user=59"). &lt;div id="content" ng-app="galleryApp" ng-controller="galleryController" ng-init="listing=&lt;?php echo $lid ?&gt;;user=&lt;?php echo $sessionUser ?&gt;"&gt; However, in my angular JS code, when I log the variables, they come up as undefined. var galleryApp = angular.module('galleryApp', []); function galleryController ($scope, $http, $log) { console.log($scope.listing); // &lt;-- undefined console.log($scope.user); // &lt;-- undefined var postData = { listing : $scope.listing, user: $scope.user };
tagged with: angularjs
has answer: http://stackoverflow.com/a/26021518
tagged with: php
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/26021518

http://stackoverflow.com/a/25934685
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25913973
has body: Customized message will be shown in Google chrome only, Firefox doesn't support it so far.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25913973

http://stackoverflow.com/a/26032850
accepted answer of: http://stackoverflow.com/q/26032811
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/26032811
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Thats because ajax requests run async. Your $('#feedback').text('Hello ' + name[0]); Is executed before the ajax call finishes you should use jquerys .promise().done(function(){ Promise

http://stackoverflow.com/q/25902857
downvote count: 0
score: 1
type: Question
has title: Javascript How to set scrolled items stop in the middle position
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25903250
has body: This is the demo in jsfiddle, demo What I want is let the scrolled items('one ', 'two', 'three', '4', '5', '6', '7') automatically scroll up like the demo showed, and stop when it's in the middle position. Here is the place in my demo code for setting position. if ((x == 0) || (x % 35== 0)) { setTimeout(function () { i.top = x + 'px'; }, 1000); } else { i.top = x + 'px'; } The reason why I set 35 is because I found that the scrolled items are approximately in the middle position when it equals to 0, -35,-70,-105,.... But when I console all x, I found that the value of x is between (31, -251). Do you know how to find the exact position when each items are in the middle of position? Thanks!
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25903250
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/40542969
type: AnsweredQuestion

http://stackoverflow.com/comment/40572261
type: QuestionComment
comment on: http://stackoverflow.com/q/25918590
score: 0
type: Comment
has text: A quick guess would be that your logo is too big, but I don't think that would affect the layout - it's a background-image after all.

http://stackoverflow.com/a/25969557
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40662553
accepted answer of: http://stackoverflow.com/q/25969512
score: 0
answers question: http://stackoverflow.com/q/25969512
has body: You have declared the function incorrectly, so it is not visible: JSFiddle: http://jsfiddle.net/ntk9v2je/1/ radio1 = function() { alert("test"); $('#next').removeClass('ui-disabled'); } This declares radio1 as a function on the default scope (window in this case). As for the $("#auswahl1").click example: It works just fine once you add in the removeClass call: JSFiddle: http://jsfiddle.net/ntk9v2je/2/ For either problem , also make sure you have correctly included jQuery (before these code snippets).
has comment: http://stackoverflow.com/comment/40662406
has comment: http://stackoverflow.com/comment/40662359

http://stackoverflow.com/q/25987632
has answer: http://stackoverflow.com/a/25987754
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25987654
accepted answer: http://stackoverflow.com/a/25987754
possible better answer: http://stackoverflow.com/a/25987654
tagged with: regex
type: AnsweredQuestion
has title: Javascript replace regular expression
has answer: http://stackoverflow.com/a/25987665
type: Question
has body: In my application I use the javascript replace method with following regex: replace(/\€/g,'$') This code find € character and change it to $. But now I want to this code replace € and £ to $ character. How can I do that?

http://stackoverflow.com/comment/40675240
score: 0
comment on: http://stackoverflow.com/q/25976531
type: QuestionComment
has text: Yes is inline in the HTML. I am using 'K' SVG twice on the page and the Logo once. Can you explain how you think the ID's are clashing? I don't fully understand.
type: Comment

http://stackoverflow.com/q/25940185
tagged with: javascript
score: 0
answer count: 1
has body: I'm new to woo and php, but learning. The file I'd like to edit is wp-content/plugins/woocommerce/assests/js/frontend/add-to-cart.min.js Now I know going into the file and editing it is bad form, and that updating woocommerce will wipe out all changes later on. So my question is how do I edit this script in the proper woocommerce format? Do I deque it? But then how do I reque my own file so it always runs in time? Is there a way for doing small changes to .js files, and a way for doing large changes?
tagged with: php
has answer: http://stackoverflow.com/a/25942254
accepted answer: http://stackoverflow.com/a/25942254
type: AnsweredQuestion
tagged with: wordpress
type: Question
has title: What is the proper way to edit woocommerce assets?
tagged with: woocommerce

http://stackoverflow.com/comment/40714606
score: 0
type: Comment
type: QuestionComment
has text: @JonSkeet length of what, length of sending frame? this is the actual length 295416440622254
comment on: http://stackoverflow.com/q/25998296

http://stackoverflow.com/a/25932407
has comment: http://stackoverflow.com/comment/40596521
has comment: http://stackoverflow.com/comment/40598032
has comment: http://stackoverflow.com/comment/40596349
score: 0
has comment: http://stackoverflow.com/comment/40596264
type: Answer
answers question: http://stackoverflow.com/q/25932324
has comment: http://stackoverflow.com/comment/40598009
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40598122
has body: Execute code before document body ends. It makes you sure that all website data finished loading. (function() { // your code here })(); &lt;/body&gt;

http://stackoverflow.com/a/25949996
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40630119
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25949731
type: Answer
accepted answer of: http://stackoverflow.com/q/25949731
has body: jQuery UI styling for a button requires more than just the ui-button class. If you inspect the source for the jQuery buttons on this demo page you'll notice that the buttons also have the following classes: ui-widget ui-state-default ui-corner-all You could tackle this two ways: 1 - Add the classes manually: blah 2 - After the html has been appended, call jQuery UI's button() method on the newly created element (I used .find() here). $('#manage-sites').html(addForm) .find('.ui-button').button(); Full Demo $(function(){ var addSite = function(){ var addForm =' ' + ' ' + ' ' + ' ' + ' ' + ' Add to Datasites '; $('#manage-sites').html(addForm) .find('.ui-button').button(); }; $('#add-site').click(function(){ addSite(); }); }); Manage Data Sites Add Delete View

http://stackoverflow.com/comment/40516000
comment on: http://stackoverflow.com/q/25888301
type: QuestionComment
has text: This question appears to be off-topic because it is about page hosting.
score: 0
type: Comment

http://stackoverflow.com/comment/40591399
comment on: http://stackoverflow.com/a/25928867
score: 0
type: AnswerComment
type: Comment
has text: please read my answer below

http://stackoverflow.com/comment/40679000
has text: Legacy browser support – depends on what you need in this case IMHO. Support for local storage goes down to IE 8 – so if you want to make it work in there as well, I’d say option #1 might be the safer approach. But if you say, _“IE10+ support is enough for me”_ – then I’d probably give option #2 a try first – it seems a bit more straight forward and easy to implement.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25978557

http://stackoverflow.com/q/26031775
has answer: http://stackoverflow.com/a/26032030
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26032030
has body: Currently, I use the following RegEx in my javascript to match and count words in string. That works perfekt with this ReEx: RegEx: var pickRegExp = /[^\W\d]+[\u00C0-\u017Fa-zA-Z'](\w|[-'](?=\w))*/gi; Keyword: beautiful String: The beautiful tree in the garden. In the garden is the beautiful tree. Output: The: 4 beautiful: 2 tree: 2 garden in: 2 Now, I also want to match phrases (exactly). For e.g. Keyword or Phrase: beautiful tree String: The beautiful tree in the garden. In the garden is the beautiful tree. The model tree beautiful is sold out. Output: The: 4 beautiful tree: 2 tree: 1 beautiful: 1 garden in: 2 I´m not really firm with RegExp. Do you have any Tips for me? Thank you
tagged with: regex
has title: Regular Expression: Match word or Phrase
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/a/26007244
has comment: http://stackoverflow.com/comment/40733024
has comment: http://stackoverflow.com/comment/40748046
answers question: http://stackoverflow.com/q/26007042
downvote count: 0
has body: In JavaScript, null is a special value an object (yes, object - the type of null is object) can have that represents it having no value - this is distinct from it being empty. You can think of {} (empty object) as an empty glass, while null would mean that the glass doesn't even exist. It's also distinct from the variable not being defined at all - when a variable is defined, but set to null, it has a place "reserved" to put the glass (or possibly something else) at some point, but right now that space is not occupied. As for your test, comparing with either '', 0 or false will give you the is null messages (only when using == and not === for comparison of course). If that's what you're trying to achieve, probably the "proper" (easiest to understand) way to check if a variable has zero or empty value (similar to PHP's empty) is if (!variable) ...
type: Answer
has comment: http://stackoverflow.com/comment/40731342
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40731312

http://stackoverflow.com/q/25992107
tagged with: arrays
tagged with: javascript
score: -1
tagged with: sorting
has body: I am trying to sync a sorted Backbone.Collection with another list, e.g. a JavaScript Array. I am using the following code (jsfiddle): var coll = new Backbone.Collection(); coll.comparator = "label"; var list = [] coll.on("add", function (model, collection, options) { list.splice(collection.indexOf(model), 0, model.get("label")); }); coll.add([ {label: "1"}, {label: "3"}, {label: "5"}, {label: "4"}, {label: "2"} ]); In this example, this results in the following list: 1, 2, 3, 5, 4. The root cause is, that within the add event handler the Backbone.Collection is already filled with all models, while the JS array is not. Since the add events are triggered in insertion order, not sorted order, this leads to the wrong order in the array. How would I change my sync approach/add handler to make things work?
answer count: 2
has answer: http://stackoverflow.com/a/26004958
favorite count: 0
possible better answer: http://stackoverflow.com/a/25999778
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25999778
tagged with: backbone.js-collections
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26004958
has title: Synching an array with a sorted Backbone.Collection
downvote count: 1
type: Question
upvote count: 0

http://stackoverflow.com/a/26019634
has body: Maybe $.inArray solution? $.inArray($(this).attr('xlink:href'), ['#congo', '#onshore', '#sea']) != -1
score: 3
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/40753410
type: Answer
accepted answer of: http://stackoverflow.com/q/26019583
downvote count: 0
has comment: http://stackoverflow.com/comment/40753545
answers question: http://stackoverflow.com/q/26019583

http://stackoverflow.com/a/25961192
accepted answer of: http://stackoverflow.com/q/25921941
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25921941
upvote count: 2
type: AcceptedAnswer
has body: When sending files with jQuery's $.ajax one has to set the processData and contentType options to false. Setting the processData to false makes sure jQuery doesn't process the formData object in any way. Setting the contentType to false makes sure jQuery doesn't add a boundary, something it would normally do. That is, jQuery adds the contentType, and a boundary, so it looks something like : Content-Type=multipart/form-data; boundary=----------------993434535254 we don't want jQuery to set a certain boudary, as then the serverside wouldn't understand what's going on, so to avoid it the contentType has to be set to false when sending files. var formData = new FormData(); formData.append(file.name, file); $s.ajax({ url: MY_SERVER_URL, type: "POST", data: formData, processData: false, contentType: false, }); and that's really all the options that are needed to send files with jQuery
type: Answer

http://stackoverflow.com/comment/40726828
type: Comment
comment on: http://stackoverflow.com/a/26004142
score: 0
type: AnswerComment
has text: See: http://meta.stackexchange.com/questions/184140/markdown-editor-messing-with-arrays-of-arrays Will fix my post too. Time to test.

task
type: Tag
tags question: http://stackoverflow.com/q/25932606
tag name: task

http://stackoverflow.com/q/25958240
tagged with: php
has body: working on .load() to keep on updating some data from a database. This is for a test website im learning on. So I have a basic structure like: Player 1, Player 2 And then I have tried this: function pageUpdate(){ $('#playerlist').load("test.php"); } setTimeout(pageUpdate, 10000); The test.php is in the same folder as the page its being called on, and to test it the content of the page is: Hello! But nothing is happening, no errors or anything... any help where I am going wrong? Craig
has comment: http://stackoverflow.com/comment/40641319
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40641315
score: 0
has comment: http://stackoverflow.com/comment/40641235
has comment: http://stackoverflow.com/comment/40641406
has comment: http://stackoverflow.com/comment/40641301
has title: jquery .load not working
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40641299

http://stackoverflow.com/q/25975594
has answer: http://stackoverflow.com/a/25975723
has answer: http://stackoverflow.com/a/25975940
answer count: 5
has body: I want warn users if they leave the page by closing the browser or using the history buttons of the browser using the following JavaScript: window.onbeforeunload = function(e) { return 'Ask user a page leaving question here'; }; But my links and buttons on my website should work regardless of this. How can I achieve that?
has answer: http://stackoverflow.com/a/25975737
has title: How to prevent navigation by browser buttons but not by links?
linked to: http://stackoverflow.com/q/1119289
has answer: http://stackoverflow.com/a/25975694
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1704533
linked to: http://stackoverflow.com/q/16182993
type: Question
score: 0
has answer: http://stackoverflow.com/a/25975709
accepted answer: http://stackoverflow.com/a/25975709
tagged with: javascript
tagged with: dom-events
has comment: http://stackoverflow.com/comment/40673142
possible better answer: http://stackoverflow.com/a/25975694

http://stackoverflow.com/q/25947651
downvote count: 0
has answer: http://stackoverflow.com/a/25947722
type: Question
tagged with: arrays
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/25947742
answer count: 3
has title: javascript background image change using array
possible better answer: http://stackoverflow.com/a/25947722
has answer: http://stackoverflow.com/a/25950521
accepted answer: http://stackoverflow.com/a/25950521
favorite count: 0
has body: I am not exprienced javascript programmer so I try to play with javascript. I am trying to make a slideshow by clicking on a button. Function I am trying to make a function with array that holds the names of all the images and changing the background-image according to the index of the array. I did only this part of function yet and I cant get what is wrong. function change(lol){ var img = ["veni1.jpg", "veni2.jpg", "veni3"]; var middle = document.getElementById("vvvmiddle"); var index = img.indexOf(middle.style.backgroundImage); if(change === "right"){ var current = index + 1; middle.style.backgroundImage = img[current]; } } middle { width:1262px; height:550px; background-color: white; margin-left: -7px; } #vvvmiddle { width:700; height:400; background-image:url('veni1.jpg'); margin: 20px 0px 0px 310px; float:left; } #sipka { width:40; height:40; border-radius: 100px; background-color: #DCDCDC; float:right; margin: 450px 410px 0px 0px; } #sipkatext { font-family: Impact; color: white; font-size: 30px; padding-left: 10px; padding-top: 1px; } #sipkaurl { text-decoration: none; } #sipka:hover { background-color: #3399FF; } #sipka2:hover { background-color: #3399FF; } #sipka2 { width:40; height:40; border-radius: 100px; background-color: #DCDCDC; float:right; margin: 450px -100px 0px 0px; } #sipkatext2 { font-family: Impact; color: white; font-size: 30px; padding-left: 13px; padding-top: 1px; } < >
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/26038275
has comment: http://stackoverflow.com/comment/40790882
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/40789466
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/26030023
has body: You have to do a little math to find the center of a circle that matches your 3 constraints : • intersects with initialPoints • intersects with finalPoint • has provided radius Notice that there might be no result : if the points are further from twice the radius from one another no circle can match. If points are &lt; 2 * radius away, we have two results in fact, i don't know how you'd like your user to choose. The math uses a few properties : • the circles center are on the line perpendicular to p1, p2. • pm, the middle point of (p1, p2) is also the middle point of (c1, c2). • the triangles (p1, pm, c1) and (p1, pm, c2) have a 90° angle in pm (called 'triangle rectangle' in french, donno in english). Here's a screenshot with the two possible arcs in green/red : http://jsbin.com/jutidigepeta/1/edit?js,output var initialPoint = { x: 100, y: 160 }; var radius = 90; var finalPoint = { x: 240, y: 190 }; var centers = findCenters(radius,initialPoint, finalPoint ); Core function : // function findCenters(r, p1, p2) { // pm is middle point of (p1, p2) var pm = { x : 0.5 * (p1.x + p2.x) , y: 0.5*(p1.y+p2.y) } ; drawPoint(pm, 'PM (middle)'); // compute leading vector of the perpendicular to p1 p2 == C1C2 line var perpABdx= - ( p2.y - p1.y ); var perpABdy = p2.x - p1.x; // normalize vector var norm = Math.sqrt(sq(perpABdx) + sq(perpABdy)); perpABdx/=norm; perpABdy/=norm; // compute distance from pm to p1 var dpmp1 = Math.sqrt(sq(pm.x-p1.x) + sq(pm.y-p1.y)); // sin of the angle between { circle center, middle , p1 } var sin = dpmp1 / r ; // is such a circle possible ? if (sin&lt;-1 || sin &gt;1) return null; // no, return null // yes, compute the two centers var cos = Math.sqrt(1-sq(sin)); // build cos out of sin var d = r*cos; var res1 = { x : pm.x + perpABdx*d, y: pm.y + perpABdy*d }; var res2 = { x : pm.x - perpABdx*d, y: pm.y - perpABdy*d }; return { c1 : res1, c2 : res2} ; } utilities : function sq(x) { return x*x ; } function drawPoint(p, name) { ctx.fillRect(p.x - 1,p.…

http://stackoverflow.com/comment/40764015
comment on: http://stackoverflow.com/q/26025193
score: 1
has text: @Travesty3 Not to be an ass, but mine is better by 0.00000001ms :)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40611367
comment on: http://stackoverflow.com/q/25940377
type: Comment
type: QuestionComment
score: 2
has text: you don't need to set the value attribute in your input field. just in your controller do this: $scope.set = { width: 10 };

http://stackoverflow.com/q/25921754
has title: Display pdf created on the fly on modal dialog
tagged with: asp.net-mvc-3
has comment: http://stackoverflow.com/comment/40578765
type: Question
has answer: http://stackoverflow.com/a/25922503
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25922503
has answer: http://stackoverflow.com/a/25954246
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/15477525
has comment: http://stackoverflow.com/comment/40580659
has body: *Summary in the end. I read many many questions like mine here on SO and other sites to try and solve my problem, but I couldn't find the solution to the final bit of the problem. DESCRIPTION: I have a table (jqGrid) where I display some data from a database, like this: +------+-----+ | Name | Age | +------------+ | test | 1 | +------+-----+ and I have a button that generates a PDF with information of the currently select row. To accomplish this, when the user clicks on the button "PDF" I create a form with hidden inputs and set their values: //create a form $("&lt;form&gt;").attr({ "id" : "invform", "method" : "post", "action" : "Home/generatePdf" }); Then I create the inputs and hide them and submit the form to the server... //Id of selected row var selectedRowId = $("#grid").jqGrid('getGridParam', 'selrow'); //Value of column Name of selected row var cellValue = $("#grid").jqGrid('getCell', selectedRowId, 'name'); $("#invform") .append($("&lt;input&gt;").attr({"name" : "Name", "type" : "text", "value" : cellValue})) //hide all inputs $("#invform input").attr({"hidden" : "true"}); //submit form $("#invform").submit(); The form is then sent to my controller and populates the obj with all the data: public FileStreamResult generatePdf(Model obj) { PDF myPdf = &lt;code for generating the pdf&gt;; byte[] byteArr = myPdf.toByteArray(); MemoryStream ms = new MemoryStream(); ms.Write(byteArr, 0, byteArr.Length); HttpContext.Response.AddHeader("content-disposition", "inline; filename=" + randomName + ".pdf"); //random name is just a string based on time etc return new FileStreamResult(ms, "application/pdf"); } All this is working perfectly. PROBLEM: After I call submit() on the form, the controllers is called and the pdf is returned and displayed on the same tab. I need this form to be displayed on a modal window I have. HTML: &lt;div id="pdfdiv" style="display:none"&gt; &lt;iframe id="pdfframe" style="width:100%; height:100%;"&gt; &lt;/iframe&gt; &lt;/div&gt; JS: $("#pdfd…
has comment: http://stackoverflow.com/comment/76263872
accepted answer: http://stackoverflow.com/a/25954246
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40581385

http://stackoverflow.com/comment/40689701
type: Comment
has text: Your jsfiddle won't work because is using jQuery v1.10.1 and fancybox v1.3.4 doesn't work with jQuery v1.9+ ... check http://stackoverflow.com/q/14344289/1055987 for reference. Try downgrading jQuery to v1.8.3 and it will work http://jsfiddle.net/cvhk56vp/6/ (of course you need the proper video references)
type: QuestionComment
comment on: http://stackoverflow.com/q/25971019
score: 0

http://stackoverflow.com/q/25908328
has body: Understand so far list (OL &amp; UL) already supported in from html feature (https://github.com/MrRio/jsPDF/pull/249). May i know is it possible can achieve for addHTML() as well? Thanks!
type: Question
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
score: 0
tagged with: jspdf
has answer: http://stackoverflow.com/a/25908479
answer count: 1
accepted answer: http://stackoverflow.com/a/25908479
type: AnsweredQuestion
has title: List OL & UL Support for addHTML

http://stackoverflow.com/comment/40662589
has text: so, you want to know when the ng-options directive has finished rendering the items? I assume that you want to know when it has finished rendering in order to recalculate the positions or something like that, correct?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25969680

http://stackoverflow.com/q/25924288
score: 17
tagged with: knockout.js
upvote count: 17
has answer: http://stackoverflow.com/a/25924289
type: Question
has body: I have been searching for a simple how-to, to create the most basic example of a Visual Studio 2012 TypeScript project utilizing RequireJS, jQuery, and KnockoutJS. There are several examples available, but for me some where more complicated than I wanted so I set out to create a how-to, and have posted it here for public scrutiny. I have answered my own question as a Q&amp;A style knowledge sharing exercise. For those unfamiliar, here is a quick breakdown of the included components... TypeScript - A Visual Studio extension that allows scripting to create a .TS file via a language that is a superset of JavaScript. This provides the ability to define a data type associated with methods and variables - which is otherwise missing from JavaScript. By doing so, compile time checks can ensure the proper use in an attempt to reduce run-time conflicts. When building the Visual Studio project, the Visual Studio extension will compile the script into actual JavaScript. As such, this extension comes with it's own compiler - tsc.exe. It is expected the resulting JavaScript files will be deployed to production, not the source code .ts files. jQuery - a JavaScript framework for HTML document traversal and manipulation, event handling, animation, and Ajax interaction. RequireJS - Dependency loader. Sometimes JavaScript references can get crazy. This attempts to assist with these concerns. My example shows that even though many JavaScript files are in use, the HTML only refers to one - the root JavaScript file that loads the others. KnockoutJS - UI binding, utilizing the MVVM pattern. HTML views refer to variables and methods in a view-model. The view model is a JavaScript object (the JavaScript file is likely the result of compiling a .ts file - see TypeScript above). DefinitelyTyped - Also included are two DefinitelyTyped NuGet packages. Because TypeScript is attempting to verify data type usage, it is performing a check to ensure it is aware of all references. JavaScript is a bit…
has title: How to create basic TypeScript project using jQuery, RequireJS, and KnockoutJS
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/47876958
tagged with: mvvm
answer count: 1
accepted answer: http://stackoverflow.com/a/25924289
favorite count: 0
tagged with: requirejs
type: AnsweredQuestion
tagged with: typescript

http://stackoverflow.com/comment/40642951
has text: This makes the whole thing much less flexible and pollutes the API in my opinion.
type: AnswerComment
comment on: http://stackoverflow.com/a/25959187
score: 0
type: Comment

http://stackoverflow.com/comment/40713181
has text: First of all ID should be unique, so you can only use ID for one element. You cannot use repeated ID values.
score: 9
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25997676

http://stackoverflow.com/a/26199693
score: 2
answers question: http://stackoverflow.com/q/25894855
downvote count: 0
has comment: http://stackoverflow.com/comment/41110511
upvote count: 2
type: Answer
has body: Simplest of the answer is to use file_exists() function where param would be absolute file path, it returns true/false: $isFileExists = file_exists($filePath);

http://stackoverflow.com/comment/40755828
score: 0
type: AnswerComment
type: Comment
has text: I tried it but it didn't work. I'm using processing and weirdly "array.size()" seemed to be processed by processing.js and failed.
comment on: http://stackoverflow.com/a/26019234

http://stackoverflow.com/a/25921769
has body: Unless you have one page per week schedule (which you shouldn't), you can convert your weeknumber to a query parameter so that your URL looks like www.example.com/index.html?weeknumber=5. Then you can retrieve this value in your PHP codes using $_GET. So your PHP codes will look something like: &lt;?php $weeknumber = $_GET['weeknumber']; // codes that use $weeknumber to retrieve week schedule ?&gt;
answers question: http://stackoverflow.com/q/25921602
type: Answer
score: 0

http://stackoverflow.com/comment/40621235
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25946533
type: Comment
has text: It wouldn't support. You can use this script to enable HTML5 API on old IE Browsers: https://github.com/aFarkas/html5shiv

http://stackoverflow.com/comment/40797430
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26026455
type: Comment
has text: Code from the deleteAnswer function: for(int i=0;i<indexArray.length;i++){ indexArray[i] = Integer.parseInt(indexStringArray[i]); } if(indexArray.length>1){ removeMeasurement(indexArray[0]); for(int i=1;i<indexArray.length;i++){ indexArray[i]-=1; removeMeasurement(indexArray[i]); } } else removeMeasurement(indexArray[0]);

http://stackoverflow.com/comment/40774282
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26030882
has text: Replace your 'document.getElementByID(sum)' by 'document.getElementById(sum)'.
score: 0

http://stackoverflow.com/comment/40656858
comment on: http://stackoverflow.com/q/25965883
has text: I don't think so - if I proxy, then the content will go through my server, so I will be using twice the bandwidth. Did I misunderstand ? I don't wan't to create a proxy, per se, but rather redirect some urls which are not hosted. Some content may still be hosted on my server.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40771983
score: 0
type: Comment
has text: I don't see why that would be. Please post your entire code when you changed it and I'll have a look. And you will need to put back the $('form').submit() back in
comment on: http://stackoverflow.com/a/26029614
type: AnswerComment

http://stackoverflow.com/comment/40635467
type: QuestionComment
comment on: http://stackoverflow.com/q/25955028
type: Comment
has text: Thank you @soktinpk, would onload work instead?
score: 0

http://stackoverflow.com/comment/40775574
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26030322
has text: Is that your actual code? _.template, with just one parameter, will return a function. Could you either make a jsfiddle or include more of your code?

http://stackoverflow.com/comment/40648678
type: Comment
score: 0
has text: Oh wait, sorry; I thought `#txt` was a ` `, but it's not. I regret to say that it's kind-of hard to tell what's going on.
comment on: http://stackoverflow.com/q/25962013
type: QuestionComment

http://stackoverflow.com/comment/40517516
comment on: http://stackoverflow.com/q/25889088
type: Comment
score: 0
has text: hi i just updated the code to show where the data is coming from. and no error messages are being displayed
type: QuestionComment

http://stackoverflow.com/comment/40495024
has text: Could you fiddle this for me? Becuase i dont understand what you mean with .page.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25876499
type: AnswerComment

http://stackoverflow.com/q/25990542
tagged with: jquery
has body: Due to some restriction I have to use DatePicker written by Stefan Petre and I need to be able to disable past dates, you can find implementation of his DatePicker here: http://www.eyecon.ro/datepicker/ According to him, I would be able to disable dates onRender function but appreantly this would disable all dates: var date = new Date(); date.setDate(-1); onRender : function(){ return{ disabled : date &lt; new Date() }; } Have you previously worked with this custom DatePicker library? if so your advice is much appreciated.
has answer: http://stackoverflow.com/a/39699038
favorite count: 0
type: UnansweredQuestion
tagged with: datepicker
has answer: http://stackoverflow.com/a/25990751
score: 1
has title: Disable Past Dates using DatePicker by 'Stefan Petre'
upvote count: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
answer count: 2
downvote count: 0

http://stackoverflow.com/a/51171167
downvote count: 0
answers question: http://stackoverflow.com/q/25881102
type: Answer
score: 1
upvote count: 1
has body: I had the same sort of problem when splitting a date string; an extra 'non-visible' character was added to the beginning and end of each array item; string.trim() did not work. Took me 2 days to work the following out: Created the datetime array from: var datetime = new Date(); var dt = datetime.toLocaleString(); var datetimearray=dt.split(" "); Created date and time strings from the datetime array: var date=datetimearray[0]; var time=datetimearray[1]; Split the date and time strings: var datearray=datetimearray[0].split("/"); var timearray=datetimearray[1].split(":"); Then converted each date and time element to a number: var day = getNumberFromString(datearray[0]); var month= getNumberFromString(datearray[1]); var year = getNumberFromString(datearray[2]); var hour = getNumberFromString(timearray[0]); var minute= getNumberFromString(timearray[1]); var second = getNumberFromString(timearray[2]); The getNumberFromString function: function getNumberFromString(string) { var stringsplit=string.split(""); var stringlen=string.length; // If it is the year part of the date, the length is 6 switch(stringlen) { case 3: // The last part of the time element (seconds) is only 3 for some reason case 4: // The two character elements (day, month, hour, minute) are length 4 after the split var string1=stringsplit[1]; // create the first needed character from second array element; index 1 var string2=stringsplit[2]; // create the second needed character from third array element; index 2 string=string1+string2; //add the 2 new elements together return parseInt(string); //convert the number as a string to a number case 6: // For the date string; similar to the above string1=stringsplit[1]; string2=stringsplit[2]; string3=stringsplit[3]; string4=stringsplit[4]; year1=string1+string2; year1num=parseInt(year1); year2=string3+string4; year2num=parseInt(year2); return [year1,year2]; } } Finally created a lookup array to use for some encryption: var lookup=[day,month,year1,year2,hour,minute…

http://stackoverflow.com/a/25890051
type: Answer
has comment: http://stackoverflow.com/comment/40520665
score: 1
has comment: http://stackoverflow.com/comment/40519624
upvote count: 1
has comment: http://stackoverflow.com/comment/40563328
answers question: http://stackoverflow.com/q/25889950
has body: Yes, there's definitely something wrong here. You're immediately calling the function and passing undefined to setTimeout() instead of giving it a function to call. This would do what you are trying to do: function addInfosSinistreRecursive(msg, nbCalls) { if ($("#tab").hasClass('loaded')) { doSomething(); }else if (nbCalls &lt; 10) { setTimeout(addInfosSinistreRecursive.bind(this, msg, nbCalls + 1), 500); } } But the question is why are you trying to do this? It seems like a convoluted way to do whatever it is you are trying to accomplish. You should probably be using an event somewhere when the tab is changed rather than recursively looping and waiting for the tab to change.
has comment: http://stackoverflow.com/comment/40521188
downvote count: 0
has comment: http://stackoverflow.com/comment/40559564

http://stackoverflow.com/comment/40689446
score: 0
type: Comment
type: QuestionComment
has text: Thanks @elclanrs Just what I needed to comprehend the logic!
comment on: http://stackoverflow.com/q/25984122

http://stackoverflow.com/q/26020578
type: Question
has body: Using the native (ES6) Promise. Should I reject with an Error: Promise.reject(new Error('Something went wrong')); Or should I just reject with a string: Promise.reject('Something went wrong'); And what is the difference in browser behaviour?
has comment: http://stackoverflow.com/comment/40755276
possible better answer: http://stackoverflow.com/a/45733354
has title: Should a Promise.reject message be wrapped in Error?
tagged with: es6-promise
has answer: http://stackoverflow.com/a/45733354
tagged with: javascript
has comment: http://stackoverflow.com/comment/40756159
linked to: http://stackoverflow.com/q/11502052
score: 63
answer count: 2
upvote count: 63
downvote count: 0
has answer: http://stackoverflow.com/a/26020867
favorite count: 0
has comment: http://stackoverflow.com/comment/40755546
tagged with: promise
has comment: http://stackoverflow.com/comment/40755686
has comment: http://stackoverflow.com/comment/49022971
has comment: http://stackoverflow.com/comment/49022868
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/52314745
has comment: http://stackoverflow.com/comment/40755239
tagged with: error-handling
accepted answer: http://stackoverflow.com/a/26020867
has comment: http://stackoverflow.com/comment/40755409

http://stackoverflow.com/a/25962990
upvote count: 3
answers question: http://stackoverflow.com/q/25962080
has body: Echoing what yuvi said, the 'live' function is deprecated. I'm not sure why you have your hover function inside an object, but you could also do it like this, using fadeTo: var mapObject = { hover : function(area, event) { var id = area.attr('name'); if (event.type == 'mouseover') { $('#'+ id).fadeTo(1000, 1.0); } else { $('#'+ id).fadeTo(1000, 0); } } }; $(function() { $('.area').bind('mouseover mouseout', function(event){ mapObject.hover($(this), event); }); }); Image Stand-in One Image Stand-in Two
downvote count: 0
type: Answer
score: 3

http://stackoverflow.com/a/25983260
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25983193
answers question: http://stackoverflow.com/q/25983193
has body: Getting 12:00:00am local time is very straightforward: var dt = new Date(); dt.setHours(0, 0, 0, 0); Those multiple arguments look quite odd, but setHours accepts hours and optionally minutes, seconds, and milliseconds. (function() { "use strict"; var dt = new Date(); dt.setHours(0, 0, 0, 0); display(dt); function display(msg) { var p = document.createElement("p"); p.innerHTML = String(msg); document.body.appendChild(p); } })(); Getting 11:59:59pm local time is similar: var dt = new Date(); dt.setHours(23, 59, 59, 999); // 999 = ms (function() { "use strict"; var dt = new Date(); dt.setHours(23, 59, 59, 999); // 999 = ms display(dt); function display(msg) { var p = document.createElement("p"); p.innerHTML = String(msg); document.body.appendChild(p); } })();
has comment: http://stackoverflow.com/comment/40687770
type: AcceptedAnswer

http://stackoverflow.com/q/25943554
has comment: http://stackoverflow.com/comment/40617087
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40616810
has comment: http://stackoverflow.com/comment/40617011
favorite count: 0
score: -1
has body: I'm running out of ideas here. I'm trying to make a side scroll bar to control the slide of the whole document. As you can see on my Jsfiddle I've been experimenting but couldnt get it to work. Here is the markup and css. You can see a more elaborate version at the link on the bottom. Any help is welcome. HTML &lt;div id="sidescroll"&gt; &lt;div id="sidescrollbtn"&gt;&lt;/div&gt; &lt;/div&gt; CSS #sidescroll{height:80px;width:10px;background:grey;border:1px solid black;margin:0 auto;} #sidescrollbtn{height:10px;width:10px;background:red;margin-top:10px;} http://jsfiddle.net/vinicius5581/33fx6dpr/
has comment: http://stackoverflow.com/comment/40617613
type: UnansweredQuestion
downvote count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/40616932
has comment: http://stackoverflow.com/comment/40683725
has comment: http://stackoverflow.com/comment/40617595
has comment: http://stackoverflow.com/comment/40616902
has comment: http://stackoverflow.com/comment/40617503
linked to: http://stackoverflow.com/q/9251354
upvote count: 1
has comment: http://stackoverflow.com/comment/40661754
has answer: http://stackoverflow.com/a/25969040
type: Question
has comment: http://stackoverflow.com/comment/40689566
has title: How to create a custom scrollbar to scroll the document vertically?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40617655

http://stackoverflow.com/comment/40657587
type: QuestionComment
type: Comment
has text: looks like your element is created after the script is executed... use [event delegation](http://learn.jquery.com/events/event-delegation/)
comment on: http://stackoverflow.com/q/25966849
score: 1

http://stackoverflow.com/comment/40667662
score: 0
has text: If you can't provide any guarantee of the format, it is not possible for us to do anything other than guess at a solution.
comment on: http://stackoverflow.com/q/25972515
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25930531
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40595694
score: 2
has comment: http://stackoverflow.com/comment/60082423
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/43930868
tagged with: javascript
has comment: http://stackoverflow.com/comment/43884337
favorite count: 0
has body: I wrote a custom zoom function for my svg using d3 like so: //Zoom behavior function myzoom() { xpos = d3.event.translate[0]; ypos = d3.event.translate[1]; vis.attr("transform", "translate(" + d3.event.translate + ") scale(" + d3.event.scale + ")"); } This works fine on non-touch devices, but when I zoom in on touch devices the d3.event.translate array sometimes starts containing NaN's. When this occurs all subsequent calls to myZoom also have this issue and zooming stops working. This is the error I receive is: Error: Invalid value for &lt;g&gt; attribute transform="translate(NaN,NaN) scale(0.8467453123625244)" d3.v2.js?body=1:387 attrConstant d3.v2.js?body=1:387(anonymous function) d3.v2.js?body=1:3860 d3_selection_each d3.v2.js?body=1:509 d3_selectionPrototype.each d3.v2.js?body=1:3859 d3_selectionPrototype.attr d3.v2.js?body=1:3638 myzoom fw_tree.js?body=1:2842 event d3.v2.js?body=1:64 (anonymous function) d3.v2.js?body=1:175 dispatch d3.v2.js?body=1:4826 mousewheel d3.v2.js?body=1:4855 wrapper d3.v2.js?body=1:492 Any help or pointers would be greatly appreciated
has title: d3.event.translate contains NaN on zoom for touch devices
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
downvote count: 0

http://stackoverflow.com/a/25924503
downvote count: 0
has body: I would suggest you have a look at the Knockout Mapping Plugin which will do most of what you want to do. If that doesn't workout then you can turn your bindings object into a series of constructor functions that accepts a data parameter. Something like var Employee = function (data){ var self = this; self.name = ko.observbale(data.name || ''); self.group = ko.observable(data.group); }; var Event = function(data){ var self = this; self.eventid = ko.observable(data.id || 0); self.office = ko.observable(data.office || ''); self.employee = ko.observable(new Employee(data.employee)); }; var bindings = function(data){ var self = this; self.event = ko.observable(new Event(data)); }
accepted answer of: http://stackoverflow.com/q/25920931
answers question: http://stackoverflow.com/q/25920931
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40603710
type: Answer
score: 2

http://stackoverflow.com/a/25983150
has comment: http://stackoverflow.com/comment/40687513
upvote count: 11
has body: You should be fine. Early users of JSON would often call eval() on the received string, which is of course a huge security hole. But JSON.parse, as you state, handles the majority of these kinds of sanity checks. As long as you make sure not to take something out of a received JSON object and pass it directly into a SQL query, for example, you should be fine.
answers question: http://stackoverflow.com/q/25983090
downvote count: 0
type: Answer
score: 11

http://stackoverflow.com/comment/40521184
type: AnswerComment
has text: Ok thanks for enlightening me. I have updated answer.
type: Comment
comment on: http://stackoverflow.com/a/25891178
score: 1

http://stackoverflow.com/a/25990170
upvote count: 1
answers question: http://stackoverflow.com/q/25978769
score: 1
accepted answer of: http://stackoverflow.com/q/25978769
has comment: http://stackoverflow.com/comment/40778234
has comment: http://stackoverflow.com/comment/40780648
has comment: http://stackoverflow.com/comment/40700807
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40762748
type: Answer
has body: It looks like $dia is an array is an array, containing an entry called 'categories'. I don't think you can somply echo the array variable in your highcharts code, as dia only exists in php on the server. You are returning the categories inside your json object in the 3rd entry of the array array_push($result,$dia); This means you have to read the categories out of the returned json in your highcharts code. Your code is hard to follow, but try this: xAxis: { categories: json[3]['categories']; }, However, I am worried about this line: series: json The returned json does not just contain series definitions as it contains the categories as well. It may work, but is not very clean code.
has comment: http://stackoverflow.com/comment/40780690
has comment: http://stackoverflow.com/comment/40738816

http://stackoverflow.com/a/25996498
has body: Ok, here you go, a working example at jsfiddle: http://jsfiddle.net/zymz2dLo/61/ window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame; // get canvas and create drawing context // this assumes there is some canvas with id 'myCanvas' var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); // create image var img = document.createElement("img"); // fill image from data string //img.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // insert a dot image contains 1px // or fill image from url img.src = "http://www.w3schools.com/tags/img_the_scream.jpg" // define the linear speeds var xSpeed = 0.05; //px per ms var ySpeed = 0.01; // this function will animate the next 'frame' // based on input from the last function animate(nowTime, lastTime, xPos, yPos) { if ((img.style.width + xPos) &gt; canvas.width) { xPos = 0; yPos = 0; } // calculate the delta in order to match the speed var timeDelta = nowTime - lastTime; var xDelta = xSpeed * timeDelta; var yDelta = ySpeed * timeDelta; // clear context.clearRect(0, 0, canvas.width, canvas.height); //draw img context.drawImage(img, xPos, yPos); //schedule animation for the next available frame requestAnimationFrame( //wrap animate in a anonymous function to //match the callback signature function(timestamp){ animate(timestamp, nowTime, xPos + xDelta, yPos + yDelta); } ); } animate(0, 0, 10, 1); additional info can be found here: http://www.w3schools.com/tags/canvas_drawimage.asp How to generate an Image from imageData in javascript? https://developer.mozilla.org/en/docs/Web/API/window.requestAnimationFrame EDIT : The above example updates as fast as possible, to scale it down a bit wrap the call to requestAnimationFrame in a setTimeout call.
downvote count: 0
answers question: http://stackoverflow.com/q/25994855
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40712511
has comment: http://stackoverflow.com/comment/40712206

http://stackoverflow.com/a/25898512
answers question: http://stackoverflow.com/q/25898094
has body: The only difference between the functions (open_web_client, open_web_client_2) is the openPopup size That is basically begging to become a parameter of your function: function open_web_client(e, size) { e.preventDefault(); if (!app.userIsLoggedIn()) { app.showLoginPopup(translate.login_required_to_play_for_real); } else { if (Utils.analytics_enabled()) { Utils.analytics_track_click('Play', $(this).attr("data-game-name")); } new GameWindow($(this).attr('href'), 'LOBBY').openPopup(size); } } $('a.ea_client').on("click", function(e) { open_web_client(e, '1100x800'); }); $('a.oneworks_client').on("click", function(e) { open_web_client(e, '1024x768'); }); A littlebit more advanced technique is to use a closure, with a function that creates the listener: function make_web_client_opener(size) { return function open_web_client(e) { e.preventDefault(); if (!app.userIsLoggedIn()) { app.showLoginPopup(translate.login_required_to_play_for_real); } else { if (Utils.analytics_enabled()) { Utils.analytics_track_click('Play', $(this).attr("data-game-name")); } new GameWindow($(this).attr('href'), 'LOBBY').openPopup(size); } }; } $('a.ea_client').on("click", make_web_client_opener('1100x800')); $('a.oneworks_client').on("click", make_web_client_opener('1024x768'));
score: 0
type: Answer

dom
tags question: http://stackoverflow.com/q/25936148
type: Tag
tags question: http://stackoverflow.com/q/25965846
tags question: http://stackoverflow.com/q/25936096
tags question: http://stackoverflow.com/q/25901763
tags question: http://stackoverflow.com/q/25920561
tags question: http://stackoverflow.com/q/25902346
tags question: http://stackoverflow.com/q/25935624
tags question: http://stackoverflow.com/q/26019447
tags question: http://stackoverflow.com/q/26008348
tags question: http://stackoverflow.com/q/26015626
tags question: http://stackoverflow.com/q/26024609
tags question: http://stackoverflow.com/q/26029147
tags question: http://stackoverflow.com/q/25875530
tags question: http://stackoverflow.com/q/25933193
tags question: http://stackoverflow.com/q/25874416
tags question: http://stackoverflow.com/q/25968005
tags question: http://stackoverflow.com/q/25910500
tags question: http://stackoverflow.com/q/25920694
tags question: http://stackoverflow.com/q/25980264
tags question: http://stackoverflow.com/q/25954780
tags question: http://stackoverflow.com/q/26006523
tags question: http://stackoverflow.com/q/25933160
tags question: http://stackoverflow.com/q/26032247
tags question: http://stackoverflow.com/q/25969416
tags question: http://stackoverflow.com/q/25913973
tags question: http://stackoverflow.com/q/25905076
tags question: http://stackoverflow.com/q/25883246
tags question: http://stackoverflow.com/q/25984971
tags question: http://stackoverflow.com/q/25925546
tags question: http://stackoverflow.com/q/25890174
tags question: http://stackoverflow.com/q/25893496
tags question: http://stackoverflow.com/q/26032971
tags question: http://stackoverflow.com/q/26025978
tags question: http://stackoverflow.com/q/25905103
tag name: dom
tags question: http://stackoverflow.com/q/25915860
tags question: http://stackoverflow.com/q/25966377
tags question: http://stackoverflow.com/q/26011248
tags question: http://stackoverflow.com/q/25880051
tags question: http://stackoverflow.com/q/25917775
tags question: http://stackoverflow.com/q/25888398
tags question: http://stackoverflow.com/q/26000771
tags question: http://stackoverflow.com/q/25953567
tags question: http://stackoverflow.com/q/25919388
tags question: http://stackoverflow.com/q/25971220
tags question: http://stackoverflow.com/q/26016160
tags question: http://stackoverflow.com/q/25916910
tags question: http://stackoverflow.com/q/25947606
tags question: http://stackoverflow.com/q/25993073
tags question: http://stackoverflow.com/q/25983279

http://stackoverflow.com/a/63893474
answers question: http://stackoverflow.com/q/25930741
type: Answer
has body: I've two use cases on the same page : When clicking save, if the response is an error, scroll to the errorDiv that displays the error to the user. David Kabii's answer did work for me. However, on the load of the page, in the controller, I want to scroll to a specific area of the page where the user's input is expected. This wouldn't work. I had to use window.setTimeout to workaround this. (there's probably a better way) window.setTimeout(function(){ $location.hash("anchorForm"); $anchorScroll(); }, 300);
score: 0

http://stackoverflow.com/a/26032571
score: 0
answers question: http://stackoverflow.com/q/26024605
has comment: http://stackoverflow.com/comment/40793551
has comment: http://stackoverflow.com/comment/40791704
has comment: http://stackoverflow.com/comment/40789202
has comment: http://stackoverflow.com/comment/40797772
has comment: http://stackoverflow.com/comment/40797676
has comment: http://stackoverflow.com/comment/40789599
type: Answer
has comment: http://stackoverflow.com/comment/40793460
has comment: http://stackoverflow.com/comment/40792563
has comment: http://stackoverflow.com/comment/40791577
has comment: http://stackoverflow.com/comment/40795973
has comment: http://stackoverflow.com/comment/40795017
has comment: http://stackoverflow.com/comment/40789586
has comment: http://stackoverflow.com/comment/40792904
has comment: http://stackoverflow.com/comment/40800783
has comment: http://stackoverflow.com/comment/40792669
has body: $(function () { $(".copybtn").click (function (e) { Var txtMsgVal = $(this).parent().parent().find(".txtMsg").text(); // Do something with the txtMsgVal here alert(txtMsgVal); }); }); You just need a class attribute on both the button and the input (the message). Note: I have used jQuery in this answer so you have to include the jQuery library in your source code. Good luck ;)

http://stackoverflow.com/q/25874826
upvote count: 7
answer count: 1
favorite count: 0
tagged with: facebook
tagged with: lazy-evaluation
type: AnsweredQuestion
downvote count: 0
score: 7
has answer: http://stackoverflow.com/a/25875258
accepted answer: http://stackoverflow.com/a/25875258
type: Question
has body: I recently heard about Facebook's Immutable.js library (https://github.com/facebook/immutable-js). I am confused about the following from their documentation: var oddSquares = Immutable.Sequence(1,2,3,4,5,6,7,8) .filter(x =&gt; x % 2).map(x =&gt; x * x); console.log(oddSquares.last()); In this example, no intermediate arrays are ever created, filter is only called twice, and map is only called once How is filter called only twice, map once?
tagged with: lazy-sequences
tagged with: javascript
has title: Immutable.js - lazy sequence

http://stackoverflow.com/q/25953506
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25997723
score: 0
has comment: http://stackoverflow.com/comment/40632681
has comment: http://stackoverflow.com/comment/40632772
answer count: 1
tagged with: javascript
has body: I am using session storage to grab my access token generated on the end of my URL by Instagram when a user has authenticated. This isn't working for me on my localhost, please look at the pen I have created as an example of the output. http://codepen.io/anon/pen/eHGBf#access_token=12345.67890 Here is the code I am using: var token = window.location.hash.substr(1).split("="); var storeToken = token[1]; if (typeof(Storage) != 'undefined') { sessionStorage.setItem('accessToken', storeToken); document.getElementById('access_token').innerHTML = sessionStorage.getItem('accessToken'); } else { document.getElementById('access_token').innerHTML = 'Sorry, your browser does not support Web Storage'; } and to display the access token: &lt;div id="access_token"&gt;&lt;/div&gt; When I refresh the page on my localhost (without the access token in the URL) or navigate to other pages and back to the homepage where the token has been displayed in the ID, it returns 'undefined' and I have to log in again. I thought it should have saved the token? Any help is greatly appreciated.
has comment: http://stackoverflow.com/comment/40632845
accepted answer: http://stackoverflow.com/a/25997723
has title: HTML5 session storage not working
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40632708

http://stackoverflow.com/comment/40523155
comment on: http://stackoverflow.com/q/25890772
score: 0
type: QuestionComment
has text: Forget about jQuery and `$.fn` instantly. They're no good examples for proper design.
type: Comment

http://stackoverflow.com/comment/40499193
type: Comment
score: 0
has text: *"the server is only a hosting server it's not a vps so I can't install webkit or phantomjs on it.."*
type: AnswerComment
comment on: http://stackoverflow.com/a/25878638

http://stackoverflow.com/q/25977870
tagged with: asp.net
favorite count: 0
has body: I have got a checkbox and want to display the confirmation message when it is clicked I added the event binding in Code Behind file as below. chkSMTLock.Attributes.Add("onclick", "return ConfirmSMTLock();"); The following is my HTML code for chkSMTLock &lt;asp:CheckBox ID="chkSMTLock" runat="server" AutoPostBack="true" OnCheckedChanged="chkSMTLock_CheckedChanged" Text="SMT Lock" /&gt; Here is my javascript: function ConfirmSMTLock() { var r = confirm('Are you sure that you want to SMT lock/unlock this account?'); console.log(r); return r; } When I run it, I can see the confirmation values (true/ false) in the browser console logs, but, it's not calling any server side code. My server side code is very simple with logging... protected void chkSMTLock_CheckedChanged(object sender, EventArgs e) { Utils.Debug("chkSMTLock_CheckedChanged"); } When I remove javascript event binding for the checkbox, it executes the ServerSide event successfully. But When I put it back, it stops working. How can I use the confirmation message box to control it?
has comment: http://stackoverflow.com/comment/40677376
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25990374
possible better answer: http://stackoverflow.com/a/25978832
upvote count: 1
has comment: http://stackoverflow.com/comment/40678440
has answer: http://stackoverflow.com/a/25978832
type: Question
tagged with: c#
answer count: 2
downvote count: 0
tagged with: javascript
has title: ASP.Net Checkbox Confirm Message not working
has answer: http://stackoverflow.com/a/25990374
has comment: http://stackoverflow.com/comment/40677709

http://stackoverflow.com/a/25939830
upvote count: 1
has body: Though not compatible with Opera, this should accomplish your goal: http://jsfiddle.net/6o3f3em6/1/ Use getComputedStyle to get all CSS attributes of target element Stringify the object into CSS Apply the cssText to the receiving element Here is the relevant code: var target = document.querySelector('#p1'); var receiver = document.querySelector('#p2'); var styles = getComputedStyle(target); var cssText = ''; for(var style in styles){ cssText += style+':'+styles[style]; } receiver.style.cssText = cssText;
answers question: http://stackoverflow.com/q/25939672
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/25947437
accepted answer: http://stackoverflow.com/a/25947880
has comment: http://stackoverflow.com/comment/40622573
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40622950
downvote count: 4
has comment: http://stackoverflow.com/comment/40622802
answer count: 1
has comment: http://stackoverflow.com/comment/40622526
favorite count: 0
has comment: http://stackoverflow.com/comment/40622714
has body: JQuery selector with multiple conditions Email Validation hi i have to validate Email address. my following code works fine: contact_email = $('#contact_email').val(); var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; //if Email address is empty it allowed but if it have any value then check whether proper email address or not if(contact_email &amp;&amp; !reg.test(contact_email)) { err += 1; $('#contact_email').addClass('boxerror'); } it works but following code not work contact_email = $('#contact_email').val().is(reg.test(this.val())).addClass('boxerror'); 1.what mistake i had done? 2.JQuery with selector with multiple condition is possible
has comment: http://stackoverflow.com/comment/40622594
score: -3
has answer: http://stackoverflow.com/a/25947880
has comment: http://stackoverflow.com/comment/40622550
type: AnsweredQuestion
has title: JQuery Selector With Some Conditions
has comment: http://stackoverflow.com/comment/40623306
upvote count: 1
type: Question

http://stackoverflow.com/comment/40620770
has text: possible duplicate of [How can I override the OnBeforeUnload dialog and replace it with my own?](http://stackoverflow.com/questions/276660/how-can-i-override-the-onbeforeunload-dialog-and-replace-it-with-my-own)
score: 0
comment on: http://stackoverflow.com/q/25946106
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25997880
type: AcceptedAnswer
downvote count: 0
has body: Meteor is not a web server. Especially, it cannot terminate SSL/TLS. That's why you might want nginx running in front of meteor.
answers question: http://stackoverflow.com/q/25985382
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25985382
type: Answer
score: 2

http://stackoverflow.com/comment/40628962
type: QuestionComment
comment on: http://stackoverflow.com/q/25950866
has text: Ok now the question is: Why a script placed at the bottom of the paged is executed twice?
score: 0
type: Comment

http://stackoverflow.com/a/25969788
answers question: http://stackoverflow.com/q/25969606
type: Answer
score: 0
has body: Looks how $(...).toggle('slide', { direction: 'left' }, 500); works in different jQuery versions: jQuery 1.7.2 + jQuery UI 1.8.18 jQuery 1.9.1 + jQuery UI 1.9.2 jQuery edge + jQuery UI 1.8.5 - not working

http://stackoverflow.com/comment/40737026
score: 0
type: QuestionComment
type: Comment
has text: Do you want to select ABCD automatically when you remove Status?
comment on: http://stackoverflow.com/q/26010600

http://stackoverflow.com/a/25911029
has comment: http://stackoverflow.com/comment/40593308
has comment: http://stackoverflow.com/comment/40595938
has comment: http://stackoverflow.com/comment/40597538
upvote count: 1
answers question: http://stackoverflow.com/q/25910362
has comment: http://stackoverflow.com/comment/40596326
has comment: http://stackoverflow.com/comment/40595234
score: 1
has body: Here is a simple solution http://jsfiddle.net/u6sgoLfh/6/ for infinite slider var slideCount = $('.newslider .inner img').length; var slideWidth = $('.newslider .inner img').width(); var slideHeight = $('.newslider .inner img').height(); var sliderWidth = slideCount * slideWidth; var margin = ($(window).outerWidth(true) - slideWidth)/2; $('.newslider').css({ width: slideWidth, height: slideHeight }); $('.newslider .inner').css({ width: sliderWidth, marginLeft: - slideWidth }); $('.newslider .inner img:last-child').prependTo('.newslider .inner'); function moveLeft() { $('.newslider .inner').animate({ left: + slideWidth }, 200, function () { $('.newslider .inner img:last-child').prependTo('.newslider .inner'); $('.newslider .inner').css('left', ''); }); }; function moveRight() { $('.newslider .inner').animate({ left: - slideWidth }, 200, function () { $('.newslider .inner img:first-child').appendTo('.newslider .inner'); $('.newslider .inner').css('left', ''); }); }; $('.newslider').find('img').each(function() { $(this).css('float','left'); }); $(document).keydown(function(e) { if(e.which === 37) { moveLeft(); } else if(e.which === 39) { moveRight() } }); $('.newslider').on('click', function() { moveLeft(); }); $('.newslider').css({ 'width':$(window).outerWidth(true), 'overflow':'hidden' }); $('.newslider').children('.inner').css({ 'width':sliderWidth, 'position':'relative', 'overflow':'hidden', 'left':'-'+margin+'px' });
downvote count: 0
has comment: http://stackoverflow.com/comment/40595834
type: Answer
has comment: http://stackoverflow.com/comment/40596440
has comment: http://stackoverflow.com/comment/40589127

http://stackoverflow.com/a/25996823
accepted answer of: http://stackoverflow.com/q/25991842
answers question: http://stackoverflow.com/q/25991842
type: AcceptedAnswer
has body: What you need is to use a headless browser like PhantomJS, which can call the page and interact with the widgets like the user would. More information on how to run PhantomJS from C# can be found here.
downvote count: 0
type: Answer
upvote count: 2
score: 2

wordpress
tags question: http://stackoverflow.com/q/25950072
tags question: http://stackoverflow.com/q/25893340
tags question: http://stackoverflow.com/q/26001166
tags question: http://stackoverflow.com/q/25922320
tags question: http://stackoverflow.com/q/25877121
tags question: http://stackoverflow.com/q/25993559
tags question: http://stackoverflow.com/q/25916412
tags question: http://stackoverflow.com/q/25981435
tags question: http://stackoverflow.com/q/25915110
tags question: http://stackoverflow.com/q/25916873
tags question: http://stackoverflow.com/q/26011592
tags question: http://stackoverflow.com/q/25999523
tags question: http://stackoverflow.com/q/25889616
tags question: http://stackoverflow.com/q/25897173
tags question: http://stackoverflow.com/q/25942304
tags question: http://stackoverflow.com/q/25928807
tags question: http://stackoverflow.com/q/26031065
tags question: http://stackoverflow.com/q/25908226
tags question: http://stackoverflow.com/q/25934900
tags question: http://stackoverflow.com/q/25969422
tags question: http://stackoverflow.com/q/25886919
tags question: http://stackoverflow.com/q/25920849
tags question: http://stackoverflow.com/q/25933393
tags question: http://stackoverflow.com/q/26008363
tags question: http://stackoverflow.com/q/26032174
tags question: http://stackoverflow.com/q/26008983
tags question: http://stackoverflow.com/q/25961928
tags question: http://stackoverflow.com/q/25933777
tags question: http://stackoverflow.com/q/25970312
tags question: http://stackoverflow.com/q/25946286
tags question: http://stackoverflow.com/q/25913283
tags question: http://stackoverflow.com/q/25999294
tags question: http://stackoverflow.com/q/26003525
tags question: http://stackoverflow.com/q/25964346
tags question: http://stackoverflow.com/q/25977925
tags question: http://stackoverflow.com/q/25881723
tags question: http://stackoverflow.com/q/25979512
tags question: http://stackoverflow.com/q/26019892
tag name: wordpress
tags question: http://stackoverflow.com/q/26032884
tags question: http://stackoverflow.com/q/25940185
tags question: http://stackoverflow.com/q/25880139
tags question: http://stackoverflow.com/q/25965723
tags question: http://stackoverflow.com/q/25986121
tags question: http://stackoverflow.com/q/25943792
tags question: http://stackoverflow.com/q/25932723
tags question: http://stackoverflow.com/q/25943908
tags question: http://stackoverflow.com/q/25981933
tags question: http://stackoverflow.com/q/25873969
type: Tag
tags question: http://stackoverflow.com/q/25882783

http://stackoverflow.com/comment/40523081
has text: Sorry if i am being unclear. The object is created in a random manner. So what i want is the object to be arranged as per the showorder property. so if showorder is 4 it should come in the key of 4 and not have the object of showorder 9. showorder 9 should come under the key of 9. Thanks
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25891848

http://stackoverflow.com/q/25922346
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40578913
has title: center horizontally an unspecified number of divs?
has answer: http://stackoverflow.com/a/25922590
type: Question
has body: I want to implement a button that adds a X number of elements next to each other (horizontally), but lets say everything should look centered, so the first div should appear in the middle, but if I clic again, the second div should appear next to the first one, but they both must look equally centered, and so on. I really don't know if I explained myself and thanks in advance.
score: 0
has comment: http://stackoverflow.com/comment/40578777
answer count: 1

http://stackoverflow.com/comment/40537031
type: QuestionComment
comment on: http://stackoverflow.com/q/25899411
type: Comment
has text: You want them to fadeIn and stay there ... without fading out eventually?
score: 0

http://stackoverflow.com/comment/40553338
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25908900
has text: The onclick handler of the div in 'page-content' gets fired if we touch the overlay div when its visible.

http://stackoverflow.com/comment/40539165
has text: Good idea. Let me try to fix that. Maybe check that when clicked
score: 0
comment on: http://stackoverflow.com/q/25900468
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25977298
has comment: http://stackoverflow.com/comment/40678675
has comment: http://stackoverflow.com/comment/40676896
favorite count: 0
linked to: http://stackoverflow.com/q/2592092
has title: Javascript File from Local Storage
upvote count: 2
has answer: http://stackoverflow.com/a/25978557
has comment: http://stackoverflow.com/comment/40677990
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40677841
type: Question
has answer: http://stackoverflow.com/a/25978040
has body: I have a large JavaScript file that I'd rather not send to the client on each request and it's too large for the browser to cache. My thought is that I will save the file to HTML5 local storage and attempt to retrieve it. If the file is found then I'd like to link/import/export(I don't know the proper terminology) it into the same scope that a html src tag would. My question is: how do I take a file that I've pulled from local storage and get my webpage to recognize it as a JavaScript file that was included via src tag? (minus the logic for pulling the file from storage)
accepted answer: http://stackoverflow.com/a/25978557
score: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40679441
possible better answer: http://stackoverflow.com/a/25978899
has answer: http://stackoverflow.com/a/25978899
answer count: 3
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/11000052

http://stackoverflow.com/comment/40625017
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25948468
type: AnswerComment
has text: Using your selector the console would log a 'click' when clicking on a menu item. A menu item without a href would also cause the console to log the 'click' without loading a new page. But it does not. So it seems that jQuery does not catch the click. Strange thing is that replacing the selector with $('*') works, but it should not catch every click of course...

http://stackoverflow.com/comment/40500935
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25879413
has text: I would try attaching the click event to the button, adjustin the padding on the footer could be moving the click box.

http://stackoverflow.com/q/25943760
has answer: http://stackoverflow.com/a/25943780
has comment: http://stackoverflow.com/comment/40617189
has body: SO i am new to coding. So basically I am wondering whether it is possible to have prompt inside a function. AN example of my code is below: var userName = function(name) { var n = prompt("Whats your name?"); console.log(n) }; I also want to print out the name that is going to be inputted. Thanks
has answer: http://stackoverflow.com/a/25943776
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40807559
tagged with: javascript
score: 0
has title: Prompt inside a function
has comment: http://stackoverflow.com/comment/40617144
type: UnansweredQuestion

http://stackoverflow.com/a/25985171
has body: The sorting code for transparent objects changed in r68. It works again if you invert the order from AddTriangle (scene, material, 0.0); AddTriangle (scene, material, 0.3); to AddTriangle (scene, material, 0.3); AddTriangle (scene, material, 0.0);
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25960691
answers question: http://stackoverflow.com/q/25960691

http://stackoverflow.com/comment/40756995
score: 0
has text: Well, I've just edited my post to that solution..but I will edit again and accept your answer.
type: Comment
comment on: http://stackoverflow.com/a/26021571
type: AnswerComment

http://stackoverflow.com/comment/40609560
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25939318
has text: See http://stackoverflow.com/q/3726357/218196 maybe.
score: 0

http://stackoverflow.com/q/25926711
tagged with: css
type: AnsweredQuestion
has title: Can You See Something Missing In My Javascript File?
has comment: http://stackoverflow.com/comment/40586365
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40586528
has comment: http://stackoverflow.com/comment/40586358
upvote count: 0
has comment: http://stackoverflow.com/comment/40586372
has body: I'm attempting to recreate this JSfiddle locally on my machine: http://jsfiddle.net/jakecigar/LM8Gd/1/ I don't understand though because it will goto the menu screen like on the fiddle above, but the animations will not happen and the question will not cycle through. It will only stay on the length? question and stay there and none of the buttons will do anything. I have 3 files: index.html, js.js, and styles.css. index.html: Untitled Document length? Too big big medium small tiny width? Too big big medium small tiny weight? Too big big medium small tiny back styles.css: @charset "utf-8"; /* CSS Document */ .questionnaire label { display:block; clear:both } .questionnaire fieldset:not(:first-child) { display:none } js.js: $(function () { $(".questionnaire input[type='radio']").click(function () { var fs = $(this).closest("fieldset"), next = fs.nextAll('fieldset:first'); fs.slideUp('fast'); if (next.length) { next.slideDown('fast') } else { alert("do some computation") } }) $(".questionnaire button.back").click(function(){ var fs=$(this).siblings(":visible"), prev=fs.prevAll('fieldset:first'); if (prev.length){ fs.slideUp('fast') prev.slideDown('fast') } }) })
tagged with: javascript
has answer: http://stackoverflow.com/a/25926767
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/40586447
has comment: http://stackoverflow.com/comment/40586342
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25926767

http://stackoverflow.com/q/25933951
answer count: 1
has comment: http://stackoverflow.com/comment/40599843
type: UnansweredQuestion
tagged with: iframe
has body: I need to parse a content that is dynamically generated by a javascript from a remote page. For example, I need to get the price from this page: http://www.alibaba.com/product-detail/BRG-Newest-Fashional-Protective-Case-For_1666645206.html#J-wrapper but the price is generated by a javascript, so when I download the page with ajax, it downloads only the html file without the results of the scripts. So I tried to embed in the background an iframe and then parse the document inside this iframe, but there is a security issue that doesn't let me parse it. Do you know if there is another way I can do it? The function that I use is this: $.ajax({ url: url, dataType: 'text', success: function(html, _, xhr) {}); but the resulting HTML is without the scripts information, so the price is empty. I tried to use also: contents demo but I get this error: Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "null" from accessing a frame with origin "api.jquery.com". The frame requesting access has a protocol of "file", the frame being accessed has a protocol of "http". Protocols must match.
type: Question
has comment: http://stackoverflow.com/comment/40599471
has title: How to parse a web page from a local javascript file
tagged with: javascript
has comment: http://stackoverflow.com/comment/40600031
score: 0
tagged with: google-chrome-app
has answer: http://stackoverflow.com/a/25934728

url-rewriting
tags question: http://stackoverflow.com/q/26000555
type: Tag
tag name: url-rewriting

http://stackoverflow.com/comment/40907630
has text: Hi Mottie ! This is a good start , would this work for the filter widget?
type: AnswerComment
comment on: http://stackoverflow.com/a/26030530
score: 0
type: Comment

http://stackoverflow.com/comment/82791346
comment on: http://stackoverflow.com/q/25982453
type: QuestionComment
has text: See https://stackoverflow.com/questions/44860043/rotating-css-cube-on-fixed-axes
score: 0
type: Comment

http://stackoverflow.com/a/25997026
has comment: http://stackoverflow.com/comment/87411214
score: 26
accepted answer of: http://stackoverflow.com/q/25995334
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25995334
has comment: http://stackoverflow.com/comment/87333991
has body: You should try to do something like this: App.MapView = Ember.View.extend({ // if you are not using Ember.get/set you'd better make this "private" _map: null, didInsertElement: function() { this._map = new ol.Map(...); }, willDestroyElement: function() { this._map.setTarget(null); this._map = null; } }); It detach the map from its element and allows correct garbage collection. Don't forget to remove any other references to the map object too if any.
type: Answer
upvote count: 26

http://stackoverflow.com/a/25939673
has body: In the optionsText you need to specify your property name is a string. So you need to write See also in the documentation: Example 3: Drop-down list representing arbitrary JavaScript objects, not just strings Alternatively if you need a more complex logic to calculate the option text you can also specify the optiosText as a function:
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25939644
downvote count: 0
has comment: http://stackoverflow.com/comment/40609728
type: Answer

http://stackoverflow.com/a/25936083
has comment: http://stackoverflow.com/comment/40617112
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25935999
has body: You can do if (err) throw err; if the error is fatal and you want your program to crash, because there is no way to catch such an error. If you write a library or a server application you should pass error to callback.
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40604176
has comment: http://stackoverflow.com/comment/40603008
score: 2
has comment: http://stackoverflow.com/comment/40603285
has comment: http://stackoverflow.com/comment/40614154
answers question: http://stackoverflow.com/q/25935999
has comment: http://stackoverflow.com/comment/40608464

http://stackoverflow.com/comment/40553882
comment on: http://stackoverflow.com/a/25908174
has text: Why are you iterating through acontact.customers in your ng-repeat instead of just customers? Shouldn't it be ng-repeat="customer in customers"? Try it like this ...
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25946417
upvote count: 1
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25932152
has body: It's 2014 and JQuery is slowly on its way out, even if many devs are still too used to it to give it up. If you are working on a very reusable component, I would write it in vanilla js; else you can write it in react yes, if it helps you to keep the bug count lower, but some people won't use it because of the dependency on react.js, probably.

http://stackoverflow.com/q/26027367
tagged with: graph
tagged with: javascript
has body: I recently started working on d3.js. I am developing a interactive multiple line graph with dual x-axis. Please take a look at my work, JSFiDDLE: http://jsfiddle.net/dalapati/88bsax53/2/ data1 = [{ "date": 1357717800000, "value": "5.6" }, { "date": 1357718400000, "value": "5.6" }, { "date": 1357719000000, "value": "6" }, { "date": 1357719600000, "value": "5.1" }, { "date": 1357720200000, "value": "5.3" }, //{"date": 1357720800000,"value": "5.4"} ]; data2 = [{ "date": 1357714800000, "value": "5.2" }, { "date": 1357715400000, "value": "5.2" }, { "date": 1357716000000, "value": "5.2" }, { "date": 1357716600000, "value": "5.1" }, { "date": 1357717200000, "value": "5.5" }, ] // date manipulation to format UTC to js Date obj data1.forEach(function (d) { d.time = new Date(d.time * 1000); }); data2.forEach(function (d) { d.time = new Date(d.time * 1000); }); // helpers and constants var margin = { "top": 50, "right": 50, "bottom": 50, "left": 100, "axis": 55 }; var width = 800 - margin.left - margin.right; var height = 580 - margin.top - margin.bottom; var timeFormat = d3.time.format("%X"); // find data range var x1Domain = d3.extent(data1, function (d) { return d.date; }); var x2Domain = d3.extent(data2, function (d) { return d.date; }); var x1Min = d3.min(data1, function (d) { return Math.min(d.date); }); var x1Max = d3.max(data1, function (d) { return Math.max(d.date); }); var x2Min = d3.min(data2, function (d) { return Math.min(d.date); }); var x2Max = d3.max(data2, function (d) { return Math.max(d.date); }); var y1Min = d3.min(data1, function (d) { return Math.min(d.value); }); var y1Max = d3.max(data1, function (d) { return Math.max(d.value); }); var y2Min = d3.min(data2, function (d) { return Math.min(d.value); }); var y2Max = d3.max(data2, function (d) { return Math.max(d.value); }); var yMin = (y1Min < y2Min) ? y1Min : y2Min; var yMax = (y1Max > y2Max) ? y1Max : y2Max; // scales var x1Scale = d3.time.scale() .domain(d3.extent(data1, function (d) { return d.date; })…
upvote count: 1
tagged with: jquery
favorite count: 0
has title: Re: Trying to Drag a line graph in a multiple axis line graph in D3.js
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/40641816
comment on: http://stackoverflow.com/q/25958510
score: 2
has text: Leave out the part. Just use the code.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40547494
type: Comment
has text: search search here, in google or SO: `ajax javascript`
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25905364

http://stackoverflow.com/comment/40668739
comment on: http://stackoverflow.com/a/25972445
score: 0
type: AnswerComment
has text: When I started, I used a div. font color and such worked but class or id css didn't.
type: Comment

http://stackoverflow.com/comment/40544315
comment on: http://stackoverflow.com/q/25903438
score: 0
type: QuestionComment
has text: These variables should be stored now in session memory. These will be available on any page a session is started, until overwritten or destroyed, or by browser closing/timing out. You can call them: $somthing = $_SESSION['carrier']; or how ever you need to use them. <input name='blah' value='<?php echo $_SESSION['carrier'];?>'>
type: Comment

smooth-scrolling
tags question: http://stackoverflow.com/q/26026558
tags question: http://stackoverflow.com/q/25923550
tag name: smooth-scrolling
tags question: http://stackoverflow.com/q/25987451
type: Tag

http://stackoverflow.com/comment/40671603
type: QuestionComment
has text: No, tested it (Comment it out). Same result
comment on: http://stackoverflow.com/q/25974541
score: 0
type: Comment

http://stackoverflow.com/q/25900865
has comment: http://stackoverflow.com/comment/40569230
tagged with: mobile
has comment: http://stackoverflow.com/comment/40566783
answer count: 0
has comment: http://stackoverflow.com/comment/40565513
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18146350
tagged with: http://stackoverflow.com/tag/html
has body: The problem I'm having is .focus() doesn't pull up the mobile datepicker, as my input type is 'date'. Therefore I tried to have trigger('click tap') on the input box and that doesn't work either. To reiterate, on my desktop it works fine, the box gets focused, but on a phone (mobile safari) the box is focuses BUT no datepicker shows up. This datepicker/spinner is the default html5 in mobile browsers, AFAIK. &lt;form id="mobileAgeGate" onsubmit="return false;"&gt; &lt;input id="mobileDate" type="text" onfocus="this.type='date'" onblur="this.type='text'" name="date" min="1900-01-01" class="date-mobile" placeholder="mm/dd/yyyy" pattern="(?:0?2[/.-](?:[12][0-9]|0?[1-9])|(?:0?[469]|11)[/.-](?:30|[12][0-9]|0?[1-9])|(?:0?[13578]|1[02])[/.-](?:3[01]|[12][0-9]|0?[1-9]))[/.-][0-9]{4}"&gt; &lt;/form&gt; And the js, inside the document ready as normal: if ($('#mobileDate').length) { setTimeout(function() { // $('#mobileDate').focus(); // This one works (but no mobile spinner pops up) // $('input[name="date"]').focus(); // This one works (but no mobile spinner pops up) $('#mobileDate').css('background-color', 'gray'); // to test something is indeed happening; ok $('input[name="date"]').trigger('click tap mouseover'); // This doesn't even focus }, 3000); } The timer isn't really important to the question, but it's there to wait a little before the (if I could get it to work) datespinner pops up. Many thank yous for any help or thoughts! - Chris
has title: triggering a click event in mobile input box
has comment: http://stackoverflow.com/comment/40539758
type: Question
tagged with: datepicker
has comment: http://stackoverflow.com/comment/40986165
score: 0

http://stackoverflow.com/comment/40548303
score: 0
has text: When you put them at the bottom of the view, do you put them in the correct order (which is different from alphabetical order of filenames)?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25905940

http://stackoverflow.com/q/25905412
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/53069578
tagged with: php
has comment: http://stackoverflow.com/comment/40547878
has title: Jquery Validation File size validation rule
upvote count: 3
type: Question
has body: If the file size is more than 2MB or less than 2mb it always display File size more than 2mb &lt;script&gt; $.validator.addMethod('filesize', function(value, element, param) { var param = 2000; // element = element to validate (&lt;input&gt;) // value = value of the element (file name) return this.optional(element) || (element.files[0].size &lt;= param) }); $("#dealDetails").validate({ rules : { "dealcatg" : { required: true }, "deal_image":{ required : true, accept : "image/*", filesize : true, } }); &lt;/script&gt; Its always return false.
tagged with: javascript
has answer: http://stackoverflow.com/a/32609711
score: 3
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/30282327
has body: The switch(true) part of this statement helped me. I was trying to do a switch statement for fizzbuzz. My solution incorporates the coding style of Rosettacodes - general solution. Most significantly the use of force typing to shorten the primary conditionals. I thought, it was valuable enough to post: var fizzBuzzSwitch = function() { for (var i =0; i &lt; 101; i++){ switch(true) { case ( !(i % 3) &amp;&amp; !(i % 5) ): console.log('FizzBuzz'); break; case ( !(i % 3) ): console.log('Fizz'); break; case ( !(i % 5) ): console.log('Buzz'); break; default: console.log(i); } } }
answers question: http://stackoverflow.com/q/26019823
score: 0
type: Answer

http://stackoverflow.com/comment/40686438
has text: that's the problem, I don't know it
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25982680
type: AnswerComment

http://stackoverflow.com/a/26021885
score: 3
accepted answer of: http://stackoverflow.com/q/26021658
answers question: http://stackoverflow.com/q/26021658
type: AcceptedAnswer
downvote count: 0
has body: You can assign the object as a variable instead and declare each function as a method to that variable, thus, you avoid using bind. app.factory('Poller', function ($http, $q, $interval) { var poll = {}; poll.timer = null; poll.checkProgress = function (url, user_uuid) { var deferred = $q.defer(); $http({method: 'GET', url: '/api/v1/poll/profile/', json: true, params: {url: url, user_uuid: user_uuid}}) .success(function (data) { deferred.resolve(data); }).error(function () { deferred.reject("Error checking poll"); }); return deferred.promise; }; poll.start = function (url, user_uuid) { poll.timer = $interval(function () { poll.checkProgress(url,user_uuid).then(function (result) { console.log(result); }, function (error) { alert(error); }); }, 1000); }; poll.stop = function() { $window.clearInterval(poll.timer); }; return poll; });
type: Answer
has comment: http://stackoverflow.com/comment/40759982
upvote count: 3

datepicker
tags question: http://stackoverflow.com/q/25968984
tags question: http://stackoverflow.com/q/25980937
tags question: http://stackoverflow.com/q/25994239
tags question: http://stackoverflow.com/q/25900663
tags question: http://stackoverflow.com/q/25900727
tags question: http://stackoverflow.com/q/25877346
tags question: http://stackoverflow.com/q/25944245
tag name: datepicker
tags question: http://stackoverflow.com/q/26022803
type: Tag
tags question: http://stackoverflow.com/q/25900865
tags question: http://stackoverflow.com/q/25905652
tags question: http://stackoverflow.com/q/25877419
tags question: http://stackoverflow.com/q/25887995
tags question: http://stackoverflow.com/q/25990542

http://stackoverflow.com/comment/40502277
comment on: http://stackoverflow.com/q/25880120
type: QuestionComment
score: 0
has text: @RobertoLinares - I have checked the javascript console using firebug there are no errors recorded.
type: Comment

http://stackoverflow.com/comment/40537517
has text: Yes that works! The two methods that don't correspond are due to the fact that I changed my code to have a simpler exemple for SO. But where I was wrong, in fact, is with the 'click .sportsMan' instead of just 'click'. Thank you so much!
type: Comment
comment on: http://stackoverflow.com/a/25899817
score: 0
type: AnswerComment

http://stackoverflow.com/q/25901740
has title: NodeJS Cannot set headers error when I'm not setting any
has answer: http://stackoverflow.com/a/25902046
accepted answer: http://stackoverflow.com/a/25902046
tagged with: node.js
type: Question
type: AnsweredQuestion
tagged with: mongodb
answer count: 1
tagged with: javascript
score: 0
has body: I have a middleware function to check to make sure that the user is logged in on each page load like this app.use(function(req, res, next) { if (req.cookies.hasOwnProperty('rememberToken')) { app.get('db').Users.find({'rememberToken': req.cookies.rememberToken}, function(errFind, resultsFind) { if (errFind) { return next(); } else if (resultsFind.length === 0) { return next(); } app.locals.isLoggedIn = true; app.locals.username = resultsFind[0].user_username; return next(); }); } else if (req.session.hasOwnProperty('isLoggedIn')) { app.locals.isLoggedIn = true; app.locals.username = req.session.username; console.log(app.locals); return next(); } return next(); }); The only problem is when it's doing the cookie auth I get this error: GET / 500 3ms Error: Can't set headers after they are sent. I have narrowed it down within the function that the error is coming from app.get('db').Users.find({'rememberToken': req.cookies.rememberToken}, function(errFind, resultsFind) { }); If I remove this function the error goes away, I'm not sure why using this function is causing this error can anybody help me out here. I have this line of middleware before my routes in app.js

http://stackoverflow.com/comment/40697169
type: QuestionComment
has text: http://scribu.net/blog/javascript-var-keyword-for-php-developers.html - "Inside a function, all undeclared variables are global. Only those declared with var are local."
score: 0
comment on: http://stackoverflow.com/q/25988531
type: Comment

http://stackoverflow.com/a/25940659
accepted answer of: http://stackoverflow.com/q/25940422
has comment: http://stackoverflow.com/comment/40611905
has comment: http://stackoverflow.com/comment/40611973
answers question: http://stackoverflow.com/q/25940422
has body: The problem is that angular also listens to DOMContentLoaded and once it is fired it looks for module called myApp, because you specified it in ng-app="myApp" directive. If you want to change this behaviour you should bootstrap angular yourself. In your case you need to remove ng-app="myApp" from your div and add angular.bootstrap(..., ['myApp']); to your Shell() constructor after you defined module and defined all services, directives, controllers and other module related stuff, since after module is bootstrapped you will not be able to do it any longer. HTML &lt;div id="result" ng-cloak&gt; ... &lt;/div&gt; Shell var app = angular.module("myApp", []); app.controller("MyController", function($scope) { ... }); // &lt;= Define here all module related stuff angular.bootstrap(document.getElementById('result'), ['myApp']);
has comment: http://stackoverflow.com/comment/40611736
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40612515
type: Answer
has comment: http://stackoverflow.com/comment/40611556

http://stackoverflow.com/q/25967464
upvote count: 0
accepted answer: http://stackoverflow.com/a/25967560
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/1732348
answer count: 2
has title: Regex to select everything inside any tag
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/40658701
has body: Currently I have found a regular expression to find any and it's contents. <([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1> If I write irrevelant content even more irrevelant I get what I want which is the exact tag with it's content content . The issue arises when I try to use this on a nested tag which nests with itself, like: gimme cookies gimme more cookies Unfortunately, this time I get: gimme cookies gimme more cookies Without the second closing tag. How could I improve the regex to only find the start and end tag only and the contents between them, so I could nest to infinity and beyond?
linked to: http://stackoverflow.com/q/10585029
possible better answer: http://stackoverflow.com/a/25967545
has comment: http://stackoverflow.com/comment/40658855
has answer: http://stackoverflow.com/a/25967545
tagged with: regex
has comment: http://stackoverflow.com/comment/40658878
has comment: http://stackoverflow.com/comment/40658682
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25967560
downvote count: 1
type: Question

http://stackoverflow.com/comment/40620011
comment on: http://stackoverflow.com/q/25945655
has text: Nope, no console errors
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25976415
has body: You can simply use, Assuming startTimeT is a number. Converts to string then simply use lenght property var startTimeT = 15; var strVar = startTimeT+''; //Convert to string var length = strVar.length; alert(length)
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25976348
score: 5
type: Answer
answers question: http://stackoverflow.com/q/25976348
upvote count: 5

http://stackoverflow.com/comment/71550180
score: 1
comment on: http://stackoverflow.com/q/25915830
has text: you still require answer?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40766735
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26025956
has text: Hum are you sure that your `poll.stop` function is called ?
type: AnswerComment

http://stackoverflow.com/q/25902556
has answer: http://stackoverflow.com/a/25903070
tagged with: javascript
has body: I'm trying to learn more about front end web dev and trying to see the page sources of different cool elements i find on the web. I came across this and was trying to understand how they did the css for the countdown. I only understand parts of the html and I've found where they keep the example: &lt;div class="countdown-container" id="main-example"&gt; it would be much clearer if i was able to reproduce it in jsfiddle but i can't. Any insight is appreciated.
has comment: http://stackoverflow.com/comment/40542408
answer count: 1
has title: Countdown timer css analysis
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40542315
tagged with: css
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/40692105
type: Comment
comment on: http://stackoverflow.com/a/25985655
score: 0
type: AnswerComment
has text: This is fantastic! Exactly what I was looking for. I'm not sure about the scrollbar being visible or not, but I'm not sure I'm understanding what you're suggesting by offseting the top position of the container. How would I modify this?

http://stackoverflow.com/comment/40585938
type: AnswerComment
comment on: http://stackoverflow.com/a/25926436
type: Comment
score: 1
has text: Thats a good idea but db entry for each clicking means it will be not good practice yes?....I am looking for a client side solution (javascript or sessions )....

http://stackoverflow.com/comment/40564832
has text: @frank Thank you for your help. Yes, page2 is a separate and it has no ``backbutton`` listener. so it should be able to go back to index.html page right? But it is not. As i describe the step in "What i got..." in the question. Step 1 OK i understand that backbutton has override and i have to manually write window.history js code. But step 2. i should be able to go back to index.html page because it is normal page, no js, nothing override. I don't want ``backbutton`` listener from index.html to work in page2.html.
comment on: http://stackoverflow.com/q/25897361
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/25908163
type: Answer
answers question: http://stackoverflow.com/q/25908047
score: 3
downvote count: 0
has body: Instead of: $('#description').append(video_url); Use: $('#description').html(video_url);
upvote count: 3

http://stackoverflow.com/comment/41019022
type: AnswerComment
has text: I commented out the next line and got rid of the error. //.children( 'td:nth-child( ' + ( parseInt( col, 10 ) + 1 ) + ' )' )
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26030530

http://stackoverflow.com/a/25975640
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25973569
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25973569
has body: You could call map.panBy at the end of your function. From the docs: Changes the center of the map by the given distance in pixels. If the distance is less than both the width and height of the map, the transition will be smoothly animated. Note that the map coordinate system increases from west to east (for x values) and north to south (for y values). With panBy you don't have to think about zoom levels, you just pan by pixels.
score: 2

http://stackoverflow.com/a/26044181
type: Answer
has body: I assembled some part of your task as you requested. I tried to not change your code much, so you can understand all changes I have done. First small show: Triangle with your code Circle made out of 3 points You made circle out of 100 points (vertices). Now you want to make another shape inside. It means use another 100 points, which is probably what you don't want to do. Instead of this, you would like to use normals. But from the point of view of shaders (which are responsible for drawing), normals, vertices and other things like texture coordinates are just data and you are the one who decides, if data means vertices, normals, texture coordinates or anything else. If I understand good, you want to customize your object without adding too much additional data. I don't think normals or textures can help you. There are few problems you will have to face with texture ... First is, if circle will be too big (close to you), then it will be not that nice with just 100 points. If circle will be too small (far from you), but there will be a lot circles, you will use too many points for nothing which will lower performance. If you use texture for black ring inside, it will be fuzzy if you will be closer. And if you use too large texture for a lot of small circles, it will again lower performance. ... and normals are used to do light reflection like this. Way I think about the problem. You can define circle with just few params, radius and center. With webgl, you can draw only triangles (and points). But you can for example customize shader to draw inscribed circle in each triangle. So I defined just radius and center: var r = 0.9; var middle = vec2(0.0, 0.0); Then I generate 3 points of triangle around the circle (circle is inscribed circle of this new triangle): function buildCircle(center, r) { var points = []; points.push(vec2((r * TRI_HEIGHT_MOD * Math.cos(0 * DEG_TO_RAD)) + center[0], (r * TRI_HEIGHT_MOD * Math.sin(0 * DEG_TO_RAD)) + center[1])); points.push(vec2((r *…
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25966841
downvote count: 0
has comment: http://stackoverflow.com/comment/41441117

http://stackoverflow.com/q/25919045
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25919071
answer count: 4
has comment: http://stackoverflow.com/comment/40572530
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40572521
upvote count: 3
tagged with: google-chrome
type: Question
score: 3
has answer: http://stackoverflow.com/a/71914772
accepted answer: http://stackoverflow.com/a/25919071
possible better answer: http://stackoverflow.com/a/25919195
has body: I am trying to click a button on a web page using the developer tools console in Google Chrome. The HTML for the button is: &lt;input value="Send an Email" class="btn" name="email" onclick="navigateToUrl('/_ui/core/email/author/EmailAuthor?p2_lkid=00QU0000008xZYi&amp;amp;rtype=00Q&amp;amp;retURL=%2F00QU0000008xZYi','RELATED_LIST','email');" title="Send an Email" type="button"&gt; As you can see, the button does not have an id attribute, so I'm trying to select it using the name attribute. My JavaScript code is: document.getElementsByName("email").click() What am I doing wrong?
has answer: http://stackoverflow.com/a/25919195
has title: How to Click a Button by Name in Browser Console
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40572657
has answer: http://stackoverflow.com/a/25919064

http://stackoverflow.com/q/25911548
tagged with: angularjs
tagged with: scroll
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40559459
downvote count: 0
has comment: http://stackoverflow.com/comment/40559451
score: 1
has body: I'm playing with sticky navigation. The problem is that evaluation/application of fixed/static class pairs takes too long. the markup looks like this: Services Equipment Prices Contacts #header ul.fixed { position: fixed; top: 0; width: 100%; } #header ul.static { position: static; } the controller code looks like this: app.controller('navController', ['$scope', '$document', function($scope, $document) { $scope.useFixedPosition = false; $document.on('scroll', function() { $scope.useFixedPosition = $document.scrollTop() > 385; }); }]); I'm using angular-scroll plugin (https://github.com/durated/angular-scroll) What am I doing wrong? edit Thanks to @Plantface there's a fiddle: http://jsfiddle.net/ud7k2po1/11.
accepted answer: http://stackoverflow.com/a/25913216
has comment: http://stackoverflow.com/comment/40559716
has comment: http://stackoverflow.com/comment/40558057
tagged with: navigation
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25913216
has comment: http://stackoverflow.com/comment/40559305
upvote count: 1
has comment: http://stackoverflow.com/comment/40558212
answer count: 1
has title: Class evaluation takes too long. AngularJS
favorite count: 0
has comment: http://stackoverflow.com/comment/40560076

http://stackoverflow.com/comment/82813892
type: Comment
has text: The idea is cool, but not work now, webpack will yell "Unknown argument: minimize" Solution: use --env.minimize more details in the following link https://github.com/webpack/webpack/issues/2254
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/32946206

http://stackoverflow.com/comment/40684445
type: Comment
has text: Serge, thanks for taking the time to answer my question ... I had come across the post you indicated, but was unclear on its use. Upon further study I've got it working. One question however I take it that automatically opening the url when one clicks the menu item is not allowed instead clicking the menu item needs to launch the function that creates the popup?
comment on: http://stackoverflow.com/a/25981405
score: 0
type: AnswerComment

http://stackoverflow.com/q/26008653
has comment: http://stackoverflow.com/comment/40733778
has title: How can i stop hanging page when a request is send via Ajax
answer count: 2
has answer: http://stackoverflow.com/a/26008665
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40733611
has comment: http://stackoverflow.com/comment/40733647
tagged with: php
has comment: http://stackoverflow.com/comment/40733585
has answer: http://stackoverflow.com/a/26008756
has comment: http://stackoverflow.com/comment/40733632
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26008665
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/26008756
has comment: http://stackoverflow.com/comment/40733607
has comment: http://stackoverflow.com/comment/40733646
type: Question
has body: I am facing a serious issue... Whenever i use Ajax to send a request and get an response my browser got hanged.. and show no loading etc... But when i response is retrieved from the Ajax then browser and page again start working... Below is the code that i used..... function ShowContestStatus(contestID) { $("#showContestDetails").html('&lt;div class="loadercontest"&gt;&lt;img src="assets/images/loading.gif"&gt;Loading Contest....&lt;/div&gt;'); $("#RadioGroup1_0, #RadioGroup1_1, #RadioGroup1_2").prop('disabled', true); $.ajax({ url:"process/processMyContest.php", type:'POST', cache:false, async:false, data : {act : 'showcontest', cid : contestID }, success:function(result) { $("#showContestDetails").html(result); $("#RadioGroup1_0, #RadioGroup1_1, #RadioGroup1_2").prop('disabled', false); } }); } Please help me on this... i want to get the same response as on other websites when you send a request and they are using ajax the page neither hanged and also each processing like scrolling etc is visible ...... So please suggest me good ideas.... so i can get rid of it and make my ajax smooth for page without effecting and irritate the other person by hanged... Thanks in advance...:)
has comment: http://stackoverflow.com/comment/40733597
tagged with: javascript

http://stackoverflow.com/comment/40530149
comment on: http://stackoverflow.com/a/25895009
type: Comment
score: 0
type: AnswerComment
has text: Are you getting any errors in the console? `currentPlayer` should be a string. `console.log(currentPlayer)` in the Javascript code (after `var currentPlayer`) and see what comes up in the console when you click the `.square` element. ( I don't actually see where you have an element with the class "square" in your view)

http://stackoverflow.com/q/25925284
has body: I came across an operation with some confusion. var a = 0.1; var b = 0.2; var c = 0.3; console.log(a); // 0.1 console.log(b); // 0.2 console.log(c); // 0.3 But, consolo.log(a+b+c) // 0.6000000000000001. While console.log(a+(b+c)) // 0.6 I understand that Javascript use binary floating point, thus can't accurate represent 0.1, 0.2, 0.3 But what does the bracket around (b+c). Is there any conversion or round up here? Many thanks,
has answer: http://stackoverflow.com/a/25928157
accepted answer: http://stackoverflow.com/a/25937206
has comment: http://stackoverflow.com/comment/40583911
has comment: http://stackoverflow.com/comment/40689254
has title: Javascript floating point number confusion
answer count: 3
has comment: http://stackoverflow.com/comment/40584010
tagged with: rounding
has answer: http://stackoverflow.com/a/25937206
tagged with: data-conversion
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/588004
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25978945
has answer: http://stackoverflow.com/a/25978945
has comment: http://stackoverflow.com/comment/40584491
favorite count: 0
has comment: http://stackoverflow.com/comment/40584163
type: Question
upvote count: 2

http://stackoverflow.com/comment/40769384
has text: @ChrisCM—if the OP forgets "var" and assigns something to *location* the error will be pretty obvious. ;-)
comment on: http://stackoverflow.com/q/26019096
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25973972
score: 2
has title: Load pdf from remote url to send as Mandrill attachment
has body: I am trying to load a Pdf in Cloud Code and send it as an attachment with mandrill. As mandrill needs a base64 encoded string for the attachment I use Buffer to change the encoding. The result right now is an Pdf attachment that cannot be opened and I think the error is caused by my recoding. I guessed the text returned from the get request is utf8 but I'm not sure. Any suggestions? var Buffer = require('buffer').Buffer; function loadPdf(pdfUrl) { var promise = new Parse.Promise(); Parse.Cloud.httpRequest({ method: 'GET', url: pdfUrl, success: function (httpResponse) { // Put text into buffer var buf = new Buffer('httpResponse.text', 'utf8'); // encode text with base64 promise.resolve(buf.toString('base64')); }, error: function (httpResponse) { console.error(httpResponse); console.error("Token Request failed with response code " + httpResponse.status); } }); return promise; } the result of this function is put into "attachments": [ { "type": "application/pdf", "name": "test.pdf", "content": encodePdfText }
type: Question
tagged with: mandrill
tagged with: javascript
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/29812884
downvote count: 0
answer count: 1
favorite count: 0
tagged with: parse-platform
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/40675331
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25976634
has text: @PraveenKumar According to W3, a tags are pretty flexible (http://www.w3.org/TR/html-markup/a.html) as far as the content they can contain (in the HTML5 spec) and are largely dependent on the parent of the `` tag. The W3 says that it is `transparent`: http://www.w3.org/TR/html-markup/terminology.html#transparent, and as a result an H4 nested within is technically valid (the Validator service confirms this). Whether or not this markup communicates the intent of the author accurately or indicates a lack of understanding is a different issue.
type: AnswerComment

http://stackoverflow.com/q/25937140
has title: Score and Text-Box Moving Above Screen
has comment: http://stackoverflow.com/comment/40605337
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40604908
answer count: 0
has body: The code below which when i executed in iphone/android devices, the score, text-boxes is moving above the screen, when i enter the text in the text boxes. i want the screen to be constant when i write the text in the boxes. score: 0
type: UnansweredQuestion

http://stackoverflow.com/q/26015645
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40746023
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40813442
has comment: http://stackoverflow.com/comment/40745814
answer count: 0
has body: some more div 1.Table is displayed only on hovering on img/div (which is fixed top from clientx.) My question is when I scroll up my table hides under google chart ( chart created by google chart api)
tagged with: scroll
has title: Why do a Fixed div containing a table hides under google chart while scrolling
type: Question
tagged with: charts
tagged with: javascript

http://stackoverflow.com/comment/40574028
comment on: http://stackoverflow.com/q/25919487
score: 0
type: Comment
has text: I'm using Firefox 24.4.0 (extended support release). When I inspect the ObjectError, there's nothing of interest. `message` is `""` and the other properties are `undefined`, as I previously mentioned.
type: QuestionComment

http://stackoverflow.com/a/26014498
has body: You have the basic Bootstrap.js without the Carousel component. Install Bootstrap.js with Carousel.js/.css otherwise, you need to add Carousel.js to your page separately. You can choose the desired bundle here: http://getbootstrap.com/customize/
score: 1
has comment: http://stackoverflow.com/comment/40743973
has comment: http://stackoverflow.com/comment/40743737
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40744441
has comment: http://stackoverflow.com/comment/40744401
accepted answer of: http://stackoverflow.com/q/26014326
has comment: http://stackoverflow.com/comment/40743689
type: Answer
answers question: http://stackoverflow.com/q/26014326
upvote count: 1
has comment: http://stackoverflow.com/comment/40743883

http://stackoverflow.com/q/25987734
tagged with: javascript
has comment: http://stackoverflow.com/comment/40696533
tagged with: jquery
has body: I want to open Bootstrap model when user close window if user close this model then window will be close. i tried this, $(window).on("beforeunload", function() { return "Bye now!" ; }); this should return a bootstrap model if user close this model then window will close.
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40696088
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: How can i open a bootstrap Model on beforeunload function,
upvote count: 1
score: 1
type: Question
has answer: http://stackoverflow.com/a/25988006

http://stackoverflow.com/a/36632817
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25895562
has body: Promise.all() is a way to execute a list of promises in parallel but if we want to execute a list of promises in a series where one is dependent on the other, we've to solve it a bit differently // Promise returning functions to execute function doFirstThing(){ return Promise.resolve(1); } function doSecondThing(res){ return Promise.resolve(res + 1); } function doThirdThing(res){ return Promise.resolve(res + 2); } function lastThing(res){ console.log("result:", res); } var fnlist = [ doFirstThing, doSecondThing, doThirdThing, lastThing]; // Execute a list of Promise return functions in series function pseries(list) { var p = Promise.resolve(); return list.reduce(function(pacc, fn) { return pacc = pacc.then(fn); }, p); } pseries(fnlist); // result: 4
upvote count: 2
type: Answer

http://stackoverflow.com/comment/40595650
comment on: http://stackoverflow.com/q/25931476
score: 0
type: Comment
type: QuestionComment
has text: but you were first :) not hunting for rep?

http://stackoverflow.com/a/25980091
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25980034
has body: If test is below 25 execute what's inside the if statements if not don't do anyhing. &lt;script&gt; var test= 1; function myFunction(){ if(test &lt; 25){ document.getElementById("hello").innerHTML= test; test++; } } &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25980034
type: AcceptedAnswer

page-lifecycle
type: Tag
tags question: http://stackoverflow.com/q/25997005
tag name: page-lifecycle

http://stackoverflow.com/comment/40585313
type: QuestionComment
comment on: http://stackoverflow.com/q/25926081
has text: @Seano666 I was assuming that when it's used as the name property for the elements being appended, it automatically becomes an array (e.g. inputName[1], inputName[2] etc.). OK, I just want to know the count of how many input elements have been appended with the name inputName[]... what's the simplest way to do that.
score: 0
type: Comment

http://stackoverflow.com/comment/40522477
comment on: http://stackoverflow.com/q/25890461
has text: To pass your validation, user can simply turn off JavaScript
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25894040
has comment: http://stackoverflow.com/comment/40526427
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25894346
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25894233
has title: Unusual checkbox is checked behavior
has comment: http://stackoverflow.com/comment/40526389
has comment: http://stackoverflow.com/comment/40526628
has body: HTML: &lt;input type="checkbox" id="1" val="1" onclick="select_box(id);" name="main_vals[]"&gt;Box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" class="sub_checkbox_1" val="1.1" name="sub_vals[]"&gt;Sub box 1 &lt;input type="checkbox" id="2" val="2" onclick="selec_boxt(id);" name="main_vals[]"&gt;Box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" class="sub_checkbox_2" val="2.1" name="sub_vals[]"&gt;Sub box 2 &lt;input type="checkbox" id="3" val="3" onclick="select_box(id);" name="main_vals[]"&gt;Box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 &lt;input type="checkbox" class="sub_checkbox_3" val="3.1" name="sub_vals[]"&gt;Sub box 3 Javascript: select_box = function(id) { if($('#main_checkbox_'+id).is(:checked)) { $('.sub_checkbox_'+id).each(function() { this.checked = true; }); } else { $('.sub_checkbox_'+id).each(function() { this.checked = false; }); } } Description: As you can see, i have multiple checkboxes. My goal here is to check if the checkbox with id main_checkbox_+id is checked, then all the corresponding checkboxes with id sub_checkbox_+id should also be checked. Similarly, if the main checkbox is unchecked, the corresponding sub checkboxes should be unchecked. While this seems to be working for the majority of the main and sub checkboxes, there are a few which don't work as expected. With those few, the check to see if the main_checkbox is checked always yields false. I'm not sure why i am experiencing this behavior. I have many more checkboxes in the html in the same format. The ids are dynamically g…
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40626858
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25949782
has text: The browser does not know whether it is in sandbox in general. You can have sensitive data in userscript as well. For instance if there is a timestamp of login, the owner of another website should not know when you logged in into the other site except he is allowed to. What if you store an offline version in localStorage to enable you to use some of the features even without connection to the internet? Should I be able to read all your offline data (username, private messages and so on)?
type: AnswerComment

http://stackoverflow.com/q/25958975
has answer: http://stackoverflow.com/a/25959078
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: I am building a custom element directing in AngularJS. My element will be used like this: If the user does NOT set my-attribute, I want it to default to true. How do I give the directive attribute a default value? Currently, I have the following: myApp.directive('myElement', function ($window) { return { restrict:'E', transclude: true, scope: { myAttribute: '=' }, controller: function($scope) { }, template: ' Hello , World ' }; }); Thank you!
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25959078
score: 2
type: AnsweredQuestion
upvote count: 2
has title: How to set the default value of directive attribute?
type: Question

http://stackoverflow.com/comment/40656217
has text: Yes, sure i will use HTTPS, Maybe implement HTTPS not that hard, but still need time. But my system must be always online right ? I just want to protect my system meanwhile waiting HTTPS implemented.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25966135

http://stackoverflow.com/comment/40603772
comment on: http://stackoverflow.com/q/25936416
type: Comment
has text: It's not that you are using a variable. The problem is that the x, y coordinates are out of the canvas. If you set player.x = 10 and player.y = 10, it works. If you use context.fillRect(300, 80, 20, 20) you get a white canvas.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/41247351
type: Comment
score: 1
type: AnswerComment
has text: If one need to mitigate the gap anyway, I would suggest use some preloading techniques.
comment on: http://stackoverflow.com/a/26193580

http://stackoverflow.com/comment/40529337
type: Comment
comment on: http://stackoverflow.com/q/25893447
type: QuestionComment
has text: Mmmh in that case I could only give you the hint that, what you want to build is called a parallax scroller, so maybe you can find more informations with that term
score: 0

http://stackoverflow.com/comment/40717816
type: QuestionComment
has text: You should add code to your question. Code should not be posted to comments. Furthermore, you didn't specify what happens if such a day is a public holiday.
score: 0
comment on: http://stackoverflow.com/q/25999214
type: Comment

http://stackoverflow.com/comment/40742087
score: 0
has text: That's what I'm talking about :-)
comment on: http://stackoverflow.com/a/26013081
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/40568823
comment on: http://stackoverflow.com/q/25917015
type: QuestionComment
has text: Thank you, I did consider this but wanted to avoid adding more fields since I will have several of these tbody in the page. But it seems this may be my only choice.
type: Comment
score: 0

http://stackoverflow.com/comment/40513021
score: 1
comment on: http://stackoverflow.com/q/25886485
has text: besides, loading HTML from a string is almost always a sign of bad practice. Maybe have all HTML there, just hide it in case it is not needed.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/115086484
has text: @Salek for html support see http://raw.githack.com/MrRio/jsPDF/master/docs/module-html.html#~html
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25907361
type: Comment

http://stackoverflow.com/comment/43122053
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27332117
has text: yeah I mean. normally you use underscore like `_.FUNCTION`, where FUNCTION may be extend, or each and so on. but you used it differently like `_(this.prototype).FUNCTION`. the `.` operator comes after the `_()` which confuses me. shouldn't it be `_.extend(....)` ??

http://stackoverflow.com/q/25953551
tagged with: momentjs
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25953662
possible better answer: http://stackoverflow.com/a/46661928
has title: Moment.js get the week number based on a specific day (also past years)
downvote count: 1
type: Question
has body: How could I get from moment JS the week number from a date in the past only from a moment formatted object from a day selected?
tagged with: javascript
score: 78
has answer: http://stackoverflow.com/a/66207840
tagged with: week-number
upvote count: 79
has answer: http://stackoverflow.com/a/70665998
has answer: http://stackoverflow.com/a/25953662
favorite count: 0
has answer: http://stackoverflow.com/a/46661928

http://stackoverflow.com/comment/40536851
score: 0
comment on: http://stackoverflow.com/q/25899668
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/12264504/what-is-difference-between-jquery-js-and-jquery-lite-js

http://stackoverflow.com/q/25929963
has comment: http://stackoverflow.com/comment/40592340
upvote count: 1
has title: javascript jsdoc namespace class static method
favorite count: 0
has comment: http://stackoverflow.com/comment/40592282
tagged with: static
tagged with: jsdoc
has body: I'm trying to use jsDoc on my js code in which I want to define: - A Namespace. - A Class. - A Static Method. Note that the code does exactly what I expect at runtime, but I have problems to getting started with jsDoc, so I question myself if code is correct... /** @namespace * @name myNamespace * @description myNamespace description. */ if (typeof (myNamespace) == "undefined") myNamespace = { }; /** @class * @name myClass * @description myClass description. * @memberof myNamespace * @inner */ myNamespace.myClass = function () { }; /** @method * @name myStaticMethod * @description myStaticMethod description. * @param {String} myParam. Required. myParam description. * @return myReturnValue description. * @remarks remarks description. * @memberof myNamespace.myClass * @inner */ myNamespace.myClass.myStaticMethod = function (myParam) { var myReturnValue = myParam; return myReturnValue; }; When I generate with jsDoc I see in the index: - Correct myNamespace definition. - Correct myClass definition. When I go inside myClass I cannot see myStaticMethod... myStaticMethod is not present anywhere. My JS is coded correctly? If is correctly coded... Is the comments correctly written? What's wrong? Thanks a lot...
possible better answer: http://stackoverflow.com/a/25930511
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25930511
downvote count: 0
score: 1
tagged with: namespaces
type: Question
has comment: http://stackoverflow.com/comment/40592619
has answer: http://stackoverflow.com/a/25930098
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25930098
tagged with: class
answer count: 2

http://stackoverflow.com/q/25994941
has comment: http://stackoverflow.com/comment/40708103
downvote count: 1
type: AnsweredQuestion
has body: I have a cloaked website (using URL masking) to pretend another URL. When you click a link on it, the address bar URL doesn't change. See here and try the wikipedia link: http://nakt.ch.vu/stackoverflow2.php Compare with this: http://zhaw.warnez-services.ch/NaKt/stackoverflow2.php For some function irrelevant to this question (see here if you like), I need to be able to put a link that actually changes the address bar URL. So the script would have to overrun the URL masking. Javascript Location changes also don't change it – do you have an idea how to do this? Thanks for any hints and sorry for my english :)
has answer: http://stackoverflow.com/a/25995083
has comment: http://stackoverflow.com/comment/40708055
accepted answer: http://stackoverflow.com/a/25995083
has comment: http://stackoverflow.com/comment/40708051
score: -1
has title: Javascript: Overdrive URL Masking
type: Question
upvote count: 0
linked to: http://stackoverflow.com/q/25976375
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25920762
tagged with: jquery
has title: WebClient on Store Universal Apps
favorite count: 0
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25922756
downvote count: 1
has body: I'm using this code on Windows Desktop App to get the values of a combobox that I after need to select which is going to update the page with new information using JavaScript private WebBrowser withEventsField_wb; WebBrowser wb { get { return withEventsField_wb; } set { if (withEventsField_wb != null) { withEventsField_wb.Navigated -= navigated; } withEventsField_wb = value; if (withEventsField_wb != null) { withEventsField_wb.Navigated += navigated; } } } private void Form1_Load(object sender, EventArgs e) { wb = new WebBrowser(); wb.Navigate("https://academicos.ubi.pt/online/horarios.aspx?p=a"); } private void navigated() { HtmlElementCollection allelements = wb.Document.All; HtmlElement year = default(HtmlElement); foreach (HtmlElement webpageelement in allelements) { if (webpageelement.GetAttribute("id").Contains("ContentPlaceHolder1_ddlAnoLect") == true) { year = webpageelement; HtmlElementCollection yoptions = year.Children; foreach (HtmlElement yopt in yoptions) { ComboBox1.Items.Add(yopt.InnerText); } } } } But now I'm trying to do the same on Universal App (Windows Phone/Windows) but I'm being unable to do the same. I know that I have to use HttpClient but it does not work like a WebBrowser, this web browser is only created by code to get all the data needed and as for each step of data that I need to retrieve the website does not refresh normally but uses jQuery to load the new information. Any help?
type: Question
tagged with: c#
tagged with: javascript
tagged with: browser
score: 0
answer count: 1
tagged with: httpclient
accepted answer: http://stackoverflow.com/a/25922756

http://stackoverflow.com/comment/40788781
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26029574
has text: No, I've rolled back - it was fine after my edit. Who answered what question is clear below. In general, questions are asked before answers are given, so it can be confusing for new readers who see a question that is written based on answers provided. Again, indicating which question is answered and which is not is a problem with multiple-question posts - another reason why we prefer one question per post.
score: 0

http://stackoverflow.com/a/25945540
has body: From my point of view, as javascript do not have block scope, declaring all variables on top of the function makes you spot easier variables you do not have to use as you can reuse an other. Example : function test(){ var pages = [ 'www.stackoverflow.com', 'www.google.com' ]; var users = [ 'John', 'Bob' ]; for (var page = 0; page &lt; pages.length; page++) { console.log(pages[page]); }; for (var user = 0; user &lt; users.length; user++) { console.log(users[user]); }; } Can be changed to : function test(){ var index, pages, users; pages = [ 'www.stackoverflow.com', 'www.google.com' ]; users = [ 'John', 'Bob' ]; for (index = 0; index &lt; pages.length; index++) { console.log(pages[index]); }; for (index = 0; index &lt; users.length; index++) { console.log(users[index]); }; } And save one variable space from the memory. In such a small function the main point may not be visible, but imagine a whole project with thousand lines of code. This may make your code run faster.
has comment: http://stackoverflow.com/comment/40619852
has comment: http://stackoverflow.com/comment/40619928
answers question: http://stackoverflow.com/q/25945467
has comment: http://stackoverflow.com/comment/40620399
has comment: http://stackoverflow.com/comment/40619885
score: 0
type: Answer

http://stackoverflow.com/comment/40649222
has text: From my own use of Wix, I can tell you that it really doesn't like you using your own scripts. Their websites are entirely JS-dependent: they don't even display if JS is disabled, so using your own scripts could clash with this so they don't like it. At all.
score: 0
comment on: http://stackoverflow.com/q/25960449
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40735944
has text: means for loop ..how we can do this with map
comment on: http://stackoverflow.com/q/26009967
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40534751
score: 0
type: AnswerComment
type: Comment
has text: A few points questions: (a) In case a promise returning function is added to the `FUNCTIONS` stack, should you not `return f()`? (b) Maybe I'm missing something but what is underscore doing in there? (c) From the code in the question, it would appear that the OP intended that `.clear()` be called synchronously in `.run()`. By calling `.clear()` from a finally clause, is there not a danger that some other process could add more function(s) before the current stack is fully serviced, and for those functions to be discarded without being serviced? That may be the desired behaviour but I doubt it.
comment on: http://stackoverflow.com/a/25886146

http://stackoverflow.com/q/25941833
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40711082
favorite count: 0
tagged with: handsontable
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/26042229
type: Question
has comment: http://stackoverflow.com/comment/40695634
score: 1
tagged with: jquery-plugins
has title: HandsOnTable Dropdown with large number of rows
has body: I ran into some strange behavior when using HandsOnTable with a dropdown consisting of many rows. Not all the rows appear the first time the dropdown is clicked. The second time it is clicked, it works. It does the same thing for me in Chrome, IE, Safari, and Firefox. You can see the entire code in JSFiddle. http://jsfiddle.net/nt001ymn/15/ $(document).ready(function () { function getCarData() { return [ ["Nissan", 2009, "black", "black"], ["Nissan", 2006, "blue", "blue"], ["Chrysler", 2004, "yellow", "black"], ["Volvo", 2012, "white", "gray"] ]; } $("#example1").handsontable({ data: getCarData(), startRows: 7, startCols: 4, colHeaders: ["Car", "Year", "Chassis color", "TEST"], columns: [ {}, {type: 'numeric'}, { type: 'dropdown', source: ["yellow", "red", "orange", "green", "blue", "gray", "black", "white"] }, { type: 'dropdown', source: ["Lots of data!", ... ... "LAST LINE" ] } ] }); }); Edit: In the meantime I'm using Javascript to programmatically click the dropdown twice. Not really a solution but it makes the experience seamless to the user.
downvote count: 0
answer count: 1

http://stackoverflow.com/q/26028466
tagged with: datetime
has answer: http://stackoverflow.com/a/26028943
accepted answer: http://stackoverflow.com/a/26028943
has title: JavaScript creating new Date from a string without changing timezone
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40770114
has comment: http://stackoverflow.com/comment/40770809
tagged with: date
type: Question
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/26028549
tagged with: javascript
has answer: http://stackoverflow.com/a/26028549
has comment: http://stackoverflow.com/comment/40771028
favorite count: 0
has body: I'm trying to convert a date string into a date object without changing the timezone. Here is the standard behavior: new Date ("2014-10-24T00:00:00") result Thu Oct 23 2014 19:00:00 GMT-0500 (Central Daylight Time) I am able to reverse the timezone by getting the offset in minutes, multiplying it by 60,000, and then adding that to the new string date. new Date(new Date("2014-10-24T00:00:00").getTime() + new Date().getTimezoneOffset()*60000) This works, but it seems like there must be a better way that doesn't require created three date objects.

http://stackoverflow.com/q/25986388
tagged with: javascript
has title: How to change a content o pararaph when selecting different radio buttons
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25986425
tagged with: http://stackoverflow.com/tag/html
has body: How to change the content of a Paragraph when selecting different radio buttons?? Jquery is welcome!! I'm attaching my current code and a jSFiddle bellow. I want to change the paragraph inside .mstotal. You can change that to an ID if necessary. HTML 1.99/year 2.50/year 3.00/year 4.99/year Membership A - 1 Year:$1.99 JAVASCRIPT $(document).ready(function(){ $("input[name='membership-type']").live("change", function(){ if ($(this).val() == "1") { $(".ms_total").text(" Membership A - 1 Year:$1.99 "); } else if ($(this).val() == "2") { $(".ms_total").text(" Membership B - 1 Year:$2.50 "); } else if ($(this).val() == "3") { $(".ms_total").text(" Membership C - 1 Year:$3.00 "); } else if ($(this).val() == "4") { $(".ms_total").text(" Membership D - 1 Year:$4.99 "); } }); }); http://jsfiddle.net/vinicius5581/8wn27zej/
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25986425
answer count: 1

http://stackoverflow.com/a/25893009
downvote count: 0
has body: Can use scriptlet &lt;%= %&gt; in table data, &lt;%=ADuser.getFirstName()%&gt; Or can use jsp expression ${} like this post &lt;% request.setAttribute("firstName", ADuser.getFirstName()); %&gt; //then in table data &lt;td..&gt;${firstName}&lt;/td&gt;
has comment: http://stackoverflow.com/comment/40524644
score: 1
answers question: http://stackoverflow.com/q/25892822
upvote count: 1
has comment: http://stackoverflow.com/comment/40524545
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25892822
type: Answer

http://stackoverflow.com/comment/40776250
has text: Ah, you are adding wrapped nodes in two places! It treats entities like `&nbsp;` as word characters so `split(' ')` would be better as `split(/\s+/)`.
type: Comment
comment on: http://stackoverflow.com/a/26030835
score: 0
type: AnswerComment

http://stackoverflow.com/a/25902471
has body: You can try doing something like this: var nodes = $('.image').map(function() { return $(this)[0]; }); // Or if you just want a normal array and not a jQuery collection var nodes = []; $('.image').each(function() { nodes.push($(this)[0]); }); Hope this helps! edit: Working JSFiddle
has comment: http://stackoverflow.com/comment/40542161
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25902378

http://stackoverflow.com/comment/40516793
type: AnswerComment
comment on: http://stackoverflow.com/a/25888757
type: Comment
has text: used the blur and focus instead of focusout and focusin. but not working.
score: 0

http://stackoverflow.com/q/25978376
upvote count: 1
has comment: http://stackoverflow.com/comment/40679457
type: AnsweredQuestion
has title: Using JavaScript to get information from BigQuery
score: 1
has answer: http://stackoverflow.com/a/25978491
tagged with: google-bigquery
type: Question
has body: I am new to JavaScript and Google BigQuery, so please forgive my ignorance. I am trying to write a javascript to collect data from one of the public databases on BigQuery. I found an answer to this at Obtaining BigQuery data from JavaScript code (the code for which I have pasted below) but when I saved the file as .html, replaced the client id and project number with mine, and tried to run it, I get the Authorize button and the page title. I click the Authorize button, and it disappears, but no query is run. Is there something else I was supposed to replace or is there something else I need to make this work? I saved the file as a .html, perhaps I should have saved it with a different extension? I tried all three ways of creating a client id in the Google developers console and all gave me the same behavior. I'm sure its just something silly that I am forgetting, but any advice would be greatly appreciated. Here is the code given by Ryan Boyd, which I am unable to get working properly(which is surely my fault): Average Mother Age at First Birth in 2000 Authorize Run Query Update: I opened the Developer Tools in Chrome and found this error in the console: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null') . I tried editing in my Google Developer console as per these instructions: Google API in Javascript Still same error.
accepted answer: http://stackoverflow.com/a/25980397
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/21710842
answer count: 3
has answer: http://stackoverflow.com/a/25980397
has answer: http://stackoverflow.com/a/25979817
possible better answer: http://stackoverflow.com/a/25978491
favorite count: 0
has comment: http://stackoverflow.com/comment/40684585

http://stackoverflow.com/comment/40579766
comment on: http://stackoverflow.com/q/25922818
type: Comment
type: QuestionComment
has text: I didn't spot that, figured it wasn't happening anyway. Any suggests on how to fix that up?
score: 0

http://stackoverflow.com/a/26001263
has comment: http://stackoverflow.com/comment/40762290
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40724551
has comment: http://stackoverflow.com/comment/40724373
accepted answer of: http://stackoverflow.com/q/26000785
type: Answer
answers question: http://stackoverflow.com/q/26000785
has body: I highly recommend mousetrap.js. It's intuitive, lightweight and very easy to use; Edit: See this answer. Note that CMD+A (or any other combination) is not really both together - it's a keydown event for both before there is a keyup for either.

http://stackoverflow.com/comment/40776773
type: QuestionComment
has text: Is you array initialized like that or it's just a typo? It's not multidimensional.
comment on: http://stackoverflow.com/q/26032301
score: 0
type: Comment

http://stackoverflow.com/comment/40721344
has text: my comment addresses both the part about reading page content (yes), and " a PHP redirection with header refresh" (usually). whatever the user san see, so can JS, and JS can see some things the user can't, like field values.
comment on: http://stackoverflow.com/q/26001430
score: 0
type: Comment
type: QuestionComment

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/25886390
tags question: http://stackoverflow.com/q/25897362
tags question: http://stackoverflow.com/q/25905655
type: Tag

http://stackoverflow.com/comment/40649731
comment on: http://stackoverflow.com/q/25962682
score: 0
type: Comment
type: QuestionComment
has text: Add some server side validation to validate if the high score is already submitted.

http://stackoverflow.com/a/26024632
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40763086
downvote count: 0
has comment: http://stackoverflow.com/comment/40763773
has comment: http://stackoverflow.com/comment/40768189
has body: Ok, here's how to do it asynchrounously. var speed = 75; var number_of_calls_returned = 0; // add number_of_calls_returned++ in your ajax success function var number_of_total_calls; var loaded = false; function processUserData(){ if( number_of_calls_returned &lt; number_of_total_calls){ setTimeout(function(){processUserData();}, 200); } else{ //received all data // set progressbar to 100% width loaded = true; $("#page-progress").animate({width: "100%"},500); $("#page-proxylist").val("Received data"); } } function updateProgress(percent, obj){ setTimeout(function(x){ if(!loaded) $(obj).width(x + "%"); }, percent*speed, percent); } $('button.page').on('click', function (e) { var $userList = textArray($('#page-userlist').val().replace('http://lop/', '').split(/\n/)); var $proxyList = textArray($('#page-proxylist').val().replace('http://', '').split(/\n/)); var $question = $('#page-question').val(); var data = { question: $question, users: $userList, proxies: $proxyList }; var i = 0, p = 0, max = data.proxies.length, totalusers = data.users.length, percent = 0; //$('#log').append("\n" + moment().calendar() + "\n"); var progressbar = $('#page-progress'); number_of_total_calls = totalusers; $.each(data.users, function (k, u) { if (typeof (p) !== 'undefined' &amp;&amp; p !== null &amp;&amp; p &gt; 0) { if (i % 10 == 0 &amp;&amp; i &gt; 1) p++; if (p == max) return false; } var proxy = data.proxies[p]; percent = (i / totalusers) * 100; //much smoother if not int updateProgress(percent, progressbar); i++; // simulate ajax call setTimeout(function(){number_of_calls_returned++;}, Math.random()*2000); }); //callback function setTimeout(function(){processUserData();}, 200); }); var textArray = function (lines) { var texts = [] for (var i = 0; i &lt; lines.length; i++) { // only push this line if it contains a non whitespace character. if (/\S/.test(lines[i])) { texts.push($.trim(lines[i])); } } return texts; } Check it out here! jsFiddle (really cool!)
has comment: http://stackoverflow.com/comment/40768007
type: Answer
has comment: http://stackoverflow.com/comment/40764098
has comment: http://stackoverflow.com/comment/40763816
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26024120
has comment: http://stackoverflow.com/comment/40768306
answers question: http://stackoverflow.com/q/26024120
has comment: http://stackoverflow.com/comment/40764879

http://stackoverflow.com/comment/40519183
type: QuestionComment
comment on: http://stackoverflow.com/q/25888279
has text: I agree with this time, @Lee. It is a little harder as expected, but he has to describe his question better!
score: 0
type: Comment

http://stackoverflow.com/comment/40665967
comment on: http://stackoverflow.com/q/25971475
score: 0
type: Comment
type: QuestionComment
has text: @CodeJack but I did and it worked. here's the modified sample http://jsfiddle.net/n88g48rp/

http://stackoverflow.com/comment/40701911
has text: I need the drop after mouse click
comment on: http://stackoverflow.com/a/25989918
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40632092
comment on: http://stackoverflow.com/a/25952660
type: AnswerComment
has text: you changed the markup, right? because in my project setup i get this behavior http://jsfiddle.net/x918ewLo/ so can you explain me why it does not work with this(my) markup?
score: 0
type: Comment

http://stackoverflow.com/a/46460004
type: Answer
answers question: http://stackoverflow.com/q/25915830
score: 1
upvote count: 1
has body: Try position:fixed on body, and/or wrap content in a div and position:fixed on it as well.
downvote count: 0

http://stackoverflow.com/comment/40709075
has text: @fauverism has nothing to do with that in this case....
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25995451

http://stackoverflow.com/comment/40640267
comment on: http://stackoverflow.com/q/25955718
type: Comment
has text: stop writing so many `var`, There are people with OCD here
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40750769
has text: Well, you are only sending the request to the sever but are not doing anything with that response. How do you know that "nothing happens"?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26018053
score: 0

http://stackoverflow.com/comment/40665504
has text: Thanks, but the touchstart and touchend events do not fire.
type: Comment
comment on: http://stackoverflow.com/a/25971078
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40561596
score: 0
has text: @Sarah: That's invalid Javascript, you want to do `{name: name, email: email}`..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25911406

http://stackoverflow.com/comment/41024561
type: QuestionComment
has text: Has anyone been able to format the charts' numbers?
score: 1
comment on: http://stackoverflow.com/q/25880767
type: Comment

http://stackoverflow.com/a/26002613
answers question: http://stackoverflow.com/q/26002585
has body: You could find all &lt;script&gt; elements in the DOM and check if any src attributes match the regex of the filename.
score: 0
type: Answer

http://stackoverflow.com/comment/40580631
has text: I tried, again same thing. In console return this error "GET http://localhost/test/undefined 404 (Not Found)"
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25923423

http://stackoverflow.com/comment/40555607
has text: it isn't valid json, is there any alternate way ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25910052

http://stackoverflow.com/comment/40646803
has text: @Juhana, Thanks, but this does not explain why it has this error. :s
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25961143

http://stackoverflow.com/comment/40505048
score: 0
type: Comment
type: QuestionComment
has text: sorry... I'm not getting your requirement... you have a anchor element which calls a javascript function to sent email... you want to replace the contents of the anchor element or the anchor element itself? please also share the html for the anchor element and the desired output
comment on: http://stackoverflow.com/q/25881939

http://stackoverflow.com/a/25950845
has comment: http://stackoverflow.com/comment/40627793
upvote count: 1
has body: IE8 does not support getter/setter functions on properties of non DOM objects. So here you would need to use full getter functions Please have a look through here.It gives you Answer.:)
answers question: http://stackoverflow.com/q/25950791
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/26002355
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25988577
has body: A functional way would be to fold over the param array (using JavaScript's .reduce method): param.reduce(function(o, p) { return o.flatMap(bar(p)); // probably inline the bar call }, observableFoo);
answers question: http://stackoverflow.com/q/25988577
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40768235
score: 2

http://stackoverflow.com/comment/40564216
has text: Ok, an easier example: I have got this array: `var array1=[[2],[7],[17],[24],[33],[55]];` and I have this number: `var givenNumber=19`; I need to know in what range is this number, and then get the first array. In this case, it is between `[17]` and `[24]`, and I need to take `[17]`. `[17]` is the first part of the range
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25910161

http://stackoverflow.com/comment/40688482
score: 0
type: Comment
type: QuestionComment
has text: Yep, that worked, thanks guys! I posted these as an answer and will mark it as correct when I'm allowed to.
comment on: http://stackoverflow.com/q/25983634

http://stackoverflow.com/comment/40771091
has text: Serialize works beautifully. The key is to not get the data from the URL if you need it before the submit event finishes! THANK YOU!
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26029098

http://stackoverflow.com/q/25877419
answer count: 2
has comment: http://stackoverflow.com/comment/40497022
tagged with: datepicker
has body: I am facing a problem to disable the date on datepicker after select any date. My HTML Markup : Day 1 &lt;input type="text" id="datepicker1" name="datepicker1" /&gt; &lt;br/&gt; Day 2 &lt;input type="text" id="datepicker2" name="datepicker2" /&gt; &lt;br/&gt; Day 3 &lt;input type="text" id="datepicker3" name="datepicker3" /&gt;&lt;br/&gt; Day 4 &lt;input type="text" id="datepicker4" name="datepicker4" /&gt;&lt;br/&gt; Day 5 &lt;input type="text" id="datepicker5" name="datepicker5" /&gt;&lt;br/&gt; Day 6 &lt;input type="text" id="datepicker6" name="datepicker6" /&gt;&lt;br/&gt; Day 7 &lt;input type="text" id="datepicker7" name="datepicker7" /&gt;&lt;br/&gt; JavaScript Which i used : var dates = $("#datepicker1, #datepicker2, #datepicker3, #datepicker4, #datepicker5, #datepicker6, #datepicker7").datepicker({ minDate: "0", maxDate: "+2Y", defaultDate: "+1w", dateFormat: 'mm/dd/yy', numberOfMonths: 1, onSelect: function(date) { for(var i = 0; i &lt; dates.length; ++i) { if(dates[i].id &lt; this.id) $(dates[i]).datepicker('option', 'maxDate', date); else if(dates[i].id &gt; this.id) $(dates[i]).datepicker('option', 'minDate', date); } } }); My JsFiddle Demo I got that useful script on JsFiddle. There date disabling properly after select 1 date. But i need to use that for 7 date. So anyone help me to use that useful script for me in my jsfiddle example! ## I want date will be just disable after select. It will be unavailable to select next.
possible better answer: http://stackoverflow.com/a/25878467
has comment: http://stackoverflow.com/comment/40497082
has answer: http://stackoverflow.com/a/25878467
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40497065
tagged with: jquery-plugins
has answer: http://stackoverflow.com/a/25895136
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/25895136
downvote count: 0
favorite count: 0
has title: Disable the date after select in datepicker
type: Question
upvote count: 2

http://stackoverflow.com/a/26049562
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25954386
has body: Apparently it's impossible, I asked the same question in several places online and got no solution anywhere. Still, I solved the problem another way, if I can't fire two buttons at once, I should just add the functionality of one into another. Which I did, adding the ability to copy to clipboard to Downloadify, works perfectly.
type: Answer
answers question: http://stackoverflow.com/q/25954386
score: 0

http://stackoverflow.com/q/25899415
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25899551
type: UnansweredQuestion
has body: I want to make a page with JavaScript that has a button saying "Multiplication Tables." When I click the button, the multiplication table of 5 will show up in the "p" tag with the id "tables." I want to use a for loop to calculate the tables. Nothing is happening when I click the button. HTML: Multiplication Tables JavaScript: function table() { var button = document.getElementById('multiplication'); var showTables = ''; for (var i=1; i<12; i++) { showTables += 5 + "*" + i +"="+5*i + '\n'; } var p_tables = document.getElementById('tables').innerHTML = showTables; } table();
has comment: http://stackoverflow.com/comment/40536470
type: Question
has title: Show Multiplication Tables with a button
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

keycode
tags question: http://stackoverflow.com/q/25881678
tag name: keycode
type: Tag
tags question: http://stackoverflow.com/q/25977055

http://stackoverflow.com/a/25908485
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40554131
answers question: http://stackoverflow.com/q/25908320
downvote count: 0
has body: The problem is the this keyword. In your sample it's not referring to what you expect. Try using the RMP (revealing module pattern) to simplify the way you write your code. It looks something like this: var viewModel = (function() { var users = ko.observableArray(); var user = ko.observable(); // This one changes: you can use the vars directly var getUser = function (userId) { for(var i = 0; i &lt; users().length; ++i) { if (users()[i].Id === userId) { user(this.users()); break; } } } // Reveal the data return { users: users, user: user, getUser : getUser }; })(); // self-executing anonymous function The anonymous function puts a closure around your vars. You can use the vars safely inside that closure, and they are not available outside of it. Besides you can have "private vars" by simply don't revealing them. Additional note: I recommend you to use lodash or underscore to simplify array manipulation: you'd avoid writing loops to find an element in an array. For example using lodash find.
type: Answer

http://stackoverflow.com/a/26671039
type: Answer
has body: So Ive done it something like this in my controller this.control({ 'categoryViewWindow checkcolumn' : { checkchange: me.checkCategoryView, } }); And method checkCategoryView: function () { var me = this, categoriesViewStore = me.getCategoriesViewStore(), myId; if (category &amp;&amp; category.get('id') != -1) { foundCategory = categoriesViewStore.getNodeById(myId); if (foundCategory) { foundCategory.set('added', true); } } }, So after change I check my category forcibly
accepted answer of: http://stackoverflow.com/q/25936007
answers question: http://stackoverflow.com/q/25936007
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40701502
comment on: http://stackoverflow.com/a/25990994
type: AnswerComment
score: 0
has text: Thanks man, problem is the school won't allow us to use JQuery this semester ><
type: Comment

http://stackoverflow.com/a/26090333
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25962246
has body: The number of unique properties in Character and Paragraph Styles is very high; in CS4, about 170 for paragraphs, about 80 for characters. This includes both the familiar ones (name, tracking) as well as the bizarre (otfTitling, underlineGapOverprint, gradientStrokeLength). Fortunately, one rarely needs an exact clone of a style (including all of its properties). Also, usually a Character Style only defines a few properties. The easiest way to create a style out of nothing is to assume reasonable defaults for all values and only set the properties that deviate. There are a few caveats, though. Some properties need new items to be created in other places -- such as the fillColor of a style. Should the script also recreate this color? What if it already exists, but with a different value or color model? (Should it use the existing one, overwrite it, or create a new color?) What if the color value exists -- but under another name? (Should it scan the existing list for a match?) The same goes for a 'parent' style; what if an entire tree of styles needs to be created? What about dropCapStyle, nestedStyles, nestedGrepStyles, and nestedLineStyles? Do these need their character styles re-created? Another potential pitfall is the measurement unit in use. Some of the properties are 'absolute', such as pointSize; others depend on the horizontal (leftIndent) or vertical (spaceBefore) rule settings. (My script below saves the units in use when the script is run, and restores them when done.) The following script writes out a new script that defines a list of properties that you can easily edit and append (bearing the above-mentioned caveats in mind). A full list of all Paragraph/Character Style properties can be found in the ESTK Help menu, or online at ParagraphStyle and CharacterStyle*. This is just a basic framework, and it can be easily adapted for other purposes. Note that it is hardcoded to use a certain style name; Body Text -- this can be replaced with var parstyle = app…
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40617763
comment on: http://stackoverflow.com/q/25944113
has text: Can you show a sample of the JSON you're `POST`ing?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40624590
has text: @halfer fat fingers strike again LOL
comment on: http://stackoverflow.com/q/25943030
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/25983959
downvote count: 0
answers question: http://stackoverflow.com/q/25983859
type: Answer
upvote count: 1
has body: You'll want to put the document.getElementById("mytext").value = response; in your success callback. var promise = $.getJSON("https://blockchain.info/q/24hrprice"); promise.done(function(todayValue) { console.log(todayValue); document.getElementById("mytext").value = todayValue; });
score: 1

http://stackoverflow.com/q/25974054
score: 0
answer count: 1
has body: I am using leaflet.js , heatmap plugin. There is one tiny class called L.heatLayer (source code https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js) There is no option for opacity The options are only options: { maxZoom: 18, radius: 25, blur: 15, max: 1.0}, Is there any way I can control the opacity using this leaflet.js heatLayer ? Thank you very much
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25990543
tagged with: heatmap
tagged with: leaflet
has title: control the opacity of heatmap using leaflet heatmap
type: Question
tagged with: javascript

http://stackoverflow.com/comment/48962324
comment on: http://stackoverflow.com/a/26025623
type: Comment
has text: Apparently fixed in ff 38: https://hacks.mozilla.org/2015/03/webrtc-in-firefox-38-multistream-and-renegotiation/
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40744861
type: Comment
type: QuestionComment
has text: Did you tried to use `ng-bind-html` together with `$sce.trustAsHtml()`?
comment on: http://stackoverflow.com/q/26015074
score: 0

http://stackoverflow.com/q/26024335
favorite count: 0
accepted answer: http://stackoverflow.com/a/26024528
has answer: http://stackoverflow.com/a/26024528
type: AnsweredQuestion
has body: I have a hidden input field like this in jade: input(name='saintForm[quotes][]', type='hidden') I want to use jquery to add to this array from a dynamic unordered list, but not sure how. Here's my failing attempt: $('#form').on('submit', function(e){ e.preventDefault(); $('.quote').each(function (i){ var item = $(this).text().replace(' (x)',''); $("input[name='saintForm[quotes][]']").push(item); }); this.submit(); });
score: 1
has title: Add to HTML input array
has comment: http://stackoverflow.com/comment/40762342
type: Question
has comment: http://stackoverflow.com/comment/40762242
tagged with: javascript
has comment: http://stackoverflow.com/comment/40762589
has comment: http://stackoverflow.com/comment/40762544
upvote count: 1
downvote count: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/40688801
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25983859
has text: It works! Thanks a lot! Although I dont really get the concept of the callback function yet, I will definitely look into from now on...it looks really important!
score: 0

http://stackoverflow.com/comment/40607772
type: Comment
comment on: http://stackoverflow.com/a/25932704
score: 0
type: AnswerComment
has text: Messages

http://stackoverflow.com/a/25955758
upvote count: 2
has comment: http://stackoverflow.com/comment/40636847
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40636917
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40636852
has body: You have to assert that another same group cannot be somewhere after the match, not just immediately after. See this modification: \[(\d+)\](?!.*?\[\d+\]) ^^^ Or you can switch to a backtracking approach: .*\[(\d+)\] Here is a regex demo for the first regex, and here is one for the other.
downvote count: 0
answers question: http://stackoverflow.com/q/25955748
accepted answer of: http://stackoverflow.com/q/25955748

http://stackoverflow.com/a/25977114
type: Answer
has body: Click on the filter icon, tick Regex and write a filter that looks like ^\s*(!?XMLHttpRequest cannot load http://api\.mixpanel\.com) But really you should consider fixing the error rather than hiding it
has comment: http://stackoverflow.com/comment/40677308
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25977021
has comment: http://stackoverflow.com/comment/40678850

http://stackoverflow.com/a/26148361
score: 2
accepted answer of: http://stackoverflow.com/q/25980346
answers question: http://stackoverflow.com/q/25980346
type: AcceptedAnswer
downvote count: 0
has body: The best way to preload images is to use the Image constructor like the example below. Using the Image constructor makes it so you don't have to worry about attaching the images anywhere to the document to make them load. function preload(url) { var image = new Image(); image.src = url; } I updated your Fiddle to use this preload and to not use jQuery for setting the background-image. It works quite well now. All images are preloaded/loaded only once. $(function () { var $container = $(".container"); var $bgImage = $(".test"); var bgImage = $bgImage.get(0); $container.scroll(function (event) { var position = $container.scrollTop(); setBgImage(position); }); // preload the given total amount of iamges function preload(totalImages) { function fetch(url) { var image = new Image(); image.src = url; } for (var i = 0; i &lt; totalImages; i++) { fetch(getImgUrl(i)); } } preload(36); function setBgImage(position) { var imageNum; var lineCount = 0; imageNum = parseInt(position / 100); var url = getImgUrl(imageNum); bgImage.style.backgroundImage = "url('"+ url +"')"; } function getImgUrl(num) { return "http://placehold.it/200x200/&amp;text=" + num; } })
upvote count: 2
type: Answer

http://stackoverflow.com/comment/40608145
comment on: http://stackoverflow.com/a/25938568
score: 0
type: Comment
has text: It's a .php in fact. Does it make difference?
type: AnswerComment

http://stackoverflow.com/a/25891185
type: Answer
answers question: http://stackoverflow.com/q/25891103
accepted answer of: http://stackoverflow.com/q/25891103
has comment: http://stackoverflow.com/comment/40521008
score: 3
upvote count: 3
has body: serializeObject returns o which is defined at the top of the function as {}. push is a method of Array objects, not plain objects. It puts an item onto the end of an array. Plain objects are unordered. There isn't an "end" to put the item onto, so it doesn't make sense for there to be a push method. You, presumably, want to just create a new property with a given name and value. data.push({name:"bonjour",value:bonjour}); should be data.bonjour = bonjour;
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40744535
comment on: http://stackoverflow.com/a/26014853
type: Comment
score: 0
type: AnswerComment
has text: @BVenky, are you using multiple checkboxes with same values?

http://stackoverflow.com/q/25948230
upvote count: 1
type: Question
has title: How to secure AngularJS $http.post data?
has answer: http://stackoverflow.com/a/25948430
tagged with: javascript
tagged with: security
answer count: 2
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25948247
has body: I came to a security concern while doing $http.post requests that are received by the backend of my app. I can see all the data that is being sent using for example firebug in Firefox. Are third parties able to sniff this data? It would be disastrous if someone sniffed the password when someone registers a new account. Is there a way to secure my AngularJS front-end so that someone won't be able to steal the data in the POST request? Any advice will be appreciated :)
score: 1

http://stackoverflow.com/a/26008823
has body: Try var NameString = $("#StoreInputs").val(); var NameArray = NameString.split(","); for (var i = 0; i &lt; NameArray.length; i++) { //trim the class name to remove any leading spaces $('.' + $.trim(NameArray[i])).each(function (n, obj) { //obj is a dom element reference, so doesn't have the val() method //so wrap it using jQuery object alert($(obj).val()); }); }
answers question: http://stackoverflow.com/q/26008758
score: 0
type: Answer

http://stackoverflow.com/a/26018542
has body: You can use jQuery.delay() to make them appear one after another. Try this: no_of_p = $('div#mydiv p').length; for (i = 0; i &lt; no_of_p; i++) { $('div#mydiv p:eq(' + i + ')').delay(i*2000).fadeIn(1000).fadeOut(1000); }; Check it out here: jsFiddle
type: Answer
answers question: http://stackoverflow.com/q/26018369
score: 0

http://stackoverflow.com/comment/40638793
has text: It does, it's not visible in Chrome Developer Tools. It does toggle the "editable" feature does it not?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25952660
type: AnswerComment

http://stackoverflow.com/q/26016354
type: Question
tagged with: javascript
has title: onClick event on image while already moving
tagged with: image
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/26016574
tagged with: events
type: AnsweredQuestion
has body: I'm trying to make an image that moves to the right on my website. When you click the image, it should move to the left. For now, this doesn't happen, any ideas? If possible, in pure Javascript and no Jquery ;) Also, if you click the image for a second time, it should move to the right again. Every consecutive time, the image should move to the other side. I guess this would be best with a for-loop? &lt;script type"text/javascript"&gt; window.onload = init; var winWidth = window.innerWidth - movingblockobject.scrollWidth; //get width of window var movingblock = null //object movingblock.onclick = moveBlockLeft(); function init() { movingblock = document.getElementById('movingblockobject'); //get object movingblock.style.left = '0px'; //initial position moveBlockRight(); //start animiation } function moveBlockRight() { if (parseInt(movingblock.style.left) &lt; winWidth) { // stop function if element touches max window width movingblock.style.left = parseInt(movingblock.style.left) + 10 + 'px'; //move right by 10px setTimeout(moveBlockRight,20); //call moveBlockRight in 20 msec } else { return; } } function moveBlockLeft () { movingblock.style.right = parseInt(movingblock.style.right) + 10 + 'px' } &lt;/script&gt;
tagged with: onclick
has answer: http://stackoverflow.com/a/26016574
has answer: http://stackoverflow.com/a/26018336
accepted answer: http://stackoverflow.com/a/26018336

http://stackoverflow.com/comment/40752480
score: 2
type: QuestionComment
type: Comment
has text: is that a typo or did you forget the quotes around `visible` and `display`? ie `= "visible";` or are they actual variables? Also if they are meant to be actual values `display` is not a valid value for `style.display`, _block,inline-block,inline,hidden_ etc are though
comment on: http://stackoverflow.com/q/26019081

http://stackoverflow.com/q/25919955
has title: How can I catch touchmove events on an element that is added to the DOM after my finger is already on the screen?
has comment: http://stackoverflow.com/comment/40575107
tagged with: jquery-events
answer count: 3
has answer: http://stackoverflow.com/a/25936964
favorite count: 0
accepted answer: http://stackoverflow.com/a/25936964
has comment: http://stackoverflow.com/comment/43420421
tagged with: touchstart
type: AnsweredQuestion
upvote count: 9
has answer: http://stackoverflow.com/a/25920129
has comment: http://stackoverflow.com/comment/40578402
score: 9
type: Question
has comment: http://stackoverflow.com/comment/40576091
has comment: http://stackoverflow.com/comment/40576435
possible better answer: http://stackoverflow.com/a/25921234
downvote count: 0
has comment: http://stackoverflow.com/comment/40576014
has body: I am working on a Javascript / html5 project for iPad. I need to be able to catch touchmove events on an element that does not get added to the DOM until after a touchstart event has fired (i.e. until after a person has put their finger on the screen.) I have tried simulating a touchstart event and firing it programatically... $( "#container" ).append( element ); element.on( "touchmove", doStuff ); var ev = $.Event( "touchstart" ); element.trigger( ev ); ...however this does not work. The only way I can get doStuff to start firing is to lift my finger and then touch the screen again, triggering a second touchstart event. How can I catch touchmove events on an element that is added to the DOM after my finger is already on the screen?
has answer: http://stackoverflow.com/a/25921234
has comment: http://stackoverflow.com/comment/40576595
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40575655

http://stackoverflow.com/comment/42643570
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25983608
has text: Still even under 8.1.1 apple ignores the need to register touch events on iframes in home screen use. I can’t believe this. This will be ignored forever as it seems :-(

http://stackoverflow.com/a/25907686
upvote count: 2
score: 2
has body: You could do something like this: var previousNumber=$("#number").val(); $("#number").on('change', function () { if (Number($(this).val()) &gt; previousNumber) { $("#container").append("&lt;div&gt;&lt;/div&gt;"); } else { $("#container").find("div").last().remove(); } previousNumber = $(this).val(); }); Fiddle demo: http://jsfiddle.net/29u92wos/2/
downvote count: 0
answers question: http://stackoverflow.com/q/25907593
has comment: http://stackoverflow.com/comment/40551393
type: Answer
has comment: http://stackoverflow.com/comment/40551309

http://stackoverflow.com/comment/40535553
score: 0
type: QuestionComment
type: Comment
has text: @KiranBadi and [this fiddle](http://jsfiddle.net/scnu5o4y/1/) with one-dimension array.
comment on: http://stackoverflow.com/q/25898853

http://stackoverflow.com/comment/40682679
type: Comment
has text: The problem is that $watch only runs every digest cycle. For example, when you change text in an input, AngularJS internally is running a plain javascript event listener, and inside the callback calling `$scope.$digest()`. However, AngularJS doesn't automatically do it for the `onscroll` event, so you have to call `$scope.$digest()` yourself.
comment on: http://stackoverflow.com/a/25944534
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40762643
has text: where is charsObj created in your code
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26024488

http://stackoverflow.com/comment/40766068
type: Comment
has text: ...and apologizes for my misleading comment. I'm a web designer who has self taught myself jquery. Sometimes my annunciation of the proper terms is off :)
comment on: http://stackoverflow.com/a/26026226
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40692895
has text: No, you can just create a single new Analytics Property, then use the tracking code from that property in every customers search widget. You can customize it by changing the word 'used' to each individual customer ID number. Then in GA you'll see the events broken down by total number used across all of your customers, or just by a specific customer, or by a specific search term.
type: AnswerComment
comment on: http://stackoverflow.com/a/25938437
score: 0
type: Comment

http://stackoverflow.com/comment/131411500
has text: For newlines in strings generated by JavaScript, it's just `\n`.
type: Comment
comment on: http://stackoverflow.com/a/25921387
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40600871
has text: @user3577774 Let me know you want onclick or onchange?
comment on: http://stackoverflow.com/a/25934856
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25917079
has title: read json and show the dynamic value onmouse over
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 2
has comment: http://stackoverflow.com/comment/40568898
has answer: http://stackoverflow.com/a/25917362
has body: Requirement is to read Json object and the value should be shown on mouse over a tooltip. Please find the code in http://jsfiddle.net/8WKTj/49/ Below is the JSON code: jsonDataFile.js { "Column1": "This represents transID", "Column2": "This represents Spread percentage", "Column3": :" Column3 title description"; } javascript: $(function() { $(".question").each(function(index) { $.getJSON("js/jsonDataFile.js",function(result){ $.each(result, function(i, field){ alert(" i: " + i +" ,"+ field); //prints i: column1 ,This represents transID //i: column2 , This represents Spread percentage $(this).prop('title', result[index]); }); }); }); }); When i mouse over on column1, tooltip should display the message "This represents transID" . Similarly when mouse overon column2 , tooltip should display "This represents Spread percentage"...I have tried reading json file and show message on tooltip as above but output is not as expected. It's not showing anything onmouse over. Please suggest.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: 2

http://stackoverflow.com/comment/40495168
type: QuestionComment
has text: create a jsfiddle to check what you have so far.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25876617

http://stackoverflow.com/comment/40529778
score: 2
comment on: http://stackoverflow.com/q/25895756
type: QuestionComment
has text: @AmadeusDrZaius it's not that weird if you read the documentation.
type: Comment

http://stackoverflow.com/comment/40687941
has text: You'd be surprised at how much easier it is to spot bugs when the code is formatted properly !
score: 0
comment on: http://stackoverflow.com/q/25983439
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26027947
possible better answer: http://stackoverflow.com/a/26028657
has comment: http://stackoverflow.com/comment/40769263
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26028657
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26028445
has comment: http://stackoverflow.com/comment/40769854
has comment: http://stackoverflow.com/comment/40769319
type: Question
has comment: http://stackoverflow.com/comment/40769339
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40769153
has comment: http://stackoverflow.com/comment/40769828
has body: So I'm new to HTML/CSS and web development and I'm designing a site to host an online-based Likert-scale survey. I initially had the site set up so when the participant clicked on the link the entire survey would be displayed on the page with the submit button at the bottom of the page. However, my professor wants it designed in such a way that only one survey statement is displayed at a time, and the user can hit "Previous" or "Next" to navigate through the survey. I've written some code which accomplishes this, but it seems incredibly inefficient to me. There has got to be a better way to do what I'm attempting to accomplish!! Here's a sample of the approach I've been taking: A survey statement goes here Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) not answered Previous Next Another statement goes here! Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) not answered Previous Next Again, there HAS to be a better way to do this. If I keep going with this approach it will be a total pain to delete/add or reorganize survey statements later on. Any links or tips would be greatly appreciated! ****SOLUTION**** I ended up coming up with a solution using looping/echo in php. Here's a rough (not pretty) sample of the code I used to accomplish my task: GO <?php $numElements=5; $array = array("This is the first statement", "This is the second statement","This is the third statement","This is the fourth Statement", "Last statement here"); for($i=0;$i<$numElements;$i++){ $divId='state'.$i; $sId='q'.$i; $nextInt=$i+1; $prevInt=$i-1; $nextDiv='state'.$nextInt; $curDiv='state'.$i; $prevDiv='state'.$prevInt; if($i==0){ echo " $array[$i] Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) No answer Previous Next ";} else if($i==$numElements-1){ echo " $array[$i] Strongly Disagree (1) Disagree (2) Neutral (3) Agree (4) Strongly Agree (5) No answer Previous Next ";} else{ echo " $array[$i] Strongly Disagre…
upvote count: 4
has comment: http://stackoverflow.com/comment/40770026
answer count: 3
has answer: http://stackoverflow.com/a/26028445
has comment: http://stackoverflow.com/comment/40769300
downvote count: 0
has title: Efficient way to display a survey one statement at a time on single webpage
tagged with: web
has comment: http://stackoverflow.com/comment/40769928
has comment: http://stackoverflow.com/comment/40769176
has answer: http://stackoverflow.com/a/26048553
favorite count: 0

http://stackoverflow.com/comment/40641633
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25949237
has text: Still doesn't work. Maybe it's because I use a SVG symbol, I,ll try later with groups

http://stackoverflow.com/q/25986983
has title: Error: ENOENT, open 'null/60c0f337f3413edbc5eb3bb27fa3269f'
tagged with: javascript
has answer: http://stackoverflow.com/a/25989087
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25989087
linked to: http://stackoverflow.com/q/9047094
tagged with: node.js
type: AnsweredQuestion
has body: var conn = mongoose.createConnection(config.db); conn.once('open', function (err) { if (err) { next(err); return; } var source = fs.createReadStream(req.files.sample.path); var gfs = Grid(conn.db, mongoose.mongo); var id = mongoose.Types.ObjectId(); var target = gfs.createWriteStream({ _id: id, filename: req.files.sample.name }); source.pipe(target).on('close', function () { project.documentation = id; persistProject(req, res, next, project); }); } When I'm trying to upload it os showing the below error. Terminating application: undefined events.js:72 throw er; // Unhandled 'error' event ^ Error: ENOENT, open 'null/60c0f337f3413edbc5eb3bb27fa3269f' Why this error is coming? Please help me to solve it.
has comment: http://stackoverflow.com/comment/40694441
type: Question

http://stackoverflow.com/q/26015381
upvote count: 0
has comment: http://stackoverflow.com/comment/40745196
has comment: http://stackoverflow.com/comment/40745533
has comment: http://stackoverflow.com/comment/40745280
has title: jquery selector first child of ul tag
has comment: http://stackoverflow.com/comment/40745182
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26015448
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/26015439
tagged with: jquery-selectors
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26015623
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40745310
has comment: http://stackoverflow.com/comment/40745624
answer count: 4
has body: I have a menu structure like this: One Two Sub One Sub One One... Sub One Two Sub Two Sub Two One Sub Two Two Sub Tree Tree Now... How can i select all sub first "ul" tags in class "active" ? sample, active > "ul" (sub one) > "ul" (sub one one) ... etc.
has answer: http://stackoverflow.com/a/26015728

http://stackoverflow.com/q/25943995
has title: Use only jQuery .click() event on nested leaf node
tagged with: javascript
score: 0
duplicate of: http://stackoverflow.com/q/1398582
tagged with: jquery
has body: I would like to be able to detect click events on the leaf node in a hierarchy. The HTML: 1 2 3 4 I use the following javascript: $( "span" ).click(function(e) { var about = $(this).attr("about"); console.log("clicked on "+about); }); The problem is that if I click on '4', I get the following console output: [Log] clicked on 4 [Log] clicked on 2 [Log] clicked on 1 So the event is called on but also on its parents. But I only want the event being called on so that I can change the background colour of this span element. How can I prevent the event being called on its parents?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40617602
linked to: http://stackoverflow.com/q/1398582
answer count: 0
has comment: http://stackoverflow.com/comment/40617589
type: Question

http://stackoverflow.com/comment/40699160
type: Comment
comment on: http://stackoverflow.com/a/25989683
has text: ! not work, `www.example.com/aaa.php?value_1=robert&value_2=21&submit=send`
type: AnswerComment
score: 0

drupal
type: Tag
tag name: drupal
tags question: http://stackoverflow.com/q/25907798
tags question: http://stackoverflow.com/q/26031131

http://stackoverflow.com/q/25910114
has comment: http://stackoverflow.com/comment/40659741
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/40659594
answer count: 3
downvote count: 0
has title: Highcharts - areaspline with negative values, area should be always at the bottom
favorite count: 0
has comment: http://stackoverflow.com/comment/40559085
has body: I would like to create a chart with Highcharts, with negative values, like this: http://jsfiddle.net/vargapeti/LjL03o8h/3/ $(function () { $('#container').highcharts({ chart: { type: 'areaspline' }, title: { text: 'Area chart with negative values' }, yAxis: { title: { text: 'value' } }, plotOptions: { area: { dataLabels: { enabled: true }, stacked: 'normal' } }, series: [{ name: 'Area with negative values', data: [[0, -7.0], [1, 6.9], [1.5, 9.5], [3, -6]], fillColor : { linearGradient : [0, 0, 0, 300], stops : [ [ 0, Highcharts.Color('#FFA500').setOpacity(1).get('rgba') ], [ 1, Highcharts.Color('#ffffff').setOpacity(0.3).get('rgba') ] ] } }, { name: 'Area with positive values', data: [[0, 13.0], [1, 26.9], [1.5, 29.5], [3, 14]], fillColor : { linearGradient : [0, 0, 0, 300], stops : [ [ 0, Highcharts.Color('#d2d8df').setOpacity(1).get('rgba') ], [ 1, Highcharts.Color('#ffffff').setOpacity(0.3).get('rgba') ] ] } } ], }); }); I need however, the orange area to be always between the X-axis and the curve, regardless of the negative values. So basically I want to shift the curve "Area with positive values" under zero, but keep the filled up area under the curve. Is it possible with Highcharts anyhow? Thank you.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40664655
linked to: http://stackoverflow.com/q/41067304
score: 3
has answer: http://stackoverflow.com/a/25913994
upvote count: 3
has answer: http://stackoverflow.com/a/25970974
has answer: http://stackoverflow.com/a/50992956
has comment: http://stackoverflow.com/comment/40600431
type: Question

http://stackoverflow.com/comment/40764961
comment on: http://stackoverflow.com/q/26025443
score: 0
type: Comment
type: QuestionComment
has text: @keypaul, that is exactly why I posted this question - thank you for bringing me up to speed on conditionally measuring against an Array of values! I apologize to everyone on here that I didn't say it that way!

http://stackoverflow.com/comment/40509554
type: AnswerComment
type: Comment
has text: @mithunsatheesh, http://stackoverflow.com/questions/2846283/what-are-the-rules-for-javascripts-automatic-semicolon-insertion-asi most likely lists all the cases. I did learn a few for sure. But the point is that although skipping `;` can make code look a bit cleaner, it will sure take more time and anger to debug.
score: 1
comment on: http://stackoverflow.com/a/25884226

http://stackoverflow.com/comment/40841150
score: 0
type: Comment
has text: Hey, thanks for the response and for all of your help, I'll try your answer now and get back to you.
comment on: http://stackoverflow.com/a/26059792
type: AnswerComment

http://stackoverflow.com/comment/40584226
type: Comment
has text: Also, I just tested 'window.setTimeout' here and I got the same error!
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25925365

http://stackoverflow.com/comment/40659281
has text: Please mention both the methods...with ajax as well as jquery...it will be very helpfull to me.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25962911

http://stackoverflow.com/q/26003001
type: Question
tagged with: javascript
has title: Is there a way to detect fatal JS error caused by other script
score: 0
has comment: http://stackoverflow.com/comment/40724934
has comment: http://stackoverflow.com/comment/40723666
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40723278
answer count: 0
has body: Is there a way from the javascript code to detect that another script (which is out of your control) has caused a fatal error on the page? The situation is this. The user installs your script on their site. If something on their site caused fatal error your script also won't work. Is there a way to detect this and prevent it or at least alert the user that something is causing fatal error?
has comment: http://stackoverflow.com/comment/40723244

http://stackoverflow.com/comment/40727040
has text: so you can edit your answer or remove it..cause it makes no sense leaving an answer that doesn't work.
comment on: http://stackoverflow.com/a/26003348
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25996891
tagged with: reactjs
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25997237
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40729800
has answer: http://stackoverflow.com/a/31283427
has title: React.js Understanding setState
has comment: http://stackoverflow.com/comment/40712177
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40740783
has body: I've been having a go at learning React.js by writing a small calculator application. I thought things were going quite well until I learned that setState is asynchronous and my mutations therefore do not get immediately applied. So my question is, what is the best way to keep a running total based upon the values being added to an input. Take the following example: var Calculator = React.createClass({ total : 0, getInitialState : function(){ return { value : '0' }; }, onValueClicked : function (value) { var actual, total, current = this.state.value; if(value === '+') { actual = this.total = parseInt(this.total, 10) + parseInt(current, 10); } else { if(parseInt(current, 10) === 0) { actual = value; } else { actual = current.toString() + value; } } this.setState({ value : actual }); }, render : function () { return ( &lt;div className="calc-main"&gt; &lt;CalcDisplay value={this.state.value} /&gt; &lt;CalcButtonGroup range="0-10" onClick={this.onValueClicked} /&gt; &lt;CalcOpButton type="+" onClick={this.onValueClicked} /&gt; &lt;/div&gt; ) } }); var CalcDisplay = React.createClass({ render : function () { return ( &lt;input type="text" name="display" value={this.props.value} /&gt; ); } }); var CalcButtonGroup = React.createClass({ render : function () { var i, buttons = [], range = this.props.range.split('-'); for(i = range[0]; i &lt; range[1]; i++) { var handler = this.props.onClick.bind(null, i); buttons.push(&lt;CalcNumberButton key={i} onClick={ handler } /&gt;); } return ( &lt;div className="calc-btn-group"&gt;{ buttons }&lt;/div&gt; ); } }); var CalcNumberButton = React.createClass({ render : function () { return ( &lt;button onClick={this.props.onClick}&gt;{this.props.key}&lt;/button&gt; ); } }); var CalcOpButton = React.createClass({ render : function () { var handler, op = this.props.type; handler = this.props.onClick.bind(null, op); return ( &lt;button onClick={handler}&gt;{op}&lt;/button&gt; ); } }); React.renderComponent(&lt;Calculator /&gt;, document.get…

http://stackoverflow.com/comment/40568642
has text: Just call the Js function, stepLeft();
comment on: http://stackoverflow.com/q/25917006
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26003952
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40856906
favorite count: 0
tagged with: security
has body: I have an iframe containing a site on a different domain. In the iframe's Javascript, I can change the location of the lop page: window.top.location.href = "http://www.example.com"; However, if I try to access this location: window.top.location == "http://www.example.com"; I get: Error: Permission denied to access property 'valueOf' Can you read properties of the enclosing page or are they write-only? If they are write-only, why?
tagged with: http://stackoverflow.com/tag/html
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
tagged with: http-redirect
type: Question
has title: iframe Javascript can write parent properties but not read them
has comment: http://stackoverflow.com/comment/40909819

http://stackoverflow.com/comment/40712914
has text: Don't you get a javascript error?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25996436

http://stackoverflow.com/comment/40549043
type: Comment
comment on: http://stackoverflow.com/a/25890837
has text: querySelector works pretty much like the jQuery selectors. If you want to point specifically to table1, then you can use: querySelector('#table1 tr td input')
score: 0
type: AnswerComment

http://stackoverflow.com/q/25905572
accepted answer: http://stackoverflow.com/a/26008886
score: 1
has title: dashing d3js with x,y,x1,y1,x2,y2,z
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/40731497
type: Question
tagged with: d3.js
has comment: http://stackoverflow.com/comment/40726302
has comment: http://stackoverflow.com/comment/40696434
upvote count: 2
has answer: http://stackoverflow.com/a/26008886
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40728150
has comment: http://stackoverflow.com/comment/40673676
tagged with: javascript
has body: I found this link and applied my path. It runs but giving me unexpected output. I convert my original path: &lt;path id="secnb1l1" class="lungon" fill="none" stroke="red" stroke-width="5" d="M 93.00,444.00 C 93.00,444.00 114.00,506.00 114.00,506.00 102.30,512.28 100.00,518.71 100.00,531.00 100.00,531.00 86.00,534.00 86.00,534.00 86.00,534.00 68.95,485.00 68.95,485.00 68.95,485.00 58.00,452.00 58.00,452.00 58.00,452.00 93.00,444.00 93.00,444.00 Z M 75.00,458.00 C 75.00,458.00 79.00,458.00 79.00,458.00 78.99,466.29 79.26,463.93 76.00,471.00 76.00,471.00 86.00,471.00 86.00,471.00 82.12,462.60 83.00,464.37 83.00,455.00 83.00,455.00 75.00,458.00 75.00,458.00 Z" /&gt; which give me this output: to this array as the link above instructed me: [{"type":"M","x":93,"y":444},{"type":"C","x":114,"y":114,"x1":93,"y1":444,"x2":114,"y2":506},{"type":"C","x":100,"y":100,"x1":102.30000305175781,"y1":512.280029296875,"x2":100,"y2":518.7100219726562},{"type":"C","x":86,"y":86,"x1":100,"y1":531,"x2":86,"y2":534},{"type":"C","x":68.94999694824219,"y":68.94999694824219,"x1":86,"y1":534,"x2":68.94999694824219,"y2":485},{"type":"C","x":58,"y":58,"x1":68.94999694824219,"y1":485,"x2":58,"y2":452},{"type":"C","x":93,"y":93,"x1":58,"y1":452,"x2":93,"y2":444},{"type":"Z"},{"type":"M","x":75,"y":458},{"type":"C","x":79,"y":79,"x1":75,"y1":458,"x2":79,"y2":458},{"type":"C","x":76,"y":76,"x1":78.98999786376953,"y1":466.2900085449219,"x2":79.26000213623047,"y2":463.92999267578125},{"type":"C","x":86,"y":86,"x1":76,"y1":471,"x2":86,"y2":471},{"type":"C","x":83,"y":83,"x1":82.12000274658203,"y1":462.6000061035156,"x2":83,"y2":464.3699951171875},{"type":"C","x":75,"y":75,"x1":83,"y1":455,"x2":75,"y2":458},{"type":"Z"}] but giving me this output: aarrrggggg....It's so far from the original. I think it's because the converted path has the x1,y1,x2 and y2. Is it? Anyone who knows this? Because the link above don't give complex examples. I will very much appreciated you :) EDITED Here's my script anyways f…
type: AnsweredQuestion

http://stackoverflow.com/comment/40761564
type: Comment
type: QuestionComment
has text: Are you really interested in the facebook and twitter sites specifically, or real-time applications in general? You could easily find out which technology(s) they've applied by using your browser's devtools (network inspector, specifically).
comment on: http://stackoverflow.com/q/26023505
score: 0

http://stackoverflow.com/q/25989762
has answer: http://stackoverflow.com/a/25990209
has answer: http://stackoverflow.com/a/25989918
linked to: http://stackoverflow.com/q/18786546
possible better answer: http://stackoverflow.com/a/25989856
has title: Making drop down menu by click using css
downvote count: 0
tagged with: jquery
duplicate of: http://stackoverflow.com/q/18786546
favorite count: 0
linked to: http://stackoverflow.com/q/1895476
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25990209
tagged with: css
answer count: 4
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25989856
has answer: http://stackoverflow.com/a/25989866
has body: I have an simple example of drop down menu by click using AJAX: http://jsfiddle.net/dmitry313/1s62x8hc/2/ HTML: Dropdown menu Dropdown link 1 Dropdown link 2 SCRIPT: $(document).ready(function () { var click = function () { var divObj = $(this).next(); var nstyle = divObj.css("display"); if (nstyle == "none") { divObj.slideDown(false, function () { $("html").bind("click", function () { divObj.slideUp(); }); }); } }; $(".dropmenu").click(click); }); Is it possible to make the same without any script, just using CSS? EDIT: Updated link

http://stackoverflow.com/a/26002224
type: AcceptedAnswer
has body: This is how you put JavaScript strings into source. You cannot simply go to new line. For example the following code is working alert('1 2 3 4'); but the following does not: alert('1 2 3 4'); and the following again works: alert('1' + '2 3 4'); If you want to make any changes in Smarty you could do it this way: {assign var="string" value="1 2 3 4"} &lt;script&gt; alert ("{$string|replace:array("\n","\r"):array(' ', '')}"); &lt;/script&gt; using replace modifier you change \r and \n into space - it makes small content change but if you don't care it should work. The other solution is to convert new line endings into plain \n string that makes JavaScript to treat them as new line so you could change above example into: {assign var="string" value="1 2 3 4"} &lt;script&gt; alert ("{$string|replace:array("\n","\r"):array('\n', '\n')}"); &lt;/script&gt; and now in alert you will show new lines. So in your case you should probably change line: add_task_row("{$task.task_id}","{$ID}","{$task.name}","{$task.description}","{$task.status}","{$task.priority}","{$task.type}","{$task.sort_order}","{$task.heading}"); into add_task_row("{$task.task_id}","{$ID}","{$task.name}","{$task.description|replace:array("\n","\r"):array('\n', '\n')}","{$task.status}","{$task.priority}","{$task.type}","{$task.sort_order}","{$task.heading}");
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40739809
accepted answer of: http://stackoverflow.com/q/26001621
answers question: http://stackoverflow.com/q/26001621
upvote count: 1

http://stackoverflow.com/q/25985590
tagged with: url
has body: I have two websites www.mywebsite.com and www.otherwebsite.com. I use iframe to redirect mywebsite.com to otherwebsite.com. Is there a to change the path of url on page change. For example when a link otherwebsite.com/contact.html is clicked the frame adds /contact.html to mywebsite.com making it www.mywebsite.com/contact.html. I tried adding the code below to the page but it doesn't seem to work on the frame. history.pushState(null, "A new title!", "contact.html")
type: UnansweredQuestion
has title: Change path of iframe on page change
tagged with: iframe
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25986018
score: 0
answer count: 1

http://stackoverflow.com/comment/40509314
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25884404
has text: this is my code.. can you tell me how to use ajax on it? Executive Room
type: Comment

http://stackoverflow.com/comment/40517629
type: QuestionComment
comment on: http://stackoverflow.com/q/25889088
type: Comment
has text: You can't send jquery-objects as a json, you have to get the jquery object value like so: $('#start-date').val(); or better yet if all these values are in a form you can serialize they form like this: $('form').serialize(); and send that data.
score: 0

http://stackoverflow.com/q/25971266
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40665456
has body: Steps to reproduce issue; Open bootStrap website in chrome with restore session option enable in chrome-&gt;settings-&gt;on startup-&gt;Continue where you left off Resize the window to view responsive mode Open the task manager and kill the process (or restart computer) Now open the browser again and let website load completely . Now resize browser to full window Note that a screen like below in screen shot appears; Its duration is very small like a sec or less; But on the application I am working built with bootstrap has permanent state like in screen shot until I refresh the Tab. In addition to above steps in my application there is certificate accept too. What would be best work around for this so that each browser accidently closes website should open in full mode rather in responsive view. Step5 Step6; Let me know if I am not clear on this. Thanks
tagged with: css
has comment: http://stackoverflow.com/comment/40665748
score: 1
upvote count: 1
type: Question
has title: Website opens in Responsive Mode on Desktop Browser - BootStrap
tagged with: javascript
has comment: http://stackoverflow.com/comment/40665646
has comment: http://stackoverflow.com/comment/40669543
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25973268
favorite count: 0
has comment: http://stackoverflow.com/comment/40665528
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40669988

http://stackoverflow.com/comment/40669771
score: 0
comment on: http://stackoverflow.com/q/25972371
type: Comment
type: QuestionComment
has text: Yes Pankaj...That is where I stuck at..Is there any other way..I cannot get pop from action phase right?..Thank you

http://stackoverflow.com/q/25968615
has comment: http://stackoverflow.com/comment/40660776
has comment: http://stackoverflow.com/comment/40660849
possible better answer: http://stackoverflow.com/a/25968833
has answer: http://stackoverflow.com/a/25968833
has answer: http://stackoverflow.com/a/25968695
has comment: http://stackoverflow.com/comment/40660812
downvote count: 4
answer count: 4
accepted answer: http://stackoverflow.com/a/25968705
type: AnsweredQuestion
upvote count: 0
has title: regex to accept currency notation and '+' sign
has comment: http://stackoverflow.com/comment/40660740
tagged with: javascript
score: -4
has body: I have a regex expression that excepts negative values and values with decimal points but i am not being able to make it accept ',' and '+' sign for now it accepts 123 , -123, -12.3, 12.3 but i want it to accept 12,345 and +123, +123.4 also Here is the expression var valid = (input.match(/^-?\d+(?:\.\d+)?$/)); if(!valid) { control.value=""; alert('Invalid Value') }
has answer: http://stackoverflow.com/a/25968859
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40660775
tagged with: regex
has answer: http://stackoverflow.com/a/25968705

http://stackoverflow.com/comment/40557097
comment on: http://stackoverflow.com/q/25910703
has text: One thing not clear is: are there 3 changes or just one change triggered multiple times?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/26013264
score: -1
has comment: http://stackoverflow.com/comment/40742245
has body: BStr don't care if they have nulls in them. In VB or VBS chr(43) &amp; vbnull &amp; chr(43). Everything is already unicode so no need to specify leading null bytes. However nulls may cause problems with other programs or components that don't expect them.
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26007682
downvote count: 1

http://stackoverflow.com/comment/40660736
has text: Replace console.log($("div#"+ key).attr("name")); By console.log($("#"+ key).attr("name")); Remove div from code.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25968576
score: 0

http://stackoverflow.com/q/25967316
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25967818
has answer: http://stackoverflow.com/a/57545980
answer count: 4
possible better answer: http://stackoverflow.com/a/25967422
has answer: http://stackoverflow.com/a/25967422
has answer: http://stackoverflow.com/a/25967563
tagged with: php
type: AnsweredQuestion
has title: JavaScript multiple auto count for cashier apps?
has answer: http://stackoverflow.com/a/25967818
type: Question
tagged with: javascript
score: 0
has body: I have a page like this: [http://jsfiddle.net/ph75fggo/] [http://jsfiddle.net/ph75fggo/5/]//more reliable sample And I tried to make a simple cashier apps, with help of JavaScript make an auto count on both rows and columns. This is the result I want to get: http://jsfiddle.net/wrz8bc10/ My Final Trying: jsfiddle.net

http://stackoverflow.com/comment/40584587
type: Comment
has text: you mean by doing something like: `$ch = curl_init();` `curl_setopt($ch, CURLOPT_TIMEOUT, 30);` ??
type: QuestionComment
comment on: http://stackoverflow.com/q/25925546
score: 0

http://stackoverflow.com/comment/40690868
type: Comment
score: 0
has text: Ahh that should explain the issue. I can try running a local webapi and see if this works.
comment on: http://stackoverflow.com/a/25984924
type: AnswerComment

http://stackoverflow.com/comment/116297632
comment on: http://stackoverflow.com/a/25903507
has text: Hello Zain, I currently have the same issue. have you found a solution? My observation was that the webpage reloads after the script executes and therefore discards all added non-static content
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25896664
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40535520
has comment: http://stackoverflow.com/comment/40531296
has answer: http://stackoverflow.com/a/25897481
accepted answer: http://stackoverflow.com/a/25897481
type: Question
answer count: 2
has body: What i would like to do is to show the products other versions of images on mousemove from left to right. Here's the simple html example: &lt;article&gt; &lt;figure data-imageList="image2.jpg,image3.jpg,image4.jpg"&gt; &lt;img data-src="main-image.jpg" src="main-image.jpg"&gt; &lt;/figure&gt; &lt;/article&gt; As you can see at html, the images src will be change from the data-imageList. When user mouseout from the article, the main-image.jpg will appear again. This will the default image. The function should be trigger when user only move his mouse from left to right on the current article. The other list items shouldn't be affected from the mousemove. Maybe, i should create a unique id or use the "each function" to do that. I couldn't solve that problem either anyway... Could someone help me to solve that problem. I am really bad at javascript. Thank you!
tagged with: swap
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25897422
tagged with: jquery
has comment: http://stackoverflow.com/comment/40537252
score: 0
has comment: http://stackoverflow.com/comment/40537294
tagged with: http://stackoverflow.com/tag/html
has title: Swap multiple images on mousemove
tagged with: css
has comment: http://stackoverflow.com/comment/40535165
has answer: http://stackoverflow.com/a/25897422
has comment: http://stackoverflow.com/comment/40536783
has comment: http://stackoverflow.com/comment/40537247

http://stackoverflow.com/a/42275396
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25940651
has body: This work for me.hope you can get some idea. &lt;style&gt; .dropdown-has-error{ border-color: #a94442;//bootsrtap warning color } &lt;/style&gt; add ng-class directive to the dropdown button ng-class="{'dropdown-has-error' : example == ''} in the controller $scope.example = ''; $scope.selectExample = function(val) { $scope.example = val; } or you can check condition as in the above post, ng-class="{'dropdown-has-error' : myForm.exampleLabel.$error.required}

http://stackoverflow.com/comment/40742815
has text: I tried both those scripts and unfortunately I have to change the [Execution Policy](http://technet.microsoft.com/sv-SE/library/hh847748.aspx) in PowerShell to make it run. By default I have Undefined in all scopes, but that defaults to "Restricted" and I guess I'm not the only one with this kind of configuration.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26013347

http://stackoverflow.com/q/25999747
has answer: http://stackoverflow.com/a/25999857
tagged with: javascript
tagged with: jquery
answer count: 6
has answer: http://stackoverflow.com/a/25999835
has answer: http://stackoverflow.com/a/25999892
has comment: http://stackoverflow.com/comment/40717241
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/26000256
favorite count: 0
upvote count: 7
type: AnsweredQuestion
has body: I am trying to create board game (like chess board game) with JavaScript. When I tried to do it this is what happened: The got closed immediately with , same thing with I tried to replace the append() method with appendTo() or add() but it didn't help This is my JavaScript code: var boardSize = 5; $(function() { //on load printBoard(boardSize); }); function printBoard(i_BoardSize) { var maxRow = parseInt(i_BoardSize); var maxCol = parseInt(i_BoardSize); var num = 1; $("#board").append(" "); for(var row = maxRow - 1; row >= 0 ; row--) { $("#board").append(" "); for(var col = 0; col < maxCol ; col++) { $("#board").append(" " + num + " "); num++; } $("#board").append(" "); } $("#board").append(" "); } CSS: td { width: 32px; height: 32px; cursor: pointer; text-align: center; border: 2px solid blue; } .redborder { background-color: red; color: white; } .blueborder { background-color: blue; color: white; } HTML: TODO supply a title Board Game
score: 7
has comment: http://stackoverflow.com/comment/40717348
has answer: http://stackoverflow.com/a/26000256
has answer: http://stackoverflow.com/a/25999841
accepted answer: http://stackoverflow.com/a/25999841
has comment: http://stackoverflow.com/comment/40717221
has comment: http://stackoverflow.com/comment/40717434
type: Question
has title: How to create board NxN using JavaScript and jQuery
has answer: http://stackoverflow.com/a/26028975

http://stackoverflow.com/comment/40674748
type: QuestionComment
comment on: http://stackoverflow.com/q/25975932
score: 0
has text: It worked. I got rid of the 'type="text/javascript"' in the agentSearch.js file call and it started working how I wanted it to. Thank you.
type: Comment

http://stackoverflow.com/comment/49570051
score: 0
type: Comment
has text: Thanks Zach, exactly what I needed. @Tzook if you must have the action in the view then throw it in a data attribute and fetch it in the js for use.
comment on: http://stackoverflow.com/a/25953606
type: AnswerComment

http://stackoverflow.com/comment/40779061
has text: Well, whatever works for you :) The easiest would probably be to put the clip path on a `g` element that contains all the symbols.
score: 1
comment on: http://stackoverflow.com/q/26013903
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25918363
has body: You'll need tooltip.js in your bootstrap build. Something like this might work. Volvo Saab Mercedes Audi // JS $("#mydropdown").change(function() { $(this).tooltip({ title: $("#mydropdown option:selected").val() }); });
answers question: http://stackoverflow.com/q/25918206
type: Answer
score: 0

http://stackoverflow.com/q/25962155
has comment: http://stackoverflow.com/comment/40648842
score: 0
has body: I have an image button, and I am using JavaScript to EXPAND and COLLAPSE a menu (by toggling between a class that has display: none). The toggle works fine (see the code below). However, whenever I click the button, it takes the user back to the very top of the page. I just want the "click" to expand and collapse the menu and keep the user at the location they currently are. How can I achieve this? &lt;script type="text/javascript"&gt; function changeClass() { $('div#mainmenu_wrap').toggleClass('hidemenu'); } &lt;/script&gt; &lt;a href="#" onclick="changeClass()"&gt; &lt;img src="images/menu_icon2.png" width="33" height="33" /&gt; &lt;/a&gt;
answer count: 2
possible better answer: http://stackoverflow.com/a/25962335
has answer: http://stackoverflow.com/a/25962335
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40649371
accepted answer: http://stackoverflow.com/a/26079564
type: AnsweredQuestion
has title: Expand and collapse menu, without taking user to top of the page
type: Question
has answer: http://stackoverflow.com/a/26079564

http://stackoverflow.com/a/25955126
has comment: http://stackoverflow.com/comment/40635709
accepted answer of: http://stackoverflow.com/q/25955028
answers question: http://stackoverflow.com/q/25955028
has comment: http://stackoverflow.com/comment/40635613
has body: You need some sort of Promise or a callback function. For simplicity, I would suggest the callback. Example: var box = {}; box.images = []; box.images.total = box.images.loaded = 0; function loadImage(url, callback) { box.images.total++; image = new Image(); image.onload = function () { box.images.loaded++; // We call something when the image has loaded callback(); }; image.src = url; box.images[box.images.length] = image; } function loadAllImages(urls, callback) { // Loop through each image and load url for (var i = 0; i &lt; urls.length; ++i) { var url = urls[i]; loadImage(url, function() { // When everything loads, call callback console.log(box.images.total, box.images.loaded); if (box.images.loaded === box.images.total) callback(); }); } } window.onload = function() { box.ctx = document.querySelector("canvas").getContext("2d"); loadAllImages([ "https://lh4.googleusercontent.com/-rNTjTbBztCY/AAAAAAAAAAI/AAAAAAAAAFM/RNwjnkgQ9eo/photo.jpg?sz=128", "https://www.gravatar.com/avatar/20e068dd2ad8db5e1403ce6d8ac2ef99?s=128&d=identicon&r=PG&f=1" ], function() { // Do whatever once everything has loaded box.ctx.drawImage(box.images[0], 0, 0); }); }; &lt;canvas&gt; &lt;/canvas&gt;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40635670
score: 0
type: Answer

http://stackoverflow.com/q/25907733
tagged with: javascript
tagged with: jquery
has title: jQuery hover Opacity and Click Stay on Opacity
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25907817
type: Question
score: 0
has answer: http://stackoverflow.com/a/25907817
answer count: 1
has body: Good morning, So i have the 2 following sniplets which work great apart from 1 thing that i cannot work out how to resolve. first is a hover state so when you hover the opacity is at 100%, by default its at 70% and when you mouse out it reverts to 70% which is great, the 2nd is a click function that shows a checked image when clicked which is great and the opacity stays at 100% but when you mouse out of the container it reverts back to 70% opacity. is there anyway that is clicked it stays at 100% regardless if you mouse out? $(".opacity-change img").css('opacity','0.7'); $(document).ready(function(){ $(".opacity-change img").hover( function() { $(this).animate({ opacity: 1 }, 500); }, function() { $(this).animate({ opacity: 0.7 }, 500); }); }); $(document).ready(function(){ $('.profiles a').bind('click',function(){ $('.checked').hide(); $(this).find('.checked').show(); }); }); Thanks in advance

http://stackoverflow.com/a/25962436
type: AcceptedAnswer
score: 4
has comment: http://stackoverflow.com/comment/40652923
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/40651899
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25962234
answers question: http://stackoverflow.com/q/25962234
has comment: http://stackoverflow.com/comment/40653778
has body: You can use bindToController option if you are in 1.3 rc version, to have the 2 way bound scope variables to be bound on the controller. Otherwise you would have to just manually map the properties to controller instance (Which is a pain) or just use regular syntax (without controller.) for 2 way bound properties. So you could do ' {{my.pants}} - myDirective.pants = {{ my.pants }} ' with bindToController:true in the directive configuration. bindToController When an isolate scope is used for a component (see above), and controllerAs is used, bindToController will allow a component to have its properties bound to the controller, rather than to scope. When the controller is instantiated, the initial values of the isolate scope bindings are already available. (function(){ var myApp = angular.module('plunker', []); var helloEC5 = function(){ this.pants = "jeans"; }; helloEC5.prototype = { firstName: 'Seeya', lastName: 'Latir', get fullName() { return this.firstName + ' ' + this.lastName; }, set fullName (name) { var words = name.toString().split(' '); this.firstName = words[0] || ''; this.lastName = words[1] || ''; } }; myApp.controller('HelloEC5', helloEC5); myApp.directive('myDirective', function () { return { scope: { pants: '='}, controllerAs: 'my', controller: function(){}, bindToController:true, template: ' {{my.pants}} - myDirective.pants = {{ my.pants }} ' } }); })(); HelloEC5 says my name is: {{EC5.fullName}} wearing {{EC5.pants}}! Pants: FirstName: Setting HelloEC5.fullName:
has comment: http://stackoverflow.com/comment/42994346

http://stackoverflow.com/q/25969620
has answer: http://stackoverflow.com/a/29556898
answer count: 6
has title: xmlhttp.open("GET","ajax_info.txt",true): What am I missing?
tagged with: javascript
has body: According to w3schools.com the open method of the XMLHttpRequest object takes three parameters: 1. method 2. url 3. a boolean indicating whether the call is asynchronous or not One of the examples used a text file for the url parameter. I copied the code and replaced the text file with my own and nothing happened. What am I missing? This is the code I copied: Let AJAX change this text Change Content
tagged with: ajax
has answer: http://stackoverflow.com/a/35473803
score: 0
has answer: http://stackoverflow.com/a/46951017
has answer: http://stackoverflow.com/a/25969679
tagged with: http://stackoverflow.com/tag/xml
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/42291789
type: Question
has answer: http://stackoverflow.com/a/42112515

http://stackoverflow.com/comment/40543316
type: Comment
type: QuestionComment
has text: Yeah, Firebase always returns an object—even if you use the push functionalities to add items. You need to convert your object to an array. You can write a simple filter that'll do that. The function would be somethihng like: `function (obj) { return obj.keys(a).map(function(key){return a[key]}); }`
score: 1
comment on: http://stackoverflow.com/q/25903033

http://stackoverflow.com/comment/40574841
type: QuestionComment
has text: Then there are no errors.
score: 1
comment on: http://stackoverflow.com/q/25920262
type: Comment

http://stackoverflow.com/q/25956819
possible better answer: http://stackoverflow.com/a/25957105
upvote count: 1
has answer: http://stackoverflow.com/a/25957105
tagged with: css
accepted answer: http://stackoverflow.com/a/25957000
type: AnsweredQuestion
downvote count: 2
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25957000
has comment: http://stackoverflow.com/comment/40639265
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40638798
has comment: http://stackoverflow.com/comment/40639340
favorite count: 0
score: -1
has body: I have been looking into the matter for the last 2 hours. I am not really a coder, but just trying to make simple website work. Alright, little bit more complicated than usually, but I tryed php and js and both ways did not work for some odd reason. I would really love to get the js working. .js, .css and .html are all in the same folder, checked the names over for thousand times already. Here's some code: HTML: &lt;link rel="stylesheet" type="text/css" href="index.css"&gt; &lt;script type="text/javascript" src="java.js"&gt;&lt;/script&gt; &lt;div id="bg"&gt; &lt;img src="bg.jpg" alt="" /&gt; &lt;img src="bg5.jpg" alt="" /&gt; &lt;img src="bg9.jpg" alt="" /&gt; &lt;img src="bg11.jpg" alt="" /&gt; &lt;/div&gt; Did not put full code here, but this code is inside the html tags and body. css is working as wanted so will not add here.. in css position is absolute if that matters.. JS: $('img').hide(); function test() { $("#bg img").first().appendTo('#bg').fadeOut(5000); $("#bg img").first().fadeIn(5000); setTimeout(test, 7000); } test(); Now, if I put in css display:none then this code should start working and changing pictures. But it does not. Pictures come up right at the place behing each other when I remove the command display:none. But js just does not want to work. I tried before js too, didn't work, but this time I would like to get it work. Thank you.
has title: Javascript never seems to work

http://stackoverflow.com/q/26005769
has title: Find and change a part of url after home url
possible better answer: http://stackoverflow.com/a/26006129
has comment: http://stackoverflow.com/comment/40728629
has answer: http://stackoverflow.com/a/26006129
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4843691
linked to: http://stackoverflow.com/q/6945429
accepted answer: http://stackoverflow.com/a/26005918
has comment: http://stackoverflow.com/comment/40728659
type: Question
has body: Shopify is switching dots in product tags to dashes almost everywhere in urls. Except for when you add a custom filter, it pulls original tags with dots instead of dashes, which results in 404 when filtering after dot containing tag was picked. I want to use JQ for finding and switching dots to dashes in url right after home url. Google didn't help much. So, let's say there is a ul How do i find that "something/tag.with" with a help of jq? p.s. If somebody can point me to how i change that dot to a dash- that i'd appreciate it very much. But just finding it will help a lot too. Thank you! Edit: Wool And there is also this piece of jquery $(document).ready(function(){ $("div.collection-name a").each(function(){ this.href = this.href.replace('yarn/', ''); }); $("div.collection-name a").get(0).pathname.replace('.', '-'); }) I've tried adding another this.href = this.href.replace. Didn't work Figured href is still rendered as a html://whatever.com and so on, so used it as you see above. So, yeah... Neither one of these 2 worked
has comment: http://stackoverflow.com/comment/40728669
has answer: http://stackoverflow.com/a/26005918
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40728795
score: 0
answer count: 2

http://stackoverflow.com/comment/40941744
has text: Seems like the original question you posted here was answered: the problem was that a full object was used instead of ref. You may want to accept this one so issues aren't mixed up. Your next comment raised a different issue, a closure in the loop. Did you fix it and now get a concurrency error? I have an app example using a BulkRecordUpdater. It updates a Workproduct on a group of test cases, and the sintax similar to what you need since a _ref of a user story is used to set Workproduct on tc. See: https://github.com/nmusaelian-rally/bulk-update-test-cases-workproduct/blob/master/src/App.js
comment on: http://stackoverflow.com/a/26042378
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25993119
has body: You could use times a couple of times and then shallow flatten the resulting arrays: var data = _.times(size[0], function(x){ return _.times(size[1], function(y){ return [x,y]; }); }); var positions = _.flatten(data, true);
type: Answer
answers question: http://stackoverflow.com/q/25992378
downvote count: 0
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40711030

http://stackoverflow.com/comment/40724701
type: Comment
comment on: http://stackoverflow.com/q/26003708
has text: I know. I pulled this jquery code out of another example that only used 1 check-all. I just don't know how to manipulate it to work with all of my tables. I am using classes in my tables for that very reason.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25933614
has comment: http://stackoverflow.com/comment/40657756
score: -1
has body: Try to put the scripts at the end of your html or wrap your function in a document ready function
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/40603773
type: Answer
has comment: http://stackoverflow.com/comment/40606889
has comment: http://stackoverflow.com/comment/40598446
upvote count: 0
accepted answer of: http://stackoverflow.com/q/25933568
has comment: http://stackoverflow.com/comment/40598276
has comment: http://stackoverflow.com/comment/40603756
answers question: http://stackoverflow.com/q/25933568

http://stackoverflow.com/comment/40595971
score: 2
has text: `elseif` ? Use `else if` in JavaScript.
type: Comment
comment on: http://stackoverflow.com/q/25932257
type: QuestionComment

http://stackoverflow.com/comment/40642222
comment on: http://stackoverflow.com/a/25958680
score: 0
type: AnswerComment
type: Comment
has text: I was also thought to use Claudiu answer with yours. Still I dont know why the navigation does not look like `santone` themse in my questeion. I dont realized what difference they have used for such smoother and decent look

http://stackoverflow.com/comment/40516717
comment on: http://stackoverflow.com/q/25888777
score: 0
has text: where is the syntax error?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25964977
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40690194
has comment: http://stackoverflow.com/comment/40654694
answers question: http://stackoverflow.com/q/25954933
has body: I ran into the same problem before and I found this video from the developer of iron-router EventedMind For a TL;DW Router.onBeforeAction(function(pause) { if (!this.ready()) { this.render('Loading'); pause(); } }); Router.map(function() { return this.route('home', { path: '/', waitOn: function() { return Meteor.subscribe('roomList'); }, action: function() { this.render('home'); } }); });
has comment: http://stackoverflow.com/comment/40655597

http://stackoverflow.com/comment/40575854
comment on: http://stackoverflow.com/q/25897664
score: 0
type: QuestionComment
type: Comment
has text: Your AJAX is on a local server or WebServer? Why if your are not using ajax protolo file, not in a local server (`http://localhost`) is not in a webserver and not within an extension for GoogleChrome, then your Ajax file does not exist (LOL)

http://stackoverflow.com/comment/40694524
type: QuestionComment
has text: try with web view as you have scripts in it
score: 0
comment on: http://stackoverflow.com/q/25984072
type: Comment

http://stackoverflow.com/q/25900961
type: Question
has title: javascript how to remove all parents element in a string?
score: -1
has comment: http://stackoverflow.com/comment/40539367
upvote count: 0
has body: string like this: var str = ' spm hmm '; after remove it would like this: var str = 'spm hmm ';
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25901155
tagged with: regex
has comment: http://stackoverflow.com/comment/40539596
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40539502
downvote count: 1

http://stackoverflow.com/a/25949532
downvote count: 0
score: 1
has body: If you want to change the image of the canvas element based on value of the dropdown list, use something like: Select Image Fire 1 Fire 2 Fire 3 Fire 4 Add this to the function call and modify the function itself.
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25949445
type: Answer
accepted answer of: http://stackoverflow.com/q/25949445

http://stackoverflow.com/comment/40745280
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26015381
type: Comment
has text: Kartikeya i don't tried.. Nadeem etc.. but onload page open all sub ul

buttonclick
type: Tag
tag name: buttonclick
tags question: http://stackoverflow.com/q/25889427

http://stackoverflow.com/q/26009855
has body: old javascript: &lt;script&gt; var tags1 = {!jsonDescriptionData1}; $( "input[id$=autocomplete1]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags1, function( item ){ return matcher.test( item ); }) ); } }); var tags2 = {!jsonDescriptionData2}; $( "input[id$=autocomplete2]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags2, function( item ){ return matcher.test( item ); }) ); } }); var tags3 = {!jsonDescriptionData3}; $( "input[id$=autocomplete3]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags3, function( item ){ return matcher.test( item ); }) ); } }); var tags4 = {!jsonDescriptionData4}; $("input[id$=autocomplete4]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags4, function( item ){ return matcher.test( item ); }) ); } }); var tags5 = {!jsonDescriptionData5}; $( "input[id$=autocomplete5]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags5, function( item ){ return matcher.test( item ); }) ); } }); var tags6 = {!jsonDescriptionData6}; $( "input[id$=autocomplete6]" ).autocomplete({ source: function( request, response ) { var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" ); response( $.grep( tags6, function( item ){ return matcher.test( item ); }) ); } }); var tags7 = {!jsonDescriptionData7}; $( "input[id$=autocomplete7]" ).autocomplete({ source: function(request, response){ var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40735742
has comment: http://stackoverflow.com/comment/40735767
has title: changing javascript to for loop to run faster .but not working
has comment: http://stackoverflow.com/comment/40735802
answer count: 0
has comment: http://stackoverflow.com/comment/40735757
has comment: http://stackoverflow.com/comment/40736147
type: Question
has comment: http://stackoverflow.com/comment/40735924
has comment: http://stackoverflow.com/comment/40736110
has comment: http://stackoverflow.com/comment/40735960
has comment: http://stackoverflow.com/comment/40735941
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40736017
has comment: http://stackoverflow.com/comment/40735785

http://stackoverflow.com/comment/40715552
type: Comment
comment on: http://stackoverflow.com/q/25955784
score: 0
type: QuestionComment
has text: You'll need the server to be able to stream audio (Icecast, or Shoutcast type) to the client. Then you'll be able to pipe that into WebAudio.

http://stackoverflow.com/comment/40580499
comment on: http://stackoverflow.com/q/25921559
type: Comment
score: 0
has text: I had not considered a parser, but I will look into this.
type: QuestionComment

http://stackoverflow.com/comment/40839816
comment on: http://stackoverflow.com/a/26026002
score: 0
type: Comment
has text: what do you see if you open the chrome inspector, on network tab, and click on the request that this code makes?
type: AnswerComment

http://stackoverflow.com/comment/40586480
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25926809
has text: why not just check and uncheck checkbox using javascript?

http://stackoverflow.com/a/25957429
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: According to the documentation, the .html() callback when used to replace the selected element's content empties it before doing so. If you use a function in the callback, you get two parameters back: The element's index and its current content (before emptied). So, you could do this way: $('li.list1').html(function (index, oldHtml) { return '' + oldHtml+ ''; }); Demo jQuery .html(function) $(function () { $('li.list1').html(function (index, data) { return '' + data + ''; }); }); Text This way won't work: $('li.list1').html('' + $(this).text() + ''); $(this) here refers to the jQuery object Window, unless it's within some kind of wrapper, like an event handler: $('li.list1').on('click', function () { $(this).html('' + $(this).text() + ''); }); Demo $(function () { $('li.list1').on('click', function () { $(this).html('' + $(this).text() + ''); }); }); Text
answers question: http://stackoverflow.com/q/25957367
type: Answer
accepted answer of: http://stackoverflow.com/q/25957367
has comment: http://stackoverflow.com/comment/40694663
has comment: http://stackoverflow.com/comment/40690533
score: 4

http://stackoverflow.com/a/25913251
answers question: http://stackoverflow.com/q/25912687
downvote count: 0
has body: Try this - Use escaped ' var totalapp = '' + totalNumber + ' not decided.'; DEMO
has comment: http://stackoverflow.com/comment/40561461
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/26032124
has body: Few questions: How Karma and testing framework X (Jasmine, Mocha, QUnit) relate to each other? What is the equivalent framework at Java world? I assume Jasmine, Mocha, QUnit equal to jUnit/TestNG. How about Karma? Can I run testing framework X (e.g. Jasmine) without Karma? Is Karma for unit test or integration/e2e test? This reference shows is for unit test, however this said is for e2e test.
accepted answer: http://stackoverflow.com/a/26034254
type: AnsweredQuestion
upvote count: 278
tagged with: integration-testing
tagged with: unit-testing
type: Question
possible better answer: http://stackoverflow.com/a/36427079
has answer: http://stackoverflow.com/a/36427079
tagged with: javascript
score: 276
has answer: http://stackoverflow.com/a/26034254
answer count: 3
has answer: http://stackoverflow.com/a/34249126
has comment: http://stackoverflow.com/comment/68734819
favorite count: 0
downvote count: 2
has title: Karma vs testing framework Jasmine, Mocha, QUnit

http://stackoverflow.com/comment/40578682
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25922183
has text: What are you expecting? Everything looks fine, but just... incomplete.

http://stackoverflow.com/q/26006811
accepted answer: http://stackoverflow.com/a/26007395
score: 0
answer count: 2
tagged with: function
tagged with: this
has body: I recently have started reading "JavaScript: good parts" and quoting one of the examples which I couldn't understand. I added a test function to the original example: var add = function(a,b) { return a+b; }; var myObject = { val: 0, increment: function(inc) { this.val += typeof inc == 'number' ? inc : 1; } }; myObject.increment(12); myObject.increment(); // till this line, the val is equal to 13 // function invocation myObject.double = function() { var that = this; // inner function #1 var helper = function() { that.val = add(that.val, that.val); }; // inner function #2 var test = function(){ this.val = add(this.val, this.val); }; helper(); // the val is equal to 26 // test(); // the val is equal to 13 }; When I use that (var that = this) I am referring to myObject's field, val. Also when I use this in my test function, I am referring to the same field in the same object, but the answer is different. any explanation would be appreciated.
type: AnsweredQuestion
has title: JavaScript Function Invocation
has answer: http://stackoverflow.com/a/26007395
tagged with: invocation
type: Question
has answer: http://stackoverflow.com/a/26006883
tagged with: javascript
possible better answer: http://stackoverflow.com/a/26006883

http://stackoverflow.com/a/61327609
type: Answer
answers question: http://stackoverflow.com/q/25895292
has body: Two types of redirection can be done in pure node js 1)Within the same site res.writeHead(301, {"Location": "/blog/thank-you"}); return res.end(); 2)To an External website res.redirect("https://stackoverflow.com/");
score: 0

http://stackoverflow.com/comment/40719179
type: Comment
has text: Thanks @FREAKENGINEER. How do I just do it on one table? When I put a table object in instead of "td" it doesn't like it: http://jsfiddle.net/wo02xedr/9/
type: AnswerComment
comment on: http://stackoverflow.com/a/26000500
score: 0

http://stackoverflow.com/q/25893137
has title: cloud endpoints oauth cannot Sign out
answer count: 0
type: UnansweredQuestion
tagged with: oauth-2.0
downvote count: 0
score: 1
tagged with: google-oauth
has comment: http://stackoverflow.com/comment/40526371
type: Question
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40595867
has body: https://developers.google.com/appengine/docs/java/endpoints/consume_js?#signing_out As mentioned by google in the above link there is no sign out function. Has anyone achieved emulating sign out? I was expecting to set gapi.auth.setToken(null) and then call gapi.auth.authorize with immediate as false (as below) to force the sign-in popup. Annoyingly this immediately signs in instead. gapi.auth.authorize({client_id: this.CLIENT_ID, scope: this.SCOPES, immediate: false}, authCallback); The behaviour I'm expecting is to be presented with the google authentication popup when I clear the token and call gapi.auth.authorize with mode false. Currently doing this causes the popup to flash open and close before immediately signing in without allowing credentials to be entered.
tagged with: google-cloud-endpoints

http://stackoverflow.com/a/25958112
answers question: http://stackoverflow.com/q/25958006
has comment: http://stackoverflow.com/comment/40640968
score: 2
has comment: http://stackoverflow.com/comment/40641088
has comment: http://stackoverflow.com/comment/40640993
downvote count: 0
type: Answer
has body: You have 2 syntax errors in your code: var alphabet = [a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]; should be var alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; because all strings in javascript need to be enclosed by ' or ", or else they will be seen as variables. Then your second syntax error: $('#solve').click( function() { alphabet.toString(); $('#Output').append(alphabet); }); }); should be: $('#solve').click( function() { alphabet.toString(); $('#Output').append(alphabet); }); (you closed one to many functions)
upvote count: 2

http://stackoverflow.com/comment/40770669
has text: Sorry, I cannot recreate your problem.
comment on: http://stackoverflow.com/a/25881248
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/26014751
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/26061928
answer count: 1
tagged with: masking
tagged with: kineticjs
has body: So, I have a picture, and I need to overlay it with another picture by PNG mask (black/transparent image). How I can to do this with KineticJS? sorry for my bad english
has title: How I can mask PNG image with another PNG image with KineticJS?
accepted answer: http://stackoverflow.com/a/26061928
type: AnsweredQuestion
tagged with: image

http://stackoverflow.com/q/25979535
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/25980316
has answer: http://stackoverflow.com/a/25980334
type: Question
has title: Making a table with random colored numbers
tagged with: javascript
has body: With this html: Bonoloto And this javascript: var counter = 0; var nr1 = Math.floor(Math.random() * 49 + 1), nr2 = Math.floor(Math.random() * 49 + 1), nr3 = Math.floor(Math.random() * 49 + 1), nr4 = Math.floor(Math.random() * 49 + 1), nr5 = Math.floor(Math.random() * 49 + 1); document.write("Numbers: "+nr1+" "+nr2+" "+nr3+" "+nr4+" "+nr5); function tables(){ document.write(" "); for(i = 1; i < 50; i++) { if(counter == 10) { counter = 0; document.write(" "); } if(i==nr1){ document.write(" " + i + " "); }else{ document.write(" " + i + " "); } if(counter == 10) { counter = 0; document.write(" "); } counter++; } document.write(" "); } This is the output: I must highlight all the numbers like 25 is highlighted. Numbers are randomly generated and the aim is to highlight them in the table. I get stuck in here: if(i==nr1){ document.write(" " + i + " "); }else{ document.write(" " + i + " "); } If i place more if statements the table columns will "Multiply". I cant get that condition working properly...
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25980316
has answer: http://stackoverflow.com/a/25979958
accepted answer: http://stackoverflow.com/a/25979958
favorite count: 0

http://stackoverflow.com/q/25925677
has answer: http://stackoverflow.com/a/25925702
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: angularjs
has title: How to handle click event in my class
possible better answer: http://stackoverflow.com/a/25925701
tagged with: events
has answer: http://stackoverflow.com/a/25925701
answer count: 4
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25925777
upvote count: 1
type: Question
has body: I am trying to add a class to a clicked element and remove it when user clicks other elements. I have something like {{test.title}} js $scope.pickTest = function(index, event) { $(event.target).addClass('blur'); //this works when user clicks one of the tags //but I want to remove the class if user clicks another tag }; How do I do this? Thanks!
accepted answer: http://stackoverflow.com/a/25925777
has answer: http://stackoverflow.com/a/25925704

http://stackoverflow.com/comment/40688799
has text: Breh. JSFiddle it up broski.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25983429

http://stackoverflow.com/q/25923764
tagged with: space
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25923917
has title: How to test if a string has only spaces in Javascript?
has body: I have a textarea and I need to test if the user put a text like "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", or only spaces in it or only " ", I can't accept only spaces, but I can accept "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hi&nbsp;&nbsp;&nbsp;&nbsp;!!". How can I do this in Javascript?
type: Question
tagged with: textarea
tagged with: javascript
has answer: http://stackoverflow.com/a/25923858
has answer: http://stackoverflow.com/a/25923830
score: 0
answer count: 3

http://stackoverflow.com/comment/40534826
comment on: http://stackoverflow.com/q/25898554
type: Comment
type: QuestionComment
has text: if `row` is table what you need you can simply use `$(row).off('click')`
score: 2

http://stackoverflow.com/comment/40604176
comment on: http://stackoverflow.com/a/25936083
type: AnswerComment
has text: Yea, is was a bit of off-topic ) So, w/o promises, I should always @done(err)@ if I want to catch it in upper logic and deal with it, but it error is fatal, I should throw it to notify myself with email or so?
score: 0
type: Comment

http://stackoverflow.com/a/25897490
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25897207
downvote count: 0
has comment: http://stackoverflow.com/comment/40533022
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25897207
type: Answer
has comment: http://stackoverflow.com/comment/40533523
has body: Well there's no other choice ? But some improvements are possible. Add another for loop + a switch. If there's an error somewhere, you don't need to continue the loop and you can return 'danger' overall = 'success' for (j in checks) { switch (checks[j].status) { case 'OK': break; case 'INFO': if (overall === 'success') overall = 'info' break; case 'WARN': if (overall === 'success' || overall === 'warning') overall = 'warning' break; case 'ERROR': case 'FATAL': return 'danger' } }
has comment: http://stackoverflow.com/comment/40535107

http://stackoverflow.com/q/25910242
has title: How to generate proper csv file format using javascript
answer count: 1
has answer: http://stackoverflow.com/a/25910441
type: AnsweredQuestion
tagged with: highcharts
has comment: http://stackoverflow.com/comment/40556016
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25910441
has body: I have written a JavaScript code which should parse a table and prints values in a div in csv format. My code : for (i = 1; i &lt; table.rows.length; i += 1) { row = table.rows[i]; for (j = 1; j &lt; row.cells.length; j += 1) { cell = row.cells[j]; var heatmapval=(cell.innerHTML).trim(); if(heatmapval&gt;25) { heatmapval=25; } var arr = new Array(3); arr[0] = i-1; arr[1] = j-1; arr[2] = heatmapval; $("#csv").append(arr.join(",")+"&lt;br&gt;"); } } Which results perfect as it prints in the same form in div. I am using highcharts for heatmaps which reads csv values and should create heatmaps for the values.(Note: I have added the link for fiddle in comments).But it can't read my code generated csv form values in div. As I have added a break tag to go to next line,probably because of that heatmaps can't read those values .I have tried it with a space instead of break but even that does't work.
type: Question
tagged with: http://stackoverflow.com/tag/csv
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40555850
has comment: http://stackoverflow.com/comment/40555687
has comment: http://stackoverflow.com/comment/40555932
score: 0

http://stackoverflow.com/comment/40781014
score: 0
type: Comment
has text: When I change the attributes value with plain javascript on document.ready, the event is not fired. Any idea why?
comment on: http://stackoverflow.com/a/26025434
type: AnswerComment

http://stackoverflow.com/comment/40641134
has text: What do you mean by *"only the first 'a' is being removed. How can I make it remove all the matched 'a'?"*?? If only the first `` is being removed then that's it is what being matched by your selector. Explain which `` you're trying to remove instead.
comment on: http://stackoverflow.com/q/25958172
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40595068
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25931650
score: 0
has text: an input element does not require an end tag. http://www.w3schools.com/tags/tag_input.asp

http://stackoverflow.com/comment/40614053
type: QuestionComment
comment on: http://stackoverflow.com/q/25941814
has text: Hm, really? jsfiddle is working for me. How would I re-call that function then?
score: 0
type: Comment

http://stackoverflow.com/q/25934429
has title: How to parse form data to work with JSON in jQuery?
downvote count: 0
has comment: http://stackoverflow.com/comment/40599760
has answer: http://stackoverflow.com/a/25934809
favorite count: 0
has comment: http://stackoverflow.com/comment/40599833
has comment: http://stackoverflow.com/comment/40600320
accepted answer: http://stackoverflow.com/a/25934809
possible better answer: http://stackoverflow.com/a/25934672
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25934672
score: 1
has comment: http://stackoverflow.com/comment/40599737
tagged with: http://stackoverflow.com/tag/json
tagged with: forms
upvote count: 1
has body: var checkedValues = $('.required:checked').map(function () { return this.value; }).get(); var arr = new Array(10); alert(checkedValues); alert("number of values in it " +checkedValues.length); if (checkedValues.length &gt; 1) { alert("I am inside if "); arr = checkedValues.split(','); alert("I am done with the split "); } else { arr = checkedValues; alert("No split needed "); } $.getJSON('@Url.Action("testcata", "home")' + + '?Type=' + "@(Session["typ"])" + "&amp;city=" + "@(Session["cit"])" + "&amp;chkd=" + checkedValues, function (data) { //code }) In controller : public ActionResult testcata(string Type, int? city, int[] chkd) { //code } I am trying to get the values of check-boxes which are checked and store them in array which are then sent to controller through json function. alert("I am done with the split") is not being shown . Please help me.
type: Question
has answer: http://stackoverflow.com/a/25936687
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40619620
answer count: 3

http://stackoverflow.com/comment/40528308
type: Comment
type: QuestionComment
has text: I think he don't have reputation for commenting
score: 0
comment on: http://stackoverflow.com/q/25894982

http://stackoverflow.com/a/25890890
score: 3
answers question: http://stackoverflow.com/q/25890862
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25890862
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can use :has for that, it checks if the matching elements contains certain elements etc. $('table:has(input, section)') FIDDLE

http://stackoverflow.com/comment/40625962
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25942232
has text: yep - I just added tags around your code
type: AnswerComment

http://stackoverflow.com/q/25980906
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/40683801
has comment: http://stackoverflow.com/comment/40683008
has comment: http://stackoverflow.com/comment/40683124
upvote count: 1
has comment: http://stackoverflow.com/comment/40683088
answer count: 1
has comment: http://stackoverflow.com/comment/40683663
has comment: http://stackoverflow.com/comment/40683060
favorite count: 0
has comment: http://stackoverflow.com/comment/40683082
has comment: http://stackoverflow.com/comment/40682984
has body: The whole point is to understand how computers should communicate with each other using javascript (no jQuery framework) and ajax (by using XMLHttpRequest). I have a memory game and I would like to add an online option for people so they can play with their friends. I was thinking about a peer 2 peer connection, but I didn't know how exactly and that is why I posted this question (I am sorry if my question is not meant to be here). This is what I had in mind: User 1: 1. click->sendAction to server Server: 1. receiveInfo->saveDetailsInDB 2. packReceivedInfo->send to User 2 User 2: 1. receiveInfo->updateDetails Edit: Thanks to fstanis, I now know that I should use a WebSocket method in order to communicate users/computers with each other.
has answer: http://stackoverflow.com/a/25981037
accepted answer: http://stackoverflow.com/a/25981037
score: -3
has comment: http://stackoverflow.com/comment/40684170
downvote count: 4
has title: What method is there available to communicate 2 computers using Javascript & Ajax?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40684287
has comment: http://stackoverflow.com/comment/40683364
has comment: http://stackoverflow.com/comment/40683036
type: Question
tagged with: network-programming

http://stackoverflow.com/a/25935145
type: Answer
has body: It looks like the plugin doesn't have any options for an onclick event so if you add the following code to the load event: $('.cd-dropdown').click(function() { $('.cd-active').not($(this)) .removeClass('cd-active') .children('ul').css('height', 'auto') .children('li').css('top', 0); }); It will toggle the open and close when you click. However you will then need to change the script file as it is using an opened flag and we can't effect this so search for the _initEvents and add this as the first line in the this.selectlabel.on function: self.opened = self.dd.hasClass('cd-active'); It should all then work! Click for example
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25934193
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25934193

http://stackoverflow.com/a/25994366
upvote count: 3
has comment: http://stackoverflow.com/comment/40708066
accepted answer of: http://stackoverflow.com/q/25994258
has body: new myObj creates and returns a new object, even though you have return 7 in your function. The new operator is specifically for creating objects, and has the interesting behavior of completely ignoring the return value of the constructor function unless it's a non-null object reference; instead, new returns the object it created. (If you do return a non-null object reference from the constructor function, it overrides new's default behavior; use cases for this are rare.) If you just want to call the function and get its return value, don't use new: console.log(myObj()); If you want to create an object with a property on it, and set that property to 7, then print it, you need to create the property: function myObj() { this.thePropertyName = 7; } ...and then use it: var o = new myObj(); console.log(o.thePropertyName); ...or: console.log(new myObj().thePropertyName); ...but then you're creating and releasing an object for no good reason. Re your edit, which changes the question markedly: this task: new myObj() // return 1; new myObj() // return 2; new myObj() + new myObj() = // return 7; That's a bizarre requirement. It breaks down like this: Every time you call new myObj, save a number (starting with 1). When the + operator is used on the objects, return that number. You can do it, by using a common counter, a value on the instance, and overriding the default implementations of toString and valueOf; see comments in the code: (function() { "use strict"; // Use a scoping function to build `myObj` so that we // keep the counter private var myObj = (function() { // The counter var counter = 0; // The `myObj` function we'll return function myObj() { // Increment the counter, remember the number this.value = ++counter; } // When a coercion to number is preferred, JavaScript will // use the valueOf function myObj.prototype.valueOf = function() { return this.value; }; // When a coercion to string is preferred, JavaScript will // use the toString function myObj.prototype.toSt…
has comment: http://stackoverflow.com/comment/40707760
has comment: http://stackoverflow.com/comment/40708387
answers question: http://stackoverflow.com/q/25994258
has comment: http://stackoverflow.com/comment/40710429
has comment: http://stackoverflow.com/comment/40710733
has comment: http://stackoverflow.com/comment/40711158
type: AcceptedAnswer
downvote count: 0
score: 3
type: Answer

http://stackoverflow.com/q/26023252
has body: I run an application that shortens urls for authenticated users. The form for this application is simply an input for the full url, which then spits out a shortened url. I would like to build a button that can be added to generated pages (the urls are long and messy) and once clicked would automatically submit the url shortening form. The url shortening application is run in php. I've read a little bit about using ajax to submit the form. Does this matter if it's on a different website? Does anyone have a good tutorial or starting point for this sort of thing? Many thanks! edit to include code: Which URL do you want to shorten? Shorten URL $(document).ready(function() { $('a.btn').click(function() { var pathname = window.location; $.ajax({ type: "POST", url: 'http://url', data: $(pathname).serialize, success: success, dataType: text }); }); });
type: Question
has comment: http://stackoverflow.com/comment/40760988
has comment: http://stackoverflow.com/comment/40760524
tagged with: javascript
tagged with: forms
has title: JQuery button takes url and submits php form
score: 0
has comment: http://stackoverflow.com/comment/40760577
has answer: http://stackoverflow.com/a/26023467
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/40760243
has comment: http://stackoverflow.com/comment/40760369

http://stackoverflow.com/comment/40756067
type: Comment
type: QuestionComment
has text: If that is the answer then the question should be look for numbers following the plus and minus sign
score: 0
comment on: http://stackoverflow.com/q/25895272

http://stackoverflow.com/a/26015251
has body: I think you are looking for this: ^\d{3,5}(?:,\s\d{3,5})*$ but then again I should say that you call 12345, 123456789, 987654 valid which kinda seems to me as a mistake from your part this will allow only 3 - 5 digits in all the numbers before and after commas. demo here : http://regex101.com/r/nX8kW4/1
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/26015100
upvote count: 3
type: Answer

http://stackoverflow.com/a/26000479
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26000440
type: Answer
answers question: http://stackoverflow.com/q/26000440
has body: You'll need to construct the object beforehand. var diena = "example"; var obj = {}; obj[diena] = sub_array; array.push(obj);

http://stackoverflow.com/a/30400818
type: Answer
has body: I've been looking for future implementations of firefox, but still they don't want to implement it. So basically you can't in webconsole, but you can in firebug. See: https://developer.mozilla.org/en-US/docs/Web/API/console
answers question: http://stackoverflow.com/q/25924299
score: 0

http://stackoverflow.com/q/25927618
tagged with: page-size
tagged with: browser
tagged with: printing
downvote count: 0
has comment: http://stackoverflow.com/comment/40588281
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40588470
answer count: 0
has title: How to set custom paper size programmatically using javascript?
score: 1
upvote count: 1
type: Question
has body: I want to print a bill from html page. The paper size will depends on list of orders (I can get the height from the div's height). I am ok with any one of the browser (ie, chrome, firefox). right now it prints letter size by default.
tagged with: javascript

http://stackoverflow.com/comment/40502833
type: QuestionComment
comment on: http://stackoverflow.com/q/25879667
type: Comment
has text: FYI, using express and handlebars (which is mustache-like) with node, I just pass the name of the template file to `response.render()` and the engine takes care of loading the template file for me - I don't have to load it myself. You haven't shown your server-side code that uses the template so we don't have any idea how you're trying to do that, but I'm guessing that if you're loading it yourself, there's probably an easier way.
score: 0

http://stackoverflow.com/comment/40717068
type: Comment
type: QuestionComment
has text: My question text was wrong, it said "empty" when it should've said "not empty", I've corrected the question text, thanks. Of course this doesn't change the migrate plugin not working.
comment on: http://stackoverflow.com/q/25999182
score: 0

http://stackoverflow.com/comment/40662729
type: QuestionComment
score: 0
has text: @Josep that's it. I need to know it so that I can modify the DOM accordingly to make some plugin work (http://ivaynberg.github.io/select2/), since ng-options adds by default an empty option value every time the model changes.
comment on: http://stackoverflow.com/q/25969680
type: Comment

http://stackoverflow.com/q/25931689
favorite count: 0
possible better answer: http://stackoverflow.com/a/25931766
has answer: http://stackoverflow.com/a/25931766
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25931729
has comment: http://stackoverflow.com/comment/40595088
accepted answer: http://stackoverflow.com/a/25931809
upvote count: 3
type: Question
score: 3
tagged with: javascript
has title: Defining variable using conditional operation in javascript
has body: name = name || {} throws a reference error whereas var name = name || {} works. How does javascript variable initialization work?
downvote count: 0
has answer: http://stackoverflow.com/a/25931809
has answer: http://stackoverflow.com/a/25931938

http://stackoverflow.com/comment/40663239
type: Comment
type: QuestionComment
has text: @JanAagaardMeier what is the purpose of dropping all the tables each time, Is it meant for development and I should conditionally drop it only for production? Please provide an answer explaining more about how I should handle the database for production (migrations, backup etc) and I will accept it.
comment on: http://stackoverflow.com/q/25961260
score: 0

http://stackoverflow.com/a/32079974
has body: Prestashops default theme is built using bootstrap. You can edit those bootstrap files to modify the theme. It is recommended to copy the default theme and edit it instead of creating a new one from scratch. Each module has its own css file. you need to edit them to modify the modules style.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25987784

http://stackoverflow.com/q/25974793
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/25974870
favorite count: 0
accepted answer: http://stackoverflow.com/a/25974870
has body: I'm trying to get the index of clicked element. This works fine so far. Problem is that you can hide elements. If an element is hidden I don't want it to be "counted" in the index. If you have a look at the fiddle and all boxes are orange the index is how it should be. If you click on Click me to hide some divs -- they don't get removed, in reality they get a display:none; here they just get another color to give you an idea -- they also get the class hidden so now I don't want the index to index them. But if I click on Div 2 I would like the index to show 1 I've tried with $('div').not('hidden') fiddle here -> http://jsfiddle.net/rva54sy3/2/ Click a div! Div 0 Div 1 Div 2 Div 3 Div 4 Div 5 Click me to hide some divs and if you like some styling: Thanks for advices
has answer: http://stackoverflow.com/a/25974943
has answer: http://stackoverflow.com/a/25975280
type: AnsweredQuestion
score: 3
upvote count: 3
possible better answer: http://stackoverflow.com/a/25975280
type: Question
has title: How to get index without counting the hidden elements?
downvote count: 0

http://stackoverflow.com/comment/40765353
comment on: http://stackoverflow.com/q/26021533
has text: What event is binded to the article click ?
score: 0
type: Comment
type: QuestionComment

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/25961260
tag name: sequelize.js

http://stackoverflow.com/q/25966492
tagged with: zebra-printers
type: UnansweredQuestion
tagged with: java
downvote count: 2
has title: Phonegap - Printing bluetooth
has answer: http://stackoverflow.com/a/26170895
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/29088116
tagged with: javascript
score: -1
tagged with: ionic-framework
answer count: 2
favorite count: 0
has body: I have the following problem: I have a MZ320 printer Zebra works by bluetooth, but application is under develop phonegap. I found this plugin (https://github.com/EionRobb/phonegap-print-plugins), but do not know how to implement it (and install). I am a neophyte at this, please help. My English sucks, sorry
tagged with: cordova

http://stackoverflow.com/q/25953332
has answer: http://stackoverflow.com/a/25953405
favorite count: 0
has comment: http://stackoverflow.com/comment/40632420
accepted answer: http://stackoverflow.com/a/25953405
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
has title: Select every div inside another div and check it's class with jQuery
has comment: http://stackoverflow.com/comment/40632361
type: Question
tagged with: javascript
tagged with: jquery
has body: I have a chat system and I'm showing the messages using jQuery + JSON + PHP. My problem is: I have to select each div inside the div "#chatMessages", that contains the messages, and check it's class to see if it exists, my Ajax code: var data = {}; $.ajax({ type: "GET", dataType: "json", url: "../room/a.php", async: true, cache: false, data: data, success: function(response) { if(response.error) { alert(response.msg); } else { for(var i = 0; i &lt; response.length; i ++) { if($("#chatScreen &gt; *").hasClass("message" + i) == false) $("#chatScreen").append($("&lt;div&gt;",{ class : 'message' + response[i][1], html : response[i][0] + ' ' + response[i][4] })); } } }, error: function (response) { }, complete: function () { } }); response[i][0] contains the name, and the response[i][4] contains the message. It's working fine, but I load this function every 3000ms, so it repeat every message, how can I check div per div searching for the class 'message' + response[i][1] (that contains the unique ID from MySQL)? I tried to use ".hasClass()" but it doesn't work.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40777824
type: Comment
comment on: http://stackoverflow.com/a/26029528
type: AnswerComment
score: 0
has text: Thanks for your really awesome answer. My situation is that when you select option in a.html and click a button, that button would link you to b.html. In b.html, you have to display the option you selected. I am a newbie to HTML so I don't really know about API or iframe or PHP.

http://stackoverflow.com/comment/40696233
type: QuestionComment
has text: @NitishKumar:I want get answer as get56_name and assign it to variable. I tried like this x.indices.get(0) and many things like this but none of them are working
comment on: http://stackoverflow.com/q/25987965
score: 0
type: Comment

http://stackoverflow.com/a/35055598
downvote count: 0
has body: There is no need to test for the lower bound. try this: var userChoice = function(answer) { prompt("Do you choose rock, paper, or scissors?"); }; userChoice(); var computerChoice = Math.random(); if (computerChoice &lt; 0.33) { computerChoice = "rock"; } else if (computerChoice &lt; 0.66) { computerChoice = "paper"; } else { computerChoice = "scissors"; } console.log(computerChoice);
answers question: http://stackoverflow.com/q/25876958
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/25967430
score: 0
type: Answer
has body: You are adding nothing to array2. Please use indexes properly , like below: var array1=new Array(); var array2 = new Array(); for (var i = 0; i &lt; array .length; i++) { array1.push(array [i].split(".")[0]); array2.push(array [i].split(".")[1]); }
answers question: http://stackoverflow.com/q/25967358

http://stackoverflow.com/q/26001105
has body: Is it possible to pass an object to the .track() method of analytics.js? analytics.track('button clicked', { prop1: 'val1', // object e.g. {prop2: 'val2', prop3: 'val3'} }); I looked through their documentations and source code, but couldn't find an answer. I would greatly appreciate your help if you've had experience with this and have an answer.
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: segment-io
type: Question
has answer: http://stackoverflow.com/a/26027825
tagged with: javascript
tagged with: analytics
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26027825
has title: Segment.io's Analytics.js Track: Pass an Object?

http://stackoverflow.com/q/25984662
tagged with: jsf-2
score: 0
answer count: 1
has title: Add UiParameter to UIAjaxFunction programmatically
tagged with: parameters
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/26169145
tagged with: javascript
tagged with: programmatically-created
has body: This is a short example of using richfaces jsFunction with parameter. &lt;r:jsFunction name="addTag" action="#{bean.method}"&gt; &lt;r:param name="param" assignTo="#{bean.tagId}"/&gt; &lt;/r:jsFunction&gt; then you can use from javascript addTag('1') and the parameter will be stored to the bean. I need to accomplish the same functionality creating the jsFunction and ading parameter programmatically. This is the code that I use but not works: UIAjaxFunction jsFunctionAddTag = new UIAjaxFunction(); jsFunctionAddTag.setName("addTag"); FacesContext fc = FacesContext.getCurrentInstance(); ExpressionFactory ef = fc.getApplication().getExpressionFactory(); MethodExpression me = ef.createMethodExpression(fc.getELContext(), "#{bean.method}", null, new Class[]{}); jsFunctionAddTag.setActionExpression(me); UIParameter param = new UIParameter(); param.setName("param"); param.setAssignToExpression(ef.createValueExpression(fc.getELContext(), "#{bean.tagId}", String.class)); jsFunctionAddTag.getChildren().add(param); When the method is executed the value of tagId is not setted. What I'm doing wrong?

http://stackoverflow.com/comment/40528830
type: QuestionComment
comment on: http://stackoverflow.com/q/25894744
type: Comment
has text: ok...i edited the post to include the loop
score: 0

http://stackoverflow.com/q/25901749
has title: How to modify string to have exactly ONE space in between each character in Javascript?
type: Question
answer count: 1
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/6163169
type: UnansweredQuestion
has body: I have a string that looks like: dog cat hello house apple fork bird I want to change the string to look like: dog cat hello house apple fork bird How would I achieve this using JavaScript and/or jQuery?
duplicate of: http://stackoverflow.com/q/6163169
has answer: http://stackoverflow.com/a/25901839

http://stackoverflow.com/a/25966000
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/40657349
has body: Is that the entirety of companyCtrl.js? You haven't actually defined a function with name "companyCtrl" or registered it as a controller in the app. If you change companyCtrl.js to the following, that should fix it. function companyCtrl($scope) { $scope.btnUpdate = function() { console.log("asd"); update.put({}, { 'data': $scope.data }, function(data){ if(data.success){ console.log("success"); } else{ console.log("faliure"); } }) } }
type: Answer
answers question: http://stackoverflow.com/q/25961437
upvote count: 0

dynamic-forms
tags question: http://stackoverflow.com/q/25879455
tag name: dynamic-forms
type: Tag

http://stackoverflow.com/q/25960927
downvote count: 0
tagged with: javascript
has title: Razor with Javascript
favorite count: 0
tagged with: razor
accepted answer: http://stackoverflow.com/a/25960947
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: asp.net-mvc
score: 1
possible better answer: http://stackoverflow.com/a/25960948
has body: @if (Model.PaymentMethodTypeId == (int) PaymentMethodType.PayPal) { var url = @MyLibraryHtml.JavascriptEncodeUrl(Url.RewriteAction("SaveNewPaymentMethod", "PaymentMethods")); var args = form.serialize(); @Html.Raw(" var url = ") } Inside if block the code is Javascript, but as I expected, Razor see var url and var arg as .NET variable. I know I can use Html.Raw but is there any other better solution for this problem, Because I believe that Html.Raw breaks readibility
has answer: http://stackoverflow.com/a/25960948
answer count: 2
has comment: http://stackoverflow.com/comment/40646869
has answer: http://stackoverflow.com/a/25960947
has comment: http://stackoverflow.com/comment/40646835

http://stackoverflow.com/q/25983250
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: portforwarding
favorite count: 0
has answer: http://stackoverflow.com/a/25983316
tagged with: wampserver
has title: php chat causes browser to freeze when tested on wamp 32 bit
upvote count: 1
tagged with: php
tagged with: google-chrome
accepted answer: http://stackoverflow.com/a/25983316
type: AnsweredQuestion
score: 1
has body: This seems to be a recurring problem across browsers (IE, Firefox, Opera, Chrome, Safari, etc.) I thought about opening developer tools in chrome (for debugging), but that also freezes. Seeing as port forwarding is router dependent (and as I had recently swapped my notebook's hard-drive) I went in and disable it, but still had the same issue. Here's the code for the chat page. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;style type="text/css"&gt; #smileys{ display:none; padding-top:3px; } button{ border-color:#000000; border-width:1px; } #mn{ width:50px; } .ooo{ border:solid; border-color:black; border-width:1px; } #main{ position:absolute; padding-bottom:2px; height:inherit; width:300px; border:solid; border-color:black; border-width:2px; } #posts{ border-bottom:solid 1px; height:401px; overflow-y:scroll; background-color:#e2e2e2; } &lt;/style&gt; &lt;script type="text/javascript"&gt; var scroller = function(){ posts = document.getElementById("posts"); posts.scrollTop = posts.scrollHeight; } var menu=3; var checksum = function(){ if (menu == 3){ document.getElementById('smileys').style.display="block"; document.bob.smileyhider.innerHTML="&amp;minus;"; menu=1; } else{ document.getElementById('smileys').style.display="none"; document.bob.smileyhider.innerHTML="+"; menu=3; } } //Chat ajax loader function update(){ var xhr; if (window.XMLHttpRequest){ xhr = new XMLHttpRequest(); } else{ xhr = new ActiveXObject('Microsoft.XMLHTTP'); } xhr.onreadystatechange = function(){ if (xhr.readyState==4 &amp;&amp; xhr.status == 200){ document.getElementById('posts').innerHTML = xhr.responseText; } } setInterval(update, 200); xhr.open("GET","chatlog&lt;?php echo date("d");?&gt;.txt",true); xhr.send(null); } update(); &lt;/script&gt; &lt;!--chatting codes--&gt; &lt;?php //Chat Functions function codes(){ $n = (isset($_REQUEST["sig"]) ?…
type: Question

http://stackoverflow.com/q/25932753
has comment: http://stackoverflow.com/comment/40597196
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25933212
upvote count: 1
has answer: http://stackoverflow.com/a/25932843
has answer: http://stackoverflow.com/a/25932800
has answer: http://stackoverflow.com/a/25932814
answer count: 5
downvote count: 0
has body: I'm trying to change the margin-top css element of a div using javascript but its not working. Here is my code: document.getElementById("sidescrollbtn").css({'margin-top':'70px'}); Any ideas? Fiddle: http://jsfiddle.net/vinicius5581/2y63xnxa/5/
tagged with: javascript
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40596947
has title: How to change a css property with javascript?
has answer: http://stackoverflow.com/a/25932825
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40596893
tagged with: css

http://stackoverflow.com/q/25961823
has answer: http://stackoverflow.com/a/25962423
tagged with: checkbox
has comment: http://stackoverflow.com/comment/40648835
upvote count: 2
tagged with: twitter-bootstrap
has title: Bootstrap modal stopping checkbox from selecting
type: Question
tagged with: javascript
has body: I have a checkbox on the bottom of my page. When the user clicks it, I want a popup to show up. Everything works except the toggling of the checkbox. When I click the checkbox using the code below the pop up appears but the box does not check. Any idea why? The jQuery: $('#confirm-final').on('show.bs.modal', function (e) { $(this).find('.danger').attr('href', $(e.relatedTarget).data('href')); }); The checkbox: <asp:CheckBox ID="chkFinalSubmission" runat="server" data-toggle="modal" data-target="#confirm-final"/>Final Submission The popup: Final Submission If you check final submission and submit this ad note, you will not be able to change it anymore. It will be permanently stuck in readonly mode. <asp:Button ID="btnConfirmFinal" runat="server" Text="Got it" class="btn btn-default" data-dismiss="modal"/>
has comment: http://stackoverflow.com/comment/40648767
score: 2
downvote count: 0
answer count: 1
tagged with: jquery
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40542834
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25901978
has text: Thank you so much! Worked Perfectly! Now I'm going to try to make the grid expand every time you win

http://stackoverflow.com/comment/40686860
score: 0
comment on: http://stackoverflow.com/q/25982834
type: Comment
type: QuestionComment
has text: There are syntax errors in your posted example. Have you checked the console log to make sure you have fixed any syntax errors?

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/25919388

http://stackoverflow.com/a/25991346
upvote count: 1
has comment: http://stackoverflow.com/comment/40703512
has comment: http://stackoverflow.com/comment/40701979
score: 1
has comment: http://stackoverflow.com/comment/40703954
has body: There are 9 options for this plugin that you can use. Please Check : https://github.com/agylardi/radial-responsive-menu Use togglePosition option to set position for menu: I have made example check JSFiddle
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40703612
has comment: http://stackoverflow.com/comment/40703278
accepted answer of: http://stackoverflow.com/q/25991257
has comment: http://stackoverflow.com/comment/40706606
type: Answer
answers question: http://stackoverflow.com/q/25991257
has comment: http://stackoverflow.com/comment/40703907

http://stackoverflow.com/q/25915983
duplicate of: http://stackoverflow.com/q/13840429
tagged with: javascript
has comment: http://stackoverflow.com/comment/40566532
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40566467
has answer: http://stackoverflow.com/a/25916090
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40567580
tagged with: php
has body: How can I store a JavaScript prompt value into a php variable? I tried some stuff but it did not work out. Here is is the code... I am doing it to pass the function mkdir(); in php , after getting the name of the folder from the prompt screen... I simple have no idea, please help... The code is just a random try to do the same... i know it's wrong... thanks in advance... &lt;script language="java script"&gt; var php_var = "&lt;?php echo "Hello!"; ?&gt;"; var variable= prompt("Hello",php_var); &lt;/script&gt; &lt;?php $variable = "&lt;script language=\"javascript\"&gt; variable &lt;/script&gt;"; ?&gt;
linked to: http://stackoverflow.com/q/13840429
has comment: http://stackoverflow.com/comment/40566617
type: Question
has title: How to store a javascript prompt value into php variable?

http://stackoverflow.com/q/26028333
has comment: http://stackoverflow.com/comment/40769949
has comment: http://stackoverflow.com/comment/40770492
answer count: 0
type: Question
has title: How can I route the same path for mobile & PC in Nodes.js Express
has body: I want to do a mobile detection in express, make mobile and PC module totally independent, but keep the URL same, which means I cannot redirect a path to /mobile/... just because of the request is from mobile device. Here is what do in app.js: app.use(function(req, res){ var ua = req.header('user-agent'); if(/mobile/i.test(ua)) { console.log('user agent is mobile'); mobileRouter.set(app); } else{ console.log('user agent is pc'); pcRouter.set(app); } }) And in pcRouter.js: var index = require('./pc/index'); var user = require('./pc/user'); var auth = require('./pc/auth'); module.exports.set = function(app) { console.log('define pc router'); app.use('/', index); app.use('/user', user); app.use('/auth', auth); } In pc/index.js: var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res) { console.log('pc index'); res.render('index', { title: 'PC' }); }); module.exports = router; When I request the home page, terminal only shows these two logs: 'user agent is pc ' and 'define pc router' pc/index.js is not being executed, I guess it's because router must be defined at the app.js been started, but how can I realize what I said before: Same URL route by user agent detection, and keep the mobile sub app &amp; pc sub app totally independent
score: 0
tagged with: mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/40808365
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40775026
tagged with: router
tagged with: node.js

http://stackoverflow.com/q/25952494
tagged with: angularjs
has body: you see my directive to toggle (true/false) the state of a contenteditable element. If i put the "editable" var into a ng-class, it changes correctly. but i'am not able to change the value of an attribute on click. How can i solve this problem, what i'am missing here? app.directive('ContentEditable', function() { return { scope: { contenteditable: '@' }, restrict: 'E', template: '&lt;div contenteditable="{editable}" ng-click="toggleEdit()" ng-transclude&gt;&lt;/div&gt;', transclude: true, replace: true, link: function($scope) { var state = $scope.editable; $scope.editable = state === undefined ? false : state; $scope.toggleEdit = function(){ $scope.state = !$scope.state; $scope.editable = $scope.state; }; } }; });
has answer: http://stackoverflow.com/a/52239000
has title: How can i toggle the value of an attribute like contenteditable in my angularjs directive?
upvote count: 2
type: UnansweredQuestion
downvote count: 1
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25952660
type: Question
answer count: 2
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/q/25907574
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25940209
has title: How i pass latlon based on id in angular js google map
type: Question
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25907685
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25940209
tagged with: google-maps
has body: I am new in angular js. I am trying to pass my json lat lon based on id in to google api. My json file structure. { "totalCount":206, "deals":[{ "id":"2", "Name":"samir", "locations":[{ "location":"Mundhwa Gaon", "address":"Mundhwa Gaon, North Main Road, Pune - 411 001", "latLon":"18.53918870,73.90790910" }, "location":"Mundhwa Gaon", "address":"Mundhwa Gaon, North Main Road, Pune - 411 001", "latLon":"18.53918870,73.90790910" }, ] }, "id":"3", "Name":"samir", "locations":[{ "location":"Mundhwa Gaon", "address":"Mundhwa Gaon, North Main Road, Pune - 411 001", "latLon":"18.53918870,73.90790910" }, "location":"Mundhwa Gaon", "address":"Mundhwa Gaon, North Main Road, Pune - 411 001", "latLon":"18.53918870,73.90790910" }, ] }] } My angular js code $http({method: 'GET', url: '/api/v1/asas}).success(function(data) { $scope.deal = data.deals; if(data.deals[0].hasOwnProperty("locations") &amp;&amp; data.deals[0].locations!=null){ var location=$scope.deal[0].locations[0]['latLon']; var locationlatlong=location.split(","); $scope.map = {center: {latitude: locationlatlong[0], longitude: locationlatlong[1] }, zoom: 4 } $scope.options = {scrollwheel: false}; var markers = []; for (var i = 0; i &lt; $scope.deal[0].locations.length; i++) { markers.push(createmarker(i, $scope.deal[0].locations[i]['location'], $scope.deal[0].locations[i]['latLon'],$scope.deal[0].locations[i]['address'])) } $scope.markers = markers; if(badBrowser){ $scope.rendermap=false; }else{ $scope.rendermap=true; } } }); Now it only pass 1st deals id location. I try to make when some click on one deal then it pass that deals id locations(lat long). I am using angular js 1.2.23
has answer: http://stackoverflow.com/a/25907685
tagged with: angularjs-google-maps
tagged with: javascript
has comment: http://stackoverflow.com/comment/40551236
tagged with: angularjs

http://stackoverflow.com/comment/40623056
type: QuestionComment
comment on: http://stackoverflow.com/q/25947731
type: Comment
has text: ok, then I guess `$id` is defined somewhere else?
score: 1

http://stackoverflow.com/comment/40654774
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25965093
score: 1
has text: @Zarah so all of this is on a same file? well i suggest request it on another php file, just make sure you have the correct url

http://stackoverflow.com/comment/40811664
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26008886
has text: @oxe, yah you can do that. just add **path2 and lineData2** but just use **svgContainer** in all the appended `path`.
type: AnswerComment

http://stackoverflow.com/comment/40713775
score: 0
comment on: http://stackoverflow.com/q/25997944
has text: There is probably something else going wrong here. `_start` is declared as a function, it should be able to be invoked in the return. Just running your example code with `Start: _start()` does not throw any errors. I suspect that you have other code calling `Start.start()` and unless `_start` returns a function itself, that is going to throw an error.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25983234
answers question: http://stackoverflow.com/q/25982352
type: Answer
upvote count: 1
has body: I made a commented function for you, I hope it'll help. function randomlySplit(word) { var parts = []; // Loop as long as word exists while(word.length) { // Get an integer which is 2,3 or 4 var partLength = Math.floor(Math.random() * 3 + 2); // See if only 1 char would be left if(word.length - partLength === 1) { // Either add or subtract 1 to partLength if(partLength &lt; 4) partLength++; else partLength--; } // No issue that partLength &gt; word.length parts.push(word.substring(0,partLength)); word = word.substring(partLength); } return parts; } alert(randomlySplit("australia"));
downvote count: 0
score: 1

http://stackoverflow.com/a/25891209
answers question: http://stackoverflow.com/q/25891096
has body: Use the title attribute, as explained in this page : W3.org
type: Answer
has comment: http://stackoverflow.com/comment/40521241
upvote count: 1
has comment: http://stackoverflow.com/comment/40521122
downvote count: 0
score: 1

http://stackoverflow.com/q/26031542
tagged with: jquery
has answer: http://stackoverflow.com/a/26031742
has comment: http://stackoverflow.com/comment/40775377
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Check for form data values and disable submit button jQuery form
type: Question
has answer: http://stackoverflow.com/a/26031726
has comment: http://stackoverflow.com/comment/40775382
tagged with: javascript
tagged with: forms
score: 0
has body: I'm trying to disable to submit button inorder to avoid duplicate entries. I have checked all SOF, Google and so. What happens is, I get the code for disabling the submit button but it doesn't check for whether the form is completed with data or not. To minimize your time and effort I have the code here is JSFiddle. http://jsfiddle.net/4gL0f2tz/ What I'm trying to do is. Check whether the form values are completed (if not throw error - for this I use required attribute) Once the form is completed with values then disable the submit button and proceed to process page. Here is the jQuery snippet &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('input:submit').click(function(){ $('p').text("Form submiting....."); $('input:submit').attr("disabled", true); $.ajax({ type: "POST", url: "form_process.php", data: "id=abc" , success: function(){alert('success');} }); }); }); &lt;/script&gt; The full code is available here. http://jsfiddle.net/4gL0f2tz/ Note: I have code to disable the submit button, how can I disable after checking whether all the form values are completed and then disable it.
accepted answer: http://stackoverflow.com/a/26031726
answer count: 2
has comment: http://stackoverflow.com/comment/40775277
tagged with: validation
possible better answer: http://stackoverflow.com/a/26031742

http://stackoverflow.com/comment/40676167
comment on: http://stackoverflow.com/q/25977065
score: 0
has text: I've looked at it. It didn't help. This is more about NPM dependencies. The question could really be about any component.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40695689
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25987719
has text: In your fiddle, do you see the spaces between the open ` ` the text and the closing ` ` you see you added new line right that why it's adding \n to indicate that new line in the text format
type: QuestionComment

http://stackoverflow.com/comment/40761452
type: Comment
type: QuestionComment
has text: I only saw ways to alter text colors but not cluster colors
comment on: http://stackoverflow.com/q/26007193
score: 0

http://stackoverflow.com/q/25906369
has comment: http://stackoverflow.com/comment/40549765
tagged with: directive
tagged with: collections
has comment: http://stackoverflow.com/comment/40549507
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
tagged with: javascript
upvote count: 1
has body: I'm new in AngularJs and I don't know how to get single value from collection AngularJs. I have a list of Integer and my code is as follows:> &lt;div ng-controller="ChartCtrl1"&gt; {{ orderDateList1 }} &lt;/div&gt; And controller code: var ChartCtrl1 = function ($scope, OrderDate) { $scope.orderDateList1 = OrderDate.get({ action: 'orderDate', locationId: location.hash.substring(1), month: 10, year: 2014 }); }; And View like this: {"collection":[10,14]} But I want to compare every single result (number in this case) to some other method for example. I think best view will be: 10,14. Suggestions?
favorite count: 0
has answer: http://stackoverflow.com/a/25907589
accepted answer: http://stackoverflow.com/a/25907589
has title: How to get value from collection angularjs directive
tagged with: angularjs
downvote count: 0

http://stackoverflow.com/a/27120687
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26015062
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26015062
has body: I found a solution for how to execute the method connected to the ondijitclick-event in this case: Since I already have the domnode, the id of the domnode is accessible. With this id I can get the whole dijit-instance with dijit.byId(node.id). When having that, it is easy to call the function of the dijit which is connected to the ondijitclick-event. In my case I have following problems because the event-code needs some of the event-arguments and crashes when they aren't set. So I have to find out how to create and pass the event-arguments with the right property-values to the function. But this is a separate problem which is themed here

cross-domain-policy
tags question: http://stackoverflow.com/q/25975965
tag name: cross-domain-policy
type: Tag

http://stackoverflow.com/a/25898799
score: 0
type: Answer
has body: Thanks Martin Honnen - Since I do not know what default namespace I might have in my xml node, I modified his answer slightly. This now works for me. var resolver = null; var ns = (new window.DOMParser).parseFromString(xn.outerHTML, "text/xml").children[0].getAttribute("xmlns"); if (ns) { resolver = function() { return ns; } xpath = "defaultNamespace:" + xpath; } var es = xdoc.evaluate(xpath, xn, resolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
answers question: http://stackoverflow.com/q/25895012

http://stackoverflow.com/q/26018053
tagged with: ajax
has comment: http://stackoverflow.com/comment/40750958
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26018174
has body: the following code is giving me troubles. It gets fired and return the right alert at the end but the ajax part is not doing anything. No error no nothing. $(document).on('change', '.department_select', function () { var id = $(this).attr('id'); var num = id.substring(33, 34); $.ajax({ type: "GET", url: "&lt;%= update_sub_deparments_path %&gt;", data: { department_id: $("#business_case_entries_attributes_0_department_id option:selected").val() }, dataType: "script", }); alert(num); // Should alert the correct value (1, 3, 4 etc...) }); I already tried to debug it but Im limited to the developers kit of IE8 and the console is empty. The rails logs are empty too so I really have no clue whats going wrong here. EDIT: The script is supposed to update options for a select field by calling the update path. EDIT2: Im using the jquery gem jquery-rails.gem (3.1.0). Not quiet sure which jquery verison this is! EDIT3: Okay to add more detail: //routes '/:improvement_id/business_case/update_sub_departments(.:format)', :to =&gt; 'business_cases#update_sub_departments', :as =&gt; 'update_sub_departments' //update_sub_departments.js.erb $('#business_case_entries_attributes_0_sub_department_id').html("&lt;%= escape_javascript(options_for_select(@sub_departments.collect { |sub_department| [sub_department.name.titleize, sub_department.id] })) %&gt;"); //business_cases_controller.rb def update_sub_departments @sub_departments = SubDepartment.where("department_id = ?", params[:department_id]) respond_to do |format| format.js.erb end end Any one knows what to do? Regards. EDIT Okay I simplify my problem! How do I change this part of my coffee script to normal javascript? $.ajax 'update_sub_departments', type: 'GET' dataType: 'script' data: { department_id: $("#business_case_entries_attributes_0_department_id option:selected").val() }
has comment: http://stackoverflow.com/comment/40750520
upvote count: 0
has comment: http://stackoverflow.com/comment/40750760
has comment: http://stackoverflow.com/comment/40750438
has title: Ajax request in JavaScript is not doing anything
has comment: http://stackoverflow.com/comment/40750467
type: Question
has answer: http://stackoverflow.com/a/26038037
has comment: http://stackoverflow.com/comment/40750769
has comment: http://stackoverflow.com/comment/40750501
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40750532
answer count: 2
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/40751229
downvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40751715
favorite count: 0

http://stackoverflow.com/q/25962862
has title: How to call output of a php page in an html page in a specific div?
accepted answer: http://stackoverflow.com/a/25962911
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25962911
score: -2
has answer: http://stackoverflow.com/a/25962895
tagged with: javascript
has comment: http://stackoverflow.com/comment/40650123
has comment: http://stackoverflow.com/comment/40650049
answer count: 3
upvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25962895
has body: This is my html code This is my php1.php code <?php if(isset($_POST['submit1']) && ($_POST['text1'])=="text"){ echo "hello"; } ?> If I want to call the output of php1.php i.e., hello, in html div1 what to do ? @Uzumaki, I've edited my html code like this, but its not working, here is my code.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25962919
type: AnsweredQuestion

http://stackoverflow.com/comment/40686123
has text: I dont know if u understand me right i will put here some example... but on this example i use iframe and so i can use z-index, but when i try same code on youtube api the index doesnt work! http://jsfiddle.net/oc59vcp8/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25964801
type: Comment

http://stackoverflow.com/a/36049900
score: -1
upvote count: 0
has body: This is how I did it: io.sockets.sockets.forEach(function (socket) { console.log(socket.id); });
answers question: http://stackoverflow.com/q/25946683
type: Answer
downvote count: 1

http://stackoverflow.com/comment/40671645
score: 6
type: AnswerComment
comment on: http://stackoverflow.com/a/25974870
has text: Can you exaplain it please?
type: Comment

http://stackoverflow.com/q/25927809
has body: I am not good at JavaScript and jQuery. I want to remove a div after clicking on a .close anchor link but I want a confirmation dialog box to appear before removing the div. Secondly, it's removing all the div when .close anchor link is clicked but I want to close only the div that is clicked not all others along with confirmation dialog box to remove it or not. Here is my code: $(document).ready(function(){ $(".close").click(function(){ $(".default-address").remove(); }); }); $(document).ready(function(){ $(".close").click(function(){ $(".other-address").remove(); }); }); .default-address { float:left; margin:10px; color:#fff; width: 46%; box-shadow:1px 2px 14px 0px rgba(61, 68, 30, 0.41); -webkit-box-shadow:1px 2px 14px 0px rgba(61, 68, 30, 0.41); -moz-box-shadow:1px 2px 14px 0px rgba(61, 68, 30, 0.41); background-color: #c2d91f; font-family: Arial, Helvetica, sans-serif; font-size: 14px; } .default-address ul, .default-address li { color: #717f1a; list-style: none outside none; margin: 0; padding: 4px; } .default-address ul li span { float: right; padding-right: 10px; } .default-address ul li:nth-child(n+1) { background-color: #f0f4d7; } .default-address ul li:nth-child(2n+1) { background-color: #f9fce3; } .address-head { margin:10px; } a.close { height:20px; width:20px; float:right; color:#fff; background-color:#a1b41b; text-align: center; text-decoration:none; } a.close:hover { background-color:#879717; } .other-address { background-color: #c2d91f; color: #fff; float: left; font-family: Arial,Helvetica,sans-serif; font-size: 14px; margin: 10px; width: 46%; } .other-address ul { color: #717f1a; list-style: none outside none; margin: 0 0 1px; padding: 0; } .other-address li { padding: 5px; } .other-address ul li span { float: right; padding-right: 10px; } .other-address ul li:nth-child(n+1) { background-color: #f0f4d7; } .other-address ul li:nth-child(2n+1) { background-color: #f9fce3; } @media (max-width:768px){ .default-address, .other-address { width:96%; } } …
favorite count: 0
has answer: http://stackoverflow.com/a/25927998
accepted answer: http://stackoverflow.com/a/25927940
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25927943
score: -1
has answer: http://stackoverflow.com/a/25927940
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40588448
answer count: 3
has title: remove Div on click with confirmation
possible better answer: http://stackoverflow.com/a/25927943
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25907996
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25894518
has body: If you want to show marker after address selection, you should move showMarker(location) in the loadMap. function loadMap(lat,lng) { var location= new google.maps.LatLng(lat, lng); map.setCenter(location); showMarker(location); } Also i suggest to move 'onclick' event from element to inner element. This will avoid accidental clicks. Category 1 Category 2 Category 3 Also I wnat to note, that your deleteOverlays() function not working properly, because in your example you call markersArray[i].setMap(map); instead markersArray[i].setMap(null); I think it should be better :) I've created working JSFiddle for you with yor code.
answers question: http://stackoverflow.com/q/25894518
type: Answer
has comment: http://stackoverflow.com/comment/40563589
score: 1
downvote count: 0

http://stackoverflow.com/comment/40576570
comment on: http://stackoverflow.com/q/25920759
type: Comment
type: QuestionComment
has text: Can the text values of the select be changed or are these values dynamically generated?
score: 0

http://stackoverflow.com/q/26017365
has comment: http://stackoverflow.com/comment/40749228
downvote count: 2
has body: I have called a Jquery plugin for Custom right click in the beginning of the html page. &lt;link href="css/context.standalone.css" type="text/css" rel="stylesheet" /&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="js/context.js"&gt;&lt;/script&gt; &lt;script src="js/demo-context-menu.js"&gt;&lt;/script&gt; My problem is, the plugin is working fine everywhere i right-click on the window.. But i need my custom right click to be enabled only for a particular "div" so that if i click out of that div, default context-menu should popup(not my customized popup). Sample code of the container is here: /*demo-context-menu.js*/ $(document).ready(function(){ context.init({preventDoubleContext: false}); context.attach('body', [ // {header: 'Download'}, {text: 'View'}, {text: 'Add'}, {divider: true}, //{header: 'Meta'}, {text: 'Delete'}, {text: 'Clear', subMenu: [ {text: 'Clear All'} ]} ]); }); How should i achieve this? can someone help me? pls Thanks in advance.
upvote count: 1
has comment: http://stackoverflow.com/comment/40749662
has comment: http://stackoverflow.com/comment/40749289
has comment: http://stackoverflow.com/comment/40749626
has comment: http://stackoverflow.com/comment/40749036
accepted answer: http://stackoverflow.com/a/26017881
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40749491
has comment: http://stackoverflow.com/comment/40749185
has comment: http://stackoverflow.com/comment/40749056
score: -1
has title: Calling Jquery plugin for single div
has comment: http://stackoverflow.com/comment/40749671
type: Question
has comment: http://stackoverflow.com/comment/40749532
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40749071
favorite count: 0
has answer: http://stackoverflow.com/a/26017881
has comment: http://stackoverflow.com/comment/40749466
has comment: http://stackoverflow.com/comment/40749833
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40748980
tagged with: css
has comment: http://stackoverflow.com/comment/40749421
has comment: http://stackoverflow.com/comment/40749368

http://stackoverflow.com/comment/40669304
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25973619
type: QuestionComment
has text: Do you use libraries like async or when?

http://stackoverflow.com/comment/40847130
has text: http://plnkr.co/edit/BXAwmP4bIdPwiYVncWLx The idea would be to call the method signinCallback(authResult) in the GoogleLogin module from the global function signinCallback(authResult) in google_login.js
comment on: http://stackoverflow.com/a/26019882
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26003895
has title: Replace div with left-in slide animation
has comment: http://stackoverflow.com/comment/40725476
favorite count: 0
has answer: http://stackoverflow.com/a/26004234
type: Question
tagged with: css
has body: I would like to replace a div's contents with another via a slide animation; the first div slides to the left outside of the box (hidden), whilst the second slides in. I tried this; http://jsfiddle.net/DTcHh/1203/ But it does not appear to be doing anything. What am I doing wrong? var $oldBox = $("#signup .box[data-step=1]"); var $newBox = $("#signup .box[data-step=2]"); var outerWidth = $oldBox.outerWidth(true); var posSlideOut = (2 &gt; 1 ? -outerWidth : outerWidth); var posSlideIn = (2 &gt; 1 ? outerWidth : -outerWidth); $.when($oldBox.animate({left: posSlideOut}, "slow"), $newBox.css("left", posSlideIn + "px").animate({"left": 0}, "slow"));
upvote count: 3
answer count: 2
accepted answer: http://stackoverflow.com/a/26004234
has comment: http://stackoverflow.com/comment/40725512
has answer: http://stackoverflow.com/a/33552013
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40725899
tagged with: css-animations
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/33552013
score: 3
downvote count: 0

http://stackoverflow.com/q/25876724
score: 0
answer count: 2
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/65612723
has title: Run Javascript before Page_Load event
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/80861983
has answer: http://stackoverflow.com/a/25877353
accepted answer: http://stackoverflow.com/a/25877353
has answer: http://stackoverflow.com/a/65612723
type: Question
has body: I have the following JS, currently it's just before my closing body tag Part of this script sets a cookie, which I need to read in the Page_Load event of my asp.net page. But that event is firing before the cookie is set. How can I change this so the script runs first? Thanks
tagged with: javascript

plaintext
tags question: http://stackoverflow.com/q/25958006
tag name: plaintext
type: Tag

http://stackoverflow.com/comment/40578132
type: QuestionComment
has text: And why wouldn't you do like normal people, and use a `formData` object to upload the image ?
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25921941

http://stackoverflow.com/comment/40590571
score: 0
type: Comment
type: QuestionComment
has text: Do you have any idea that how radio button works ? any one radio button will be selected at a time which has same name. you can use checkbox if you wish toggle functionality. So,first Correct/Edit your question.
comment on: http://stackoverflow.com/q/25928787

http://stackoverflow.com/q/25947938
has title: fitRows in Isotope masonry column size issue
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25954107
tagged with: masonry
tagged with: javascript
tagged with: jquery
has body: I have a masonry photo gallery with fitRows layout mode with a small JS config which I have purchased with a theme and I had to modify it to support fixed 300px image height and any width, just like google image search. the problem is that each column have the same width instead of auto and there are white spaces between images. here is the complete code sample http://codepen.io/evox/pen/CaKpD (function ($) { var $container = $('.masonry_wrapper') function refreshWaypoints() { setTimeout(function() { }, 1000); } $('nav.portfolio-filter ul a').on('click', function() { var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector }, refreshWaypoints()); $('nav.portfolio-filter ul a').removeClass('active'); $(this).addClass('active'); return false; }); function setPortfolio() { setColumns(); $container.isotope('fitRows'); } isotope = function () { $container.isotope({ resizable: true, itemSelector: '.item' }); }; isotope(); $(window).smartresize(isotope); }(jQuery)); .masonry_wrapper { overflow:hidden; margin:30px 0; } .masonry_wrapper .item { margin: 0 2px 4px; float: left; padding:0; } .masonry_wrapper .item img { width:auto; height: 300px; position: relative; z-index: -2; } Isotope - fitRows layout mode
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25954107
type: Question
tagged with: css

http://stackoverflow.com/comment/40562796
comment on: http://stackoverflow.com/a/25913932
type: Comment
has text: Thanks. I was looking at the solution in the wrong way, great to learn something new.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25946683
tagged with: object
has body: k so I try for 1 hour now and it still not working I want to get id of every socket.io user so I tried this: var socket_list = new Array(); io.on('connection', function (socket) {... socket_list.push(socket); ...} then for(var soc in socket_list) { console.log(soc.id); } but it still undefined. how to fix? thanks it looks simple but just not working also tried console.log(socket_list) and it worked
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/36049900
has answer: http://stackoverflow.com/a/36049900
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25947053
has title: Loop through all sockets in socket.io v1
tagged with: socket.io-1.0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25947053
tagged with: socket.io
type: Question

http://stackoverflow.com/a/26008055
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40732669
type: Answer
has comment: http://stackoverflow.com/comment/40732841
has body: The issue is that you are misusing the tag. Instead of this: Client Location Try this: Client Location The first label should be changed as well. Instead of this: Name Try this: Name Or this: Name
has comment: http://stackoverflow.com/comment/40732620
upvote count: 1
answers question: http://stackoverflow.com/q/26007988
accepted answer of: http://stackoverflow.com/q/26007988
score: 1

http://stackoverflow.com/a/26017552
answers question: http://stackoverflow.com/q/25887833
upvote count: 11
has comment: http://stackoverflow.com/comment/58232819
has comment: http://stackoverflow.com/comment/40887744
has comment: http://stackoverflow.com/comment/58240898
type: AcceptedAnswer
downvote count: 0
has body: I recently had the same problem with posting an email pdf attachment to mandrill through node.js but managed to solve it. Here is what I did: generatePdf(inputData, function (err, doc) { if (err) return callback(err); var bufferChunks = []; doc.on('readable', function() { // Store buffer chunk to array bufferChunks.push(doc.read()); }); doc.on('end', function() { var pdfBuffer = Buffer.concat(bufferChunks), pdfBase64String = pdfBuffer.toString('base64'); // This string is perfectly ok to use as an attachment to the mandrillAPI sendMandrillEmailWithAttachment(pdfBase64String); }); }); I hope this helps. Ping if you need additional help =)
accepted answer of: http://stackoverflow.com/q/25887833
type: Answer
has comment: http://stackoverflow.com/comment/40927338
score: 11

http://stackoverflow.com/a/41065003
score: 3
has comment: http://stackoverflow.com/comment/109642381
downvote count: 1
has body: I understand its been answered already. but I hope this will help someone in future and saves so much time and pain. After getting the results in autocomplete you can use below code for keeping the value in the autocomplete textbox field. (you can replace 'CRM.$' with '$' or 'jQuery' depending on your jQuery version) select: function (event, ui) { var label = ui.item.label; var value = ui.item.value; //assigning the value to hidden field for saving the id CRM.$( 'input[name=product_select_id]' ).val(value); //keeping the selected label in the autocomplete field CRM.$('input[id^=custom_78]').val(label); return false; }, complete code is below: This one I did for a textbox to make it Autocomplete in CiviCRM. Hope it helps someone CRM.$( 'input[id^=custom_78]' ).autocomplete({ autoFill: true, select: function (event, ui) { var label = ui.item.label; var value = ui.item.value; // Update subject field to add book year and book product var book_year_value = CRM.$('select[id^=custom_77] option:selected').text().replace('Book Year ',''); //book_year_value.replace('Book Year ',''); var subject_value = book_year_value + '/' + ui.item.label; CRM.$('#subject').val(subject_value); CRM.$( 'input[name=product_select_id]' ).val(ui.item.value); CRM.$('input[id^=custom_78]').val(ui.item.label); return false; }, source: function(request, response) { CRM.$.ajax({ url: productUrl, data: { 'subCategory' : cj('select[id^=custom_77]').val(), 's': request.term, }, beforeSend: function( xhr ) { xhr.overrideMimeType( "text/plain; charset=x-user-defined" ); }, success: function(result){ result = jQuery.parseJSON( result); //console.log(result); response(CRM.$.map(result, function (val,key) { //console.log(key); //console.log(val); return { label: val, value: key }; })); } }) .done(function( data ) { if ( console &amp;&amp; console.log ) { // console.log( "Sample of dataas:", data.slice( 0, 100 ) ); } }); } }); PHP code on how I'm returning data to this jquery ajax call in autocomplete: /** * T…
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/26033840

http://stackoverflow.com/q/25960826
has title: Sharing data between controllers in Angular, to watch or not watch?
has answer: http://stackoverflow.com/a/25961197
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25961197
favorite count: 0
downvote count: 0
linked to: http://stackoverflow.com/q/18195498
type: Question
linked to: http://stackoverflow.com/q/19744462
type: AnsweredQuestion
score: 1
has body: I read the following questions and answers: Share data between AngularJS controllers, Update scope value when service data is changed, and Angular: Update service and share data between controllers. My question is about the answers provided. The answers often suggest to $watch and I don't understand why. I wanted to share some values between controllers so I simply did this (this is a simplification of the code): angular.module('app', []) .factory('SomeSharedData', function() { return { 'pointer' : { 'someKey' : 'someValue' }}; }) .controller('Controller1', ['$scope', 'SomeSharedData', function($scope, SomeSharedData) { $scope.pointer = SomeSharedData.pointer; }]) .controller('Controller2', ['$scope', 'SomeSharedData', function($scope, SomeSharedData) { $scope.pointer = SomeSharedData.pointer; }]); Is this inheritly evil for some reason? Why use something like: $scope.$watch(function () { return SomeSharedData.someKey(); }, function (newValue) { if (newValue) $scope.someKey = newValue; });
upvote count: 1
has comment: http://stackoverflow.com/comment/40646178
linked to: http://stackoverflow.com/q/21919962
tagged with: angularjs-service
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25927159
score: 1
type: Question
has answer: http://stackoverflow.com/a/25932673
tagged with: frameworks
upvote count: 1
answer count: 1
tagged with: javascript
has body: i have an ember view with a bunch of jquery code to manipulate the dom, the thing is when i use: this.transitionTo("forecast.workpage", id); it only loads the view once but when i try click it again the view doesn't execute again, i try several ways for instance adding this.rerender() in the end of my didInsertElement like that: didInsertElement : function(){ //all my js code this.rerender() } but it trows an error Uncaught TypeError: Cannot read property '0' of undefined , try adding this._super() in the begin, same result, is there a way to force the view to refresh from the view itself or the route? or controller ? edit: try this approach with no results... didInsertElement : function(){ this._super(); Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent); }, afterRenderEvent: function(){ //$(document).foundation(); $(".sortables li:even").find('div.row').addClass("gray"); } Same thing, executes onces but where i click on the action doesn't execute the code.
tagged with: ember.js
favorite count: 0
tagged with: view
has title: Force to refresh ember view
downvote count: 0
type: UnansweredQuestion
tagged with: handlebars.js

http://stackoverflow.com/a/26041272
answers question: http://stackoverflow.com/q/26027782
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26027782
has body: Try making the DefaultRoute for 'objectHandler' a child of another route that defines 'Objects' as the handler. Such as: var routes = ( &lt;Routes&gt; &lt;Route handler={Objects}&gt; &lt;DefaultRoute name="objects" handler={objectHandler}/&gt; &lt;/Route&gt; &lt;/Routes&gt; ); jsfiddle: http://jsfiddle.net/gq1uym5y/1/

http://stackoverflow.com/a/26032021
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26031934
type: Answer
has body: If you want numbers instead of strings in data3, use parseInt(): for(i in obj){ var temp=[]; temp.push(parseInt(obj[i].current, 10)); temp.push(parseInt(obj[i].target, 10)); data3.push(temp); }
answers question: http://stackoverflow.com/q/26031934
has comment: http://stackoverflow.com/comment/40779767
has comment: http://stackoverflow.com/comment/40776075
score: 0
has comment: http://stackoverflow.com/comment/40779706

http://stackoverflow.com/a/25998594
score: 1
has body: You've misspelt #datasource in your click event handler. One thing to be aware of is that you're potentially trying to append multiple elements with the id '#datasource'. IDs should be unique, so you're probably better off making this into a class .datasource.
has comment: http://stackoverflow.com/comment/40715496
downvote count: 0
has comment: http://stackoverflow.com/comment/40715162
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25998563

http://stackoverflow.com/q/25982094
has body: I installed debowerify in my project and added its transform in my Gruntfile.js, here's a snippet: grunt.initConfig({ browserify: { app: { files: { 'public/javascripts/build/app.js': ['public/javascripts/app.js'] }, options: { transform: ['node-underscorify','debowerify'] } } } }); Then I installed a module (e.g. bower install bootstrap --save). In my app.js file I tried to include that module: var bootstrap = require('bootstrap'); ... and got: Running "browserify:home" (browserify) task Error: module "bootstrap" not found My folder structure looks like that: / - app/ - bower_components/ - bootstrap/ - node_modules/ - public/ - javascript/ - app.js - build/ - app.js - bower.json - Gruntfile.js
tagged with: javascript
tagged with: gruntjs
score: 0
has answer: http://stackoverflow.com/a/25997302
has title: Debowerify not working with Grunt
accepted answer: http://stackoverflow.com/a/25997302
tagged with: browserify
answer count: 1
tagged with: bower
tagged with: node.js
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40523263
has text: @PatsyIssa there are two scripts added by the initial snippet 'widget' they are rbox_impl.js and rbox_api.js that function is in rbox_api.js. I've added a couple of gists to the end of the question.
score: 0
comment on: http://stackoverflow.com/q/25890174
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40538803
score: 0
type: AnswerComment
type: Comment
has text: I tried this and it can now find the component. Thanks! However, the error now says "Assertion failed: You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead". I just changed the view to ContainerView and it now says "Uncaught Error: Assertion Failed: You tried to append to ([object Object]) but that isn't in the DOM". The template of the view also isn't on the page.
comment on: http://stackoverflow.com/a/25881076

http://stackoverflow.com/comment/40717645
type: Comment
comment on: http://stackoverflow.com/a/25999645
type: AnswerComment
has text: the `WebForm_DoPostBackWithOptions` is generated in the HTML but I never coded it in. I will post the code on a site for you to review. The code for the function and the button only? It is a Visual Web Part if that helps.
score: 0

http://stackoverflow.com/comment/40619523
score: 0
type: AnswerComment
type: Comment
has text: console.log is not showing any thing when I check the check-boxes and then run
comment on: http://stackoverflow.com/a/25936687

http://stackoverflow.com/comment/40716777
has text: You definitely made a great point in favour of forEach..Accepted.
type: AnswerComment
comment on: http://stackoverflow.com/a/25996033
type: Comment
score: 1

http://stackoverflow.com/q/25883214
score: 0
tagged with: jquery-events
answer count: 2
has body: I have use plugin ref:- [http://code.tutsplus.com/tutorials/how-to-upload-files-with-codeigniter-and-ajax--net-21684][1] I am trying to do fix 3 images uploading program using jQuery ajax. That's why I make some changes according to requirements some of them are:- I convert all CSS style from id to class means (# to .) replace dataType from JSON to string change pic upload event from submit to file input change event Everything is works fine, Image uploaded and display in view also done successfully Now my problem is file input change event fires only once. What's the problem in my code? Please help me to fix this problem. View:- &lt;div class="photobox fL"&gt; &lt;div class="container" title="Choose File"&gt; &lt;div class="doit"&gt; &lt;img src="&amp;lt;?php echo base_url();?&amp;gt;images/thumb-5.jpg" id="img1" alt="Upload Photo" width="220px" height="300px;"/&gt; &lt;/div&gt; &lt;input id="file1" class="hid" name="file1" type="file" size="1/"&gt; &lt;/div&gt; &lt;/div&gt; site.js:- (external) $(function() { $('#file1').change(function(e) { e.preventDefault(); $.ajaxFileUpload({ url :'./upload_image/upload_file/', secureuri :false, fileElementId :'file1', dataType :'string', success : function (path) //EXECUTES SUCCESSFULLY { var base_url=loadName(); var img1 = document.getElementById("img1"); img1.src = base_url+path; //CHANGE IMG SRC WITH NEW UPLOADED IMAGE SUCCESSFULLY } }); return false; }); }); and my controller also works fine. Problem is file input change event occurs only once. I do not use form tag because I am not doing uploading process on submit event as tells in reference. But still my image uploading works fine at once only because next time change event not fires Please help me out from this problem.
tagged with: javascript
tagged with: jquery
tagged with: file-upload
has comment: http://stackoverflow.com/comment/40507169
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40507186
tagged with: php
has answer: http://stackoverflow.com/a/61155493
type: Question
has title: File input jQuery change event fires only once
has comment: http://stackoverflow.com/comment/40507426
has answer: http://stackoverflow.com/a/25883606

http://stackoverflow.com/comment/40781342
has text: @vkurchatkin then what would you call it? I find numerous references that describe such constructs as classes in javascript eg. - http://www.phpied.com/3-ways-to-define-a-javascript-class/.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26034049

http://stackoverflow.com/comment/40641315
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25958240
has text: Nothing is showing in the console tab neither. All seems a bit odd. Ill have a look into the jQuery link and make sure its all working okay.
score: 0

http://stackoverflow.com/q/25904759
has answer: http://stackoverflow.com/a/25904843
possible better answer: http://stackoverflow.com/a/25904797
has comment: http://stackoverflow.com/comment/40546002
has answer: http://stackoverflow.com/a/25904797
has answer: http://stackoverflow.com/a/25904830
has answer: http://stackoverflow.com/a/25904796
favorite count: 0
answer count: 5
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Jquery and input text onchange show pop up
accepted answer: http://stackoverflow.com/a/25904796
type: Question
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40546088
tagged with: jquery
has answer: http://stackoverflow.com/a/25904888
has body: I have spent far too much trying to get a simple jquery and input box example to work. When someone finishes typing something into the input box, I want jquery to popup an alert. Eventually I will be doing some more code with this but right now I just want to get this working! Here is my example, which doesn't seem to work: Any ideas?

http://stackoverflow.com/q/25894275
answer count: 2
downvote count: 0
tagged with: jsp
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/56581781
favorite count: 0
tagged with: extjs
has answer: http://stackoverflow.com/a/25900682
has title: Remove the select all checkbox in extjs checkboxmodel
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40546263
linked to: http://stackoverflow.com/q/7321645
upvote count: 1
has body: I have a checkbox model in my extjs page. var saCheckBox= Ext.create('Ext.selection.CheckboxModel', {mode: 'SINGLE'}); I am using this in a grid.Panel through selModel. I want to remove the check all checkbox from the model. I found this and added a listener accordingly but still I get the check all box. var saCheckBox= Ext.create('Ext.selection.CheckboxModel', {mode: 'SINGLE'}, {listeners: { afterrender: function (grid) { $('.x-column-header-checkbox').css('display','none'); } }}); I used display: none for that particular span which works good in Mozilla but not in other browsers. Can anyone provide a browser compatible solution?
type: Question

http://stackoverflow.com/comment/40498164
score: 0
type: Comment
type: QuestionComment
has text: In my opinion, you shouldn't over engineer this. Have three inputs structured (` `) ` ` - ` `, auto focus the next input when the previous one is full, and have them typed as password so they only show ***.
comment on: http://stackoverflow.com/q/25878046

http://stackoverflow.com/comment/40556331
type: AnswerComment
comment on: http://stackoverflow.com/a/25909343
type: Comment
has text: Should't we use `toDataURL()` on canvas and not context?
score: 0

http://stackoverflow.com/a/33855342
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25895235
score: 1
has body: Try this My First Angular App Adding Simple Controller Name: {{name}} {{cust.name}} - {{cust.city}}
upvote count: 1

http://stackoverflow.com/q/25888602
upvote count: 0
has body: I have added $( "#target" ).toggle(function() { alert( "First handler for .toggle() called." ); console.log("HIiiiiiiiiiii"); }, function() { alert( "Second handler for .toggle() called." ); console.log("Helooooo"); }); In Html i have added. &lt;div class="calendarcell"&gt;&lt;a href="" id="target" &gt;'+ val.Title + '&lt;/a&gt;&lt;/div&gt; Can u please suggest Me
tagged with: jquery
linked to: http://stackoverflow.com/q/4911577
favorite count: 0
has answer: http://stackoverflow.com/a/25888833
has answer: http://stackoverflow.com/a/25888690
has comment: http://stackoverflow.com/comment/40516322
type: UnansweredQuestion
has title: Toggle Function is not working
has comment: http://stackoverflow.com/comment/40516577
downvote count: 1
has comment: http://stackoverflow.com/comment/40516244
has comment: http://stackoverflow.com/comment/40516250
linked to: http://stackoverflow.com/q/20032913
tagged with: javascript
score: -1
type: Question
has comment: http://stackoverflow.com/comment/40516278
answer count: 2

http://stackoverflow.com/a/25883054
accepted answer of: http://stackoverflow.com/q/25882578
answers question: http://stackoverflow.com/q/25882578
type: Answer
has comment: http://stackoverflow.com/comment/40508286
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40509049
has comment: http://stackoverflow.com/comment/40507451
downvote count: 0
has body: Just clone the element and then replace the original with clone after color change. Demo function colorchange(colorCode) { $('.circle1').css({ "background-color": colorCode }); var elm = $('.circle1').get(0); var newone = elm.cloneNode(true); elm.parentNode.replaceChild(newone, elm); } $(".button").click(function () { colorchange("#ccc"); }); HTML change color If you are not happy with the .replaceChild try this Demo function colorchange(colorCode) { var el =$('.circle1'); el.css({ "background-color": colorCode }); el.replaceWith(el.clone(true)); } Edit When you have multiple elements you can use following code, Demo function colorchange(colorCode) { var el =$('.circle1'); el.css({ "background-color": colorCode }); el.each(function(){ $(this).replaceWith($(this).clone(true)); }); }
type: AcceptedAnswer

http://stackoverflow.com/comment/40561219
score: 1
comment on: http://stackoverflow.com/q/25912993
has text: That's a lot of code, can you simplify it or recreate the issue on http://jsfiddle.net Where is the click binding on `.variation-value` ?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25952520
accepted answer: http://stackoverflow.com/a/25952597
score: 0
has answer: http://stackoverflow.com/a/25952585
has answer: http://stackoverflow.com/a/25952613
has body: I'm a high-school student trying to make a proof writing program. I just need the JS function Edit() to send the value of the first text-box to the table. Any ideas? I know the code is messy, I'll fix it later. Code: Insert Given: Insert Statement to Prove: Submit Step Number Step Explaination 1 Given
answer count: 5
possible better answer: http://stackoverflow.com/a/25952585
has title: JavaScript and HTML Formatting - Table Needs to Call Variable
has comment: http://stackoverflow.com/comment/40630719
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25952597
tagged with: javascript
has answer: http://stackoverflow.com/a/25952586
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40630845
has comment: http://stackoverflow.com/comment/40630817
has comment: http://stackoverflow.com/comment/40630783
has answer: http://stackoverflow.com/a/25952719

http://stackoverflow.com/comment/40617844
type: QuestionComment
score: 0
has text: This would be a case where a directive would work best.
type: Comment
comment on: http://stackoverflow.com/q/25943118

http://stackoverflow.com/comment/40709077
score: 0
type: Comment
type: QuestionComment
has text: @Cerbrus There are some obscure reasons and constraints behind it. Be sure that we are concerned enough about it.
comment on: http://stackoverflow.com/q/25995437

http://stackoverflow.com/comment/40542544
has text: Out of curiousity, why do you want the HTML of the DIV? Wouldn't it be easier to just work the HTML nodes?
comment on: http://stackoverflow.com/q/25902378
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25960473
tagged with: express
favorite count: 0
tagged with: regex
score: 2
downvote count: 0
has title: Regex global match for Nodejs not working
type: UnansweredQuestion
tagged with: node.js
tagged with: twitter
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25960564
has body: I've tried this a million times and have searched EVERYWHERE! I cannot get this to work. I'm trying to extract the text of a tweet and look for a global match it only works when it matches it absolutely, but not if I add a word next to it. FYI I'm trying to do this in NodeJS. ex: var userTweet = tweet.text; var gold = userTweet.match(/#gold/g); console.log(gold); console.log(userTweet); if (userTweet == gold) { console.log('got it'); // only grabs it if it exactly matches the tweeted string } else { console.log('not getting it'); // if any other word besides 'gold' is present doesn't work at all } }); I'd like to add that I'm writing my code within the Twit stream. and placed inside this function: stream.on('tweet', function(tweet) { } I'm basically expecting to track a key word and a specific user. But when I try to track a specific word, it overrides the user I want to track and tracks every user that uses that key word. --- for anyone facing the same problem I ended up just using the twitter-text module. Although it has it's issues as well.
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40560207
has text: @IswantoSan you're kidding me.
comment on: http://stackoverflow.com/q/25910958
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25905506
answers question: http://stackoverflow.com/q/25905427
has body: use defaultmuted property of audio/video DOM myAud.defaultMuted=true; http://www.w3schools.com/tags/av_prop_defaultmuted.asp
score: 0
type: Answer

http://stackoverflow.com/comment/40817289
type: AnswerComment
comment on: http://stackoverflow.com/a/26009881
type: Comment
has text: i've tried to submit my form by ajax on "on change" by calling a function "upload_image(){ ajax for submitting form }"....this also gives me cross domain error....
score: 0

http://stackoverflow.com/comment/40594044
comment on: http://stackoverflow.com/q/25930800
score: 0
type: Comment
type: QuestionComment
has text: Do you really need to create a form? Use ajax, construct the parameters you need the same way as you did right now but instead use ajax to call the php file But if you really wanted to use a virtual form you can use also this so http://malsup.com/jquery/form/ it doesn't redirect the page when a form is submitted just add an id attribute to your virtual form

http://stackoverflow.com/comment/76942953
has text: Interesting idea, but don't forget to mention that a layer has no native 'name' attribution, and this has to be set (here, on layer creation). `var myLayer = new ol.layer.Vector({ source: mySource, style: myStyle, name: "myLayerName" });`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/41872087

http://stackoverflow.com/comment/40679980
score: 0
comment on: http://stackoverflow.com/q/25979238
type: Comment
type: QuestionComment
has text: This question has nothing to do with Readmore itself but you are just about jquery selectors.

http://stackoverflow.com/q/25971536
has answer: http://stackoverflow.com/a/25971748
possible better answer: http://stackoverflow.com/a/25971592
has title: Run the function just once
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25971592
has answer: http://stackoverflow.com/a/25971590
has body: I've the following function which is excuted twice,there is option to do it just once? Tried many things, however, without any sucess ;( $("#myDiv1, #myDiv2").fadeIn('20',function(){ { alert('alert'); } });
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40665721
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/25971590
linked to: http://stackoverflow.com/q/8429020
answer count: 3
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40665655

http://stackoverflow.com/q/25981040
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40725133
has comment: http://stackoverflow.com/comment/40691419
has comment: http://stackoverflow.com/comment/40725795
type: Question
has comment: http://stackoverflow.com/comment/40692787
has comment: http://stackoverflow.com/comment/40692797
has comment: http://stackoverflow.com/comment/40697870
has answer: http://stackoverflow.com/a/25989347
accepted answer: http://stackoverflow.com/a/25989347
has comment: http://stackoverflow.com/comment/40692671
tagged with: javascript
has title: AJAX: How to change a value on client side as well as server side on button click?
tagged with: ajax
has comment: http://stackoverflow.com/comment/40691533
upvote count: 2
linked to: http://stackoverflow.com/q/5701588
has comment: http://stackoverflow.com/comment/40725561
has comment: http://stackoverflow.com/comment/40692849
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: In the following SSCCE, I have a string which contains the HTML for three divs. I add a style="display:none;" attribute to all the divs except the first one. I add a button to all the divs except the last one, and add a JS onclick event listener, which should change the current div's style property to style="display:none;" (current div's id attribute passed to the JS function.) and the next div's (it's id is also passed to the JS function) style property to style="display:block;" I add a submit button to the last div which submits the form. I did not write the action attribute of the form or any event listener for this button because that's not the concern right now. I print the div's. PROBLEM: The currentId and the nextId passed to the JS event listener of the button click event are calculated in a function named returnCurrentId which takes the $array_of_divs and $array_of_ids as arguments. Then it checks which div had style="display:none;" and sets it as the current_id. Then the id next to it in the $array_of_ids becomes the next_id. The problem arises when the JS changes the style property of the divs whose ids have been passed to it on the client side, and nothing changes on the server side. So on the server side, it is the same $array_of_ids being passed to returnCurrentId without any changes in the display properties, and so the same ids of the first and second div are returned. They are passed to JS, and then again the same div is displayed again. MY EFFORT: So I have been reading up on AJAX here, and I tried to send a variable named pass_back in the URL of XMLHTTPRequest.open(GET, URL, TRUE), and on the server side, tried to check if $_REQUEST contains it, and when it does, I make the same change to the style properties, but it does not seem to contain it. QUESTION: I anticipate I am placing the block of code on the wrong place, but then where do I put it. So can anyone give me some tips/suggestion/solution? <?php echo ' '; //String of all the div's $haystac…
favorite count: 0
has comment: http://stackoverflow.com/comment/40725888
tagged with: xmlhttprequest
tagged with: php

http://stackoverflow.com/a/25900039
answers question: http://stackoverflow.com/q/25899638
has comment: http://stackoverflow.com/comment/54712550
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40537614
upvote count: 6
score: 6
has body: Brad's answer is correct, but just in case you wanted something for more general use, so that you can change the value of any scope variable: &lt;button type="button" ng-click="showDatePicker('IsStartDatePickerHidden')" &gt; $scope.showDatePicker = function(varName) { $scope[varName] = false; } This is not necessarily good practice, but often useful. Speaking of which, you could just do the assignment inside the ng-click: &lt;button type="button" ng-click="IsStartDatePickerHidden = false" &gt;

http://stackoverflow.com/q/25934837
tagged with: geolocation
type: Question
has answer: http://stackoverflow.com/a/29793802
has body: We have a .co.uk website that is up and running with no problems, we've just bought the .london domain. What we'd like to do is to redirect users to the .london site depending on their physical location when clicking through. Is there a piece of code that could detect the nearest web server and use that information to decide whether to send to .co.uk or .London?
tagged with: javascript
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25934920
linked to: http://stackoverflow.com/q/11826149
has title: Redirect website depending on users location
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40600453

http://stackoverflow.com/comment/40560138
type: Comment
comment on: http://stackoverflow.com/q/25912687
score: 0
has text: Did you open the console? If it's written like in the question, that's a syntax error.
type: QuestionComment

http://stackoverflow.com/q/25918148
has comment: http://stackoverflow.com/comment/40571102
has comment: http://stackoverflow.com/comment/40571227
type: UnansweredQuestion
has title: Pass object as parameter
upvote count: 1
has answer: http://stackoverflow.com/a/25918197
has comment: http://stackoverflow.com/comment/40570717
score: 1
has comment: http://stackoverflow.com/comment/40572467
has comment: http://stackoverflow.com/comment/40572821
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25918219
has body: I have the following code: $('.helloWorld').on('click', function() { $(this).css('background', 'black'); }); Instead, I would like to do something like this (for research): var params = [ 'click', function () { $(this).css('background', 'black'); } ]; $('.helloWorld').on(params); I get an error that reads, "Uncaught SyntaxError: Unexpected token , ." Is this possible? If so, how?
has comment: http://stackoverflow.com/comment/40572553
favorite count: 0
linked to: http://stackoverflow.com/q/676721
has comment: http://stackoverflow.com/comment/40570728
has comment: http://stackoverflow.com/comment/40571143
has comment: http://stackoverflow.com/comment/40571057

http://stackoverflow.com/q/25988979
accepted answer: http://stackoverflow.com/a/25989003
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40700107
has comment: http://stackoverflow.com/comment/40697697
has answer: http://stackoverflow.com/a/25989049
favorite count: 0
has answer: http://stackoverflow.com/a/25989003
upvote count: 2
possible better answer: http://stackoverflow.com/a/25989049
has body: Why does Javascript return the baz method as 'typeof function' instead of its result and how can I output the result instead? var someObject = new Object(); someObject.foo = $('#someElement'), someObject.bar = $('#someOtherElement'), someObject.baz = function() { return 'Hello world!'; } console.log(someObject.baz); // Outputs: function (){return"Hello world!"} Eventually I want to let baz calculate the height difference of the elements in foo and bar but so far I haven't been able to access the calculated result in baz or any other result like the string in the code example above.
has comment: http://stackoverflow.com/comment/40697723
downvote count: 1
type: AnsweredQuestion
tagged with: object
has title: Why does my Javascript object outputs its method as typeof function instead of its result?
score: 1

http://stackoverflow.com/q/25956603
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: Popuating form fields from MySQL using AJAX and Jquery
has answer: http://stackoverflow.com/a/25956696
has comment: http://stackoverflow.com/comment/40639726
tagged with: ajax
has answer: http://stackoverflow.com/a/25957689
tagged with: auto-populate
favorite count: 0
has comment: http://stackoverflow.com/comment/40638521
has comment: http://stackoverflow.com/comment/40639408
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40639139
score: 0
tagged with: mysql
has comment: http://stackoverflow.com/comment/40639424
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40638644
has comment: http://stackoverflow.com/comment/40639854
has body: I followed a tutorial to adapt the code. Here I am trying trying to auto-populate my form fields with AJAX when an 'ID' value is provided. I am new to Jquery and can't get to work this code. Edit 1 : While testing the code, Jquery isn't preventing the form to submit and sending the AJAX request. HTML form ID: Name: Address: Phone: Email: I tried changing Jquery code but still I couldn't get it to work. I think Jquery is creating a problem here. But I am unable to find the error or buggy code. Please it would be be very helpful if you put me in right direction. Edit 2 : I tried using return false; instead of event.preventDefault(); to prevent the form from submitting but still it isn't working. Any idea what I am doing wrong here ? Jquery jQuery(function($) { // hook the submit action on the form $("#form-ajax").submit(function(event) { // stop the form submitting event.preventDefault(); // grab the ID and send AJAX request if not (empty / only whitespace) var IDval = this.elements.ID.value; if (/\S/.test(IDval)) { // using the ajax() method directly $.ajax({ type : "GET", url : ajax.php, cache : false, dataType : "json", data : { ID : IDval }, success : process_response, error: function(xhr) { alert("AJAX request failed: " + xhr.status); } }); } else { alert("No ID supplied"); } }; function process_response(response) { var frm = $("#form-ajax"); var i; console.dir(response); // for debug for (i in response) { frm.find('[name="' + i + '"]').val(response[i]); } } }); Ajax.php if (isset($_GET['action'])) { if ($_GET['action'] == 'fetch') { // tell the browser what's coming header('Content-type: application/json'); // open database connection $db = new PDO('mysql:dbname=test;host:localhost;', 'xyz', 'xyz'); // use prepared statements! $query = $db->prepare('select * from form_ajax where ID = ?'); $query->execute(array($_GET['ID'])); $row = $query->fetch(PDO::FETCH_OBJ); // send the data encoded as JSON echo json_encode($row); exit; } }

http://stackoverflow.com/q/25879533
has comment: http://stackoverflow.com/comment/40501085
type: Question
score: 3
has body: EDIT: Node/Express Code inserting into sqlite database: var db = new sqlite3.Database('db/gnarboxmm.db'); router.post('/api/jobs', function(req,res){ tsql = "INSERT INTO Jobs ('Job_File_Name', 'Job_Transporter_ID') VALUES ('"+req.body.File_Name+"','"+req.body.Trans_ID+"')"; console.log(tsql); db.run(tsql, function(err,rows){ res.end("success"); }); }); UPDATE: I changed my code and am closer now. By adding the $http request inside forEach loop, I'm getting much closer to what I need. New code is here: angular.forEach($rootScope.moveArray, function(value){ $http.post('/api/jobs', {'File_Name':value, 'Trans_ID':'Backup'}); }, $rootScope.jobData); Still not quite there. The request object on the server side now shows two valid entries (where File_Name and Trans_ID are defined), but has a third "undefined" entry. I am attempting to collect a series of file names the user interacting with my view then implement the file names into objects to be sent to the server in $http.post. So far, I've successfully created an array and parsed out array items into an array of objects that's ready to go. Here's the chunk of code I used to create the object from my array called "$rootScope.moveArray" $scope.sendBackup = function(){ angular.forEach($rootScope.moveArray, function(value){ this.push({'File_Name':value, 'Trans_ID':'Backup'}); }, $rootScope.jobData); console.log($rootScope.jobData); The console.log returns "[object, object]" and when I drill down I get two objects with properly assigned File_Name's and Trans_ID's. This is where I run into trouble. I'm using an $http.post: $http.post('/api/jobs', $rootScope.jobData); Checking in on the server side. I'm using express &amp; bodyparser to handle API routing and req/res objects. With the code how it is above, when I log the properties "File_Name" and "Trans_ID" of the req object, I get undefined. I have done a bit of experimentation. If I give $rootScope.jobData an index value ($rootScope.jobData[0]), the $http.post works on the …
tagged with: javascript
has comment: http://stackoverflow.com/comment/40502539
linked to: http://stackoverflow.com/q/20252640
has comment: http://stackoverflow.com/comment/40501009
downvote count: 0
has title: Angular.js: using forEach to create objects then $http POST
favorite count: 0
has comment: http://stackoverflow.com/comment/40501811
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/40501771
tagged with: foreach
answer count: 0
upvote count: 3

http://stackoverflow.com/comment/40610174
has text: This application will be used by only myself. I can have my local setup for it. I will run this application on remote server where I have bunch of files. I need to find out some word occurrence in those files.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25924005
score: 0

http://stackoverflow.com/comment/103403866
score: 0
type: QuestionComment
type: Comment
has text: see the answer of https://stackoverflow.com/questions/14749182/how-to-register-multiple-external-listeners-to-the-same-selection-in-d3 may be relevant
comment on: http://stackoverflow.com/q/25907940

http://stackoverflow.com/q/25987836
has body: I'm working on an app that needs to access CORS-resources. In the app, users can change their subdomain (ie - from mysubdomain.myapp.com to mynewsubdomain.myapp.com). The server reads the origin header and adds that subdomain to the allowed origins for CORS requests. My issue is that after the user changes their subdomain, I perform a simple window.location.href = mynewsubdomain redirect, but this results in failed resource loading (JS and styles) with the error: Font from origin 'http://localhost:7000' has been blocked from loading by Cross-Origin Resource Sharing policy: The 'Access-Control-Allow-Origin' header has a value 'http://old.myapp.dev' that is not equal to the supplied origin. Origin 'http://new.myapp.dev' is therefore not allowed access. Inspecting the Network Requests in Chrome, I can see that the Origin in the Request Headers is still http://old.myapp.dev, which seems to be the issue here. Subsequent page loads work fine. Is there something I can do about this? Can I instruct the browser to use the correct (new) subdomain as the origin? Should I redirect in a different manner? MDN says this about changing window.location.href: "Note that security settings, like CORS, may prevent this to effectively happen". But not much information that could help how to work around this.
has answer: http://stackoverflow.com/a/26798190
upvote count: 1
answer count: 1
tagged with: reload
type: UnansweredQuestion
tagged with: cors
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has title: Browser sends wrong/previous origin header after JS-redirect
type: Question

twitter-bootstrap-3
tags question: http://stackoverflow.com/q/25991329
tags question: http://stackoverflow.com/q/25885067
tag name: twitter-bootstrap-3
tags question: http://stackoverflow.com/q/26005547
tags question: http://stackoverflow.com/q/25959123
tags question: http://stackoverflow.com/q/25918206
tags question: http://stackoverflow.com/q/25963254
tags question: http://stackoverflow.com/q/26027489
tags question: http://stackoverflow.com/q/25970487
tags question: http://stackoverflow.com/q/25876098
type: Tag
tags question: http://stackoverflow.com/q/26028933
tags question: http://stackoverflow.com/q/26022995
tags question: http://stackoverflow.com/q/25874883
tags question: http://stackoverflow.com/q/25889458
tags question: http://stackoverflow.com/q/26014326
tags question: http://stackoverflow.com/q/26023008
tags question: http://stackoverflow.com/q/26025764

http://stackoverflow.com/q/25924248
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: I have some AJAX script that submits a form and then updates the web page. My Code: HTML: AJAX: This seems to have resolved my issue: Submiting a form with Ajax by using FormData on Firefox and IE10+ I am curious why this is the case or is it bad programming on my behalf? Also when using FireBug the post data does not appear similar to that of the post data from a standard HTML form. IE, with the ajax post using formdata FireBug lists no "Parts" section under the POST details. Thanks for your help!
tagged with: php
answer count: 0
score: 1
has title: AJAX formdata POST submit working in IE9/Chrome but not in Firefox
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40717216
has text: That regex makes no sense. `[ ]` matches `<` OR `b` OR `r` OR `>`, not necessarily a ` ` tag.
score: 7
type: Comment
comment on: http://stackoverflow.com/a/25999773
type: AnswerComment

http://stackoverflow.com/a/25921854
has comment: http://stackoverflow.com/comment/40578088
type: Answer
accepted answer of: http://stackoverflow.com/q/25921599
upvote count: 1
answers question: http://stackoverflow.com/q/25921599
score: 1
has body: You just need to close the current opened one before opening a new one. $('.collapse-content.open') will target the currently opened accordion. If you have more than 1 accordion on the page, then you need to traverse further up the dom tree to get the parent container (.wrap in this case) of the current accordion if (accordion.hasClass('open')) { accordion.removeClass('open'); accordion.animate({ height: 0 }, 300); } else { $('.collapse-content.open').animate({ height: 0 }, 300).removeClass('open'); var currentHeight = accordion.height(); //save current height accordion.css('height', 'auto'); //temporary switch height to auto var autoHeight = accordion.height(); //get auto height accordion.css('height', currentHeight); //switch back to current height accordion.animate({ height: autoHeight }, 300); //animate that beautiful thing accordion.addClass('open'); //let the people know! } http://codepen.io/anon/pen/ufskl I am not sure what your open class does but if it has some css implications later and you need to remove it at the end of the closing of the accordion item then do this $('.collapse-content.open').animate({ height: 0 }, 300, function() { $(this).removeClass('open'); });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25908776
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/9880178
accepted answer: http://stackoverflow.com/a/25975566
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40614446
favorite count: 0
has body: I wanted to implement something like Sencha Aggregation Grid in SlickGrid. I have a very bad workaround for it, var columns = [ name:getAggregatedName(), field: 'save', width:160, formatter: customFormatter} ]; function customFormatter(){ var text = ' Value1 Value2 '; return text; } function getAggregatedName(){ var html =" Action Action1 Action2"; return html; } Its not appropriate, Its neither extensible, nor it wil give correct formatting. For diaplaying it properly, i had to change the height of header row in the slick.grid.js file which is again wrong way. Is there any proper way of doing it? All ideas are welcomed Thanks Edit Here is the snapshot of what i want.
has title: Aggregated headers and columns in Slick Grid
tagged with: slickgrid
has comment: http://stackoverflow.com/comment/40669104
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25975566
upvote count: 2

http://stackoverflow.com/q/25996346
has body: I am using JSHint for the static code analysis of my javascript files. I have configured the .jshintrc file for that. The question I have is that : Is there a way in which we can configure jshint to show only errors and no warnings. I know that we can do that by the warning code, but can we do that for all the warnings together? Or Is there a way in which we can classify errors and warnings? I am running jshint as a grunt task using the command grunt jshint
tagged with: javascript
has answer: http://stackoverflow.com/a/25996593
accepted answer: http://stackoverflow.com/a/25996593
favorite count: 0
score: 2
type: AnsweredQuestion
has title: how to show only errors with jshint
tagged with: jshint
type: Question
upvote count: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40671988
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25975011
has text: Responsive is so hard to do using scripting. Why do you not use CSS?

cryptography
tag name: cryptography
tags question: http://stackoverflow.com/q/25894487
type: Tag
tags question: http://stackoverflow.com/q/25883082

http://stackoverflow.com/comment/40683550
type: Comment
has text: Harshadewa I allready print_r($_POST) and print a empty array() also var_dump(json_decode(file_get_contents("php://input"))); print NULL. Any ideias?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25955958

http://stackoverflow.com/comment/40555133
type: Comment
has text: maybe you could specify that var len is length of substring to be deleted. Anyways accepted!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25909397

http://stackoverflow.com/a/25987819
has body: You added a new line in your div. that's why /n appearing Empire City Casino at Yonkers Raceway Use like this.
downvote count: 0
answers question: http://stackoverflow.com/q/25987719
accepted answer of: http://stackoverflow.com/q/25987719
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25996029
has comment: http://stackoverflow.com/comment/40754579
type: Question
has comment: http://stackoverflow.com/comment/40712378
tagged with: google-polyline
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
score: 0
favorite count: 0
has title: Can I get Google Maps v3 to draw polylines independently?
answer count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has body: I'm trying to animate the path of a tracked vehicle on a Google Map (v3 API). I have 4 polylines: one being a grey background line to indicate the entire route, and 3 more to indicate the previous hours worth of tracking data (red for the past 10 minutes, orange for 10-30 minutes and yellow for 30-60 minutes). Even though I've set the zIndex correctly for the polylines, as I create the new animated lines and destroy the old ones the grey background line keeps overlapping the other lines (I don't touch this polyline during animation). It also seriously reduces the performance of the animation, if I disable the grey line the performance is just fine. I believe what's happening is that Google Maps is using one canvas element to draw all the polylines that intersect that rectangle, so it has to redraw all of my polylines in that rectangle, not just the ones I'm animating. Is there any way to get Google Maps to put them on separate layers so it only redraws the ones I want to redraw? Update: I've created a sample that performs pretty well, but does demonstrate the background line overlapping the other lines. HTML: Animate Javascript: google.maps.LatLng.prototype.destinationPoint = function(brng, dist) { dist = dist / 6371; brng = brng.toRad(); var lat1 = this.lat().toRad(), lon1 = this.lng().toRad(); var lat2 = Math.asin(Math.sin(lat1) * Math.cos(dist) + Math.cos(lat1) * Math.sin(dist) * Math.cos(brng)); var lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(dist) * Math.cos(lat1), Math.cos(dist) - Math.sin(lat1) * Math.sin(lat2)); if (isNaN(lat2) || isNaN(lon2)) return null; return new google.maps.LatLng(lat2.toDeg(), lon2.toDeg()); } Number.prototype.toRad = function() { return this * Math.PI / 180; } Number.prototype.toDeg = function() { return this * 180 / Math.PI; } var range_lines = { red: null, orange: null, yellow: null }; var range_colors = { red: '#ff0000', orange: '#FFA500', yellow: '#FFFF00' }; function onSlide(e, ui) { var end_minute = ui.value; var start_mi…
has comment: http://stackoverflow.com/comment/40715480

http://stackoverflow.com/q/26004008
linked to: http://stackoverflow.com/q/32583854
upvote count: 3
answer count: 1
tagged with: jquery
tagged with: pan
favorite count: 0
has body: Im trying to work out how to make an image that is way bigger than the browser window (2000x2800px) scale when initializing jquery.panzoom. I need the image to resize itself so it will fit within the height of the container. Check out this jsFiddle: http://jsbin.com/raxejirubayu/1/edit?html,css,js,output Anyone with any experience using panzoom able to help me out? Virtual beers and highfives given in return.
tagged with: zooming
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27194032
score: 3
downvote count: 0
type: Question
has title: Resizing to fit height jquery.panzoom
tagged with: javascript
tagged with: resize

http://stackoverflow.com/comment/40500802
type: Comment
has text: And just to cover all bases: there is no need to check `x === z` because they both `=== y`.
comment on: http://stackoverflow.com/a/25879477
score: 0
type: AnswerComment

http://stackoverflow.com/q/25925438
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/25927314
tagged with: javascript
has title: ga('send', 'pageview', window.location.pathname);
upvote count: 1
has body: I am trying to figure out a way to load my pages quicker by creating a variable newHREF and then using the history.pushState('', '', newHREF); to push that link to the browser after the new content is loaded. That part works fine and I am happy with that. The problem I am having is that I am not able to track any of the new pages after the link is pushed to the browser. I was researching Google and found that I am able to use the ga('send', 'pageview', '/newpage'); so I created a variable named pathLink and set it to window.location.pathname. Now I want to know how to insert that pathname into the ga pageview send command. Can someone help me out? Thanks in advance
favorite count: 0
has comment: http://stackoverflow.com/comment/40605500
tagged with: google-analytics
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25927314

http://stackoverflow.com/comment/40684827
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25981743
has text: Try adding a `complete` callback and `error` callbacks as well as your `success` one. The request might have an error code.
type: AnswerComment

http://stackoverflow.com/q/26023031
type: Question
answer count: 2
tagged with: javascript
tagged with: jszip
tagged with: ajax
has title: cannot add multiple files using JSZip
has body: I am using JSZip to generate a zip containing multiple files. The data is coming from the server in JSON format. I am only getting 2 files inside the for loop instead of multiple files. The size of the array of JSON is more than 2 so I expect multiple files not just 2. var zip = new JSZip(); var root = data.list.dataList; var length = root.length; var i; for(i = 0; i &lt; length; i++){ var aFileName = "a_"+ root[i].type + "_" + root[i].orderNumber + ".xml";//just the name of the file var aContent = root[i].content; //content of file var bFileName = "b_"+ root[i].type + "_" + root[i].orderNumber + ".xml";//just the name of the file var bContent = root[i].content; //content of file //put files onto a folder zip.folder("Folder Name").file(aFileName, aContent).file(bFileName, bContent); } //generate the zip with all files var content = zip.generate(); location.href="data:application/zip;base64," + content; can someone please suggest an alternative since this code only take the content of the last iteration. This is why I can only get 2 files instead of multiple files.
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26024208
has answer: http://stackoverflow.com/a/27053428
linked to: http://stackoverflow.com/q/17986432

http://stackoverflow.com/q/25923750
tagged with: node.js
has answer: http://stackoverflow.com/a/25923926
score: 2
type: AnsweredQuestion
has body: Currently I'm trying to understand how BDD DSL works in Mocha and I'm stuck. I'd like this approach and want to apply this. For example, the following test: describe('foo', function(){ describe('bar', function(){ it('should be something') }); }); will produce output: foo bar - should be something 0 passing (4ms) 1 pending Question: how invocation of global function describe in nested block determined as nested? I looked at source code, but can't handle the main idea right now.
has title: How Mocha determines nesting level?
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: mocha.js
has answer: http://stackoverflow.com/a/25923980
favorite count: 0
tagged with: dsl
upvote count: 2
accepted answer: http://stackoverflow.com/a/25923980
possible better answer: http://stackoverflow.com/a/25923926

http://stackoverflow.com/comment/40659639
score: 1
comment on: http://stackoverflow.com/q/25967991
has text: Could you also post your HTML. Have you checked the console for any errors? Also, `form` will be a jQuery object, so you don't need to wrap it again - eg. you can just use `form.serialize()` instead of `$(form).serialize()`, although that isn't causing this problem.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25918914
has body: I need to create a javascript regular expression that will capture the "word" that comes before a single or double :. Here are some examples: *, ::before, ::after // do not capture anything .class1, .class2:before,.class3::after // captures .class2 and .class3 .class4::before // captures .class4 This is what I have right now: /(\S+?):/g. It matches any non-white space character one to infinity times as few times as possible, then stops at a :. This works except: If there is no space before the "word", it captures too far. It captures the first colon of ::before and ::after.
has title: Capture word before a specific character
has comment: http://stackoverflow.com/comment/40572563
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25919100
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25919100
score: 1
has comment: http://stackoverflow.com/comment/40573204
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25919092
tagged with: regex
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/25919092

http://stackoverflow.com/comment/40668966
type: QuestionComment
has text: @artm check in the console for the list that are outside of the viewport you will find they are also having the attribute `src` cording to the logic only the images that are in viewport should have src tag
type: Comment
comment on: http://stackoverflow.com/q/25973098
score: 0

http://stackoverflow.com/a/25922898
has comment: http://stackoverflow.com/comment/40580057
type: Answer
has body: Your a element is empty: Move the div inside it, and it should work:
answers question: http://stackoverflow.com/q/25922784
score: 0

http://stackoverflow.com/comment/40500821
score: 0
has text: just edited, I tried making the purpose more clear
type: QuestionComment
comment on: http://stackoverflow.com/q/25879413
type: Comment

http://stackoverflow.com/comment/40516051
type: Comment
comment on: http://stackoverflow.com/a/25887884
has text: @Karim Daraf: I think you get the idea now and can probably change the logic to suit your needs :) I suggest simplifying the naming and divs so that it is clear what needs to be hidden/shown. I would have done that but I would have had to change all the names to English so they would have meaning to me. (*If not my hourly rate is £60 GBP* :>)
type: AnswerComment
score: 0

graphael
tag name: graphael
type: Tag
tags question: http://stackoverflow.com/q/25942383

http://stackoverflow.com/comment/40681900
comment on: http://stackoverflow.com/q/25980224
score: 0
type: Comment
type: QuestionComment
has text: Please share with us what you have tried.

http://stackoverflow.com/a/26002375
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26002311
has comment: http://stackoverflow.com/comment/40723146
has comment: http://stackoverflow.com/comment/40723250
upvote count: 2
has comment: http://stackoverflow.com/comment/40722865
has comment: http://stackoverflow.com/comment/40722152
type: Answer
has comment: http://stackoverflow.com/comment/40722501
has comment: http://stackoverflow.com/comment/40722108
has body: :not() is a CSS3 selector, and as such is available via querySelector[All] in modern browsers. alert(document.querySelector("#firstDiv :not(b)").innerText.trim()); Item 1: tacos I've also wrapped the "tacos" in a to facilate access, and changed the selector to select descendants that aren't s.
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26002311
has comment: http://stackoverflow.com/comment/40722457

http://stackoverflow.com/comment/40606776
type: Comment
type: QuestionComment
has text: http://www.polymer-project.org/docs/polymer/polymer.html#declarative-event-mapping
comment on: http://stackoverflow.com/q/25938024
score: 0

http://stackoverflow.com/a/26025331
has comment: http://stackoverflow.com/comment/40764621
type: Answer
has comment: http://stackoverflow.com/comment/40765621
has comment: http://stackoverflow.com/comment/40765247
has comment: http://stackoverflow.com/comment/40766267
has comment: http://stackoverflow.com/comment/40764937
score: 0
accepted answer of: http://stackoverflow.com/q/26025115
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26025115
has body: use onblur event and call a function in that function you may use validations &lt;input id="a" onblur="fun(this);"&gt; &lt;script&gt; function fun(ab){ alert(ab.value); } &lt;/script&gt; jsbin example The above code snippet uses onblur event of input Answer Updated Use blur instead of keyup in event &lt;input type="text" id="EmailField" name="Email" placeholder="Email" data-val="true" data-bind="value:email, event: { blur: validateEmail, valueUpdate: 'afterkeydown'}" required=""&gt;

http://stackoverflow.com/a/25959078
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25958975
answers question: http://stackoverflow.com/q/25958975
type: Answer
has body: Make the attribute optional First, be sure to make the attribute optional. With your current code, if your directive is used like that… &lt;!-- Notice the absence of attribute --&gt; &lt;my-element&gt;&lt;/my-element&gt; … then AngularJS will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception as soon as you'll try to set a value to $scope.myAttribute. So, as said in the documentation, add an interrogation point in your scope definition: scope: { myAttribute: '=?', }, Define the default value Then, you can simply set the default value in your controller: controller: function ($scope) { if (angular.isUndefined($scope.myAttribute)) { $scope.myAttribute = true; } },

http://stackoverflow.com/comment/40750616
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26017613
has text: @Arun P Johny: Noted in revised comment and used your suggestion for 3rd option below. Thanks.
score: 0

http://stackoverflow.com/comment/40769119
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26027850
type: Comment
has text: Originally I had navigator.geolocation.getCurrentPosition(function(position) {...} get the coordinates outside of init() but after placing it inside, it worked.

http://stackoverflow.com/comment/40709832
type: Comment
comment on: http://stackoverflow.com/a/25995538
has text: how come these are two different strings ? `alert(escape('i') == escape('i̇'));` all I'm seeing is both the letter i inside single quote. I did typed them 'i' both by hand. So that is what I want to know, why did they become two different character, what went wrong where?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40524349
type: Comment
comment on: http://stackoverflow.com/a/25892538
has text: That is what I'm looking for. I originally was playing around with overflow: hidden and the slideToggle and few things, but was having trouble with it hiding that extra part of the menu. Was probably something else in my CSS tripping me up. I'll play around with this and let you know, thanks @Anush
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40770975
type: QuestionComment
score: 0
has text: @bobeartow You really wanted to change or just hide the image and show the p instead?
comment on: http://stackoverflow.com/q/26029014
type: Comment

http://stackoverflow.com/a/26008196
answers question: http://stackoverflow.com/q/26008088
has comment: http://stackoverflow.com/comment/40734375
has comment: http://stackoverflow.com/comment/40733655
has comment: http://stackoverflow.com/comment/40734256
type: Answer
score: 0
has body: If you are using jQuery this should work: $(window).on('unload', function(){ window.location.hash = ''; }); It still leaves the '#', but nothing after. If you don't want to use jQuery, you can use this code: window.onunload=function(){ window.location.hash = ''; }

http://stackoverflow.com/comment/40730705
type: Comment
type: QuestionComment
score: 0
has text: thank you marcin nabialek, can you elaborate with the code because i'm new programmer.
comment on: http://stackoverflow.com/q/25988748

http://stackoverflow.com/comment/62617973
comment on: http://stackoverflow.com/a/34211851
type: AnswerComment
score: 0
type: Comment
has text: This works, but the padding makes it look bad. Wish there was a solution that made it work without the padding bloat.

http://stackoverflow.com/comment/40525505
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25892893
score: 0
has text: If anyone can give me a sample of how to use jquery to build a table with a row and a couple of columns using data from a PHP script I can probably make it all work. But the data parsed by the PHP script will need to determine for example the highlighting of a table row or not.

http://stackoverflow.com/q/25971241
answer count: 3
has title: How to get a particular event in a function
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25971775
has body: I am trying to understand how can I get a particular event in a function. Below is my HTML code: &lt;select id="mySelect" multiple="multiple" width="50"&gt; &lt;/select&gt; Remove Item&lt;input type="button" id="removeItem" value="click" disabled="disabled"/&gt; My jQuery function looks like: $('#removeItem').click(function() { // $('option:selected', this).remove(); console.log(this); $(this).find('option:selected').remove(); }); Above, when I do a console.log(this), it actually prints element for "removeItem": &lt;input type="button" id="removeItem" value="click"&gt; However, within the function, I want a reference to "mySelect" (my selectBox), so that I can execute something like: $('option:selected', this).remove();
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25971272
tagged with: javascript
has answer: http://stackoverflow.com/a/25971998
score: 0

http://stackoverflow.com/a/26003234
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26003053
answers question: http://stackoverflow.com/q/26003053
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: What you have should be working. Yes, running [...].style.display = "none"; does not change the server-stored HTML; however, when you check for that same property, ([...].style.display == "none") you are checking the inline styles, which are set by the first line. For example, running document.getElementById("aDiv").style.display = "none"; Will set the inline style property of #aDiv: JSFiddle

http://stackoverflow.com/comment/40715503
has text: Whether it's correct depends on how it's intended to be used. Your code example is correct, but it would be just as correct to do `fn2("foo")`. The `fn2()` doesn't care where its argument comes from. In your case it's coming from the return value of the `fn1()` invocation. The `fn1` function itself is not being passed.
comment on: http://stackoverflow.com/q/25998887
type: Comment
score: 2
type: QuestionComment

http://stackoverflow.com/comment/40528760
score: 1
comment on: http://stackoverflow.com/q/25895258
type: Comment
type: QuestionComment
has text: Happens! Instead of `.replace` try setting it to `window.location.href` instead

http://stackoverflow.com/comment/40625381
type: Comment
type: QuestionComment
score: 3
has text: [`clearInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.clearInterval) expects an `intervalId`, which `setInterval()` provides as its `return` value, rather than the `function` that was bound to the interval.
comment on: http://stackoverflow.com/q/25949236

http://stackoverflow.com/q/25977784
has comment: http://stackoverflow.com/comment/40677232
accepted answer: http://stackoverflow.com/a/25977940
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40677241
linked to: http://stackoverflow.com/q/370359
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40677260
has comment: http://stackoverflow.com/comment/40677296
has comment: http://stackoverflow.com/comment/40677176
has comment: http://stackoverflow.com/comment/40677217
has answer: http://stackoverflow.com/a/25977940
type: AnsweredQuestion
has title: How to pass method parameter?
has comment: http://stackoverflow.com/comment/40677344
has comment: http://stackoverflow.com/comment/40677262
upvote count: 1
has comment: http://stackoverflow.com/comment/40699283
downvote count: 1
type: Question
has body: var rF = function(callback) { alert("there2222"); //additional calls $(document).trigger("lc", [callback]); }; var pSl = function(callback) { var func = pSR; // how to pass callback parameter in function rF(func); }; var pSR = function(callback, vars) { alert(callback); alert(vars); }; $(document).on("lc", function(e, callback) { alert("theaaa"); alert(callback, "ssss"); }); $('img').click(function() { pSl("lol"); });

http://stackoverflow.com/q/25930715
type: Question
tagged with: javascript
has title: How can i increse the height / depth of the shapes using ExtrudeGeometry in Three js
score: 0
answer count: 1
tagged with: height
has answer: http://stackoverflow.com/a/25937458
tagged with: geometry
has body: i am using three js to draw a line , actually i need to draw this like a wall but i ill get single line like paper i am unable to increase the height of the code my code is as follows : var shape1 = new THREE.Shape(); shape1.moveTo(v1,v2); shape1.lineTo(v1,v2); shape1.bezierCurveTo(v1,v2,v3,v4,v5,v6); var extrusionSettings = { curveSegments:0, steps: 0, amount: 0, bevelEnabled: true, bevelThickness: height, bevelSize: 1, bevelSegments: 8, material: 0, extrudeMaterial: 1 }; var geometry1 = new THREE.ExtrudeGeometry( shape1, extrusionSettings ); using this i can able to get the line like the attached image now i need this line like a wall .using extrusionSettings options i am unable to change the width.if i change bevelSize means its look like a curved one. how can i do this ?
type: UnansweredQuestion
tagged with: three.js
tagged with: shapes

http://stackoverflow.com/comment/66551105
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25941739
has text: Now that the preferred value for the `ref` attribute is a callback (see the [`ref` Callback Attribute docs](https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute)), it's misleading to show an example of accessing descendants' `refs`. That will likely break in a future version of React.

http://stackoverflow.com/comment/62132363
comment on: http://stackoverflow.com/a/25962978
score: 9
type: AnswerComment
type: Comment
has text: Beginners never try doing anything like this. These are bad practices to be avoided. As long as both are referenced by the web page, yes. You simply call the functions as if they are in the same JS file.

http://stackoverflow.com/comment/40728307
has text: possible duplicate of [How to get folder directory from HTML input type "file" or any other way?](http://stackoverflow.com/questions/12942436/how-to-get-folder-directory-from-html-input-type-file-or-any-other-way)
comment on: http://stackoverflow.com/q/26005480
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40603171
has text: @Pete Even so, it *does* appropriately answer the OP's question. Edit: Your edit covered that :)
comment on: http://stackoverflow.com/q/25936148
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25951111
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25948645
answers question: http://stackoverflow.com/q/25948645
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40632503
has body: You can't but you get a target reference which is the clicked element passed with the event. &lt;core-icon-button icon="icons:delete" on-click="{{showMore}}" some-data="{{val}}"&gt;&lt;/core-icon-button&gt; and in the event handler you can read the some-data attribute from target, which is the bound val. (I use this only know this from Dart but I'm sure you'll find a code example how the syntax has to look like exactly.) You can also access the templateInstance e.target.templateInstance.model.&lt;property&gt; where property would be val according to the example above. See http://www.polymer-project.org/resources/faq.html#templateinstancemodel for more details.

http://stackoverflow.com/comment/40570717
comment on: http://stackoverflow.com/q/25918148
has text: possible duplicate of [Calling dynamic function with dynamic parameters in Javascript](http://stackoverflow.com/questions/676721/calling-dynamic-function-with-dynamic-parameters-in-javascript)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40651000
comment on: http://stackoverflow.com/q/25963359
has text: when #x click, disable myfunction()
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25902000
has comment: http://stackoverflow.com/comment/40566562
has title: jQuery mobile style is lost when i change view with Backbone
answer count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40542393
type: UnansweredQuestion
has body: I'm using require.js, jquerymobile, backbone and handlebars. I have a cordova multi-view app. When I change view in my app, i fire the event with: Backbone.history.navigate("page", {trigger: true}); In my router page, I have kinda: routes: { "page": "page", }, initialize: function () { this.currentView = undefined; var page; page = new Login(); this.changePage(page); }, page: function () { var myview = new View({}); this.changePage(myview ); }, changePage: function (page) { if(this.currentView) { this.currentView.remove(); this.currentView.off(); } this.currentView = page; page.render(); } When i change page, the template is loaded but it is like jquerymobile style is lost. JQM is included the first time in my main.js file, after the require.config, where I launch the router.
tagged with: backbone.js
type: Question
has comment: http://stackoverflow.com/comment/40686548
tagged with: requirejs
has comment: http://stackoverflow.com/comment/40553107
score: 0

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/26000192
type: Tag

http://stackoverflow.com/comment/40711140
comment on: http://stackoverflow.com/q/25995737
type: Comment
type: QuestionComment
has text: @TrueBlueAussie: Already linked to the plugin (in a previous comment), and the "new" code is at the bottom (and commented) of the jsfiddle. ;-)
score: 0

http://stackoverflow.com/q/26008622
tagged with: javascript
tagged with: jquery
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/26008843
type: UnansweredQuestion
upvote count: 1
has title: html5 tags with ng-repeat
score: 1
has body: Trying to get draggable="true" onto a tag while creating a directive with angularjs. The ng-repeat seems to not allow it to render? angular.module("dragApp", []) .controller "DragCtrl", ($scope)-> $scope.teamMembers =[ { name: "Moe", pic: "https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xpf1/v/t1.0-9/10325183_10152504984116189_3762377112286239452_n.jpg?oh=64e01b1da81432362dcab98cecb0c01c&oe=54C902AC&__gda__=1421608147_ded25febd4716ec3b3d9593aacb505cb" } { name: "Jack", pic: "https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xfp1/v/t1.0-9/1977155_10152328488946189_414460480_n.jpg?oh=f3f5772957ec826711f5e4de544b4920&oe=5483B18B&__gda__=1421730769_cde9a341e521dae06b84ce6f65f88803" } { name: "Joe", pic: "https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-ash2/t31.0-8/921299_10152077464151189_214902483_o.jpg" } ] .directive "dragObject", ()-> return { restrict: "E", scope: { member: "&" }, link: (scope, element, attrs)-> element.attr("draggable", "true") attrs.draggable = "true" element.bind "dragstart", (event)-> if event.preventDefault() then event.preventDefault() event.dataTransfer.setData("teamMember", scope.member.name) console.log attrs # console.log element.attr("draggable") # attrs.$observe "draggable", (event, event2)-> # console.log event } .directive "dragTarget", ()-> return { restrict: "EA", link: (scope, element, attrs) -> element.bind "dragenter", (event)-> console.log event event.preventDefault() element.bind "drop", (event)-> console.log event teamMember = event.dataTransfer.getData("teamMember") console.log teamMember } html: Drag me {{member.name}} Drag me Here is the JSBIN: http://jsbin.com/kupasi/1/edit?html,js,output
type: Question
answer count: 1
downvote count: 0

axes
tag name: axes
type: Tag
tags question: http://stackoverflow.com/q/25920201

http://stackoverflow.com/comment/40760527
type: Comment
has text: What are you trying to add that you can't add to the `array`? Post code of what you're trying to actually do.
score: 0
comment on: http://stackoverflow.com/q/26023450
type: QuestionComment

http://stackoverflow.com/a/25896978
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/25896803
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25896803
score: 3
has body: You already have the IDs, just need to add them to the list items like so $(document).ready(function () { groups = $('[id^=id_2_class_]'); groups.each(function (index) { inputs = $(this).attr('id'); $('.flex-control-nav').find('li').eq(index).addClass(inputs); }); }); http://jsfiddle.net/jvqq23kv/ Basically just go through each li and add the class
type: AcceptedAnswer

http://stackoverflow.com/comment/40500661
has text: What do you mean by "the collection?"
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25879374

http://stackoverflow.com/comment/40639258
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25957098
has text: "random" means not predictable, how would you know that your program will ever finish? In theory, it could choose the same numbers over and over again.

required
tag name: required
tags question: http://stackoverflow.com/q/26008056
type: Tag

http://stackoverflow.com/comment/40663765
comment on: http://stackoverflow.com/a/25970311
type: AnswerComment
has text: Add this script to your child page.
score: 0
type: Comment

http://stackoverflow.com/comment/40516850
comment on: http://stackoverflow.com/q/25888279
score: 0
type: Comment
has text: It's basic HTML markup, you should have known about it
type: QuestionComment

http://stackoverflow.com/comment/40678205
type: Comment
has text: Where did you put the `noConflict` call?
comment on: http://stackoverflow.com/q/25978277
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40562852
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25913154
score: 1
has text: SOLUTION: Use Packery instead. http://jsfiddle.net/7ZVb7/2816/

http://stackoverflow.com/q/25899698
tagged with: javascript
score: 0
tagged with: events
has comment: http://stackoverflow.com/comment/40537781
answer count: 0
type: UnansweredQuestion
has body: I have, what I think, to be a fairly trivial example of doing what I think might be the Observer pattern while using Node's EventEmitter. That said, I'm still getting my sea legs with Node. When I reviewed this with another developer - it appears right but seems slightly weird. The weird part is how the LightBulb object is listening to the LightSwitch object. AFAIK, the code works but I feel like I'm doing this wrong. /*jslint node: true */ 'use strict'; var events = require('events'); var util = require('util'); var LightSwitch = function(state) { var self = this; self.state = typeof state !== 'undefined' ? state : 'off'; }; util.inherits(LightSwitch, events.EventEmitter); LightSwitch.prototype.changeState = function() { var self = this; // FIXME use if else if (self.state == 'on') { self.state = 'off'; self.emit('off'); } else if (self.state == 'off') { self.state = 'on'; self.emit('on'); } }; var LightBulb = function(LightSwitch) { var self = this; self.state = 'off'; self.switch = LightSwitch; self.switch.on('on', function() { self.state = 'on'; }); self.switch.on('off', function() { self.state = 'off'; }); }; LightBulb.prototype.currentState = function() { var self = this; console.log('The switch is ' + self.switch.state); console.log('The light bulb is ' + self.state); console.log('\n'); } var hallwayLightSwitch = new LightSwitch(); var hallwayLightBulb = new LightBulb(hallwayLightSwitch); // Default! console.log('--------- EVERYTHING IS OFF --------------'); console.log('Switch is ' + hallwayLightBulb.switch.state); console.log('Bulb is ' + hallwayLightBulb.state); console.log('\n'); // Flick it! console.log('------------ LIGHTS ON! ------------------'); hallwayLightSwitch.changeState(); hallwayLightBulb.currentState(); // Flick it - again! console.log('------------ LIGHTS OFF! -----------------'); hallwayLightSwitch.changeState(); hallwayLightBulb.currentState(); // And, flick it - again! console.log('------------ LIGHTS ON! -----------------'); hallwayLight…
tagged with: node.js
has title: Node Event Emitter Example
has comment: http://stackoverflow.com/comment/40540285
tagged with: observer-pattern
type: Question

http://stackoverflow.com/q/25910522
score: 15
upvote count: 15
accepted answer: http://stackoverflow.com/a/25910678
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has body: I'd like to add a click event to an element with a directive. The important part is to not define the button or hyperlink or whatever in the directive but only the onClick attribute and the function, that is called. So the HTML looks something like this: test My directive looks like this: .directive('myDir', function(){ return { restrict: 'A', scope: true, link: function(scope, element, attrs) { scope.functionToBeCalled = function(){ console.log("It worked!"); } } } }) I have tried adding a "click" like this: element.bind('click',scope.functionToBeCalled()); Unfortunately this calls the function once when link is called, but not when the button is clicked. I think I have to use compile rather than link and move the functionToBeCalled into the function returned by compile. Sadly I don't know how to accomplish that. Thanks for your help!
type: Question
has title: AngularJS - Adding an onClick event to a Button via a Directive
tagged with: javascript
has answer: http://stackoverflow.com/a/25910678

http://stackoverflow.com/comment/40667570
comment on: http://stackoverflow.com/q/25972338
score: 0
type: Comment
type: QuestionComment
has text: Suggestion: If you are going to use jQuery at all, you should use it for the rest of your code too (and shorten it a lot): e.g. `document.getElementById("search_box").value` becomes `$('#search_box').val()`

http://stackoverflow.com/comment/40982591
type: QuestionComment
has text: The vegas plugin is completely a different concept
comment on: http://stackoverflow.com/q/25980346
score: 0
type: Comment

http://stackoverflow.com/comment/40610289
comment on: http://stackoverflow.com/q/25939947
has text: is indexOf('hola') > 0 not good enough?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25998099
tagged with: onclick
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/40714068
accepted answer: http://stackoverflow.com/a/25998379
possible better answer: http://stackoverflow.com/a/25998305
score: -2
has answer: http://stackoverflow.com/a/25998305
has comment: http://stackoverflow.com/comment/40714107
answer count: 2
upvote count: 0
has title: set a stopwatch to stop at a certain number of clicks javascript
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25998379
tagged with: stopwatch
has body: I would like to know how you can create a stopwatch on javascript to start when the button is clicked and then to stop when it reaches 25 clicks and then show the time. Here is my current code: &lt;script&gt; var test= 1; function myFunction(){ if(test &lt; 26){ document.getElementById("hello").innerHTML= test; test++; } } &lt;/script&gt; This code counts up to 25 but I want it to count up to 25 with the stopwatch on starting at the first click and finishing on 25 and then showing the time. Thanks
type: AnsweredQuestion

graph
tags question: http://stackoverflow.com/q/26027367
tags question: http://stackoverflow.com/q/25962303
tag name: graph
tags question: http://stackoverflow.com/q/25890616
tags question: http://stackoverflow.com/q/25906119
tags question: http://stackoverflow.com/q/25996229
type: Tag

http://stackoverflow.com/comment/40579249
score: 1
type: Comment
type: QuestionComment
has text: `if (myArray[i][property].indexOf(searchTerm) != -1) return i;`
comment on: http://stackoverflow.com/q/25922521

http://stackoverflow.com/q/25894446
tagged with: css
tagged with: video
type: AnsweredQuestion
has body: I'm working on a website here and I have discovered the video.js plugin for the next part of my project. I have done everything exactly as the video.js site said to do in order to get it to set up on the page properly, and even moved external file links around on the page, and that didn't affect anything. I just want to be able to style it so that it looks similar to the website that it is on. Sample code below. Also I'm using bootstrap 3.0 I don't know if that is a problem. <link rel='stylesheet' type='text/css' href='<?=$up_level?>assets/css/bootstrap.css'> <link rel='stylesheet' type='text/css' href='<?=$up_level?>assets/video-js/video-js.css'> <script type='text/javascript' src='<?=$up_level?>assets/js/bootstrap.min.js'> <script type='text/javascript' src='<?=$up_level?>assets/video-js/video.js'> for other references the <?=$up_level?> is just a directory level calculator. There is no problem with that function. Also I have double and triple checked the video-js folder is in its proper directory location, and is loading. So again just to recap, using the video.js extension, it isn't letting me style anything, or overwrite the normal html5 styles. How do I fix this?
score: 0
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25895208
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25895208
has title: Video.js styles not overriding default video styles

http://stackoverflow.com/comment/40595373
type: AnswerComment
type: Comment
has text: Well ignore the ng-include for now as that's not really relevant to the question. The main issue is that I don't seem to be able to nest ui-views... so home.mac and home.iphone would have exactly the same issue as what I am having now... Unless you can show an example?
score: 0
comment on: http://stackoverflow.com/a/25931290

http://stackoverflow.com/q/25940227
possible better answer: http://stackoverflow.com/a/64484638
favorite count: 0
has answer: http://stackoverflow.com/a/64484638
tagged with: http://stackoverflow.com/tag/svg
upvote count: 5
downvote count: 0
has title: Create multiple lines of text with Snap.svg
has body: I have not been able to figure out how to create multiple lines of text with a single paper.text element in Snap.svg. I have tried using the techniques mentioned for raphael.js, such as \n, but that doesn't do a thing for snap.svg. I have tried using , \n, and variations of that, but nothing works. I find it odd that it is so easy to do in raphael.js, (it's in the documentation), but yet snap.svg docs don't mention anything about this, and searching the web I found nothing. Help would be very appreciated, thank you! http://jsfiddle.net/f3mkqovm/ var myRect = paper.text(100, 100, ["Lorem", "&lt;br&gt;","ipsum dolor sit \n amet /n see ", "\n","amend"]).attr({ fill : 'black' }); EDIT: Here is a jsfiddle where \n is working for raphael. Since snap.svg is not built into jsfiddle, I don't know that the other fiddle will help anyone much. http://jsfiddle.net/yf8364mp/
type: AnsweredQuestion
type: Question
answer count: 2
score: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/25943857
accepted answer: http://stackoverflow.com/a/25943857

http://stackoverflow.com/comment/40708874
comment on: http://stackoverflow.com/q/25994012
has text: How are you referencing the css/js in your `login-fail.html`? Also, you should probably move your `invokeOptions` variable declaration to inside your initial request handler to prevent multiple requests from using the same object.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40590429
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25927478
has text: Try to check for error simply Auth.is_authenticated().success(function(data){}).error(function(reason){console.log(reason);})

http://stackoverflow.com/comment/40548953
comment on: http://stackoverflow.com/q/25905046
has text: Is the outputPct is the compression ratio. I mean is the outputPct means that outputPct*100 is percentage of compression?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40734999
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26009482
score: 0
has text: Try using document.getElementById(a).style.display="block";

http://stackoverflow.com/comment/40604399
has text: Thank you this is a great suggestion. However, I want to display information on the page based on some of the other properties of the selected SKU. Can this be done if the model only contains the ID? Would I need to use `ng-change` on the select to update the SKU information displayed on the page?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25936299

http://stackoverflow.com/comment/40650286
comment on: http://stackoverflow.com/q/25955894
score: 0
type: Comment
type: QuestionComment
has text: Work for you but don't work for me. print_r($_POST) don't print anything, prints a empty array. Print Array ( )

http://stackoverflow.com/q/25906084
has comment: http://stackoverflow.com/comment/40553429
has comment: http://stackoverflow.com/comment/40548662
type: Question
has comment: http://stackoverflow.com/comment/40548589
has comment: http://stackoverflow.com/comment/40548617
tagged with: javascript
has comment: http://stackoverflow.com/comment/40553584
tagged with: jquery
score: 1
has comment: http://stackoverflow.com/comment/40553682
tagged with: asp.net
favorite count: 0
has body: i was having a problem in searching for some example for make a page dynamic or adjustable on front end can any one help me in this please for eg on front end a client wants to adjust the links from one place to another or can chage backgrounds looks like fonts + background color + placement of divs etc can any one help me in doing so or can anyone help me with example on internet which solves my problem i will be thankfull to you....... little code <asp:Button ID="Button1" runat="server" Text="Button" /> <asp:Button ID="Button2" runat="server" Text="Button" /> <asp:LinkButton ID="LinkButton2" runat="server">LinkButton</asp:LinkButton> <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> here i am handling a major div div1 and child divs div1.1,div1.2,div1.3,div1.4 and i want to change place of these child divs
has comment: http://stackoverflow.com/comment/40553299
has comment: http://stackoverflow.com/comment/40548598
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40552585
has comment: http://stackoverflow.com/comment/40548415
has comment: http://stackoverflow.com/comment/40553617
has comment: http://stackoverflow.com/comment/40552569
has comment: http://stackoverflow.com/comment/40553345
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40553474
has comment: http://stackoverflow.com/comment/40553948
downvote count: 1
has title: searching for some example for make a page dynamic or adjustable on front end
has comment: http://stackoverflow.com/comment/40552822

http://stackoverflow.com/comment/40933831
has text: Thanks, this works well. The only problem is that I'm applying classes with WebKit animations and whenever i scroll out of the screen and back again the class seems to be reapplied and the animations then begin again. Is there any way to stop this?
score: 0
comment on: http://stackoverflow.com/a/26044057
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25991843
tagged with: javascript
answer count: 1
favorite count: 0
has body: Let's suppose a web page located at /items, listing all the available items. When the user clicks on one item, the browser shows /items/:itemId and present the item's details. Of course, the items list could be very large. That's why I'm using the scroll infinite feature from Ionic (Framework I'm using based on Angular). However, as many developers know, handling the "back button" from /items/:itemId to /items is tricky since the Angular's controller is destroyed during the page transition and then rebuilt when the list page is loaded again. Therefore losing the scroll position and the exact items already loaded before clicking on an item's detail. I think about some solutions, but I hesitate since all have a "drawback": Storing the actual loaded items (the complete items) in $cacheFactory (Angular's cache or localStorage) just before the item details is about to be shown. Thus, when the back button is pressed (on the detail page), the /items's controller can init the data from the cache, and besides the scroll position could then be easily "remembered". Drawback is that the data in cache may be stale... "No need to store any loaded items in cache!" Just store in cache or localStorage the actual number of chunks loaded. For instance, my REST API allows to retrieve items 10 by 10. If the user's was loaded up to the second chunk (up to 20 elements so), a variable in cache would contain this value and the controller could then be init with all the 20 items initially. Drawback is that it would involve several requests to server. Indeed, if the user loaded 30 chunks, the controller would need to make 30 calls to server... I could customize the size of chunk processed by the server, but one item is heavy (several long texts etc.. lists of anything), explaining why I limited to a relatively small number. Using a bidirectional scrolling (top and bottom), so that there's ALWAYS 10 items in the DOM. I would just need to store the last number of chunk already loaded, in order …
tagged with: angularjs
has answer: http://stackoverflow.com/a/25993098
type: UnansweredQuestion
tagged with: web-applications
score: 2
downvote count: 0
tagged with: scroll
tagged with: ionic-framework
type: Question
upvote count: 2
has title: AngularJs / Scrolling infinite and back button

http://stackoverflow.com/comment/40638505
type: QuestionComment
has text: Please submit your comment as a answer and I'll accept it.
comment on: http://stackoverflow.com/q/25956366
score: 0
type: Comment

http://stackoverflow.com/a/25875383
has comment: http://stackoverflow.com/comment/40493791
has comment: http://stackoverflow.com/comment/40492852
has comment: http://stackoverflow.com/comment/40493561
has comment: http://stackoverflow.com/comment/40493313
score: 0
answers question: http://stackoverflow.com/q/25875168
has body: May be I don't understand well, but You want provide some JavaScipt modules/classes/objects through HTML5 attribute??? I think it's bad design. It's seems to be mixin of distinct layers. So technically U have just ONE ability - to call eval, even after your PS because eval is the only point where JavaScript can get other JavaScript from String - ONLY. But if U want dynamically load some complex javascript as reaction to data in some elements it's very good idea to learn and apply most ultimate thing for such scenarios - well-old-knownn require.js http://requirejs.org/. And if you want hardly bind DOM with some data and behavior you must to learn some of MVC JavaScript solutions - AngularJS, Backbome, Amber and so on. By design u have to split your application to presentation layer where DOM will live and business layer were JavaScript will live. To bind them to each other you use string/JSON descriptors in DOM attribute and load JavaScript dynamically using on-fly head rewriting or by XHR+eval, such design is asynchronous, quick and is main choise of all solid network-based applications from gmail to all-other-cool-staff. To help build application with such model - require.js is best and most known helper.
has comment: http://stackoverflow.com/comment/40493258
type: Answer

http://stackoverflow.com/comment/40672826
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25975471
has text: You are trying to what all of the pop up ads did in the 90's! So `window.focus()` did not work? Show what you tried.
score: 0

http://stackoverflow.com/a/25923373
has body: When you use the overload @Html.EditorFor(model =&gt; model.latitude, null, "mylatitude", .. The 3rd parameter is setting the name attribute to mylatitude which does not match the property name latitude so the DefaultModelBinder cannot match up the values. Why can't you use the ID generated @Html.EditorFor(model =&gt; model.longitude, .. which will be "longitude", or use TextBoxFor and add the relevant class names so that it is styled to look the same as the output generated by @Html.EditorFor
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25922382
type: Answer
answers question: http://stackoverflow.com/q/25922382

http://stackoverflow.com/comment/40730860
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26004936
has text: Wow. This was a *bad* day. I've got half a dozens of grids in my app and could not spot that. Thanks.
type: AnswerComment

http://stackoverflow.com/comment/40645077
has text: Are you using Express framework for your application?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25957449
type: Comment

http://stackoverflow.com/comment/40620384
type: Comment
comment on: http://stackoverflow.com/a/25935075
has text: @Rick if you click the link, it'll obviously follow it, unless you `preventDefault()`.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25912709
has comment: http://stackoverflow.com/comment/40560926
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25912866
has answer: http://stackoverflow.com/a/25912954
upvote count: 3
has comment: http://stackoverflow.com/comment/40560565
has body: I'm at a brick wall. I have a little project: (LINK HAS BEEN REMOVED) You can see lots of horizontal scrolls, when you bring the browser down to mobile width, you can scroll horizontally. My problem is, how do I get it so that if you horizontally scroll one item, all the others will follow too? I have tried the following: $('.container').scroll(function(){ $('.container').scrollLeft($(this).scrollLeft()); }) But I'm getting nowhere fast. Any help would be appreciated. UPDATE Turns out it does work when you put the code into console AFTER the page has loaded. I resorted to: $(document).on('scroll', '.container', function(){ $('.container').scrollLeft($(this).scrollLeft()); }); UPDATE2 Big thanks to @George and everyone who answered to point me in the right direction. The tables are loaded with jQuery: $(this).next().load("/availability_Dev/availability_Dev.asp?stuff="+stuff+""); All I had to do was attach my scroll code after the elements were loaded, like so: $(this).next().load("/availability_Dev/availability_Dev.asp?stuff="+stuff+"", function(){ $('.container').scroll(function(){ $('.container').scrollLeft($(this).scrollLeft()); }); });
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40560818
tagged with: javascript
has title: simultaneously scroll multiple elements
answer count: 2
possible better answer: http://stackoverflow.com/a/25912954
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40560871
favorite count: 0
accepted answer: http://stackoverflow.com/a/25912866
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/40503284
score: 0
comment on: http://stackoverflow.com/q/25880903
has text: In general, the 'overflow' property controls the appearance of scrollbars, but as @SterlingArcher said, let us know what you've tried - and importantly in this case what browsers you are targeting.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40532249
has text: do you have control over these external websites? if not, the only way you can get the link that I know of is to actually load the page into js(without displaying to the user) and then parsing through it to get the image link you are looking for.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25879515

http://stackoverflow.com/q/25944490
has body: Hey I am using this javascript code below What this code does is fade in the page on the site for every link that is clicked. My problem is that I have a html5 music play that is written like this. TITLE OF SONG HERE This is an inline player. When you click the lay button or the title it's suppose to play on the same page. But I realize that the code above opens the link to the mp3 in the same window instead of playing it on the same page. Is there anyway I can get the code above to not conflict with anything on a certain page or in a certain class.
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25944531
has title: Stop Javascript from conflicting?
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25944856
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43283099
has text: It's best to use `Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1` for PhantomJS 1.x, because some sites use user agent sniffing to use specific network technologies or specific JavaScript that is not runnable in PhantomJS with its default user agent string.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25912941

http://stackoverflow.com/comment/40591451
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25928120
has text: second - You will need to set a different view for your ajax.

http://stackoverflow.com/a/25941095
answers question: http://stackoverflow.com/q/25940681
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your need to modify your filter like shown below and your html snippet too. You can apply the filter not whole items but each title. Below is the demo: angular.module('selectFilters', ['filters']); angular.module('filters', []).filter('htmlToPlaintext', function() { return function(text) { return String(text).replace(/<[^>]+>/gm, ''); } }); function ItemCtrl($scope, $filter){ $scope.Items = [ {ID: '000001', Title: 'Chicago'}, {ID: '000002', Title: 'New York'}, {ID: '000003', Title: ' Washington '} ]; }
accepted answer of: http://stackoverflow.com/q/25940681
upvote count: 7
score: 7

http://stackoverflow.com/comment/40702408
type: QuestionComment
type: Comment
has text: Tried @zvona's solution? It should refer to the opener already. If your solution works you should post it as a new question and answer it: "How to defend against UXSS".
comment on: http://stackoverflow.com/q/25933389
score: 0

http://stackoverflow.com/q/25889813
score: 2
tagged with: syntax
has comment: http://stackoverflow.com/comment/40522257
type: Question
has body: First off, I am a complete novice. I have just started learning programming today and I am trying to learn jQuery. But in order to use jQuery I have had to get bower and npm (node), which has been a confusing ordeal. So I downloaded node: Node was installed at /usr/local/bin/node npm was installed at /usr/local/bin/npm Make sure that /usr/local/bin is in your $PATH. Then I read: Install Bower globally using NPM. npm install -g bower Which I tried doing in Chrome with Javascript. Then I read on this site that appropriate syntax is: $ npm config set prefix /usr/local $ npm install -g bower I have tried a bunch of others too, all the same error SyntaxError: Unexpected identifier So I'm a newbie that needs some expert guidance on this trivial programming because I am making a mistake somewhere and I have no idea what it is I am doing wrong.
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40520118
has comment: http://stackoverflow.com/comment/40521779
has title: Cannot Install Bower - Syntax Error
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40522082
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25889840
tagged with: node.js

http://stackoverflow.com/comment/40624864
score: 0
has text: @Afsa - What is wrong if user adapt new technology or technology up-gradation ?
comment on: http://stackoverflow.com/a/25948619
type: Comment
type: AnswerComment

http://stackoverflow.com/a/26138168
score: 0
type: Answer
has body: Problem solved by using javascript pushState. Read more info at http://html5doctor.com/history-api/
answers question: http://stackoverflow.com/q/26016007

http://stackoverflow.com/q/25993488
answer count: 1
has answer: http://stackoverflow.com/a/25993734
tagged with: javascript
has comment: http://stackoverflow.com/comment/40705457
type: AnsweredQuestion
tagged with: jquery
has body: I am trying to get the placeholder id of my drag/drop elements. on first drag&drop i could retrieve it, however the content comes from database and mostly will be pre-populated. The problem i am facing now is, i cannot find the id of the binded drop container. $('document').ready(init); function init() { $('[data-type]').bind('dragstart', function (event) { event.originalEvent.dataTransfer.setData("text/plain", event.target.getAttribute('id')); }); // bind the dragover event on the board sections $('#header-container, #header-storage').bind('dragover', function (event) { event.preventDefault(); //$(event.target).css({"background-color":"#AA0000"}); }); // bind the drop event on the board sections $('#header-container, #header-storage').bind('drop', function (event) { event.preventDefault(); var notecard = event.originalEvent.dataTransfer.getData("text/plain"); event.target.appendChild(document.getElementById(notecard)); var room = document.getElementById(event.target.id).parentNode; console.log(room); // Turn off the default behaviour // without this, FF will try and go to a URL with your id's name var $id = $(event.target).attr("data-element-id"); alert('you dropped ' + notecard + ' into '+$id+' but into what container i do not know? In header-container or storage container?'); }); } /* Customize container */ @media (min-width: 768px) { .container { padding-top: 20px; } } .popover { min-width:300px; height:auto; } [data-type="column"] { padding: 10px; min-height: 30px; background-color: rgba(86, 61, 124, 0.15); border: 1px solid rgba(86, 61, 124, 0.2); } .row-hightlight { padding: 15px; background-color: #C9C9C9; border: 1px solid #FFFF33; margin: 4px 0px; } [data-type="div"] { padding: 15px; background-color: rgba(194, 200, 230, 1); border: 1px solid #000; margin: 4px 0px; max-width: 1022px; } .container-fluid { padding: 30px; background-color: #a4a4a4; border: 1px solid red; margin: 10px 0px; } Storage Container container
accepted answer: http://stackoverflow.com/a/25993734
has title: Get parent id of placeholder container drag&drop
tagged with: drag-and-drop
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0

http://stackoverflow.com/comment/40764892
has text: No problem! I'm not sure about the prepared statements would prevent the new line characters from beeing escaped... but they are really better. Good luck and have fun coding :)
comment on: http://stackoverflow.com/a/26020347
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/40747431
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26016156
has text: Just for a test, try to post a message with origin equal to "*" and see if that will work.

http://stackoverflow.com/comment/40689133
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25983623
has text: Easy fix, but first, are you trying to check values for all inputs or just one of the inputs?
type: Comment

http://stackoverflow.com/comment/78424705
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25975612
has text: GET must be little bit faster compared to POST, while there is no sensitive data passed
score: 0

http://stackoverflow.com/a/25964539
score: 1
answers question: http://stackoverflow.com/q/25964032
accepted answer of: http://stackoverflow.com/q/25964032
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: It's likely that your xpath call is returning an empty list instead of None. Changing your check to if script is not None and len(script) &gt; 0: should fix the issue. Or more simply, you could rely on the truthiness with just if script: Since both None and [] are falsy values. This does the same thing as its longer counterpart.
downvote count: 0

http://stackoverflow.com/a/26030273
has body: try $(document).ready(function () { $("button[class^=div]").click(function () { $(".divs.selected").removeClass("selected"); $("#" + $(this).attr("class")).addClass("selected"); }); }); DEMO
upvote count: 1
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/26030159

http://stackoverflow.com/comment/40726611
comment on: http://stackoverflow.com/a/26004487
score: 0
type: AnswerComment
type: Comment
has text: Ok I see what you mean, I made the changes but now the upload image button displays "No file chosen", yet it is uploading to the folder correctly. I added my upload.php file and the form i use to submit

http://stackoverflow.com/comment/40596997
has text: `sides['red'][0];` should be fine ...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25932802

http://stackoverflow.com/q/26008456
score: 0
answer count: 2
has body: Just trying to figure out how to go about doing this. The basic idea of what I am trying to achieve is this &lt;div ng-repeat="product in products | filter: myFilter"&gt; $scope.myFilter = function (item) { return item === 'red' || item === 'blue'; }; However in my case, my filter parameters are stored in an array that will be changing dynamically based on user input. I have tried this but it won't work as I am returning in the loop. var index; $scope.filterParams = ['red', 'blue'] $scope.myFilter = function (item) { for (index = 0; index &lt; $scope.filterParams.length; ++index) { return item === $scope.filterParams[index]; } }; Help is appreciated, thanks!
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26008526
has title: AngularJS - Filtering with multiple changing parameters in an array
has answer: http://stackoverflow.com/a/26008512
type: Question
tagged with: javascript

http://stackoverflow.com/a/26022314
accepted answer of: http://stackoverflow.com/q/26022236
answers question: http://stackoverflow.com/q/26022236
score: 0
type: AcceptedAnswer
has body: Well you are building your string wrong, it should be like how you do the id. e.innerHTML += "&lt;input type='color' name ='color1' value='" + randomColor + "' id='color"+i+"'/&gt;"; ^^^^^^^^^^^^^^^^^^^^^ and you have "fancy quotes" randomColor=‘#’ ^^^
type: Answer

http://stackoverflow.com/comment/40705020
type: AnswerComment
has text: hi nitigyan, the scope of `this` inside the callback function of the ajax call is not in the click event, so `this` will be a reference to the window and not the anchor tag.
type: Comment
comment on: http://stackoverflow.com/a/25992384
score: 1

http://stackoverflow.com/comment/40662196
type: Comment
has text: Oh! Chrome confused me a lot... I didnt know that. thans! i will try both solution.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25969370

http://stackoverflow.com/comment/40774743
score: 0
type: Comment
type: AnswerComment
has text: I know you mostly copied the code, but still: Don't forget local variables and the calculation of the averages can be moved outside of the loops.
comment on: http://stackoverflow.com/a/26031267

http://stackoverflow.com/comment/40635578
has text: @Popnoodles It does work like that in Firefox, interestingly enough (just tried it). However, Chrome gives (more correctly, IMO) an error: `ReferenceError: Invalid left-hand side in assignment`. I wouldn't rely on such browser-dependent behavior, particularly when it's probably not correct according to spec.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25955061

http://stackoverflow.com/a/25980543
answers question: http://stackoverflow.com/q/25980224
upvote count: 2
has body: Unless you have very special needs in terms of performance/logic, I would say it would be better to use a hash of name/value pairs (a.k.a an object) where the names in the hash correspond to actual fields in the database. That being said, lets say for the sake of argument that the arrays are populated by .push() calls, in which case a simple nested for loop should work: 'use strict'; var array = JSON.parse(string); var cell, row, i, j; var table = document.createElement('table'); for (i=0; i &lt; array.length; ++i) { row = document.createElement('tr'); for (j=0; j &lt; array[i].length; ++j) { cell = document.createElement('td'); cell.innerHTML = array[i][j]; row.appendChild(cell); } table.appendChild(row); } document.appendChild(table); Where string is the string you get back from the DB when its time to repopulate.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25980224
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40683077

http://stackoverflow.com/q/25918794
tagged with: php
has answer: http://stackoverflow.com/a/25918944
has body: I hope you can help me with this issue: My sistem runs over Zend Framework, I have installed jQuery in it's latest version. I have an input that receives a file and it makes an Ajax call when changes, and I want that call made in the background, without expecting any response (because that script will send an email when finished). My ajax call is like this: var formData = new FormData(); formData.append('file', $(this).get(0).files[0]); $.ajax({ url: 'uploadaddresses.php', type: 'POST', data: formData, dataType: 'json', async:true, processData: false, contentType: false, beforeSend: function(){ bootbox.alert("You've made your petition correctly. When finished, an email will be sent to you.") }, error: function(err) {} }); return false; Although, the call waits for a response (even FireBug shows me that uploadaddresses.php is still executing...). What i'm doing wrong? How should I do it best? I want to avoid using daemons and system calls, because system restrictions... Thank you very much in advance :)
has comment: http://stackoverflow.com/comment/40572118
has answer: http://stackoverflow.com/a/25918924
type: Question
tagged with: zend-framework
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
answer count: 2
has title: execute a PHP script from Ajax without expecting an answer (and no daemons)
has comment: http://stackoverflow.com/comment/40571977
has comment: http://stackoverflow.com/comment/40572041
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40572005

http://stackoverflow.com/comment/69028228
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25989792
type: Comment
has text: Nice, this solution works as expected. Nevertheless I got an error with 'sharedVars : /* @echo SHARED_VARS */'. It's pretty obvious because it's a comment. Do you know if there is a way to avoid the detection of the error ?

http://stackoverflow.com/q/26020696
score: 0
has body: I'm looking for a way, and wondering if it's even possible, to get either the geolocation of a mobile pc, mainly laptops, to block access to a specified website. I'm not looking to block access to the internet or websites, just the website I'm building. Idea: Is this possible with grabbing a pc's WIFI SSID list and looking for newly added SSIDs in a specified time?
tagged with: c#
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40756991
has comment: http://stackoverflow.com/comment/40756213
has comment: http://stackoverflow.com/comment/40757051
type: Question
has title: Geolocation from WIFI and/or WIFI SSID to block website access
tagged with: wifi
tagged with: ssid
tagged with: geolocation
has comment: http://stackoverflow.com/comment/40756105
has comment: http://stackoverflow.com/comment/40757010

http://stackoverflow.com/comment/40685577
type: QuestionComment
comment on: http://stackoverflow.com/q/25979109
has text: @Huangism thanks - I have edited the question and posted my code
score: 0
type: Comment

http://stackoverflow.com/comment/40691946
has text: @user3175226 The listings above do the same thing as to what you are asking. To better understand the cases for using mapReduce it's best to see the [core documentation](http://docs.mongodb.org/manual/reference/method/db.collection.aggregate/) which explains the parts in detail and with samples. There is also another section with [samples](http://docs.mongodb.org/manual/tutorial/map-reduce-examples/)
type: AnswerComment
comment on: http://stackoverflow.com/a/25985437
type: Comment
score: 1

http://stackoverflow.com/comment/40515766
has text: I don't fully understand what you are trying to achieve here. Why would a checkbox returning the default true/false not be sufficient? What do you want to do with the values returned from the web service?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25888185

http://stackoverflow.com/comment/40538392
has text: [100 maps doesn't take all that long for me](http://jsfiddle.net/q2yd2/4/), but will depend on your computer/browser. Modified from [this question](http://stackoverflow.com/questions/24919121/adding-multiple-map-canvases-to-window-google-maps-javascript-api-v3/24920602#24920602).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25900309

http://stackoverflow.com/a/25993196
accepted answer of: http://stackoverflow.com/q/25992994
upvote count: 1
answers question: http://stackoverflow.com/q/25992994
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40706421
has body: First maintain one flag for input focus and blur $("#first_name_1").focus(function() { $(this).data('flag', 1); }); $("#first_name_1").blur(function() { $(this).data('flag', 0); }); Then, manually trigger blur event for input box on window unload if blur was not already triggered after focusing. $( window ).bind("beforeunload", function() { if($("#first_name_1").data('flag') == 1){ $("#first_name_1").trigger('blur'); } });
type: Answer
score: 1

http://stackoverflow.com/comment/40767752
type: Comment
has text: @guest271314: No, `myObj` is undefined because it hasn't had any other value assigned to it yet (see the first step-by-step above).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26026650

http://stackoverflow.com/a/25941566
score: 0
has comment: http://stackoverflow.com/comment/40622848
answers question: http://stackoverflow.com/q/25941302
accepted answer of: http://stackoverflow.com/q/25941302
type: Answer
has body: The problem is, that you have whitespaces in your data-extension attribute. Change data-extensions=" jpg , png , gif , JPG " to data-extensions="jpg,png,gif,JPG" or use String.trim() on allowed_files_extansions[i] Furthermore.. it seems that you are trying to reinvent the wheel. Take a look at the accept attribute for input[type=file] e.g. &lt;input type="file" accept="image/gif,image/jpeg,image/png" /&gt;
type: AcceptedAnswer

http://stackoverflow.com/a/26011793
has comment: http://stackoverflow.com/comment/40741042
has comment: http://stackoverflow.com/comment/40739904
has comment: http://stackoverflow.com/comment/40740112
type: Answer
has comment: http://stackoverflow.com/comment/40739613
answers question: http://stackoverflow.com/q/26010355
has comment: http://stackoverflow.com/comment/40740677
has comment: http://stackoverflow.com/comment/40740942
has body: You can generate a pseudo-unique id using a combination of timestamp and a random number every time a content script loads, like this: var psUid = (new Date()).getTime() + '_' + Math.random(); And then send all your data-related messages to the background with this ID.
has comment: http://stackoverflow.com/comment/40739416
score: 0

http://stackoverflow.com/comment/86823840
comment on: http://stackoverflow.com/a/26036895
has text: I like the analogy on [ www.promisejs.org](https://www.promisejs.org#then) section on Transformation/Chaining : "Put simply, `.then` is to `.done` as `.map` is to `.forEach`. To put that another way, use `.then` whenever you're going to do something with the result (even if that's just waiting for it to finish) and use `.done` whenever you aren't planning on doing anything with the result."
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/40727307
score: 4
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26005061
has text: Javascript is generally single threaded and synchronous, only certain methods are asynchronous, and string manipulation is not among those methods.

http://stackoverflow.com/comment/40578938
type: AnswerComment
has text: The comment in your loop was super helpful! Thank you very much.
type: Comment
comment on: http://stackoverflow.com/a/25922299
score: 0

http://stackoverflow.com/q/25878834
has answer: http://stackoverflow.com/a/25878961
tagged with: javascript
tagged with: jquery
has title: Does Opera browser support all video formats?
has body: I made a video player in javascript to use it for my website. All browser (I haven't checked Safari yet) except opera can play my video file! Now how to make it worked with Opera browser or supported with any browser? I want that user can play my video on their mobile devices as well, Do I need to take any further action for that? .PHP: Play .JS: /* start video player*/ function doFirst(){ barSize=407.5; myMovie=document.getElementById('myMovie'); playButton=document.getElementById('playButton'); bar=document.getElementById('defaultBar'); progressBar=document.getElementById('progressBar'); playButton.addEventListener('click', playOrPause, false); bar.addEventListener('click',clickedBar,false); } function playOrPause(){ if(!myMovie.paused && !myMovie.ended){ myMovie.pause(); playButton.innerHTML='Play'; window.clearInterval(updateBar); }else{ myMovie.play(); playButton.innerHTML='Pause'; updateBar=setInterval(update,500); } } function update(){ if(!myMovie.ended){ var size=parseInt(myMovie.currentTime*barSize/myMovie.duration); progressBar.style.width=size+'px'; }else{ progressBar.style.width='0px'; playButton.innerHTML='Play'; window.clearInterval(updateBar); } } function clickedBar(e){ if(!myMovie.paused &&! myMovie.ended){ var mouseX=e.pageX-bar.offsetLeft; var newtime=mouseX*myMovie.duration/barSize; myMovie.currentTime=newtime; progressBar.style.width=mouseX+'px'; } } window.addEventListener('load', doFirst,false); /* end video player*/
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: 0
tagged with: video
has answer: http://stackoverflow.com/a/25879146
type: Question
answer count: 2

http://stackoverflow.com/a/26003362
has body: if you add setValue as shown in the following code (I left the DropDownFilter declaration so this can be run as a whole): function DropDownFilter(el) { this.dd = el; this.placeholder = this.dd.children('span'); this.opts = this.dd.find('ul.dropdown &gt; li'); this.val = ''; this.index = -1; this.initEvents(); } DropDownFilter.prototype = { initEvents : function() { var obj = this; obj.dd.on('click', function(event){ $(this).toggleClass('active'); return false; }); obj.opts.on('click',function(){ var opt = $(this); obj.val = opt.text(); obj.index = opt.index(); obj.placeholder.text(obj.val); }); }, getValue : function() { return this.val; $('.filter-dropdown').removeClass('active'); }, getIndex : function() { return this.index; }, setValue : function(newVal, newIndex) { this.val = newVal; this.index = newIndex; this.placeholder.text(newVal); }, } EDIT: I missed your JS fiddel before, my apologies. I have forked the fiddle and added some new code that should work. You needed to duplicate the onclick code in the new setValue method. I changed the above to match the code in the fiddle for posterity. The fiddle
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40724740
score: 1
has comment: http://stackoverflow.com/comment/40725719
has comment: http://stackoverflow.com/comment/40725290
accepted answer of: http://stackoverflow.com/q/26003036
has comment: http://stackoverflow.com/comment/40724135
answers question: http://stackoverflow.com/q/26003036
has comment: http://stackoverflow.com/comment/40724374
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40718185
comment on: http://stackoverflow.com/a/25999984
type: Comment
type: AnswerComment
has text: @SpYk3HH your "disinterestedness" is welcome, since it is something that was in my mind to ask in my question, something like "is this pattern recommended ?"
score: 0

http://stackoverflow.com/comment/40705974
has text: @sethu yes, I added more details.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25989280
type: Comment

http://stackoverflow.com/a/25918904
has comment: http://stackoverflow.com/comment/40596740
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40601078
has comment: http://stackoverflow.com/comment/40591333
type: Answer
answers question: http://stackoverflow.com/q/25918587
has body: I have some differnet approach to solve this problem. As, you have your JSON. Just stringify the whole JSON using JSON.stringify(). Then split on the basis of link. Concat all link in a single variable. Do this for whole Strigified data. Finally make your AJAX request.
accepted answer of: http://stackoverflow.com/q/25918587
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40593743

http://stackoverflow.com/comment/40579183
comment on: http://stackoverflow.com/q/25922594
score: 0
type: QuestionComment
type: Comment
has text: @Shivam I think he wanted to add JavaScript to a post on SE

http://stackoverflow.com/a/26019433
type: Answer
has body: Convert you data to a binary array then create a blob from that. var byteArray = new Uint8Array(hexdata.length/2); for (var x = 0; x &lt; byteArray.length; x++){ byteArray[x] = parseInt(hexdata.substr(x*2,2), 16); } var blob = new Blob([byteArray], {type: "application/octet-stream"}); http://jsfiddle.net/mowglisanu/15h9o3d5/
has comment: http://stackoverflow.com/comment/63198204
downvote count: 0
answers question: http://stackoverflow.com/q/25949152
score: 8
upvote count: 8

http://stackoverflow.com/comment/40533766
has text: yes this is only in javascript.RowDataBound Just add event to the controls at runtime.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25897506

http://stackoverflow.com/q/25894963
answer count: 1
tagged with: angularjs-ng-repeat
has body: I searched for an answer to this first and found the following which I think was incorrectly closed: previously closed question <c:url value="friends-and-stories/friend/{{friend.code}}" var="url" /> {{friend.name}} {{friend.profession}} {{friend.briefDescription}} {{friend.linkLabel}} <feature:on feature="storefront.enable.site.ecommerce"> <spring:theme code="text.add" /> </feature:on> Filter: filter('selectedFriendsCountries', function() { return function(friends, friendsCountries) { return friends.filter(function(friend) { for (var i in friend.countries) { if (friendsCountries.indexOf(friend.countries[i]) != -1) { return true; } } return false; }); }; }) I want to update the foundation library so that my items get equalized height after ng-repeat has completed. The problem, which was also mentioned in the other question, is that if you have a custom filter, then you cannot use a directive which checks for the $last iteration of the repeat if you add or remove items from the custom filters model. How can one know when items have been iterated over using ng-repeat if you change the model of a custom filter? Please do not close as a duplicate unless there is an answer UPDATE: Please see this FIDDLE which has an example of the issue. You will see by default that "UK" is filtered and one person is showing. If you then click "Switzerland" it still works, but finally you choose "USA" and it fails, you no longer get the alert showing that we can find the scope.$last item.
favorite count: 0
tagged with: angularjs
has title: How do we know when a custom filter has finished on ng-repeat after changes to filter model
linked to: http://stackoverflow.com/q/20268833
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25896021
accepted answer: http://stackoverflow.com/a/25896021
score: 1
type: Question
upvote count: 1
linked to: http://stackoverflow.com/q/15207788
tagged with: javascript
has comment: http://stackoverflow.com/comment/40886530

http://stackoverflow.com/comment/40611721
comment on: http://stackoverflow.com/q/25939889
has text: ` ` is not valid HTML syntax. [` ` always requires a closing tag.](http://stackoverflow.com/questions/4531772/can-the-script-tag-not-be-self-closed) Probably your final ` ` is being treated as part of a script (instead of as HTML), so there's no `document.body`.
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40585307
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25925855
has text: I want create textarea with javascript when I click on the "yes" radio button?
type: AnswerComment

http://stackoverflow.com/q/25934581
has comment: http://stackoverflow.com/comment/40600267
has answer: http://stackoverflow.com/a/25934688
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/19447752
tagged with: css
answer count: 4
possible better answer: http://stackoverflow.com/a/25934659
downvote count: 1
has answer: http://stackoverflow.com/a/25934709
has title: Dynamically change height of "div", based on content with preset "width" and "height"
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25934688
has body: I have a "div" with preset "width" and "height". I need to change the height of that "div" based on content. I was looking for some JavaScript but couldn't find appropriate for me. Here is my simple example, which needs an improvement http://jsfiddle.net/dmitry313/1zr6Lhwa/ HTML Text Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example CSS h2 { font:18px/30px Arial; } #content { width:200px; height:100px; border:1px solid #000; background: yellow; } EDIT: Initially preset "width" and "height" are important and can't be changed
has answer: http://stackoverflow.com/a/25934633
has comment: http://stackoverflow.com/comment/40600089
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40600516
has answer: http://stackoverflow.com/a/25934659

http://stackoverflow.com/q/25992102
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26041812
downvote count: 0
answer count: 1
has title: Enable token caching after validation through the OAuth.io javascript SDK
has answer: http://stackoverflow.com/a/26041812
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
score: 1
tagged with: oauth-2.0
has body: I'm creating a website (in AngularJS) which uses the Google Analytics API through OAuth.io's javascript SDK. Everything was quite simple to set up, however their documentation is really lacking; it's very short, with little code examples. Currently everytime I refresh my page I need to validate again (through the pop-up), and saw there was a way to enable caching using their SDK (note: I know it can be done with cookies or browser storage, but I would like to use their SDK to do it.) It's explained here: https://oauth.io/docs/api-reference/client/javascript#detailed-description-oauth-object-available-methods-popup You can use 'options, enable cache', but I really have no idea how and where to add this argument to do so. My code for the pop-up: $scope.connect.analytics = function() { OAuth.popup('google_analytics') .done(function(result) { console.log(result); $scope.connect.status = true; }) .fail(function (err) { console.log(err) }); };
upvote count: 1
type: Question

http://stackoverflow.com/q/26001767
upvote count: 7
type: Question
tagged with: jstree
has title: Meteor avoid double refreshes when third party widget changes it's own reactive datasource
tagged with: javascript
has answer: http://stackoverflow.com/a/26039762
has body: I have a jsTree which I am trying to bi-directionally "connect" to a Meteor collection. Right now I automatically trigger a jsTree.refresh() whenever the collection updates with the help of .observeChanges: FileTree.find().observeChanges({ added: function() { $.jstree.reference('#fileTree').refresh(); }, changed: function() { $.jstree.reference('#fileTree').refresh(); }, removed: function() { $.jstree.reference('#fileTree').refresh(); } }); I want to allow editing of the database by dragging things around in jsTree. Here's how it would look: User drags element to new location. jsTree updates the location of the element in the tree. jsTree calls event handler Event handler updates database My problem is, if I understand everything correctly, is that the database update would trigger the observeChanges event that I set up earlier. That would cause yet another refresh of the tree. That causes an annoying flicker which would interrupt users. (i.e. the file browser would be unusable for about 0.75s after every drag/drop operation.) How can I prevent this unneeded update, or is there a better way to structure my interface with jsTree that would prevent this problem.
answer count: 1
downvote count: 0
tagged with: meteor
tagged with: dom-events
favorite count: 0
accepted answer: http://stackoverflow.com/a/26039762
type: AnsweredQuestion
score: 7

http://stackoverflow.com/a/26000545
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25993220
has body: If the image can be pulled from the cache immediately, then IE won't trigger the load event for the image at all. You can check if the complete property of the image is true. Then the image is already loaded and you won't get a load event, so you can just call the function directly. Example: var image = $('img'); if (image.prop('complete')) { resize_imgs(140,140,112,112); } else { image.load(function(){ resize_imgs(140,140,112,112); }); }
has comment: http://stackoverflow.com/comment/40781019
has comment: http://stackoverflow.com/comment/40746759
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40748067
has comment: http://stackoverflow.com/comment/40748250
has comment: http://stackoverflow.com/comment/40766222
type: Answer
has comment: http://stackoverflow.com/comment/40751064
answers question: http://stackoverflow.com/q/25993220
score: 1
has comment: http://stackoverflow.com/comment/40752965

http://stackoverflow.com/comment/41726742
type: Comment
has text: That was actually exactly what i did, which works perfect ^^ super nice script btw!
comment on: http://stackoverflow.com/a/26544721
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40501310
has text: Just expand the array you're sending to your script, you're sending username fine
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25879745
score: 0

http://stackoverflow.com/a/25940408
has body: Try this: Javascript: CSS:
has comment: http://stackoverflow.com/comment/40622252
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25939913
has comment: http://stackoverflow.com/comment/40623649
has comment: http://stackoverflow.com/comment/40614339
answers question: http://stackoverflow.com/q/25939913
has comment: http://stackoverflow.com/comment/40613566
type: Answer
has comment: http://stackoverflow.com/comment/40704627
has comment: http://stackoverflow.com/comment/40704801
has comment: http://stackoverflow.com/comment/40704690
has comment: http://stackoverflow.com/comment/40614025

http://stackoverflow.com/comment/40584670
score: 0
comment on: http://stackoverflow.com/q/25925133
type: Comment
type: QuestionComment
has text: Better performance for what? Why move elements from the top to the bottom?

http://stackoverflow.com/q/25927730
has comment: http://stackoverflow.com/comment/40588778
has answer: http://stackoverflow.com/a/77992754
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40630748
upvote count: 3
tagged with: forms
type: Question
tagged with: parsley.js
has answer: http://stackoverflow.com/a/26172835
possible better answer: http://stackoverflow.com/a/50469375
tagged with: javascript
has answer: http://stackoverflow.com/a/50469375
has title: parsley.js select list value of zero - not working
answer count: 3
tagged with: validation
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/26172835
has body: I have a select list on my test form that I am trying to get to work with parsley.js validation. The parsley validation does work, but only when the default value of the select list is a blank value, except I need to have a value of 0 (zero). So when the value of zero is selected / displayed in the select list the select list should be red with indicating that there is an error. How do I get the select list to validate correctly, when I am using a default value of zero? Here is an example of my select list with the zero value: &lt;select name="availability_type" id="id_availability_type" data-parsley-id="1601" data-parsley-required="true" data-parsley-required-message="You must enter at least one Detail." class="input-xlarge2 standard_input_style parsley-success"&gt; &lt;option value="0"&gt; Do not display Availability&lt;/option&gt; &lt;option value="1"&gt;Immediately&lt;/option&gt; &lt;option value="2"&gt;1 week&lt;/option&gt; &lt;option value="3"&gt;2 weeks&lt;/option&gt; &lt;option value="4"&gt;3 weeks&lt;/option&gt; &lt;option value="5"&gt;4 weeks&lt;/option&gt; &lt;option value="6"&gt;&amp;gt; 4 weeks&lt;/option&gt; &lt;/select&gt; Here is the code line that works with a blank space as the value: &lt;option value=" "&gt; Do not display Availability&lt;/option&gt;

http://stackoverflow.com/q/26008778
score: 0
has comment: http://stackoverflow.com/comment/40734214
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26009594
tagged with: pug
has comment: http://stackoverflow.com/comment/40734269
has title: HTML Client side pagination - Cant get dynamically added data
type: AnsweredQuestion
tagged with: pagination
has answer: http://stackoverflow.com/a/26009594
has body: So I'm using a javascript pagination http://en.newinstance.it/2006/09/27/client-side-html-table-pagination-with-javascript/ which works great.. except for when I try to load my dynamically added data (from a getJSON). The issue is that it is checking the table but not finding any results as it is injected into the innerHTML and not "hard-coded" in I guess. this is the javascript script(type='text/javascript') pager = new Pager('results', 3); pager.init(); pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1); Does anyone know what I can do to fix this? I've tried using some of the proper datagrid but I cannot get them to work with my application. $.getJSON( '/getlocations', function( data ) { userListData = data; // For each item in our JSON, add a table row and cells to the content string $.each(data, function(){ tableContent += ' '; tableContent += ' ' + this.name + ' '; tableContent += ' ' + this.information + ' '; tableContent += ' ' + this.lat + ' '; tableContent += ' ' + this.lon + ' '; tableContent += ' View on map '; tableContent += ' In Progress '; tableContent += ' delete '; tableContent += ' '; }); // Inject the whole content string into our existing HTML table $('#userList table tbody').html(tableContent); Thanks
type: Question

http://stackoverflow.com/comment/40732640
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26007792
type: AnswerComment
has text: Thanks for answering this. I have problem about the span tag and not about the textarea. Sorry about the css. I thought this way is easier.

http://stackoverflow.com/comment/40597481
type: QuestionComment
has text: look at js setInterval
score: 0
comment on: http://stackoverflow.com/q/25933072
type: Comment

http://stackoverflow.com/q/25880911
accepted answer: http://stackoverflow.com/a/26014908
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: jquery-selectors
answer count: 1
downvote count: 0
score: 1
has body: I am using the jquery checkboxtree plugin which works great. I have a situation where I want to programmatically expand certain nodes. I see that I can do by Id as in the example: $('#tabs-5-expand').click(function(){ $('#tree5').checkboxTree('expand', $('#tabs-5-node23')); }); and I was hoping that I could expand multiple nodes using a class name like this $('#tabs-5-expand').click(function(){ $('#tree5').checkboxTree('expand', $('.bluetabs')); }); but it doesn't seem to do anything. Does anyone know if there is a way to programatically expand or collapse nodes here using class selectors?
favorite count: 0
has title: Does jquery checkbox tree support the ability to programatically expand using class selectors instead of Id?
tagged with: checkboxtree
has answer: http://stackoverflow.com/a/26014908
type: AnsweredQuestion

http://stackoverflow.com/comment/40694122
type: AnswerComment
comment on: http://stackoverflow.com/a/25986779
score: 0
type: Comment
has text: @Matteo yes.. missed that

http://stackoverflow.com/comment/40722268
has text: @Bergi but the script can't guess on it's own the correct POST parameters, therefore it can't necessarily see what the real visitor see.
comment on: http://stackoverflow.com/q/26001430
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25914114
has answer: http://stackoverflow.com/a/25914220
has body: I have a list of checkboxes within multiple ul tags. I want to uncheck and check all using an href for each list. (There will be several lists, here I have provided HTML for two lists) The code does not work in that the checkboxes are not all checked or unchecked on click.. Can anyone help please? Here is what I have tried so far in a JSFIDDLE Select one or more options Check all Uncheck all Group 1 Option #1 for group 1 Option #2 for group 1 Option #3 for group 1 Group 2 Forum Ipsum Dorol Select one or more options Check all Uncheck all Group 1 Option #1 for group 1 Option #2 for group 1 Option #3 for group 1 Group 2 Forum Ipsum Dorol My jquery: $.each($('.checkbox-div'), function () { $(".checkall").click(function() { $(":checkbox.only-this").attr("checked", true); }) $(".uncheckall").click(function() { $(":checkbox").attr("checked", false); }) }); http://jsfiddle.net/r2yLq61o/
accepted answer: http://stackoverflow.com/a/25914220
answer count: 2
has answer: http://stackoverflow.com/a/25914333
tagged with: javascript
tagged with: jquery
score: 0
type: Question
type: AnsweredQuestion
has title: Each function jquery for selecting all checkboxes within multiple lists
possible better answer: http://stackoverflow.com/a/25914333

http://stackoverflow.com/q/25989310
has comment: http://stackoverflow.com/comment/40698356
has answer: http://stackoverflow.com/a/25989518
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25989412
has answer: http://stackoverflow.com/a/25989466
has answer: http://stackoverflow.com/a/25989344
has comment: http://stackoverflow.com/comment/40698305
type: Question
has comment: http://stackoverflow.com/comment/40698311
has answer: http://stackoverflow.com/a/25989392
answer count: 6
has body: I am trying to rewrite a tag using Javascript. The code looks like this &lt;div id="captcha" style="display: none;"&gt; [content] &lt;/div&gt; So I am trying to rewrite the entite tag so it removes the styling "style="display:none;" From the tag on pageload. I already have this code, but I cannot seem to get it to work: var divv = document.getElementById("captcha"); divv.innerHTML = divv.innerHTML.replace("style="display: none;", "");
score: 0
has comment: http://stackoverflow.com/comment/40698300
has comment: http://stackoverflow.com/comment/40698634
accepted answer: http://stackoverflow.com/a/25989344
tagged with: javascript
has title: Rewriting a div using javascript
has comment: http://stackoverflow.com/comment/40698562
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25989351
has answer: http://stackoverflow.com/a/25989351

http://stackoverflow.com/comment/40615536
score: 1
type: Comment
has text: The top level domain is actually the .com part, so I think you're maybe looking for second-level domain. But what would you expect back from something like video.google.co.uk - the "co" (the second-level domain) or "google" or "google.co"?
type: QuestionComment
comment on: http://stackoverflow.com/q/25942552

http://stackoverflow.com/q/25927957
has answer: http://stackoverflow.com/a/25928084
accepted answer: http://stackoverflow.com/a/25928084
has comment: http://stackoverflow.com/comment/40588562
has comment: http://stackoverflow.com/comment/40588490
type: Question
downvote count: 4
upvote count: 1
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40588523
favorite count: 0
tagged with: web
score: -3
has title: TypeError: $ is not a function - in firefox console
has body: Getting type "TypeError: $ is not a function" when the below code is entered in firefox console. I don't know any thing about java script. can anyone fix this. setInterval(function(){ $('.reserve-btn').trigger('click'); console.log('Working.. Dont press any key until we add your phone to your cart.'); },10);
has comment: http://stackoverflow.com/comment/40588532
type: AnsweredQuestion

http://stackoverflow.com/comment/40695418
type: Comment
type: QuestionComment
has text: @JFK:i check my previous fancybox 1.3.6 this patched for jquery 1.9+.`(Patched for jQuery 1.9+ compat by Sabel)`. i check jsfiddle.net/cvhk56vp/6 this worked for existing input box But so not work for add/remove NEW input box when i click in add link!!!
score: 0
comment on: http://stackoverflow.com/q/25971019

http://stackoverflow.com/comment/40505459
score: 3
comment on: http://stackoverflow.com/q/25882228
type: Comment
type: QuestionComment
has text: if there are no elements in the `$target` then `$target.offset()` would return `undefined`.. also `li` element does not have a `hash` property...

http://stackoverflow.com/comment/40766227
type: Comment
comment on: http://stackoverflow.com/q/26026344
score: 1
has text: `module.exports = (nums) => nums.map(x => 2*x)` - that's your whole code with new node (with arrows) and `map`
type: QuestionComment

http://stackoverflow.com/comment/40735084
score: 0
type: QuestionComment
has text: Can you explain the purpose of this code. I meant what are you trying to do here. Coz to me the code is total mess brother. :)
comment on: http://stackoverflow.com/q/26009482
type: Comment

http://stackoverflow.com/a/26041195
score: 0
answers question: http://stackoverflow.com/q/26033395
has body: You will need to handle more states that just 'isTextPending'. Here is an example (note that this also handles 'closetag' event to exclude text between tags from the processing). 'use strict'; var sax = require('sax-js'); var request = require('request'); var href = 'http://some-xml-url.xml'; var urls = []; var tagName = undefined; var isValidGuid = false; var isValidTitle = false; var guidUrl = undefined; var saxStream = sax.createStream(true); saxStream.on('error', function (e) { console.error(e); }); saxStream.ontext = function (text) { if (tagName === 'guid' &amp;&amp; isValidGuid) { guidUrl = text; } else if (tagName === 'title') { isValidTitle = !(text.indexOf('VIDEO') === 0); } else return; if (guidUrl !== undefined &amp;&amp; isValidTitle) { urls.push(guidUrl); } }; saxStream.on('opentag', function (node) { tagName = node.name; switch(node.name) { case 'guid': isValidGuid = (node.attributes.isPermaLink === 'false'); break case 'item': isValidGuid = false; isValidTitle = false; guidUrl = undefined; break; } }); saxStream.on('closetag', function (node) { tagName = undefined; }); saxStream.end = function () { console.log('Result: '+JSON.stringify(urls)); }; request(href).pipe(saxStream);
type: Answer

http://stackoverflow.com/comment/40563838
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25913563
has text: Why not resolve `myDeferred1` regardless of `personId` occurence and handle it by looking at the data returned in your callback?
score: 0

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/25885067

http://stackoverflow.com/a/25922756
has body: Well after a lot of searching I got something that helps and even gave me other idea http://blog.gauravchouhan.com/tag/advance-web-scraping-using-c/
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25920762
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25920762

http://stackoverflow.com/comment/40684183
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25981413
has text: I'm using j2ee (Struts 2) in my server end.

http://stackoverflow.com/comment/40646820
has text: What do you mean by "doesn't work?" Maybe you can add to your original question some example inputs and expected outputs to help clarify what you're looking for.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25960564

http://stackoverflow.com/comment/40548554
has text: you are missing the imported javascript library list
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25906160

http://stackoverflow.com/a/25929933
answers question: http://stackoverflow.com/q/25928634
has body: It's not entirely clear what you want to do from the question, but if you want to do this: if( a == 'qwerty' || b == 'qwerty' ) break; Then firstly, switch to ===. The double == is a slower algorithm which has to allow for different types, whereas the === can fail faster. When all the values are strings the performance is the same, but when some of the values are false or null or undefined, == is much slower, as this jsperf shows. It also (more importantly) exposes you to annoying bugs like: "" == false gives true, but "" == null gives false. Finally === is explicit both to the interpreter and anyone reading the code that you expect matching types here. If, on the other hand you were trying to do this: if( a == 'someValue' || a == 'someOtherValue' ) break; Then for a large number of unchanging values, it could be quicker to make a dictionary/object and look up things in that. For example, when you are matching against a set of 1000 values, it is something like 45x quicker than doing explicit comparisons or indexOf with a list, as this jsperf shows.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25928634
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26033569
tagged with: ajax
has comment: http://stackoverflow.com/comment/40779224
has title: how to combine post and get method with jquery?
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40779049
has comment: http://stackoverflow.com/comment/40779187
favorite count: 0
accepted answer: http://stackoverflow.com/a/26033624
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40780144
has comment: http://stackoverflow.com/comment/40779174
has answer: http://stackoverflow.com/a/26033652
has body: I have two jquery function get and post. I retrieve data from get method first and post my data with post method. I want to know how to combine this two function. POST Method var url = '/api/sample?id=' + id ; AJAXnotification("Saving...", 'info'); $.post( url , form) .done(function(){ AJAXnotification("Saved", 'success', 5000); }) .fail(function() { AJAXnotification("Cannot save", 'error'); }); GET Method AJAXnotification("Loading...", 'info'); var fail_callback = function() { AJAXnotification("Cannot load ", 'error'); } $.get('/api/samples', { 'id' : id, 'merge' : 'departures', 'departures.from_date': from_date, 'departures.to_date' : to_date }).done(function( tours ){ AJAXnotification(" loaded", 'success', 5000); });
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/26033624
possible better answer: http://stackoverflow.com/a/26034023
has answer: http://stackoverflow.com/a/26034023
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/44430468
type: AnswerComment
has text: catch the click and ctrl-click, but also able to tell if contextmenu was fired normally (not from ctrl-click). Your solution seems to block ctrl-clicks completely, not just the ones coming from safari
comment on: http://stackoverflow.com/a/27973894
type: Comment
score: 1

http://stackoverflow.com/comment/40633236
score: 0
type: QuestionComment
type: Comment
has text: Also useful: http://floating-point-gui.de/
comment on: http://stackoverflow.com/q/25953770

http://stackoverflow.com/comment/40528057
type: QuestionComment
comment on: http://stackoverflow.com/q/25894876
has text: @Dr.Molle Please post as an answer and I'll accept it, thanks!
score: 0
type: Comment

http://stackoverflow.com/comment/40679048
score: 1
comment on: http://stackoverflow.com/q/25978695
type: Comment
type: QuestionComment
has text: ... Don't select all of them. You're setting the `click` handler in each element already, why select it (or them, in this case) again? Also, boo-hiss for inline JS. Consider using `data-` attributes instead, and less obtrusive JS.

http://stackoverflow.com/comment/40518310
has text: Remove the `show()` from your code. That is what instantly shows the div.
comment on: http://stackoverflow.com/q/25889468
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40539874
comment on: http://stackoverflow.com/q/25901211
has text: Not sure how you would expect anyone to help troubleshoot without some real html . Your server code is useless for client side troubleshooting. `doesn't work` isn't much of an explanation. What debugging have you done? Would suggest you create a live demo that replicates the problem
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/26016984
has body: The easiest way to do this would be as below: package fi.iki.elonen; import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map; public class Stackoverflowtest extends NanoHTTPD{ static boolean isDoingAJob=false; public Stackoverflowtest() { super(8080); } @Override public Response serve(IHTTPSession session) { Method method = session.getMethod(); Map<String,String> params = session.getParms(); String uri = session.getUri(); System.out.println(method + " '" + uri + "' "); String msg = " Remote Test Service "; try { List<String> lines= FileUtils.readLines(new File("<fileloc>")); for(String line: lines){ msg+=" "+line+" "; } } catch (Exception e) { e.printStackTrace(); } msg += " "; return new NanoHTTPD.Response(msg); } public static void main(String[] args) { try { new Stackoverflowtest().start(); } catch (IOException e) { e.printStackTrace(); } } } Notice the script at the bottom. It just makes the browser reload every 5s. You don't need ajax or anything, for a simplistic solution. If you want to build something more sophisticated like getting only the newly added lines to the browser, then the solution will need to change a bit. Note: For this to work, in the NanoHTTPD class, in the run() method, I changed the myThread.setDeamon(true) to false. Otherwise you will need to make your main thread sleep for a long time. Else the program will just exit.
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/40753953
answers question: http://stackoverflow.com/q/25989280
upvote count: 1
has comment: http://stackoverflow.com/comment/40753579

http://stackoverflow.com/comment/40705425
score: 0
type: QuestionComment
type: Comment
has text: I don't know how it works internally, but at least some of Selenium's drivers can dump the entire DOM as HTML.
comment on: http://stackoverflow.com/q/25993057

http://stackoverflow.com/comment/40756887
comment on: http://stackoverflow.com/q/26021493
has text: http://jsfiddle.net/nce5aau8/1/
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40736826
comment on: http://stackoverflow.com/a/26010504
score: 0
type: AnswerComment
type: Comment
has text: No, I think it's not Ajax method. In Ajax, the URL in browser address bar will not change, but in Youtube site, the URL was changed. It's not Ajax, it's a page transition manipulation.

http://stackoverflow.com/q/25909753
tagged with: javascript
has comment: http://stackoverflow.com/comment/40555075
type: UnansweredQuestion
has body: I paint freehand strokes on my canvas using javascript, it's always a bounded shaped design. Is it able to find the number of pixels covered inside that bounded strokes. I need help in how to calculate the pixels inside an irregular bounded shaped design. I am new to this, any help will be greatly appreciated. Thanks in advance.
score: 1
favorite count: 0
type: Question
upvote count: 2
has title: Pixels covered inside an irregular design
has comment: http://stackoverflow.com/comment/40555199
has comment: http://stackoverflow.com/comment/40555237
downvote count: 1
answer count: 0

http://stackoverflow.com/a/37721299
type: Answer
has comment: http://stackoverflow.com/comment/62915094
score: 2
downvote count: 0
has body: I experienced the same problem starting from cordova version cli-6.0.0 and I solved replacing every link into the iframe programmatically with "onclick" event setting the document.location.href This is the code I put into the cordova widget: fix_link = function() { $("a").each(function () { $(this).attr("dest_url", $(this).attr("href")) $(this).removeAttr("href") $(this).click(function () { document.location.href = $(this).attr("dest_url"); }) }); } var iframe = document.createElement('iframe'); iframe.onload = function () { document.framewrap.eval("fix_link_func = " + String(fix_link)); document.framewrap.eval("fix_link_func();"); }; iframe.src = 'http://www.yoursite.com'; iframe.id = "framewrap"; iframe.name = "framewrap"; document.body.appendChild(iframe); let me know if you find a better solution!
upvote count: 2
answers question: http://stackoverflow.com/q/26019789

http://stackoverflow.com/a/64676565
answers question: http://stackoverflow.com/q/25994909
has body: forEach forEach is a method on the Array prototype. It is easy to use It contains a callback function and each element from array is passed to callback function Because of callback, You can not use await with forEach ,it will lead to different output than expected. Because of callback function it is slower than for loop Because of callback you can not use break For loop In for loop you need an index, condition and increment/decrement of index variable It is faster than foreach You can use break It works with await
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40755686
type: Comment
has text: @RGraham: Probably for the reason Benjamin mentions in his answer, to get a stack trace. However, that's a characteristic of `Error`, not of passing an `Error` object to `.reject()`. The browser or JavaScript still doesn't care what you pass to `.reject()`.
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/26020578

http://stackoverflow.com/q/26014323
tagged with: ubuntu
tagged with: linux
type: Question
has title: Nodejs terminal console shows a lot of stuff
has comment: http://stackoverflow.com/comment/40755533
has comment: http://stackoverflow.com/comment/40758086
tagged with: node.js
has comment: http://stackoverflow.com/comment/40743558
score: 0
has comment: http://stackoverflow.com/comment/40745959
has comment: http://stackoverflow.com/comment/40743999
has body: When I run an app in Nodejs using "nodejs app" and do some tasks in the app, the log shows a lot of stuff and I have to search for what I just did in the terminal for a long time. Example: When I hit an API, I get : 127.0.0.1 - - [Wed, 24 Sep 2014 10:05:15 GMT] "GET /js/controller.js HTTP/1.1" 200 - "htt://localhost:5555/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" 127.0.0.1 - - [Wed, 24 Sep 2014 10:05:15 GMT] "GET /js/service.js HTTP/1.1" 200 - "htt://localhost:5555/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" 127.0.0.1 - - [Wed, 24 Sep 2014 10:05:16 GMT] "GET /partials/patient/view.html HTTP/1.1" 200 - "htt://localhost:5555/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" 127.0.0.1 - - [Wed, 24 Sep 2014 10:05:16 GMT] "GET /images/no_image.jpg HTTP/1.1" 304 - "htt://localhost:5555/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" Can someone help me get just the simple logs without all this gecko ... and stuff. All I want to see in my console is logs like GET /js/service.js 200 I was able to get just that in the previous version of Nodejs and Ubuntu but not here. Note: I recently upgraded to Ubuntu 14.04.
has comment: http://stackoverflow.com/comment/40744132
has comment: http://stackoverflow.com/comment/40743858
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40756620
has comment: http://stackoverflow.com/comment/40756591
answer count: 0
tagged with: javascript

http://stackoverflow.com/a/30556627
score: 0
has body: If you're working on a persistent status (which seems to be the case here), Neil's answer is the way to go. If you just need some temporary UI effect, you can use the following jQuery: $(event.target).addClass("glyphicon glyphicon-ok"); (nearly same code you did try, but with $(event.target) instead of $(this))
type: Answer
answers question: http://stackoverflow.com/q/25923153

http://stackoverflow.com/a/40409744
score: 0
has body: I would first ask the question do you need isotope. It's not really built for filters like that. if you need it for layout and can't get the same effect with flexbox or floats then instead of trying to extend isotope filtering just make your own filtering script to add / remove an active class from your items. css can handle the rest. for the filtering i'd say something like this: View All Filter 1 Filter 2 Filter 3 Filter 4 Filter 5 Filtered 1 Filtered 2 Filtered 3 Filtered 4 Filtered 5 This would all still work on an isotope set of items just change up the selectors in the jQuery and CSS. Be aware that if your .active styles change the width or height or other spacing properties you'll have to call $('.isotope').isotope('layout'); again at the end of the filter click function.
answers question: http://stackoverflow.com/q/25916873
type: Answer

http://stackoverflow.com/q/25942671
score: 1
has comment: http://stackoverflow.com/comment/40615808
has answer: http://stackoverflow.com/a/25942958
tagged with: date
has answer: http://stackoverflow.com/a/25942824
has title: Javascript - How can I remove portion of a string and assign it to a variable for manipulation? String is varied
type: Question
possible better answer: http://stackoverflow.com/a/25942794
has answer: http://stackoverflow.com/a/25942794
downvote count: 0
has comment: http://stackoverflow.com/comment/40615731
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40615764
has comment: http://stackoverflow.com/comment/40615676
favorite count: 0
has answer: http://stackoverflow.com/a/25942879
has answer: http://stackoverflow.com/a/25942833
answer count: 5
upvote count: 1
accepted answer: http://stackoverflow.com/a/25942833
type: AnsweredQuestion
has body: I have an API call that returns "/Date(1425715200000)/" as part of a JSON object. I need to be able to evaluate this and return the human readable date. The API documentation is scant at best. I am not even certain why they don't just store the time in milliseconds as an integer. Not sure what the best way to convert and evaluate /Date(1425715200000)/ this to output 3/7/15. Used this to replace the "/" characters. x = x.replace(/\//g,'');
has comment: http://stackoverflow.com/comment/40615666

http://stackoverflow.com/q/25963471
has comment: http://stackoverflow.com/comment/40652353
possible better answer: http://stackoverflow.com/a/25964078
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40651238
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25967161
has body: I have a HTML like this: I also have some Javascript code like this: var element = document.createElement('div'); element.id = 'forth'; var parent = document.getElementById('third'); parent.appendChild(element); When I run the javascript code, the HTML should change to: Then after I typed this line below in the Browser's console: element.className = 'test'; What I hope is that only the variable 'element' in Javascript will change and have the class name 'test'. However, when I check my current HTML it also have the class name 'test': Can anybody explain that? Thanks so much!!
answer count: 3
upvote count: 1
has title: Create and change HTML elements in Javascript
has answer: http://stackoverflow.com/a/25964078
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25967161
has answer: http://stackoverflow.com/a/25963509

http://stackoverflow.com/comment/40887493
has text: when using `mongoose` i do NOT see this issue at all. Your answer is most likely correct. When I verify, will accept. THANK YOU!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26091013

http://stackoverflow.com/q/25998448
has comment: http://stackoverflow.com/comment/40718295
type: AnsweredQuestion
has title: Javascript slideshow troubleshooting
has comment: http://stackoverflow.com/comment/40716636
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/25998768
has comment: http://stackoverflow.com/comment/40714769
has comment: http://stackoverflow.com/comment/40714979
answer count: 1
tagged with: slideshow
tagged with: javascript
has body: I am creating a Javascript slideshow for my company, but after writing the code my images are not showing. The goal of this slide show is to be expandable, so that i can add more images if needed. I am also going to be switching out the previous and next HTML hyperlinks for buttons. Any help or suggestions would be appreciated. play slide show pause previous next edit The slide show is now working properly. Since it is now working, I am looking into creating buttons for the controls rather then hyperlinks. I am planning on doing this with a slideshow Div. I am unsure however how to edit the CSS and HTML to make the buttons appear on top of the slideshow and stay in exact locations. Update I have solved the how to create the buttons. My previous button is not working however. All of the other buttons are.
has comment: http://stackoverflow.com/comment/40716687
has answer: http://stackoverflow.com/a/25998768
has comment: http://stackoverflow.com/comment/40719088

conflict
tag name: conflict
type: Tag
tags question: http://stackoverflow.com/q/25950072
tags question: http://stackoverflow.com/q/25937763

http://stackoverflow.com/comment/40669527
score: 0
comment on: http://stackoverflow.com/q/25972311
has text: Use this older modal markup instead.. http://getbootstrap.com/2.3.2/javascript.html#modals It would look something like this: http://www.bootply.com/3uOeUB9xjz
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40620235
comment on: http://stackoverflow.com/a/25941945
type: Comment
score: 0
has text: if bind doesn't eliminate the need for an anon, how come the accepted answer doesn't use an anon? i also don't see how a function object created by bind() would be any heavier than a function object created by an anon literal...
type: AnswerComment

http://stackoverflow.com/comment/132080745
type: AnswerComment
score: 0
type: Comment
has text: I got your query wrong. You were telling a different use case.
comment on: http://stackoverflow.com/a/52192108

http://stackoverflow.com/a/25924973
answers question: http://stackoverflow.com/q/25924440
has body: Each iteration of your timer it clears the canvas and calls images (I'm guessing to ask them if you clicked inside them) which **add**EventListener to mouseDown, so by the time you do press the mouse down the image will have many triggers attached to it which will all fire. I think you are meaning to capture mouseDown on one trigger then do the check on all images in a loop - not attaching triggers to every object every frame. There is no way to pick an object on the canvas to erase. Much like in MS Paint, once the pixels are drawn they're just pixels which have no connection to what they belong to. Unless you know some specific rules about render order, layers and alpha its much simpler to redraw all objects every frame.
score: 0
type: Answer

http://stackoverflow.com/a/25975216
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25975100
type: Answer
answers question: http://stackoverflow.com/q/25975100
has body: You can use both relative and absolute URLs when sending ajax requests - they will be resolved to the same location. Of course, SOP stays in place, but it looks like your case doesn't conflict with it anyway.
score: 0

http://stackoverflow.com/comment/40749626
score: 0
comment on: http://stackoverflow.com/q/26017365
type: Comment
type: QuestionComment
has text: Include the code from `context.js` and `demo-context-menu.js` into your question.

http://stackoverflow.com/comment/40680042
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25979021
score: 0
has text: I'm thinking it matters because if you are using Angular that notation is still getting at somepoint interpreted into HTML to be rendered on a page. I doubt the browser knows that {{ Form::text }} stands for a textbox.

http://stackoverflow.com/q/25912065
type: Question
has comment: http://stackoverflow.com/comment/40573199
tagged with: javascript
tagged with: touch
tagged with: canvas
answer count: 1
has body: I want to create a mobile web page where a shape appears on the screen, the user can only traces over the outline of the shape with his/her finger and then a new shape will appear. This library has a few good examples of what I am looking to do, just with more shapes. I have already found a couple of good examples for drawing on the canvas on a touch device here and here. The thing I don't know is how to constrain the line so you are only drawing on the path with a single continuous line. Is there something built in that will let me specify the only path you can draw, or do I have to write that logic by hand?
has comment: http://stackoverflow.com/comment/40570740
tagged with: http://stackoverflow.com/tag/html
has title: How can I constrain drawing on the ?
has answer: http://stackoverflow.com/a/25920625
type: UnansweredQuestion
score: 0

http://stackoverflow.com/comment/40597722
type: AnswerComment
comment on: http://stackoverflow.com/a/25933075
has text: YES! Thank You! It works! But the .title does not really stick to the cursor (I want it like a tooltip). Do I have to manage this with CSS or in the JS Code?
type: Comment
score: 0

http://stackoverflow.com/a/26023945
upvote count: 1
score: 1
downvote count: 0
has body: I would recommend the following pattern based on what it appears you are looking for: var resultRE = /^([\[ \w\]-]*: )(.+) \(([0-9, ]*)\)Rerun(.*)$/ This should force all capture groups to exist, even if they are empty, and will allow for multiple numbers before Rerun as you seem to expect.
type: Answer
has comment: http://stackoverflow.com/comment/40762168
answers question: http://stackoverflow.com/q/26023754

http://stackoverflow.com/q/25893550
tagged with: css
has answer: http://stackoverflow.com/a/25893783
type: AnsweredQuestion
has body: I have created a panel and have 2 columns. Both the columns have many rows. On left side column there is a label in each row and on the right side column there are text fields in each row. In one of the rows I need a blank left column record and checkbox on the right side. But when I leave a blank items value Ext.create('Ext.panel.Panel', { layout: { type: 'table', columns: 2 }, items: [ { xxxxx}, { xxxxx}, {}, {xxxxx} ] } In place of this empty {}, I am getting a thin blue line, whereas I need a blank row. How do I obtain this (remove the thin blue line)? Using firefox I found the id of the div element and wrote display:none but that works only for firefox not for IE. I need a solution which is browser compatible.
type: Question
accepted answer: http://stackoverflow.com/a/25893783
tagged with: javascript
score: 0
has title: Avoid a column in panel - extjs
answer count: 1
tagged with: jsp
tagged with: extjs

http://stackoverflow.com/comment/40731464
type: AnswerComment
comment on: http://stackoverflow.com/a/26007334
has text: This solution works with iframes, but not with the html element. I can re-edit the code again.
type: Comment
score: 0

http://stackoverflow.com/comment/40597111
has text: @tasos I do not have theses classes as I am not using the native JQM structure . So I think I need to do RnD to get the right height of the view-port
score: 0
comment on: http://stackoverflow.com/q/25928088
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26015248
has title: AngularJS $routeProvider can't load directly to partial
type: Question
tagged with: angularjs-routing
has body: At the minute I'm currently using the $routeProvider to dynamically load sections of the page like so: $routeProvider .when('/', { templateUrl: '/pages/home.html', controller: 'mainController' }) .when('/our-business', { templateUrl: '/pages/our-business.html', controller: 'businessController', css: 'css/_business.css' }) .when('/solutions', { templateUrl: '/pages/solutions.html', controller: 'solutionsController' }); Currently, if I go directly to the index (localhost) and then select 'Our Business' from the navigation menu then Angular handles the location request and the page loads fine, with the URL changing to localhost/our-business. If I then reload, or open this URL directly I get a 404 error - presumably because Apache is trying to open our-business.html which doesn't exist. If I open localhost/#/our-business then the index is loaded and Angular then handles the request. The issue I've got is that this is designed to be a public facing website, so if a user were to copy and paste the URL or share it via email, they'll get a 404 error. Is there any way to have Apache rewrite URLs to parse them via the index and AngularJS so that we can keep the non-hash style but still have functional URLs?
tagged with: javascript
has answer: http://stackoverflow.com/a/26015377
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/47254807
tagged with: apache
has answer: http://stackoverflow.com/a/26016032
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/14319967
has comment: http://stackoverflow.com/comment/40745583
downvote count: 0
score: 1

http://stackoverflow.com/a/25966244
has comment: http://stackoverflow.com/comment/40656424
score: 0
answers question: http://stackoverflow.com/q/25966230
has body: Try a for in for (var key in list){ $("#"+ key).children().children("input.dd-selected-value").attr("name", list[key] ); }
type: Answer
has comment: http://stackoverflow.com/comment/40658612

http://stackoverflow.com/comment/41023263
has text: I gave up on this project, so I guess you can have the bounty and stuff.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25973355
type: AnswerComment

http://stackoverflow.com/q/25991558
answer count: 1
has comment: http://stackoverflow.com/comment/40702293
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40702296
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40702315
has title: Getting variable from parameter
has body: I can only imagine that this has been asked several times, but I can't find it. Probably cus I'm searching with wrong words Normally we can do this: id = $("#someId"); where the id is typically from a html control, looking like this: &lt;input type="text" id="someId" /&gt; But now the id will be passed with the function. So I want to do something like this: function someFunct(id) { id = $("#"+id +"); How can I do this using js/JQuery?
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25991646
score: 0

http://stackoverflow.com/comment/40619166
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25940897
has text: Thank you very much for your rewrite of this. I couldn't have done it myself! That works even better :)
type: AnswerComment

http://stackoverflow.com/comment/40939659
type: Comment
type: QuestionComment
has text: Looks cool but tests prove unstable at times. Thanks
comment on: http://stackoverflow.com/q/25986064
score: 0

http://stackoverflow.com/a/25957021
upvote count: 1
type: Answer
score: 1
has body: The controller of your directive is not correct controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... } $sce should come after attrs and transclude. You need to include both even if you are not using it
accepted answer of: http://stackoverflow.com/q/25949339
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25949339

http://stackoverflow.com/q/26008977
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/8830839
has comment: http://stackoverflow.com/comment/40734171
accepted answer: http://stackoverflow.com/a/26009034
has title: How to style a DIV if the IMG inside it has broken image?
tagged with: css
has comment: http://stackoverflow.com/comment/40734141
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40734103
type: Question
has answer: http://stackoverflow.com/a/26009034
has body: Still a Newbie using Javascript. I know something's wrong with my function code. I just can't restructure it well. HTML: &lt;div class="column"&gt; &lt;img src="http://placehold.it/200x200&amp;text=IMG1" onerror="imgError(this);" /&gt; &lt;/div&gt; &lt;div class="column"&gt; &lt;img src="httzp://placehold.it/200x200&amp;text=IMG2" onerror="imgError(this);" /&gt; &lt;/div&gt; JS: function imgError(image) { image.onerror = ""; parent('div.column').image.css('border','5px solid red'); return true; } JSFiddle Link Thanks in advance.
has comment: http://stackoverflow.com/comment/40734129
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/3387427

http://stackoverflow.com/q/25983432
has comment: http://stackoverflow.com/comment/40688270
score: 2
has comment: http://stackoverflow.com/comment/40688257
has answer: http://stackoverflow.com/a/26089776
has comment: http://stackoverflow.com/comment/40882769
tagged with: google-chrome
has title: How to make an automatically running Chrome extension?
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: I've been searching around for the past few days for a way to have my extension run automatically; It works when I use chrome.browserAction.onClicked.addListener but I want it to run without having to manually enable it. I'm thinking my manifest.json is configured wrong for this task. If someone could point me in the right direction that would be great! manifest.json { "manifest_version": 2, "name": "Rocket", "version": "1.0", "description": "Feast", "icons": { "128" : "icon.png" }, "browser_action": { "default_icon": "icon8.png" }, "background": { "page": "background.html" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "web_accessible_resources": [ "contentscript.js", "jquery-2.1.1.js", "background.js"] } background.html &lt;html&gt; &lt;head&gt; &lt;script src="background.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/40699302
upvote count: 3
downvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40882323
type: UnansweredQuestion
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40687873

http://stackoverflow.com/comment/40721136
has text: Well, i did tried what you said, but with a different script. I placed the cbpSplitLayout.js in the respective laoding page and it's now workin. Thanks for the tip =D
type: AnswerComment
comment on: http://stackoverflow.com/a/26001604
score: 0
type: Comment

http://stackoverflow.com/comment/40667188
type: Comment
has text: I forgot a thing, I updated my question...
comment on: http://stackoverflow.com/a/25971149
score: 0
type: AnswerComment

http://stackoverflow.com/a/26010107
has body: Try this code with map for search and replace: var testdata = $.map( [ 'a&amp;b', 'abcz&amp;mz', 'test' ], function( abc ) { return abc.replace('&amp;',' and '); }); alert(JSON.stringify(testdata)); });
answers question: http://stackoverflow.com/q/26009967
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40737427
has comment: http://stackoverflow.com/comment/40737360
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26009967

http://stackoverflow.com/comment/40728586
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26005697
score: 0
has text: I think he figured it was pretty clear. It is pretty clear what it is doing (to me at least) explanation is always nice though

http://stackoverflow.com/a/25959189
type: Answer
accepted answer of: http://stackoverflow.com/q/25959156
score: 2
answers question: http://stackoverflow.com/q/25959156
has body: You could use anonymous function for that: ShowPopupWithCallback("MyController/Load", function(){ alertCallback("My Message");});
type: AcceptedAnswer
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/40764677
has text: Where is your approach? Where is your jQuery anyway? You have to use the `onChange` event from the text input box...
comment on: http://stackoverflow.com/q/26025516
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25998323
has body: Here's a quick function to calculate the total yourself: tooltip: { formatter: function () { var s = 'Y:' + this.y + '&lt;br/&gt;'; var pIdx = this.point.index; var total = 0; $.each(this.series.chart.series, function(i,j){ total += j.points[pIdx].y; }); s += 'Total:' + total; return s; } }, Example here.
answers question: http://stackoverflow.com/q/25995229
type: Answer
has comment: http://stackoverflow.com/comment/40715656
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40715581
upvote count: 1

http://stackoverflow.com/comment/40767575
comment on: http://stackoverflow.com/q/26026506
type: QuestionComment
type: Comment
has text: @T.J.Crowder: I'm just referring to the design of the implementation, not the problem.
score: 0

http://stackoverflow.com/a/25878455
upvote count: 1
has body: .red-background { background-color: red; } .blue-text-color { color: blue; } This div has a red background This div has blue text color This div has a red background AND blue text color I'm not entirely sure why this is a question.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25878345

http://stackoverflow.com/a/26025292
type: Answer
has comment: http://stackoverflow.com/comment/40766140
has comment: http://stackoverflow.com/comment/40773768
has comment: http://stackoverflow.com/comment/40767218
upvote count: 1
score: 1
has body: You could just use ng-init, like this: Choose model name Choose car UPDATE The syntax of your select was a bit off, you actually don't need to use track by unless you are grouping the values of your select, which you are not. I think that what you actually wanted was to have the model bound to the id of the 'car' rather than having the model bound to the car itself. If that's what you want you could do it like this: Choose model name But then you would have to do something very awkward in order to render the second select with the models of the car, because in that case your variable car would be an int (the id of the car), not the 'car' object, so you would have to do something like this: Choose car Which is just as awkward as it looks, but if that's what you want... well, here you have an example: Working example A better idea in my opinion would be to have the models pointing to the objects, and if you want to initialize the selects through the id, you could do this in the ng-init : Choose model name Choose car Working Example
answers question: http://stackoverflow.com/q/26025130
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26025130

http://stackoverflow.com/a/25998768
accepted answer of: http://stackoverflow.com/q/25998448
score: 0
has body: How about simplifying the input for your code first, and then rewriting it accordingly? Assuming all images are in the same location, a good starting point would be to create an array containing only the images names: (disclaimer: I did not test this code, it may contain syntax errors, consider it pseudo-code) var images = ["image1.png","image2.jpg"]; Assuming you only are showing one image at a time on a page, you can keep a global variable around containing the index being shown. var currentImage = 0; //starting image var imageElement = document.getElementById("slideImg") //put this in the id instead of 'name' Accordingly, you can re-use the same &lt; img > tag on the page, all you need to do is re-point it's image tag. function navigate(direction) { switch(direction){ //using modulo and adding the length of the array, we ensure we get positive offsets within the array. case "back" : currentimage = (currentImage-- +images.length)%images.length; case "forward" : (currentImage++ +images.length)%images.length; } imageElement.src = images[currentImage]; } Now you should be able to call the navigate function from within the onclick of elements you add on the page to perform navigations. Similarly, you should be able to call it from within your timer.
has comment: http://stackoverflow.com/comment/40716403
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40716242
type: Answer
answers question: http://stackoverflow.com/q/25998448

http://stackoverflow.com/q/26000047
accepted answer: http://stackoverflow.com/a/26000076
favorite count: 0
tagged with: angularjs
has title: Why is my default radio button not showing up in the model?
tagged with: angularjs-directive
type: AnsweredQuestion
tagged with: javascript
has body: I am have a pre-selected radio button on a form. Here is the html: &lt;input type="radio" ng-model="bankAccount.selectedAccount" value="{{account.bankAccountId}}" class="radioChanged" ng-checked="{{account.defaultAccount}}"&gt; The form shows up and the radio button is selected like is should be, but when I click my submit button, the model, bankAccount.selectedAccount, is just an empty object. If I click on the default radio button, which is already selected in the view, then it does show up in the model. What do I need to do to populate my model with the default radio button?
score: 4
type: Question
upvote count: 4
tagged with: angularjs-ng-model
has answer: http://stackoverflow.com/a/26000076
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40649722
comment on: http://stackoverflow.com/q/25962562
score: 0
type: Comment
type: QuestionComment
has text: Can you point to what doesn't make sense about it? The basic thing I'm trying to do is have a click event attached to the document, but not fired, when #title-editable is clicked. Is there a better way to do this?

http://stackoverflow.com/q/25987965
upvote count: 1
possible better answer: http://stackoverflow.com/a/25988172
has comment: http://stackoverflow.com/comment/40696233
downvote count: 1
has answer: http://stackoverflow.com/a/25988088
accepted answer: http://stackoverflow.com/a/25988088
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25988172
has comment: http://stackoverflow.com/comment/40696385
score: 0
answer count: 2
has title: Select Key From Nested object
has comment: http://stackoverflow.com/comment/40696190
favorite count: 0
linked to: http://stackoverflow.com/q/208016
has comment: http://stackoverflow.com/comment/40696129
has body: I have a situation here. I have an object here, Which is nested inside another , here i want to select the key. The object is shown below var x={ "_shards": { "total": 10, "successful": 5, "failed": 0 }, "_all": { "primaries": { "indexing": { "index_total": 4, "index_time_in_millis": 5, "index_current": 0, "delete_total": 0, "delete_time_in_millis": 0, "delete_current": 0 } }, "total": { "indexing": { "index_total": 4, "index_time_in_millis": 5, "index_current": 0, "delete_total": 0, "delete_time_in_millis": 0, "delete_current": 0 } } }, "indices": { "get56_name": { "primaries": { "indexing": { "index_total": 4, "index_time_in_millis": 5, "index_current": 0, "delete_total": 0, "delete_time_in_millis": 0, "delete_current": 0 } }, "total": { "indexing": { "index_total": 4, "index_time_in_millis": 5, "index_current": 0, "delete_total": 0, "delete_time_in_millis": 0, "delete_current": 0 } } } } } How can I select the key i.e "get56_name" as answer. I dont want the value, I want to select the key how can i get it?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40696316
has comment: http://stackoverflow.com/comment/40696210
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/40800721
type: QuestionComment
type: Comment
has text: possible duplicate of [loading multiple video players with youtube api](http://stackoverflow.com/questions/17012886/loading-multiple-video-players-with-youtube-api)
comment on: http://stackoverflow.com/q/26010679
score: 0

http://stackoverflow.com/q/25983603
has answer: http://stackoverflow.com/a/25983643
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/75915003
has answer: http://stackoverflow.com/a/25983635
has comment: http://stackoverflow.com/comment/40688385
possible better answer: http://stackoverflow.com/a/28060195
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7335780
upvote count: 167
tagged with: forms
has answer: http://stackoverflow.com/a/58073191
has body: If I have a form like this, ... how can I submit it without redirecting to another view by JavaScript/jQuery? I read plenty of answers from Stack Overflow, but all of them redirect me to the view returned by the POST function.
has comment: http://stackoverflow.com/comment/40688228
has answer: http://stackoverflow.com/a/30666118
type: Question
has answer: http://stackoverflow.com/a/25983650
accepted answer: http://stackoverflow.com/a/25983643
has comment: http://stackoverflow.com/comment/40688681
has answer: http://stackoverflow.com/a/43374326
tagged with: javascript
has answer: http://stackoverflow.com/a/59579070
has comment: http://stackoverflow.com/comment/40688159
has answer: http://stackoverflow.com/a/54964425
answer count: 14
linked to: http://stackoverflow.com/q/26567486
has answer: http://stackoverflow.com/a/78278545
has comment: http://stackoverflow.com/comment/46940911
downvote count: 4
has answer: http://stackoverflow.com/a/53037139
tagged with: jquery
score: 163
favorite count: 0
has title: How to submit an HTML form without redirection
has answer: http://stackoverflow.com/a/71482039
linked to: http://stackoverflow.com/q/46640024
has answer: http://stackoverflow.com/a/25983672
has answer: http://stackoverflow.com/a/28060195

http://stackoverflow.com/q/26016033
has answer: http://stackoverflow.com/a/26016653
has body: How can I ensure an object is set in time using Ajax (i.e. myObj.myProp) for some other external script which uses it (i.e. someFastScriptWhichAccesses_myObj_myProp.js)? Note that I have other external files which use the same object, and thus did not wish to place the Ajax in someFastScriptWhichAccesses_myObj_myProp.js. Related Posts: storing AJAX response into variable for use later in script?. Does not consider an external file uses the object. Also, is adamant that async: false should not be used. Example
type: Question
has title: How to ensure Ajax has defined object which is used in later external script
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
linked to: http://stackoverflow.com/q/23525414
type: UnansweredQuestion

http://stackoverflow.com/comment/40757015
type: Comment
type: QuestionComment
has text: Can you please try this ? browser.driver.executeScript('$(\'article.asset-action\').css(\'visibility\', \'visible\')'); and then click
comment on: http://stackoverflow.com/q/26021533
score: 0

http://stackoverflow.com/comment/40675972
comment on: http://stackoverflow.com/a/25975737
has text: ah ok, I misunderstund question! my bad. @nnnnnn nailed it ;)
score: 0
type: AnswerComment
type: Comment

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/25987836
tags question: http://stackoverflow.com/q/25983138
tags question: http://stackoverflow.com/q/25888810
tags question: http://stackoverflow.com/q/25914071
tags question: http://stackoverflow.com/q/26021692
tags question: http://stackoverflow.com/q/25923796

http://stackoverflow.com/comment/40541071
score: 1
comment on: http://stackoverflow.com/q/25901945
has text: Also, the code format actually makes it easy in this case.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40655507
type: AnswerComment
has text: OK...works out the same. Just remember when you get to the last image, you need to start over and move sliderInt to image1...as long as you do that any number of images will work
type: Comment
comment on: http://stackoverflow.com/a/25965349
score: 0

http://stackoverflow.com/q/25953409
type: AnsweredQuestion
has title: Adding a Label to Chart js Pie Graph
accepted answer: http://stackoverflow.com/a/26029406
tagged with: coffeescript
type: Question
tagged with: chart.js
tagged with: javascript
score: 0
answer count: 1
has body: I'm working on adding a pie chart with Chart.js. I'm able to display the chart but would like to display a label, percentage and legend. Does anyone know how to do this? Here's how I'm generating the pie graph: dashboardRegion: (survey) -&gt; male = 0 female = 0 survey.get('responses').each (response) -&gt; if response.get('completed') if response.get('gender') == "male" male += 1 else female += 1 genderData = [ { value: male, color:"#9A3334", highlight: "#9A3334", label: "Male", labelFontFamily : "Arial", labelFontStyle : "normal", labelFontSize : 24, labelFontColor : "#666" }, { value: female, color: "#217C7E", highlight: "#217C7E", label: "Female", labelFontFamily : "Arial", labelFontStyle : "normal", labelFontSize : 24, labelFontColor : "#666" } ];
has answer: http://stackoverflow.com/a/26029406

http://stackoverflow.com/comment/40637150
type: Comment
score: 0
type: QuestionComment
has text: Doh! Hungry minds think much better ;). Thanks man
comment on: http://stackoverflow.com/q/25955717

http://stackoverflow.com/a/25898786
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25898661
type: Answer
answers question: http://stackoverflow.com/q/25898661
has comment: http://stackoverflow.com/comment/40552970
score: 1
upvote count: 1
has body: IIRC that method is broken. Try: $('#sliderInput').data('slider').getValue()

http://stackoverflow.com/a/25925525
has comment: http://stackoverflow.com/comment/40652692
has comment: http://stackoverflow.com/comment/40585175
has comment: http://stackoverflow.com/comment/40626493
answers question: http://stackoverflow.com/q/25924301
type: Answer
score: 0
has body: You need to explicitly tell your controller to include your scripts using the processOutput parameter of renderPartial(). When set, processOutput() is called which: Postprocesses the output generated by render(). This method is invoked at the end of render() and renderText(). If there are registered client scripts, this method will insert them into the output at appropriate places. If there are dynamic contents, they will also be inserted. This method may also save the persistent page states in hidden fields of stateful forms in the page. You should also uncomment $this-&gt;performAjaxValidation($model); and look at Yii renderpartial (proccessoutput = true) Avoid Duplicate js request if you use processOutput.
has comment: http://stackoverflow.com/comment/40612436

http://stackoverflow.com/comment/40605567
comment on: http://stackoverflow.com/a/25932930
has text: This is an invalid XML, I don't think SharePoint would generate this. You will need the namespaces defined for `rs:` and `z:` in the <xml> tag. Otherwise, remove `rs:` from `<rs:data>` element and `z:` from every `<z:row>` element (also change line `$("rs\\:data", xml).find("z\\:row").each(function() {` to `$("data", xml).find("row").each(function() {`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40510271
score: 0
type: AnswerComment
type: Comment
has text: yea im sorry i didnt check their instructions first, now it wont let me upvote untill you edit the answer.. so edit it a bit so i could upvote.. as i said, my bad
comment on: http://stackoverflow.com/a/25884828

http://stackoverflow.com/comment/40675226
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25976234
has text: Thanks for your answer jack.the.ripper, I will read that article and look into it more!

http://stackoverflow.com/q/25894879
favorite count: 0
has title: How to instantly invoke a handlerOut for the hover() function?
score: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25894936
has body: I'm new to Javascript &amp; jQuery in general. I have the following simple jQuery code snippet that changes/animates the width of a circle : &lt;script type="text/javascript"&gt; $("#circle").hover(function() { $(this).animate({width: "100%"}, 3000) },function() { $(this).animate({width: "100px"}, 3000) }); &lt;/script&gt; However, what I really want is to interrupt the handlerIn function(first one inside hover) and instantly invoke the handlerOut as soon as my mouse leaves the circle. Meaning, when I hover my mouse over the circle, the circle should animate(increase) the width, but as soon as my mouse leaves, it should animate back(decrease) to original width(as opposed to reaching 100% width and then returning back). Hope this makes sense. Thanks
type: Question
possible better answer: http://stackoverflow.com/a/25894961
has answer: http://stackoverflow.com/a/25894961
tagged with: javascript
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/25894936
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/40623641
has text: i need to use it in an `if` statement in another function.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25947350

http://stackoverflow.com/comment/40541716
type: QuestionComment
has text: You understood the problem, `this` is not what you think it is inside the callback, because thecallback function is executed from a different context. Just cache `this` to another variable and use it inside the callback.. Or in your controller just do:- `var viewModel = this` and use `viewModel` across instead of using `this`
comment on: http://stackoverflow.com/q/25902161
score: 1
type: Comment

http://stackoverflow.com/comment/40659741
type: Comment
type: QuestionComment
has text: The links above are not working with IE for some reason. Please try to open them with FF or Chrome
comment on: http://stackoverflow.com/q/25910114
score: 0

http://stackoverflow.com/comment/40620331
type: QuestionComment
has text: see if there is any console errors???
type: Comment
comment on: http://stackoverflow.com/q/25945923
score: 0

http://stackoverflow.com/comment/40639405
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25950812
has text: You have the values in two variables. I updated the comment in the code.
score: 0

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/25988531
type: Tag
tags question: http://stackoverflow.com/q/25917220

http://stackoverflow.com/q/25959408
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25959453
accepted answer: http://stackoverflow.com/a/25959453
has title: This Javascript doesn't work in IE but works in Chrome, Firefox and Opera
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40643357
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/3877027
tagged with: jquery
has body: I have an image and a spinner. I have written some code to say to remove the class 'spinner' when any img has loaded. It works well in Chrome, Firefox and Opera but not Internet Explorer. I'm on Windows 7 using Internet Explorer 11. I have created a very basic jsfiddle example here: http://jsfiddle.net/Forresty/o8v6xsze/ For some reason, it's not working in jsfiddle in any browser, so I'm not sure if what to make of that. I have tested it with a click function, so that if I click the image the spinner class is removed, and it works. So I think it's something to do with the loading side. I have some other javascript going on in my site that works so I don't think it's an IE specific issue. Here is the code: HTML: &lt;div class="spinner"&gt;&lt;/div&gt; &lt;img class="workImage" src="http://upload.wikimedia.org/wikipedia/commons/2/23/Lake_mapourika_NZ.jpeg"&gt; css: .workImage{ width: 500px; height: 500px; } .spinner{ width: 500px; height: 500px; background: red; } Javascript: $('img').on('load', function() { $("div").removeClass("spinner"); }) I've also tried this javascript: $('img').load(function() { $('div').removeClass('spinner'); }) I've no idea what I'm missing. Any help would be appreciated. Thanks.
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/25917094
answers question: http://stackoverflow.com/q/25917021
has body: you can't get it that way as the Page_Load is executed on server side and get executed waaay before onload get executed on client side
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/40667247
comment on: http://stackoverflow.com/q/25972386
type: QuestionComment
has text: Are you saying you end up with multiple copies? It seems to work fine for me here: http://jsfiddle.net/fa5dob0L/ Do you have other elements with the same `"wrapN"` classes? If so that would explain why extra copies appear.
score: 0
type: Comment

http://stackoverflow.com/comment/40633966
type: QuestionComment
has text: for aligning texts..you can use text-align:center, text-align:left, text-align:right
comment on: http://stackoverflow.com/q/25954171
score: 0
type: Comment

http://stackoverflow.com/q/25936096
tagged with: http://stackoverflow.com/tag/html
has body: I am creating an application that uses a timer to draw lines to several canvases while updating stats to DIVs. In order to create the smoothest animation possible I've had to set the setInterval() timer to the smallest delay possible, which from my understanding, is between 10-15 milliseconds across browsers. The issue I am having is with the stopwatch that tracks the scenarios running time. The stopwatch itself works well enough as I have established using console.log, however, the setInterval() timer slows down when I try to update the DOM element. This has lead me to believe that in combination with the small timer tick delay there is a performance issue with the way I am updating the DOM element. Code: function draw() { var drawTimer = setInterval(drawStuffTest, 15); var timer = doc.getElementById('time'); var milliseconds = 0; var seconds = 0; var minutes = 0; function updateTimer() { //clear the old elapsed time timer.innerHTML = ""; milliseconds += 15; //increment seconds if (milliseconds &gt;= 1000) { seconds++; milliseconds = 0; } //increment minutes if(seconds &gt;= 60) { seconds = 0; minutes++; } //Pad minutes and seconds with leading zeroes if either is lest than 10 var secondsString = ( seconds &lt; 10 ? "0" : "" ) + seconds; var minutesString = ( minutes &lt; 10 ? "0" : "" ) + minutes; var elapsedTime = minutesString + ":" + secondsString; /* The timer works fine when I just use console.log to display the timer however once I add the following statement to update the DOM element the timer slows down */ //timer.innerHTML = elapsedTime; console.log(elapsedTime); } Does anyone have any suggestions?
has comment: http://stackoverflow.com/comment/40602919
answer count: 0
has comment: http://stackoverflow.com/comment/40603052
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40603937
tagged with: dom
has comment: http://stackoverflow.com/comment/40603244
score: 0
has title: Javascript timer slows down when when repetitively updating DOM element inside setInterval()
tagged with: setinterval
has comment: http://stackoverflow.com/comment/40603626
has comment: http://stackoverflow.com/comment/40603009
has comment: http://stackoverflow.com/comment/40602984
has comment: http://stackoverflow.com/comment/40603996
type: UnansweredQuestion

http://stackoverflow.com/a/25985996
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25985984
score: 1
has body: I think you can try $('#content').load(href + ' #content &gt; *'); Note: If #content has any text nodes as its children(not descendants) then it may not work(the text nodes may not get copied) Demo: Fiddle Another solution is to manually remove the second wrapper, if it exists like $('#content').load('ajax.html' + ' #content', function () { if ($(this).children('#content').length) { $(this).contents().unwrap() } }); Demo: Fiddle
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25985984

http://stackoverflow.com/q/25893448
has answer: http://stackoverflow.com/a/25946488
type: Question
type: AnsweredQuestion
has title: require.js uncaught typeerror: cannot read property '__module_path__; of undefined
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25946488
tagged with: javascript
has body: So I've just started to try to get to grips with require.js and it doesn't seem to be working. When I include it in my html using the tag: &lt;script data-main="scripts/main" src="bower_components/require/build/require.js"&gt;&lt;/script&gt; I get the following error upon loading the page in chrome Uncaught TypeError: Cannot read property '__MODULE_PATH__' of undefined -&gt; require.js:538 In firefox I get a slightly different error: TypeError: parent is undefined -&gt; require.js:538 No idea how I could be causing this problem as It's a fresh install of require.js and I have no code in my main.js yet. Thanks in advance
favorite count: 0
score: 7
tagged with: requirejs
upvote count: 7

http://stackoverflow.com/q/26004412
has comment: http://stackoverflow.com/comment/40726455
has comment: http://stackoverflow.com/comment/40765808
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40726708
has comment: http://stackoverflow.com/comment/40726257
has answer: http://stackoverflow.com/a/26026698
answer count: 1
has comment: http://stackoverflow.com/comment/40751665
tagged with: javascript
has body: Using javascript I need to get the text and tokens from string like: "type":"homePhone","means":"$[createJohnRequest.contactInfo[type=homePhone].means]" Such that a regex will return: $[createJohnRequest.contactInfo[type=homePhone].means] I have a few attempts at this but none that work: /(\$\[(.*?]))/g will return: $[createJohnRequest.contactInfo[type=homePhone] /(\$\[(.*]))/g This works in the above case but is way too greedy for a case like: {"firstName":"$[user.firstName]","userName":"$[user.username1]","details": {"description":"this is $[user.username1] the $[user.username2] text th $[user.username3] at conta$[user.username4]ins the terms we want to find. $[final.object]"}} Ideally I want a single regex to match both in multiline text: some text here $[some.value.here]bunch of noisy text in between here some more text here$[some.value[index]goes.here]some more noise here $[some.value.here] and $[some.value[index].goes.here] Anyone have any ideas to point me in the right direction? I am leaning toward using $[some token]$ instead which is pretty simple to capture.
has comment: http://stackoverflow.com/comment/40726136
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40728152
has comment: http://stackoverflow.com/comment/40726157
upvote count: 2
has title: Regex matching Text with Square Brackets
type: UnansweredQuestion
tagged with: regex
has comment: http://stackoverflow.com/comment/40751620
tagged with: node.js

http://stackoverflow.com/a/25939258
has comment: http://stackoverflow.com/comment/40609294
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25938845
answers question: http://stackoverflow.com/q/25938845
has body: replace this line $('#slider ul').css({ width: sliderUlWidth, marginLeft: - slideWidth }); With this it will work $('#slider ul').css({ width: sliderUlWidth}); Edit 2 replace this line $('#slider').css({ width: slideWidth, height: slideHeight }); $('#slider ul').css({ width: sliderUlWidth}); $('#slider ul li:last-child').prependTo('#slider ul'); // this line to be changed To this $('#slider').css({ width: slideWidth, height: slideHeight }); $('#slider ul').css({ width: sliderUlWidth}); $('#slider ul li:first-child').prependTo('#slider ul'); // from :last-child to :first-child

http://stackoverflow.com/comment/40663297
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25942955
type: Comment
has text: If you can post it on jsfiddle or similar, I'll check if I get the same error

http://stackoverflow.com/q/25948762
downvote count: 1
has comment: http://stackoverflow.com/comment/40624692
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40624744
possible better answer: http://stackoverflow.com/a/25949298
score: 0
answer count: 2
has body: Can we access physical address (Mac Address) with php or javascript? For my site I have to identify each system (if on same network or different) uniquely. Thanks
upvote count: 1
has title: Can Physical Address be accessed with php or javascript.?
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40625090
has answer: http://stackoverflow.com/a/25949376
tagged with: php
accepted answer: http://stackoverflow.com/a/25949376
has answer: http://stackoverflow.com/a/25949298
has comment: http://stackoverflow.com/comment/40624684
type: AnsweredQuestion

http://stackoverflow.com/q/25876687
answer count: 1
tagged with: javascript
tagged with: jquery
has title: HTML table doesn’t refresh after Jquery ajax request
tagged with: ajax
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I want to cancel all user changes in the html form ( id=”edit_cat_frm”) (edit cells in tables, delete rows in table( id ‘cat_list’) and changes order with drag’n’drop) with reset button (id=”reset_edit_cat”), so I decide to do this with AJAX. Jquery ajax request is OK, but my main HTML table with id ‘cat_list’ doesn’t refresh after it. I can watch only old data in the table that were before AJAX request with all user changes. What is wrong? My jQuery code from edit_category.js. $("#reset_edit_cat").click(function(){ $('#name_cat').hide(); $('#desc_cat').hide(); $('#access2').hide(); $(' ').appendTo('body'); $.ajax({ type : "POST", cache : false, url : "ajax_request.php", data : { action: 'sel_all_cat'}, dataType : "json", success: function(jsonObject) { if (jsonObject.dat0 != "" && jsonObject.dat1 != "" && jsonObject.dat2 != "") { var dat0 = ' Назва Порядок показу '+ ' Спорідненість Порядок в табл. '+jsonObject.dat0+' '; var dat1 = ' Перегляд категорії Перегляд зображень Додавання зображень Голосування ' +' Відправлення листівок Читання коментар. Додавання коментар. '+jsonObject.dat1+' '; var dat2 = ' '+jsonObject.dat2+' '; $('#acs').html(dat1).hide(); $('#dsc').html(dat2).hide(); $('#cat_list').hide("drop", { }, 1000); $('#inner').html(dat0); $('#loading').remove(); $('#cat_list').show("clip", { }, 1000); } } }); }); Here is code from ajax_request.php public function select_all_cat($par) { $sql = "SELECT @i:=@i+1 as RowNumber, cat_id, cat_name, left(cat_description,256) as cat_desc, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_upload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment FROM myfotogallery_categories, (SELECT @i:=0) as RowNumberTable ORDER BY cat_order"; $row = $this->process($sql,true); if (array_key_exists('1', $row)) { $i=1; $subcat_info = $this->list_cat_for_subcat($row); foreach ($row as $value) { $rezult['dat0'] .= " ".PHP_EOL; $rezult['dat0'] .= " ".$value['cat_name']."".PHP_EOL; $rezult['dat0'] .= " ".PHP_EOL; $re…
has answer: http://stackoverflow.com/a/43114099
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40495322
tagged with: php
has comment: http://stackoverflow.com/comment/40495809
type: Question

http://stackoverflow.com/comment/40713551
has text: I wouldn't use a `for..in` to iterate other an array where a simple `for(var i = 0; i < array1.length; i++)` would suffice.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25997813
type: AnswerComment

http://stackoverflow.com/q/26001737
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: video
tagged with: dynamic
score: 0
accepted answer: http://stackoverflow.com/a/26001812
answer count: 1
tagged with: javascript
has title: Loading an HTML5 video player from Array
type: AnsweredQuestion
has body: I have an array of videos and I would like to load them into the set video player that is currently on the page. Here's what I have: var current = 0; var videos = ["01", "02", "03", "04"]; function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex ; // While there remain elements to shuffle... while (0 !== currentIndex) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function shuffleAll(){ shuffle(videos); } function loadVideo(){ var video = document.getElementById('video'); var mp4 = document.getElementById('mp4'); d = new Date(); mp4.src = "videos/" + videos[current] + '.mp4'; alert(mp4.src); video.load(); video.play(); } And my HTML: Load Video But I click my Load Video Button, and it doesn't do anything. What am I missing?
tagged with: arrays
has answer: http://stackoverflow.com/a/26001812

http://stackoverflow.com/a/25877375
score: 6
type: Answer
upvote count: 6
has body: The key of your property is actually "credentials.steam.accountName". You can't use dot-notation to traverse to the objects "credentials" or "steam", as these aren't objects. To access the values, use: rawCredentials['credentials.steam.accountName']. Edit: If you want to use rawCredentials.credentials.steam.accountName your JSON would have to look like this: rawCredentials = { credentials: { steam: {accountName: 'foo', ...} } }
downvote count: 0
answers question: http://stackoverflow.com/q/25877334
has comment: http://stackoverflow.com/comment/40496696

http://stackoverflow.com/comment/40675995
type: QuestionComment
comment on: http://stackoverflow.com/q/25934763
has text: The solution you provided below - using `.addEventListener("click", somefunction(), true)` and `preventDefault()` does what I want. Example ` something `: click anywhere on the image or caption, and there is an associated action (say lightbox with larger version of image) - the `` on the ` ` is effectively ignored.
score: 0
type: Comment

http://stackoverflow.com/comment/40503219
comment on: http://stackoverflow.com/a/25875346
score: 0
type: Comment
has text: Yes its possible, just select the element containing that text `var text = $('your wrap element').html();`
type: AnswerComment

http://stackoverflow.com/a/25916897
answers question: http://stackoverflow.com/q/25915766
type: Answer
has body: If you want to make it persistent across page refreshes and so on, you should use cookies, here you have a good example: How do I create and read a value from cookie?
has comment: http://stackoverflow.com/comment/40569553
score: 0

http://stackoverflow.com/q/25949085
type: Question
has answer: http://stackoverflow.com/a/25949156
tagged with: dictionary
accepted answer: http://stackoverflow.com/a/25949135
score: 0
answer count: 2
has title: JavaScript - How can I iterate object that is actually a map?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40625159
has body: I got a JSON object from the server that is actually: Map&lt;Integer, Integer&gt; How can I iterate over it and get the key and value in each iteration? Thanks!
has answer: http://stackoverflow.com/a/25949135
type: AnsweredQuestion
tagged with: jquery
tagged with: iteration
possible better answer: http://stackoverflow.com/a/25949156

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/25968003
tags question: http://stackoverflow.com/q/25922291
type: Tag
tags question: http://stackoverflow.com/q/25924301
tags question: http://stackoverflow.com/q/26021705
tags question: http://stackoverflow.com/q/25945655
tags question: http://stackoverflow.com/q/25972311

http://stackoverflow.com/comment/40496971
type: Comment
has text: Thank you. I did exactly this!
comment on: http://stackoverflow.com/a/25877006
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40628898
comment on: http://stackoverflow.com/q/25951476
score: 0
type: Comment
type: QuestionComment
has text: @KingKing Just tried that, but now it doesn't append or add. Score field remains constant with whatever the points were that round.

http://stackoverflow.com/comment/40660113
has text: If `preventDefault()` didn't work, then neither will `return false`. Also, this answer has the same syntax errors as OP's code
type: AnswerComment
type: Comment
score: 3
comment on: http://stackoverflow.com/a/25968080

http://stackoverflow.com/a/25913998
downvote count: 0
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: The Attributes property inherited from WebControl should allow you to add any attribute you want. ListItem listitem = new ListItem("text", "value"); listitem.Attributes.Add("data-value", "value"); listCtrl.Items.Add(listitem);
score: 2
answers question: http://stackoverflow.com/q/25913815
accepted answer of: http://stackoverflow.com/q/25913815

http://stackoverflow.com/comment/40693646
score: 1
type: AnswerComment
has text: Thank You! Works after changing to http:
type: Comment
comment on: http://stackoverflow.com/a/25985585

http://stackoverflow.com/comment/40647486
comment on: http://stackoverflow.com/a/25959644
has text: A map of sets is an interesting idea and should completely avoid stringifying (object properties are stringified even when numbers used). However how easily could that extend to arrays of N numbers?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40510431
type: Comment
type: AnswerComment
has text: You can accept the answer if that suits you by clicking on the tick next to it.
score: 0
comment on: http://stackoverflow.com/a/25879193

http://stackoverflow.com/q/25924106
downvote count: 2
score: -2
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40581659
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/40581653
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40581627
has comment: http://stackoverflow.com/comment/40581750
has comment: http://stackoverflow.com/comment/40581663
has comment: http://stackoverflow.com/comment/40581666
has body: what am I missing I've got error message : Uncaught ReferenceError: calculator_test is not defined index.html: Click the button test calculator.js: calculator_test = function(){ alert("factorial function is broken"); }
has title: Javascript : Uncaught ReferenceError: calculator_test is not defined
has answer: http://stackoverflow.com/a/25924340
type: Question

http://stackoverflow.com/q/25996668
has title: Grunt connect proxy rewrite not works in https
downvote count: 0
tagged with: javascript
has body: I try to create a connect proxy by this article. Almost everything is the same in my code, but I need to call something across https protocol. connect: { options: { port: 9000, hostname: '0.0.0.0', livereload: 35729 }, proxies: [{ context: ['/foo/product', '/foo/somethingelse'], host: 'non-https-domain.com', changeOrigin: true rewrite: { '^/foo': '' } },{ context: '/productImages', host: 'https-domain.com', https: true, port: 443, // just trying changeOrigin: true, rewrite: { '^/productImages': '' } }], livereload: { // the same like the article } } The /product and the /somethingelse works well, but the /productImages not. I need to call it like this: localhost:9000/productImages/lot/of/directory/and/finally/a/file.jpg and it should call the https://https-domain.com/lot/of/directory/and/finally/a/file.jpg the point is that without /productImages. But the replace never happened. Thanks in advance for the help!
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/40712190
has comment: http://stackoverflow.com/comment/40724304
tagged with: proxy
has answer: http://stackoverflow.com/a/26012765
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40711590
tagged with: grunt-connect-proxy
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40726374
upvote count: 1
accepted answer: http://stackoverflow.com/a/26012765
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40711685
score: 1
has comment: http://stackoverflow.com/comment/40711812
type: Question

http://stackoverflow.com/comment/40614100
score: 3
has text: I have to apologize. I feel like an idiot. I have a browser extension to turn javascript off and on a website. And I had it set to off.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25939375

http://stackoverflow.com/a/25940544
has body: If your MathRScore is in the interval (29.9, 34.9) then set the MathScore to (in simplified form) MathScore = 10*Math.round((MathRScore*9+265)/10) By dividing by 10, then using Math.round and then multiplying by 10 you will round to the nearest ten. For example 10*Math.round(1111/10) = 10*Math.round(111.1) = 10*111 = 1110
score: 3
accepted answer of: http://stackoverflow.com/q/25940358
has comment: http://stackoverflow.com/comment/40611615
upvote count: 3
answers question: http://stackoverflow.com/q/25940358
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/45902468
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25880243
has text: @BlueBells Always use `meteor`. `mrt` was deprecated a while ago. Note that I also updated the answer with the official bootstrap package.
type: AnswerComment

http://stackoverflow.com/comment/40547364
comment on: http://stackoverflow.com/q/25905103
type: Comment
type: QuestionComment
has text: Not related with question problem: you have a mess of pure JavaScript and jQuery. Also all these `onclick="StyleChange('font-style','italic')"` look outdated. I mean it is deprecated way to handle clicks. Also there are multiple same IDs - it's bad.
score: 1

http://stackoverflow.com/a/25928292
downvote count: 0
score: 1
upvote count: 1
has body: You're getting an unexpected token error because you're trying to define multiple functions within a parenthesized expression. Try this line in your console: (function one() {} function two() {}) What's going on here is you're trying to access async.series like it's an array or something: async.series[ ...index here... ] Then, for the index, you're passing an expression: async.series[ (...) ]; The expression fallaciously contains two function definitions: async.series[ ( function one() { ... } function two() { ... } ) ] A parenthesized expression is only supposed to return one value. Two functions will compete to be that return value and are therefore invalid. But what you're doing is all wrong in the first place. I think what you really mean is to call async.series, and pass an array of functions... async.series( [ function one() {...}, function two() {...} ] ); Your updated code might look like this fiddle.
type: Answer
answers question: http://stackoverflow.com/q/25927620

http://stackoverflow.com/q/26029574
has comment: http://stackoverflow.com/comment/40773326
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26029656
has comment: http://stackoverflow.com/comment/40771924
has title: How to stop AJAX function submit?
has comment: http://stackoverflow.com/comment/40788781
has comment: http://stackoverflow.com/comment/40771838
has comment: http://stackoverflow.com/comment/40774157
has body: I'm working on an AJAX function for my site. I'm facing three problems. My page has 2 JavaScript pop-up error message instead of 1 with the same message. Combine the two isset post in the PHP. It doesn't works for me If the message == success, how can it submit with the action in the form else it will stay in the same page. My HTML: My PHP: <?php if (!empty($_POST['email'] || ($_POST['email']="Enter Your Email Here")) { $status = 'success'; } else { $status = 'failed'; } echo json_encode(array('status' => $status)); ?>
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/40771785
has comment: http://stackoverflow.com/comment/40771792
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40771882
score: 0
has answer: http://stackoverflow.com/a/26029614
has answer: http://stackoverflow.com/a/26029636
has comment: http://stackoverflow.com/comment/40773312
possible better answer: http://stackoverflow.com/a/26029614
accepted answer: http://stackoverflow.com/a/26029636
has comment: http://stackoverflow.com/comment/40771893
has comment: http://stackoverflow.com/comment/40771998
upvote count: 1
has comment: http://stackoverflow.com/comment/40771848
tagged with: php
downvote count: 1

http://stackoverflow.com/comment/40617139
score: 0
type: Comment
type: QuestionComment
has text: @StephenC This is javascript. I requested removal of the java tag, because that's just confusing.
comment on: http://stackoverflow.com/q/25943729

http://stackoverflow.com/q/26001074
has comment: http://stackoverflow.com/comment/40720696
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40719880
has title: onClick populated by variable without triggering it
has comment: http://stackoverflow.com/comment/40720334
accepted answer: http://stackoverflow.com/a/26001118
tagged with: object
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26001118
has body: I want to append this to my document: $('#myDiv).append(" Do "); The snippet above has it's onClick populated by a certain object with properties, this: var extElementConfig={onClickDo:sampleFunc()}; Unfortunately declaring a function into the object property also fires it, as was expected. How can I achieve the above functionality without triggering the sampleFunc()? I just need to dynamically populate the onClick event through an object property.
possible better answer: http://stackoverflow.com/a/26001583
type: Question
has comment: http://stackoverflow.com/comment/40720062
answer count: 2
has answer: http://stackoverflow.com/a/26001583
has comment: http://stackoverflow.com/comment/40719908

http://stackoverflow.com/comment/40652779
comment on: http://stackoverflow.com/q/25962104
has text: @vlzvl By seeing that on the server side, the `foreach` does not print any `pass_back`, and in the `if-else` conditional expression, the `else` part is executed, i.e. "FALSE!" is echoed.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25890495
score: 0
tagged with: google-chrome
answer count: 1
has answer: http://stackoverflow.com/a/27750363
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40533232
has comment: http://stackoverflow.com/comment/40521260
linked to: http://stackoverflow.com/q/14028959
type: Question
has body: Hello I am developing with chrome extension, i am working with ebay search api... Following is my html code: eBay Search Results eBay Search Results javascript function _cb_findItemsByKeywords(root) { var items = root.findItemsByKeywordsResponse[0].searchResult[0].item || []; var html = []; html.push(' '); for (var i = 0; i < items.length; ++i) { var item = items[i]; var title = item.title; var pic = item.galleryURL; var viewitem = item.viewItemURL; if (null != title && null != viewitem) { html.push(' ' + ' ' + ' ' + ' ' + title + ' '); } } html.push(' '); document.getElementById("results").innerHTML = html.join(""); } // End _cb_findItemsByKeywords() function var url = "http://svcs.ebay.com/services/search/FindingService/v1"; url += "?OPERATION-NAME=findItemsByKeywords"; url += "&SERVICE-VERSION=1.0.0"; url += "&SECURITY-APPNAME=myappid"; url += "&GLOBAL-ID=EBAY-US"; url += "&RESPONSE-DATA-FORMAT=JSON"; url += "&callback=_cb_findItemsByKeywords"; url += "&REST-PAYLOAD"; url += "&keywords=harry%20potter"; url += "&paginationInput.entriesPerPage=3"; // Submit the request s=document.createElement('script'); // create script element s.src= url; debugger; document.body.appendChild(s); Following is manifest.json file { "manifest_version": 2, "name": "eBay", "description": "This extension demonstrates a 'browser action' with ebay products.", "version": "1.0", "browser_action": { "default_icon": "ebayicon.png", "default_popup": "MySample.html" } It gives my just tag as output.... and following is an error that occurs: **Uncaught TypeError: Cannot read property 'appendChild' of null ** I dont understand what exactly is it saying... Please help me understand above error. Thank you
tagged with: google-chrome-extension
has title: chrome extension javascript not working

http://stackoverflow.com/q/25895555
tagged with: css
has comment: http://stackoverflow.com/comment/40529441
has comment: http://stackoverflow.com/comment/40529388
linked to: http://stackoverflow.com/q/16157459
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25895749
has body: The HTML as seen in Firebug: &lt;div class="select-contain"&gt; &lt;select id="sel" name="sel" class="some-class"&gt; &lt;!-- &lt;option&gt;s --&gt; &lt;/select&gt; ::after &lt;/div&gt; With the CSS : .select-contain:after { background: image.jpg; position: absolute; /** ... */ } The result is something like this: The problem is that the image on the :after pseudo selector cannot be clicked to open the &lt;select&gt;. I tried doing something with jQuery: jQuery('.select-contain').click(function(e){ console.log(e); // the event is triggered succesfully jQuery(this).find('select').focus(); // .click() }); But this doesn't work due to the fact that I didn't find a reliable way of opening a &lt;select&gt; programmatically Is there any way that I can open the &lt;select&gt; with the pseudo element on top of it ?
type: Question
tagged with: javascript
tagged with: jquery
has title: Open below pseudo-element
accepted answer: http://stackoverflow.com/a/25895749
score: 0
answer count: 1

http://stackoverflow.com/a/25935697
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25935378
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25935378
has body: Please see here http://jsbin.com/muvagexabuto/1/edit you don't have to interpolate {{product.someNvalue}} inside ng-click &lt;input ng-repeat="product in products |unique:'soneNvalue'" ng-value="product.someNvalue" ng-click="$parent.someN = {someNvalue: product.someNvalue}" type="button" &gt;
type: Answer
has comment: http://stackoverflow.com/comment/40607872
downvote count: 0
score: 4

tabs
type: Tag
tags question: http://stackoverflow.com/q/25922776
tags question: http://stackoverflow.com/q/26027915
tags question: http://stackoverflow.com/q/25982933
tag name: tabs
tags question: http://stackoverflow.com/q/25978995
tags question: http://stackoverflow.com/q/26028933
tags question: http://stackoverflow.com/q/26013149
tags question: http://stackoverflow.com/q/26004916

http://stackoverflow.com/a/25951850
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40635545
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25951631
has body: Try this php code. /* code to select the coordinates from your databases here*/ $row = $result->fetch_assoc(); $DD = $row['lat'].','.$row['long']; echo ' ';

http://stackoverflow.com/q/26002311
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40722090
has body: I want to achieve desired output below with pure JavaScript since jQuery isn't available on the page where I am executing code. HTML: Item 1: tacos Output: tacos How can I achieve this? My failed attempt with jQuery: $("#firstDiv:not('b')").text().trim();
has comment: http://stackoverflow.com/comment/40722770
answer count: 1
has comment: http://stackoverflow.com/comment/40722741
favorite count: 0
has comment: http://stackoverflow.com/comment/40722540
has title: jQuery Selector equivalent for ":not"
has answer: http://stackoverflow.com/a/26002375
has comment: http://stackoverflow.com/comment/40722710
score: 2
type: AnsweredQuestion
upvote count: 3
has comment: http://stackoverflow.com/comment/40722554
accepted answer: http://stackoverflow.com/a/26002375
has comment: http://stackoverflow.com/comment/40723302
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40722864

http://stackoverflow.com/comment/40539238
comment on: http://stackoverflow.com/q/25900676
type: QuestionComment
score: 0
has text: isherwood thanks for the link but I have looked through those examples already and tried them out. As I've explained the JSON returned by Last FM's API is a little more complex than their perfect world examples.
type: Comment

http://stackoverflow.com/a/25952068
score: 0
has body: For the question about what happens when user click on "submit" button, generaly all the information included in your input are stored in php variable. I don't think you want to work with php, but this is as easy as it : &lt;form method = "post" action = "next.php"&gt; &lt;div&gt; &lt;input id = "id" name = "id" placeholder = "your id here..." /&gt; &lt;input id = "pass" name = "pass" placeholder = "your pass here..." /&gt; &lt;/div&gt; &lt;div&gt; &lt;input id = "btn_valid" value = "Valid information" /&gt; &lt;/div&gt; &lt;/form&gt; In this example, I made a short form, with two input to let user type his id and his password. If you specified the "name" tag (like I did in the two input "id" and "pass"), you will be able to get them in your php "next.php" file like this (in another page, in this case in the page "next.php") : &lt;?php $id = $_POST['id']; $pass = $_POST['pass']; ?&gt; Because you specified to go to "next.php" in the form parameters, you will be able to get these data by calling "$_POST['name-of-the-input']". And it works for all kind of element which can have a "name" tag ! Last information, a php file can contains html, javascript, or php code ! But you need to execute it via a server (like Xampp).
type: Answer
answers question: http://stackoverflow.com/q/25951751

http://stackoverflow.com/a/25893053
answers question: http://stackoverflow.com/q/25892711
accepted answer of: http://stackoverflow.com/q/25892711
score: 1
has body: @Bergi is correct. If you want a number between 3 and 7, one way to implement it is 3 + 4 * Math.random(), since Math.random() will return a number between 0 and 1 (excluding 1). Also, if you want to create a unique list for each ul, you can iterate over each ul and create a list for it like such: var $lists = $(".1,.2,.3"); $lists.each(function(index, list) { var arr = []; for (var i = 0, l = 4; i &lt; l; i++) { rand = (3+4*Math.random()).toFixed(2); arr.push('&lt;li&gt;'+10+ rand * 1+'&lt;/li&gt;') } $(list).append(arr); }); Fiddle here: http://jsfiddle.net/qpnf7pog/2/
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40624516
comment on: http://stackoverflow.com/q/25948674
type: QuestionComment
score: 4
has text: Imho that is a pretty bad thing to do (the storing of user credentials of other services). Can't you just use the public APIs of the services instead for your use case?
type: Comment

http://stackoverflow.com/comment/40643074
type: Comment
type: QuestionComment
has text: @dfsq PLease refer this.. i am having similar issue.. https://github.com/angular/angular.js/issues/1551
comment on: http://stackoverflow.com/q/25958946
score: 0

http://stackoverflow.com/q/25882257
has answer: http://stackoverflow.com/a/25882589
type: AnsweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/40505566
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40506243
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: What's inside scope, and attrs variables/objects?
has body: What is defined within scope and attrs variable there? How to see what's there? Also, how would I use scope variable to write to fields ID and scopeID? Also, why alert(scope.$id); keep pointing to 001? Don't I have 2 apps? At least 2 separate entities? button 1 button 2 My ID: {{ ID }} My Scope ID: {{ scopeID }} button 1 button 2 My ID: {{ ID }} My Scope ID: {{ scopeID }}
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25882589
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/q/26013455
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40742066
has title: jQuery.parseJSON giving error unexpected token
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40742001
has comment: http://stackoverflow.com/comment/40741950
has comment: http://stackoverflow.com/comment/40743876
type: Question
has answer: http://stackoverflow.com/a/26013953
has comment: http://stackoverflow.com/comment/40742075
has comment: http://stackoverflow.com/comment/40742156
tagged with: javascript
has body: I am getting this JSON from server "{"name": "abcd,e"abc"ssfgh", "location": {"latitude": 21.1484436189,"longitude": 79.093036862},"id": "12345"}" I know issue in this JSON is (") in the value of name. But problem is I cant change JSON(As I am getting it from server). So now how to parse it? I want to convert this JSON string to object. jQuery.parseJSON is giving error. Edit: Here is what I am doing to parse this JSON string var body_json = jQuery.parseJSON(JSONString);

http://stackoverflow.com/q/26022628
tagged with: javascript
has comment: http://stackoverflow.com/comment/40759118
accepted answer: http://stackoverflow.com/a/26022909
answer count: 1
favorite count: 0
tagged with: angularjs
has title: Converting object to array (angularjs and typeahead)
score: 2
has answer: http://stackoverflow.com/a/26022909
type: AnsweredQuestion
has body: Let's say I have an object that looks like this: {"1": "2", "3": "4"} I don't have direct access to this data, so when I bring it in via ajax how can I convert it to an array? Like so: [{"1": "2"}, {"3": "4"}] PS: I'm using this output data in an angular-ui typeahead which dislikes objects and only likes strings.
upvote count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/49809491
type: Question
has comment: http://stackoverflow.com/comment/40759078

http://stackoverflow.com/comment/40504765
type: Comment
has text: Mmmm... sorry... I think I'm noob. I still don't get it. Do you mean I can do like this: var matching = text.toLowerCase().search(/[keywords]/i); ??? Thanks again!!
comment on: http://stackoverflow.com/a/25881579
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40794970
type: AnswerComment
comment on: http://stackoverflow.com/a/26024208
type: Comment
has text: Have you already tried the try-catch, also list the "data.list.datalist" object structure
score: 0

http://stackoverflow.com/comment/40613834
has text: You're redefining `x`, overwriting its previous value. You have other problems, too, such as your definition for `z`, which doesn't do what your code comment says it does. Considering breaking this down and asking one more specific question.
comment on: http://stackoverflow.com/q/25941773
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25985675
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25985656
score: 3
answers question: http://stackoverflow.com/q/25985656
upvote count: 3
type: AcceptedAnswer
has body: There are disadvantages for places where you'd like to stop propagation of events. For example, a typical way of implementing a modal is to stop propagation of clicks on the modal, but then attach an event listener to document, whose role is to close the modal. If you only ever place events on body (or one element), this will be impossible. I can think of other cases where this inflexibility will become a hindrance, too. Also, it will be difficult to implement it perfectly, for example, consider this markup... Click me When the user clicks, the target element will be the span (most probably). This means when it propagates to body, you won't have the id attribute to match. You could ascend ancestor elements looking for the id, but then that's more work. Of course, for this example, you could place the id on the span, but hopefully the point I'm trying to make is clear.
type: Answer

http://stackoverflow.com/comment/43884337
type: QuestionComment
comment on: http://stackoverflow.com/q/25930531
score: 0
type: Comment
has text: @rtemperv did you ever figure this out? I'm getting this issue right now. Something interesting with mine is that I'm loading my svg from an angular directive. But when I move all my d3 code to just a static js file, zoom works fine on my iPhone.

http://stackoverflow.com/a/26025250
downvote count: 0
has body: The comparison a &amp;&amp; b actually returns the value the last value evaluated in the expression and not true or false. You can refer to the spec: The production LogicalANDExpression : LogicalANDExpression &amp;&amp; BitwiseORExpression is evaluated as follows: Let lref be the result of evaluating LogicalANDExpression. Let lval be GetValue(lref). If ToBoolean(lval) is false, return lval. Let rref be the result of evaluating BitwiseORExpression. Return GetValue(rref).
type: Answer
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/26025146

http://stackoverflow.com/comment/40700300
type: Comment
comment on: http://stackoverflow.com/a/25990216
type: AnswerComment
score: 0
has text: yeah sorry didnt noticed that change, i copy pasted your full code same error appears

http://stackoverflow.com/a/25994515
type: Answer
has comment: http://stackoverflow.com/comment/40708112
has body: It appears that there is no way of getting this information without testing with you video and checking whether the video's current time has advanced after it has loaded. It was asked for as a feature in modernizr but as you can see from this comment from Paul Irish, you have to have a video to check. It looks like they are trying to add this into v3 of modernizr. So essentially it is doable and his pseudocode should get you started. Basically the first four points are done already. You would just need to implement the last two. create a video element set video element src to something add autoplay attribute to it add element to the dom bind to that event (something metadata soemthing) that fires when its buffered some setTimeout after it fires and see if currentTime is &gt; 0
has comment: http://stackoverflow.com/comment/40707944
answers question: http://stackoverflow.com/q/25994016
score: 0

http://stackoverflow.com/comment/44667552
has text: @DarkNight let us know what you have done ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25909484

http://stackoverflow.com/q/25942730
answer count: 1
has answer: http://stackoverflow.com/a/25945023
has comment: http://stackoverflow.com/comment/40630892
has title: Collapsing animation effect not working (dissolving instead) - Fiddle inside
tagged with: animation
has comment: http://stackoverflow.com/comment/40617802
tagged with: css
has comment: http://stackoverflow.com/comment/40617257
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25945023
has body: I want the last two rows of the table in the fiddle to be hidden and stretch up with an animation when clicking on "see more". I've managed to get this far with the code - here's a fiddle But the animation is dissolving instead of stretching. what should I add (preferably with minimum code) to get such an effect? Also, HTML, CSS, and Jquery-wise, is the whole code in general the best practice in this case? for example, should I apply the .hidden class to the tr? I've tried wrapping these two rows in one DIV and apply the .hidden class to it, but it didn't work. CSS: .clk { cursor: pointer; } .clk:hover { color:#903; text-decoration:underline; } table, tr, td, th { border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; } .hidden { display: none; } HTML: 1 2 3 4 5 See More a b c d a a b c d a a b c d JS: $(document).ready(function(){ $('.clk').click(function(){ $('.hidden').toggle(700) }); })
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25978158
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40683167
has title: angular.copy() object has more data than original?
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
has body: This is driving me crazy. I have this setup where I have a controller which is linked to a block which gets ng-repeated in the template. this is in that controller: ctrl.original = angular.copy($scope.program); the $scope.program is getting created by the ng-repeat directive. Now there is a sub-array in the json I'm looping over called program_authorizations When I go to render that array in a template the another ng-repeat, it shows that it's an empty array. Viewing the response as raw json in the browser show's it's not. console.log() calls in the promise's .then() callback show it as empty. BUT when I do a reset, doing: ctrl.original = angular.copy($scope.program); the array is populated!! Super super weird. I can't figure it out. Any ideas?
has comment: http://stackoverflow.com/comment/40678573
tagged with: angularjs
type: UnansweredQuestion
tagged with: angular-promise

http://stackoverflow.com/q/26021443
has body: I'm using Backbone, Requirejs and Handlebars to manage my front-end structure. However I've run into a bump. Consider the following snippet: render: function() { var template = Handlebars.compile(TestViewTemplate); var srchtml = template({ test: 'hello' }); this.$el.html(srchtml); } Lets say this view is rendered multiple times in the website, executing the render function multiple times. Will calling the .compile method cause overhead as the view needs to be "recompiled" every time or does Handlebars save a cached copy of the template every time one is compiled? Should I pass around a Context object to all my View modules where I save the compiled templates and check if the template has already been compiled and if so, use the already compiled one and render that? Is there a standard way to deal with this? I'm really fresh with Handlebars, any advice is greatly appreciated!
tagged with: backbone.js
has title: Compiling templates every time I use them
has comment: http://stackoverflow.com/comment/40791185
tagged with: handlebars.js
tagged with: requirejs
accepted answer: http://stackoverflow.com/a/26462421
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26058476
has answer: http://stackoverflow.com/a/26058476
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40759055
has answer: http://stackoverflow.com/a/26462421
score: 0
answer count: 2

http://stackoverflow.com/a/25996593
answers question: http://stackoverflow.com/q/25996346
type: Answer
has body: The solution is to enable jshint's --verbose option, which shows the error or warning code (e.g. E020 for Expected '}' to match '{' or W110 for Mixed double and single quotes), then grep for errors only: jshint --verbose test.js | grep -E E[0-9]+.$
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25996346
has comment: http://stackoverflow.com/comment/40736129

http://stackoverflow.com/a/25937922
has body: For the first case, with the string selectors, you'd want to find \$\(\s*(["'][^"']*['"])\s*\)\.live\(([^,]*) and replace with $(document).on(\2, \1 (I haven't used visual studio in a while, so I don't know if it does regex, or if it uses \2 or $2 for substitution). For the second case, with a variable, you'd want: find ([^\s"()']+)\.live\(([^,]*) Note this one is more risky because any call to a .live method on an object will end up changed. Probably OK if you don't have any functions called live. In either case I'd probably do each replacement one at a time to make sure it's doing the right thing.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25937396
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25937396
has comment: http://stackoverflow.com/comment/40606309

http://stackoverflow.com/a/25886427
has comment: http://stackoverflow.com/comment/71984271
has body: Did you change the displayAppName parameter? That should be the name of your app. displayAppName: "Name of your app here", Quickly change it and release a new version on iTunes, that should solve the problem
type: Answer
has comment: http://stackoverflow.com/comment/71983232
answers question: http://stackoverflow.com/q/25886187
accepted answer of: http://stackoverflow.com/q/25886187
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40552044
score: 0
type: Comment
type: QuestionComment
has text: In the redraw function, have you tried moving the `svg.select(".grid")` block further up so that it's rendered first?
comment on: http://stackoverflow.com/q/25907798

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/25898968
tags question: http://stackoverflow.com/q/25943611
tags question: http://stackoverflow.com/q/25937796
tags question: http://stackoverflow.com/q/25926556
tags question: http://stackoverflow.com/q/25912206
tags question: http://stackoverflow.com/q/25886801
tags question: http://stackoverflow.com/q/25922119
tags question: http://stackoverflow.com/q/25905221
tags question: http://stackoverflow.com/q/25911625
tags question: http://stackoverflow.com/q/25920137
tags question: http://stackoverflow.com/q/25971532
tags question: http://stackoverflow.com/q/25896555
tags question: http://stackoverflow.com/q/25896335
tags question: http://stackoverflow.com/q/25922291
tags question: http://stackoverflow.com/q/26026082
tags question: http://stackoverflow.com/q/26013856
tags question: http://stackoverflow.com/q/25930843
tags question: http://stackoverflow.com/q/25986751
tags question: http://stackoverflow.com/q/25951060
tags question: http://stackoverflow.com/q/26017286
tags question: http://stackoverflow.com/q/25948322
tags question: http://stackoverflow.com/q/25993418
tags question: http://stackoverflow.com/q/25905152
tags question: http://stackoverflow.com/q/25999836
tags question: http://stackoverflow.com/q/25888185
type: Tag
tags question: http://stackoverflow.com/q/25987553
tags question: http://stackoverflow.com/q/25961823
tags question: http://stackoverflow.com/q/25884798
tags question: http://stackoverflow.com/q/25880285
tags question: http://stackoverflow.com/q/25909810
tags question: http://stackoverflow.com/q/26000937
tags question: http://stackoverflow.com/q/25950489
tags question: http://stackoverflow.com/q/25940657
tags question: http://stackoverflow.com/q/26026734

http://stackoverflow.com/comment/40665505
type: Comment
type: AnswerComment
has text: In this case, I just tested it. Then, cross-referenced with documentation, and the quote above can be interpreted like this.
score: 0
comment on: http://stackoverflow.com/a/25970461

http://stackoverflow.com/comment/40710241
comment on: http://stackoverflow.com/q/25995997
type: Comment
type: QuestionComment
score: 2
has text: What have you tried? I don't think you can render a PDF in the middle of an HTML document (though I could be mistaken, there may be some HTML5 element which might do this?), but one approach you might take is to render the selected PDF in an `iframe`.

http://stackoverflow.com/comment/128084706
score: 1
type: AnswerComment
has text: @Thamaraiselvam Most likely it is because react only sees the object as a pointer. So React can't recognize that the object has changed before the pointer changes.
type: Comment
comment on: http://stackoverflow.com/a/71250303

http://stackoverflow.com/comment/40746908
has text: Plupload doesn't have support for IE9, and moxie is based on it. angular-file-upload, as you can see [here](https://github.com/danialfarid/angular-file-upload/blob/master/dist/angular-file-upload.js) on line 89, also uses formData, which I want to avoid, because of the ie9 support.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26016195
type: Comment

http://stackoverflow.com/comment/40598240
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25933568
has text: Move alert outside from function (or better, leave only alert). And is there any errors in console?
type: Comment

http://stackoverflow.com/q/25940613
has answer: http://stackoverflow.com/a/31449084
has title: FulllCalendar Jquery, select inside day
answer count: 1
favorite count: 0
tagged with: view
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40651076
upvote count: 1
has comment: http://stackoverflow.com/comment/40633970
score: 1
tagged with: select
tagged with: fullcalendar
has body: I am using FullCalendar and I have to append a "select" to each day in a Month view. I got the select in each cell but it isn't expanding. If I expand the select programmatically(changing size) it gets expanded but I can't select any option. I can't select any text or element inside a Day Cell too. I think the cells are blocking something so clicks are working correctly JsFiddle: http://jsfiddle.net/L17jzba6/ I don't need any event, I use the calendar to pick information for each day and save it. $(document).ready(function() { var fechaHoy = new Date(); var fechaFormateada = $.format.date(fechaHoy, "yyyy-MM-dd"); $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: '' }, defaultDate: fechaFormateada, monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], dayNames: ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'], dayNamesShort: ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'], viewRender: function(view, element) { //var fecha = $.format.date(view.start._d, "dd-MM-yyyy"); //dia = fecha.substr(0, 2); //mes = fecha.substr(3, 2); //ano = fecha.substr(6, 4); $("td[data-date]:not(.fc-other-month):not(.fc-day-number)").each(function() { var fechaCelda = $(this).attr("data-date"); if ($(this).hasClass("fc-past")) { var html = ' 1 2 '; $(this).append(html); } else { var html = ' 1 2 '; $(this).append(html); } }); } }); });
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40615677

http://stackoverflow.com/a/25976289
type: Answer
upvote count: 1
has body: You should not use closest() method as it will travel up on DOM, not down. You need to use find() method for example: $(this).find('input[type="radio"]:checked').val();
answers question: http://stackoverflow.com/q/25976262
downvote count: 0
score: 1

http://stackoverflow.com/comment/40613626
score: 2
has text: Invalid quoting in the echoed tag.
comment on: http://stackoverflow.com/q/25941321
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25932485
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40598668
answers question: http://stackoverflow.com/q/25932393
score: 1
has comment: http://stackoverflow.com/comment/40602199
has comment: http://stackoverflow.com/comment/40597749
downvote count: 0
has body: You need to iterate through the array in angularjs, like this v.forEach(function(element){ console.log(element.data.car[0]);//Over here you can again iterate the car array, I have used the first element instead });

http://stackoverflow.com/comment/40762510
type: Comment
comment on: http://stackoverflow.com/a/26024239
type: AnswerComment
has text: Your second solution here is pretty much exactly what i just tried after talking with you in the comments. I threw a console.log('test') in there to watch it in the console. It does indeed show up 400ms after all my other logs, but the animation still only works once! frustrating.
score: 0

http://stackoverflow.com/a/41282267
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/79817402
has body: Try this: robot.hear /CAT/i, (msg) -&gt; msg.send "This is a URL - www.example.com/browse/cats" msg.finish() robot.hear /YELLOWBIRD/i, (msg) -&gt; msg.send "This is a URL - www.example.com/browse/yellowbirds" msg.finish() robot.hear /BIRD/i, (msg) -&gt; msg.send "This is a URL - www.example.com/browse/birds" msg.finish()
upvote count: 1
answers question: http://stackoverflow.com/q/26007149
type: Answer

jquery-countdown
tag name: jquery-countdown
type: Tag
tags question: http://stackoverflow.com/q/25933193

http://stackoverflow.com/comment/40547267
type: Comment
comment on: http://stackoverflow.com/a/25905039
type: AnswerComment
score: 0
has text: I tried inside method, but I'm getting the following error, Uncaught TypeError: Cannot read property 'value' of undefined

http://stackoverflow.com/q/25909457
has answer: http://stackoverflow.com/a/25909925
answer count: 3
has answer: http://stackoverflow.com/a/25910360
has answer: http://stackoverflow.com/a/25909740
linked to: http://stackoverflow.com/q/25922784
type: UnansweredQuestion
has title: Moving div moving whole page
has comment: http://stackoverflow.com/comment/40555008
has comment: http://stackoverflow.com/comment/40554876
score: 0
type: Question
has body: Place a few 'Moving' divs in my blog, but it moving my whole page, scrolling up & down (like the table cell) How to stop 'Moving' divs, moving the page? $(document).ready(function() { function moveDown() { $('.Fly').animate({'marginTop' : "+=100px"}, 1000,moveUp) } function moveUp(){ $('.Fly').animate({'marginTop' : "-=100px"}, 1000,moveDown) } moveUp(); });
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40496387
comment on: http://stackoverflow.com/q/25877169
has text: Also, you should not use for-in loops on arrays. http://stackoverflow.com/questions/500504/why-is-using-for-in-with-array-iteration-such-a-bad-idea
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25965068
has body: I'm extremely confused, I've taken a whole day to do something that should be very easy. I just want to call a Flash function from JavaScript - that's it. ActionScript Code: import flash.display.Loader; import flash.net.URLRequest; import flash.net.URLLoader; import flash.events.Event; import flash.external.ExternalInterface; import flash.net.FileReference; import flash.events.IOErrorEvent; import flash.events.Event; import flash.system.Security; Security.allowDomain("*"); ExternalInterface.addCallback("test", test); function test() { ExternalInterface.call("alert", "Doesn't Work"); } JavaScript/HTML Test Click Me! This doesn't work, the function 'test' does not exist for object 'Test' I thought I'd ask here as a last ditch effort. Here's my live example: http://itsclassified.info/flash/Test.html
has answer: http://stackoverflow.com/a/25966258
type: Question
tagged with: flash
tagged with: javascript
has comment: http://stackoverflow.com/comment/40686607
score: 0
answer count: 1
has title: Can't Call Flash AS3 Function From JavaScript
tagged with: actionscript-3
type: UnansweredQuestion

http://stackoverflow.com/q/25936416
has comment: http://stackoverflow.com/comment/40623172
answer count: 1
has answer: http://stackoverflow.com/a/25936570
accepted answer: http://stackoverflow.com/a/25936570
has title: Javascript fillRect does not draw from variable
type: AnsweredQuestion
type: Question
has body: How come context.fillRect(10, 10, 20, 20) fills a rectangle, but when using variables like player.x or player.y, it won't work? If I ask the value of player.x in the JavaScript console, it returns 300. But when using player.x in fillRect, JavaScript draws a blank. var canvas = document.getElementById("canvas") var context = canvas.getContext("2d") var player = {} player.x = 300 player.y = 80 window.addEventListener("load", function(){ context.fillRect(10, 10, 20, 20) //works as intended context.fillRect(player.x, player.y, 20, 20) //does not work }); http://jsfiddle.net/xy4h4obw/1/
tagged with: jsfiddle
tagged with: canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/40603772
score: 0

http://stackoverflow.com/comment/40744420
type: Comment
has text: @BVenky, it's ok!! Refer William's answer!
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26013856

http://stackoverflow.com/comment/40627033
has text: Hi, I changed theJquery UI version fromone on the fiddle to the "1.11.1" and it worked like charm. Thanks a lot for your help.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25950072
type: Comment

http://stackoverflow.com/comment/40660906
comment on: http://stackoverflow.com/a/25968695
type: Comment
score: 1
has text: Your regex will match `55,` or `55+`.
type: AnswerComment

http://stackoverflow.com/q/25957449
tagged with: http
has comment: http://stackoverflow.com/comment/40648528
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40640257
has comment: http://stackoverflow.com/comment/40658492
upvote count: 5
has comment: http://stackoverflow.com/comment/40640114
has body: I have a very basic http server: require("http").createServer(function (req, res) { res.end("Hello world!"); }).listen(8080); How can I listen for server crashes so I can send a 500 status code in response? Listening for process.on("uncaughtException", handler) works at process level, but I don't have the request and response objects. A possible solution I see is using try - catch statements inside of createServer callback, but I'm looking if there are better solutions. I tried listening for error event on server object, but nothing happens: var s = require("http").createServer(function (req, res) { undefined.foo; // test crash res.end("Hello world!"); }); s.on("error", function () { console.log(arguments); }); s.listen(8080);
has answer: http://stackoverflow.com/a/25980121
has comment: http://stackoverflow.com/comment/40639802
type: Question
score: 5
downvote count: 0
linked to: http://stackoverflow.com/q/10390658
tagged with: javascript
has comment: http://stackoverflow.com/comment/40639825
accepted answer: http://stackoverflow.com/a/25980121
answer count: 1
has title: Handle http server crashes
favorite count: 0
has comment: http://stackoverflow.com/comment/40646717
has comment: http://stackoverflow.com/comment/40640186
has comment: http://stackoverflow.com/comment/40645077
has comment: http://stackoverflow.com/comment/40640284
has comment: http://stackoverflow.com/comment/40650152
has comment: http://stackoverflow.com/comment/40639875

http://stackoverflow.com/q/25973100
answer count: 1
score: 0
has title: how to hide Default blank default value in dropdown list when changed
has body: I am loading the options in dropdown from the Database through ng-options.i have set a Default Blank value to that dropdown using option.When we change he option ,the default blank value should be hidden and should not be available to select again.It's working in Google Chrome but not in IE9 and 10.... Reason* Select Reason In the Above Code "Select Reason" is Disapperaing when we change the option In Google Chrome,but when we Run it in IE9 its not Disappearing and but I am able to disable that blank value by disabled="disabled".But it should Disappear on changing the option,How can we do this,please help
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25973488
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/40750532
type: Comment
type: QuestionComment
has text: Add success and error handlers to the Ajax call and see what is happening. We can not debug server issues.
score: 1
comment on: http://stackoverflow.com/q/26018053

http://stackoverflow.com/comment/40650152
has text: The example in [node's domain module's docs](http://nodejs.org/api/domain.html#domain_warning_don_t_ignore_errors) shows how to do this (this is **not** the express domain module).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25957449

http://stackoverflow.com/comment/40631250
comment on: http://stackoverflow.com/a/25952276
type: AnswerComment
score: 0
type: Comment
has text: Just to clarify. You would replace "userid", in the url in your comment with the users actual id. .

http://stackoverflow.com/q/25999134
has body: I have been trying to work with an object I am retrieving through an $http call and using to populate drop-down boxes. My object looks like this: {1: Item1 ↵L", 2: "Item2 ↵", 3: "Item3 ↵"} In my controller: $scope.data = {}; $http.get(baseUrl + "/Lookup/Get?param=Ref_myModel").success(function (result) { $scope.data.myModel = result }) .error(function (error) { $scope.data.error = error; }); Finally in HTML: &lt;select class="form-control" id="MonStatus" ng-model="data.myModel" ng-options="key as value for (key , value) in data.myModel"&gt;&lt;/select&gt; The select drop-down is populated with values from the model with no issue but as soon as the user selects a value, the value is replaced by the key. I have been reading through the documentation trying to understand ng-options however I am having some issues since all of the examples are using objects with proper key, value formats while I have a key and text.
answer count: 1
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/25999209
score: 2
type: AnsweredQuestion
type: Question
tagged with: ng-options
accepted answer: http://stackoverflow.com/a/25999209
downvote count: 0
tagged with: javascript
favorite count: 0
has title: AngularJS ng-options, working with key value pairs in

http://stackoverflow.com/a/25958446
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25958261
type: Answer
has body: Modern browsers support high precision timers with the Performance API. Look at these links: https://developer.mozilla.org/en-US/docs/Web/API/Performance http://www.w3.org/TR/hr-time/#sec-DOMHighResTimeStamp
has comment: http://stackoverflow.com/comment/40644264

http://stackoverflow.com/q/25962958
favorite count: 0
has comment: http://stackoverflow.com/comment/86129747
linked to: http://stackoverflow.com/q/3809862
has answer: http://stackoverflow.com/a/49275554
tagged with: http://stackoverflow.com/tag/html
answer count: 18
upvote count: 256
has answer: http://stackoverflow.com/a/55496999
has answer: http://stackoverflow.com/a/78340415
has answer: http://stackoverflow.com/a/58150722
has comment: http://stackoverflow.com/comment/40650384
has answer: http://stackoverflow.com/a/74735827
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/52370498
has comment: http://stackoverflow.com/comment/40650744
has answer: http://stackoverflow.com/a/56802660
has answer: http://stackoverflow.com/a/28019384
has answer: http://stackoverflow.com/a/25962978
has answer: http://stackoverflow.com/a/25963012
has answer: http://stackoverflow.com/a/67733958
has comment: http://stackoverflow.com/comment/40650168
has comment: http://stackoverflow.com/comment/40650169
type: Question
linked to: http://stackoverflow.com/q/46292718
has answer: http://stackoverflow.com/a/53890750
has comment: http://stackoverflow.com/comment/40650231
has comment: http://stackoverflow.com/comment/40650318
has comment: http://stackoverflow.com/comment/91683736
has answer: http://stackoverflow.com/a/58152287
score: 252
tagged with: javascript
has answer: http://stackoverflow.com/a/58257868
has answer: http://stackoverflow.com/a/64450148
has answer: http://stackoverflow.com/a/40382858
has comment: http://stackoverflow.com/comment/40650930
has comment: http://stackoverflow.com/comment/40650587
possible better answer: http://stackoverflow.com/a/58152287
has answer: http://stackoverflow.com/a/46881162
downvote count: 4
has comment: http://stackoverflow.com/comment/40650179
has title: Calling a JavaScript function in another js file
has answer: http://stackoverflow.com/a/61739997
has comment: http://stackoverflow.com/comment/40650644
accepted answer: http://stackoverflow.com/a/25963012
has comment: http://stackoverflow.com/comment/40650181
has body: I wanted to call a function defined in a first.js file in second.js file. Both files are defined in an HTML file like: I want to call fn1() defined in first.js in second.js. From my searches answers were if first.js is defined first it is possible, but from my tests I haven't found any way to do that. Here is my code: second.js document.getElementById("btn").onclick = function() { fn1(); } first.js function fn1() { alert("external fn clicked"); }

http://stackoverflow.com/a/26014367
has comment: http://stackoverflow.com/comment/40743965
has comment: http://stackoverflow.com/comment/40743637
has comment: http://stackoverflow.com/comment/40743645
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/26014326
has comment: http://stackoverflow.com/comment/40743486
downvote count: 1
has body: You have to init jQuery: &lt;script&gt; $(function() { $('.carousel').carousel({ interval: 1000 })​; } &lt;/script&gt; Or try with markdown into your div data-ride="carousel"
score: 0
has comment: http://stackoverflow.com/comment/40743673

http://stackoverflow.com/comment/40639066
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25956660
has text: I tried the 2nd solution and my application is working fine now. Thank you so much for your help! I'll vote up this solution the next time I can, currently I have too little reputation to vote your answer.
type: AnswerComment

http://stackoverflow.com/comment/40756949
comment on: http://stackoverflow.com/q/26021449
score: 1
has text: How about http://joelb.me/scrollpath/ or http://alvarotrigo.com/fullPage/#3rdPage ?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25989174
has title: Threejs Mesh scaling to renderer and not preserving aspect ratio
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: three.js
score: 2
has answer: http://stackoverflow.com/a/25990652
upvote count: 2
has body: I am using STLLoader plugin from threejs github this is my code snippet this.loadSTL = function(scene, stlFile){ var loader = new THREE.STLLoader(); loader.addEventListener('load', function(geometry, materials){ var geometry = geometry.content; var material = new THREE.MeshPhongMaterial({ambient: 0xff5533, color: 0xff5533, specular: 0x111111, shininess: 200}); var mesh = new THREE.Mesh(geometry, material); mesh.position.set(0, -0.9, 0); mesh.rotation.set(0, 0, 0); mesh.scale.set( 0.012, 0.012, 0.012); scene.add(mesh); }); loader.load(stlFile); } the problem here is the object I load through stl file increases/decreases in height based on the window resolution. is there something we need to set to keep width/height of the mesh constant and not varying with the screen/window resolution.
has answer: http://stackoverflow.com/a/26001828
type: Question

mongoose
tags question: http://stackoverflow.com/q/26013739
tags question: http://stackoverflow.com/q/25985096
type: Tag
tags question: http://stackoverflow.com/q/25941010
tags question: http://stackoverflow.com/q/25880978
tag name: mongoose
tags question: http://stackoverflow.com/q/25960641
tags question: http://stackoverflow.com/q/25990837
tags question: http://stackoverflow.com/q/26001413
tags question: http://stackoverflow.com/q/25989988
tags question: http://stackoverflow.com/q/25901798
tags question: http://stackoverflow.com/q/25971915
tags question: http://stackoverflow.com/q/25965535
tags question: http://stackoverflow.com/q/25880589

http://stackoverflow.com/q/25914628
has answer: http://stackoverflow.com/a/26840870
has body: I am using .click to show sub menu. But when I perform a click on the menu the submenu ie. the second &lt;li&gt; wont open. I don't know whats wrong Here is my code on JSfiddle. Now, what I need is: when I click on the menu the sub menu should open and when second one is clicked, it should open, but first child should disappear.
has comment: http://stackoverflow.com/comment/42074685
type: Question
has comment: http://stackoverflow.com/comment/40572212
possible better answer: http://stackoverflow.com/a/26744667
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26744667
tagged with: click
has answer: http://stackoverflow.com/a/26744731
score: 0
has answer: http://stackoverflow.com/a/26769801
answer count: 5
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42074579
has answer: http://stackoverflow.com/a/26744739
accepted answer: http://stackoverflow.com/a/26744731
has title: On click sub menu not showing
type: AnsweredQuestion

jquery-events
tag name: jquery-events
tags question: http://stackoverflow.com/q/25919955
tags question: http://stackoverflow.com/q/25945585
tags question: http://stackoverflow.com/q/25976214
tags question: http://stackoverflow.com/q/25883214
tags question: http://stackoverflow.com/q/25898554
type: Tag
tags question: http://stackoverflow.com/q/25954989
tags question: http://stackoverflow.com/q/25988656

http://stackoverflow.com/comment/40788800
score: 0
comment on: http://stackoverflow.com/q/25995353
type: Comment
type: QuestionComment
has text: I've looked on 3 machines using Chrome and none of them default to the second view. I'm not sure how you got so lucky.

http://stackoverflow.com/a/25913202
type: Answer
score: 2
upvote count: 2
has body: The solution was the trick @frank posted in his comment. Just do event.preventDefault() in a click handler for the overlay. Or the angular way ng-click="$event.preventDefault()". Also described here: Locking screen by z-index in windows phone Thanks for the help, guys, especially @frank
answers question: http://stackoverflow.com/q/25908492
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25908492

http://stackoverflow.com/q/25937212
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40605079
has body: I'm having a problem always when I'm trying to close a window through the window.close() method of the Javascript, while the browser displays the below message on the console: "Scripts may close only the windows that were opened by it." This occurs in every part of the page. I can run this directly of a link, button, or a script, but this message always are displayed. I'm tried to replace the window.close(); method for the functions (or variants of these) below, but nothing happened again: window.open('', '_self', ''); window.close();
score: 82
has answer: http://stackoverflow.com/a/72062490
has answer: http://stackoverflow.com/a/70607126
type: Question
has answer: http://stackoverflow.com/a/25937213
has answer: http://stackoverflow.com/a/25937500
has answer: http://stackoverflow.com/a/25937289
tagged with: javascript
answer count: 11
has answer: http://stackoverflow.com/a/76333878
has answer: http://stackoverflow.com/a/73284631
has answer: http://stackoverflow.com/a/66065528
has answer: http://stackoverflow.com/a/74051878
possible better answer: http://stackoverflow.com/a/25937289
tagged with: window
downvote count: 0
has title: window.close() doesn't work - Scripts may close only the windows that were opened by it
linked to: http://stackoverflow.com/q/19761241
tagged with: keyboard-shortcuts
upvote count: 82
accepted answer: http://stackoverflow.com/a/25937213
favorite count: 0
tagged with: shortcut
has answer: http://stackoverflow.com/a/73383680
has answer: http://stackoverflow.com/a/30504179

http://stackoverflow.com/comment/40721990
has text: sorry - an error on my part with the exampleform and examentry! i've just amended the code
comment on: http://stackoverflow.com/a/26002312
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26928381
upvote count: 0
answers question: http://stackoverflow.com/q/25928605
has comment: http://stackoverflow.com/comment/67372083
downvote count: 3
has body: Try wrapping the input elements in a form elements, like &lt;form&gt;&lt;input id="test1" readonly /&gt;&lt;/form&gt; &lt;form&gt;&lt;input id="test2" type="date" readonly /&gt;&lt;/form&gt; &lt;form&gt;&lt;input id="test3" type="time" readonly /&gt;&lt;/form&gt; Ios8 don't like input elements thats not wrapped in a form element, seems to be a bug in ios8.
has comment: http://stackoverflow.com/comment/42408780
score: -3
type: Answer

http://stackoverflow.com/q/25932151
has answer: http://stackoverflow.com/a/25932262
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25932262
has body: I have to calculate a simple quotient: log2(val1) / log2(val2) I´ve tried to this with: var valueOne = Math.log2(val1); var valueTwo = Math.log2(val2); var quotient = valueOne / valueTwo; Unfortunately,it do not work.As I found out, there are obviously browser compatibility problems with Math.log2 In Chrome, I get *'Uncaught TypeError: undefined is not a function'* How can now calculate the quotient?
has title: Calculate quotient with Logarithm log2
accepted answer: http://stackoverflow.com/a/25932292
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25932292
score: 1
type: Question
answer count: 2
upvote count: 1

http://stackoverflow.com/comment/40594003
type: AnswerComment
comment on: http://stackoverflow.com/a/25922939
score: 0
type: Comment
has text: Thank you for this---most appreciated. It all makes sense now.

http://stackoverflow.com/q/25986065
has answer: http://stackoverflow.com/a/26966309
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41485017
tagged with: ajax
accepted answer: http://stackoverflow.com/a/26966309
has title: Adding and triggering a bootstrapvalidator on result from ajax query
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: AnsweredQuestion
has body: I have the following login form : Login to AppName Log me in with the bootstrapvalidator initialised like this: var oScope = $(oForm).is('form') ? oForm.parent() : null; $('form[data-validate="true"]', oScope).bootstrapValidator({ container: 'popover', excluded: [':disabled', ':hidden', ':not(:visible)'], feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, live: 'enabled' }).on('success.form.bv', function(e) { // Prevent form submission e.preventDefault(); // Get the form instance var oForm = $(e.target); oForms.submitForm(e, oForm); }); The defined validations work fine and the form can be submitted without issue. if the server-side script that handles the form encounters an error (invalid password, too many login attempts, etc) it send a response containing a custom X-App-Whatever header containing a json object as below: { "errors":{ "username":[ "Your username is invalid." ] }, } I have no issues accessing the data in the header and I'm really looking for the bootstrap validation options for attaching validation to form elements after the form has been posted. As I am not sure what the server may complain about on any particular form submission, is there a clean way to trigger the error state on the field's bootstrap validator instance and inject the error message sent by the server into the popover that appears on the field that is in error? I'm not sure the remote validation is the right choice as it requires that the validation type is predefined in the form.
score: 3
upvote count: 3
type: Question

http://stackoverflow.com/q/25955028
type: Question
has comment: http://stackoverflow.com/comment/40635485
score: 1
has body: I am working on a HTML5 game and I have a function that should load an image and append it to an array for later displaying to a canvas. The code for the loading function is here... function loadImage(url) { box.images.total++; image = new Image(); image.src = url; image.onload = function () { box.images.loaded++; }; box.images[box.images.length] = image; } The code for the holding array is here... var box = new Object({}); box.images = new Array([]); And the rendering code is here... loadImage("images/background.png"); while (box.images.loaded&lt;box.images.total) {console.log("lol");} box.ctx.drawImage(box.images[0], 0, 0); My hope was that this would attempt to load the set of images and would increase the counter each time. Then when an image loads it would increase the loaded counter and then once all of the code has run the rest of the code would run. But I get an error saying "function was found that matched the signature provided" and the array appears to contain an empty element. Also i'm in Chrome on Xubuntu 12.04 Update It turns out that the image was being put in index 1 not 0 and that was why the image wasn't loading. But it still doesn't render the image please help. Another Update So it turns out that both total and loaded were NaN and so the while loop wasn't able to load at all. I set them to zero and the wile loop didn't terminate and it crashed my browser tab.
accepted answer: http://stackoverflow.com/a/25955126
tagged with: html5-canvas
answer count: 1
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/40635467
tagged with: javascript
has title: Javascript object not setting image to an array
favorite count: 0
has comment: http://stackoverflow.com/comment/40635507
has comment: http://stackoverflow.com/comment/40635445
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25955126
upvote count: 1

http://stackoverflow.com/comment/40708269
has text: Works perfectly, thank you. I'll accept as soon as it lets me.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25995083

http://stackoverflow.com/a/25998791
score: 0
type: Answer
has body: Or you can use :nth-child selector with a proper equation [Docs][1]. $('.filter tr:nth-child(n+6)').hide() table { border: 1px solid black; margin-bottom: 10px; } 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 [1]: http://api.jquery.com/nth-child-selector/ $('.filter tr:nth-child(n+6)').hide()
answers question: http://stackoverflow.com/q/25998392

http://stackoverflow.com/comment/40712810
has text: Did you miss that you had to use save/restore before/after clipping ? Maybe you just didn't understood that canvas is a state machine == you have to watch for canvas's state by yourself.
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25996633

http://stackoverflow.com/a/25910306
has comment: http://stackoverflow.com/comment/40556577
has comment: http://stackoverflow.com/comment/40588376
has body: Maybe you could use ajax to get the content of the file 'index.html'. A snippet like this: $.get("index.html", function( data ) { $.('body').append('&lt;div id="cover"&gt;' + data + '&lt;/div&gt;'); }); could be placed at the line in question. Replace 'body' with whatever suits to your needs. The snippet can be certainly improved, but for now it should give you an idea. I'm not aware of other possibilities to read files with JavaScript on the client side. Or now I see, better make it: $.get("index.html", function( data ) { $('&lt;div/&gt;', { id: 'cover', innerHTML: data }).appendTo(document.documentElement); }); within the if-condition. I'm not completely sure what you want to make, but it seems that you want to append it to the element with ID 'index'. Than you should change that appropriately in the last line. EDIT: Here are some slight changes: $.get("index.html", function( data ) { $('&lt;div/&gt;', { id: 'cover', html: data // this was making the problem }).appendTo(x); // append to the element saved in the variable x }, "html"); // state explicitly that the payload of data is HTML that make the snippet working for me.
has comment: http://stackoverflow.com/comment/40556254
answers question: http://stackoverflow.com/q/25909314
downvote count: 0
has comment: http://stackoverflow.com/comment/40577375
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/40589515
has text: I tried setting withCredentials to true but I got the same error.
comment on: http://stackoverflow.com/a/25924543
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/26001614
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/26001949
has comment: http://stackoverflow.com/comment/40720744
tagged with: javascript
tagged with: validation
has comment: http://stackoverflow.com/comment/40720772
tagged with: zurb-foundation
has comment: http://stackoverflow.com/comment/40720784
favorite count: 0
has answer: http://stackoverflow.com/a/26001949
has answer: http://stackoverflow.com/a/26001855
accepted answer: http://stackoverflow.com/a/26001855
has title: Regex for a min number value of 125?
tagged with: input
tagged with: regex
answer count: 4
has answer: http://stackoverflow.com/a/44720928
type: AnsweredQuestion
score: 2
has body: I have an input that requires a minimum number value of 125. I am new to regex, and using Foundation's Abide for validation which as far as I can tell does not have specific mix/max support. I was hoping for a regex to set in the pattern attribute. Any solutions? Thanks!
upvote count: 3
has comment: http://stackoverflow.com/comment/40725676
has answer: http://stackoverflow.com/a/26001915

http://stackoverflow.com/q/25931108
accepted answer: http://stackoverflow.com/a/25970807
has comment: http://stackoverflow.com/comment/40636484
type: Question
tagged with: javascript
score: 0
has title: Code inserting into database twice
answer count: 1
has answer: http://stackoverflow.com/a/25970807
tagged with: alloy-ui
type: AnsweredQuestion
tagged with: liferay-aui
has body: I have the form &lt;aui:form action="&lt;%= editURL %&gt;" method="POST" name="fm"&gt; &lt;aui:fieldset&gt; &lt;aui:input name="name" /&gt; &lt;aui:input name="url" /&gt; &lt;aui:input name="address" /&gt; &lt;/aui:fieldset&gt; &lt;aui:button-row&gt; &lt;aui:button type="submit" /&gt; &lt;aui:button name="cancel" value="Cancel"/&gt; &lt;/aui:button-row&gt; &lt;/aui:form&gt; and this piece of javascript code which is inserting into database twice I don't know why. &lt;aui:script use="aui-base,aui-form-validator,aui-io-request"&gt; AUI().use('aui-base','aui-form-validator',function(A){ var rules = { &lt;portlet:namespace/&gt;name: { required: true }, &lt;portlet:namespace/&gt;url: { url: true }, &lt;portlet:namespace/&gt;address: { required: true }, }; var fieldStrings = { &lt;portlet:namespace/&gt;name: { required: 'The Name field is required.' }, &lt;portlet:namespace/&gt;address: { required: 'The Address field is required.' }, }; alert("validator"); new A.FormValidator({ boundingBox: '#&lt;portlet:namespace/&gt;fm', fieldStrings: fieldStrings, rules: rules, showAllMessages:true, on: { validateField: function(event) { }, validField: function(event) { }, errorField: function(event) { }, submitError: function(event) { alert("submitError"); event.preventDefault(); //prevent form submit }, submit: function(event) { alert("Submit"); var A = AUI(); var url = '&lt;%=editURL.toString()%&gt;'; A.io.request( url, { method: 'POST', form: {id: '&lt;portlet:namespace/&gt;fm'}, on: { success: function() { alert("inside success");// not getting this alert. Liferay.Util.getOpener().refreshPortlet(); Liferay.Util.getOpener().closePopup('popupId'); } } } ); } } }); }); &lt;/aui:script&gt; However if I add the following piece of code, which is redundant because it is already present inside the submit block of above code and is not triggered any way because I do not have any save button in the form, then the value is inserted only once. &lt;aui:script use="aui-base,aui-io-request"&gt; …
tagged with: java

http://stackoverflow.com/q/25883980
has comment: http://stackoverflow.com/comment/40510023
type: Question
has comment: http://stackoverflow.com/comment/40510063
has comment: http://stackoverflow.com/comment/40508824
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/40508429
has title: How Object.observe() is different?
downvote count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/126322210
answer count: 0
has body: I understand that Angular uses dirty checking and Ember attach some watcher to the objects to detect changes. My question is how Object.observe() detect the change? How does it know when to trigger? Doesn't it also have some watcher like thing in prototype?
score: 1
has comment: http://stackoverflow.com/comment/126322623
tagged with: object.observe

http://stackoverflow.com/a/25880999
score: 0
type: Answer
has body: You need to have a view to render in the Application#index action. Your routes.rb file is hitting the ApplicationController's #index action, which defaults to render :index if you don't set your own render or redirect action. Your error is from Rails being unable to find this view. The easiest way to get that is to create an application folder under views and make a bare-bones index.html.erb. This will default to using the application.html.erb layout file in app/views/layout, which should link your application.js manifest, which should list your Angular files. \_ app \_ views \_ application | - index.html.erb \_ layouts | - application.html.erb As long as your combined app/views/application/index.html.erb and app/views/layout/application.html.erb have ng-app and ng-view defined, you should be able to see your Angular code running.
answers question: http://stackoverflow.com/q/25878416

http://stackoverflow.com/comment/40725351
has text: i didnt get what you are trying to ask
score: 0
type: Comment
comment on: http://stackoverflow.com/a/26003873
type: AnswerComment

http://stackoverflow.com/q/25887259
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25887830
accepted answer: http://stackoverflow.com/a/25887830
has title: date.setHours() not working
has answer: http://stackoverflow.com/a/25887345
type: Question
tagged with: javascript
tagged with: datetime
has answer: http://stackoverflow.com/a/25887983
has body: I am trying to subtract hours from a given date time string using javascript. My code is like: var cbTime = new Date(); cbTime = selectedTime.setHours(-5.5); Where selectedTime is the given time (time that i pass as parameter). So suppose selectedTime is Tue Sep 16 19:15:16 UTC+0530 2014 Ans I get is : 1410875116995 I want answer in datetime format. Am I doing something wrong here? Or there is some other solution?
possible better answer: http://stackoverflow.com/a/25887345
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25887389
has answer: http://stackoverflow.com/a/25887490
score: 6
upvote count: 7
downvote count: 1

http://stackoverflow.com/q/26006216
has title: Javascript - Downloading all Media on page
tagged with: javascript
tagged with: image
has answer: http://stackoverflow.com/a/26006689
has comment: http://stackoverflow.com/comment/40729544
linked to: http://stackoverflow.com/q/16245767
downvote count: 0
answer count: 1
tagged with: jquery
tagged with: media
favorite count: 0
tagged with: download
type: UnansweredQuestion
has body: As a side project, I made an image gallery that parses a page for media elements and displays them neatly on a page. I'd like to create the option to download every media object with just one action. So imagine a page has 50 images on it, each one not hosted locally. Is there a way to start a download where all 50 images are bundled together into one folder/tar? Bonus points: At this point, all the media will have already been downloaded/loaded onto the page. It'd be awesome if this download action doesn't need to re-fetch all the data for each object.
has comment: http://stackoverflow.com/comment/40729832
score: 1
has comment: http://stackoverflow.com/comment/40730107
upvote count: 1
type: Question

http://stackoverflow.com/q/25994653
has title: Angular - ngChange triggers before ngModel for
answer count: 1
linked to: http://stackoverflow.com/q/22669400
favorite count: 0
has answer: http://stackoverflow.com/a/25995567
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40708224
accepted answer: http://stackoverflow.com/a/25995567
has body: I found this related topic, where the answer suggests to watch for the model change instead of the change of the select. But in my example the "model" is part of an object inside a list. Is the correct way to initialize $watchfor every object in the list? Select A B C changeStatus I need to update the object or already receive the correct object in the change method. main.changeStatus = function(obj) { var r = new Resource(obj); ... r.$save({...}, function (savedObj) { ... }); } What's the correct way to solve this issue? thanks Edit: I guess I didn't ask the correct question. The posted code doesn't achieve what I am looking for, because the change method gets executed before the model is updated, therefore I send the incorrect/old object to the backend. Now there are a couple of ways to fix that Create a new variable and use it as the model Iterate through the list of objects and $watch every status attribute Another to me unkown way? Idealy I get the new object to the change method, but I don't know how. Edit2: I tried to write a fiddle to make it clear, but it works there. I need to look deeper into my code, because the problem seems to be somewhere else.
type: Question
tagged with: angularjs-directive
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40707636
has comment: http://stackoverflow.com/comment/40707549

http://stackoverflow.com/q/25924704
has body: So this question has been asked before, but I keep getting errors in my output. So, escaping text in jade. I have this markup .left :markdown each post in site.posts a.post(href='#' + post.title) h2= post.title The a tag will anchor scroll to the corresponding post. Now I want to escape that the post.title inside of the href so that the spaces are removed. Now I've seen answers like this and this, but both of them throw errors when I try to compile everything. The custom filter throws and error saying unknown filter and the second one throws this error Unexpected token ILLEGAL Potentially unhandled rejection [152] SyntaxError: /Users/mhartington/Github Repos/ionic-node-faq/views/index.jade:14 12| :markdown 13| each post in site.posts &gt; 14| a.post(href='#' + #{post.title}) 15| h2= post.title 16| .right 17| each post in site.posts Any ideas on what I'm doing wrong?
linked to: http://stackoverflow.com/q/20486190
has title: Escaping text in jade
has answer: http://stackoverflow.com/a/25925464
tagged with: node.js
tagged with: escaping
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25925464
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/6926247
tagged with: pug
answer count: 1

http://stackoverflow.com/comment/40759023
comment on: http://stackoverflow.com/q/26022531
type: Comment
has text: window.foo() and then access with window.data. data becomes a global variable.
score: 0
type: QuestionComment

http://stackoverflow.com/q/26025612
has comment: http://stackoverflow.com/comment/40764956
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40765075
has comment: http://stackoverflow.com/comment/40764911
score: 0
has answer: http://stackoverflow.com/a/26027282
answer count: 1
has title: Jquery ui function level scoping
has comment: http://stackoverflow.com/comment/40765222
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40764842
has body: I'm following along this example: http://jqueryui.com/slider/#slider-vertical I've copied the exact code (changing the div/input names to my own) from this example into another webpage, but chrome throws a Uncaught TypeError: undefined is not a function and the slider never appears. The exact code that does not work: $(function() { $( "#timeframe_slider" ).slider({ orientation: "vertical", range: "min", min: 0, max: 100, value: 60, slide: function( event, ui ) { $( "#month_week" ).val( ui.value ); } }); $( "#month_week" ).val( $( "#timeframe_slider" ).slider( "value" ) ); }); When I change the code from what the example has to simply: $( "#timeframe_slider" ).slider({ orientation: "horizontal", range: "min", min: 0, max: 1, value: 0, slide: function( event, ui ) { if (ui.value === 0) { $( "#month_week" ).val("Month"); } else { $( "#month_week" ).val("Week"); }} }); it works perfectly. I'm fairly new to javascript, but I understand that having: $(function() { code goes here }; is to ensure that the page is ready. Can someone explain why when attempting to use the example the .slider() function suddenly does not work? UPDATE This problem does not appear when trying to recreate it in jsfiddle.. Here's exactly what I'm looking at however:
has comment: http://stackoverflow.com/comment/40764907
type: Question
has comment: http://stackoverflow.com/comment/40765140
tagged with: jquery-ui

http://stackoverflow.com/comment/40625685
score: 0
type: Comment
has text: @Garima: JSON only gives you the two choices here: Either it's an array, which means the keys are implied, start with 0, and continue consecutively; or it's an object, the keys must be given explicitly, and can be any string. There's no way, in JSON, to represent an array with keys that don't start at 0, or sparse arrays. You'll need to ensure that what you're serializing ends up as a JSON array, or you'll have to handle an object at the receiving end. Side note: In the JavaScript that receives this, if you use an object, you can get an array of its keys using `Object.keys`; might be useful.
type: AnswerComment
comment on: http://stackoverflow.com/a/25949316

error-handling
tags question: http://stackoverflow.com/q/25950085
tags question: http://stackoverflow.com/q/25940838
tags question: http://stackoverflow.com/q/25949554
tag name: error-handling
tags question: http://stackoverflow.com/q/26020578
tags question: http://stackoverflow.com/q/25883381
type: Tag
tags question: http://stackoverflow.com/q/25978111

http://stackoverflow.com/comment/40680471
type: QuestionComment
has text: I think this is a Windows issue, but I might be wrong. Unlike most Unix OS, Windows uses UTF-16 encoding, and Unix uses UTF-16.
comment on: http://stackoverflow.com/q/25977206
score: 0
type: Comment

http://stackoverflow.com/q/25969539
tagged with: javascript
has title: Passing object from Javascript to PHP using AJAX
has answer: http://stackoverflow.com/a/25969596
score: 0
answer count: 1
favorite count: 0
tagged with: ajax
has body: Object: var obj = [{id: 1, name: "Peter", lastname: "Griffin"}] Javascript: $.ajax({ method: 'post', url:'http://api/test.php', data: { func: "addtodatabase", objectToBePassed: obj //also tried JSON.stringify(obj) }, success: function(data) { //code here } }); PHP: $data = json_decode($_REQUEST['objectToBePassed'], true); I can't seem to make it work. Help?
accepted answer: http://stackoverflow.com/a/25969596
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40662456
upvote count: 1
downvote count: 1
type: Question
tagged with: object

http://stackoverflow.com/comment/40729744
score: 0
type: Comment
has text: What is the actual problem you need to solve? What you are asking for seems to be an attempt at a solution to an untold problem.
type: QuestionComment
comment on: http://stackoverflow.com/q/26006385

http://stackoverflow.com/q/25966790
accepted answer: http://stackoverflow.com/a/25966813
has body: Hoping someone can help me with this challenge. I request JSON data from the server using $http.get(); The data from the server returns an object. One value in the object contains HTML markup. This markup is injected to the page using &lt;div ng-bind-html-unsafe="content" /&gt; Within the markup, there is a custom directive named &lt;poll /&gt; Using the standard AngularJS directive structure, it does not pick up the directive and link it. How can I compile this HTML once retrieved from the server and call the link function on the directive? Thanks!
has title: Compile directive that is injected from a JSON file AngularJS
tagged with: javascript
type: AnsweredQuestion
score: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/25966813
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
answer count: 1

http://stackoverflow.com/q/25912199
has comment: http://stackoverflow.com/comment/40560256
has comment: http://stackoverflow.com/comment/40564025
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40560049
has title: angular http get request through service needs refresh to show data
has answer: http://stackoverflow.com/a/25914137
tagged with: http
has comment: http://stackoverflow.com/comment/40562220
type: Question
has comment: http://stackoverflow.com/comment/40562295
tagged with: javascript
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/40561903
score: 0
answer count: 1
tagged with: angular-http
has body: I found many similar questions but I couldn't apply the solutions to my problem. So in my angular app I am drawing nvd3 charts. I am doing a get request in the service and I can see from the network in my browser that I am ALWAYS getting the chart data as I am supposed to. The problem is that, when I am running grunt serve to start my angular app, I am still getting the data through the api, but for some reason they are not shown. That just happens only when I run grunt serve. However, if I hit refresh, after running grunt serve, the data are shown correctly. Thanks in advance for any help. this is what I am trying to do: 'use strict'; angular.module('myApp') .service('mainService', function($http) { this.getData = function() { return $http({ method: 'GET', url: '/rest/api/config', }); } }) .controller('MainCtrl', function($scope, $http, mainService) { var name = 'main'; var model; mainService.getData().then(function(d) { model = d.data; $scope.modelling(); }); $scope.modelling = function() { if(!model) { console.log("no model"); // set default model for demo purposes model = { title: "about", structure: "12/4-4-4", }; } console.log(model); $scope.name = name; $scope.model = model; $scope.collapsible = true; } });
tagged with: angularjs

http://stackoverflow.com/comment/40496527
has text: @Will: Yes it works, thank you for the demo, but still the problem remains, how do I make sure it appears on my demo?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25876195
score: 0

http://stackoverflow.com/q/25880589
upvote count: 1
downvote count: 0
has body: In region.server.model.js I want to have var RegionSchema = new Schema({ name: {type: String}, user: {type: Schema.ObjectId, ref: 'User'}, bases: [BaseSchema] }); mongoose.model('Region', RegionSchema); And in another file named base.server.model.js I want to have var BaseSchema = new Schema({ name: {type: String}, region: {type: Schema.ObjectId, ref: 'Region'} }); mongoose.model('Base', BaseSchema); It is crashing with bases: [BaseSchema] ^ ReferenceError: BaseSchema is not defined I cannot figure out how in mean.js to relate or link these two files. Thank you!
tagged with: mongoose
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25880732
has title: How can I separate mongoose subdocument into seperate files?
tagged with: node.js
has answer: http://stackoverflow.com/a/25880732
tagged with: nosql
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25880744
score: 1
accepted answer: http://stackoverflow.com/a/25880744
type: Question
tagged with: mongodb
answer count: 2

http://stackoverflow.com/q/25921809
has answer: http://stackoverflow.com/a/25921993
linked to: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/40578050
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25921993
has answer: http://stackoverflow.com/a/25922939
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Dynamically loop JSON and show and hide object elements after set interval
type: AnsweredQuestion
has body: JavaScript/jQuery newbie here... I am working towards looping through a JSON file and succesively render top-level items using jQuery. The aim here is to display individual elements and then fade them out before display successive ones. However, my script only renders the last element. Any idea what it is I could be doing wrong here? JSON file---x.json {"questions":[ { "q":"Question1...?", "a": [ "Answer 1a", "Answer 1b", "Answer 1c", "Answer 1d" ] }, { "q":"Question2...?", "a": [ "Answer 2a", "Answer 2b", "Answer 2c", "Answer 2d" ] } ]} JavaScript file---x.js $(document).ready( function () { $.getJSON('x.json', function (jsondata) { // compute total number of questions in JSON file var totalQuestions = jsondata.questions.length; $.each(jsondata.questions, function (i) { var questionNumber = i + 1; // add one since indicies start at 0 var questionContent = jsondata.questions[i]["q"]; var answerContent = ''; // generate questions progress HTML text var questionHTML = ' Question ' + questionNumber +' of ' + totalQuestions + ''; // generate question HTML text questionHTML += ' ' + questionNumber + '. ' + questionContent + ' '; console.log(JSON.stringify(jsondata.questions[i]["q"])); var answersHTML = ' '; $.each(jsondata.questions[i]["a"], function (k) { answerContent = jsondata.questions[i]["a"][k]; answersHTML += ' ' + answerContent + ' '; }); answersHTML += ' '; questionHTML += answersHTML; console.log(questionHTML); $("#placeholder").html(questionHTML); setInterval(function () { $("#placeholder").html(questionHTML); $("#placeholder").fadeIn(6000).delay(3000).fadeOut(1000); }, 5000); }); }); }); HTML file---x.html JSON Sample
score: 1
accepted answer: http://stackoverflow.com/a/25922939
has comment: http://stackoverflow.com/comment/40578348
favorite count: 0
has comment: http://stackoverflow.com/comment/40577970
has comment: http://stackoverflow.com/comment/40577928
type: Question
answer count: 2
upvote count: 1

http://stackoverflow.com/a/26356679
answers question: http://stackoverflow.com/q/25874268
score: 0
type: Answer
upvote count: 1
downvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25874268
has comment: http://stackoverflow.com/comment/41385113
has body: It's pointless cleaning up your javascript files until you find the php backdoor that is making this happen. Believe me, I laboured over this for weeks! You need to do a grep search on your entire server for the following strings... 'eval(gzinflate(base64_decode(' and 'eval(gzuncompress(base64_decode(' and 'if(!empty($_COOKIE[' it should return randomly named .php files. You must remove these since this is the backdoor which is editing your javascript files (triggered remotely by direct URL from a hacker Zombie machine most probably). Especially the files containing `'if(!empty($_COOKIE['.`

http://stackoverflow.com/a/25995666
accepted answer of: http://stackoverflow.com/q/25995639
type: Answer
answers question: http://stackoverflow.com/q/25995639
score: 3
downvote count: 0
has body: use JSON.stringify() to convert it to JSON string and send your data. side note: There is an issue in the way you are creating an appending objects. Each time you are editing the same object. It will result in all the elemnts in your array being the last object you made as they are all references to the same object you have. resolve this by creating new objects when you append items to the array var tables = new Array(); tables.push({"no":1000,"name":"Table-0"}); tables.push({"no":1001,"name":"Table-1"}); alert(JSON.stringify(tables));
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/25935824
score: 0
answer count: 1
tagged with: polymer
accepted answer: http://stackoverflow.com/a/25936109
has title: Simple node binding with polymer
tagged with: javascript
type: AnsweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25936109
tagged with: data-binding
has body: I'm new to polymer and wanted to get started with something simple. I'm not too familiar with all the terminology yet so it's hard for me to google the right thing. Anyway, I've found that I can access the textContent of the text within the 'shallow dom'? fairly easily: {{textContent}} {{foo.textContent}} {{test.textContent}} However, I can't seem to access specific text content of child elements within my main page: Some text here Something else So is there a way of getting at the textContent of and explicitly? I'm aware this is probably fairly easy with JS, but I have a feeling there's probably an in-built polymer way of doing this, much like just accessing {{textContent}}.

http://stackoverflow.com/comment/40503890
type: Comment
type: QuestionComment
score: 1
has text: can do what you want simply using `scope[attrs.attributeName]='someVal'`without all the complexity http://plnkr.co/edit/7IpGgGUlNqjsGKTcqhlk?p=preview
comment on: http://stackoverflow.com/q/25881026

http://stackoverflow.com/q/25952197
has comment: http://stackoverflow.com/comment/40635617
has comment: http://stackoverflow.com/comment/40630396
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40630343
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25954910
has answer: http://stackoverflow.com/a/25959145
has comment: http://stackoverflow.com/comment/40630375
has answer: http://stackoverflow.com/a/25968183
has title: Create a view without a defined el property with events - Backbone
possible better answer: http://stackoverflow.com/a/25954910
has comment: http://stackoverflow.com/comment/40636435
type: AnsweredQuestion
has body: I've been trying to learn Backbone, and I'm developing an app now. But I have a problem with a view's events: App.views.ChannelView should have a click event, but it is not firing. Here's the code: http://pastebin.com/GgvVHvtj Everything get rendered fine, but events won't fire. Setting the el property in the view will work, but I can't use it, and I've seen on Backbone's todo tutorial that it is possible. How do I make events fire without a defined el property?
type: Question
has comment: http://stackoverflow.com/comment/40630635
has comment: http://stackoverflow.com/comment/40630524
accepted answer: http://stackoverflow.com/a/25968183
tagged with: javascript

http://stackoverflow.com/a/25946740
score: 1
upvote count: 2
has comment: http://stackoverflow.com/comment/73516594
type: Answer
downvote count: 1
has body: Try this angular.module('myModule', []) .filter('split', function() { return function(input, splitChar, splitIndex) { // do some bounds checking here to ensure it has that index return input.split(splitChar)[splitIndex]; } }); Use in view like Ref - See here
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/73524193
answers question: http://stackoverflow.com/q/25946718
has comment: http://stackoverflow.com/comment/73525423
accepted answer of: http://stackoverflow.com/q/25946718